Skip to content

Commit

Permalink
Merge pull request #154 from gocardless/template-changes
Browse files Browse the repository at this point in the history
Release v4.26.0
  • Loading branch information
hjheath authored Feb 14, 2023
2 parents ebaed83 + c733dd7 commit a859504
Show file tree
Hide file tree
Showing 38 changed files with 428 additions and 302 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gocardless/gocardless-pro",
"description": "GoCardless Pro PHP Client Library",
"version": "4.25.0",
"version": "4.26.0",
"keywords": [
"gocardless",
"direct debit",
Expand Down
4 changes: 2 additions & 2 deletions lib/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function __construct($config)
'Content-Type' => 'application/json',
'Authorization' => "Bearer " . $access_token,
'GoCardless-Client-Library' => 'gocardless-pro-php',
'GoCardless-Client-Version' => '4.25.0',
'GoCardless-Client-Version' => '4.26.0',
'User-Agent' => $this->getUserAgent()
),
'http_errors' => false,
Expand Down Expand Up @@ -554,7 +554,7 @@ private function getUserAgent()
{
$curlinfo = curl_version();
$uagent = array();
$uagent[] = 'gocardless-pro-php/4.25.0';
$uagent[] = 'gocardless-pro-php/4.26.0';
$uagent[] = 'schema-version/2015-07-06';
if (defined('\GuzzleHttp\Client::MAJOR_VERSION')) {
$uagent[] = 'GuzzleHttp/' . \GuzzleHttp\Client::MAJOR_VERSION;
Expand Down
17 changes: 17 additions & 0 deletions lib/Resources/BankAuthorisation.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,23 @@ class BankAuthorisation extends BaseResource

/**
* URL that the payer can be redirected to after authorising the payment.
*
* On completion of bank authorisation, the query parameter of either
* `outcome=success` or `outcome=failure` will be
* appended to the `redirect_uri` to indicate the result of the bank
* authorisation. If the bank authorisation is
* expired, the query parameter `outcome=timeout` will be appended to the
* `redirect_uri`, in which case you should
* prompt the user to try the bank authorisation step again.
*
* The `redirect_uri` you provide should handle the `outcome` query
* parameter for displaying the result of the
* bank authorisation as outlined above.
*
* The BillingRequestFlow ID will also be appended to the `redirect_uri` as
* query parameter `id=BRF123`.
*
* Defaults to `https://pay.gocardless.com/billing/static/thankyou`.
*/
protected $redirect_uri;

Expand Down
8 changes: 8 additions & 0 deletions lib/Resources/BillingRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* @property-read $mandate_request
* @property-read $metadata
* @property-read $payment_request
* @property-read $purpose_code
* @property-read $resources
* @property-read $status
*/
Expand Down Expand Up @@ -75,6 +76,13 @@ class BillingRequest extends BaseResource
*/
protected $payment_request;

/**
* Specifies the high-level purpose of a mandate and/or payment using a set
* of pre-defined categories. Required for the PayTo scheme, optional for
* all others.
*/
protected $purpose_code;

/**
*
*/
Expand Down
6 changes: 6 additions & 0 deletions lib/Resources/VerificationDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* @property-read $description
* @property-read $directors
* @property-read $links
* @property-read $name
* @property-read $postal_code
*/
class VerificationDetail extends BaseResource
Expand Down Expand Up @@ -65,6 +66,11 @@ class VerificationDetail extends BaseResource
*/
protected $links;

/**
* The company's legal name.
*/
protected $name;

/**
* The company's postal code.
*/
Expand Down
60 changes: 30 additions & 30 deletions lib/Services/BankAuthorisationsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* Service that provides access to the BankAuthorisation
* endpoints of the API
*
* @method get()
* @method create()
* @method get()
*/
class BankAuthorisationsService extends BaseService
{
Expand All @@ -28,35 +28,6 @@ class BankAuthorisationsService extends BaseService
protected $resource_class = '\GoCardlessPro\Resources\BankAuthorisation';


/**
* Get a Bank Authorisation.
*
* Example URL: /bank_authorisations/:identity
*
* @param string $identity Unique identifier, beginning with "BAU".
* @param string[mixed] $params An associative array for any params
* @return BankAuthorisation
**/
public function get($identity, $params = array())
{
$path = Util::subUrl(
'/bank_authorisations/:identity',
array(

'identity' => $identity
)
);
if(isset($params['params'])) { $params['query'] = $params['params'];
unset($params['params']);
}


$response = $this->api_client->get($path, $params);


return $this->getResourceForResponse($response);
}

/**
* Create a Bank Authorisation
*
Expand Down Expand Up @@ -89,6 +60,35 @@ public function create($params = array())
}


return $this->getResourceForResponse($response);
}

/**
* Get a Bank Authorisation
*
* Example URL: /bank_authorisations/:identity
*
* @param string $identity Unique identifier, beginning with "BAU".
* @param string[mixed] $params An associative array for any params
* @return BankAuthorisation
**/
public function get($identity, $params = array())
{
$path = Util::subUrl(
'/bank_authorisations/:identity',
array(

'identity' => $identity
)
);
if(isset($params['params'])) { $params['query'] = $params['params'];
unset($params['params']);
}


$response = $this->api_client->get($path, $params);


return $this->getResourceForResponse($response);
}

Expand Down
Loading

0 comments on commit a859504

Please sign in to comment.