Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function validateAddresses($addresses)
 {
     $inputException = new InputException();
     foreach ($addresses as $key => $address) {
         $addressModel = $this->addressConverter->createAddressModel($address);
         $inputException = $this->_validate($addressModel, $inputException, $key);
     }
     if ($inputException->wasErrorAdded()) {
         throw $inputException;
     }
     return true;
 }
Exemplo n.º 2
0
 /**
  * Add address to the customer, created out of a Data Object
  *
  * TODO refactor in scope of MAGETWO-19930
  *
  * @param AddressDataObject $address
  * @return $this
  */
 public function addCustomerAddressData(AddressDataObject $address)
 {
     $this->getCustomer()->addAddress($this->_addressConverter->createAddressModel($address));
     return $this;
 }