Skip to content

Commit 508b031

Browse files
feat(api): Add account holder entity endpoints
1 parent a07d19f commit 508b031

25 files changed

Lines changed: 2040 additions & 4 deletions

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 183
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-f99894d5b6eda608756c9e5e9868c81c4ce8c74c4d8958370cc3799766a13d65.yml
3-
openapi_spec_hash: 2f364e16b58e5a9759fc9f772cb33f3c
4-
config_hash: 2ee394874b7eb4cbe06f044b7376a6ba
1+
configured_endpoints: 185
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-c1dbf87770ddffb9d6d1ada33d1c43739d43498ff687c1d58e403ffc08f6f863.yml
3+
openapi_spec_hash: f488e595de02180bb904da283b7a1c39
4+
config_hash: 925e84bc73b1b9b5eb0ffd230fc9800f

lib/lithic.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@
9292
require_relative "lithic/models/account_holder_list_params"
9393
require_relative "lithic/models/account_holder_retrieve_document_params"
9494
require_relative "lithic/models/account_holder_retrieve_params"
95+
require_relative "lithic/models/account_holders/account_holder_entity"
96+
require_relative "lithic/models/account_holders/entity_create_params"
97+
require_relative "lithic/models/account_holders/entity_create_response"
98+
require_relative "lithic/models/account_holders/entity_delete_params"
9599
require_relative "lithic/models/account_holder_simulate_enrollment_document_review_params"
96100
require_relative "lithic/models/account_holder_simulate_enrollment_review_params"
97101
require_relative "lithic/models/account_holder_simulate_enrollment_review_response"
@@ -443,6 +447,7 @@
443447
require_relative "lithic/models"
444448
require_relative "lithic/resources/account_activity"
445449
require_relative "lithic/resources/account_holders"
450+
require_relative "lithic/resources/account_holders/entities"
446451
require_relative "lithic/resources/accounts"
447452
require_relative "lithic/resources/auth_rules"
448453
require_relative "lithic/resources/auth_rules/v2"

lib/lithic/models.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ module Lithic
6363

6464
AccountHolderRetrieveParams = Lithic::Models::AccountHolderRetrieveParams
6565

