Skip to content

Commit 83b9ff4

Browse files
feat(api): api update
1 parent 35bb4c9 commit 83b9ff4

File tree

9 files changed

+224
-102
lines changed

9 files changed

+224
-102
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 232
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6a089f62e0825b943563fb885786306e446f8e35f777c55c024e57447194aabf.yml
3-
openapi_spec_hash: 2d2faf76bfb1b2a3b8dac458f95abe08
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-50d1961c2f7a9b49b1176da26978fbdf0acc1150d731540dcbeeea795ad63fd5.yml
3+
openapi_spec_hash: c8fee0479195a45721851f5f640e5087
44
config_hash: 27e44ed36b9c5617b580ead7231a594a

src/Exports/ExportListParams.php

Lines changed: 54 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,26 @@
1010
use Increase\Core\Contracts\BaseModel;
1111
use Increase\Exports\ExportListParams\Category;
1212
use Increase\Exports\ExportListParams\CreatedAt;
13+
use Increase\Exports\ExportListParams\Form1099Int;
14+
use Increase\Exports\ExportListParams\Form1099Misc;
1315
use Increase\Exports\ExportListParams\Status;
1416

1517
/**
1618
* List Exports.
1719
*
1820
* @see Increase\Services\ExportsService::list()
1921
*
20-
* @phpstan-import-type CategoryShape from \Increase\Exports\ExportListParams\Category
2122
* @phpstan-import-type CreatedAtShape from \Increase\Exports\ExportListParams\CreatedAt
23+
* @phpstan-import-type Form1099IntShape from \Increase\Exports\ExportListParams\Form1099Int
24+
* @phpstan-import-type Form1099MiscShape from \Increase\Exports\ExportListParams\Form1099Misc
2225
* @phpstan-import-type StatusShape from \Increase\Exports\ExportListParams\Status
2326
*
2427
* @phpstan-type ExportListParamsShape = array{
25-
* category?: null|Category|CategoryShape,
28+
* category?: null|Category|value-of<Category>,
2629
* createdAt?: null|CreatedAt|CreatedAtShape,
2730
* cursor?: string|null,
31+
* form1099Int?: null|Form1099Int|Form1099IntShape,
32+
* form1099Misc?: null|Form1099Misc|Form1099MiscShape,
2833
* idempotencyKey?: string|null,
2934
* limit?: int|null,
3035
* status?: null|Status|StatusShape,
@@ -36,8 +41,13 @@ final class ExportListParams implements BaseModel
3641
use SdkModel;
3742
use SdkParams;
3843

39-
#[Optional]
40-
public ?Category $category;
44+
/**
45+
* Filter Exports for those with the specified category.
46+
*
47+
* @var value-of<Category>|null $category
48+
*/
49+
#[Optional(enum: Category::class)]
50+
public ?string $category;
4151

4252
#[Optional]
4353
public ?CreatedAt $createdAt;
@@ -48,6 +58,12 @@ final class ExportListParams implements BaseModel
4858
#[Optional]
4959
public ?string $cursor;
5060

