Skip to content

Commit f3baea8

Browse files
Update Company creation - not mandatory fields
Merge pull request #5 from shellrent/edit_create_company
2 parents 900dc73 + 20dbd3a commit f3baea8

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

src/Payloads/CreateCompanyPayload.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,23 @@
55
class CreateCompanyPayload implements Payload {
66
private string $Name;
77

8-
private ?string $Alias;
8+
private ?string $Alias = null;
99

10-
private string $TaxId;
10+
private ?string $TaxId = null;
1111

12-
private string $Email;
12+
private ?string $Email = null;
1313

14-
private string $Phone;
14+
private ?string $Phone = null;
1515

16-
private int $Country;
16+
private ?int $Country = null;
1717

18-
private string $City;
18+
private ?string $City = null;
1919

20-
private string $Street;
20+
private ?string $Street = null;
2121

22-
private int $ZipCode;
22+
private ?int $ZipCode = null;
2323

24-
private int $CompanyId;
24+
private ?int $CompanyId = null;
2525

2626
private ?string $ResellerUid = null;
2727

@@ -192,15 +192,15 @@ public function getBody() {
192192
'resellerUid' => $this->ResellerUid,
193193
'organizationInput' => [
194194
'name' => $this->Name,
195-
'alias' => $this->Alias,
196-
'taxId' => $this->TaxId,
197-
'email' => $this->Email,
198-
'phone' => $this->Phone,
199-
'country' => $this->Country,
200-
'city' => $this->City,
201-
'street' => $this->Street,
202-
'zipCode' => $this->ZipCode,
203-
'companyId' => $this->CompanyId,
195+
'alias' => $this->Alias ?? null,
196+
'taxId' => $this->TaxId ?? null,
197+
'email' => $this->Email ?? null,
198+
'phone' => $this->Phone ?? null,
199+
'country' => $this->Country ?? null,
200+
'city' => $this->City ?? null,
201+
'street' => $this->Street ?? null,
202+
'zipCode' => $this->ZipCode ?? null,
203+
'companyId' => $this->CompanyId ?? null,
204204
],
205205
'subscriptionPlanUid' => $this->SubscriptionPlanUid,
206206
'permissions' => $this->Permissions,

0 commit comments

Comments
 (0)