Skip to content

Commit

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

Workflow run: https://github.com/gocardless/gocardless-pro-php-template/actions/runs/9130947968
  • Loading branch information
gocardless-ci-robot[bot] committed May 17, 2024
1 parent 721a6c4 commit a3ea9d7
Show file tree
Hide file tree
Showing 25 changed files with 140 additions and 52 deletions.
15 changes: 15 additions & 0 deletions lib/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ public function __construct($config)

$this->services['institutions'] = new Services\InstitutionsService($this->api_client);

$this->services['logos'] = new Services\LogosService($this->api_client);

$this->services['mandates'] = new Services\MandatesService($this->api_client);

$this->services['mandate_imports'] = new Services\MandateImportsService($this->api_client);
Expand Down Expand Up @@ -336,6 +338,19 @@ public function institutions()
return $this->services['institutions'];
}

/**
* Service for interacting with logos
*
* @return Services\LogosService
*/
public function logos()
{
if (!isset($this->services['logos'])) {
throw new \Exception('Key logos does not exist in services array');
}
return $this->services['logos'];
}

/**
* Service for interacting with mandates
*
Expand Down
25 changes: 25 additions & 0 deletions lib/Resources/Logo.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php
/**
* WARNING: Do not edit by hand, this file was generated by Crank:
*
* https://github.com/gocardless/crank
*/

namespace GoCardlessPro\Resources;

/**
* A thin wrapper around a logo, providing access to its
* attributes
*
* @property-read $id
*/
class Logo extends BaseResource
{
protected $model_name = "Logo";

/**
* Unique identifier, beginning with "LO".
*/
protected $id;

}
28 changes: 28 additions & 0 deletions lib/Services/LogosService.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php
/**
* WARNING: Do not edit by hand, this file was generated by Crank:
*
* https://github.com/gocardless/crank
*/

namespace GoCardlessPro\Services;

use \GoCardlessPro\Core\Paginator;
use \GoCardlessPro\Core\Util;
use \GoCardlessPro\Core\ListResponse;
use \GoCardlessPro\Resources\Logo;
use \GoCardlessPro\Core\Exception\InvalidStateException;


/**
* Service that provides access to the Logo
* endpoints of the API
*/
class LogosService extends BaseService
{

protected $envelope_key = 'logos';
protected $resource_class = '\GoCardlessPro\Resources\Logo';


}
17 changes: 17 additions & 0 deletions tests/Integration/LogosIntegrationTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php
//
// WARNING: Do not edit by hand, this file was generated by Crank:
// https://github.com/gocardless/crank
//

namespace GoCardlessPro\Integration;

class LogosIntegrationTest extends IntegrationTestBase
{
public function testResourceModelExists()
{
$obj = new \GoCardlessPro\Resources\Logo(array());
$this->assertNotNull($obj);
}

}
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-05-02T09:27:45.150Z","expires_at":"2024-05-02T09:27:45.150Z","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-05-17T15:57:02.133Z","expires_at":"2024-05-17T15:57:02.133Z","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-05-02T09:27:45.150Z","expires_at":"2024-05-02T09:27:45.150Z","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-05-17T15:57:02.133Z","expires_at":"2024-05-17T15:57:02.133Z","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":false,"created_at":"2024-05-02T09:27:45.154Z","customer_details_captured":true,"exit_uri":"https://my-website.com/abc/callback","expires_at":"2024-05-02T09:27:45.154Z","id":"BRF123","language":"en","links":{"billing_request":"BRQ123"},"lock_bank_account":true,"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":true,"show_success_redirect_button":false}}
"body": {"billing_request_flows":{"authorisation_url":"https://monzo.com/abc-123-things","auto_fulfil":false,"created_at":"2024-05-17T15:57:02.137Z","customer_details_captured":true,"exit_uri":"https://my-website.com/abc/callback","expires_at":"2024-05-17T15:57:02.137Z","id":"BRF123","language":"en","links":{"billing_request":"BRQ123"},"lock_bank_account":true,"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":true,"show_success_redirect_button":false}}
},
"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":true,"created_at":"2024-05-02T09:27:45.155Z","customer_details_captured":true,"exit_uri":"https://my-website.com/abc/callback","expires_at":"2024-05-02T09:27:45.155Z","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":true,"show_success_redirect_button":true}}
"body": {"billing_request_flows":{"authorisation_url":"https://monzo.com/abc-123-things","auto_fulfil":true,"created_at":"2024-05-17T15:57:02.137Z","customer_details_captured":true,"exit_uri":"https://my-website.com/abc/callback","expires_at":"2024-05-17T15:57:02.137Z","id":"BRF123","language":"en","links":{"billing_request":"BRQ123"},"lock_bank_account":true,"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":true,"show_success_redirect_button":false}}
}
}

Loading

0 comments on commit a3ea9d7

Please sign in to comment.