Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/big-dolls-hug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

fix(be, recomm, api-definitions): Add amount and currency filters for payout requests and allocations Rebilly/rebilly#21413
5 changes: 5 additions & 0 deletions .changeset/brave-sheep-add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

feat(be,api-definitions): Remove authTransaction embedded and approvalUrl link from payment instrument response Rebilly/rebilly#21471
5 changes: 5 additions & 0 deletions .changeset/chilled-falcons-complain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

build(deps): bump @redocly/cli from 2.30.3 to 2.30.4 in /website/api-definitions Rebilly/rebilly#21318
5 changes: 5 additions & 0 deletions .changeset/dirty-insects-judge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

build(deps): bump es-toolkit from 1.46.0 to 1.46.1 in /website/api-definitions Rebilly/rebilly#21083
5 changes: 5 additions & 0 deletions .changeset/eight-islands-clean.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

feat(be,api-defs): Add update for period end new orders Rebilly/rebilly#21472
5 changes: 5 additions & 0 deletions .changeset/fifty-yaks-perform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

feat(be, api-definitions): Add payoutRequest block to Website settings Rebilly/rebilly#21020
5 changes: 5 additions & 0 deletions .changeset/five-pots-love.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

feat(backend): KYC improve MRZ handling Rebilly/rebilly#19874
5 changes: 5 additions & 0 deletions .changeset/fuzzy-seahorses-wait.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

feat(be, api-definitions): Remove deprecated field from payout request allocation Rebilly/rebilly#20999
5 changes: 5 additions & 0 deletions .changeset/happy-lions-hug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

fix(be, api-definitions): Change quotation credit memo invoice relation and add quote relation Rebilly/rebilly#20287
5 changes: 5 additions & 0 deletions .changeset/honest-donkeys-explode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

feat(be,docs): Add visa to Wallet88 paymentCardMethod setting Rebilly/rebilly#21063
5 changes: 5 additions & 0 deletions .changeset/khaki-books-whisper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

feat(be, api-definitions): expose filtered storefront referenceData wallet name for crypto instruments Rebilly/rebilly#21330
5 changes: 5 additions & 0 deletions .changeset/lazy-pandas-fold.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

feat(api-definitions): add registration settings api-definitions Rebilly/rebilly#20458
5 changes: 5 additions & 0 deletions .changeset/moody-moose-smile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

feat(doc, be, payment-gateways): Add level 2/3 data custom field and send to Adyen Rebilly/rebilly#21188
5 changes: 5 additions & 0 deletions .changeset/nice-peas-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

refactor(api-definitions): Remove status from PayoutRequestBatch definition Rebilly/rebilly#21375
5 changes: 5 additions & 0 deletions .changeset/odd-emus-fry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

build(deps): bump benc-uk/workflow-dispatch from 1.3.1 to 1.3.2 Rebilly/rebilly#21654
5 changes: 5 additions & 0 deletions .changeset/odd-melons-lick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

feat(be): Add current period to recurring order Rebilly/rebilly#21461
5 changes: 5 additions & 0 deletions .changeset/old-mugs-march.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

build(deps): bump @redocly/cli from 2.30.4 to 2.30.6 in /website/api-definitions Rebilly/rebilly#21535
5 changes: 5 additions & 0 deletions .changeset/popular-jobs-jog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

fix(doc, be, payment-gateways): Add XRP custom field tag for Txn Rebilly/rebilly#21514
5 changes: 5 additions & 0 deletions .changeset/purple-dryers-tickle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

feat(recomm, api-definitions, be): Remove deprecated payout request reversal statuses Rebilly/rebilly#20929
5 changes: 5 additions & 0 deletions .changeset/rich-trees-drum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

fix(regenerator): Make generated PHP SDK compatible with 8.4 Rebilly/rebilly#21311
5 changes: 5 additions & 0 deletions .changeset/silent-bees-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

build(deps): bump @redocly/cli from 2.30.0 to 2.30.3 in /website/api-definitions Rebilly/rebilly#21081
5 changes: 5 additions & 0 deletions .changeset/sixty-pandas-sell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

feat(be,api-definitions): Remove EDD API Rebilly/rebilly#21118
5 changes: 5 additions & 0 deletions .changeset/slow-buckets-beam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

feat(be, api-definitions): Add waiting-completion status for payout request allocation and use it on allocation processing Rebilly/rebilly#21332
5 changes: 5 additions & 0 deletions .changeset/strong-ducks-juggle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

docs(website, api-defintions): Define acronyms Rebilly/rebilly#21017
5 changes: 5 additions & 0 deletions .changeset/thirty-books-itch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

feat(be,api-definitions,metadata): Migrate to a new EMS SFTP Rebilly/rebilly#21123
5 changes: 5 additions & 0 deletions .changeset/three-eels-attend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

