/** * @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; }