Skip to content

Commit ec4c676

Browse files
feat(api): api update
1 parent 3ae2d84 commit ec4c676

File tree

16 files changed

+598
-2
lines changed

16 files changed

+598
-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-c4cfc1e3f7a08dfe8be37b73f7da951caaff66d967512d5dd15956b908cda488.yml
3-
openapi_spec_hash: 458dc62dd9bc06b1a103e010feca1d9f
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6bf08c859f0104ec8755cac5a5a9e5d106ed3906d49979d9702070bc71384bca.yml
3+
openapi_spec_hash: 2b9cb4a269763fc4e2ea6ad1e8e59283
44
config_hash: 27e44ed36b9c5617b580ead7231a594a

src/EventSubscriptions/EventSubscription/SelectedEventCategory.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@ enum SelectedEventCategory: string
3131

3232
case ACH_TRANSFER_UPDATED = 'ach_transfer.updated';
3333

34+
case BLOCKCHAIN_ADDRESS_CREATED = 'blockchain_address.created';
35+
36+
case BLOCKCHAIN_ADDRESS_UPDATED = 'blockchain_address.updated';
37+
38+
case BLOCKCHAIN_OFFRAMP_TRANSFER_CREATED = 'blockchain_offramp_transfer.created';
39+
40+
case BLOCKCHAIN_OFFRAMP_TRANSFER_UPDATED = 'blockchain_offramp_transfer.updated';
41+
42+
case BLOCKCHAIN_ONRAMP_TRANSFER_CREATED = 'blockchain_onramp_transfer.created';
43+
44+
case BLOCKCHAIN_ONRAMP_TRANSFER_UPDATED = 'blockchain_onramp_transfer.updated';
45+
3446
case BOOKKEEPING_ACCOUNT_CREATED = 'bookkeeping_account.created';
3547

3648
case BOOKKEEPING_ACCOUNT_UPDATED = 'bookkeeping_account.updated';

src/EventSubscriptions/EventSubscriptionCreateParams/SelectedEventCategory.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@ enum SelectedEventCategory: string
3131

3232
case ACH_TRANSFER_UPDATED = 'ach_transfer.updated';
3333

34+
case BLOCKCHAIN_ADDRESS_CREATED = 'blockchain_address.created';
35+
36+
case BLOCKCHAIN_ADDRESS_UPDATED = 'blockchain_address.updated';
37+
38+
case BLOCKCHAIN_OFFRAMP_TRANSFER_CREATED = 'blockchain_offramp_transfer.created';
39+
40+
case BLOCKCHAIN_OFFRAMP_TRANSFER_UPDATED = 'blockchain_offramp_transfer.updated';
41+
42+
case BLOCKCHAIN_ONRAMP_TRANSFER_CREATED = 'blockchain_onramp_transfer.created';
43+
44+
case BLOCKCHAIN_ONRAMP_TRANSFER_UPDATED = 'blockchain_onramp_transfer.updated';
45+
3446
case BOOKKEEPING_ACCOUNT_CREATED = 'bookkeeping_account.created';
3547

3648
case BOOKKEEPING_ACCOUNT_UPDATED = 'bookkeeping_account.updated';

src/Events/Event/Category.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@ enum Category: string
3131

3232
case ACH_TRANSFER_UPDATED = 'ach_transfer.updated';
3333

34+
case BLOCKCHAIN_ADDRESS_CREATED = 'blockchain_address.created';
35+
36+
case BLOCKCHAIN_ADDRESS_UPDATED = 'blockchain_address.updated';
37+
38+
case BLOCKCHAIN_OFFRAMP_TRANSFER_CREATED = 'blockchain_offramp_transfer.created';
39+
40+
case BLOCKCHAIN_OFFRAMP_TRANSFER_UPDATED = 'blockchain_offramp_transfer.updated';
41+
42+
case BLOCKCHAIN_ONRAMP_TRANSFER_CREATED = 'blockchain_onramp_transfer.created';
43+
44+
case BLOCKCHAIN_ONRAMP_TRANSFER_UPDATED = 'blockchain_onramp_transfer.updated';
45+
3446
case BOOKKEEPING_ACCOUNT_CREATED = 'bookkeeping_account.created';
3547