refactor(be, api-definitions): Add service period start and end times Rebilly/rebilly#21059
5 changes: 5 additions & 0 deletions .changeset/tidy-impalas-wave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

feat(be,docs): Support confirmation flow for Forced DCC Rebilly/rebilly#21007
5 changes: 5 additions & 0 deletions .changeset/tough-bikes-join.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

feat(be, recomm): Add address editing for change/reactivation quotes Rebilly/rebilly#21250
5 changes: 5 additions & 0 deletions .changeset/tough-mirrors-dream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

refactor(be,api-definitions): remove partially-fulfilled payout status; drop legacy linkTransaction Rebilly/rebilly#20174
141 changes: 141 additions & 0 deletions src/Api/AccountRegistrationSettingsApi.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
<?php

/**
* This source file is proprietary and part of Rebilly.
*
* (c) Rebilly SRL
* Rebilly Ltd.
* Rebilly Inc.
*
* @see https://www.rebilly.com
*/

declare(strict_types=1);

namespace Rebilly\Sdk\Api;

use GuzzleHttp\ClientInterface;
use GuzzleHttp\Psr7\Request;
use GuzzleHttp\Utils;
use Rebilly\Sdk\Collection;
use Rebilly\Sdk\Model\AccountRegistrationSettings;
use Rebilly\Sdk\Paginator;

class AccountRegistrationSettingsApi
{
public function __construct(protected ?ClientInterface $client)
{
}

public function create(
AccountRegistrationSettings $accountRegistrationSettings,
): AccountRegistrationSettings {
$uri = '/account-registration-settings';

$request = new Request('POST', $uri, headers: [
'Accept' => 'application/json',
], body: Utils::jsonEncode($accountRegistrationSettings));
$response = $this->client->send($request);
$data = Utils::jsonDecode((string) $response->getBody(), true);

return AccountRegistrationSettings::from($data, ['headers' => $response->getHeaders()]);
}

public function delete(
string $id,
): void {
$pathParams = [
'{id}' => $id,
];

$uri = str_replace(array_keys($pathParams), array_values($pathParams), '/account-registration-settings/{id}');

$request = new Request('DELETE', $uri);
$this->client->send($request);
}

public function get(
string $id,
): AccountRegistrationSettings {
$pathParams = [
'{id}' => $id,
];

$uri = str_replace(array_keys($pathParams), array_values($pathParams), '/account-registration-settings/{id}');

$request = new Request('GET', $uri, headers: [
'Accept' => 'application/json',
]);
$response = $this->client->send($request);
$data = Utils::jsonDecode((string) $response->getBody(), true);

return AccountRegistrationSettings::from($data, ['headers' => $response->getHeaders()]);
}

/**
* @return Collection<AccountRegistrationSettings>
*/
public function getAll(
?int $limit = null,
?int $offset = null,
): Collection {
$queryParams = [
'limit' => $limit,
'offset' => $offset,
];
$uri = '/account-registration-settings?' . http_build_query($queryParams);

$request = new Request('GET', $uri, headers: [
'Accept' => 'application/json',
]);
$response = $this->client->send($request);
$data = Utils::jsonDecode((string) $response->getBody(), true);

return new Collection(
array_map(fn (array $item): AccountRegistrationSettings => AccountRegistrationSettings::from($item, ['headers' => $response->getHeaders()]), $data),
(int) $response->getHeaderLine(Collection::HEADER_LIMIT),
(int) $response->getHeaderLine(Collection::HEADER_OFFSET),
(int) $response->getHeaderLine(Collection::HEADER_TOTAL),
[
'headers' => $response->getHeaders(),
]
);
}

/**
* @return Paginator<AccountRegistrationSettings>
*/
public function getAllPaginator(
?int $limit = null,
?int $offset = null,
): Paginator {
$closure = fn (?int $limit, ?int $offset): Collection => $this->getAll(
limit: $limit,
offset: $offset,
);

return new Paginator(
$limit !== null || $offset !== null ? $closure(limit: $limit, offset: $offset) : null,
$closure,
);
}

public function update(
string $id,
AccountRegistrationSettings $accountRegistrationSettings,
): AccountRegistrationSettings {
$pathParams = [
'{id}' => $id,
];

$uri = str_replace(array_keys($pathParams), array_values($pathParams), '/account-registration-settings/{id}');

$request = new Request('PUT', $uri, headers: [
'Accept' => 'application/json',
], body: Utils::jsonEncode($accountRegistrationSettings));
$response = $this->client->send($request);
$data = Utils::jsonDecode((string) $response->getBody(), true);

return AccountRegistrationSettings::from($data, ['headers' => $response->getHeaders()]);
}
}
Loading
Loading