Skip to content
Merged
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: 355ca6c73f05d0ce3888debdc2e1a7d8
config_hash: 2ae0d8aaecf01b38cbf9f9e112822c23
2 changes: 1 addition & 1 deletion scripts/mock

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions src/ACHTransfers/ACHTransfer/Return_.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* If your transfer is returned, this will contain details of the return.
*
* @phpstan-type ReturnShape = array{
* addendaInformation: string|null,
* createdAt: \DateTimeInterface,
* rawReturnReasonCode: string,
* returnReasonCode: ReturnReasonCode|value-of<ReturnReasonCode>,
Expand All @@ -26,6 +27,12 @@ final class Return_ implements BaseModel
/** @use SdkModel<ReturnShape> */
use SdkModel;

/**
* Additional free-form information included by the receiving bank in the return's addenda record. This is raw, uninterpreted text whose presence and format are not guaranteed. For a `file_record_edit_criteria` (R17) return the receiving bank may set this to `QUESTIONABLE` (optionally followed by more text) to indicate it believes the transfer was initiated under questionable circumstances.
*/
#[Required('addenda_information')]
public ?string $addendaInformation;

/**
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the transfer was created.
*/
Expand Down Expand Up @@ -70,6 +77,7 @@ final class Return_ implements BaseModel
* To enforce required parameters use
* ```
* Return_::with(
* addendaInformation: ...,
* createdAt: ...,
* rawReturnReasonCode: ...,
* returnReasonCode: ...,
Expand All @@ -83,6 +91,7 @@ final class Return_ implements BaseModel
*
* ```
* (new Return_)
* ->withAddendaInformation(...)
* ->withCreatedAt(...)
* ->withRawReturnReasonCode(...)
* ->withReturnReasonCode(...)
Expand All @@ -104,6 +113,7 @@ public function __construct()
* @param ReturnReasonCode|value-of<ReturnReasonCode> $returnReasonCode
*/
public static function with(
?string $addendaInformation,
\DateTimeInterface $createdAt,
string $rawReturnReasonCode,
ReturnReasonCode|string $returnReasonCode,
Expand All @@ -113,6 +123,7 @@ public static function with(
): self {
$self = new self;

$self['addendaInformation'] = $addendaInformation;
$self['createdAt'] = $createdAt;
$self['rawReturnReasonCode'] = $rawReturnReasonCode;
$self['returnReasonCode'] = $returnReasonCode;
Expand All @@ -123,6 +134,17 @@ public static function with(
return $self;
}

/**
* Additional free-form information included by the receiving bank in the return's addenda record. This is raw, uninterpreted text whose presence and format are not guaranteed. For a `file_record_edit_criteria` (R17) return the receiving bank may set this to `QUESTIONABLE` (optionally followed by more text) to indicate it believes the transfer was initiated under questionable circumstances.
*/
public function withAddendaInformation(?string $addendaInformation): self
{
$self = clone $this;
$self['addendaInformation'] = $addendaInformation;

return $self;
}

/**
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the transfer was created.
*/
Expand Down
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
44 changes: 44 additions & 0 deletions src/InboundWireTransfers/InboundWireTransfer.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@
* creditorAddressLine2: string|null,
* creditorAddressLine3: string|null,
* creditorName: string|null,
* debtorAccountNumber: string|null,
* debtorAddressLine1: string|null,
* debtorAddressLine2: string|null,
* debtorAddressLine3: string|null,
* debtorName: string|null,
* debtorRoutingNumber: string|null,
* description: string,
* endToEndIdentification: string|null,
* inputMessageAccountabilityData: string|null,
Expand Down Expand Up @@ -112,6 +114,12 @@ final class InboundWireTransfer implements BaseModel
#[Required('creditor_name')]
public ?string $creditorName;

/**
* The account number of the sender.
*/
#[Required('debtor_account_number')]
public ?string $debtorAccountNumber;

/**
* A free-form address field set by the sender.
*/
Expand All @@ -136,6 +144,12 @@ final class InboundWireTransfer implements BaseModel
#[Required('debtor_name')]
public ?string $debtorName;

/**
* The American Banking Association (ABA) routing number of the sender.
*/
#[Required('debtor_routing_number')]
public ?string $debtorRoutingNumber;

/**
* An Increase-constructed description of the transfer.
*/
Expand Down Expand Up @@ -228,10 +242,12 @@ final class InboundWireTransfer implements BaseModel
* creditorAddressLine2: ...,
* creditorAddressLine3: ...,
* creditorName: ...,
* debtorAccountNumber: ...,
* debtorAddressLine1: ...,
* debtorAddressLine2: ...,
* debtorAddressLine3: ...,
* debtorName: ...,
* debtorRoutingNumber: ...,
* description: ...,
* endToEndIdentification: ...,
* inputMessageAccountabilityData: ...,
Expand Down Expand Up @@ -261,10 +277,12 @@ final class InboundWireTransfer implements BaseModel
* ->withCreditorAddressLine2(...)
* ->withCreditorAddressLine3(...)
* ->withCreditorName(...)
* ->withDebtorAccountNumber(...)
* ->withDebtorAddressLine1(...)
* ->withDebtorAddressLine2(...)
* ->withDebtorAddressLine3(...)
* ->withDebtorName(...)
* ->withDebtorRoutingNumber(...)
* ->withDescription(...)
* ->withEndToEndIdentification(...)
* ->withInputMessageAccountabilityData(...)
Expand Down Expand Up @@ -305,10 +323,12 @@ public static function with(
?string $creditorAddressLine2,
?string $creditorAddressLine3,
?string $creditorName,
?string $debtorAccountNumber,
?string $debtorAddressLine1,
?string $debtorAddressLine2,
?string $debtorAddressLine3,
?string $debtorName,
?string $debtorRoutingNumber,
string $description,
?string $endToEndIdentification,
?string $inputMessageAccountabilityData,
Expand All @@ -334,10 +354,12 @@ public static function with(
$self['creditorAddressLine2'] = $creditorAddressLine2;
$self['creditorAddressLine3'] = $creditorAddressLine3;
$self['creditorName'] = $creditorName;
$self['debtorAccountNumber'] = $debtorAccountNumber;
$self['debtorAddressLine1'] = $debtorAddressLine1;
$self['debtorAddressLine2'] = $debtorAddressLine2;
$self['debtorAddressLine3'] = $debtorAddressLine3;
$self['debtorName'] = $debtorName;
$self['debtorRoutingNumber'] = $debtorRoutingNumber;
$self['description'] = $description;
$self['endToEndIdentification'] = $endToEndIdentification;
$self['inputMessageAccountabilityData'] = $inputMessageAccountabilityData;
Expand Down Expand Up @@ -469,6 +491,17 @@ public function withCreditorName(?string $creditorName): self
return $self;
}

/**
* The account number of the sender.
*/
public function withDebtorAccountNumber(?string $debtorAccountNumber): self
{
$self = clone $this;
$self['debtorAccountNumber'] = $debtorAccountNumber;

return $self;
}

/**
* A free-form address field set by the sender.
*/
Expand Down Expand Up @@ -513,6 +546,17 @@ public function withDebtorName(?string $debtorName): self
return $self;
}

/**
* The American Banking Association (ABA) routing number of the sender.
*/
public function withDebtorRoutingNumber(?string $debtorRoutingNumber): self
{
$self = clone $this;
$self['debtorRoutingNumber'] = $debtorRoutingNumber;

return $self;
}

/**
* An Increase-constructed description of the transfer.
*/
Expand Down
2 changes: 2 additions & 0 deletions src/ServiceContracts/Simulations/ACHTransfersContract.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,15 @@ public function createNotificationOfChange(
* @api
*
* @param string $achTransferID the identifier of the ACH Transfer you wish to return
* @param string $addendaInformation Free-form information the returning bank includes in the return addenda. For a `file_record_edit_criteria` (R17) return, set this to `QUESTIONABLE` to simulate a return the bank believes was initiated under questionable circumstances.
* @param Reason|value-of<Reason> $reason The reason why the Federal Reserve or destination bank returned this transfer. Defaults to `no_account`.
* @param RequestOpts|null $requestOptions
*
* @throws APIException
*/
public function return(
string $achTransferID,
?string $addendaInformation = null,
Reason|string|null $reason = null,
RequestOptions|array|null $requestOptions = null,
): ACHTransfer;
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
4 changes: 3 additions & 1 deletion src/Services/Simulations/ACHTransfersRawService.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ public function createNotificationOfChange(
* Simulates the return of an [ACH Transfer](#ach-transfers) by the Federal Reserve due to an error condition. This will also create a Transaction to account for the returned funds. This transfer must first have a `status` of `submitted`.
*
* @param string $achTransferID the identifier of the ACH Transfer you wish to return
* @param array{reason?: value-of<Reason>}|ACHTransferReturnParams $params
* @param array{
* addendaInformation?: string, reason?: value-of<Reason>
* }|ACHTransferReturnParams $params
* @param RequestOpts|null $requestOptions
*
* @return BaseResponse<ACHTransfer>
Expand Down
6 changes: 5 additions & 1 deletion src/Services/Simulations/ACHTransfersService.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,21 @@ public function createNotificationOfChange(
* Simulates the return of an [ACH Transfer](#ach-transfers) by the Federal Reserve due to an error condition. This will also create a Transaction to account for the returned funds. This transfer must first have a `status` of `submitted`.
*
* @param string $achTransferID the identifier of the ACH Transfer you wish to return
* @param string $addendaInformation Free-form information the returning bank includes in the return addenda. For a `file_record_edit_criteria` (R17) return, set this to `QUESTIONABLE` to simulate a return the bank believes was initiated under questionable circumstances.
* @param Reason|value-of<Reason> $reason The reason why the Federal Reserve or destination bank returned this transfer. Defaults to `no_account`.
* @param RequestOpts|null $requestOptions
*
* @throws APIException
*/
public function return(
string $achTransferID,
?string $addendaInformation = null,
Reason|string|null $reason = null,
RequestOptions|array|null $requestOptions = null,
): ACHTransfer {
$params = Util::removeNulls(['reason' => $reason]);
$params = Util::removeNulls(
['addendaInformation' => $addendaInformation, 'reason' => $reason]
);

// @phpstan-ignore-next-line argument.type
$response = $this->raw->return($achTransferID, params: $params, requestOptions: $requestOptions);
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
Loading