Skip to content

Commit 32f1d65

Browse files
update SDK from api-definitions (#752)
Co-authored-by: rebilly-machine-user <[email protected]>
1 parent 546f07a commit 32f1d65

File tree

4 files changed

+31
-3
lines changed

4 files changed

+31
-3
lines changed

.changeset/green-olives-turn.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+
refactor(be,api-definitions): refactor TransactionReportDto to use default values Rebilly/rebilly#16499
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(be): Create a Person entity when a Customer is created Rebilly/rebilly#16340

src/Api/ReportsApi.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -665,9 +665,9 @@ public function getTimeSeriesTransaction(
665665
}
666666

667667
public function getTransactions(
668-
DateTimeImmutable $periodStart,
669-
DateTimeImmutable $periodEnd,
670-
string $aggregationField,
668+
?DateTimeImmutable $periodStart = null,
669+
?DateTimeImmutable $periodEnd = null,
670+
?string $aggregationField = null,
671671
?int $limit = null,
672672
?int $offset = null,
673673
?string $filter = null,

src/Model/Customer.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ public function __construct(array $data = [])
102102
if (array_key_exists('leadSource', $data)) {
103103
$this->setLeadSource($data['leadSource']);
104104
}
105+
if (array_key_exists('personId', $data)) {
106+
$this->setPersonId($data['personId']);
107+
}
105108
if (array_key_exists('_links', $data)) {
106109
$this->setLinks($data['_links']);
107110
}
@@ -374,6 +377,18 @@ public function setLeadSource(null|LeadSourceData|array $leadSource): static
374377
return $this;
375378
}
376379

380+
public function getPersonId(): ?string
381+
{
382+
return $this->fields['personId'] ?? null;
383+
}
384+
385+
public function setPersonId(null|string $personId): static
386+
{
387+
$this->fields['personId'] = $personId;
388+
389+
return $this;
390+
}
391+
377392
/**
378393
* @return null|ResourceLink[]
379394
*/
@@ -489,6 +504,9 @@ public function jsonSerialize(): array
489504
if (array_key_exists('leadSource', $this->fields)) {
490505
$data['leadSource'] = $this->fields['leadSource']?->jsonSerialize();
491506
}
507+
if (array_key_exists('personId', $this->fields)) {
508+
$data['personId'] = $this->fields['personId'];
509+
}
492510
if (array_key_exists('_links', $this->fields)) {
493511
$data['_links'] = $this->fields['_links'] !== null
494512
? array_map(

0 commit comments

Comments
 (0)