3648
case BOOKKEEPING_ACCOUNT_UPDATED = 'bookkeeping_account.updated';

src/Events/EventListParams/Category/In.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,18 @@ enum In: string
2828

2929
case ACH_TRANSFER_UPDATED = 'ach_transfer.updated';
3030

31+
case BLOCKCHAIN_ADDRESS_CREATED = 'blockchain_address.created';
32+
33+
case BLOCKCHAIN_ADDRESS_UPDATED = 'blockchain_address.updated';
34+
35+
case BLOCKCHAIN_OFFRAMP_TRANSFER_CREATED = 'blockchain_offramp_transfer.created';
36+
37+
case BLOCKCHAIN_OFFRAMP_TRANSFER_UPDATED = 'blockchain_offramp_transfer.updated';
38+
39+
case BLOCKCHAIN_ONRAMP_TRANSFER_CREATED = 'blockchain_onramp_transfer.created';
40+
41+
case BLOCKCHAIN_ONRAMP_TRANSFER_UPDATED = 'blockchain_onramp_transfer.updated';
42+
3143
case BOOKKEEPING_ACCOUNT_CREATED = 'bookkeeping_account.created';
3244

3345
case BOOKKEEPING_ACCOUNT_UPDATED = 'bookkeeping_account.updated';

src/Events/UnwrapWebhookEvent/Category.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@ enum Category: string
3131

3232
case ACH_TRANSFER_UPDATED = 'ach_transfer.updated';
3333

34+
case BLOCKCHAIN_ADDRESS_CREATED = 'blockchain_address.created';
35+
36+
case BLOCKCHAIN_ADDRESS_UPDATED = 'blockchain_address.updated';
37+
38+
case BLOCKCHAIN_OFFRAMP_TRANSFER_CREATED = 'blockchain_offramp_transfer.created';
39+
40+
case BLOCKCHAIN_OFFRAMP_TRANSFER_UPDATED = 'blockchain_offramp_transfer.updated';
41+
42+
case BLOCKCHAIN_ONRAMP_TRANSFER_CREATED = 'blockchain_onramp_transfer.created';
43+
44+
case BLOCKCHAIN_ONRAMP_TRANSFER_UPDATED = 'blockchain_onramp_transfer.updated';
45+
3446
case BOOKKEEPING_ACCOUNT_CREATED = 'bookkeeping_account.created';
3547

3648
case BOOKKEEPING_ACCOUNT_UPDATED = 'bookkeeping_account.updated';

