Skip to content

Commit 53a7101

Browse files
feat(api): api update
1 parent 74c7824 commit 53a7101

File tree

7 files changed

+57
-2
lines changed

7 files changed

+57
-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: 236
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5444aa15ed771b293975e4ea457bbf96f3fd4268dab9cef1d64fc18efbba3718.yml
3-
openapi_spec_hash: 94be74f7b294a338dd47d95721bb52ae
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f3d22401feb4671870673cb67688b163ee7f26acb6d2f89dcf79b26b0675523f.yml
3+
openapi_spec_hash: 4d6dbce33f5de203d92df4c20a957665
44
config_hash: 25d7d7aa4882db6189b4b53e8e249e80

src/ServiceContracts/WireDrawdownRequestsContract.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Increase\Page;
99
use Increase\RequestOptions;
1010
use Increase\WireDrawdownRequests\WireDrawdownRequest;
11+
use Increase\WireDrawdownRequests\WireDrawdownRequestCreateParams\ChargeBearer;
1112
use Increase\WireDrawdownRequests\WireDrawdownRequestCreateParams\CreditorAddress;
1213
use Increase\WireDrawdownRequests\WireDrawdownRequestCreateParams\DebtorAddress;
1314
use Increase\WireDrawdownRequests\WireDrawdownRequestListParams\Status;
@@ -30,6 +31,7 @@ interface WireDrawdownRequestsContract
3031
* @param DebtorAddress|DebtorAddressShape $debtorAddress the debtor's address
3132
* @param string $debtorName the debtor's name
3233
* @param string $unstructuredRemittanceInformation remittance information the debtor will see as part of the request
34+
* @param ChargeBearer|value-of<ChargeBearer> $chargeBearer Determines who bears the cost of the drawdown request. Defaults to `shared` if not specified.
3335
* @param string $debtorAccountNumber the debtor's account number
3436
* @param string $debtorExternalAccountID The ID of an External Account to initiate a transfer to. If this parameter is provided, `debtor_account_number` and `debtor_routing_number` must be absent.
3537
* @param string $debtorRoutingNumber the debtor's routing number
@@ -46,6 +48,7 @@ public function create(
4648
DebtorAddress|array $debtorAddress,
4749
string $debtorName,
4850
string $unstructuredRemittanceInformation,
51+
ChargeBearer|string|null $chargeBearer = null,
4952
?string $debtorAccountNumber = null,
5053
?string $debtorExternalAccountID = null,
5154
?string $debtorRoutingNumber = null,

src/Services/WireDrawdownRequestsRawService.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use Increase\ServiceContracts\WireDrawdownRequestsRawContract;
1414
use Increase\WireDrawdownRequests\WireDrawdownRequest;
1515
use Increase\WireDrawdownRequests\WireDrawdownRequestCreateParams;
16+
use Increase\WireDrawdownRequests\WireDrawdownRequestCreateParams\ChargeBearer;
1617
use Increase\WireDrawdownRequests\WireDrawdownRequestCreateParams\CreditorAddress;
1718
use Increase\WireDrawdownRequests\WireDrawdownRequestCreateParams\DebtorAddress;
1819
use Increase\WireDrawdownRequests\WireDrawdownRequestListParams;
@@ -45,6 +46,7 @@ public function __construct(private Client $client) {}
4546
* debtorAddress: DebtorAddress|DebtorAddressShape,
4647
* debtorName: string,
4748
* unstructuredRemittanceInformation: string,
49+
* chargeBearer?: ChargeBearer|value-of<ChargeBearer>,
4850
* debtorAccountNumber?: string,
4951
* debtorExternalAccountID?: string,
5052
* debtorRoutingNumber?: string,

src/Services/WireDrawdownRequestsService.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Increase\RequestOptions;
1212
use Increase\ServiceContracts\WireDrawdownRequestsContract;
1313
use Increase\WireDrawdownRequests\WireDrawdownRequest;
14+
use Increase\WireDrawdownRequests\WireDrawdownRequestCreateParams\ChargeBearer;
1415
use Increase\WireDrawdownRequests\WireDrawdownRequestCreateParams\CreditorAddress;
1516
use Increase\WireDrawdownRequests\WireDrawdownRequestCreateParams\DebtorAddress;
1617
use Increase\WireDrawdownRequests\WireDrawdownRequestListParams\Status;
@@ -48,6 +49,7 @@ public function __construct(private Client $client)
4849
* @param DebtorAddress|DebtorAddressShape $debtorAddress the debtor's address
4950
* @param string $debtorName the debtor's name
5051
* @param string $unstructuredRemittanceInformation remittance information the debtor will see as part of the request
52+
* @param ChargeBearer|value-of<ChargeBearer> $chargeBearer Determines who bears the cost of the drawdown request. Defaults to `shared` if not specified.
5153
* @param string $debtorAccountNumber the debtor's account number
5254
* @param string $debtorExternalAccountID The ID of an External Account to initiate a transfer to. If this parameter is provided, `debtor_account_number` and `debtor_routing_number` must be absent.
5355
* @param string $debtorRoutingNumber the debtor's routing number
@@ -64,6 +66,7 @@ public function create(
6466
DebtorAddress|array $debtorAddress,
6567
string $debtorName,
6668
string $unstructuredRemittanceInformation,
69+
ChargeBearer|string|null $chargeBearer = null,
6770
?string $debtorAccountNumber = null,
6871
?string $debtorExternalAccountID = null,
6972
?string $debtorRoutingNumber = null,
@@ -79,6 +82,7 @@ public function create(
7982
'debtorAddress' => $debtorAddress,
8083
'debtorName' => $debtorName,
8184
'unstructuredRemittanceInformation' => $unstructuredRemittanceInformation,
85+
'chargeBearer' => $chargeBearer,
8286
'debtorAccountNumber' => $debtorAccountNumber,
8387
'debtorExternalAccountID' => $debtorExternalAccountID,
8488
'debtorRoutingNumber' => $debtorRoutingNumber,

src/WireDrawdownRequests/WireDrawdownRequestCreateParams.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Increase\Core\Concerns\SdkModel;
1010
use Increase\Core\Concerns\SdkParams;
1111
use Increase\Core\Contracts\BaseModel;
12+
use Increase\WireDrawdownRequests\WireDrawdownRequestCreateParams\ChargeBearer;
1213
use Increase\WireDrawdownRequests\WireDrawdownRequestCreateParams\CreditorAddress;
1314
use Increase\WireDrawdownRequests\WireDrawdownRequestCreateParams\DebtorAddress;
1415

@@ -28,6 +29,7 @@
2829
* debtorAddress: DebtorAddress|DebtorAddressShape,
2930
* debtorName: string,
3031
* unstructuredRemittanceInformation: string,
32+
* chargeBearer?: null|ChargeBearer|value-of<ChargeBearer>,
3133
* debtorAccountNumber?: string|null,
3234
* debtorExternalAccountID?: string|null,
3335
* debtorRoutingNumber?: string|null,
@@ -82,6 +84,14 @@ final class WireDrawdownRequestCreateParams implements BaseModel
8284
#[Required('unstructured_remittance_information')]
8385
public string $unstructuredRemittanceInformation;
8486

87+
/**
88+
* Determines who bears the cost of the drawdown request. Defaults to `shared` if not specified.
89+
*
90+
* @var value-of<ChargeBearer>|null $chargeBearer
91+
*/
92+
#[Optional('charge_bearer', enum: ChargeBearer::class)]
93+
public ?string $chargeBearer;
94+
8595
/**
8696
* The debtor's account number.
8797
*/
@@ -147,6 +157,7 @@ public function __construct()
147157
*
148158
* @param CreditorAddress|CreditorAddressShape $creditorAddress
149159
* @param DebtorAddress|DebtorAddressShape $debtorAddress
160+
* @param ChargeBearer|value-of<ChargeBearer>|null $chargeBearer
150161
*/
151162
public static function with(
152163
string $accountNumberID,
@@ -156,6 +167,7 @@ public static function with(
156167
DebtorAddress|array $debtorAddress,
157168
string $debtorName,
158169
string $unstructuredRemittanceInformation,
170+
ChargeBearer|string|null $chargeBearer = null,
159171
?string $debtorAccountNumber = null,
160172
?string $debtorExternalAccountID = null,
161173
?string $debtorRoutingNumber = null,
@@ -171,6 +183,7 @@ public static function with(
171183
$self['debtorName'] = $debtorName;
172184
$self['unstructuredRemittanceInformation'] = $unstructuredRemittanceInformation;
173185

186+
null !== $chargeBearer && $self['chargeBearer'] = $chargeBearer;
174187
null !== $debtorAccountNumber && $self['debtorAccountNumber'] = $debtorAccountNumber;
175188
null !== $debtorExternalAccountID && $self['debtorExternalAccountID'] = $debtorExternalAccountID;
176189
null !== $debtorRoutingNumber && $self['debtorRoutingNumber'] = $debtorRoutingNumber;
@@ -262,6 +275,19 @@ public function withUnstructuredRemittanceInformation(
262275
return $self;
263276
}
264277

278+
/**
279+
* Determines who bears the cost of the drawdown request. Defaults to `shared` if not specified.
280+
*
281+
* @param ChargeBearer|value-of<ChargeBearer> $chargeBearer
282+
*/
283+
public function withChargeBearer(ChargeBearer|string $chargeBearer): self
284+
{
285+
$self = clone $this;
286+
$self['chargeBearer'] = $chargeBearer;
287+
288+
return $self;
289+
}
290+
265291
/**
266292
* The debtor's account number.
267293
*/
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Increase\WireDrawdownRequests\WireDrawdownRequestCreateParams;
6+
7+
/**
8+
* Determines who bears the cost of the drawdown request. Defaults to `shared` if not specified.
9+
*/
10+
enum ChargeBearer: string
11+
{
12+
case SHARED = 'shared';
13+
14+
case DEBTOR = 'debtor';
15+
16+
case CREDITOR = 'creditor';
17+
18+
case SERVICE_LEVEL = 'service_level';
19+
}

tests/Services/WireDrawdownRequestsTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ public function testCreateWithOptionalParams(): void
7474
],
7575
debtorName: 'Ian Crease',
7676
unstructuredRemittanceInformation: 'Invoice 29582',
77+
chargeBearer: 'shared',
7778
debtorAccountNumber: '987654321',
7879
debtorExternalAccountID: 'debtor_external_account_id',
7980
debtorRoutingNumber: '101050001',

0 commit comments

Comments
 (0)