Skip to content

Commit e03e980

Browse files
feat(api): api update
1 parent d6c5588 commit e03e980

File tree

2 files changed

+101
-3
lines changed

2 files changed

+101
-3
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 236
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-456b3255914e823b9e463f97ff81124dfabefae6f102e0f295bf33b7cfb1b780.yml
3-
openapi_spec_hash: ccbeda7ba9b61f9a8c2f9f4cf7a65dce
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d5ad75c7a80acd1cb3ff0483fa0b5b2eb9d73287f107f53a8fb3a3a0b6a32ed8.yml
3+
openapi_spec_hash: da73faf476df3eddcf0ac51c38dd1b17
44
config_hash: 25d7d7aa4882db6189b4b53e8e249e80

src/increase/types/entity.py

Lines changed: 99 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@
3939
"TrustTrusteeIndividual",
4040
"TrustTrusteeIndividualAddress",
4141
"TrustTrusteeIndividualIdentification",
42+
"Validation",
43+
"ValidationIssue",
44+
"ValidationIssueBeneficialOwnerAddress",
45+
"ValidationIssueBeneficialOwnerIdentity",
46+
"ValidationIssueEntityAddress",
47+
"ValidationIssueEntityTaxIdentifier",
4248
]
4349

4450

@@ -703,10 +709,99 @@ class Trust(BaseModel):
703709
"""The trustees of the trust."""
704710

705711

712+
class ValidationIssueBeneficialOwnerAddress(BaseModel):
713+
"""Details when the issue is with a beneficial owner's address."""
714+
715+
beneficial_owner_id: str
716+
"""The ID of the beneficial owner."""
717+
718+
reason: Literal["mailbox_address"]
719+
"""The reason the address is invalid.
720+
721+
- `mailbox_address` - The address is a mailbox or other non-physical address.
722+
"""
723+
724+
725+
class ValidationIssueBeneficialOwnerIdentity(BaseModel):
726+
"""Details when the issue is with a beneficial owner's identity verification."""
727+
728+
beneficial_owner_id: str
729+
"""The ID of the beneficial owner."""
730+
731+
732+
class ValidationIssueEntityAddress(BaseModel):
733+
"""Details when the issue is with the entity's address."""
734+
735+
reason: Literal["mailbox_address"]
736+
"""The reason the address is invalid.
737+
738+
- `mailbox_address` - The address is a mailbox or other non-physical address.
739+
"""
740+
741+
742+
class ValidationIssueEntityTaxIdentifier(BaseModel):
743+
"""Details when the issue is with the entity's tax ID."""
744+
745+
pass
746+
747+
748+
class ValidationIssue(BaseModel):
749+
beneficial_owner_address: Optional[ValidationIssueBeneficialOwnerAddress] = None
750+
"""Details when the issue is with a beneficial owner's address."""
751+
752+
beneficial_owner_identity: Optional[ValidationIssueBeneficialOwnerIdentity] = None
753+
"""Details when the issue is with a beneficial owner's identity verification."""
754+
755+
category: Literal[
756+
"entity_tax_identifier", "entity_address", "beneficial_owner_identity", "beneficial_owner_address"
757+
]
758+
"""The type of issue.
759+
760+
We may add additional possible values for this enum over time; your application
761+
should be able to handle such additions gracefully.
762+
763+
- `entity_tax_identifier` - The entity's tax identifier could not be validated.
764+
Update the tax ID with the
765+
[update an entity API](/documentation/api/entities#update-an-entity.corporation.tax_identifier).
766+
- `entity_address` - The entity's address could not be validated. Update the
767+
address with the
768+
[update an entity API](/documentation/api/entities#update-an-entity.corporation.address).
769+
- `beneficial_owner_identity` - A beneficial owner's identity could not be
770+
verified. Update the identification with the
771+
[update a beneficial owner API](/documentation/api/beneficial-owners#update-a-beneficial-owner).
772+
- `beneficial_owner_address` - A beneficial owner's address could not be
773+
validated. Update the address with the
774+
[update a beneficial owner API](/documentation/api/beneficial-owners#update-a-beneficial-owner).
775+
"""
776+
777+
entity_address: Optional[ValidationIssueEntityAddress] = None
778+
"""Details when the issue is with the entity's address."""
779+
780+
entity_tax_identifier: Optional[ValidationIssueEntityTaxIdentifier] = None
781+
"""Details when the issue is with the entity's tax ID."""
782+
783+
784+
class Validation(BaseModel):
785+
"""The validation results for the entity."""
786+
787+
issues: List[ValidationIssue]
788+
"""The list of issues that need to be addressed."""
789+
790+
status: Literal["pending", "valid", "invalid"]
791+
"""The validation status for the entity.
792+
793+
If the status is `invalid`, the `issues` array will be populated.
794+
795+
- `pending` - The submitted data is being validated.
796+
- `valid` - The submitted data is valid.
797+
- `invalid` - Additional information is required to validate the data.
798+
"""
799+
800+
706801
class Entity(BaseModel):
707802
"""Entities are the legal entities that own accounts.
708803
709-
They can be people, corporations, partnerships, government authorities, or trusts.
804+
They can be people, corporations, partnerships, government authorities, or trusts. To learn more, see [Entities](/documentation/entities).
710805
"""
711806

712807
id: str
@@ -818,6 +913,9 @@ class Entity(BaseModel):
818913
For this resource it will always be `entity`.
819914
"""
820915

916+
validation: Optional[Validation] = None
917+
"""The validation results for the entity."""
918+
821919
if TYPE_CHECKING:
822920
# Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
823921
# value to this field, so for compatibility we avoid doing it at runtime.

0 commit comments

Comments
 (0)