-
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 (#694)
Co-authored-by: rebilly-machine-user <[email protected]>
- Loading branch information
1 parent
0964f18
commit 35612de
Showing
3 changed files
with
82 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 SecureTrading recurring settings Rebilly/api-definitions#1889 |
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,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 SecureTradingSettings implements JsonSerializable | ||
{ | ||
private array $fields = []; | ||
|
||
public function __construct(array $data = []) | ||
{ | ||
if (array_key_exists('enableRecurring', $data)) { | ||
$this->setEnableRecurring($data['enableRecurring']); | ||
} | ||
} | ||
|
||
public static function from(array $data = []): self | ||
{ | ||
return new self($data); | ||
} | ||
|
||
public function getEnableRecurring(): ?bool | ||
{ | ||
return $this->fields['enableRecurring'] ?? null; | ||
} | ||
|
||
public function setEnableRecurring(null|bool $enableRecurring): static | ||
{ | ||
$this->fields['enableRecurring'] = $enableRecurring; | ||
|
||
return $this; | ||
} | ||
|
||
public function jsonSerialize(): array | ||
{ | ||
$data = []; | ||
if (array_key_exists('enableRecurring', $this->fields)) { | ||
$data['enableRecurring'] = $this->fields['enableRecurring']; | ||
} | ||
|
||
return $data; | ||
} | ||
} |