/**
  * @see ShippingAddressEntity::toArray()
  */
 public function testToArray()
 {
     $entity = array('street1' => 'street1_' . rand(1, 1000), 'street2' => 'street1_' . rand(1, 1000), 'city' => 'city_' . rand(1, 1000), 'state' => 'state_' . rand(1, 1000), 'country' => 'country_' . rand(1, 1000), 'postalCode' => 'postalCode_' . rand(1, 1000), 'phone' => 'phone_' . rand(1, 1000));
     $this->object->setStreet1($entity['street1'])->setStreet2($entity['street2'])->setCity($entity['city'])->setState($entity['state'])->setCountry($entity['country'])->setPostalCode($entity['postalCode'])->setPhone($entity['phone']);
     $rs = $this->object->toArray();
     $this->assertSame($entity, $rs);
 }
Beispiel #2
0
 /**
  * Generate arry order.
  * @return array
  */
 public function toArray()
 {
     return array('fullName' => $this->fullName, 'emailAddress' => $this->emailAddress, 'dniNumber' => $this->dniNumber, 'shippingAddress' => $this->shippingAddress->toArray());
 }
Beispiel #3
0
 /**
  * Generate array order.
  * @return array
  */
 public function toArray()
 {
     $return = array('accountId' => $this->accountId, 'referenceCode' => $this->referenceCode, 'description' => $this->description, 'language' => $this->language, 'notifyUrl' => $this->notifyUrl, 'signature' => $this->signature, 'buyer' => $this->buyer->toArray(), 'additionalValues' => $this->additionalValues->toArray());
     if (!$this->getShippingAddress()->isEmpty()) {
         $return = array_merge($return, array('shippingAddress' => $this->shippingAddress->toArray()));
     }
     return $return;
 }