Skip to content

Commit

Permalink
update SDK from api-definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
rebilly-machine-user authored Jan 8, 2024
1 parent bb01a4d commit 013bfa6
Show file tree
Hide file tree
Showing 49 changed files with 1,692 additions and 1,079 deletions.
5 changes: 5 additions & 0 deletions .changeset/brown-ligers-fry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

Add round amount after DCC to gateway account setting Rebilly/api-definitions#1714
5 changes: 5 additions & 0 deletions .changeset/clean-buttons-hide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

Bump @redocly/portal from 0.65.7 to 0.67.1 Rebilly/api-definitions#1723
5 changes: 5 additions & 0 deletions .changeset/cuddly-chefs-swim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

Use FQCN in PHP SDK 3.x code samples Rebilly/api-definitions#1725
5 changes: 5 additions & 0 deletions .changeset/fair-crabs-sort.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

Rename risk metadata vpnServiceName to hostingName Rebilly/api-definitions#1724
5 changes: 5 additions & 0 deletions .changeset/fuzzy-houses-confess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

Add Klarna payNowStandalone to settings Rebilly/api-definitions#1718
5 changes: 5 additions & 0 deletions .changeset/great-wasps-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

Fix dispute schema Rebilly/api-definitions#1716
5 changes: 5 additions & 0 deletions .changeset/olive-kings-live.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

fix(dependancy): Override typesense axios version Rebilly/api-definitions#1737
5 changes: 5 additions & 0 deletions .changeset/pretty-candles-rush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

Add setting and credentials to Awepay Rebilly/api-definitions#1719
5 changes: 5 additions & 0 deletions .changeset/purple-dragons-clap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

Allow resetTime to be null Rebilly/api-definitions#1696
5 changes: 5 additions & 0 deletions .changeset/smooth-nails-hope.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

Add Ready To Payout operations Rebilly/api-definitions#1649
5 changes: 5 additions & 0 deletions .changeset/thick-weeks-rescue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

Remove invalid property from declined report Rebilly/api-definitions#1712
5 changes: 5 additions & 0 deletions .changeset/tidy-ghosts-impress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

Add address-based and refactor AML confidence settings Rebilly/api-definitions#1697
5 changes: 5 additions & 0 deletions .changeset/twenty-cows-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

Add sftpKeyPassphrase to Truevo Rebilly/api-definitions#1733
5 changes: 5 additions & 0 deletions .changeset/twenty-tables-sip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

Add example for regex pattern properties Rebilly/api-definitions#1720
9 changes: 5 additions & 4 deletions src/Api/DisputesApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use GuzzleHttp\Utils;
use Rebilly\Sdk\Collection;
use Rebilly\Sdk\Model\Dispute;
use Rebilly\Sdk\Model\PostDisputeRequest;
use Rebilly\Sdk\Paginator;

