-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStatus.php
More file actions
77 lines (66 loc) · 1.76 KB
/
Status.php
File metadata and controls
77 lines (66 loc) · 1.76 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
<?php
declare(strict_types=1);
namespace Increase\Exports\ExportCreateParams\EntityCsv;
use Increase\Core\Attributes\Required;
use Increase\Core\Concerns\SdkModel;
use Increase\Core\Contracts\BaseModel;
use Increase\Exports\ExportCreateParams\EntityCsv\Status\In;
/**
* Entity statuses to filter by.
*
* @phpstan-type StatusShape = array{in: list<In|value-of<In>>}
*/
final class Status implements BaseModel
{
/** @use SdkModel<StatusShape> */
use SdkModel;
/**
* Entity statuses to filter by. For GET requests, this should be encoded as a comma-delimited string, such as `?in=one,two,three`.
*
* @var list<value-of<In>> $in
*/
#[Required(list: In::class)]
public array $in;
/**
* `new Status()` is missing required properties by the API.
*
* To enforce required parameters use
* ```
* Status::with(in: ...)
* ```
*
* Otherwise ensure the following setters are called
*
* ```
* (new Status)->withIn(...)
* ```
*/
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 list<In|value-of<In>> $in
*/
public static function with(array $in): self
{
$self = new self;
$self['in'] = $in;
return $self;
}
/**
* Entity statuses to filter by. For GET requests, this should be encoded as a comma-delimited string, such as `?in=one,two,three`.
*
* @param list<In|value-of<In>> $in
*/
public function withIn(array $in): self
{
$self = clone $this;
$self['in'] = $in;
return $self;
}
}