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 Nov 29, 2023
1 parent 0836b5c commit e079390
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/happy-flowers-bake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

Add readyToPayoutInstruction property Rebilly/api-definitions#1707
5 changes: 5 additions & 0 deletions .changeset/odd-apricots-dress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

Add detail to create order fields Rebilly/api-definitions#1705
26 changes: 26 additions & 0 deletions src/Model/GatewayAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ abstract class GatewayAccount implements JsonSerializable

public const SETUP_INSTRUCTION_DO_NOTHING = 'do-nothing';

public const READY_TO_PAYOUT_INSTRUCTION_ALL = 'all';

public const READY_TO_PAYOUT_INSTRUCTION_COVERED_PAYOUT = 'covered-payout';

public const READY_TO_PAYOUT_INSTRUCTION_APPROVED_PAYMENT = 'approved-payment';

public const READY_TO_PAYOUT_INSTRUCTION_NONE = 'none';

private array $fields = [];

protected function __construct(array $data = [])
Expand Down Expand Up @@ -118,6 +126,9 @@ protected function __construct(array $data = [])
if (array_key_exists('setupInstruction', $data)) {
$this->setSetupInstruction($data['setupInstruction']);
}
if (array_key_exists('readyToPayoutInstruction', $data)) {
$this->setReadyToPayoutInstruction($data['readyToPayoutInstruction']);
}
if (array_key_exists('customFields', $data)) {
$this->setCustomFields($data['customFields']);
}
Expand Down Expand Up @@ -838,6 +849,18 @@ public function setSetupInstruction(null|string $setupInstruction): static
return $this;
}

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

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

return $this;
}

public function getCustomFields(): ?array
{
return $this->fields['customFields'] ?? null;
Expand Down Expand Up @@ -961,6 +984,9 @@ public function jsonSerialize(): array
if (array_key_exists('setupInstruction', $this->fields)) {
$data['setupInstruction'] = $this->fields['setupInstruction'];
}
if (array_key_exists('readyToPayoutInstruction', $this->fields)) {
$data['readyToPayoutInstruction'] = $this->fields['readyToPayoutInstruction'];
}
if (array_key_exists('customFields', $this->fields)) {
$data['customFields'] = $this->fields['customFields'];
}
Expand Down

0 comments on commit e079390

Please sign in to comment.