class DisputesApi
Expand All @@ -30,11 +31,11 @@ public function __construct(protected ?ClientInterface $client)
* @return Dispute
*/
public function create(
Dispute $dispute,
PostDisputeRequest $postDisputeRequest,
): Dispute {
$uri = '/disputes';

$request = new Request('POST', $uri, body: Utils::jsonEncode($dispute));
$request = new Request('POST', $uri, body: Utils::jsonEncode($postDisputeRequest));
$response = $this->client->send($request);
$data = Utils::jsonDecode((string) $response->getBody(), true);

Expand Down Expand Up @@ -121,15 +122,15 @@ public function getAllPaginator(
*/
public function update(
string $id,
Dispute $dispute,
PostDisputeRequest $postDisputeRequest,
): Dispute {
$pathParams = [
'{id}' => $id,
];

$uri = str_replace(array_keys($pathParams), array_values($pathParams), '/disputes/{id}');

$request = new Request('PUT', $uri, body: Utils::jsonEncode($dispute));
$request = new Request('PUT', $uri, body: Utils::jsonEncode($postDisputeRequest));
$response = $this->client->send($request);
$data = Utils::jsonDecode((string) $response->getBody(), true);

Expand Down
4 changes: 4 additions & 0 deletions src/Model/AdjustReadyToPayGeneric.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ class AdjustReadyToPayGeneric implements AdjustPaymentMethod, JsonSerializable

public const PAYMENT_METHOD_PIASTRIX = 'Piastrix';

public const PAYMENT_METHOD_PIX = 'PIX';

public const PAYMENT_METHOD_PAY_TABS = 'PayTabs';

public const PAYMENT_METHOD_PAYSAFECARD = 'Paysafecard';
Expand Down Expand Up @@ -301,6 +303,8 @@ class AdjustReadyToPayGeneric implements AdjustPaymentMethod, JsonSerializable

public const PAYMENT_METHOD_WE_CHAT_PAY = 'WeChat Pay';

public const PAYMENT_METHOD_WIRE = 'wire';

public const PAYMENT_METHOD_X_PAY_P2_P = 'XPay-P2P';

public const PAYMENT_METHOD_X_PAY_QR = 'XPay-QR';
Expand Down
55 changes: 55 additions & 0 deletions src/Model/AdjustReadyToPayoutGeneric.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?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\Model;

use JsonSerializable;

class AdjustReadyToPayoutGeneric implements AdjustReadyToPayoutPaymentMethod, JsonSerializable
{
private array $fields = [];

public function __construct(array $data = [])
{
if (array_key_exists('paymentMethod', $data)) {
$this->setPaymentMethod($data['paymentMethod']);
}
}

public static function from(array $data = []): self
{
return new self($data);
}

public function getPaymentMethod(): ?string
{
return $this->fields['paymentMethod'] ?? null;
}

public function setPaymentMethod(null|string $paymentMethod): static
{
$this->fields['paymentMethod'] = $paymentMethod;

return $this;
}

public function jsonSerialize(): array
{
$data = [];
if (array_key_exists('paymentMethod', $this->fields)) {
$data['paymentMethod'] = $this->fields['paymentMethod'];
}

return $data;
}
}
19 changes: 19 additions & 0 deletions src/Model/AdjustReadyToPayoutPaymentMethod.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?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\Model;

interface AdjustReadyToPayoutPaymentMethod
{
public function getPaymentMethod(): ?string;
}
171 changes: 171 additions & 0 deletions src/Model/AdjustReadyToPayoutPaymentMethodFactory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
<?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\Model;

use Rebilly\Sdk\Exception\UnknownDiscriminatorValueException;

class AdjustReadyToPayoutPaymentMethodFactory
{
public static function from(array $data = []): AdjustReadyToPayoutPaymentMethod
{
return match ($data['paymentMethod']) {
'AdvCash' => AdjustReadyToPayoutGeneric::from($data),
'Alfa-click' => AdjustReadyToPayoutGeneric::from($data),
'Alipay' => AdjustReadyToPayoutGeneric::from($data),
'AstroPay Card' => AdjustReadyToPayoutGeneric::from($data),
'AstroPay-GO' => AdjustReadyToPayoutGeneric::from($data),
'Baloto' => AdjustReadyToPayoutGeneric::from($data),
'Bancontact' => AdjustReadyToPayoutGeneric::from($data),
'Bancontact-mobile' => AdjustReadyToPayoutGeneric::from($data),
'BankReferenced' => AdjustReadyToPayoutGeneric::from($data),
'Beeline' => AdjustReadyToPayoutGeneric::from($data),
'Belfius-direct-net' => AdjustReadyToPayoutGeneric::from($data),
'Bizum' => AdjustReadyToPayoutGeneric::from($data),
'Boleto' => AdjustReadyToPayoutGeneric::from($data),
'CASHlib' => AdjustReadyToPayoutGeneric::from($data),
'CODVoucher' => AdjustReadyToPayoutGeneric::from($data),
'CashToCode' => AdjustReadyToPayoutGeneric::from($data),
'China UnionPay' => AdjustReadyToPayoutGeneric::from($data),
'Cleo' => AdjustReadyToPayoutGeneric::from($data),
'Conekta-oxxo' => AdjustReadyToPayoutGeneric::from($data),
'Cupon-de-pagos' => AdjustReadyToPayoutGeneric::from($data),
'EPS' => AdjustReadyToPayoutGeneric::from($data),
'Efecty' => AdjustReadyToPayoutGeneric::from($data),
'FasterPay' => AdjustReadyToPayoutGeneric::from($data),
'Flexepin' => AdjustReadyToPayoutGeneric::from($data),
'Giropay' => AdjustReadyToPayoutGeneric::from($data),
'Google Pay' => AdjustReadyToPayoutGeneric::from($data),
'Gpaysafe' => AdjustReadyToPayoutGeneric::from($data),
'ING-homepay' => AdjustReadyToPayoutGeneric::from($data),
'INOVAPAY-pin' => AdjustReadyToPayoutGeneric::from($data),
'INOVAPAY-wallet' => AdjustReadyToPayoutGeneric::from($data),
'InstaDebit' => AdjustReadyToPayoutGeneric::from($data),
'InstantPayments' => AdjustReadyToPayoutGeneric::from($data),
'Interac' => AdjustReadyToPayoutGeneric::from($data),
'Interac-eTransfer' => AdjustReadyToPayoutGeneric::from($data),
'Interac-online' => AdjustReadyToPayoutGeneric::from($data),
'Jeton' => AdjustReadyToPayoutGeneric::from($data),
'KNOT' => AdjustReadyToPayoutGeneric::from($data),
'Khelocard' => AdjustReadyToPayoutGeneric::from($data),
'Klarna' => AdjustReadyToPayoutGeneric::from($data),
'MTS' => AdjustReadyToPayoutGeneric::from($data),
'Matrix' => AdjustReadyToPayoutGeneric::from($data),
'MaxiCash' => AdjustReadyToPayoutGeneric::from($data),
'Megafon' => AdjustReadyToPayoutGeneric::from($data),
'MiFinity-eWallet' => AdjustReadyToPayoutGeneric::from($data),
'MuchBetter' => AdjustReadyToPayoutGeneric::from($data),
'Multibanco' => AdjustReadyToPayoutGeneric::from($data),
'Neosurf' => AdjustReadyToPayoutGeneric::from($data),
'Netbanking' => AdjustReadyToPayoutGeneric::from($data),
'Neteller' => AdjustReadyToPayoutGeneric::from($data),
'Nordea-Solo' => AdjustReadyToPayoutGeneric::from($data),
'OXXO' => AdjustReadyToPayoutGeneric::from($data),
'OchaPay' => AdjustReadyToPayoutGeneric::from($data),
'Onlineueberweisen' => AdjustReadyToPayoutGeneric::from($data),
'P24' => AdjustReadyToPayoutGeneric::from($data),
'POLi' => AdjustReadyToPayoutGeneric::from($data),
'Pagadito' => AdjustReadyToPayoutGeneric::from($data),
'PagoEffectivo' => AdjustReadyToPayoutGeneric::from($data),
'Pagsmile-deposit-express' => AdjustReadyToPayoutGeneric::from($data),
'Pagsmile-lottery' => AdjustReadyToPayoutGeneric::from($data),
'Pay4Fun' => AdjustReadyToPayoutGeneric::from($data),
'PayCash' => AdjustReadyToPayoutGeneric::from($data),
'PayTabs' => AdjustReadyToPayoutGeneric::from($data),
'Payeer' => AdjustReadyToPayoutGeneric::from($data),
'PaymentAsia-crypto' => AdjustReadyToPayoutGeneric::from($data),
'Paymero' => AdjustReadyToPayoutGeneric::from($data),
'Paynote' => AdjustReadyToPayoutGeneric::from($data),
'Paysafecard' => AdjustReadyToPayoutGeneric::from($data),
'Paysafecash' => AdjustReadyToPayoutGeneric::from($data),
'Perfect-money' => AdjustReadyToPayoutGeneric::from($data),
'PhonePe' => AdjustReadyToPayoutGeneric::from($data),
'Piastrix' => AdjustReadyToPayoutGeneric::from($data),
'PinPay' => AdjustReadyToPayoutGeneric::from($data),
'PostFinance-card' => AdjustReadyToPayoutGeneric::from($data),
'PostFinance-e-finance' => AdjustReadyToPayoutGeneric::from($data),
'QIWI' => AdjustReadyToPayoutGeneric::from($data),
'QPay' => AdjustReadyToPayoutGeneric::from($data),
'QQPay' => AdjustReadyToPayoutGeneric::from($data),
'Resurs' => AdjustReadyToPayoutGeneric::from($data),
'SEPA' => AdjustReadyToPayoutGeneric::from($data),
'SMSVoucher' => AdjustReadyToPayoutGeneric::from($data),
'SafetyPay' => AdjustReadyToPayoutGeneric::from($data),
'Skrill' => AdjustReadyToPayoutGeneric::from($data),
'Skrill Rapid Transfer' => AdjustReadyToPayoutGeneric::from($data),
'Sofort' => AdjustReadyToPayoutGeneric::from($data),
'SparkPay' => AdjustReadyToPayoutGeneric::from($data),
'Tele2' => AdjustReadyToPayoutGeneric::from($data),
'Terminaly-RF' => AdjustReadyToPayoutGeneric::from($data),
'ToditoCash-card' => AdjustReadyToPayoutGeneric::from($data),
'Trustly' => AdjustReadyToPayoutGeneric::from($data),
'UPI' => AdjustReadyToPayoutGeneric::from($data),
'UPayCard' => AdjustReadyToPayoutGeneric::from($data),
'USD-coin' => AdjustReadyToPayoutGeneric::from($data),
'VCreditos' => AdjustReadyToPayoutGeneric::from($data),
'VenusPoint' => AdjustReadyToPayoutGeneric::from($data),
'WeChat Pay' => AdjustReadyToPayoutGeneric::from($data),
'Webmoney' => AdjustReadyToPayoutGeneric::from($data),
'Webpay' => AdjustReadyToPayoutGeneric::from($data),
'Webpay Card' => AdjustReadyToPayoutGeneric::from($data),
'Webpay-2' => AdjustReadyToPayoutGeneric::from($data),
'XPay-P2P' => AdjustReadyToPayoutGeneric::from($data),
'XPay-QR' => AdjustReadyToPayoutGeneric::from($data),
'Yandex-money' => AdjustReadyToPayoutGeneric::from($data),
'Zimpler' => AdjustReadyToPayoutGeneric::from($data),
'Zotapay' => AdjustReadyToPayoutGeneric::from($data),
'ach' => AdjustReadyToPayoutGeneric::from($data),
'bank-transfer' => AdjustReadyToPayoutGeneric::from($data),
'bank-transfer-2' => AdjustReadyToPayoutGeneric::from($data),
'bank-transfer-3' => AdjustReadyToPayoutGeneric::from($data),
'bank-transfer-4' => AdjustReadyToPayoutGeneric::from($data),
'bank-transfer-5' => AdjustReadyToPayoutGeneric::from($data),
'bank-transfer-6' => AdjustReadyToPayoutGeneric::from($data),
'bank-transfer-7' => AdjustReadyToPayoutGeneric::from($data),
'bank-transfer-8' => AdjustReadyToPayoutGeneric::from($data),
'bank-transfer-9' => AdjustReadyToPayoutGeneric::from($data),
'bitcoin' => AdjustReadyToPayoutGeneric::from($data),
'cash' => AdjustReadyToPayoutGeneric::from($data),
'cash-deposit' => AdjustReadyToPayoutGeneric::from($data),
'check' => AdjustReadyToPayoutGeneric::from($data),
'cryptocurrency' => AdjustReadyToPayoutGeneric::from($data),
'domestic-cards' => AdjustReadyToPayoutGeneric::from($data),
'ePay.bg' => AdjustReadyToPayoutGeneric::from($data),
'eZeeWallet' => AdjustReadyToPayoutGeneric::from($data),
'echeck' => AdjustReadyToPayoutGeneric::from($data),
'ecoPayz' => AdjustReadyToPayoutGeneric::from($data),
'ecoVoucher' => AdjustReadyToPayoutGeneric::from($data),
'iDEAL' => AdjustReadyToPayoutGeneric::from($data),
'iDebit' => AdjustReadyToPayoutGeneric::from($data),
'iWallet' => AdjustReadyToPayoutGeneric::from($data),
'instant-bank-transfer' => AdjustReadyToPayoutGeneric::from($data),
'invoice' => AdjustReadyToPayoutGeneric::from($data),
'jpay' => AdjustReadyToPayoutGeneric::from($data),
'loonie' => AdjustReadyToPayoutGeneric::from($data),
'miscellaneous' => AdjustReadyToPayoutGeneric::from($data),
'online-bank-transfer' => AdjustReadyToPayoutGeneric::from($data),
'oriental-wallet' => AdjustReadyToPayoutGeneric::from($data),
'payment-card' => AdjustReadyToPayoutGeneric::from($data),
'paypal' => AdjustReadyToPayoutGeneric::from($data),
'phone' => AdjustReadyToPayoutGeneric::from($data),
'plaid-account' => AdjustReadyToPayoutGeneric::from($data),
'rapyd-checkout' => AdjustReadyToPayoutGeneric::from($data),
'swift-dbt' => AdjustReadyToPayoutGeneric::from($data),
'voucher' => AdjustReadyToPayoutGeneric::from($data),
'voucher-2' => AdjustReadyToPayoutGeneric::from($data),
'voucher-3' => AdjustReadyToPayoutGeneric::from($data),
'voucher-4' => AdjustReadyToPayoutGeneric::from($data),
default => throw new UnknownDiscriminatorValueException(),
};
}
}
Loading

0 comments on commit 013bfa6

Please sign in to comment.