Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update SDK from api-definitions #664

Merged
merged 2 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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