/**
  * @param $id
  * @return Creditor
  */
 public function getCreditor($id)
 {
     $creditor = new Creditor();
     $creditor->fromArray($this->get(self::ENDPOINT_CREDITORS, [], $id));
     return $creditor;
 }
 /**
  * @depends testListCreditors
  * @param Creditor $old
  */
 public function testGetCreditor($old)
 {
     $new = $this->getClient()->getCreditor($old->getId());
     $newArray = $new->toArray();
     $oldArray = $old->toArray();
     $this->assertEquals($newArray, $oldArray);
 }
 public function fromArray($data)
 {
     parent::fromArray($data);
     $this->setCreatedAt(new \DateTime($this->getCreatedAt()));
 }