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 Feb 29, 2024
1 parent 654afbe commit 6ff33af
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/cold-singers-drive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

Add orderId to invoice Rebilly/api-definitions#1807
18 changes: 18 additions & 0 deletions src/Model/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ public function __construct(array $data = [])
if (array_key_exists('invoiceNumber', $data)) {
$this->setInvoiceNumber($data['invoiceNumber']);
}
if (array_key_exists('orderId', $data)) {
$this->setOrderId($data['orderId']);
}
if (array_key_exists('subscriptionId', $data)) {
$this->setSubscriptionId($data['subscriptionId']);
}
Expand Down Expand Up @@ -222,6 +225,11 @@ public function getInvoiceNumber(): ?int
return $this->fields['invoiceNumber'] ?? null;
}

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

public function getSubscriptionId(): ?string
{
return $this->fields['subscriptionId'] ?? null;
Expand Down Expand Up @@ -607,6 +615,9 @@ public function jsonSerialize(): array
if (array_key_exists('invoiceNumber', $this->fields)) {
$data['invoiceNumber'] = $this->fields['invoiceNumber'];
}
if (array_key_exists('orderId', $this->fields)) {
$data['orderId'] = $this->fields['orderId'];
}
if (array_key_exists('subscriptionId', $this->fields)) {
$data['subscriptionId'] = $this->fields['subscriptionId'];
}
Expand Down Expand Up @@ -748,6 +759,13 @@ private function setInvoiceNumber(null|int $invoiceNumber): static
return $this;
}

private function setOrderId(null|string $orderId): static
{
$this->fields['orderId'] = $orderId;

return $this;
}

private function setSubscriptionId(null|string $subscriptionId): static
{
$this->fields['subscriptionId'] = $subscriptionId;
Expand Down

0 comments on commit 6ff33af

Please sign in to comment.