-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBookkeepingAccountBalanceCsv.php
More file actions
85 lines (71 loc) · 2.38 KB
/
BookkeepingAccountBalanceCsv.php
File metadata and controls
85 lines (71 loc) · 2.38 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\BookkeepingAccountBalanceCsv\CreatedAt;
/**
* Options for the created export. Required if `category` is equal to `bookkeeping_account_balance_csv`.
*
* @phpstan-import-type CreatedAtShape from \Increase\Exports\ExportCreateParams\BookkeepingAccountBalanceCsv\CreatedAt
*
* @phpstan-type BookkeepingAccountBalanceCsvShape = array{
* bookkeepingAccountID?: string|null, createdAt?: null|CreatedAt|CreatedAtShape
* }
*/
final class BookkeepingAccountBalanceCsv implements BaseModel
{
/** @use SdkModel<BookkeepingAccountBalanceCsvShape> */
use SdkModel;
/**
* Filter exported Bookkeeping Account Balances to the specified Bookkeeping Account.
*/
#[Optional('bookkeeping_account_id')]
public ?string $bookkeepingAccountID;
/**
* 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 $bookkeepingAccountID = null,
CreatedAt|array|null $createdAt = null
): self {
$self = new self;
null !== $bookkeepingAccountID && $self['bookkeepingAccountID'] = $bookkeepingAccountID;
null !== $createdAt && $self['createdAt'] = $createdAt;
return $self;
}
/**
* Filter exported Bookkeeping Account Balances to the specified Bookkeeping Account.
*/
public function withBookkeepingAccountID(string $bookkeepingAccountID): self
{
$self = clone $this;
$self['bookkeepingAccountID'] = $bookkeepingAccountID;
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;
}
}