/**
  * @depends testListCustomers
  * @param Customer $old
  */
 public function testGetCustomer(Customer $old)
 {
     $new = $this->getClient()->getCustomer($old->getId());
     $newArray = $new->toArray();
     $oldArray = $old->toArray();
     $this->assertEquals($newArray, $oldArray);
 }
Ejemplo n.º 2
0
 /**
  * @param $id
  * @return Customer
  */
 public function getCustomer($id)
 {
     $customer = new Customer();
     $customer->fromArray($this->get(self::ENDPOINT_CUSTOMER, [], $id));
     return $customer;
 }
 public function fromArray($data)
 {
     parent::fromArray($data);
     $this->setCreatedAt(new \DateTime($this->getCreatedAt()));
 }