Skip to content

Commit

Permalink
Changes generated by 9aea8d8d2a4deb6d88add9316cbbfc708a9cb33b
Browse files Browse the repository at this point in the history
This commit was automatically created from gocardless/gocardless-pro-php-template@9aea8d8
by the `push-files` action.

Workflow run: https://github.com/gocardless/gocardless-pro-php-template/actions/runs/10508344814
  • Loading branch information
gocardless-ci-robot[bot] committed Aug 22, 2024
1 parent 31658e6 commit 3cff389
Show file tree
Hide file tree
Showing 22 changed files with 76 additions and 60 deletions.
7 changes: 7 additions & 0 deletions lib/Resources/CustomerBankAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* @property-read mixed $account_holder_name
* @property-read mixed $account_number_ending
* @property-read mixed $account_type
* @property-read mixed $bank_account_token
* @property-read mixed $bank_name
* @property-read mixed $country_code
* @property-read mixed $created_at
Expand Down Expand Up @@ -48,6 +49,12 @@ class CustomerBankAccount extends BaseResource
*/
protected $account_type;

/**
* A token to uniquely refer to a set of bank account details. This feature
* is still in early access and is only available for certain organisations.
*/
protected $bank_account_token;

/**
* Name of bank, taken from the bank details.
*/
Expand Down
9 changes: 9 additions & 0 deletions tests/Integration/CustomerBankAccountsIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public function testCustomerBankAccountsCreate()
$this->assertEquals($body->account_holder_name, $response->account_holder_name);
$this->assertEquals($body->account_number_ending, $response->account_number_ending);
$this->assertEquals($body->account_type, $response->account_type);
$this->assertEquals($body->bank_account_token, $response->bank_account_token);
$this->assertEquals($body->bank_name, $response->bank_name);
$this->assertEquals($body->country_code, $response->country_code);
$this->assertEquals($body->created_at, $response->created_at);
Expand Down Expand Up @@ -67,6 +68,7 @@ public function testCustomerBankAccountsCreateWithIdempotencyConflict()
$this->assertEquals($body->account_holder_name, $response->account_holder_name);
$this->assertEquals($body->account_number_ending, $response->account_number_ending);
$this->assertEquals($body->account_type, $response->account_type);
$this->assertEquals($body->bank_account_token, $response->bank_account_token);
$this->assertEquals($body->bank_name, $response->bank_name);
$this->assertEquals($body->country_code, $response->country_code);
$this->assertEquals($body->created_at, $response->created_at);
Expand Down Expand Up @@ -119,6 +121,10 @@ public function testCustomerBankAccountsList()
$this->assertEquals($body[$num]->account_type, $record->account_type);
}

if (isset($body[$num]->bank_account_token)) {
$this->assertEquals($body[$num]->bank_account_token, $record->bank_account_token);
}

