diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b8dda9b..554e34b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.29.0" + ".": "0.30.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index d4eadd5..8bcc436 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-845aba046473ba39ae898570153537fb31dd6f8cb260dd8478a14fd4275ca97f.yml -openapi_spec_hash: 8afbe65f9d6614f0960f141ae0de0c39 -config_hash: 27e44ed36b9c5617b580ead7231a594a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-089e28882ee6d2ba5caaf094e99a95593ab5db652954f68fa7ce9c5b5ca76198.yml +openapi_spec_hash: 7cb683d243b088c97c04c3cd5623106a +config_hash: 4b562e97b3d8b4cba758a87d4927a76d diff --git a/CHANGELOG.md b/CHANGELOG.md index 2143678..069845b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.30.0 (2026-02-10) + +Full Changelog: [v0.29.0...v0.30.0](https://github.com/Increase/increase-php/compare/v0.29.0...v0.30.0) + +### Features + +* **api:** api update ([f817e13](https://github.com/Increase/increase-php/commit/f817e133c4fff816ac0f139a20bea586797844dc)) + ## 0.29.0 (2026-02-07) Full Changelog: [v0.28.0...v0.29.0](https://github.com/Increase/increase-php/compare/v0.28.0...v0.29.0) diff --git a/README.md b/README.md index 473d94f..237d549 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ The REST API documentation can be found on [increase.com](https://increase.com/d ``` -composer require "increase/increase 0.29.0" +composer require "increase/increase 0.30.0" ``` diff --git a/src/InboundWireTransfers/InboundWireTransfer.php b/src/InboundWireTransfers/InboundWireTransfer.php index 880aada..b894adf 100644 --- a/src/InboundWireTransfers/InboundWireTransfer.php +++ b/src/InboundWireTransfers/InboundWireTransfer.php @@ -7,6 +7,7 @@ use Increase\Core\Attributes\Required; use Increase\Core\Concerns\SdkModel; use Increase\Core\Contracts\BaseModel; +use Increase\InboundWireTransfers\InboundWireTransfer\Acceptance; use Increase\InboundWireTransfers\InboundWireTransfer\Reversal; use Increase\InboundWireTransfers\InboundWireTransfer\Status; use Increase\InboundWireTransfers\InboundWireTransfer\Type; @@ -14,10 +15,12 @@ /** * An Inbound Wire Transfer is a wire transfer initiated outside of Increase to your account. * + * @phpstan-import-type AcceptanceShape from \Increase\InboundWireTransfers\InboundWireTransfer\Acceptance * @phpstan-import-type ReversalShape from \Increase\InboundWireTransfers\InboundWireTransfer\Reversal * * @phpstan-type InboundWireTransferShape = array{ * id: string, + * acceptance: null|Acceptance|AcceptanceShape, * accountID: string, * accountNumberID: string, * amount: int, @@ -54,6 +57,12 @@ final class InboundWireTransfer implements BaseModel #[Required] public string $id; + /** + * If the transfer is accepted, this will contain details of the acceptance. + */ + #[Required] + public ?Acceptance $acceptance; + /** * The Account to which the transfer belongs. */ @@ -157,7 +166,7 @@ final class InboundWireTransfer implements BaseModel public ?string $instructionIdentification; /** - * Information about the reversal of the inbound wire transfer if it has been reversed. + * If the transfer is reversed, this will contain details of the reversal. */ #[Required] public ?Reversal $reversal; @@ -203,6 +212,7 @@ final class InboundWireTransfer implements BaseModel * ``` * InboundWireTransfer::with( * id: ..., + * acceptance: ..., * accountID: ..., * accountNumberID: ..., * amount: ..., @@ -234,6 +244,7 @@ final class InboundWireTransfer implements BaseModel * ``` * (new InboundWireTransfer) * ->withID(...) + * ->withAcceptance(...) * ->withAccountID(...) * ->withAccountNumberID(...) * ->withAmount(...) @@ -269,12 +280,14 @@ public function __construct() * * You must use named parameters to construct any parameters with a default value. * + * @param Acceptance|AcceptanceShape|null $acceptance * @param Reversal|ReversalShape|null $reversal * @param Status|value-of $status * @param Type|value-of $type */ public static function with( string $id, + Acceptance|array|null $acceptance, string $accountID, string $accountNumberID, int $amount, @@ -302,6 +315,7 @@ public static function with( $self = new self; $self['id'] = $id; + $self['acceptance'] = $acceptance; $self['accountID'] = $accountID; $self['accountNumberID'] = $accountNumberID; $self['amount'] = $amount; @@ -340,6 +354,19 @@ public function withID(string $id): self return $self; } + /** + * If the transfer is accepted, this will contain details of the acceptance. + * + * @param Acceptance|AcceptanceShape|null $acceptance + */ + public function withAcceptance(Acceptance|array|null $acceptance): self + { + $self = clone $this; + $self['acceptance'] = $acceptance; + + return $self; + } + /** * The Account to which the transfer belongs. */ @@ -535,7 +562,7 @@ public function withInstructionIdentification( } /** - * Information about the reversal of the inbound wire transfer if it has been reversed. + * If the transfer is reversed, this will contain details of the reversal. * * @param Reversal|ReversalShape|null $reversal */ diff --git a/src/InboundWireTransfers/InboundWireTransfer/Acceptance.php b/src/InboundWireTransfers/InboundWireTransfer/Acceptance.php new file mode 100644 index 0000000..e7c1788 --- /dev/null +++ b/src/InboundWireTransfers/InboundWireTransfer/Acceptance.php @@ -0,0 +1,92 @@ + */ + use SdkModel; + + /** + * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the transfer was accepted. + */ + #[Required('accepted_at')] + public \DateTimeInterface $acceptedAt; + + /** + * The identifier of the transaction for the accepted transfer. + */ + #[Required('transaction_id')] + public string $transactionID; + + /** + * `new Acceptance()` is missing required properties by the API. + * + * To enforce required parameters use + * ``` + * Acceptance::with(acceptedAt: ..., transactionID: ...) + * ``` + * + * Otherwise ensure the following setters are called + * + * ``` + * (new Acceptance)->withAcceptedAt(...)->withTransactionID(...) + * ``` + */ + 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( + \DateTimeInterface $acceptedAt, + string $transactionID + ): self { + $self = new self; + + $self['acceptedAt'] = $acceptedAt; + $self['transactionID'] = $transactionID; + + return $self; + } + + /** + * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the transfer was accepted. + */ + public function withAcceptedAt(\DateTimeInterface $acceptedAt): self + { + $self = clone $this; + $self['acceptedAt'] = $acceptedAt; + + return $self; + } + + /** + * The identifier of the transaction for the accepted transfer. + */ + public function withTransactionID(string $transactionID): self + { + $self = clone $this; + $self['transactionID'] = $transactionID; + + return $self; + } +} diff --git a/src/InboundWireTransfers/InboundWireTransfer/Reversal.php b/src/InboundWireTransfers/InboundWireTransfer/Reversal.php index 84fad17..dee5337 100644 --- a/src/InboundWireTransfers/InboundWireTransfer/Reversal.php +++ b/src/InboundWireTransfers/InboundWireTransfer/Reversal.php @@ -10,7 +10,7 @@ use Increase\InboundWireTransfers\InboundWireTransfer\Reversal\Reason; /** - * Information about the reversal of the inbound wire transfer if it has been reversed. + * If the transfer is reversed, this will contain details of the reversal. * * @phpstan-type ReversalShape = array{ * reason: Reason|value-of, reversedAt: \DateTimeInterface diff --git a/src/Version.php b/src/Version.php index ab708bb..e229b6a 100644 --- a/src/Version.php +++ b/src/Version.php @@ -5,5 +5,5 @@ namespace Increase; // x-release-please-start-version -const VERSION = '0.29.0'; +const VERSION = '0.30.0'; // x-release-please-end