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: 221d41155971e50d1b2eea5a2330771c
config_hash: 2ae0d8aaecf01b38cbf9f9e112822c23
2 changes: 1 addition & 1 deletion scripts/mock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/CheckTransfers/CheckTransfer/PhysicalCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ final class PhysicalCheck implements BaseModel
public Signature $signature;

/**
* Tracking updates relating to the physical check's delivery.
* Tracking updates relating to the physical check's delivery. Sorted by `created_at` in ascending order.
*
* @var list<TrackingUpdate> $trackingUpdates
*/
Expand Down Expand Up @@ -345,7 +345,7 @@ public function withSignature(Signature|array $signature): self
}

/**
* Tracking updates relating to the physical check's delivery.
* Tracking updates relating to the physical check's delivery. Sorted by `created_at` in ascending order.
*
* @param list<TrackingUpdate|TrackingUpdateShape> $trackingUpdates
*/
Expand Down
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
6 changes: 3 additions & 3 deletions src/ServiceContracts/Simulations/CardSettlementsContract.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ interface CardSettlementsContract
* @api
*
* @param string $cardID the identifier of the Card to create a settlement on
* @param string $pendingTransactionID the identifier of the Pending Transaction for the Card Authorization you wish to settle
* @param int $amount The amount to be settled. This defaults to the amount of the Pending Transaction being settled.
* @param int $amount The amount to be settled. This defaults to the amount of the Pending Transaction being settled, or a random amount if `pending_transaction_id` is not provided.
* @param string $pendingTransactionID The identifier of the Pending Transaction for the Card Authorization you wish to settle. If not provided, the settlement will be force posted without a Card Authorization.
* @param RequestOpts|null $requestOptions
*
* @throws APIException
*/
public function create(
string $cardID,
string $pendingTransactionID,
?int $amount = null,
?string $pendingTransactionID = null,
RequestOptions|array|null $requestOptions = null,
): Transaction;
}
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
2 changes: 1 addition & 1 deletion src/Services/Simulations/CardSettlementsRawService.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function __construct(private Client $client) {}
* Simulates the settlement of an authorization by a card acquirer. After a card authorization is created, the merchant will eventually send a settlement. This simulates that event, which may occur many days after the purchase in production. The amount settled can be different from the amount originally authorized, for example, when adding a tip to a restaurant bill.
*
* @param array{
* cardID: string, pendingTransactionID: string, amount?: int
* cardID: string, amount?: int, pendingTransactionID?: string
* }|CardSettlementCreateParams $params
* @param RequestOpts|null $requestOptions
*
Expand Down
8 changes: 4 additions & 4 deletions src/Services/Simulations/CardSettlementsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,23 @@ public function __construct(private Client $client)
* Simulates the settlement of an authorization by a card acquirer. After a card authorization is created, the merchant will eventually send a settlement. This simulates that event, which may occur many days after the purchase in production. The amount settled can be different from the amount originally authorized, for example, when adding a tip to a restaurant bill.
*
* @param string $cardID the identifier of the Card to create a settlement on
* @param string $pendingTransactionID the identifier of the Pending Transaction for the Card Authorization you wish to settle
* @param int $amount The amount to be settled. This defaults to the amount of the Pending Transaction being settled.
* @param int $amount The amount to be settled. This defaults to the amount of the Pending Transaction being settled, or a random amount if `pending_transaction_id` is not provided.
* @param string $pendingTransactionID The identifier of the Pending Transaction for the Card Authorization you wish to settle. If not provided, the settlement will be force posted without a Card Authorization.
* @param RequestOpts|null $requestOptions
*
* @throws APIException
*/
public function create(
string $cardID,
string $pendingTransactionID,
?int $amount = null,
?string $pendingTransactionID = null,
RequestOptions|array|null $requestOptions = null,
): Transaction {
$params = Util::removeNulls(
[
'cardID' => $cardID,
'pendingTransactionID' => $pendingTransactionID,
'amount' => $amount,
'pendingTransactionID' => $pendingTransactionID,
],
);

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
36 changes: 18 additions & 18 deletions src/Simulations/CardSettlements/CardSettlementCreateParams.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @see Increase\Services\Simulations\CardSettlementsService::create()
*
* @phpstan-type CardSettlementCreateParamsShape = array{
* cardID: string, pendingTransactionID: string, amount?: int|null
* cardID: string, amount?: int|null, pendingTransactionID?: string|null
* }
*/
final class CardSettlementCreateParams implements BaseModel
Expand All @@ -32,29 +32,29 @@ final class CardSettlementCreateParams implements BaseModel
public string $cardID;

/**
* The identifier of the Pending Transaction for the Card Authorization you wish to settle.
* The amount to be settled. This defaults to the amount of the Pending Transaction being settled, or a random amount if `pending_transaction_id` is not provided.
*/
#[Required('pending_transaction_id')]
public string $pendingTransactionID;
#[Optional]
public ?int $amount;

/**
* The amount to be settled. This defaults to the amount of the Pending Transaction being settled.
* The identifier of the Pending Transaction for the Card Authorization you wish to settle. If not provided, the settlement will be force posted without a Card Authorization.
*/
#[Optional]
public ?int $amount;
#[Optional('pending_transaction_id')]
public ?string $pendingTransactionID;

/**
* `new CardSettlementCreateParams()` is missing required properties by the API.
*
* To enforce required parameters use
* ```
* CardSettlementCreateParams::with(cardID: ..., pendingTransactionID: ...)
* CardSettlementCreateParams::with(cardID: ...)
* ```
*
* Otherwise ensure the following setters are called
*
* ```
* (new CardSettlementCreateParams)->withCardID(...)->withPendingTransactionID(...)
* (new CardSettlementCreateParams)->withCardID(...)
* ```
*/
public function __construct()
Expand All @@ -69,15 +69,15 @@ public function __construct()
*/
public static function with(
string $cardID,
string $pendingTransactionID,
?int $amount = null
?int $amount = null,
?string $pendingTransactionID = null
): self {
$self = new self;

$self['cardID'] = $cardID;
$self['pendingTransactionID'] = $pendingTransactionID;

null !== $amount && $self['amount'] = $amount;
null !== $pendingTransactionID && $self['pendingTransactionID'] = $pendingTransactionID;

return $self;
}
Expand All @@ -94,23 +94,23 @@ public function withCardID(string $cardID): self
}

/**
* The identifier of the Pending Transaction for the Card Authorization you wish to settle.
* The amount to be settled. This defaults to the amount of the Pending Transaction being settled, or a random amount if `pending_transaction_id` is not provided.
*/
public function withPendingTransactionID(string $pendingTransactionID): self
public function withAmount(int $amount): self
{
$self = clone $this;
$self['pendingTransactionID'] = $pendingTransactionID;
$self['amount'] = $amount;

return $self;
}

/**
* The amount to be settled. This defaults to the amount of the Pending Transaction being settled.
* The identifier of the Pending Transaction for the Card Authorization you wish to settle. If not provided, the settlement will be force posted without a Card Authorization.
*/
public function withAmount(int $amount): self
public function withPendingTransactionID(string $pendingTransactionID): self
{
$self = clone $this;
$self['amount'] = $amount;
$self['pendingTransactionID'] = $pendingTransactionID;

return $self;
}
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
Loading