if (isset($body[$num]->bank_name)) {
$this->assertEquals($body[$num]->bank_name, $record->bank_name);
}
Expand Down Expand Up @@ -174,6 +180,7 @@ public function testCustomerBankAccountsGet()
$this->assertEquals($body->account_holder_name, $response->account_holder_name);
$this->assertEquals($body->account_number_ending, $response->account_number_ending);
$this->assertEquals($body->account_type, $response->account_type);
$this->assertEquals($body->bank_account_token, $response->bank_account_token);
$this->assertEquals($body->bank_name, $response->bank_name);
$this->assertEquals($body->country_code, $response->country_code);
$this->assertEquals($body->created_at, $response->created_at);
Expand Down Expand Up @@ -205,6 +212,7 @@ public function testCustomerBankAccountsUpdate()
$this->assertEquals($body->account_holder_name, $response->account_holder_name);
$this->assertEquals($body->account_number_ending, $response->account_number_ending);
$this->assertEquals($body->account_type, $response->account_type);
$this->assertEquals($body->bank_account_token, $response->bank_account_token);
$this->assertEquals($body->bank_name, $response->bank_name);
$this->assertEquals($body->country_code, $response->country_code);
$this->assertEquals($body->created_at, $response->created_at);
Expand Down Expand Up @@ -236,6 +244,7 @@ public function testCustomerBankAccountsDisable()
$this->assertEquals($body->account_holder_name, $response->account_holder_name);
$this->assertEquals($body->account_number_ending, $response->account_number_ending);
$this->assertEquals($body->account_type, $response->account_type);
$this->assertEquals($body->bank_account_token, $response->bank_account_token);
$this->assertEquals($body->bank_name, $response->bank_name);
$this->assertEquals($body->country_code, $response->country_code);
$this->assertEquals($body->created_at, $response->created_at);
Expand Down
4 changes: 2 additions & 2 deletions tests/fixtures/bank_authorisations.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"method": "POST",
"path_template": "/bank_authorisations",
"url_params": {},
"body": {"bank_authorisations":{"authorisation_type":"example authorisation_type 8081","authorised_at":"2020-01-01T12:00:00.000Z","created_at":"2024-08-14T14:55:17.046Z","expires_at":"2024-08-14T14:55:17.046Z","id":"BAU123","last_visited_at":"2020-01-01T12:00:00.000Z","links":{"billing_request":"BRQ123","institution":"monzo"},"qr_code_url":"https://pay.gocardless.com/obauth/BAU123/qr_code","redirect_uri":"https://my-website.com/abc/callback","url":"https://pay.gocardless.com/obauth/BAU123"}}
"body": {"bank_authorisations":{"authorisation_type":"example authorisation_type 8081","authorised_at":"2020-01-01T12:00:00.000Z","created_at":"2024-08-22T12:46:36.207Z","expires_at":"2024-08-22T12:46:36.207Z","id":"BAU123","last_visited_at":"2020-01-01T12:00:00.000Z","links":{"billing_request":"BRQ123","institution":"monzo"},"qr_code_url":"https://pay.gocardless.com/obauth/BAU123/qr_code","redirect_uri":"https://my-website.com/abc/callback","url":"https://pay.gocardless.com/obauth/BAU123"}}
},
"get": {
"method": "GET",
"path_template": "/bank_authorisations/:identity",
"url_params": {"identity": "BAU123"},
"body": {"bank_authorisations":{"authorisation_type":"example authorisation_type 7887","authorised_at":"2020-01-01T12:00:00.000Z","created_at":"2024-08-14T14:55:17.046Z","expires_at":"2024-08-14T14:55:17.046Z","id":"BAU123","last_visited_at":"2020-01-01T12:00:00.000Z","links":{"billing_request":"BRQ123","institution":"monzo"},"qr_code_url":"https://pay.gocardless.com/obauth/BAU123/qr_code","redirect_uri":"https://my-website.com/abc/callback","url":"https://pay.gocardless.com/obauth/BAU123"}}
"body": {"bank_authorisations":{"authorisation_type":"example authorisation_type 7887","authorised_at":"2020-01-01T12:00:00.000Z","created_at":"2024-08-22T12:46:36.207Z","expires_at":"2024-08-22T12:46:36.207Z","id":"BAU123","last_visited_at":"2020-01-01T12:00:00.000Z","links":{"billing_request":"BRQ123","institution":"monzo"},"qr_code_url":"https://pay.gocardless.com/obauth/BAU123/qr_code","redirect_uri":"https://my-website.com/abc/callback","url":"https://pay.gocardless.com/obauth/BAU123"}}
}
}

4 changes: 2 additions & 2 deletions tests/fixtures/billing_request_flows.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"method": "POST",
"path_template": "/billing_request_flows",
"url_params": {},
"body": {"billing_request_flows":{"authorisation_url":"https://monzo.com/abc-123-things","auto_fulfil":true,"created_at":"2024-08-14T14:55:17.050Z","customer_details_captured":false,"exit_uri":"https://my-website.com/abc/callback","expires_at":"2024-08-14T14:55:17.050Z","id":"BRF123","language":"en","links":{"billing_request":"BRQ123"},"lock_bank_account":true,"lock_currency":true,"lock_customer_details":false,"prefilled_bank_account":{"account_type":"savings"},"prefilled_customer":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","company_name":"Hamilton Trading Ltd.","country_code":"GB","danish_identity_number":"220550-6218","email":"[email protected]","family_name":"Osborne","given_name":"Frank","postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"redirect_uri":"https://my-website.com/abc/callback","session_token":"sesh_123","show_redirect_buttons":false,"show_success_redirect_button":true}}
"body": {"billing_request_flows":{"authorisation_url":"https://monzo.com/abc-123-things","auto_fulfil":true,"created_at":"2024-08-22T12:46:36.211Z","customer_details_captured":false,"exit_uri":"https://my-website.com/abc/callback","expires_at":"2024-08-22T12:46:36.211Z","id":"BRF123","language":"en","links":{"billing_request":"BRQ123"},"lock_bank_account":false,"lock_currency":true,"lock_customer_details":true,"prefilled_bank_account":{"account_type":"savings"},"prefilled_customer":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","company_name":"Hamilton Trading Ltd.","country_code":"GB","danish_identity_number":"220550-6218","email":"[email protected]","family_name":"Osborne","given_name":"Frank","postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"redirect_uri":"https://my-website.com/abc/callback","session_token":"sesh_123","show_redirect_buttons":false,"show_success_redirect_button":true}}
},
"initialise": {
"method": "POST",
"path_template": "/billing_request_flows/:identity/actions/initialise",
"url_params": {"identity": "BRF123"},
"body": {"billing_request_flows":{"authorisation_url":"https://monzo.com/abc-123-things","auto_fulfil":false,"created_at":"2024-08-14T14:55:17.050Z","customer_details_captured":true,"exit_uri":"https://my-website.com/abc/callback","expires_at":"2024-08-14T14:55:17.050Z","id":"BRF123","language":"en","links":{"billing_request":"BRQ123"},"lock_bank_account":false,"lock_currency":false,"lock_customer_details":true,"prefilled_bank_account":{"account_type":"savings"},"prefilled_customer":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","company_name":"Hamilton Trading Ltd.","country_code":"GB","danish_identity_number":"220550-6218","email":"[email protected]","family_name":"Osborne","given_name":"Frank","postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"redirect_uri":"https://my-website.com/abc/callback","session_token":"sesh_123","show_redirect_buttons":false,"show_success_redirect_button":false}}
"body": {"billing_request_flows":{"authorisation_url":"https://monzo.com/abc-123-things","auto_fulfil":false,"created_at":"2024-08-22T12:46:36.211Z","customer_details_captured":false,"exit_uri":"https://my-website.com/abc/callback","expires_at":"2024-08-22T12:46:36.211Z","id":"BRF123","language":"en","links":{"billing_request":"BRQ123"},"lock_bank_account":false,"lock_currency":false,"lock_customer_details":true,"prefilled_bank_account":{"account_type":"savings"},"prefilled_customer":{"address_line1":"221B Baker Street","address_line2":"Marylebone","address_line3":"City of Westminster","city":"London","company_name":"Hamilton Trading Ltd.","country_code":"GB","danish_identity_number":"220550-6218","email":"[email protected]","family_name":"Osborne","given_name":"Frank","postal_code":"NW1 6XE","region":"Greater London","swedish_identity_number":"556564-5404"},"redirect_uri":"https://my-website.com/abc/callback","session_token":"sesh_123","show_redirect_buttons":false,"show_success_redirect_button":true}}
}
}

