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 May 24, 2024
1 parent 028c113 commit e833ecb
Show file tree
Hide file tree
Showing 10 changed files with 220 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/hip-dragons-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

chore(ci): renable php sdk update workflow Rebilly/rebilly#5485
5 changes: 5 additions & 0 deletions .changeset/tame-swans-rush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

SDK Generator updated
36 changes: 36 additions & 0 deletions src/Model/Directa24Credentials.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ public function __construct(array $data = [])
if (array_key_exists('cashout_password', $data)) {
$this->setCashoutPassword($data['cashout_password']);
}
if (array_key_exists('chargebackAccessKey', $data)) {
$this->setChargebackAccessKey($data['chargebackAccessKey']);
}
if (array_key_exists('chargebackSecretKey', $data)) {
$this->setChargebackSecretKey($data['chargebackSecretKey']);
}
}

public static function from(array $data = []): self
Expand Down Expand Up @@ -133,6 +139,30 @@ public function setCashoutPassword(null|string $cashoutPassword): static
return $this;
}

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

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

return $this;
}

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

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

return $this;
}

public function jsonSerialize(): array
{
$data = [];
Expand All @@ -157,6 +187,12 @@ public function jsonSerialize(): array
if (array_key_exists('cashout_password', $this->fields)) {
$data['cashout_password'] = $this->fields['cashout_password'];
}
if (array_key_exists('chargebackAccessKey', $this->fields)) {
$data['chargebackAccessKey'] = $this->fields['chargebackAccessKey'];
}
if (array_key_exists('chargebackSecretKey', $this->fields)) {
$data['chargebackSecretKey'] = $this->fields['chargebackSecretKey'];
}

return $data;
}
Expand Down
6 changes: 6 additions & 0 deletions src/Model/GatewayAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,8 @@ abstract class GatewayAccount implements JsonSerializable

public const GATEWAY_NAME_PAY_TABS = 'PayTabs';

public const GATEWAY_NAME_PAY_U = 'PayU';

public const GATEWAY_NAME_PAY_U_LATAM = 'PayULatam';

public const GATEWAY_NAME_PAYVISION = 'Payvision';
Expand Down Expand Up @@ -706,6 +708,8 @@ abstract class GatewayAccount implements JsonSerializable

public const ACQUIRER_NAME_PAY_TABS = 'PayTabs';

public const ACQUIRER_NAME_PAY_U = 'PayU';

public const ACQUIRER_NAME_PAY_U_LATAM = 'PayULatam';

public const ACQUIRER_NAME_PAYVISION = 'Payvision';
Expand Down Expand Up @@ -1632,6 +1636,8 @@ public static function from(array $data = []): self
return Paysafecash::from($data);
case 'PayTabs':
return PayTabs::from($data);
case 'PayU':
return PayU::from($data);
case 'PayULatam':
return PayULatam::from($data);
case 'Payvision':
Expand Down
2 changes: 2 additions & 0 deletions src/Model/GetPayoutRequestPaymentInstrumentsResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,8 @@ class GetPayoutRequestPaymentInstrumentsResponse implements JsonSerializable

public const GATEWAY_NAME_PAY_TABS = 'PayTabs';

public const GATEWAY_NAME_PAY_U = 'PayU';

public const GATEWAY_NAME_PAY_U_LATAM = 'PayULatam';

public const GATEWAY_NAME_PAYVISION = 'Payvision';
Expand Down
83 changes: 83 additions & 0 deletions src/Model/PayU.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<?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 PayU extends GatewayAccount
{
private array $fields = [];

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

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

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

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

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

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

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 = [];
if (array_key_exists('credentials', $this->fields)) {
$data['credentials'] = $this->fields['credentials']->jsonSerialize();
}
if (array_key_exists('threeDSecureServer', $this->fields)) {
$data['threeDSecureServer'] = $this->fields['threeDSecureServer']?->jsonSerialize();
}

return parent::jsonSerialize() + $data;
}
}
73 changes: 73 additions & 0 deletions src/Model/PayUCredentials.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 PayUCredentials implements JsonSerializable
{
private array $fields = [];

public function __construct(array $data = [])
{
if (array_key_exists('merchantKey', $data)) {
$this->setMerchantKey($data['merchantKey']);
}
if (array_key_exists('merchantSalt', $data)) {
$this->setMerchantSalt($data['merchantSalt']);
}
}

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

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

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

return $this;
}

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

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

return $this;
}

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

return $data;
}
}
2 changes: 2 additions & 0 deletions src/Model/PayoutRequestAllocations.php
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,8 @@ class PayoutRequestAllocations implements JsonSerializable

public const GATEWAY_NAME_PAY_TABS = 'PayTabs';

public const GATEWAY_NAME_PAY_U = 'PayU';

public const GATEWAY_NAME_PAY_U_LATAM = 'PayULatam';

public const GATEWAY_NAME_PAYVISION = 'Payvision';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,8 @@ class PickInstructionGatewayAcquirerWeightsWeightedList implements JsonSerializa

public const GATEWAY_NAME_PAY_TABS = 'PayTabs';

public const GATEWAY_NAME_PAY_U = 'PayU';

public const GATEWAY_NAME_PAY_U_LATAM = 'PayULatam';

public const GATEWAY_NAME_PAYVISION = 'Payvision';
Expand Down Expand Up @@ -703,6 +705,8 @@ class PickInstructionGatewayAcquirerWeightsWeightedList implements JsonSerializa

public const ACQUIRER_NAME_PAY_TABS = 'PayTabs';

public const ACQUIRER_NAME_PAY_U = 'PayU';

public const ACQUIRER_NAME_PAY_U_LATAM = 'PayULatam';

public const ACQUIRER_NAME_PAYVISION = 'Payvision';
Expand Down
4 changes: 4 additions & 0 deletions src/Model/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,8 @@ class Transaction implements JsonSerializable

public const GATEWAY_NAME_PAY_TABS = 'PayTabs';

public const GATEWAY_NAME_PAY_U = 'PayU';

public const GATEWAY_NAME_PAY_U_LATAM = 'PayULatam';

public const GATEWAY_NAME_PAYVISION = 'Payvision';
Expand Down Expand Up @@ -761,6 +763,8 @@ class Transaction implements JsonSerializable

public const ACQUIRER_NAME_PAY_TABS = 'PayTabs';

public const ACQUIRER_NAME_PAY_U = 'PayU';

public const ACQUIRER_NAME_PAY_U_LATAM = 'PayULatam';

public const ACQUIRER_NAME_PAYVISION = 'Payvision';
Expand Down

0 comments on commit e833ecb

Please sign in to comment.