コード例 #1
0
ファイル: Api.php プロジェクト: picqer/gocardless-pro
 /**
  * @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);
 }
コード例 #2
0
ファイル: ApiTest.php プロジェクト: sneek/gocardless-pro
 /** @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());
 }