61+
#[Optional]
62+
public ?Form1099Int $form1099Int;
63+
64+
#[Optional]
65+
public ?Form1099Misc $form1099Misc;
66+
5167
/**
5268
* 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).
5369
*/
@@ -73,14 +89,18 @@ public function __construct()
7389
*
7490
* You must use named parameters to construct any parameters with a default value.
7591
*
76-
* @param Category|CategoryShape|null $category
92+
* @param Category|value-of<Category>|null $category
7793
* @param CreatedAt|CreatedAtShape|null $createdAt
94+
* @param Form1099Int|Form1099IntShape|null $form1099Int
95+
* @param Form1099Misc|Form1099MiscShape|null $form1099Misc
7896
* @param Status|StatusShape|null $status
7997
*/
8098
public static function with(
81-
Category|array|null $category = null,
99+
Category|string|null $category = null,
82100
CreatedAt|array|null $createdAt = null,
83101
?string $cursor = null,
102+
Form1099Int|array|null $form1099Int = null,
103+
Form1099Misc|array|null $form1099Misc = null,
84104
?string $idempotencyKey = null,
85105
?int $limit = null,
86106
Status|array|null $status = null,
@@ -90,6 +110,8 @@ public static function with(
90110
null !== $category && $self['category'] = $category;
91111
null !== $createdAt && $self['createdAt'] = $createdAt;
92112
null !== $cursor && $self['cursor'] = $cursor;
113+
null !== $form1099Int && $self['form1099Int'] = $form1099Int;
114+
null !== $form1099Misc && $self['form1099Misc'] = $form1099Misc;
93115
null !== $idempotencyKey && $self['idempotencyKey'] = $idempotencyKey;
94116
null !== $limit && $self['limit'] = $limit;
95117
null !== $status && $self['status'] = $status;
@@ -98,9 +120,11 @@ public static function with(
98120
}
99121

100122
/**
101-
* @param Category|CategoryShape $category
123+
* Filter Exports for those with the specified category.
124+
*
125+
* @param Category|value-of<Category> $category
102126
*/
103-
public function withCategory(Category|array $category): self
127+
public function withCategory(Category|string $category): self
104128
{
105129
$self = clone $this;
106130
$self['category'] = $category;
@@ -130,6 +154,28 @@ public function withCursor(string $cursor): self
130154
return $self;
131155
}
132156

157+
/**
158+
* @param Form1099Int|Form1099IntShape $form1099Int
159+
*/
160+
public function withForm1099Int(Form1099Int|array $form1099Int): self
161+
{
162+
$self = clone $this;
163+
$self['form1099Int'] = $form1099Int;
164+
165+
return $self;
166+
}
167+
168+
/**
169+
* @param Form1099Misc|Form1099MiscShape $form1099Misc
170+
*/
171+
public function withForm1099Misc(Form1099Misc|array $form1099Misc): self
172+
{
173+
$self = clone $this;
174+
$self['form1099Misc'] = $form1099Misc;
175+
176+
return $self;
177+
}
178+
133179
/**
134180
* 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).
135181
*/

src/Exports/ExportListParams/Category.php

Lines changed: 25 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -4,58 +4,32 @@
44

55
namespace Increase\Exports\ExportListParams;
66

7-
use Increase\Core\Attributes\Optional;
8-
use Increase\Core\Concerns\SdkModel;
9-
use Increase\Core\Contracts\BaseModel;
10-
use Increase\Exports\ExportListParams\Category\In;
11-
127
/**
13-
* @phpstan-type CategoryShape = array{in?: list<In|value-of<In>>|null}
8+
* Filter Exports for those with the specified category.
149
*/
15-
final class Category implements BaseModel
10+
enum Category: string
1611
{
17-
/** @use SdkModel<CategoryShape> */
18-
use SdkModel;
19-
20-
/**
21-
* Filter Exports for those with the specified category or categories. For GET requests, this should be encoded as a comma-delimited string, such as `?in=one,two,three`.
22-
*
23-
* @var list<value-of<In>>|null $in
24-
*/
25-
#[Optional(list: In::class)]
26-
public ?array $in;
27-
28-
public function __construct()
29-
{
30-
$this->initialize();
31-
}
32-
33-
/**
34-
* Construct an instance from the required parameters.
35-
*
36-
* You must use named parameters to construct any parameters with a default value.
37-
*
38-
* @param list<In|value-of<In>>|null $in
39-
*/
40-
public static function with(?array $in = null): self
41-
{
42-
$self = new self;
43-
44-
null !== $in && $self['in'] = $in;
45-
46-
return $self;
47-
}
48-
49-
/**
50-
* Filter Exports for those with the specified category or categories. For GET requests, this should be encoded as a comma-delimited string, such as `?in=one,two,three`.
51-
*
52-
* @param list<In|value-of<In>> $in
53-
*/
54-
public function withIn(array $in): self
55-
{
56-
$self = clone $this;
57-
$self['in'] = $in;
58-
59-
return $self;
60-
}
12+
case ACCOUNT_STATEMENT_OFX = 'account_statement_ofx';
13+
14+
case ACCOUNT_STATEMENT_BAI2 = 'account_statement_bai2';
15+
16+
case TRANSACTION_CSV = 'transaction_csv';
17+
18+
case BALANCE_CSV = 'balance_csv';
19+
20+
case BOOKKEEPING_ACCOUNT_BALANCE_CSV = 'bookkeeping_account_balance_csv';
21+
22+
case ENTITY_CSV = 'entity_csv';
23+
24+
case VENDOR_CSV = 'vendor_csv';
25+
26+
case DASHBOARD_TABLE_CSV = 'dashboard_table_csv';
27+
28+
case ACCOUNT_VERIFICATION_LETTER = 'account_verification_letter';
29+
30+
case FUNDING_INSTRUCTIONS = 'funding_instructions';
31+
32+
case FORM_1099_INT = 'form_1099_int';
33+
34+
case FORM_1099_MISC = 'form_1099_misc';
6135
}

src/Exports/ExportListParams/Category/In.php

Lines changed: 0 additions & 32 deletions
This file was deleted.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Increase\Exports\ExportListParams;
6+
7+
use Increase\Core\Attributes\Optional;
8+
use Increase\Core\Concerns\SdkModel;
9+
use Increase\Core\Contracts\BaseModel;
10+
11+
/**
12+
* @phpstan-type Form1099IntShape = array{accountID?: string|null}
13+
*/
14+
final class Form1099Int implements BaseModel
15+
{
16+
/** @use SdkModel<Form1099IntShape> */
17+
use SdkModel;
18+
19+
/**
20+
* Filter Form 1099-INT Exports to those for the specified Account.
21+
*/
22+
#[Optional('account_id')]
23+
public ?string $accountID;
24+
25+
public function __construct()
26+
{
27+
$this->initialize();
28+
}
29+
30+
/**
31+
* Construct an instance from the required parameters.
32+
*
33+
* You must use named parameters to construct any parameters with a default value.
34+
*/
35+
public static function with(?string $accountID = null): self
36+
{
37+
$self = new self;
38+
39+
null !== $accountID && $self['accountID'] = $accountID;
40+
41+
return $self;
42+
}
43+
44+
/**
45+
* Filter Form 1099-INT Exports to those for the specified Account.
46+
*/
47+
public function withAccountID(string $accountID): self
48+
{
49+
$self = clone $this;
50+
$self['accountID'] = $accountID;
51+
52+
return $self;
53+
}
54+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Increase\Exports\ExportListParams;
6+
7+
use Increase\Core\Attributes\Optional;
8+
use Increase\Core\Concerns\SdkModel;
9+
use Increase\Core\Contracts\BaseModel;
10+
11+
/**
12+
* @phpstan-type Form1099MiscShape = array{accountID?: string|null}
13+
*/
14+
final class Form1099Misc implements BaseModel
15+
{
16+
/** @use SdkModel<Form1099MiscShape> */
17+
use SdkModel;
18+
19+
/**
20+
* Filter Form 1099-MISC Exports to those for the specified Account.
21+
*/
22+
#[Optional('account_id')]
23+
public ?string $accountID;
24+
25+
public function __construct()
26+
{
27+
$this->initialize();
28+
}
29+
30+
/**
31+
* Construct an instance from the required parameters.
32+
*
33+
* You must use named parameters to construct any parameters with a default value.
34+
*/
35+
public static function with(?string $accountID = null): self
36+
{
37+
$self = new self;
38+
39+
null !== $accountID && $self['accountID'] = $accountID;
40+
41+
return $self;
42+
}
43+
44+
/**
45+
* Filter Form 1099-MISC Exports to those for the specified Account.
46+
*/
47+
public function withAccountID(string $accountID): self
48+
{
49+
$self = clone $this;
50+
$self['accountID'] = $accountID;
51+
52+
return $self;
53+
}
54+
}

0 commit comments

Comments
 (0)