-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBalanceCsv.php
More file actions
85 lines (71 loc) · 2.09 KB
/
BalanceCsv.php
File metadata and controls
85 lines (71 loc) · 2.09 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
<?php
declare(strict_types=1);
namespace Increase\Exports\ExportCreateParams;
use Increase\Core\Attributes\Optional;
use Increase\Core\Concerns\SdkModel;
use Increase\Core\Contracts\BaseModel;
use Increase\Exports\ExportCreateParams\BalanceCsv\CreatedAt;
/**
* Options for the created export. Required if `category` is equal to `balance_csv`.
*
* @phpstan-import-type CreatedAtShape from \Increase\Exports\ExportCreateParams\BalanceCsv\CreatedAt
*
* @phpstan-type BalanceCsvShape = array{
* accountID?: string|null, createdAt?: null|CreatedAt|CreatedAtShape
* }
*/
final class BalanceCsv implements BaseModel
{
/** @use SdkModel<BalanceCsvShape> */
use SdkModel;
/**
* Filter exported Balances to the specified Account.
*/
#[Optional('account_id')]
public ?string $accountID;
/**
* Filter results by time range on the `created_at` attribute.
*/
#[Optional('created_at')]
public ?CreatedAt $createdAt;
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
*/
public static function with(
?string $accountID = null,
CreatedAt|array|null $createdAt = null
): self {
$self = new self;
null !== $accountID && $self['accountID'] = $accountID;
null !== $createdAt && $self['createdAt'] = $createdAt;
return $self;
}
/**
* Filter exported Balances to the specified Account.
*/
public function withAccountID(string $accountID): self
{
$self = clone $this;
$self['accountID'] = $accountID;
return $self;
}
/**
* Filter results by time range on the `created_at` attribute.
*
* @param CreatedAt|CreatedAtShape $createdAt
*/
public function withCreatedAt(CreatedAt|array $createdAt): self
{
$self = clone $this;
$self['createdAt'] = $createdAt;
return $self;
}
}