Skip to content

Commit 576e94f

Browse files
feat(api): api update
1 parent 11317a2 commit 576e94f

File tree

7 files changed

+121
-2
lines changed

7 files changed

+121
-2
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-2277bacfbbf3570574b1c8abe74936d197944101f1e66238be7baf8e3303e52d.yml
3-
openapi_spec_hash: f9004c6a75fbf5b4984080b8f8dd184c
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-910400a5c3fcab85b95bf574472b6356767c24d4f76eb296bcba4b7db309710c.yml
3+
openapi_spec_hash: c8b1cebba3d13a5c050c1296b93e2bdb
44
config_hash: d15ecbf4dc8a7a0ef99397d11b557444

src/ServiceContracts/WireTransfersContract.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@
1212
use Increase\WireTransfers\WireTransferCreateParams\Debtor;
1313
use Increase\WireTransfers\WireTransferCreateParams\Remittance;
1414
use Increase\WireTransfers\WireTransferListParams\CreatedAt;
15+
use Increase\WireTransfers\WireTransferListParams\Status;
1516

1617
/**
1718
* @phpstan-import-type CreditorShape from \Increase\WireTransfers\WireTransferCreateParams\Creditor
1819
* @phpstan-import-type RemittanceShape from \Increase\WireTransfers\WireTransferCreateParams\Remittance
1920
* @phpstan-import-type DebtorShape from \Increase\WireTransfers\WireTransferCreateParams\Debtor
2021
* @phpstan-import-type CreatedAtShape from \Increase\WireTransfers\WireTransferListParams\CreatedAt
22+
* @phpstan-import-type StatusShape from \Increase\WireTransfers\WireTransferListParams\Status
2123
* @phpstan-import-type RequestOpts from \Increase\RequestOptions
2224
*/
2325
interface WireTransfersContract
@@ -77,6 +79,7 @@ public function retrieve(
7779
* @param string $externalAccountID filter Wire Transfers to those made to the specified External Account
7880
* @param string $idempotencyKey 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).
7981
* @param int $limit Limit the size of the list that is returned. The default (and maximum) is 100 objects.
82+
* @param Status|StatusShape $status
8083
* @param RequestOpts|null $requestOptions
8184
*
8285
* @return Page<WireTransfer>
@@ -90,6 +93,7 @@ public function list(
9093
?string $externalAccountID = null,
9194
?string $idempotencyKey = null,
9295
?int $limit = null,
96+
Status|array|null $status = null,
9397
RequestOptions|array|null $requestOptions = null,
9498
): Page;
9599

src/Services/WireTransfersRawService.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@
1818
use Increase\WireTransfers\WireTransferCreateParams\Remittance;
1919
use Increase\WireTransfers\WireTransferListParams;
2020
use Increase\WireTransfers\WireTransferListParams\CreatedAt;
21+
use Increase\WireTransfers\WireTransferListParams\Status;
2122

2223
/**
2324
* @phpstan-import-type CreditorShape from \Increase\WireTransfers\WireTransferCreateParams\Creditor
2425
* @phpstan-import-type RemittanceShape from \Increase\WireTransfers\WireTransferCreateParams\Remittance
2526
* @phpstan-import-type DebtorShape from \Increase\WireTransfers\WireTransferCreateParams\Debtor
2627
* @phpstan-import-type CreatedAtShape from \Increase\WireTransfers\WireTransferListParams\CreatedAt
28+
* @phpstan-import-type StatusShape from \Increase\WireTransfers\WireTransferListParams\Status
2729
* @phpstan-import-type RequestOpts from \Increase\RequestOptions
2830
*/
2931
final class WireTransfersRawService implements WireTransfersRawContract
@@ -114,6 +116,7 @@ public function retrieve(
114116
* externalAccountID?: string,
115117
* idempotencyKey?: string,
116118
* limit?: int,
119+
* status?: Status|StatusShape,
117120
* }|WireTransferListParams $params
118121
* @param RequestOpts|null $requestOptions
119122
*

src/Services/WireTransfersService.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@
1515
use Increase\WireTransfers\WireTransferCreateParams\Debtor;
1616
use Increase\WireTransfers\WireTransferCreateParams\Remittance;
1717
use Increase\WireTransfers\WireTransferListParams\CreatedAt;
18+
use Increase\WireTransfers\WireTransferListParams\Status;
1819

