Skip to content

Commit fc04e53

Browse files
chore: update SDK from api-definitions (#738)
Co-authored-by: rebilly-machine-user <[email protected]> Co-authored-by: Arif Kurkchi <[email protected]>
1 parent 6f9ca46 commit fc04e53

File tree

7 files changed

+129
-0
lines changed

7 files changed

+129
-0
lines changed

.changeset/loud-hounds-eat.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@rebilly/client-php": patch
3+
---
4+
5+
feat(api-definition): Add `logoUrl` property to Website Rebilly/rebilly#9578

.changeset/neat-laws-play.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@rebilly/client-php": patch
3+
---
4+
5+
feat(api-definition): Add Tabby gateway settings Rebilly/rebilly#9588

.changeset/sharp-squids-fetch.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@rebilly/client-php": patch
3+
---
4+
5+
fix(api-definitions): Fix column types for Payout requests grid Rebilly/rebilly#9513

src/Model/PayoutRequestAllocations.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -836,6 +836,9 @@ public function __construct(array $data = [])
836836
if (array_key_exists('amount', $data)) {
837837
$this->setAmount($data['amount']);
838838
}
839+
if (array_key_exists('currency', $data)) {
840+
$this->setCurrency($data['currency']);
841+
}
839842
if (array_key_exists('createdTime', $data)) {
840843
$this->setCreatedTime($data['createdTime']);
841844
}
@@ -918,6 +921,18 @@ public function setAmount(null|float|string $amount): static
918921
return $this;
919922
}
920923

924+
public function getCurrency(): ?string
925+
{
926+
return $this->fields['currency'] ?? null;
927+
}
928+
929+
public function setCurrency(null|string $currency): static
930+
{
931+
$this->fields['currency'] = $currency;
932+
933+
return $this;
934+
}
935+
921936
public function getCreatedTime(): ?DateTimeImmutable
922937
{
923938
return $this->fields['createdTime'] ?? null;
@@ -949,6 +964,9 @@ public function jsonSerialize(): array
949964
if (array_key_exists('amount', $this->fields)) {
950965
$data['amount'] = $this->fields['amount'];
951966
}
967+
if (array_key_exists('currency', $this->fields)) {
968+
$data['currency'] = $this->fields['currency'];
969+
}
952970
if (array_key_exists('createdTime', $this->fields)) {
953971
$data['createdTime'] = $this->fields['createdTime']?->format(DateTimeInterface::RFC3339);
954972
}

src/Model/Tabby.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ public function __construct(array $data = [])
2727
if (array_key_exists('credentials', $data)) {
2828
$this->setCredentials($data['credentials']);
2929
}
30+
if (array_key_exists('settings', $data)) {
31+
$this->setSettings($data['settings']);
32+
}
3033
}
3134

3235
public static function from(array $data = []): self
@@ -50,12 +53,31 @@ public function setCredentials(TabbyCredentials|array $credentials): static
5053
return $this;
5154
}
5255

56+
public function getSettings(): ?TabbySettings
57+
{
58+
return $this->fields['settings'] ?? null;
59+
}
60+
61+
public function setSettings(null|TabbySettings|array $settings): static
62+
{
63+
if ($settings !== null && !($settings instanceof TabbySettings)) {
64+
$settings = TabbySettings::from($settings);
65+
}
66+
67+
$this->fields['settings'] = $settings;
68+
69+
return $this;
70+
}
71+
5372
public function jsonSerialize(): array
5473
{
5574
$data = [];
5675
if (array_key_exists('credentials', $this->fields)) {
5776
$data['credentials'] = $this->fields['credentials']->jsonSerialize();
5877
}
78+
if (array_key_exists('settings', $this->fields)) {
79+
$data['settings'] = $this->fields['settings']?->jsonSerialize();
80+
}
5981

6082
return parent::jsonSerialize() + $data;
6183
}

src/Model/TabbySettings.php

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<?php
2+
3+
/**
4+
* This source file is proprietary and part of Rebilly.
5+
*
6+
* (c) Rebilly SRL
7+
* Rebilly Ltd.
8+
* Rebilly Inc.
9+
*
10+
* @see https://www.rebilly.com
11+
*/
12+
13+
declare(strict_types=1);
14+
15+
namespace Rebilly\Sdk\Model;
16+
17+
use JsonSerializable;
18+
19+
class TabbySettings implements JsonSerializable
20+
{
21+
private array $fields = [];
22+
23+
public function __construct(array $data = [])
24+
{
25+
if (array_key_exists('category', $data)) {
26+
$this->setCategory($data['category']);
27+
}
28+
}
29+
30+
public static function from(array $data = []): self
31+
{
32+
return new self($data);
33+
}
34+
35+
public function getCategory(): ?string
36+
{
37+
return $this->fields['category'] ?? null;
38+
}
39+
40+
public function setCategory(null|string $category): static
41+
{
42+
$this->fields['category'] = $category;
43+
44+
return $this;
45+
}
46+
47+
public function jsonSerialize(): array
48+
{
49+
$data = [];
50+
if (array_key_exists('category', $this->fields)) {
51+
$data['category'] = $this->fields['category'];
52+
}
53+
54+
return $data;
55+
}
56+
}

src/Model/Website.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ public function __construct(array $data = [])
5454
if (array_key_exists('logoId', $data)) {
5555
$this->setLogoId($data['logoId']);
5656
}
57+
if (array_key_exists('logoUrl', $data)) {
58+
$this->setLogoUrl($data['logoUrl']);
59+
}
5760
if (array_key_exists('organizationId', $data)) {
5861
$this->setOrganizationId($data['organizationId']);
5962
}
@@ -170,6 +173,11 @@ public function setLogoId(null|string $logoId): static
170173
return $this;
171174
}
172175

176+
public function getLogoUrl(): ?string
177+
{
178+
return $this->fields['logoUrl'] ?? null;
179+
}
180+
173181
public function getOrganizationId(): ?string
174182
{
175183
return $this->fields['organizationId'] ?? null;
@@ -216,6 +224,9 @@ public function jsonSerialize(): array
216224
if (array_key_exists('logoId', $this->fields)) {
217225
$data['logoId'] = $this->fields['logoId'];
218226
}
227+
if (array_key_exists('logoUrl', $this->fields)) {
228+
$data['logoUrl'] = $this->fields['logoUrl'];
229+
}
219230
if (array_key_exists('organizationId', $this->fields)) {
220231
$data['organizationId'] = $this->fields['organizationId'];
221232
}
@@ -260,6 +271,13 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta
260271
return $this;
261272
}
262273

274+
private function setLogoUrl(null|string $logoUrl): static
275+
{
276+
$this->fields['logoUrl'] = $logoUrl;
277+
278+
return $this;
279+
}
280+
263281
private function setOrganizationId(null|string $organizationId): static
264282
{
265283
$this->fields['organizationId'] = $organizationId;

0 commit comments

Comments
 (0)