|
| 1 | +# frozen_string_literal: true |
| 2 | + |
| 3 | +module Lithic |
| 4 | + module Models |
| 5 | + module AccountHolders |
| 6 | + # @see Lithic::Resources::AccountHolders::Entities#delete |
| 7 | + class AccountHolderEntity < Lithic::Internal::Type::BaseModel |
| 8 | + # @!attribute token |
| 9 | + # Globally unique identifier for the entity |
| 10 | + # |
| 11 | + # @return [String] |
| 12 | + required :token, String |
| 13 | + |
| 14 | + # @!attribute account_holder_token |
| 15 | + # Globally unique identifier for the account holder |
| 16 | + # |
| 17 | + # @return [String] |
| 18 | + required :account_holder_token, String |
| 19 | + |
| 20 | + # @!attribute address |
| 21 | + # Individual's current address |
| 22 | + # |
| 23 | + # @return [Lithic::Models::AccountHolders::AccountHolderEntity::Address] |
| 24 | + required :address, -> { Lithic::AccountHolders::AccountHolderEntity::Address } |
| 25 | + |
| 26 | + # @!attribute dob |
| 27 | + # Individual's date of birth, as an RFC 3339 date |
| 28 | + # |
| 29 | + # @return [String, nil] |
| 30 | + required :dob, String, nil?: true |
| 31 | + |
| 32 | + # @!attribute email |
| 33 | + # Individual's email address |
| 34 | + # |
| 35 | + # @return [String, nil] |
| 36 | + required :email, String, nil?: true |
| 37 | + |
| 38 | + # @!attribute first_name |
| 39 | + # Individual's first name, as it appears on government-issued identity documents |
| 40 | + # |
| 41 | + # @return [String, nil] |
| 42 | + required :first_name, String, nil?: true |
| 43 | + |
| 44 | + # @!attribute last_name |
| 45 | + # Individual's last name, as it appears on government-issued identity documents |
| 46 | + # |
| 47 | + # @return [String, nil] |
| 48 | + required :last_name, String, nil?: true |
| 49 | + |
| 50 | + # @!attribute phone_number |
| 51 | + # Individual's phone number, entered in E.164 format |
| 52 | + # |
| 53 | + # @return [String, nil] |
| 54 | + required :phone_number, String, nil?: true |
| 55 | + |
| 56 | + # @!attribute status |
| 57 | + # The status of the entity |
| 58 | + # |
| 59 | + # @return [Symbol, Lithic::Models::AccountHolders::AccountHolderEntity::Status] |
| 60 | + required :status, enum: -> { Lithic::AccountHolders::AccountHolderEntity::Status } |
| 61 | + |
| 62 | + # @!attribute type |
| 63 | + # The type of entity |
| 64 | + # |
| 65 | + # @return [Symbol, Lithic::Models::AccountHolders::AccountHolderEntity::Type] |
| 66 | + required :type, enum: -> { Lithic::AccountHolders::AccountHolderEntity::Type } |
| 67 | + |
| 68 | + # @!method initialize(token:, account_holder_token:, address:, dob:, email:, first_name:, last_name:, phone_number:, status:, type:) |
| 69 | + # Information about an entity associated with an account holder |
| 70 | + # |
| 71 | + # @param token [String] Globally unique identifier for the entity |
| 72 | + # |
| 73 | + # @param account_holder_token [String] Globally unique identifier for the account holder |
| 74 | + # |
| 75 | + # @param address [Lithic::Models::AccountHolders::AccountHolderEntity::Address] Individual's current address |
| 76 | + # |
| 77 | + # @param dob [String, nil] Individual's date of birth, as an RFC 3339 date |
| 78 | + # |
| 79 | + # @param email [String, nil] Individual's email address |
| 80 | + # |
| 81 | + # @param first_name [String, nil] Individual's first name, as it appears on government-issued identity documents |
| 82 | + # |
| 83 | + # @param last_name [String, nil] Individual's last name, as it appears on government-issued identity documents |
| 84 | + # |
| 85 | + # @param phone_number [String, nil] Individual's phone number, entered in E.164 format |
| 86 | + # |
| 87 | + # @param status [Symbol, Lithic::Models::AccountHolders::AccountHolderEntity::Status] The status of the entity |
| 88 | + # |
| 89 | + # @param type [Symbol, Lithic::Models::AccountHolders::AccountHolderEntity::Type] The type of entity |
| 90 | + |
| 91 | + # @see Lithic::Models::AccountHolders::AccountHolderEntity#address |
| 92 | + class Address < Lithic::Internal::Type::BaseModel |
| 93 | + # @!attribute address1 |
| 94 | + # Valid deliverable address (no PO boxes). |
| 95 | + # |
| 96 | + # @return [String] |
| 97 | + required :address1, String |
| 98 | + |
| 99 | + # @!attribute city |
| 100 | + # Name of city. |
| 101 | + # |
| 102 | + # @return [String] |
| 103 | + required :city, String |
| 104 | + |
| 105 | + # @!attribute country |
| 106 | + # Valid country code. Only USA is currently supported, entered in uppercase ISO |
| 107 | + # 3166-1 alpha-3 three-character format. |
| 108 | + # |
| 109 | + # @return [String] |
| 110 | + required :country, String |
| 111 | + |
| 112 | + # @!attribute postal_code |
| 113 | + # Valid postal code. Only USA ZIP codes are currently supported, entered as a |
| 114 | + # five-digit ZIP or nine-digit ZIP+4. |
| 115 | + # |
| 116 | + # @return [String] |
| 117 | + required :postal_code, String |
| 118 | + |
| 119 | + # @!attribute state |
| 120 | + # Valid state code. Only USA state codes are currently supported, entered in |
| 121 | + # uppercase ISO 3166-2 two-character format. |
| 122 | + # |
| 123 | + # @return [String] |
| 124 | + required :state, String |
| 125 | + |
| 126 | + # @!attribute address2 |
| 127 | + # Unit or apartment number (if applicable). |
| 128 | + # |
| 129 | + # @return [String, nil] |
| 130 | + optional :address2, String |
| 131 | + |
| 132 | + # @!method initialize(address1:, city:, country:, postal_code:, state:, address2: nil) |
| 133 | + # Some parameter documentations has been truncated, see |
| 134 | + # {Lithic::Models::AccountHolders::AccountHolderEntity::Address} for more details. |
| 135 | + # |
| 136 | + # Individual's current address |
| 137 | + # |
| 138 | + # @param address1 [String] Valid deliverable address (no PO boxes). |
| 139 | + # |
| 140 | + # @param city [String] Name of city. |
| 141 | + # |
| 142 | + # @param country [String] Valid country code. Only USA is currently supported, entered in uppercase ISO 31 |
| 143 | + # |
| 144 | + # @param postal_code [String] Valid postal code. Only USA ZIP codes are currently supported, entered as a five |
| 145 | + # |
| 146 | + # @param state [String] Valid state code. Only USA state codes are currently supported, entered in upper |
| 147 | + # |
| 148 | + # @param address2 [String] Unit or apartment number (if applicable). |
| 149 | + end |
| 150 | + |
| 151 | + # The status of the entity |
| 152 | + # |
| 153 | + # @see Lithic::Models::AccountHolders::AccountHolderEntity#status |
| 154 | + module Status |
| 155 | + extend Lithic::Internal::Type::Enum |
| 156 | + |
| 157 | + ACCEPTED = :ACCEPTED |
| 158 | + INACTIVE = :INACTIVE |
| 159 | + PENDING_REVIEW = :PENDING_REVIEW |
| 160 | + REJECTED = :REJECTED |
| 161 | + |
| 162 | + # @!method self.values |
| 163 | + # @return [Array<Symbol>] |
| 164 | + end |
| 165 | + |
| 166 | + # The type of entity |
| 167 | + # |
| 168 | + # @see Lithic::Models::AccountHolders::AccountHolderEntity#type |
| 169 | + module Type |
| 170 | + extend Lithic::Internal::Type::Enum |
| 171 | + |
| 172 | + BENEFICIAL_OWNER_INDIVIDUAL = :BENEFICIAL_OWNER_INDIVIDUAL |
| 173 | + CONTROL_PERSON = :CONTROL_PERSON |
| 174 | + |
| 175 | + # @!method self.values |
| 176 | + # @return [Array<Symbol>] |
| 177 | + end |
| 178 | + end |
| 179 | + end |
| 180 | + |
| 181 | + AccountHolderEntity = AccountHolders::AccountHolderEntity |
| 182 | + end |
| 183 | +end |
0 commit comments