1920
/**
2021
* @phpstan-import-type CreditorShape from \Increase\WireTransfers\WireTransferCreateParams\Creditor
2122
* @phpstan-import-type RemittanceShape from \Increase\WireTransfers\WireTransferCreateParams\Remittance
2223
* @phpstan-import-type DebtorShape from \Increase\WireTransfers\WireTransferCreateParams\Debtor
2324
* @phpstan-import-type CreatedAtShape from \Increase\WireTransfers\WireTransferListParams\CreatedAt
25+
* @phpstan-import-type StatusShape from \Increase\WireTransfers\WireTransferListParams\Status
2426
* @phpstan-import-type RequestOpts from \Increase\RequestOptions
2527
*/
2628
final class WireTransfersService implements WireTransfersContract
@@ -125,6 +127,7 @@ public function retrieve(
125127
* @param string $externalAccountID filter Wire Transfers to those made to the specified External Account
126128
* @param string $idempotencyKey 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).
127129
* @param int $limit Limit the size of the list that is returned. The default (and maximum) is 100 objects.
130+
* @param Status|StatusShape $status
128131
* @param RequestOpts|null $requestOptions
129132
*
130133
* @return Page<WireTransfer>
@@ -138,6 +141,7 @@ public function list(
138141
?string $externalAccountID = null,
139142
?string $idempotencyKey = null,
140143
?int $limit = null,
144+
Status|array|null $status = null,
141145
RequestOptions|array|null $requestOptions = null,
142146
): Page {
143147
$params = Util::removeNulls(
@@ -148,6 +152,7 @@ public function list(
148152
'externalAccountID' => $externalAccountID,
149153
'idempotencyKey' => $idempotencyKey,
150154
'limit' => $limit,
155+
'status' => $status,
151156
],
152157
);
153158

src/WireTransfers/WireTransferListParams.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@
99
use Increase\Core\Concerns\SdkParams;
1010
use Increase\Core\Contracts\BaseModel;
1111
use Increase\WireTransfers\WireTransferListParams\CreatedAt;
12+
use Increase\WireTransfers\WireTransferListParams\Status;
1213

1314
/**
1415
* List Wire Transfers.
1516
*
1617
* @see Increase\Services\WireTransfersService::list()
1718
*
1819
* @phpstan-import-type CreatedAtShape from \Increase\WireTransfers\WireTransferListParams\CreatedAt
20+
* @phpstan-import-type StatusShape from \Increase\WireTransfers\WireTransferListParams\Status
1921
*
2022
* @phpstan-type WireTransferListParamsShape = array{
2123
* accountID?: string|null,
@@ -24,6 +26,7 @@
2426
* externalAccountID?: string|null,
2527
* idempotencyKey?: string|null,
2628
* limit?: int|null,
29+
* status?: null|Status|StatusShape,
2730
* }
2831
*/
2932
final class WireTransferListParams implements BaseModel
@@ -65,6 +68,9 @@ final class WireTransferListParams implements BaseModel
6568
#[Optional]
6669
public ?int $limit;
6770

71+
#[Optional]
72+
public ?Status $status;
73+
6874
public function __construct()
6975
{
7076
$this->initialize();
@@ -76,6 +82,7 @@ public function __construct()
7682
* You must use named parameters to construct any parameters with a default value.
7783
*
7884
* @param CreatedAt|CreatedAtShape|null $createdAt
85+
* @param Status|StatusShape|null $status
7986
*/
8087
public static function with(
8188
?string $accountID = null,
@@ -84,6 +91,7 @@ public static function with(
8491
?string $externalAccountID = null,
8592
?string $idempotencyKey = null,
8693
?int $limit = null,
94+
Status|array|null $status = null,
8795
): self {
8896
$self = new self;
8997

@@ -93,6 +101,7 @@ public static function with(
93101
null !== $externalAccountID && $self['externalAccountID'] = $externalAccountID;
94102
null !== $idempotencyKey && $self['idempotencyKey'] = $idempotencyKey;
95103
null !== $limit && $self['limit'] = $limit;
104+
null !== $status && $self['status'] = $status;
96105

97106
return $self;
98107
}
@@ -162,4 +171,15 @@ public function withLimit(int $limit): self
162171

163172
return $self;
164173
}
174+
175+
/**
176+
* @param Status|StatusShape $status
177+
*/
178+
public function withStatus(Status|array $status): self
179+
{
180+
$self = clone $this;
181+
$self['status'] = $status;
182+
183+
return $self;
184+
}
165185
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Increase\WireTransfers\WireTransferListParams;
6+
7+
use Increase\Core\Attributes\Optional;
8+
use Increase\Core\Concerns\SdkModel;
9+
use Increase\Core\Contracts\BaseModel;
10+
use Increase\WireTransfers\WireTransferListParams\Status\In;
11+
12+
/**
13+
* @phpstan-type StatusShape = array{in?: list<In|value-of<In>>|null}
14+
*/
15+
final class Status implements BaseModel
16+
{
17+
/** @use SdkModel<StatusShape> */
18+
use SdkModel;
19+
20+
/**
21+
* Return results whose value is in the provided list. 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+
* Return results whose value is in the provided list. 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+
}
61+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Increase\WireTransfers\WireTransferListParams\Status;
6+
7+
enum In: string
8+
{
9+
case PENDING_APPROVAL = 'pending_approval';
10+
11+
case CANCELED = 'canceled';
12+
13+
case PENDING_REVIEWING = 'pending_reviewing';
14+
15+
case REJECTED = 'rejected';
16+
17+
case REQUIRES_ATTENTION = 'requires_attention';
18+
19+
case PENDING_CREATING = 'pending_creating';
20+
21+
case REVERSED = 'reversed';
22+
23+
case SUBMITTED = 'submitted';
24+
25+
case COMPLETE = 'complete';
26+
}

0 commit comments

Comments
 (0)