-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCorporation.php
More file actions
166 lines (140 loc) · 4.93 KB
/
Corporation.php
File metadata and controls
166 lines (140 loc) · 4.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<?php
declare(strict_types=1);
namespace Increase\Entities\EntityUpdateParams;
use Increase\Core\Attributes\Optional;
use Increase\Core\Concerns\SdkModel;
use Increase\Core\Contracts\BaseModel;
use Increase\Entities\EntityUpdateParams\Corporation\Address;
/**
* Details of the corporation entity to update. If you specify this parameter and the entity is not a corporation, the request will fail.
*
* @phpstan-import-type AddressShape from \Increase\Entities\EntityUpdateParams\Corporation\Address
*
* @phpstan-type CorporationShape = array{
* address?: null|Address|AddressShape,
* email?: string|null,
* incorporationState?: string|null,
* industryCode?: string|null,
* name?: string|null,
* taxIdentifier?: string|null,
* }
*/
final class Corporation implements BaseModel
{
/** @use SdkModel<CorporationShape> */
use SdkModel;
/**
* The entity's physical address. Mail receiving locations like PO Boxes and PMB's are disallowed.
*/
#[Optional]
public ?Address $address;
/**
* An email address for the business. Not every program requires an email for submitted Entities.
*/
#[Optional]
public ?string $email;
/**
* The two-letter United States Postal Service (USPS) abbreviation for the corporation's state of incorporation.
*/
#[Optional('incorporation_state')]
public ?string $incorporationState;
/**
* The North American Industry Classification System (NAICS) code for the corporation's primary line of business. This is a number, like `5132` for `Software Publishers`. A full list of classification codes is available [here](https://increase.com/documentation/data-dictionary#north-american-industry-classification-system-codes).
*/
#[Optional('industry_code')]
public ?string $industryCode;
/**
* The legal name of the corporation.
*/
#[Optional]
public ?string $name;
/**
* The Employer Identification Number (EIN) for the corporation.
*/
#[Optional('tax_identifier')]
public ?string $taxIdentifier;
public function __construct()
{
$this->initialize();
}
/**
* Construct an instance from the required parameters.
*
* You must use named parameters to construct any parameters with a default value.
*
* @param Address|AddressShape|null $address
*/
public static function with(
Address|array|null $address = null,
?string $email = null,
?string $incorporationState = null,
?string $industryCode = null,
?string $name = null,
?string $taxIdentifier = null,
): self {
$self = new self;
null !== $address && $self['address'] = $address;
null !== $email && $self['email'] = $email;
null !== $incorporationState && $self['incorporationState'] = $incorporationState;
null !== $industryCode && $self['industryCode'] = $industryCode;
null !== $name && $self['name'] = $name;
null !== $taxIdentifier && $self['taxIdentifier'] = $taxIdentifier;
return $self;
}
/**
* The entity's physical address. Mail receiving locations like PO Boxes and PMB's are disallowed.
*
* @param Address|AddressShape $address
*/
public function withAddress(Address|array $address): self
{
$self = clone $this;
$self['address'] = $address;
return $self;
}
/**
* An email address for the business. Not every program requires an email for submitted Entities.
*/
public function withEmail(string $email): self
{
$self = clone $this;
$self['email'] = $email;
return $self;
}
/**
* The two-letter United States Postal Service (USPS) abbreviation for the corporation's state of incorporation.
*/
public function withIncorporationState(string $incorporationState): self
{
$self = clone $this;
$self['incorporationState'] = $incorporationState;
return $self;
}
/**
* The North American Industry Classification System (NAICS) code for the corporation's primary line of business. This is a number, like `5132` for `Software Publishers`. A full list of classification codes is available [here](https://increase.com/documentation/data-dictionary#north-american-industry-classification-system-codes).
*/
public function withIndustryCode(string $industryCode): self
{
$self = clone $this;
$self['industryCode'] = $industryCode;
return $self;
}
/**
* The legal name of the corporation.
*/
public function withName(string $name): self
{
$self = clone $this;
$self['name'] = $name;
return $self;
}
/**
* The Employer Identification Number (EIN) for the corporation.
*/
public function withTaxIdentifier(string $taxIdentifier): self
{
$self = clone $this;
$self['taxIdentifier'] = $taxIdentifier;
return $self;
}
}