|
39 | 39 | "TrustTrusteeIndividual", |
40 | 40 | "TrustTrusteeIndividualAddress", |
41 | 41 | "TrustTrusteeIndividualIdentification", |
| 42 | + "Validation", |
| 43 | + "ValidationIssue", |
| 44 | + "ValidationIssueBeneficialOwnerAddress", |
| 45 | + "ValidationIssueBeneficialOwnerIdentity", |
| 46 | + "ValidationIssueEntityAddress", |
| 47 | + "ValidationIssueEntityTaxIdentifier", |
42 | 48 | ] |
43 | 49 |
|
44 | 50 |
|
@@ -703,10 +709,99 @@ class Trust(BaseModel): |
703 | 709 | """The trustees of the trust.""" |
704 | 710 |
|
705 | 711 |
|
| 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 | + |
706 | 801 | class Entity(BaseModel): |
707 | 802 | """Entities are the legal entities that own accounts. |
708 | 803 |
|
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). |
710 | 805 | """ |
711 | 806 |
|
712 | 807 | id: str |
@@ -818,6 +913,9 @@ class Entity(BaseModel): |
818 | 913 | For this resource it will always be `entity`. |
819 | 914 | """ |
820 | 915 |
|
| 916 | + validation: Optional[Validation] = None |
| 917 | + """The validation results for the entity.""" |
| 918 | + |
821 | 919 | if TYPE_CHECKING: |
822 | 920 | # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a |
823 | 921 | # value to this field, so for compatibility we avoid doing it at runtime. |
|
0 commit comments