Skip to content

Commit 3a307c9

Browse files
Changes generated by e6440e6c9ec284dfcdd04f2c1d3e20980ab17a85
This commit was automatically created from gocardless/gocardless-pro-php-template@e6440e6 by the `push-files` action. Workflow run: https://github.com/gocardless/gocardless-pro-php-template/actions/runs/19500538835
1 parent 50f4379 commit 3a307c9

176 files changed

Lines changed: 2782 additions & 3316 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

lib/Client.php

Lines changed: 59 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@ class Client
99
{
1010

1111
/**
12-
* @var Core\ApiClient Internal reference to Api Client
13-
*/
12+
* @var Core\ApiClient Internal reference to Api Client
13+
*/
1414
private $api_client;
1515
private $services = [];
1616

1717
/**
1818
* @param array $config
1919
* An array of config parameters
2020
*
21-
* @type string $environment
22-
* @type string $access_token
23-
* @type float $timeout
24-
* @type string $http_client
21+
* @type string $environment
22+
* @type string $access_token
23+
* @type float $timeout
24+
* @type string $http_client
2525
*/
2626
public function __construct($config)
2727
{
@@ -44,26 +44,28 @@ public function __construct($config)
4444
$stack->push(RetryMiddlewareFactory::buildMiddleware());
4545

4646
$timeout = 0;
47-
if(isset($config['timeout'])){
47+
if(isset($config['timeout'])) {
4848
$timeout = $config['timeout'];
4949
}
5050

51-
$http_client = new \GuzzleHttp\Client([
52-
'base_uri' => $endpoint_url,
53-
'timeout' => $timeout,
54-
'headers' => array(
51+
$http_client = new \GuzzleHttp\Client(
52+
[
53+
'base_uri' => $endpoint_url,
54+
'timeout' => $timeout,
55+
'headers' => array(
5556
'GoCardless-Version' => '2015-07-06',
5657
'Accept' => 'application/json',
5758
'Content-Type' => 'application/json',
5859
'Authorization' => "Bearer " . $access_token,
5960
'GoCardless-Client-Library' => 'gocardless-pro-php',
6061
'GoCardless-Client-Version' => '7.2.0',
6162
'User-Agent' => $this->getUserAgent()
62-
),
63-
'http_errors' => false,
64-
'verify' => true,
65-
'handler' => $stack
66-
]);
63+
),
64+
'http_errors' => false,
65+
'verify' => true,
66+
'handler' => $stack
67+
]
68+
);
6769
}
6870

6971
$this->api_client = new \GoCardlessPro\Core\ApiClient($http_client, $config);
@@ -157,6 +159,7 @@ public function __construct($config)
157159

158160
/**
159161
* Service for interacting with balances
162+
*
160163
* @return Services\BalancesService
161164
*/
162165
public function balances()
@@ -169,6 +172,7 @@ public function balances()
169172

170173
/**
171174
* Service for interacting with bank account details
175+
*
172176
* @return Services\BankAccountDetailsService
173177
*/
174178
public function bankAccountDetails()
@@ -181,6 +185,7 @@ public function bankAccountDetails()
181185

182186
/**
183187
* Service for interacting with bank authorisations
188+
*
184189
* @return Services\BankAuthorisationsService
185190
*/
186191
public function bankAuthorisations()
@@ -193,6 +198,7 @@ public function bankAuthorisations()
193198

194199
/**
195200
* Service for interacting with bank details lookups
201+
*
196202
* @return Services\BankDetailsLookupsService
197203
*/
198204
public function bankDetailsLookups()
@@ -205,6 +211,7 @@ public function bankDetailsLookups()
205211

206212
/**
207213
* Service for interacting with billing requests
214+
*
208215
* @return Services\BillingRequestsService
209216
*/
210217
public function billingRequests()
@@ -217,6 +224,7 @@ public function billingRequests()
217224

218225
/**
219226
* Service for interacting with billing request flows
227+
*
220228
* @return Services\BillingRequestFlowsService
221229
*/
222230
public function billingRequestFlows()
@@ -229,6 +237,7 @@ public function billingRequestFlows()
229237

230238
/**
231239
* Service for interacting with billing request templates
240+
*
232241
* @return Services\BillingRequestTemplatesService
233242
*/
234243
public function billingRequestTemplates()
@@ -241,6 +250,7 @@ public function billingRequestTemplates()
241250

242251
/**
243252
* Service for interacting with billing request with actions
253+
*
244254
* @return Services\BillingRequestWithActionsService
245255
*/
246256
public function billingRequestWithActions()
@@ -253,6 +263,7 @@ public function billingRequestWithActions()
253263

254264
/**
255265
* Service for interacting with blocks
266+
*
256267
* @return Services\BlocksService
257268
*/
258269
public function blocks()
@@ -265,6 +276,7 @@ public function blocks()
265276

266277
/**
267278
* Service for interacting with creditors
279+
*
268280
* @return Services\CreditorsService
269281
*/
270282
public function creditors()
@@ -277,6 +289,7 @@ public function creditors()
277289

278290
/**
279291
* Service for interacting with creditor bank accounts
292+
*
280293
* @return Services\CreditorBankAccountsService
281294
*/
282295
public function creditorBankAccounts()
@@ -289,6 +302,7 @@ public function creditorBankAccounts()
289302

290303
/**
291304
* Service for interacting with currency exchange rates
305+
*
292306
* @return Services\CurrencyExchangeRatesService
293307
*/
294308
public function currencyExchangeRates()
@@ -301,6 +315,7 @@ public function currencyExchangeRates()
301315

302316
/**
303317
* Service for interacting with customers
318+
*
304319
* @return Services\CustomersService
305320
*/
306321
public function customers()
@@ -313,6 +328,7 @@ public function customers()
313328

314329
/**
315330
* Service for interacting with customer bank accounts
331+
*
316332
* @return Services\CustomerBankAccountsService
317333
*/
318334
public function customerBankAccounts()
@@ -325,6 +341,7 @@ public function customerBankAccounts()
325341

326342
/**
327343
* Service for interacting with customer notifications
344+
*
328345
* @return Services\CustomerNotificationsService
329346
*/
330347
public function customerNotifications()
@@ -337,6 +354,7 @@ public function customerNotifications()
337354

338355
/**
339356
* Service for interacting with events
357+
*
340358
* @return Services\EventsService
341359
*/
342360
public function events()
@@ -349,6 +367,7 @@ public function events()
349367

350368
/**
351369
* Service for interacting with exports
370+
*
352371
* @return Services\ExportsService
353372
*/
354373
public function exports()
@@ -361,6 +380,7 @@ public function exports()
361380

362381
/**
363382
* Service for interacting with instalment schedule
383+
*
364384
* @return Services\InstalmentSchedulesService
365385
*/
366386
public function instalmentSchedules()
@@ -373,6 +393,7 @@ public function instalmentSchedules()
373393

374394
/**
375395
* Service for interacting with institutions
396+
*
376397
* @return Services\InstitutionsService
377398
*/
378399
public function institutions()
@@ -385,6 +406,7 @@ public function institutions()
385406

386407
/**
387408
* Service for interacting with logos
409+
*
388410
* @return Services\LogosService
389411
*/
390412
public function logos()
@@ -397,6 +419,7 @@ public function logos()
397419

398420
/**
399421
* Service for interacting with mandates
422+
*
400423
* @return Services\MandatesService
401424
*/
402425
public function mandates()
@@ -409,6 +432,7 @@ public function mandates()
409432

410433
/**
411434
* Service for interacting with mandate imports
435+
*
412436
* @return Services\MandateImportsService
413437
*/
414438
public function mandateImports()
@@ -421,6 +445,7 @@ public function mandateImports()
421445

422446
/**
423447
* Service for interacting with mandate import entries
448+
*
424449
* @return Services\MandateImportEntriesService
425450
*/
426451
public function mandateImportEntries()
@@ -433,6 +458,7 @@ public function mandateImportEntries()
433458

434459
/**
435460
* Service for interacting with mandate pdfs
461+
*
436462
* @return Services\MandatePdfsService
437463
*/
438464
public function mandatePdfs()
@@ -445,6 +471,7 @@ public function mandatePdfs()
445471

446472
/**
447473
* Service for interacting with negative balance limit
474+
*
448475
* @return Services\NegativeBalanceLimitsService
449476
*/
450477
public function negativeBalanceLimits()
@@ -457,6 +484,7 @@ public function negativeBalanceLimits()
457484

458485
/**
459486
* Service for interacting with outbound payments
487+
*
460488
* @return Services\OutboundPaymentsService
461489
*/
462490
public function outboundPayments()
@@ -469,6 +497,7 @@ public function outboundPayments()
469497

470498
/**
471499
* Service for interacting with payer authorisations
500+
*
472501
* @return Services\PayerAuthorisationsService
473502
*/
474503
public function payerAuthorisations()
@@ -481,6 +510,7 @@ public function payerAuthorisations()
481510

482511
/**
483512
* Service for interacting with payer theme
513+
*
484514
* @return Services\PayerThemesService
485515
*/
486516
public function payerThemes()
@@ -493,6 +523,7 @@ public function payerThemes()
493523

494524
/**
495525
* Service for interacting with payments
526+
*
496527
* @return Services\PaymentsService
497528
*/
498529
public function payments()
@@ -505,6 +536,7 @@ public function payments()
505536

506537
/**
507538
* Service for interacting with payment account transactions
539+
*
508540
* @return Services\PaymentAccountTransactionsService
509541
*/
510542
public function paymentAccountTransactions()
@@ -517,6 +549,7 @@ public function paymentAccountTransactions()
517549

518550
/**
519551
* Service for interacting with payouts
552+
*
520553
* @return Services\PayoutsService
521554
*/
522555
public function payouts()
@@ -529,6 +562,7 @@ public function payouts()
529562

530563
/**
531564
* Service for interacting with payout items
565+
*
532566
* @return Services\PayoutItemsService
533567
*/
534568
public function payoutItems()
@@ -541,6 +575,7 @@ public function payoutItems()
541575

542576
/**
543577
* Service for interacting with redirect flows
578+
*
544579
* @return Services\RedirectFlowsService
545580
*/
546581
public function redirectFlows()
@@ -553,6 +588,7 @@ public function redirectFlows()
553588

554589
/**
555590
* Service for interacting with refunds
591+
*
556592
* @return Services\RefundsService
557593
*/
558594
public function refunds()
@@ -565,6 +601,7 @@ public function refunds()
565601

566602
/**
567603
* Service for interacting with scenario simulators
604+
*
568605
* @return Services\ScenarioSimulatorsService
569606
*/
570607
public function scenarioSimulators()
@@ -577,6 +614,7 @@ public function scenarioSimulators()
577614

578615
/**
579616
* Service for interacting with scheme identifiers
617+
*
580618
* @return Services\SchemeIdentifiersService
581619
*/
582620
public function schemeIdentifiers()
@@ -589,6 +627,7 @@ public function schemeIdentifiers()
589627

590628
/**
591629
* Service for interacting with subscriptions
630+
*
592631
* @return Services\SubscriptionsService
593632
*/
594633
public function subscriptions()
@@ -601,6 +640,7 @@ public function subscriptions()
601640

602641
/**
603642
* Service for interacting with tax rates
643+
*
604644
* @return Services\TaxRatesService
605645
*/
606646
public function taxRates()
@@ -613,6 +653,7 @@ public function taxRates()
613653

614654
/**
615655
* Service for interacting with transferred mandate
656+
*
616657
* @return Services\TransferredMandatesService
617658
*/
618659
public function transferredMandates()
@@ -625,6 +666,7 @@ public function transferredMandates()
625666

626667
/**
627668
* Service for interacting with verification details
669+
*
628670
* @return Services\VerificationDetailsService
629671
*/
630672
public function verificationDetails()
@@ -637,6 +679,7 @@ public function verificationDetails()
637679

638680
/**
639681
* Service for interacting with webhooks
682+
*
640683
* @return Services\WebhooksService
641684
*/
642685
public function webhooks()

0 commit comments

Comments
 (0)