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 Oct 21, 2024
1 parent 63f248c commit f5e89ef
Show file tree
Hide file tree
Showing 24 changed files with 289 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/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/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
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
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
22 changes: 22 additions & 0 deletions src/Model/Rapyd.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ public function __construct(array $data = [])
if (array_key_exists('settings', $data)) {
$this->setSettings($data['settings']);
}
if (array_key_exists('threeDSecureServer', $data)) {
$this->setThreeDSecureServer($data['threeDSecureServer']);
}
}

public static function from(array $data = []): self
Expand Down Expand Up @@ -68,6 +71,22 @@ public function setSettings(null|RapydSettings|array $settings): static
return $this;
}

public function getThreeDSecureServer(): ?ThreeDSecureIO3dsServer
{
return $this->fields['threeDSecureServer'] ?? null;
}

public function setThreeDSecureServer(null|ThreeDSecureIO3dsServer|array $threeDSecureServer): static
{
if ($threeDSecureServer !== null && !($threeDSecureServer instanceof ThreeDSecureIO3dsServer)) {
$threeDSecureServer = ThreeDSecureIO3dsServer::from($threeDSecureServer);
}

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

return $this;
}

public function jsonSerialize(): array
{
$data = [];
Expand All @@ -77,6 +96,9 @@ public function jsonSerialize(): array
if (array_key_exists('settings', $this->fields)) {
$data['settings'] = $this->fields['settings']?->jsonSerialize();
}
if (array_key_exists('threeDSecureServer', $this->fields)) {
$data['threeDSecureServer'] = $this->fields['threeDSecureServer']?->jsonSerialize();
}

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

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

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

public function getName(): string
{
return 'Samsung Pay';
}

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

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

return $this;
}

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

return $data;
}
}
2 changes: 2 additions & 0 deletions src/Model/SendThroughAttribution.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ class SendThroughAttribution 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
2 changes: 2 additions & 0 deletions src/Model/SystemEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ class SystemEvent 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
2 changes: 2 additions & 0 deletions src/Model/WebhookTracking.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ class WebhookTracking 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

0 comments on commit f5e89ef

Please sign in to comment.