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 .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.33.0"
".": "0.34.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 232
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1127bb6ee64bebab1bbf8ecbd9ec71c0deb5ca8552fd454fa2ec120fd9eac14a.yml
openapi_spec_hash: 9fedc9dc133202e4d39bf7bffe4839d9
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7da80155087dd9d883acaa10229e34ed5a3097f884c77b5f28c4c76a62b82432.yml
openapi_spec_hash: c5050ba45eb587316583060c1efef8a8
config_hash: 4b562e97b3d8b4cba758a87d4927a76d
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.34.0 (2026-02-18)

Full Changelog: [v0.33.0...v0.34.0](https://github.com/Increase/increase-php/compare/v0.33.0...v0.34.0)

### Features

* **api:** api update ([fd8f0ad](https://github.com/Increase/increase-php/commit/fd8f0adbe99ad84db09c150f8651be01a3ea0f6f))

## 0.33.0 (2026-02-14)

Full Changelog: [v0.32.0...v0.33.0](https://github.com/Increase/increase-php/compare/v0.32.0...v0.33.0)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The REST API documentation can be found on [increase.com](https://increase.com/d
<!-- x-release-please-start-version -->

```
composer require "increase/increase 0.33.0"
composer require "increase/increase 0.34.0"
```

<!-- x-release-please-end -->
Expand Down
6 changes: 5 additions & 1 deletion src/ServiceContracts/Simulations/CheckDepositsContract.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
use Increase\CheckDeposits\CheckDeposit;
use Increase\Core\Exceptions\APIException;
use Increase\RequestOptions;
use Increase\Simulations\CheckDeposits\CheckDepositSubmitParams\Scan;

/**
* @phpstan-import-type ScanShape from \Increase\Simulations\CheckDeposits\CheckDepositSubmitParams\Scan
* @phpstan-import-type RequestOpts from \Increase\RequestOptions
*/
interface CheckDepositsContract
Expand Down Expand Up @@ -43,12 +45,14 @@ public function return(
* @api
*
* @param string $checkDepositID the identifier of the Check Deposit you wish to submit
* @param Scan|ScanShape $scan if set, the simulation will use these values for the check's scanned MICR data
* @param RequestOpts|null $requestOptions
*
* @throws APIException
*/
public function submit(
string $checkDepositID,
RequestOptions|array|null $requestOptions = null
Scan|array|null $scan = null,
RequestOptions|array|null $requestOptions = null,
): CheckDeposit;
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Increase\Core\Contracts\BaseResponse;
use Increase\Core\Exceptions\APIException;
use Increase\RequestOptions;
use Increase\Simulations\CheckDeposits\CheckDepositSubmitParams;

/**
* @phpstan-import-type RequestOpts from \Increase\RequestOptions
Expand Down Expand Up @@ -48,6 +49,7 @@ public function return(
* @api
*
* @param string $checkDepositID the identifier of the Check Deposit you wish to submit
* @param array<string,mixed>|CheckDepositSubmitParams $params
* @param RequestOpts|null $requestOptions
*
* @return BaseResponse<CheckDeposit>
Expand All @@ -56,6 +58,7 @@ public function return(
*/
public function submit(
string $checkDepositID,
RequestOptions|array|null $requestOptions = null
array|CheckDepositSubmitParams $params,
RequestOptions|array|null $requestOptions = null,
): BaseResponse;
}
15 changes: 13 additions & 2 deletions src/Services/Simulations/CheckDepositsRawService.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@
use Increase\Core\Exceptions\APIException;
use Increase\RequestOptions;
use Increase\ServiceContracts\Simulations\CheckDepositsRawContract;
use Increase\Simulations\CheckDeposits\CheckDepositSubmitParams;
use Increase\Simulations\CheckDeposits\CheckDepositSubmitParams\Scan;

/**
* @phpstan-import-type ScanShape from \Increase\Simulations\CheckDeposits\CheckDepositSubmitParams\Scan
* @phpstan-import-type RequestOpts from \Increase\RequestOptions
*/
final class CheckDepositsRawService implements CheckDepositsRawContract
Expand Down Expand Up @@ -78,6 +81,7 @@ public function return(
* Simulates the submission of a [Check Deposit](#check-deposits) to the Federal Reserve. This Check Deposit must first have a `status` of `pending`.
*
* @param string $checkDepositID the identifier of the Check Deposit you wish to submit
* @param array{scan?: Scan|ScanShape}|CheckDepositSubmitParams $params
* @param RequestOpts|null $requestOptions
*
* @return BaseResponse<CheckDeposit>
Expand All @@ -86,13 +90,20 @@ public function return(
*/
public function submit(
string $checkDepositID,
RequestOptions|array|null $requestOptions = null
array|CheckDepositSubmitParams $params,
RequestOptions|array|null $requestOptions = null,
): BaseResponse {
[$parsed, $options] = CheckDepositSubmitParams::parseRequest(
$params,
$requestOptions,
);

// @phpstan-ignore-next-line return.type
return $this->client->request(
method: 'post',
path: ['simulations/check_deposits/%1$s/submit', $checkDepositID],
options: $requestOptions,
body: (object) $parsed,
options: $options,
convert: CheckDeposit::class,
);
}
Expand Down
11 changes: 9 additions & 2 deletions src/Services/Simulations/CheckDepositsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@
use Increase\CheckDeposits\CheckDeposit;
use Increase\Client;
use Increase\Core\Exceptions\APIException;
use Increase\Core\Util;
use Increase\RequestOptions;
use Increase\ServiceContracts\Simulations\CheckDepositsContract;
use Increase\Simulations\CheckDeposits\CheckDepositSubmitParams\Scan;

/**
* @phpstan-import-type ScanShape from \Increase\Simulations\CheckDeposits\CheckDepositSubmitParams\Scan
* @phpstan-import-type RequestOpts from \Increase\RequestOptions
*/
final class CheckDepositsService implements CheckDepositsContract
Expand Down Expand Up @@ -74,16 +77,20 @@ public function return(
* Simulates the submission of a [Check Deposit](#check-deposits) to the Federal Reserve. This Check Deposit must first have a `status` of `pending`.
*
* @param string $checkDepositID the identifier of the Check Deposit you wish to submit
* @param Scan|ScanShape $scan if set, the simulation will use these values for the check's scanned MICR data
* @param RequestOpts|null $requestOptions
*
* @throws APIException
*/
public function submit(
string $checkDepositID,
RequestOptions|array|null $requestOptions = null
Scan|array|null $scan = null,
RequestOptions|array|null $requestOptions = null,
): CheckDeposit {
$params = Util::removeNulls(['scan' => $scan]);

// @phpstan-ignore-next-line argument.type
$response = $this->raw->submit($checkDepositID, requestOptions: $requestOptions);
$response = $this->raw->submit($checkDepositID, params: $params, requestOptions: $requestOptions);

return $response->parse();
}
Expand Down
67 changes: 67 additions & 0 deletions src/Simulations/CheckDeposits/CheckDepositSubmitParams.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?php

declare(strict_types=1);

namespace Increase\Simulations\CheckDeposits;

use Increase\Core\Attributes\Optional;
use Increase\Core\Concerns\SdkModel;
use Increase\Core\Concerns\SdkParams;
use Increase\Core\Contracts\BaseModel;
use Increase\Simulations\CheckDeposits\CheckDepositSubmitParams\Scan;

/**
* Simulates the submission of a [Check Deposit](#check-deposits) to the Federal Reserve. This Check Deposit must first have a `status` of `pending`.
*
* @see Increase\Services\Simulations\CheckDepositsService::submit()
*
* @phpstan-import-type ScanShape from \Increase\Simulations\CheckDeposits\CheckDepositSubmitParams\Scan
*
* @phpstan-type CheckDepositSubmitParamsShape = array{scan?: null|Scan|ScanShape}
*/
final class CheckDepositSubmitParams implements BaseModel
{
/** @use SdkModel<CheckDepositSubmitParamsShape> */
use SdkModel;
use SdkParams;

/**
* If set, the simulation will use these values for the check's scanned MICR data.
*/
#[Optional]
public ?Scan $scan;

public function __construct()
{
$this->initialize();
}

/**
* Construct an instance from the required parameters.
*
* You must use named parameters to construct any parameters with a default value.
*
* @param Scan|ScanShape|null $scan
*/
public static function with(Scan|array|null $scan = null): self
{
$self = new self;

null !== $scan && $self['scan'] = $scan;

return $self;
}

/**
* If set, the simulation will use these values for the check's scanned MICR data.
*
* @param Scan|ScanShape $scan
*/
public function withScan(Scan|array $scan): self
{
$self = clone $this;
$self['scan'] = $scan;

return $self;
}
}
113 changes: 113 additions & 0 deletions src/Simulations/CheckDeposits/CheckDepositSubmitParams/Scan.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
<?php

declare(strict_types=1);

namespace Increase\Simulations\CheckDeposits\CheckDepositSubmitParams;

use Increase\Core\Attributes\Optional;
use Increase\Core\Attributes\Required;
use Increase\Core\Concerns\SdkModel;
use Increase\Core\Contracts\BaseModel;

/**
* If set, the simulation will use these values for the check's scanned MICR data.
*
* @phpstan-type ScanShape = array{
* accountNumber: string, routingNumber: string, auxiliaryOnUs?: string|null
* }
*/
final class Scan implements BaseModel
{
/** @use SdkModel<ScanShape> */
use SdkModel;

/**
* The account number to be returned in the check deposit's scan data.
*/
#[Required('account_number')]
public string $accountNumber;

/**
* The routing number to be returned in the check deposit's scan data.
*/
#[Required('routing_number')]
public string $routingNumber;

/**
* The auxiliary on-us data to be returned in the check deposit's scan data.
*/
#[Optional('auxiliary_on_us')]
public ?string $auxiliaryOnUs;

/**
* `new Scan()` is missing required properties by the API.
*
* To enforce required parameters use
* ```
* Scan::with(accountNumber: ..., routingNumber: ...)
* ```
*
* Otherwise ensure the following setters are called
*
* ```
* (new Scan)->withAccountNumber(...)->withRoutingNumber(...)
* ```
*/
public function __construct()
{
$this->initialize();
}

/**
* Construct an instance from the required parameters.
*
* You must use named parameters to construct any parameters with a default value.
*/
public static function with(
string $accountNumber,
string $routingNumber,
?string $auxiliaryOnUs = null
): self {
$self = new self;

$self['accountNumber'] = $accountNumber;
$self['routingNumber'] = $routingNumber;

null !== $auxiliaryOnUs && $self['auxiliaryOnUs'] = $auxiliaryOnUs;

return $self;
}

/**
* The account number to be returned in the check deposit's scan data.
*/
public function withAccountNumber(string $accountNumber): self
{
$self = clone $this;
$self['accountNumber'] = $accountNumber;

return $self;
}

/**
* The routing number to be returned in the check deposit's scan data.
*/
public function withRoutingNumber(string $routingNumber): self
{
$self = clone $this;
$self['routingNumber'] = $routingNumber;

return $self;
}

/**
* The auxiliary on-us data to be returned in the check deposit's scan data.
*/
public function withAuxiliaryOnUs(string $auxiliaryOnUs): self
{
$self = clone $this;
$self['auxiliaryOnUs'] = $auxiliaryOnUs;

return $self;
}
}
2 changes: 1 addition & 1 deletion src/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
namespace Increase;

// x-release-please-start-version
const VERSION = '0.33.0';
const VERSION = '0.34.0';
// x-release-please-end