Skip to content

Commit

Permalink
Fix phpdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed May 30, 2024
1 parent 5b64d04 commit bdf00a2
Show file tree
Hide file tree
Showing 34 changed files with 384 additions and 483 deletions.
146 changes: 73 additions & 73 deletions lib/Client.php

Large diffs are not rendered by default.

21 changes: 9 additions & 12 deletions lib/Services/BankAuthorisationsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
/**
* Service that provides access to the BankAuthorisation
* endpoints of the API
*
* @method create()
* @method get()
*/
class BankAuthorisationsService extends BaseService
{
Expand All @@ -33,19 +30,19 @@ class BankAuthorisationsService extends BaseService
*
* Example URL: /bank_authorisations
*
* @param string[mixed] $params An associative array for any params
* @param array<string, mixed> $params An associative array for any params
* @return BankAuthorisation
**/
public function create($params = array())
{
$path = "/bank_authorisations";
if(isset($params['params'])) {
if(isset($params['params'])) {
$params['body'] = json_encode(array($this->envelope_key => (object)$params['params']));

unset($params['params']);
}


try {
$response = $this->api_client->post($path, $params);
} catch(InvalidStateException $e) {
Expand All @@ -58,7 +55,7 @@ public function create($params = array())

throw $e;
}


return $this->getResourceForResponse($response);
}
Expand All @@ -69,25 +66,25 @@ public function create($params = array())
* Example URL: /bank_authorisations/:identity
*
* @param string $identity Unique identifier, beginning with "BAU".
* @param string[mixed] $params An associative array for any params
* @param array<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
12 changes: 5 additions & 7 deletions lib/Services/BankDetailsLookupsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
/**
* Service that provides access to the BankDetailsLookup
* endpoints of the API
*
* @method create()
*/
class BankDetailsLookupsService extends BaseService
{
Expand All @@ -32,21 +30,21 @@ class BankDetailsLookupsService extends BaseService
*
* Example URL: /bank_details_lookups
*
* @param string[mixed] $params An associative array for any params
* @param array<string, mixed> $params An associative array for any params
* @return BankDetailsLookup
**/
public function create($params = array())
{
$path = "/bank_details_lookups";
if(isset($params['params'])) {
if(isset($params['params'])) {
$params['body'] = json_encode(array($this->envelope_key => (object)$params['params']));

unset($params['params']);
}


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


return $this->getResourceForResponse($response);
}
Expand Down
25 changes: 11 additions & 14 deletions lib/Services/BillingRequestFlowsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
/**
* Service that provides access to the BillingRequestFlow
* endpoints of the API
*
* @method create()
* @method initialise()
*/
class BillingRequestFlowsService extends BaseService
{
Expand All @@ -33,21 +30,21 @@ class BillingRequestFlowsService extends BaseService
*
* Example URL: /billing_request_flows
*
* @param string[mixed] $params An associative array for any params
* @param array<string, mixed> $params An associative array for any params
* @return BillingRequestFlow
**/
public function create($params = array())
{
$path = "/billing_request_flows";
if(isset($params['params'])) {
if(isset($params['params'])) {
$params['body'] = json_encode(array($this->envelope_key => (object)$params['params']));

unset($params['params']);
}


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


return $this->getResourceForResponse($response);
}
Expand All @@ -58,27 +55,27 @@ public function create($params = array())
* Example URL: /billing_request_flows/:identity/actions/initialise
*
* @param string $identity Unique identifier, beginning with "BRF".
* @param string[mixed] $params An associative array for any params
* @param array<string, mixed> $params An associative array for any params
* @return BillingRequestFlow
**/
public function initialise($identity, $params = array())
{
$path = Util::subUrl(
'/billing_request_flows/:identity/actions/initialise',
array(

'identity' => $identity
)
);
if(isset($params['params'])) {
if(isset($params['params'])) {
$params['body'] = json_encode(array("data" => (object)$params['params']));

unset($params['params']);
}


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


return $this->getResourceForResponse($response);
}
Expand Down
15 changes: 6 additions & 9 deletions lib/Services/BillingRequestTemplatesService.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
* Service that provides access to the BillingRequestTemplate
* endpoints of the API
*
* @method list()
* @method get()
* @method create()
* @method update()
* @method ListResponse list(array $params)
*/
class BillingRequestTemplatesService extends BaseService
{
Expand All @@ -35,7 +32,7 @@ class BillingRequestTemplatesService extends BaseService
*
* Example URL: /billing_request_templates
*
* @param string[mixed] $params An associative array for any params
* @param array<string, mixed> $params An associative array for any params
* @return ListResponse
**/
protected function _doList($params = array())
Expand All @@ -58,7 +55,7 @@ protected function _doList($params = array())
* Example URL: /billing_request_templates/:identity
*
* @param string $identity Unique identifier, beginning with "BRT".
* @param string[mixed] $params An associative array for any params
* @param array<string, mixed> $params An associative array for any params
* @return BillingRequestTemplate
**/
public function get($identity, $params = array())
Expand Down Expand Up @@ -86,7 +83,7 @@ public function get($identity, $params = array())
*
* Example URL: /billing_request_templates
*
* @param string[mixed] $params An associative array for any params
* @param array<string, mixed> $params An associative array for any params
* @return BillingRequestTemplate
**/
public function create($params = array())
Expand Down Expand Up @@ -122,7 +119,7 @@ public function create($params = array())
* Example URL: /billing_request_templates/:identity
*
* @param string $identity Unique identifier, beginning with "BRQ".
* @param string[mixed] $params An associative array for any params
* @param array<string, mixed> $params An associative array for any params
* @return BillingRequestTemplate
**/
public function update($identity, $params = array())
Expand Down Expand Up @@ -152,7 +149,7 @@ public function update($identity, $params = array())
*
* Example URL: /billing_request_templates
*
* @param string[mixed] $params
* @param array<string, mixed> $params
* @return Paginator
**/
public function all($params = array())
Expand Down
Loading

0 comments on commit bdf00a2

Please sign in to comment.