/** * @see https://developer.gocardless.com/pro/#creditor-bank-accounts-create-a-creditor-bank-account * @param CreditorBankAccount $account * * @return CreditorBankAccount */ public function createCreditorBankAccount(CreditorBankAccount $account) { $response = $this->post(self::CREDITOR_BANK_ACCOUNTS, $account->toArray()); return CreditorBankAccount::fromArray($response); }
/** @depends test_it_can_create_creditor_bank_account */ function test_it_can_get_a_single_creditor_bank_account(CreditorBankAccount $old) { $new = $this->api->getCreditorBankAccount($old->getId()); $this->assertInstanceOf('GoCardless\\Pro\\Models\\CreditorBankAccount', $new); $this->assertEquals($old->toArray(), $new->toArray()); }