Skip to content

Commit 92ffdd0

Browse files
feat(api): api update
1 parent 42c2be5 commit 92ffdd0

File tree

5 files changed

+131
-2
lines changed

5 files changed

+131
-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-43f9f952601cef2893cb1f66276d2f820ddaa8f3f628f2787bce991dbae6b079.yml
3-
openapi_spec_hash: dde142c551d19b01bfde45f2616cb7d7
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-aad9dbf54c66e9aa31deefc9ea241e0c1c2155207f61d606e94478bb5d650c38.yml
3+
openapi_spec_hash: f5e641b92f8a3feaefad8bdbc278db77
44
config_hash: 27e44ed36b9c5617b580ead7231a594a

src/PendingTransactions/PendingTransaction/Source.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Increase\Core\Contracts\BaseModel;
1010
use Increase\PendingTransactions\PendingTransaction\Source\AccountTransferInstruction;
1111
use Increase\PendingTransactions\PendingTransaction\Source\ACHTransferInstruction;
12+
use Increase\PendingTransactions\PendingTransaction\Source\BlockchainOfframpTransferInstruction;
1213
use Increase\PendingTransactions\PendingTransaction\Source\BlockchainOfframpTransferIntention;
1314
use Increase\PendingTransactions\PendingTransaction\Source\BlockchainOnrampTransferInstruction;
1415
use Increase\PendingTransactions\PendingTransaction\Source\CardAuthorization;
@@ -29,6 +30,7 @@
2930
*
3031
* @phpstan-import-type AccountTransferInstructionShape from \Increase\PendingTransactions\PendingTransaction\Source\AccountTransferInstruction
3132
* @phpstan-import-type ACHTransferInstructionShape from \Increase\PendingTransactions\PendingTransaction\Source\ACHTransferInstruction
33+
* @phpstan-import-type BlockchainOfframpTransferInstructionShape from \Increase\PendingTransactions\PendingTransaction\Source\BlockchainOfframpTransferInstruction
3234
* @phpstan-import-type BlockchainOfframpTransferIntentionShape from \Increase\PendingTransactions\PendingTransaction\Source\BlockchainOfframpTransferIntention
3335
* @phpstan-import-type BlockchainOnrampTransferInstructionShape from \Increase\PendingTransactions\PendingTransaction\Source\BlockchainOnrampTransferInstruction
3436
* @phpstan-import-type CardAuthorizationShape from \Increase\PendingTransactions\PendingTransaction\Source\CardAuthorization
@@ -46,6 +48,7 @@
4648
* @phpstan-type SourceShape = array{
4749
* accountTransferInstruction: null|AccountTransferInstruction|AccountTransferInstructionShape,
4850
* achTransferInstruction: null|ACHTransferInstruction|ACHTransferInstructionShape,
51+
* blockchainOfframpTransferInstruction: null|BlockchainOfframpTransferInstruction|BlockchainOfframpTransferInstructionShape,
4952
* blockchainOfframpTransferIntention: null|BlockchainOfframpTransferIntention|BlockchainOfframpTransferIntentionShape,
5053
* blockchainOnrampTransferInstruction: null|BlockchainOnrampTransferInstruction|BlockchainOnrampTransferInstructionShape,
5154
* cardAuthorization: null|CardAuthorization|CardAuthorizationShape,
@@ -80,6 +83,12 @@ final class Source implements BaseModel
8083
#[Required('ach_transfer_instruction')]
8184
public ?ACHTransferInstruction $achTransferInstruction;
8285

86+
/**
87+
* A Blockchain Off-Ramp Transfer Instruction object. This field will be present in the JSON response if and only if `category` is equal to `blockchain_offramp_transfer_instruction`.
88+
*/
89+
#[Required('blockchain_offramp_transfer_instruction')]
90+
public ?BlockchainOfframpTransferInstruction $blockchainOfframpTransferInstruction;
91+
8392
/**
8493
* A Blockchain Off-Ramp Transfer Intention object. This field will be present in the JSON response if and only if `category` is equal to `blockchain_offramp_transfer_intention`.
8594
*/
@@ -182,6 +191,7 @@ final class Source implements BaseModel
182191
* Source::with(
183192
* accountTransferInstruction: ...,
184193
* achTransferInstruction: ...,
194+
* blockchainOfframpTransferInstruction: ...,
185195
* blockchainOfframpTransferIntention: ...,
186196
* blockchainOnrampTransferInstruction: ...,
187197
* cardAuthorization: ...,
@@ -206,6 +216,7 @@ final class Source implements BaseModel
206216
* (new Source)
207217
* ->withAccountTransferInstruction(...)
208218
* ->withACHTransferInstruction(...)
219+
* ->withBlockchainOfframpTransferInstruction(...)
209220
* ->withBlockchainOfframpTransferIntention(...)
210221
* ->withBlockchainOnrampTransferInstruction(...)
211222
* ->withCardAuthorization(...)
@@ -235,6 +246,7 @@ public function __construct()
235246
*
236247
* @param AccountTransferInstruction|AccountTransferInstructionShape|null $accountTransferInstruction
237248
* @param ACHTransferInstruction|ACHTransferInstructionShape|null $achTransferInstruction
249+
* @param BlockchainOfframpTransferInstruction|BlockchainOfframpTransferInstructionShape|null $blockchainOfframpTransferInstruction
238250
* @param BlockchainOfframpTransferIntention|BlockchainOfframpTransferIntentionShape|null $blockchainOfframpTransferIntention
239251
* @param BlockchainOnrampTransferInstruction|BlockchainOnrampTransferInstructionShape|null $blockchainOnrampTransferInstruction
240252
* @param CardAuthorization|CardAuthorizationShape|null $cardAuthorization
@@ -254,6 +266,7 @@ public function __construct()
254266
public static function with(
255267
AccountTransferInstruction|array|null $accountTransferInstruction,
256268
ACHTransferInstruction|array|null $achTransferInstruction,
269+
BlockchainOfframpTransferInstruction|array|null $blockchainOfframpTransferInstruction,
257270
BlockchainOfframpTransferIntention|array|null $blockchainOfframpTransferIntention,
258271
BlockchainOnrampTransferInstruction|array|null $blockchainOnrampTransferInstruction,
259272
CardAuthorization|array|null $cardAuthorization,
@@ -274,6 +287,7 @@ public static function with(
274287

275288
$self['accountTransferInstruction'] = $accountTransferInstruction;
276289
$self['achTransferInstruction'] = $achTransferInstruction;
290+
$self['blockchainOfframpTransferInstruction'] = $blockchainOfframpTransferInstruction;
277291
$self['blockchainOfframpTransferIntention'] = $blockchainOfframpTransferIntention;
278292
$self['blockchainOnrampTransferInstruction'] = $blockchainOnrampTransferInstruction;
279293
$self['cardAuthorization'] = $cardAuthorization;
@@ -321,6 +335,20 @@ public function withACHTransferInstruction(
321335
return $self;
322336
}
323337

338+
/**
339+
* A Blockchain Off-Ramp Transfer Instruction object. This field will be present in the JSON response if and only if `category` is equal to `blockchain_offramp_transfer_instruction`.
340+
*
341+
* @param BlockchainOfframpTransferInstruction|BlockchainOfframpTransferInstructionShape|null $blockchainOfframpTransferInstruction
342+
*/
343+
public function withBlockchainOfframpTransferInstruction(
344+
BlockchainOfframpTransferInstruction|array|null $blockchainOfframpTransferInstruction,
345+
): self {
346+
$self = clone $this;
347+
$self['blockchainOfframpTransferInstruction'] = $blockchainOfframpTransferInstruction;
348+
349+
return $self;
350+
}
351+
324352
/**
325353
* A Blockchain Off-Ramp Transfer Intention object. This field will be present in the JSON response if and only if `category` is equal to `blockchain_offramp_transfer_intention`.
326354
*
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Increase\PendingTransactions\PendingTransaction\Source;
6+
7+
use Increase\Core\Attributes\Required;
8+
use Increase\Core\Concerns\SdkModel;
9+
use Increase\Core\Contracts\BaseModel;
10+
11+
/**
12+
* A Blockchain Off-Ramp Transfer Instruction object. This field will be present in the JSON response if and only if `category` is equal to `blockchain_offramp_transfer_instruction`.
13+
*
14+
* @phpstan-type BlockchainOfframpTransferInstructionShape = array{
15+
* sourceBlockchainAddressID: string, transferID: string
16+
* }
17+
*/
18+
final class BlockchainOfframpTransferInstruction implements BaseModel
19+
{
20+
/** @use SdkModel<BlockchainOfframpTransferInstructionShape> */
21+
use SdkModel;
22+
23+
/**
24+
* The identifier of the Blockchain Address the funds were received at.
25+
*/
26+
#[Required('source_blockchain_address_id')]
27+
public string $sourceBlockchainAddressID;
28+
29+
/**
30+
* The identifier of the Blockchain Off-Ramp Transfer that led to this Transaction.
31+
*/
32+
#[Required('transfer_id')]
33+
public string $transferID;
34+
35+
/**
36+
* `new BlockchainOfframpTransferInstruction()` is missing required properties by the API.
37+
*
38+
* To enforce required parameters use
39+
* ```
40+
* BlockchainOfframpTransferInstruction::with(
41+
* sourceBlockchainAddressID: ..., transferID: ...
42+
* )
43+
* ```
44+
*
45+
* Otherwise ensure the following setters are called
46+
*
47+
* ```
48+
* (new BlockchainOfframpTransferInstruction)
49+
* ->withSourceBlockchainAddressID(...)
50+
* ->withTransferID(...)
51+
* ```
52+
*/
53+
public function __construct()
54+
{
55+
$this->initialize();
56+
}
57+
58+
/**
59+
* Construct an instance from the required parameters.
60+
*
61+
* You must use named parameters to construct any parameters with a default value.
62+
*/
63+
public static function with(
64+
string $sourceBlockchainAddressID,
65+
string $transferID
66+
): self {
67+
$self = new self;
68+
69+
$self['sourceBlockchainAddressID'] = $sourceBlockchainAddressID;
70+
$self['transferID'] = $transferID;
71+
72+
return $self;
73+
}
74+
75+
/**
76+
* The identifier of the Blockchain Address the funds were received at.
77+
*/
78+
public function withSourceBlockchainAddressID(
79+
string $sourceBlockchainAddressID
80+
): self {
81+
$self = clone $this;
82+
$self['sourceBlockchainAddressID'] = $sourceBlockchainAddressID;
83+
84+
return $self;
85+
}
86+
87+
/**
88+
* The identifier of the Blockchain Off-Ramp Transfer that led to this Transaction.
89+
*/
90+
public function withTransferID(string $transferID): self
91+
{
92+
$self = clone $this;
93+
$self['transferID'] = $transferID;
94+
95+
return $self;
96+
}
97+
}

src/PendingTransactions/PendingTransaction/Source/Category.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ enum Category: string
3737

3838
case BLOCKCHAIN_ONRAMP_TRANSFER_INSTRUCTION = 'blockchain_onramp_transfer_instruction';
3939

40+
case BLOCKCHAIN_OFFRAMP_TRANSFER_INSTRUCTION = 'blockchain_offramp_transfer_instruction';
41+
4042
case BLOCKCHAIN_OFFRAMP_TRANSFER_INTENTION = 'blockchain_offramp_transfer_intention';
4143

4244
case OTHER = 'other';

src/PendingTransactions/PendingTransactionListParams/Category/In.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ enum In: string
3434

3535
case BLOCKCHAIN_ONRAMP_TRANSFER_INSTRUCTION = 'blockchain_onramp_transfer_instruction';
3636

37+
case BLOCKCHAIN_OFFRAMP_TRANSFER_INSTRUCTION = 'blockchain_offramp_transfer_instruction';
38+
3739
case BLOCKCHAIN_OFFRAMP_TRANSFER_INTENTION = 'blockchain_offramp_transfer_intention';
3840

3941
case OTHER = 'other';

0 commit comments

Comments
 (0)