66+
AccountHolders = Lithic::Models::AccountHolders
67+
6668
AccountHolderSimulateEnrollmentDocumentReviewParams =
6769
Lithic::Models::AccountHolderSimulateEnrollmentDocumentReviewParams
6870

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
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
Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
# frozen_string_literal: true
2+
3+
module Lithic
4+
module Models
5+
module AccountHolders
6+
# @see Lithic::Resources::AccountHolders::Entities#create
7+
class EntityCreateParams < Lithic::Internal::Type::BaseModel
8+
extend Lithic::Internal::Type::RequestParameters::Converter
9+
include Lithic::Internal::Type::RequestParameters
10+
11+
# @!attribute address
12+
# Individual's current address - PO boxes, UPS drops, and FedEx drops are not
13+
# acceptable; APO/FPO are acceptable. Only USA addresses are currently supported.
14+
#
15+
# @return [Lithic::Models::AccountHolders::EntityCreateParams::Address]
16+
required :address, -> { Lithic::AccountHolders::EntityCreateParams::Address }
17+
18+
# @!attribute dob
19+
# Individual's date of birth, as an RFC 3339 date.
20+
#
21+
# @return [String]
22+
required :dob, String
23+
24+
# @!attribute email
25+
# Individual's email address. If utilizing Lithic for chargeback processing, this
26+
# customer email address may be used to communicate dispute status and resolution.
27+
#
28+
# @return [String]
29+
required :email, String
30+
31+
# @!attribute first_name
32+
# Individual's first name, as it appears on government-issued identity documents.
33+
#
34+
# @return [String]
35+
required :first_name, String
36+
37+
# @!attribute government_id
38+
# Government-issued identification number (required for identity verification and
39+
# compliance with banking regulations). Social Security Numbers (SSN) and
40+
# Individual Taxpayer Identification Numbers (ITIN) are currently supported,
41+
# entered as full nine-digits, with or without hyphens
42+
#
43+
# @return [String]
44+
required :government_id, String
45+
46+
# @!attribute last_name
47+
# Individual's last name, as it appears on government-issued identity documents.
48+
#
49+
# @return [String]
50+
required :last_name, String
51+
52+
# @!attribute phone_number
53+
# Individual's phone number, entered in E.164 format.
54+
#
55+
# @return [String]
56+
required :phone_number, String
57+
58+
# @!attribute type
59+
# The type of entity to create on the account holder
60+
#
61+
# @return [Symbol, Lithic::Models::AccountHolders::EntityCreateParams::Type]
62+
required :type, enum: -> { Lithic::AccountHolders::EntityCreateParams::Type }
63+
64+
# @!method initialize(address:, dob:, email:, first_name:, government_id:, last_name:, phone_number:, type:, request_options: {})
65+
# Some parameter documentations has been truncated, see
66+
# {Lithic::Models::AccountHolders::EntityCreateParams} for more details.
67+
#
68+
# @param address [Lithic::Models::AccountHolders::EntityCreateParams::Address] Individual's current address - PO boxes, UPS drops, and FedEx drops are not acce
69+
#
70+
# @param dob [String] Individual's date of birth, as an RFC 3339 date.
71+
#
72+
# @param email [String] Individual's email address. If utilizing Lithic for chargeback processing, this
73+
#
74+
# @param first_name [String] Individual's first name, as it appears on government-issued identity documents.
75+
#
76+
# @param government_id [String] Government-issued identification number (required for identity verification and
77+
#
78+
# @param last_name [String] Individual's last name, as it appears on government-issued identity documents.
79+
#
80+
# @param phone_number [String] Individual's phone number, entered in E.164 format.
81+
#
82+
# @param type [Symbol, Lithic::Models::AccountHolders::EntityCreateParams::Type] The type of entity to create on the account holder
83+
#
84+
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}]
85+
86+
class Address < Lithic::Internal::Type::BaseModel
87+
# @!attribute address1
88+
# Valid deliverable address (no PO boxes).
89+
#
90+
# @return [String]
91+
required :address1, String
92+
93+
# @!attribute city
94+
# Name of city.
95+
#
96+
# @return [String]
97+
required :city, String
98+
99+
# @!attribute country
100+
# Valid country code. Only USA is currently supported, entered in uppercase ISO
101+
# 3166-1 alpha-3 three-character format.
102+
#
103+
# @return [String]
104+
required :country, String
105+
106+
# @!attribute postal_code
107+
# Valid postal code. Only USA ZIP codes are currently supported, entered as a
108+
# five-digit ZIP or nine-digit ZIP+4.
109+
#
110+
# @return [String]
111+
required :postal_code, String
112+
113+
# @!attribute state
114+
# Valid state code. Only USA state codes are currently supported, entered in
115+
# uppercase ISO 3166-2 two-character format.
116+
#
117+
# @return [String]
118+
required :state, String
119+
120+
# @!attribute address2
121+
# Unit or apartment number (if applicable).
122+
#
123+
# @return [String, nil]
124+
optional :address2, String
125+
126+
# @!method initialize(address1:, city:, country:, postal_code:, state:, address2: nil)
127+
# Some parameter documentations has been truncated, see
128+
# {Lithic::Models::AccountHolders::EntityCreateParams::Address} for more details.
129+
#
130+
# Individual's current address - PO boxes, UPS drops, and FedEx drops are not
131+
# acceptable; APO/FPO are acceptable. Only USA addresses are currently supported.
132+
#
133+
# @param address1 [String] Valid deliverable address (no PO boxes).
134+
#
135+
# @param city [String] Name of city.
136+
#
137+
# @param country [String] Valid country code. Only USA is currently supported, entered in uppercase ISO 31
138+
#
139+
# @param postal_code [String] Valid postal code. Only USA ZIP codes are currently supported, entered as a five
140+
#
141+
# @param state [String] Valid state code. Only USA state codes are currently supported, entered in upper
142+
#
143+
# @param address2 [String] Unit or apartment number (if applicable).
144+
end
145+
146+
# The type of entity to create on the account holder
147+
module Type
148+
extend Lithic::Internal::Type::Enum
149+
150+
BENEFICIAL_OWNER_INDIVIDUAL = :BENEFICIAL_OWNER_INDIVIDUAL
151+
CONTROL_PERSON = :CONTROL_PERSON
152+
153+
# @!method self.values
154+
# @return [Array<Symbol>]
155+
end
156+
end
157+
end
158+
end
159+
end

0 commit comments

Comments
 (0)