Skip to content

Commit

Permalink
chore: update SDK from api-definitions (#721)
Browse files Browse the repository at this point in the history
Co-authored-by: rebilly-machine-user <[email protected]>
  • Loading branch information
rebilly-machine-user and rebilly-machine-user authored Oct 30, 2024
1 parent 63f248c commit 6e01f66
Show file tree
Hide file tree
Showing 30 changed files with 421 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/bright-beers-know.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

feat(be): Add 3DS support to Rapyd Rebilly/rebilly#8067
5 changes: 5 additions & 0 deletions .changeset/bright-crabs-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

SDK Generator updated
5 changes: 5 additions & 0 deletions .changeset/brown-timers-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

SDK Generator updated
5 changes: 5 additions & 0 deletions .changeset/clean-rocks-scream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

feat(be): Add payout via Monolo Rebilly/rebilly#8128
5 changes: 5 additions & 0 deletions .changeset/dirty-garlics-prove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

feat(api-definitions): Add customFields property to StorefrontPurchase schema Rebilly/rebilly#7908
5 changes: 5 additions & 0 deletions .changeset/early-socks-agree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

SDK Generator updated
5 changes: 5 additions & 0 deletions .changeset/good-news-turn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

feat(be): Tampered KYC document detection Rebilly/rebilly#7876
5 changes: 5 additions & 0 deletions .changeset/gorgeous-owls-enjoy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

feat(be): Add Samsung Pay feature to RTP and GatewayAccount Rebilly/rebilly#7971
5 changes: 5 additions & 0 deletions .changeset/grumpy-panthers-pump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

feat(api-definitions): Add quantity filled limit reached event and webhook Rebilly/rebilly#8095
5 changes: 5 additions & 0 deletions .changeset/happy-items-ring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

SDK Generator updated
5 changes: 5 additions & 0 deletions .changeset/modern-geckos-dream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

revert(be): Tampered KYC document detection Rebilly/rebilly#8078
5 changes: 5 additions & 0 deletions .changeset/modern-meals-live.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

feat(be): Add 3ds support to Redsys Rebilly/rebilly#8234
5 changes: 5 additions & 0 deletions .changeset/pretty-fans-sip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

build(deps): merge passing FE dependabot PRs Rebilly/rebilly#8178
5 changes: 5 additions & 0 deletions .changeset/slow-owls-burn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

fix(api): Fix missing gate2way mapping Rebilly/rebilly#8029
5 changes: 5 additions & 0 deletions .changeset/witty-tools-develop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

docs(api-definitions): Add link to deposit URL field Rebilly/rebilly#8290
2 changes: 2 additions & 0 deletions src/Model/EmailNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ class EmailNotification implements JsonSerializable

public const EVENT_TYPE_SUBSCRIPTION_PAUSED = 'subscription-paused';

public const EVENT_TYPE_SUBSCRIPTION_QUANTITY_FILLED_LIMIT_REACHED = 'subscription-quantity-filled-limit-reached';

public const EVENT_TYPE_SUBSCRIPTION_REACTIVATED = 'subscription-reactivated';

public const EVENT_TYPE_SUBSCRIPTION_RENEWAL_REMINDER = 'subscription-renewal-reminder';
Expand Down
61 changes: 61 additions & 0 deletions src/Model/Gate2way.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?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;

class Gate2way extends GatewayAccount
{
private array $fields = [];

public function __construct(array $data = [])
{
parent::__construct([
'gatewayName' => 'gate2way',
] + $data);

if (array_key_exists('credentials', $data)) {
$this->setCredentials($data['credentials']);
}
}

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

public function getCredentials(): Gate2wayCredentials
{
return $this->fields['credentials'];
}

public function setCredentials(Gate2wayCredentials|array $credentials): static
{
if (!($credentials instanceof Gate2wayCredentials)) {
$credentials = Gate2wayCredentials::from($credentials);
}

$this->fields['credentials'] = $credentials;

return $this;
}

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

return parent::jsonSerialize() + $data;
}
}
73 changes: 73 additions & 0 deletions src/Model/Gate2wayCredentials.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?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 Gate2wayCredentials implements JsonSerializable
{
private array $fields = [];

public function __construct(array $data = [])
{
if (array_key_exists('apiKey', $data)) {
$this->setApiKey($data['apiKey']);
}
if (array_key_exists('apiSecret', $data)) {
$this->setApiSecret($data['apiSecret']);
}
}

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

public function getApiKey(): string
{
return $this->fields['apiKey'];
}

public function setApiKey(string $apiKey): static
{
$this->fields['apiKey'] = $apiKey;

return $this;
}

public function getApiSecret(): string
{
return $this->fields['apiSecret'];
}

public function setApiSecret(string $apiSecret): static
{
$this->fields['apiSecret'] = $apiSecret;

return $this;
}

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

return $data;
}
}
2 changes: 2 additions & 0 deletions src/Model/GatewayAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -1492,6 +1492,8 @@ public static function from(array $data = []): self
return Forte::from($data);
case 'FundSend':
return FundSend::from($data);
case 'gate2way':
return Gate2way::from($data);
case 'GET':
return GET::from($data);
case 'Gigadat':
Expand Down
2 changes: 2 additions & 0 deletions src/Model/IntegrationConfigurations.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ class IntegrationConfigurations implements JsonSerializable

