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.29.0"
".": "0.30.0"
}
6 changes: 3 additions & 3 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-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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
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.29.0"
composer require "increase/increase 0.30.0"
```

<!-- x-release-please-end -->
Expand Down
31 changes: 29 additions & 2 deletions src/InboundWireTransfers/InboundWireTransfer.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,20 @@
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;

/**
* 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,
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -203,6 +212,7 @@ final class InboundWireTransfer implements BaseModel
* ```
* InboundWireTransfer::with(
* id: ...,
* acceptance: ...,
* accountID: ...,
* accountNumberID: ...,
* amount: ...,
Expand Down Expand Up @@ -234,6 +244,7 @@ final class InboundWireTransfer implements BaseModel
* ```
* (new InboundWireTransfer)
* ->withID(...)
* ->withAcceptance(...)
* ->withAccountID(...)
* ->withAccountNumberID(...)
* ->withAmount(...)
Expand Down Expand Up @@ -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> $status
* @param Type|value-of<Type> $type
*/
public static function with(
string $id,
Acceptance|array|null $acceptance,
string $accountID,
string $accountNumberID,
int $amount,
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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
*/
Expand Down
92 changes: 92 additions & 0 deletions src/InboundWireTransfers/InboundWireTransfer/Acceptance.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<?php

declare(strict_types=1);

namespace Increase\InboundWireTransfers\InboundWireTransfer;

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

/**
* If the transfer is accepted, this will contain details of the acceptance.
*
* @phpstan-type AcceptanceShape = array{
* acceptedAt: \DateTimeInterface, transactionID: string
* }
*/
final class Acceptance implements BaseModel
{
/** @use SdkModel<AcceptanceShape> */
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;
}
}
2 changes: 1 addition & 1 deletion src/InboundWireTransfers/InboundWireTransfer/Reversal.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<Reason>, reversedAt: \DateTimeInterface
Expand Down
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.29.0';
const VERSION = '0.30.0';
// x-release-please-end