-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBeneficialOwnerUpdateParams.php
More file actions
116 lines (99 loc) · 3.62 KB
/
BeneficialOwnerUpdateParams.php
File metadata and controls
116 lines (99 loc) · 3.62 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
<?php
declare(strict_types=1);
namespace Increase\BeneficialOwners;
use Increase\BeneficialOwners\BeneficialOwnerUpdateParams\Address;
use Increase\BeneficialOwners\BeneficialOwnerUpdateParams\Identification;
use Increase\Core\Attributes\Optional;
use Increase\Core\Concerns\SdkModel;
use Increase\Core\Concerns\SdkParams;
use Increase\Core\Contracts\BaseModel;
/**
* Update a Beneficial Owner.
*
* @see Increase\Services\BeneficialOwnersService::update()
*
* @phpstan-import-type AddressShape from \Increase\BeneficialOwners\BeneficialOwnerUpdateParams\Address
* @phpstan-import-type IdentificationShape from \Increase\BeneficialOwners\BeneficialOwnerUpdateParams\Identification
*
* @phpstan-type BeneficialOwnerUpdateParamsShape = array{
* address?: null|Address|AddressShape,
* confirmedNoUsTaxID?: bool|null,
* identification?: null|Identification|IdentificationShape,
* }
*/
final class BeneficialOwnerUpdateParams implements BaseModel
{
/** @use SdkModel<BeneficialOwnerUpdateParamsShape> */
use SdkModel;
use SdkParams;
/**
* The individual's physical address. Mail receiving locations like PO Boxes and PMB's are disallowed.
*/
#[Optional]
public ?Address $address;
/**
* The identification method for an individual can only be a passport, driver's license, or other document if you've confirmed the individual does not have a US tax id (either a Social Security Number or Individual Taxpayer Identification Number).
*/
#[Optional('confirmed_no_us_tax_id')]
public ?bool $confirmedNoUsTaxID;
/**
* A means of verifying the person's identity.
*/
#[Optional]
public ?Identification $identification;
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
* @param Identification|IdentificationShape|null $identification
*/
public static function with(
Address|array|null $address = null,
?bool $confirmedNoUsTaxID = null,
Identification|array|null $identification = null,
): self {
$self = new self;
null !== $address && $self['address'] = $address;
null !== $confirmedNoUsTaxID && $self['confirmedNoUsTaxID'] = $confirmedNoUsTaxID;
null !== $identification && $self['identification'] = $identification;
return $self;
}
/**
* The individual'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;
}
/**
* The identification method for an individual can only be a passport, driver's license, or other document if you've confirmed the individual does not have a US tax id (either a Social Security Number or Individual Taxpayer Identification Number).
*/
public function withConfirmedNoUsTaxID(bool $confirmedNoUsTaxID): self
{
$self = clone $this;
$self['confirmedNoUsTaxID'] = $confirmedNoUsTaxID;
return $self;
}
/**
* A means of verifying the person's identity.
*
* @param Identification|IdentificationShape $identification
*/
public function withIdentification(
Identification|array $identification
): self {
$self = clone $this;
$self['identification'] = $identification;
return $self;
}
}