src/PendingTransactions/PendingTransaction/Source.php

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
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\BlockchainOfframpTransferIntention;
13+
use Increase\PendingTransactions\PendingTransaction\Source\BlockchainOnrampTransferInstruction;
1214
use Increase\PendingTransactions\PendingTransaction\Source\CardAuthorization;
1315
use Increase\PendingTransactions\PendingTransaction\Source\CardPushTransferInstruction;
1416
use Increase\PendingTransactions\PendingTransaction\Source\Category;
@@ -27,6 +29,8 @@
2729
*
2830
* @phpstan-import-type AccountTransferInstructionShape from \Increase\PendingTransactions\PendingTransaction\Source\AccountTransferInstruction
2931
* @phpstan-import-type ACHTransferInstructionShape from \Increase\PendingTransactions\PendingTransaction\Source\ACHTransferInstruction
32+
* @phpstan-import-type BlockchainOfframpTransferIntentionShape from \Increase\PendingTransactions\PendingTransaction\Source\BlockchainOfframpTransferIntention
33+
* @phpstan-import-type BlockchainOnrampTransferInstructionShape from \Increase\PendingTransactions\PendingTransaction\Source\BlockchainOnrampTransferInstruction
3034
* @phpstan-import-type CardAuthorizationShape from \Increase\PendingTransactions\PendingTransaction\Source\CardAuthorization
3135
* @phpstan-import-type CardPushTransferInstructionShape from \Increase\PendingTransactions\PendingTransaction\Source\CardPushTransferInstruction
3236
* @phpstan-import-type CheckDepositInstructionShape from \Increase\PendingTransactions\PendingTransaction\Source\CheckDepositInstruction
@@ -42,6 +46,8 @@
4246
* @phpstan-type SourceShape = array{
4347
* accountTransferInstruction: null|AccountTransferInstruction|AccountTransferInstructionShape,
4448
* achTransferInstruction: null|ACHTransferInstruction|ACHTransferInstructionShape,
49+
* blockchainOfframpTransferIntention: null|BlockchainOfframpTransferIntention|BlockchainOfframpTransferIntentionShape,
50+
* blockchainOnrampTransferInstruction: null|BlockchainOnrampTransferInstruction|BlockchainOnrampTransferInstructionShape,
4551
* cardAuthorization: null|CardAuthorization|CardAuthorizationShape,
4652
* cardPushTransferInstruction: null|CardPushTransferInstruction|CardPushTransferInstructionShape,
4753
* category: Category|value-of<Category>,
@@ -74,6 +80,18 @@ final class Source implements BaseModel
7480
#[Required('ach_transfer_instruction')]
7581
public ?ACHTransferInstruction $achTransferInstruction;
7682

83+
/**
84+
* 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`.
85+
*/
86+
#[Required('blockchain_offramp_transfer_intention')]
87+
public ?BlockchainOfframpTransferIntention $blockchainOfframpTransferIntention;
88+
89+
/**
90+
* A Blockchain On-Ramp Transfer Instruction object. This field will be present in the JSON response if and only if `category` is equal to `blockchain_onramp_transfer_instruction`.
91+
*/
92+
#[Required('blockchain_onramp_transfer_instruction')]
93+
public ?BlockchainOnrampTransferInstruction $blockchainOnrampTransferInstruction;
94+
7795
/**
7896
* A Card Authorization object. This field will be present in the JSON response if and only if `category` is equal to `card_authorization`. Card Authorizations are temporary holds placed on a customers funds with the intent to later clear a transaction.
7997
*/
@@ -164,6 +182,8 @@ final class Source implements BaseModel
164182
* Source::with(
165183
* accountTransferInstruction: ...,
166184
* achTransferInstruction: ...,
185+
* blockchainOfframpTransferIntention: ...,
186+
* blockchainOnrampTransferInstruction: ...,
167187
* cardAuthorization: ...,
168188
* cardPushTransferInstruction: ...,
169189
* category: ...,
@@ -186,6 +206,8 @@ final class Source implements BaseModel
186206
* (new Source)
187207
* ->withAccountTransferInstruction(...)
188208
* ->withACHTransferInstruction(...)
209+
* ->withBlockchainOfframpTransferIntention(...)
210+
* ->withBlockchainOnrampTransferInstruction(...)
189211
* ->withCardAuthorization(...)
190212
* ->withCardPushTransferInstruction(...)
191213
* ->withCategory(...)
@@ -213,6 +235,8 @@ public function __construct()
213235
*
214236
* @param AccountTransferInstruction|AccountTransferInstructionShape|null $accountTransferInstruction
215237
* @param ACHTransferInstruction|ACHTransferInstructionShape|null $achTransferInstruction
238+
* @param BlockchainOfframpTransferIntention|BlockchainOfframpTransferIntentionShape|null $blockchainOfframpTransferIntention
239+
* @param BlockchainOnrampTransferInstruction|BlockchainOnrampTransferInstructionShape|null $blockchainOnrampTransferInstruction
216240
* @param CardAuthorization|CardAuthorizationShape|null $cardAuthorization
217241
* @param CardPushTransferInstruction|CardPushTransferInstructionShape|null $cardPushTransferInstruction
218242
* @param Category|value-of<Category> $category
@@ -230,6 +254,8 @@ public function __construct()
230254
public static function with(
231255
AccountTransferInstruction|array|null $accountTransferInstruction,
232256
ACHTransferInstruction|array|null $achTransferInstruction,
257+
BlockchainOfframpTransferIntention|array|null $blockchainOfframpTransferIntention,
258+
BlockchainOnrampTransferInstruction|array|null $blockchainOnrampTransferInstruction,
233259
CardAuthorization|array|null $cardAuthorization,
234260
CardPushTransferInstruction|array|null $cardPushTransferInstruction,
235261
Category|string $category,
@@ -248,6 +274,8 @@ public static function with(
248274

249275
$self['accountTransferInstruction'] = $accountTransferInstruction;
250276
$self['achTransferInstruction'] = $achTransferInstruction;
277+
$self['blockchainOfframpTransferIntention'] = $blockchainOfframpTransferIntention;
278+
$self['blockchainOnrampTransferInstruction'] = $blockchainOnrampTransferInstruction;
251279
$self['cardAuthorization'] = $cardAuthorization;
252280
$self['cardPushTransferInstruction'] = $cardPushTransferInstruction;
253281
$self['category'] = $category;
@@ -293,6 +321,34 @@ public function withACHTransferInstruction(
293321
return $self;
294322
}
295323

324+
/**
325+
* 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`.
326+
*
327+
* @param BlockchainOfframpTransferIntention|BlockchainOfframpTransferIntentionShape|null $blockchainOfframpTransferIntention
328+
*/
329+
public function withBlockchainOfframpTransferIntention(
330+
BlockchainOfframpTransferIntention|array|null $blockchainOfframpTransferIntention,
331+
): self {
332+
$self = clone $this;
333+
$self['blockchainOfframpTransferIntention'] = $blockchainOfframpTransferIntention;
334+
335+
return $self;
336+
}
337+
338+
/**
339+
* A Blockchain On-Ramp Transfer Instruction object. This field will be present in the JSON response if and only if `category` is equal to `blockchain_onramp_transfer_instruction`.
340+
*
341+
* @param BlockchainOnrampTransferInstruction|BlockchainOnrampTransferInstructionShape|null $blockchainOnrampTransferInstruction
342+
*/
343+
public function withBlockchainOnrampTransferInstruction(
344+
BlockchainOnrampTransferInstruction|array|null $blockchainOnrampTransferInstruction,
345+
): self {
346+
$self = clone $this;
347+
$self['blockchainOnrampTransferInstruction'] = $blockchainOnrampTransferInstruction;
348+
349+
return $self;
350+
}
351+
296352
/**
297353
* A Card Authorization object. This field will be present in the JSON response if and only if `category` is equal to `card_authorization`. Card Authorizations are temporary holds placed on a customers funds with the intent to later clear a transaction.
298354
*
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 Intention object. This field will be present in the JSON response if and only if `category` is equal to `blockchain_offramp_transfer_intention`.
13+
*
14+
* @phpstan-type BlockchainOfframpTransferIntentionShape = array{
15+
* sourceBlockchainAddressID: string, transferID: string
16+
* }
17+
*/
18+
final class BlockchainOfframpTransferIntention implements BaseModel
19+
{
20+
/** @use SdkModel<BlockchainOfframpTransferIntentionShape> */
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 BlockchainOfframpTransferIntention()` is missing required properties by the API.
37+
*
38+
* To enforce required parameters use
39+
* ```
40+
* BlockchainOfframpTransferIntention::with(
41+
* sourceBlockchainAddressID: ..., transferID: ...
42+
* )
43+
* ```
44+
*
45+
* Otherwise ensure the following setters are called
46+
*
47+
* ```
48+
* (new BlockchainOfframpTransferIntention)
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+
}

0 commit comments

Comments
 (0)