2 changes: 1 addition & 1 deletion tests/fixtures/billing_request_templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"method": "GET",
"path_template": "/billing_request_templates",
"url_params": {},
"body": {"billing_request_templates":[{"authorisation_url":"https://pay.gocardless.com/BRT123","created_at":"2021-01-01T12:00:00.000Z","id":"BRT123","mandate_request_currency":"GBP","mandate_request_description":"Top-up Payment","mandate_request_metadata":{},"mandate_request_scheme":"bacs","mandate_request_verify":null,"metadata":{},"name":"12 Month Gold Plan","payment_request_amount":1000,"payment_request_currency":"GBP","payment_request_description":"Top-up Payment","payment_request_metadata":{},"payment_request_scheme":"faster_payments","redirect_uri":"https://my-website.com/abc/callback","updated_at":"2021-01-01T12:00:00.000Z"},{"authorisation_url":"https://pay.gocardless.com/BRT123","created_at":"2021-01-01T12:00:00.000Z","id":"BRT123","mandate_request_currency":"GBP","mandate_request_description":"Top-up Payment","mandate_request_metadata":{},"mandate_request_scheme":"bacs","mandate_request_verify":null,"metadata":{},"name":"12 Month Gold Plan","payment_request_amount":1000,"payment_request_currency":"GBP","payment_request_description":"Top-up Payment","payment_request_metadata":{},"payment_request_scheme":"faster_payments","redirect_uri":"https://my-website.com/abc/callback","updated_at":"2021-01-01T12:00:00.000Z"}],"meta":{"cursors":{"after":"example after 2887","before":"example before 9430"},"limit":50}}
"body": {"billing_request_templates":[{"authorisation_url":"https://pay.gocardless.com/BRT123","created_at":"2021-01-01T12:00:00.000Z","id":"BRT123","mandate_request_currency":"GBP","mandate_request_description":"Top-up Payment","mandate_request_metadata":{},"mandate_request_scheme":"bacs","mandate_request_verify":null,"metadata":{},"name":"12 Month Gold Plan","payment_request_amount":1000,"payment_request_currency":"GBP","payment_request_description":"Top-up Payment","payment_request_metadata":{},"payment_request_scheme":"faster_payments","redirect_uri":"https://my-website.com/abc/callback","updated_at":"2021-01-01T12:00:00.000Z"},{"authorisation_url":"https://pay.gocardless.com/BRT123","created_at":"2021-01-01T12:00:00.000Z","id":"BRT123","mandate_request_currency":"GBP","mandate_request_description":"Top-up Payment","mandate_request_metadata":{},"mandate_request_scheme":"bacs","mandate_request_verify":null,"metadata":{},"name":"12 Month Gold Plan","payment_request_amount":1000,"payment_request_currency":"GBP","payment_request_description":"Top-up Payment","payment_request_metadata":{},"payment_request_scheme":"faster_payments","redirect_uri":"https://my-website.com/abc/callback","updated_at":"2021-01-01T12:00:00.000Z"}],"meta":{"cursors":{"after":"example after 9430","before":"example before 2887"},"limit":50}}
},
"get": {
"method": "GET",
Expand Down
Loading

0 comments on commit 3cff389

Please sign in to comment.