-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update SDK from api-definitions (#689)
Co-authored-by: rebilly-machine-user <[email protected]>
- Loading branch information
1 parent
8afcb51
commit 66edff0
Showing
14 changed files
with
185 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rebilly/client-php": patch | ||
--- | ||
|
||
Add Unlimit gateway adapter Rebilly/api-definitions#1873 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 Unlimit extends GatewayAccount | ||
{ | ||
private array $fields = []; | ||
|
||
public function __construct(array $data = []) | ||
{ | ||
parent::__construct([ | ||
'gatewayName' => 'Unlimit', | ||
] + $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(): UnlimitCredentials | ||
{ | ||
return $this->fields['credentials']; | ||
} | ||
|
||
public function setCredentials(UnlimitCredentials|array $credentials): static | ||
{ | ||
if (!($credentials instanceof UnlimitCredentials)) { | ||
$credentials = UnlimitCredentials::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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<?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 UnlimitCredentials implements JsonSerializable | ||
{ | ||
private array $fields = []; | ||
|
||
public function __construct(array $data = []) | ||
{ | ||
if (array_key_exists('terminalId', $data)) { | ||
$this->setTerminalId($data['terminalId']); | ||
} | ||
if (array_key_exists('password', $data)) { | ||
$this->setPassword($data['password']); | ||
} | ||
if (array_key_exists('ipnSecret', $data)) { | ||
$this->setIpnSecret($data['ipnSecret']); | ||
} | ||
} | ||
|
||
public static function from(array $data = []): self | ||
{ | ||
return new self($data); | ||
} | ||
|
||
public function getTerminalId(): string | ||
{ | ||
return $this->fields['terminalId']; | ||
} | ||
|
||
public function setTerminalId(string $terminalId): static | ||
{ | ||
$this->fields['terminalId'] = $terminalId; | ||
|
||
return $this; | ||
} | ||
|
||
public function getPassword(): string | ||
{ | ||
return $this->fields['password']; | ||
} | ||
|
||
public function setPassword(string $password): static | ||
{ | ||
$this->fields['password'] = $password; | ||
|
||
return $this; | ||
} | ||
|
||
public function getIpnSecret(): string | ||
{ | ||
return $this->fields['ipnSecret']; | ||
} | ||
|
||
public function setIpnSecret(string $ipnSecret): static | ||
{ | ||
$this->fields['ipnSecret'] = $ipnSecret; | ||
|
||
return $this; | ||
} | ||
|
||
public function jsonSerialize(): array | ||
{ | ||
$data = []; | ||
if (array_key_exists('terminalId', $this->fields)) { | ||
$data['terminalId'] = $this->fields['terminalId']; | ||
} | ||
if (array_key_exists('password', $this->fields)) { | ||
$data['password'] = $this->fields['password']; | ||
} | ||
if (array_key_exists('ipnSecret', $this->fields)) { | ||
$data['ipnSecret'] = $this->fields['ipnSecret']; | ||
} | ||
|
||
return $data; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters