public function fromArray($data)
 {
     parent::fromArray($data);
     $this->setCreatedAt(new \DateTime($this->getCreatedAt()));
 }
Ejemplo n.º 2
0
 /**
  * @param CreditorBankAccount $account
  * @param bool $setAsDefault
  * @return CreditorBankAccount
  */
 public function createCreditorBankAccount(CreditorBankAccount $account, $setAsDefault = false)
 {
     $response = $this->post(self::ENDPOINT_CREDITOR_BANK, ["set_as_default_payout_account" => $setAsDefault] + $account->toArray());
     $account->fromArray($response);
     return $account;
 }
Ejemplo n.º 3
0
 public function disableCreditorBankAccount($id)
 {
     $response = $this->post(self::ENDPOINT_CREDITOR_BANK, '', $id . '/actions/disable');
     $account = new CreditorBankAccount();
     $account->fromArray($response);
     return $account;
 }