public const EVENT_TYPE_SUBSCRIPTION_PAUSED = 'subscription-paused';

public const EVENT_TYPE_SUBSCRIPTION_QUANTITY_FILLED_LIMIT_REACHED = 'subscription-quantity-filled-limit-reached';

public const EVENT_TYPE_SUBSCRIPTION_REACTIVATED = 'subscription-reactivated';

public const EVENT_TYPE_SUBSCRIPTION_RENEWAL_REMINDER = 'subscription-renewal-reminder';
Expand Down
22 changes: 22 additions & 0 deletions src/Model/Monolo.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ public function __construct(array $data = [])
if (array_key_exists('credentials', $data)) {
$this->setCredentials($data['credentials']);
}
if (array_key_exists('settings', $data)) {
$this->setSettings($data['settings']);
}
}

public static function from(array $data = []): self
Expand All @@ -49,12 +52,31 @@ public function setCredentials(MonoloCredentials|array $credentials): static
return $this;
}

public function getSettings(): ?MonoloSettings
{
return $this->fields['settings'] ?? null;
}

public function setSettings(null|MonoloSettings|array $settings): static
{
if ($settings !== null && !($settings instanceof MonoloSettings)) {
$settings = MonoloSettings::from($settings);
}

$this->fields['settings'] = $settings;

return $this;
}

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

return parent::jsonSerialize() + $data;
}
Expand Down
73 changes: 73 additions & 0 deletions src/Model/MonoloSettings.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?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 MonoloSettings implements JsonSerializable
{
private array $fields = [];

public function __construct(array $data = [])
{
if (array_key_exists('payoutCurrency', $data)) {
$this->setPayoutCurrency($data['payoutCurrency']);
}
if (array_key_exists('payoutNetwork', $data)) {
$this->setPayoutNetwork($data['payoutNetwork']);
}
}

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

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

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

return $this;
}

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

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

return $this;
}

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

return $data;
}
}
4 changes: 0 additions & 4 deletions src/Model/PaymentCardFeature.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,4 @@
interface PaymentCardFeature extends JsonSerializable
{
public function getName(): string;

public function getCountry(): ?string;

public function setCountry(null|string $country): static;
}
1 change: 1 addition & 0 deletions src/Model/PaymentCardFeatureFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public static function from(array $data = []): PaymentCardFeature
return match ($data['name']) {
'Apple Pay' => ApplePayFeature::from($data),
'Google Pay' => GooglePayFeature::from($data),
'Samsung Pay' => SamsungPayFeature::from($data),
default => throw new UnknownDiscriminatorValueException(),
};
}
Expand Down
Loading

0 comments on commit 6e01f66

Please sign in to comment.