Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
configured_endpoints: 238
openapi_spec_hash: 244db0c7a39ae8fff699dccda50b79bd
openapi_spec_hash: 8c5c450ddcb19e4c6c8937d36f337c8b
config_hash: 2ae0d8aaecf01b38cbf9f9e112822c23
2 changes: 1 addition & 1 deletion scripts/mock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ public function __construct(
'Accept' => 'application/json',
'User-Agent' => sprintf('increase/PHP %s', VERSION),
'X-Stainless-Lang' => 'php',
'X-Stainless-Package-Version' => '0.138.0',
'X-Stainless-Package-Version' => '0.139.0',
'X-Stainless-Arch' => Util::machtype(),
'X-Stainless-OS' => Util::ostype(),
'X-Stainless-Runtime' => php_sapi_name(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ enum EventCategory: string

case INBOUND_MAIL_ITEM_UPDATED = 'inbound_mail_item.updated';

case INBOUND_REAL_TIME_PAYMENTS_REQUEST_FOR_PAYMENT_CREATED = 'inbound_real_time_payments_request_for_payment.created';

case INBOUND_REAL_TIME_PAYMENTS_REQUEST_FOR_PAYMENT_UPDATED = 'inbound_real_time_payments_request_for_payment.updated';

case INBOUND_REAL_TIME_PAYMENTS_TRANSFER_CREATED = 'inbound_real_time_payments_transfer.created';

case INBOUND_REAL_TIME_PAYMENTS_TRANSFER_UPDATED = 'inbound_real_time_payments_transfer.updated';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ enum EventCategory: string

case INBOUND_MAIL_ITEM_UPDATED = 'inbound_mail_item.updated';

case INBOUND_REAL_TIME_PAYMENTS_REQUEST_FOR_PAYMENT_CREATED = 'inbound_real_time_payments_request_for_payment.created';

case INBOUND_REAL_TIME_PAYMENTS_REQUEST_FOR_PAYMENT_UPDATED = 'inbound_real_time_payments_request_for_payment.updated';

case INBOUND_REAL_TIME_PAYMENTS_TRANSFER_CREATED = 'inbound_real_time_payments_transfer.created';

case INBOUND_REAL_TIME_PAYMENTS_TRANSFER_UPDATED = 'inbound_real_time_payments_transfer.updated';
Expand Down
4 changes: 4 additions & 0 deletions src/Events/Event/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ enum Category: string

case INBOUND_MAIL_ITEM_UPDATED = 'inbound_mail_item.updated';

case INBOUND_REAL_TIME_PAYMENTS_REQUEST_FOR_PAYMENT_CREATED = 'inbound_real_time_payments_request_for_payment.created';

case INBOUND_REAL_TIME_PAYMENTS_REQUEST_FOR_PAYMENT_UPDATED = 'inbound_real_time_payments_request_for_payment.updated';

case INBOUND_REAL_TIME_PAYMENTS_TRANSFER_CREATED = 'inbound_real_time_payments_transfer.created';

case INBOUND_REAL_TIME_PAYMENTS_TRANSFER_UPDATED = 'inbound_real_time_payments_transfer.updated';
Expand Down
4 changes: 4 additions & 0 deletions src/Events/EventListParams/Category/In.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ enum In: string

case INBOUND_MAIL_ITEM_UPDATED = 'inbound_mail_item.updated';

case INBOUND_REAL_TIME_PAYMENTS_REQUEST_FOR_PAYMENT_CREATED = 'inbound_real_time_payments_request_for_payment.created';

case INBOUND_REAL_TIME_PAYMENTS_REQUEST_FOR_PAYMENT_UPDATED = 'inbound_real_time_payments_request_for_payment.updated';

case INBOUND_REAL_TIME_PAYMENTS_TRANSFER_CREATED = 'inbound_real_time_payments_transfer.created';

case INBOUND_REAL_TIME_PAYMENTS_TRANSFER_UPDATED = 'inbound_real_time_payments_transfer.updated';
Expand Down
4 changes: 4 additions & 0 deletions src/Events/UnwrapWebhookEvent/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ enum Category: string

case INBOUND_MAIL_ITEM_UPDATED = 'inbound_mail_item.updated';

case INBOUND_REAL_TIME_PAYMENTS_REQUEST_FOR_PAYMENT_CREATED = 'inbound_real_time_payments_request_for_payment.created';

case INBOUND_REAL_TIME_PAYMENTS_REQUEST_FOR_PAYMENT_UPDATED = 'inbound_real_time_payments_request_for_payment.updated';

case INBOUND_REAL_TIME_PAYMENTS_TRANSFER_CREATED = 'inbound_real_time_payments_transfer.created';

case INBOUND_REAL_TIME_PAYMENTS_TRANSFER_UPDATED = 'inbound_real_time_payments_transfer.updated';
Expand Down
2 changes: 2 additions & 0 deletions src/ServiceContracts/SwiftTransfersContract.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ interface SwiftTransfersContract
* @param InstructedCurrency|value-of<InstructedCurrency> $instructedCurrency The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code of the instructed amount.
* @param string $sourceAccountNumberID the Account Number to include in the transfer as the debtor's account number
* @param string $unstructuredRemittanceInformation unstructured remittance information to include in the transfer
* @param string $intermediaryBankIdentificationCode the bank identification code (BIC) of the intermediary bank, if the transfer should be routed through one
* @param bool $requireApproval whether the transfer requires explicit approval via the dashboard or API
* @param string $routingNumber The creditor's bank account routing or transit number. Required in certain countries.
* @param RequestOpts|null $requestOptions
Expand All @@ -55,6 +56,7 @@ public function create(
InstructedCurrency|string $instructedCurrency,
string $sourceAccountNumberID,
string $unstructuredRemittanceInformation,
?string $intermediaryBankIdentificationCode = null,
?bool $requireApproval = null,
?string $routingNumber = null,
RequestOptions|array|null $requestOptions = null,
Expand Down
1 change: 1 addition & 0 deletions src/Services/SwiftTransfersRawService.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public function __construct(private Client $client) {}
* instructedCurrency: InstructedCurrency|value-of<InstructedCurrency>,
* sourceAccountNumberID: string,
* unstructuredRemittanceInformation: string,
* intermediaryBankIdentificationCode?: string,
* requireApproval?: bool,
* routingNumber?: string,
* }|SwiftTransferCreateParams $params
Expand Down
3 changes: 3 additions & 0 deletions src/Services/SwiftTransfersService.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public function __construct(private Client $client)
* @param InstructedCurrency|value-of<InstructedCurrency> $instructedCurrency The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code of the instructed amount.
* @param string $sourceAccountNumberID the Account Number to include in the transfer as the debtor's account number
* @param string $unstructuredRemittanceInformation unstructured remittance information to include in the transfer
* @param string $intermediaryBankIdentificationCode the bank identification code (BIC) of the intermediary bank, if the transfer should be routed through one
* @param bool $requireApproval whether the transfer requires explicit approval via the dashboard or API
* @param string $routingNumber The creditor's bank account routing or transit number. Required in certain countries.
* @param RequestOpts|null $requestOptions
Expand All @@ -73,6 +74,7 @@ public function create(
InstructedCurrency|string $instructedCurrency,
string $sourceAccountNumberID,
string $unstructuredRemittanceInformation,
?string $intermediaryBankIdentificationCode = null,
?bool $requireApproval = null,
?string $routingNumber = null,
RequestOptions|array|null $requestOptions = null,
Expand All @@ -90,6 +92,7 @@ public function create(
'instructedCurrency' => $instructedCurrency,
'sourceAccountNumberID' => $sourceAccountNumberID,
'unstructuredRemittanceInformation' => $unstructuredRemittanceInformation,
'intermediaryBankIdentificationCode' => $intermediaryBankIdentificationCode,
'requireApproval' => $requireApproval,
'routingNumber' => $routingNumber,
],
Expand Down
2 changes: 0 additions & 2 deletions src/Simulations/Programs/ProgramCreateParams/Bank.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@ enum Bank: string
case FIRST_INTERNET_BANK = 'first_internet_bank';

case GRASSHOPPER_BANK = 'grasshopper_bank';

case TWIN_CITY_BANK = 'twin_city_bank';
}
23 changes: 23 additions & 0 deletions src/SwiftTransfers/SwiftTransfer.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
* idempotencyKey: string|null,
* instructedAmount: int,
* instructedCurrency: InstructedCurrency|value-of<InstructedCurrency>,
* intermediaryBankIdentificationCode: string|null,
* pendingTransactionID: string|null,
* routingNumber: string|null,
* sourceAccountNumberID: string,
Expand Down Expand Up @@ -137,6 +138,12 @@ final class SwiftTransfer implements BaseModel
#[Required('instructed_currency', enum: InstructedCurrency::class)]
public string $instructedCurrency;

/**
* The bank identification code (BIC) of the intermediary bank, if the transfer is routed through one.
*/
#[Required('intermediary_bank_identification_code')]
public ?string $intermediaryBankIdentificationCode;

/**
* The ID for the pending transaction representing the transfer.
*/
Expand Down Expand Up @@ -209,6 +216,7 @@ final class SwiftTransfer implements BaseModel
* idempotencyKey: ...,
* instructedAmount: ...,
* instructedCurrency: ...,
* intermediaryBankIdentificationCode: ...,
* pendingTransactionID: ...,
* routingNumber: ...,
* sourceAccountNumberID: ...,
Expand Down Expand Up @@ -238,6 +246,7 @@ final class SwiftTransfer implements BaseModel
* ->withIdempotencyKey(...)
* ->withInstructedAmount(...)
* ->withInstructedCurrency(...)
* ->withIntermediaryBankIdentificationCode(...)
* ->withPendingTransactionID(...)
* ->withRoutingNumber(...)
* ->withSourceAccountNumberID(...)
Expand Down Expand Up @@ -280,6 +289,7 @@ public static function with(
?string $idempotencyKey,
int $instructedAmount,
InstructedCurrency|string $instructedCurrency,
?string $intermediaryBankIdentificationCode,
?string $pendingTransactionID,
?string $routingNumber,
string $sourceAccountNumberID,
Expand All @@ -305,6 +315,7 @@ public static function with(
$self['idempotencyKey'] = $idempotencyKey;
$self['instructedAmount'] = $instructedAmount;
$self['instructedCurrency'] = $instructedCurrency;
$self['intermediaryBankIdentificationCode'] = $intermediaryBankIdentificationCode;
$self['pendingTransactionID'] = $pendingTransactionID;
$self['routingNumber'] = $routingNumber;
$self['sourceAccountNumberID'] = $sourceAccountNumberID;
Expand Down Expand Up @@ -482,6 +493,18 @@ public function withInstructedCurrency(
return $self;
}

/**
* The bank identification code (BIC) of the intermediary bank, if the transfer is routed through one.
*/
public function withIntermediaryBankIdentificationCode(
?string $intermediaryBankIdentificationCode
): self {
$self = clone $this;
$self['intermediaryBankIdentificationCode'] = $intermediaryBankIdentificationCode;

return $self;
}

/**
* The ID for the pending transaction representing the transfer.
*/
Expand Down
21 changes: 21 additions & 0 deletions src/SwiftTransfers/SwiftTransferCreateParams.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
* instructedCurrency: InstructedCurrency|value-of<InstructedCurrency>,
* sourceAccountNumberID: string,
* unstructuredRemittanceInformation: string,
* intermediaryBankIdentificationCode?: string|null,
* requireApproval?: bool|null,
* routingNumber?: string|null,
* }
Expand Down Expand Up @@ -111,6 +112,12 @@ final class SwiftTransferCreateParams implements BaseModel
#[Required('unstructured_remittance_information')]
public string $unstructuredRemittanceInformation;

/**
* The bank identification code (BIC) of the intermediary bank, if the transfer should be routed through one.
*/
#[Optional('intermediary_bank_identification_code')]
public ?string $intermediaryBankIdentificationCode;

/**
* Whether the transfer requires explicit approval via the dashboard or API.
*/
Expand Down Expand Up @@ -186,6 +193,7 @@ public static function with(
InstructedCurrency|string $instructedCurrency,
string $sourceAccountNumberID,
string $unstructuredRemittanceInformation,
?string $intermediaryBankIdentificationCode = null,
?bool $requireApproval = null,
?string $routingNumber = null,
): self {
Expand All @@ -203,6 +211,7 @@ public static function with(
$self['sourceAccountNumberID'] = $sourceAccountNumberID;
$self['unstructuredRemittanceInformation'] = $unstructuredRemittanceInformation;

null !== $intermediaryBankIdentificationCode && $self['intermediaryBankIdentificationCode'] = $intermediaryBankIdentificationCode;
null !== $requireApproval && $self['requireApproval'] = $requireApproval;
null !== $routingNumber && $self['routingNumber'] = $routingNumber;

Expand Down Expand Up @@ -341,6 +350,18 @@ public function withUnstructuredRemittanceInformation(
return $self;
}

/**
* The bank identification code (BIC) of the intermediary bank, if the transfer should be routed through one.
*/
public function withIntermediaryBankIdentificationCode(
string $intermediaryBankIdentificationCode
): self {
$self = clone $this;
$self['intermediaryBankIdentificationCode'] = $intermediaryBankIdentificationCode;

return $self;
}

/**
* Whether the transfer requires explicit approval via the dashboard or API.
*/
Expand Down
1 change: 1 addition & 0 deletions tests/Services/SwiftTransfersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ public function testCreateWithOptionalParams(): void
instructedCurrency: 'USD',
sourceAccountNumberID: 'account_number_v18nkfqm6afpsrvy82b2',
unstructuredRemittanceInformation: 'New Swift transfer',
intermediaryBankIdentificationCode: '210BF73A',
requireApproval: true,
routingNumber: 'sq',
);
Expand Down