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 Sep 20, 2024
1 parent a25acc0 commit 24878d2
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/moody-hornets-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

feat(api-definitions): Add includeNextPeriod for storefront change items Rebilly/rebilly#7655
5 changes: 5 additions & 0 deletions .changeset/nervous-tips-cheat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

feat(api-definitions): Add PatchInvoice to update invoice addresses Rebilly/rebilly#7647
5 changes: 5 additions & 0 deletions .changeset/soft-dingos-hang.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

feat(api-definitions): Add interimAmount to Change quote Rebilly/rebilly#7646
22 changes: 22 additions & 0 deletions src/Model/QuoteChangeOrderInvoicePreviewInitialAmounts.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ public function __construct(array $data = [])
if (array_key_exists('amount', $data)) {
$this->setAmount($data['amount']);
}
if (array_key_exists('interimAmount', $data)) {
$this->setInterimAmount($data['interimAmount']);
}
if (array_key_exists('subtotalAmount', $data)) {
$this->setSubtotalAmount($data['subtotalAmount']);
}
Expand Down Expand Up @@ -59,6 +62,22 @@ public function setAmount(null|float|string $amount): static
return $this;
}

public function getInterimAmount(): ?float
{
return $this->fields['interimAmount'] ?? null;
}

public function setInterimAmount(null|float|string $interimAmount): static
{
if (is_string($interimAmount)) {
$interimAmount = (float) $interimAmount;
}

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

return $this;
}

public function getSubtotalAmount(): ?float
{
return $this->fields['subtotalAmount'] ?? null;
Expand Down Expand Up @@ -129,6 +148,9 @@ public function jsonSerialize(): array
if (array_key_exists('amount', $this->fields)) {
$data['amount'] = $this->fields['amount'];
}
if (array_key_exists('interimAmount', $this->fields)) {
$data['interimAmount'] = $this->fields['interimAmount'];
}
if (array_key_exists('subtotalAmount', $this->fields)) {
$data['subtotalAmount'] = $this->fields['subtotalAmount'];
}
Expand Down

0 comments on commit 24878d2

Please sign in to comment.