-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWireTransferListParams.php
More file actions
185 lines (156 loc) · 5.1 KB
/
WireTransferListParams.php
File metadata and controls
185 lines (156 loc) · 5.1 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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<?php
declare(strict_types=1);
namespace Increase\WireTransfers;
use Increase\Core\Attributes\Optional;
use Increase\Core\Concerns\SdkModel;
use Increase\Core\Concerns\SdkParams;
use Increase\Core\Contracts\BaseModel;
use Increase\WireTransfers\WireTransferListParams\CreatedAt;
use Increase\WireTransfers\WireTransferListParams\Status;
/**
* List Wire Transfers.
*
* @see Increase\Services\WireTransfersService::list()
*
* @phpstan-import-type CreatedAtShape from \Increase\WireTransfers\WireTransferListParams\CreatedAt
* @phpstan-import-type StatusShape from \Increase\WireTransfers\WireTransferListParams\Status
*
* @phpstan-type WireTransferListParamsShape = array{
* accountID?: string|null,
* createdAt?: null|CreatedAt|CreatedAtShape,
* cursor?: string|null,
* externalAccountID?: string|null,
* idempotencyKey?: string|null,
* limit?: int|null,
* status?: null|Status|StatusShape,
* }
*/
final class WireTransferListParams implements BaseModel
{
/** @use SdkModel<WireTransferListParamsShape> */
use SdkModel;
use SdkParams;
/**
* Filter Wire Transfers to those belonging to the specified Account.
*/
#[Optional]
public ?string $accountID;
#[Optional]
public ?CreatedAt $createdAt;
/**
* Return the page of entries after this one.
*/
#[Optional]
public ?string $cursor;
/**
* Filter Wire Transfers to those made to the specified External Account.
*/
#[Optional]
public ?string $externalAccountID;
/**
* Filter records to the one with the specified `idempotency_key` you chose for that object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about [idempotency](https://increase.com/documentation/idempotency-keys).
*/
#[Optional]
public ?string $idempotencyKey;
/**
* Limit the size of the list that is returned. The default (and maximum) is 100 objects.
*/
#[Optional]
public ?int $limit;
#[Optional]
public ?Status $status;
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 CreatedAt|CreatedAtShape|null $createdAt
* @param Status|StatusShape|null $status
*/
public static function with(
?string $accountID = null,
CreatedAt|array|null $createdAt = null,
?string $cursor = null,
?string $externalAccountID = null,
?string $idempotencyKey = null,
?int $limit = null,
Status|array|null $status = null,
): self {
$self = new self;
null !== $accountID && $self['accountID'] = $accountID;
null !== $createdAt && $self['createdAt'] = $createdAt;
null !== $cursor && $self['cursor'] = $cursor;
null !== $externalAccountID && $self['externalAccountID'] = $externalAccountID;
null !== $idempotencyKey && $self['idempotencyKey'] = $idempotencyKey;
null !== $limit && $self['limit'] = $limit;
null !== $status && $self['status'] = $status;
return $self;
}
/**
* Filter Wire Transfers to those belonging to the specified Account.
*/
public function withAccountID(string $accountID): self
{
$self = clone $this;
$self['accountID'] = $accountID;
return $self;
}
/**
* @param CreatedAt|CreatedAtShape $createdAt
*/
public function withCreatedAt(CreatedAt|array $createdAt): self
{
$self = clone $this;
$self['createdAt'] = $createdAt;
return $self;
}
/**
* Return the page of entries after this one.
*/
public function withCursor(string $cursor): self
{
$self = clone $this;
$self['cursor'] = $cursor;
return $self;
}
/**
* Filter Wire Transfers to those made to the specified External Account.
*/
public function withExternalAccountID(string $externalAccountID): self
{
$self = clone $this;
$self['externalAccountID'] = $externalAccountID;
return $self;
}
/**
* Filter records to the one with the specified `idempotency_key` you chose for that object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about [idempotency](https://increase.com/documentation/idempotency-keys).
*/
public function withIdempotencyKey(string $idempotencyKey): self
{
$self = clone $this;
$self['idempotencyKey'] = $idempotencyKey;
return $self;
}
/**
* Limit the size of the list that is returned. The default (and maximum) is 100 objects.
*/
public function withLimit(int $limit): self
{
$self = clone $this;
$self['limit'] = $limit;
return $self;
}
/**
* @param Status|StatusShape $status
*/
public function withStatus(Status|array $status): self
{
$self = clone $this;
$self['status'] = $status;
return $self;
}
}