public function fromArray($data) { parent::fromArray($data); $this->setCreatedAt(new \DateTime($this->getCreatedAt())); }
/** * @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; }
public function disableCreditorBankAccount($id) { $response = $this->post(self::ENDPOINT_CREDITOR_BANK, '', $id . '/actions/disable'); $account = new CreditorBankAccount(); $account->fromArray($response); return $account; }