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.73.0"
".": "0.74.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: 236
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-fae765b6b1b34f9c649fec11885e4d0e5b8b1cab0baf0f440dfd5eba040e7047.yml
openapi_spec_hash: 9900b1c763a43261e0288896379541fe
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d5ad75c7a80acd1cb3ff0483fa0b5b2eb9d73287f107f53a8fb3a3a0b6a32ed8.yml
openapi_spec_hash: da73faf476df3eddcf0ac51c38dd1b17
config_hash: 25d7d7aa4882db6189b4b53e8e249e80
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.74.0 (2026-03-13)

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

### Features

* **api:** api update ([5543b33](https://github.com/Increase/increase-php/commit/5543b33001708e31543ef1664f3c0475ee4182e5))

## 0.73.0 (2026-03-13)

Full Changelog: [v0.72.0...v0.73.0](https://github.com/Increase/increase-php/compare/v0.72.0...v0.73.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.73.0"
composer require "increase/increase 0.74.0"
```

<!-- x-release-please-end -->
Expand Down
29 changes: 28 additions & 1 deletion src/Entities/Entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@
use Increase\Entities\Entity\ThirdPartyVerification;
use Increase\Entities\Entity\Trust;
use Increase\Entities\Entity\Type;
use Increase\Entities\Entity\Validation;
use Increase\SupplementalDocuments\EntitySupplementalDocument;

/**
* Entities are the legal entities that own accounts. They can be people, corporations, partnerships, government authorities, or trusts.
* Entities are the legal entities that own accounts. They can be people, corporations, partnerships, government authorities, or trusts. To learn more, see [Entities](/documentation/entities).
*
* @phpstan-import-type CorporationShape from \Increase\Entities\Entity\Corporation
* @phpstan-import-type GovernmentAuthorityShape from \Increase\Entities\Entity\GovernmentAuthority
Expand All @@ -32,6 +33,7 @@
* @phpstan-import-type TermsAgreementShape from \Increase\Entities\Entity\TermsAgreement
* @phpstan-import-type ThirdPartyVerificationShape from \Increase\Entities\Entity\ThirdPartyVerification
* @phpstan-import-type TrustShape from \Increase\Entities\Entity\Trust
* @phpstan-import-type ValidationShape from \Increase\Entities\Entity\Validation
*
* @phpstan-type EntityShape = array{
* id: string,
Expand All @@ -51,6 +53,7 @@
* thirdPartyVerification: null|ThirdPartyVerification|ThirdPartyVerificationShape,
* trust: null|Trust|TrustShape,
* type: Type|value-of<Type>,
* validation: null|Validation|ValidationShape,
* }
*/
final class Entity implements BaseModel
Expand Down Expand Up @@ -170,6 +173,12 @@ final class Entity implements BaseModel
#[Required(enum: Type::class)]
public string $type;

/**
* The validation results for the entity.
*/
#[Required]
public ?Validation $validation;

/**
* `new Entity()` is missing required properties by the API.
*
Expand All @@ -193,6 +202,7 @@ final class Entity implements BaseModel
* thirdPartyVerification: ...,
* trust: ...,
* type: ...,
* validation: ...,
* )
* ```
*
Expand All @@ -217,6 +227,7 @@ final class Entity implements BaseModel
* ->withThirdPartyVerification(...)
* ->withTrust(...)
* ->withType(...)
* ->withValidation(...)
* ```
*/
public function __construct()
Expand All @@ -241,6 +252,7 @@ public function __construct()
* @param ThirdPartyVerification|ThirdPartyVerificationShape|null $thirdPartyVerification
* @param Trust|TrustShape|null $trust
* @param Type|value-of<Type> $type
* @param Validation|ValidationShape|null $validation
*/
public static function with(
string $id,
Expand All @@ -260,6 +272,7 @@ public static function with(
ThirdPartyVerification|array|null $thirdPartyVerification,
Trust|array|null $trust,
Type|string $type,
Validation|array|null $validation,
): self {
$self = new self;

Expand All @@ -280,6 +293,7 @@ public static function with(
$self['thirdPartyVerification'] = $thirdPartyVerification;
$self['trust'] = $trust;
$self['type'] = $type;
$self['validation'] = $validation;

return $self;
}
Expand Down Expand Up @@ -499,4 +513,17 @@ public function withType(Type|string $type): self

return $self;
}

/**
* The validation results for the entity.
*
* @param Validation|ValidationShape|null $validation
*/
public function withValidation(Validation|array|null $validation): self
{
$self = clone $this;
$self['validation'] = $validation;

return $self;
}
}
109 changes: 109 additions & 0 deletions src/Entities/Entity/Validation.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
<?php

declare(strict_types=1);

namespace Increase\Entities\Entity;

use Increase\Core\Attributes\Required;
use Increase\Core\Concerns\SdkModel;
use Increase\Core\Contracts\BaseModel;
use Increase\Entities\Entity\Validation\Issue;
use Increase\Entities\Entity\Validation\Status;

/**
* The validation results for the entity.
*
* @phpstan-import-type IssueShape from \Increase\Entities\Entity\Validation\Issue
*
* @phpstan-type ValidationShape = array{
* issues: list<Issue|IssueShape>,
* status: \Increase\Entities\Entity\Validation\Status|value-of<\Increase\Entities\Entity\Validation\Status>,
* }
*/
final class Validation implements BaseModel
{
/** @use SdkModel<ValidationShape> */
use SdkModel;

/**
* The list of issues that need to be addressed.
*
* @var list<Issue> $issues
*/
#[Required(list: Issue::class)]
public array $issues;

/**
* The validation status for the entity. If the status is `invalid`, the `issues` array will be populated.
*
* @var value-of<Status> $status
*/
#[Required(enum: Status::class)]
public string $status;

/**
* `new Validation()` is missing required properties by the API.
*
* To enforce required parameters use
* ```
* Validation::with(issues: ..., status: ...)
* ```
*
* Otherwise ensure the following setters are called
*
* ```
* (new Validation)->withIssues(...)->withStatus(...)
* ```
*/
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 list<Issue|IssueShape> $issues
* @param Status|value-of<Status> $status
*/
public static function with(
array $issues,
Status|string $status
): self {
$self = new self;

$self['issues'] = $issues;
$self['status'] = $status;

return $self;
}

/**
* The list of issues that need to be addressed.
*
* @param list<Issue|IssueShape> $issues
*/
public function withIssues(array $issues): self
{
$self = clone $this;
$self['issues'] = $issues;

return $self;
}

/**
* The validation status for the entity. If the status is `invalid`, the `issues` array will be populated.
*
* @param Status|value-of<Status> $status
*/
public function withStatus(
Status|string $status
): self {
$self = clone $this;
$self['status'] = $status;

return $self;
}
}
Loading
Loading