/** * @see https://developer.gocardless.com/pro/#customer-bank-accounts-create-a-customer-bank-account * * @param CustomerBankAccount $account * * @return CustomerBankAccount */ public function createCustomerBankAccount(CustomerBankAccount $account) { $response = $this->post(self::CUSTOMER_BANK_ACCOUNTS, $account->toArray()); return CustomerBankAccount::fromArray($response); }
/** @depends test_it_can_create_a_customer_bank_account */ function test_it_can_get_a_single_bank_account(CustomerBankAccount $old) { $new = $this->api->getCustomerBankAccount($old->getId()); $this->assertInstanceOf('GoCardless\\Pro\\Models\\CustomerBankAccount', $new); $this->assertEquals($old->toArray(), $new->toArray()); }