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.28.0"
".": "0.29.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-cff24fe63c8cb06a46048b355f873c22def0798a38de892671d379e58d98bc03.yml
openapi_spec_hash: 4f7ae65440fefa73441023480d6ac9a4
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-845aba046473ba39ae898570153537fb31dd6f8cb260dd8478a14fd4275ca97f.yml
openapi_spec_hash: 8afbe65f9d6614f0960f141ae0de0c39
config_hash: 27e44ed36b9c5617b580ead7231a594a
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 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)

### Features

* **api:** api update ([91ee39f](https://github.com/Increase/increase-php/commit/91ee39f28a93655a31f351c982317ce4cabcd645))

## 0.28.0 (2026-02-06)

Full Changelog: [v0.27.0...v0.28.0](https://github.com/Increase/increase-php/compare/v0.27.0...v0.28.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.28.0"
composer require "increase/increase 0.29.0"
```

<!-- x-release-please-end -->
Expand Down
25 changes: 12 additions & 13 deletions src/ACHTransfers/ACHTransfer/Addenda.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Increase\ACHTransfers\ACHTransfer\Addenda\Category;
use Increase\ACHTransfers\ACHTransfer\Addenda\Freeform;
use Increase\ACHTransfers\ACHTransfer\Addenda\PaymentOrderRemittanceAdvice;
use Increase\Core\Attributes\Optional;
use Increase\Core\Attributes\Required;
use Increase\Core\Concerns\SdkModel;
use Increase\Core\Contracts\BaseModel;
Expand All @@ -19,8 +20,8 @@
*
* @phpstan-type AddendaShape = array{
* category: Category|value-of<Category>,
* freeform: null|Freeform|FreeformShape,
* paymentOrderRemittanceAdvice: null|PaymentOrderRemittanceAdvice|PaymentOrderRemittanceAdviceShape,
* freeform?: null|Freeform|FreeformShape,
* paymentOrderRemittanceAdvice?: null|PaymentOrderRemittanceAdvice|PaymentOrderRemittanceAdviceShape,
* }
*/
final class Addenda implements BaseModel
Expand All @@ -39,30 +40,27 @@ final class Addenda implements BaseModel
/**
* Unstructured `payment_related_information` passed through with the transfer.
*/
#[Required]
#[Optional(nullable: true)]
public ?Freeform $freeform;

/**
* Structured ASC X12 820 remittance advice records. Please reach out to [support@increase.com](mailto:support@increase.com) for more information.
*/
#[Required('payment_order_remittance_advice')]
#[Optional('payment_order_remittance_advice', nullable: true)]
public ?PaymentOrderRemittanceAdvice $paymentOrderRemittanceAdvice;

/**
* `new Addenda()` is missing required properties by the API.
*
* To enforce required parameters use
* ```
* Addenda::with(category: ..., freeform: ..., paymentOrderRemittanceAdvice: ...)
* Addenda::with(category: ...)
* ```
*
* Otherwise ensure the following setters are called
*
* ```
* (new Addenda)
* ->withCategory(...)
* ->withFreeform(...)
* ->withPaymentOrderRemittanceAdvice(...)
* (new Addenda)->withCategory(...)
* ```
*/
public function __construct()
Expand All @@ -81,14 +79,15 @@ public function __construct()
*/
public static function with(
Category|string $category,
Freeform|array|null $freeform,
PaymentOrderRemittanceAdvice|array|null $paymentOrderRemittanceAdvice,
Freeform|array|null $freeform = null,
PaymentOrderRemittanceAdvice|array|null $paymentOrderRemittanceAdvice = null,
): self {
$self = new self;

$self['category'] = $category;
$self['freeform'] = $freeform;
$self['paymentOrderRemittanceAdvice'] = $paymentOrderRemittanceAdvice;

null !== $freeform && $self['freeform'] = $freeform;
null !== $paymentOrderRemittanceAdvice && $self['paymentOrderRemittanceAdvice'] = $paymentOrderRemittanceAdvice;

return $self;
}
Expand Down
62 changes: 30 additions & 32 deletions src/ACHTransfers/ACHTransfer/CreatedBy.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Increase\ACHTransfers\ACHTransfer\CreatedBy\Category;
use Increase\ACHTransfers\ACHTransfer\CreatedBy\OAuthApplication;
use Increase\ACHTransfers\ACHTransfer\CreatedBy\User;
use Increase\Core\Attributes\Optional;
use Increase\Core\Attributes\Required;
use Increase\Core\Concerns\SdkModel;
use Increase\Core\Contracts\BaseModel;
Expand All @@ -20,23 +21,17 @@
* @phpstan-import-type UserShape from \Increase\ACHTransfers\ACHTransfer\CreatedBy\User
*
* @phpstan-type CreatedByShape = array{
* apiKey: null|APIKey|APIKeyShape,
* category: Category|value-of<Category>,
* oauthApplication: null|OAuthApplication|OAuthApplicationShape,
* user: null|User|UserShape,
* apiKey?: null|APIKey|APIKeyShape,
* oauthApplication?: null|OAuthApplication|OAuthApplicationShape,
* user?: null|User|UserShape,
* }
*/
final class CreatedBy implements BaseModel
{
/** @use SdkModel<CreatedByShape> */
use SdkModel;

/**
* If present, details about the API key that created the transfer.
*/
#[Required('api_key')]
public ?APIKey $apiKey;

/**
* The type of object that created this transfer.
*
Expand All @@ -45,34 +40,36 @@ final class CreatedBy implements BaseModel
#[Required(enum: Category::class)]
public string $category;

/**
* If present, details about the API key that created the transfer.
*/
#[Optional('api_key', nullable: true)]
public ?APIKey $apiKey;

/**
* If present, details about the OAuth Application that created the transfer.
*/
#[Required('oauth_application')]
#[Optional('oauth_application', nullable: true)]
public ?OAuthApplication $oauthApplication;

/**
* If present, details about the User that created the transfer.
*/
#[Required]
#[Optional(nullable: true)]
public ?User $user;

/**
* `new CreatedBy()` is missing required properties by the API.
*
* To enforce required parameters use
* ```
* CreatedBy::with(apiKey: ..., category: ..., oauthApplication: ..., user: ...)
* CreatedBy::with(category: ...)
* ```
*
* Otherwise ensure the following setters are called
*
* ```
* (new CreatedBy)
* ->withAPIKey(...)
* ->withCategory(...)
* ->withOAuthApplication(...)
* ->withUser(...)
* (new CreatedBy)->withCategory(...)
* ```
*/
public function __construct()
Expand All @@ -85,49 +82,50 @@ public function __construct()
*
* You must use named parameters to construct any parameters with a default value.
*
* @param APIKey|APIKeyShape|null $apiKey
* @param Category|value-of<Category> $category
* @param APIKey|APIKeyShape|null $apiKey
* @param OAuthApplication|OAuthApplicationShape|null $oauthApplication
* @param User|UserShape|null $user
*/
public static function with(
APIKey|array|null $apiKey,
Category|string $category,
OAuthApplication|array|null $oauthApplication,
User|array|null $user,
APIKey|array|null $apiKey = null,
OAuthApplication|array|null $oauthApplication = null,
User|array|null $user = null,
): self {
$self = new self;

$self['apiKey'] = $apiKey;
$self['category'] = $category;
$self['oauthApplication'] = $oauthApplication;
$self['user'] = $user;

null !== $apiKey && $self['apiKey'] = $apiKey;
null !== $oauthApplication && $self['oauthApplication'] = $oauthApplication;
null !== $user && $self['user'] = $user;

return $self;
}

/**
* If present, details about the API key that created the transfer.
* The type of object that created this transfer.
*
* @param APIKey|APIKeyShape|null $apiKey
* @param Category|value-of<Category> $category
*/
public function withAPIKey(APIKey|array|null $apiKey): self
public function withCategory(Category|string $category): self
{
$self = clone $this;
$self['apiKey'] = $apiKey;
$self['category'] = $category;

return $self;
}

/**
* The type of object that created this transfer.
* If present, details about the API key that created the transfer.
*
* @param Category|value-of<Category> $category
* @param APIKey|APIKeyShape|null $apiKey
*/
public function withCategory(Category|string $category): self
public function withAPIKey(APIKey|array|null $apiKey): self
{
$self = clone $this;
$self['category'] = $category;
$self['apiKey'] = $apiKey;

return $self;
}
Expand Down
Loading