checkout_sdk 1.9.1 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/checkout_sdk/accounts/accounts.rb +11 -0
- data/lib/checkout_sdk/accounts/accounts_client.rb +29 -8
- data/lib/checkout_sdk/accounts/agreed_terms.rb +24 -0
- data/lib/checkout_sdk/accounts/articles_of_association.rb +14 -0
- data/lib/checkout_sdk/accounts/business_type.rb +12 -0
- data/lib/checkout_sdk/accounts/citizenship.rb +15 -0
- data/lib/checkout_sdk/accounts/company.rb +6 -0
- data/lib/checkout_sdk/accounts/company_position.rb +19 -0
- data/lib/checkout_sdk/accounts/date_of_incorporation.rb +5 -2
- data/lib/checkout_sdk/accounts/entity_roles.rb +13 -0
- data/lib/checkout_sdk/accounts/financial_statements.rb +14 -0
- data/lib/checkout_sdk/accounts/financial_statements_type.rb +9 -0
- data/lib/checkout_sdk/accounts/national_id_type.rb +15 -0
- data/lib/checkout_sdk/accounts/onboard_entity.rb +4 -0
- data/lib/checkout_sdk/accounts/onboard_sub_entity_documents.rb +5 -2
- data/lib/checkout_sdk/accounts/phone.rb +4 -1
- data/lib/checkout_sdk/accounts/processing_details.rb +7 -1
- data/lib/checkout_sdk/accounts/processing_details_ach.rb +21 -0
- data/lib/checkout_sdk/accounts/processing_details_payments.rb +12 -0
- data/lib/checkout_sdk/accounts/representative.rb +13 -3
- data/lib/checkout_sdk/accounts/representative_individual.rb +43 -0
- data/lib/checkout_sdk/api_client.rb +10 -6
- data/lib/checkout_sdk/checkout_api.rb +6 -0
- data/lib/checkout_sdk/common/headers.rb +4 -1
- data/lib/checkout_sdk/forward/create_secret_request.rb +1 -1
- data/lib/checkout_sdk/forward/forward_client.rb +4 -4
- data/lib/checkout_sdk/forward/update_secret_request.rb +1 -1
- data/lib/checkout_sdk/identities/address_document_verification/address_document_verification_attempt_request.rb +15 -0
- data/lib/checkout_sdk/identities/address_document_verification/address_document_verification_client.rb +79 -0
- data/lib/checkout_sdk/identities/address_document_verification/address_document_verification_request.rb +21 -0
- data/lib/checkout_sdk/identities/identities.rb +5 -0
- data/lib/checkout_sdk/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8b7aae1c3707fc4f1c0b73f5ca4cecceb1eaa052d54eabf28957746c8510871b
|
|
4
|
+
data.tar.gz: d5fe7d069ed73f21ce0735c812628264bb6c4032f4665bef2caadb62f1dc64f0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9090c0826b9a456ca253ff600da4074d43ef57ce214d864c7d85f74ba040f30d1542705fd6834d0dde2264f12bb66415762af749379529cf0256cd41daf5ab66
|
|
7
|
+
data.tar.gz: 654a11201af0922d2949831c9d4db6436c7badd6b858e5776dc54a109abf169872960f72fa82579c663a39e22891a0d9df09a94e614e26a95b48d0612c47769c
|
|
@@ -69,3 +69,14 @@ require 'checkout_sdk/accounts/rolling_reserve_rule'
|
|
|
69
69
|
require 'checkout_sdk/accounts/reserve_rule_update_request'
|
|
70
70
|
require 'checkout_sdk/accounts/reserve_rule_create_request'
|
|
71
71
|
require 'checkout_sdk/accounts/entity_files_request'
|
|
72
|
+
require 'checkout_sdk/accounts/agreed_terms'
|
|
73
|
+
require 'checkout_sdk/accounts/processing_details_ach'
|
|
74
|
+
require 'checkout_sdk/accounts/processing_details_payments'
|
|
75
|
+
require 'checkout_sdk/accounts/company_position'
|
|
76
|
+
require 'checkout_sdk/accounts/entity_roles'
|
|
77
|
+
require 'checkout_sdk/accounts/national_id_type'
|
|
78
|
+
require 'checkout_sdk/accounts/citizenship'
|
|
79
|
+
require 'checkout_sdk/accounts/representative_individual'
|
|
80
|
+
require 'checkout_sdk/accounts/financial_statements'
|
|
81
|
+
require 'checkout_sdk/accounts/financial_statements_type'
|
|
82
|
+
require 'checkout_sdk/accounts/articles_of_association'
|
|
@@ -14,6 +14,7 @@ module CheckoutSdk
|
|
|
14
14
|
REQUIREMENTS = 'requirements'
|
|
15
15
|
RESERVE_RULES = 'reserve-rules'
|
|
16
16
|
MEMBERS = 'members'
|
|
17
|
+
DEFAULT_SCHEMA_VERSION = '3.0'
|
|
17
18
|
private_constant :ACCOUNTS, :ENTITIES, :INSTRUMENT, :PAYOUT_SCHEDULE, :FILES, :PAYMENT_INSTRUMENTS,
|
|
18
19
|
:REQUIREMENTS, :RESERVE_RULES, :MEMBERS
|
|
19
20
|
|
|
@@ -26,19 +27,25 @@ module CheckoutSdk
|
|
|
26
27
|
end
|
|
27
28
|
|
|
28
29
|
# @param [Hash, OnboardEntity] entity_request
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
# @param [String] schema_version Accounts API schema version negotiated via the Accept header.
|
|
31
|
+
def create_entity(entity_request, schema_version = DEFAULT_SCHEMA_VERSION)
|
|
32
|
+
api_client.invoke_post(build_path(ACCOUNTS, ENTITIES), sdk_authorization, entity_request, nil,
|
|
33
|
+
build_schema_version_headers(schema_version))
|
|
31
34
|
end
|
|
32
35
|
|
|
33
36
|
# @param [String] entity_id
|
|
34
|
-
|
|
35
|
-
|
|
37
|
+
# @param [String] schema_version Accounts API schema version negotiated via the Accept header.
|
|
38
|
+
def get_entity(entity_id, schema_version = DEFAULT_SCHEMA_VERSION)
|
|
39
|
+
api_client.invoke_get(build_path(ACCOUNTS, ENTITIES, entity_id), sdk_authorization, nil,
|
|
40
|
+
build_schema_version_headers(schema_version))
|
|
36
41
|
end
|
|
37
42
|
|
|
38
43
|
# @param [String] entity_id
|
|
39
44
|
# @param [Hash, OnboardEntity] entity_request
|
|
40
|
-
|
|
41
|
-
|
|
45
|
+
# @param [String] schema_version Accounts API schema version negotiated via the Accept header.
|
|
46
|
+
def update_entity(entity_id, entity_request, schema_version = DEFAULT_SCHEMA_VERSION)
|
|
47
|
+
api_client.invoke_put(build_path(ACCOUNTS, ENTITIES, entity_id), sdk_authorization, entity_request,
|
|
48
|
+
build_schema_version_headers(schema_version))
|
|
42
49
|
end
|
|
43
50
|
|
|
44
51
|
# @deprecated Please use {#add_payment_instrument} instead
|
|
@@ -100,10 +107,13 @@ module CheckoutSdk
|
|
|
100
107
|
|
|
101
108
|
# Retrieve the list of pending requirements that a sub-entity must resolve.
|
|
102
109
|
# @param [String] entity_id
|
|
103
|
-
|
|
110
|
+
# @param [String] schema_version Accounts API schema version negotiated via the Accept header.
|
|
111
|
+
def get_entity_requirements(entity_id, schema_version = DEFAULT_SCHEMA_VERSION)
|
|
104
112
|
api_client.invoke_get(
|
|
105
113
|
build_path(ACCOUNTS, ENTITIES, entity_id, REQUIREMENTS),
|
|
106
|
-
sdk_authorization
|
|
114
|
+
sdk_authorization,
|
|
115
|
+
nil,
|
|
116
|
+
build_schema_version_headers(schema_version)
|
|
107
117
|
)
|
|
108
118
|
end
|
|
109
119
|
|
|
@@ -226,6 +236,17 @@ module CheckoutSdk
|
|
|
226
236
|
sdk_authorization
|
|
227
237
|
)
|
|
228
238
|
end
|
|
239
|
+
|
|
240
|
+
private
|
|
241
|
+
|
|
242
|
+
# Builds the versioned Accept header for Accounts onboarding operations.
|
|
243
|
+
# @param [String] schema_version
|
|
244
|
+
# @return [CheckoutSdk::Common::Headers]
|
|
245
|
+
def build_schema_version_headers(schema_version)
|
|
246
|
+
headers = CheckoutSdk::Common::Headers.new
|
|
247
|
+
headers.accept = "application/json;schema_version=#{schema_version}"
|
|
248
|
+
headers
|
|
249
|
+
end
|
|
229
250
|
end
|
|
230
251
|
end
|
|
231
252
|
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Accounts
|
|
5
|
+
# The terms of service the sub-entity agreed to (Accounts API v3.0, SaaS onboarding).
|
|
6
|
+
# @!attribute date
|
|
7
|
+
# @return [String] Date and time the terms were agreed (RFC 3339 / ISO 8601).
|
|
8
|
+
# @!attribute ip_address
|
|
9
|
+
# @return [String] IP address (IPv4 or IPv6) of the person at the time they agreed.
|
|
10
|
+
# @!attribute name
|
|
11
|
+
# @return [String] First and last name of the person who agreed to the terms.
|
|
12
|
+
# @!attribute email
|
|
13
|
+
# @return [String] Email address of the person who agreed to the terms.
|
|
14
|
+
# @!attribute version
|
|
15
|
+
# @return [String] Identifier of the terms version that was agreed.
|
|
16
|
+
class AgreedTerms
|
|
17
|
+
attr_accessor :date,
|
|
18
|
+
:ip_address,
|
|
19
|
+
:name,
|
|
20
|
+
:email,
|
|
21
|
+
:version
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Accounts
|
|
5
|
+
# @!attribute type
|
|
6
|
+
# @return [ArticlesOfAssociationType]
|
|
7
|
+
# @!attribute front
|
|
8
|
+
# @return [String]
|
|
9
|
+
class ArticlesOfAssociation
|
|
10
|
+
attr_accessor :type,
|
|
11
|
+
:front
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -3,13 +3,25 @@
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Accounts
|
|
5
5
|
module BusinessType
|
|
6
|
+
INDIVIDUAL_OR_SOLE_PROPRIETORSHIP = 'individual_or_sole_proprietorship'
|
|
6
7
|
GENERAL_PARTNERSHIP = 'general_partnership'
|
|
7
8
|
LIMITED_PARTNERSHIP = 'limited_partnership'
|
|
9
|
+
SCOTTISH_LIMITED_PARTNERSHIP = 'scottish_limited_partnership'
|
|
8
10
|
PUBLIC_LIMITED_COMPANY = 'public_limited_company'
|
|
9
11
|
LIMITED_COMPANY = 'limited_company'
|
|
12
|
+
LIMITED_LIABILITY_CORPORATION = 'limited_liability_corporation'
|
|
13
|
+
PRIVATE_CORPORATION = 'private_corporation'
|
|
14
|
+
PUBLICLY_TRADED_CORPORATION = 'publicly_traded_corporation'
|
|
10
15
|
PROFESSIONAL_ASSOCIATION = 'professional_association'
|
|
11
16
|
UNINCORPORATED_ASSOCIATION = 'unincorporated_association'
|
|
12
17
|
AUTO_ENTREPRENEUR = 'auto_entrepreneur'
|
|
18
|
+
GOVERNMENT_AGENCY = 'government_agency'
|
|
19
|
+
NON_PROFIT_ENTITY = 'non_profit_entity'
|
|
20
|
+
TRUST = 'trust'
|
|
21
|
+
CLUB_OR_SOCIETY = 'club_or_society'
|
|
22
|
+
REGULATED_FINANCIAL_INSTITUTION = 'regulated_financial_institution'
|
|
23
|
+
CFTC_REGISTERED_ENTITY = 'cftc_registered_entity'
|
|
24
|
+
SEC_REGISTERED_ENTITY = 'sec_registered_entity'
|
|
13
25
|
end
|
|
14
26
|
end
|
|
15
27
|
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Accounts
|
|
5
|
+
# A citizenship or legal status held by a company representative (Accounts API v3.0).
|
|
6
|
+
# @!attribute type
|
|
7
|
+
# @return [String] The type of citizenship or legal status (e.g. `citizenship`, `residency`).
|
|
8
|
+
# @!attribute country
|
|
9
|
+
# @return [String] {CheckoutSdk::Common::Country} two-letter ISO 3166-1 alpha-2 code.
|
|
10
|
+
class Citizenship
|
|
11
|
+
attr_accessor :type,
|
|
12
|
+
:country
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -10,6 +10,10 @@ module CheckoutSdk
|
|
|
10
10
|
# @return [String]
|
|
11
11
|
# @!attribute trading_name
|
|
12
12
|
# @return [String]
|
|
13
|
+
# @!attribute additional_trading_names
|
|
14
|
+
# @return [Array(String)]
|
|
15
|
+
# @!attribute is_registered_company
|
|
16
|
+
# @return [Boolean]
|
|
13
17
|
# @!attribute date_of_incorporation
|
|
14
18
|
# @return [DateOfIncorporation]
|
|
15
19
|
# @!attribute regulatory_licence_number
|
|
@@ -29,6 +33,8 @@ module CheckoutSdk
|
|
|
29
33
|
:business_type,
|
|
30
34
|
:legal_name,
|
|
31
35
|
:trading_name,
|
|
36
|
+
:additional_trading_names,
|
|
37
|
+
:is_registered_company,
|
|
32
38
|
:date_of_incorporation,
|
|
33
39
|
:regulatory_licence_number,
|
|
34
40
|
:principal_address,
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Accounts
|
|
5
|
+
module CompanyPosition
|
|
6
|
+
CEO = 'ceo'
|
|
7
|
+
CFO = 'cfo'
|
|
8
|
+
COO = 'coo'
|
|
9
|
+
MANAGING_MEMBER = 'managing_member'
|
|
10
|
+
GENERAL_PARTNER = 'general_partner'
|
|
11
|
+
PRESIDENT = 'president'
|
|
12
|
+
VICE_PRESIDENT = 'vice_president'
|
|
13
|
+
TREASURER = 'treasurer'
|
|
14
|
+
OTHER_SENIOR_MANAGEMENT = 'other_senior_management'
|
|
15
|
+
OTHER_EXECUTIVE_OFFICER = 'other_executive_officer'
|
|
16
|
+
OTHER_NON_EXECUTIVE_NON_SENIOR = 'other_non_executive_non_senior'
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -2,13 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Accounts
|
|
5
|
+
# @!attribute day
|
|
6
|
+
# @return [Integer]
|
|
5
7
|
# @!attribute month
|
|
6
8
|
# @return [Integer]
|
|
7
9
|
# @!attribute year
|
|
8
10
|
# @return [Integer]
|
|
9
11
|
class DateOfIncorporation
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
attr_accessor :day,
|
|
13
|
+
:month,
|
|
14
|
+
:year
|
|
12
15
|
end
|
|
13
16
|
end
|
|
14
17
|
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Accounts
|
|
5
|
+
module EntityRoles
|
|
6
|
+
UBO = 'ubo'
|
|
7
|
+
LEGAL_REPRESENTATIVE = 'legal_representative'
|
|
8
|
+
AUTHORISED_SIGNATORY = 'authorised_signatory'
|
|
9
|
+
DIRECTOR = 'director'
|
|
10
|
+
CONTROL_PERSON = 'control_person'
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Accounts
|
|
5
|
+
# @!attribute type
|
|
6
|
+
# @return [FinancialStatementsType]
|
|
7
|
+
# @!attribute front
|
|
8
|
+
# @return [String]
|
|
9
|
+
class FinancialStatements
|
|
10
|
+
attr_accessor :type,
|
|
11
|
+
:front
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Accounts
|
|
5
|
+
module NationalIdType
|
|
6
|
+
SSN = 'ssn'
|
|
7
|
+
ITIN = 'itin'
|
|
8
|
+
PASSPORT = 'passport'
|
|
9
|
+
DRIVING_LICENSE = 'driving_license'
|
|
10
|
+
NATIONAL_ID_CARD = 'national_id_card'
|
|
11
|
+
RESIDENCE_PERMIT = 'residence_permit'
|
|
12
|
+
OTHER = 'other'
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -23,6 +23,9 @@ module CheckoutSdk
|
|
|
23
23
|
# @!attribute seller_category
|
|
24
24
|
# @return [String] Identifier of a seller category configured on the platform
|
|
25
25
|
# during onboarding. Used for US ISV onboarding variants.
|
|
26
|
+
# @!attribute agreed_terms
|
|
27
|
+
# @return [AgreedTerms] Details of the person who agreed to the terms and
|
|
28
|
+
# conditions (Accounts API v3.0 SaaS onboarding).
|
|
26
29
|
# @!attribute submitter
|
|
27
30
|
# @return [Submitter] Captures evidence of the end-user's consent to onboarding.
|
|
28
31
|
# Used for US ISV onboarding variants.
|
|
@@ -37,6 +40,7 @@ module CheckoutSdk
|
|
|
37
40
|
:documents,
|
|
38
41
|
:additional_info,
|
|
39
42
|
:seller_category,
|
|
43
|
+
:agreed_terms,
|
|
40
44
|
:submitter
|
|
41
45
|
end
|
|
42
46
|
end
|
|
@@ -7,7 +7,7 @@ module CheckoutSdk
|
|
|
7
7
|
# @!attribute company_verification
|
|
8
8
|
# @return [CompanyVerification]
|
|
9
9
|
# @!attribute articles_of_association
|
|
10
|
-
# @return [
|
|
10
|
+
# @return [ArticlesOfAssociation]
|
|
11
11
|
# @!attribute bank_verification
|
|
12
12
|
# @return [BankVerification]
|
|
13
13
|
# @!attribute shareholder_structure
|
|
@@ -26,6 +26,8 @@ module CheckoutSdk
|
|
|
26
26
|
# @return [TaxVerification]
|
|
27
27
|
# @!attribute financial_verification
|
|
28
28
|
# @return [FinancialVerification]
|
|
29
|
+
# @!attribute financial_statements
|
|
30
|
+
# @return [FinancialStatements]
|
|
29
31
|
class OnboardSubEntityDocuments
|
|
30
32
|
attr_accessor :identity_verification,
|
|
31
33
|
:company_verification,
|
|
@@ -38,7 +40,8 @@ module CheckoutSdk
|
|
|
38
40
|
:additional_document2,
|
|
39
41
|
:additional_document3,
|
|
40
42
|
:tax_verification,
|
|
41
|
-
:financial_verification
|
|
43
|
+
:financial_verification,
|
|
44
|
+
:financial_statements
|
|
42
45
|
end
|
|
43
46
|
end
|
|
44
47
|
end
|
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Accounts
|
|
5
|
+
# @!attribute country_code
|
|
6
|
+
# @return [String] ISO 3166-1 alpha-2 country code (Accounts API v3.0), e.g. "GB".
|
|
5
7
|
# @!attribute number
|
|
6
8
|
# @return [String]
|
|
7
9
|
class Phone
|
|
8
|
-
attr_accessor :
|
|
10
|
+
attr_accessor :country_code,
|
|
11
|
+
:number
|
|
9
12
|
end
|
|
10
13
|
end
|
|
11
14
|
end
|
|
@@ -10,17 +10,23 @@ module CheckoutSdk
|
|
|
10
10
|
# @return [Integer]
|
|
11
11
|
# @!attribute average_transaction_value
|
|
12
12
|
# @return [Integer]
|
|
13
|
+
# @!attribute average_order_fulfillment_time
|
|
14
|
+
# @return [Integer]
|
|
13
15
|
# @!attribute highest_transaction_value
|
|
14
16
|
# @return [Integer]
|
|
15
17
|
# @!attribute currency
|
|
16
18
|
# @return [CheckoutSdk::Common::Currency]
|
|
19
|
+
# @!attribute payments
|
|
20
|
+
# @return [ProcessingDetailsPayments]
|
|
17
21
|
class ProcessingDetails
|
|
18
22
|
attr_accessor :settlement_country,
|
|
19
23
|
:target_countries,
|
|
20
24
|
:annual_processing_volume,
|
|
21
25
|
:average_transaction_value,
|
|
26
|
+
:average_order_fulfillment_time,
|
|
22
27
|
:highest_transaction_value,
|
|
23
|
-
:currency
|
|
28
|
+
:currency,
|
|
29
|
+
:payments
|
|
24
30
|
end
|
|
25
31
|
end
|
|
26
32
|
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Accounts
|
|
5
|
+
# ACH-specific processing details (Accounts API v3.0). All values in minor units without decimals.
|
|
6
|
+
# @!attribute annual_ach_volume
|
|
7
|
+
# @return [Integer]
|
|
8
|
+
# @!attribute average_ach_transaction_size
|
|
9
|
+
# @return [Integer]
|
|
10
|
+
# @!attribute estimated_monthly_credit_volume
|
|
11
|
+
# @return [Integer]
|
|
12
|
+
# @!attribute average_credit_amount
|
|
13
|
+
# @return [Integer]
|
|
14
|
+
class ProcessingDetailsAch
|
|
15
|
+
attr_accessor :annual_ach_volume,
|
|
16
|
+
:average_ach_transaction_size,
|
|
17
|
+
:estimated_monthly_credit_volume,
|
|
18
|
+
:average_credit_amount
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Accounts
|
|
5
|
+
# Payment method-specific processing details (Accounts API v3.0).
|
|
6
|
+
# @!attribute ach
|
|
7
|
+
# @return [ProcessingDetailsAch]
|
|
8
|
+
class ProcessingDetailsPayments
|
|
9
|
+
attr_accessor :ach
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -4,6 +4,12 @@ module CheckoutSdk
|
|
|
4
4
|
module Accounts
|
|
5
5
|
# @!attribute id
|
|
6
6
|
# @return [String]
|
|
7
|
+
# @!attribute individual
|
|
8
|
+
# @return [RepresentativeIndividual] Personal details (Accounts API v3.0).
|
|
9
|
+
# @!attribute company_position
|
|
10
|
+
# @return [String] {CompanyPosition}
|
|
11
|
+
# @!attribute ownership_percentage
|
|
12
|
+
# @return [Integer]
|
|
7
13
|
# @!attribute first_name
|
|
8
14
|
# @return [String]
|
|
9
15
|
# @!attribute last_name
|
|
@@ -24,15 +30,19 @@ module CheckoutSdk
|
|
|
24
30
|
# @return [OnboardSubEntityDocuments]
|
|
25
31
|
class Representative
|
|
26
32
|
attr_accessor :id,
|
|
33
|
+
:individual,
|
|
34
|
+
:company_position,
|
|
35
|
+
:ownership_percentage,
|
|
36
|
+
:roles,
|
|
37
|
+
:documents,
|
|
38
|
+
# v2.0 only — deprecated; use `individual` for v3.0
|
|
27
39
|
:first_name,
|
|
28
40
|
:last_name,
|
|
29
41
|
:address,
|
|
30
42
|
:identification,
|
|
31
43
|
:phone,
|
|
32
44
|
:date_of_birth,
|
|
33
|
-
:place_of_birth
|
|
34
|
-
:roles,
|
|
35
|
-
:documents
|
|
45
|
+
:place_of_birth
|
|
36
46
|
end
|
|
37
47
|
end
|
|
38
48
|
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Accounts
|
|
5
|
+
# The personal details of a company representative ("person of interest"), as required by the
|
|
6
|
+
# Accounts API v3.0 schema.
|
|
7
|
+
# @!attribute first_name
|
|
8
|
+
# @return [String]
|
|
9
|
+
# @!attribute middle_name
|
|
10
|
+
# @return [String]
|
|
11
|
+
# @!attribute last_name
|
|
12
|
+
# @return [String]
|
|
13
|
+
# @!attribute date_of_birth
|
|
14
|
+
# @return [DateOfBirth]
|
|
15
|
+
# @!attribute place_of_birth
|
|
16
|
+
# @return [PlaceOfBirth]
|
|
17
|
+
# @!attribute citizenships
|
|
18
|
+
# @return [Array(Citizenship)]
|
|
19
|
+
# @!attribute national_id_type
|
|
20
|
+
# @return [String] {NationalIdType}
|
|
21
|
+
# @!attribute national_id_number
|
|
22
|
+
# @return [String]
|
|
23
|
+
# @!attribute email_address
|
|
24
|
+
# @return [String]
|
|
25
|
+
# @!attribute phone
|
|
26
|
+
# @return [Phone]
|
|
27
|
+
# @!attribute address
|
|
28
|
+
# @return [CheckoutSdk::Common::Address]
|
|
29
|
+
class RepresentativeIndividual
|
|
30
|
+
attr_accessor :first_name,
|
|
31
|
+
:middle_name,
|
|
32
|
+
:last_name,
|
|
33
|
+
:date_of_birth,
|
|
34
|
+
:place_of_birth,
|
|
35
|
+
:citizenships,
|
|
36
|
+
:national_id_type,
|
|
37
|
+
:national_id_number,
|
|
38
|
+
:email_address,
|
|
39
|
+
:phone,
|
|
40
|
+
:address
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -14,12 +14,12 @@ module CheckoutSdk
|
|
|
14
14
|
@log = configuration.logger
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
def invoke_get(path, authorization, params = nil)
|
|
18
|
-
invoke(:get, path, authorization, params: params)
|
|
17
|
+
def invoke_get(path, authorization, params = nil, headers = nil)
|
|
18
|
+
invoke(:get, path, authorization, params: params, extra_headers: headers)
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
-
def invoke_post(path, authorization, request = nil, idempotency_key = nil)
|
|
22
|
-
invoke(:post, path, authorization, request, idempotency_key, params: nil)
|
|
21
|
+
def invoke_post(path, authorization, request = nil, idempotency_key = nil, headers = nil)
|
|
22
|
+
invoke(:post, path, authorization, request, idempotency_key, params: nil, extra_headers: headers)
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
def invoke_put(path, authorization, request, headers = nil)
|
|
@@ -71,9 +71,13 @@ module CheckoutSdk
|
|
|
71
71
|
# canonical HTTP header.
|
|
72
72
|
def apply_extra_headers(http_headers, extra_headers)
|
|
73
73
|
return if extra_headers.nil?
|
|
74
|
-
return unless extra_headers.respond_to?(:if_match) && extra_headers.if_match
|
|
75
74
|
|
|
76
|
-
|
|
75
|
+
if extra_headers.respond_to?(:if_match) && extra_headers.if_match
|
|
76
|
+
http_headers[:'If-Match'] = extra_headers.if_match
|
|
77
|
+
end
|
|
78
|
+
return unless extra_headers.respond_to?(:accept) && extra_headers.accept
|
|
79
|
+
|
|
80
|
+
http_headers[:Accept] = extra_headers.accept
|
|
77
81
|
end
|
|
78
82
|
|
|
79
83
|
def append_params(path, input_params)
|
|
@@ -67,6 +67,8 @@ module CheckoutSdk
|
|
|
67
67
|
# @return [CheckoutSdk::Identities::AmlScreening::AmlScreeningClient]
|
|
68
68
|
# @!attribute id_document_verification
|
|
69
69
|
# @return [CheckoutSdk::Identities::IdDocumentVerification::IdDocumentVerificationClient]
|
|
70
|
+
# @!attribute address_document_verification
|
|
71
|
+
# @return [CheckoutSdk::Identities::AddressDocumentVerification::AddressDocumentVerificationClient]
|
|
70
72
|
# @!attribute identity_verification
|
|
71
73
|
# @return [CheckoutSdk::Identities::IdentityVerification::IdentityVerificationClient]
|
|
72
74
|
# @!attribute face_authentication
|
|
@@ -109,6 +111,7 @@ module CheckoutSdk
|
|
|
109
111
|
:applicants,
|
|
110
112
|
:aml_screening,
|
|
111
113
|
:id_document_verification,
|
|
114
|
+
:address_document_verification,
|
|
112
115
|
:identity_verification,
|
|
113
116
|
:face_authentication,
|
|
114
117
|
:apple_pay,
|
|
@@ -152,6 +155,9 @@ module CheckoutSdk
|
|
|
152
155
|
@aml_screening = CheckoutSdk::Identities::AmlScreening::AmlScreeningClient.new(api_client, configuration)
|
|
153
156
|
@id_document_verification =
|
|
154
157
|
CheckoutSdk::Identities::IdDocumentVerification::IdDocumentVerificationClient.new(api_client, configuration)
|
|
158
|
+
@address_document_verification =
|
|
159
|
+
CheckoutSdk::Identities::AddressDocumentVerification::AddressDocumentVerificationClient.new(api_client,
|
|
160
|
+
configuration)
|
|
155
161
|
@identity_verification =
|
|
156
162
|
CheckoutSdk::Identities::IdentityVerification::IdentityVerificationClient.new(api_client, configuration)
|
|
157
163
|
@face_authentication =
|
|
@@ -9,8 +9,11 @@ module CheckoutSdk
|
|
|
9
9
|
#
|
|
10
10
|
# @!attribute if_match
|
|
11
11
|
# @return [String] ETag value to forward as the `If-Match` HTTP header.
|
|
12
|
+
# @!attribute accept
|
|
13
|
+
# @return [String] value to forward as the `Accept` HTTP header, e.g.
|
|
14
|
+
# `application/json;schema_version=3.0` for Accounts API schema negotiation.
|
|
12
15
|
class Headers
|
|
13
|
-
attr_accessor :if_match
|
|
16
|
+
attr_accessor :if_match, :accept
|
|
14
17
|
end
|
|
15
18
|
end
|
|
16
19
|
end
|
|
@@ -25,26 +25,26 @@ module CheckoutSdk
|
|
|
25
25
|
|
|
26
26
|
# @param [Hash, CreateSecretRequest] create_secret_request
|
|
27
27
|
def create_secret(create_secret_request)
|
|
28
|
-
api_client.invoke_post(build_path(
|
|
28
|
+
api_client.invoke_post(build_path(SECRETS),
|
|
29
29
|
sdk_authorization,
|
|
30
30
|
create_secret_request)
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
def get_secrets
|
|
34
|
-
api_client.invoke_get(build_path(
|
|
34
|
+
api_client.invoke_get(build_path(SECRETS), sdk_authorization)
|
|
35
35
|
end
|
|
36
36
|
|
|
37
37
|
# @param [String] name
|
|
38
38
|
# @param [Hash, UpdateSecretRequest] update_secret_request
|
|
39
39
|
def update_secret(name, update_secret_request)
|
|
40
|
-
api_client.invoke_patch(build_path(
|
|
40
|
+
api_client.invoke_patch(build_path(SECRETS, name),
|
|
41
41
|
sdk_authorization,
|
|
42
42
|
update_secret_request)
|
|
43
43
|
end
|
|
44
44
|
|
|
45
45
|
# @param [String] name
|
|
46
46
|
def delete_secret(name)
|
|
47
|
-
api_client.invoke_delete(build_path(
|
|
47
|
+
api_client.invoke_delete(build_path(SECRETS, name),
|
|
48
48
|
sdk_authorization)
|
|
49
49
|
end
|
|
50
50
|
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Identities
|
|
5
|
+
module AddressDocumentVerification
|
|
6
|
+
# Request body for POST /address-document-verifications/{id}/attempts.
|
|
7
|
+
#
|
|
8
|
+
# @!attribute document
|
|
9
|
+
# @return [String] The address document image to upload. [Required] Format: binary
|
|
10
|
+
class AddressDocumentVerificationAttemptRequest
|
|
11
|
+
attr_accessor :document
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Identities
|
|
5
|
+
module AddressDocumentVerification
|
|
6
|
+
# Client for the Identities — Address Document Verification (Adv) API.
|
|
7
|
+
class AddressDocumentVerificationClient < Client
|
|
8
|
+
ADDRESS_DOCUMENT_VERIFICATIONS = 'address-document-verifications'
|
|
9
|
+
ANONYMIZE = 'anonymize'
|
|
10
|
+
ATTEMPTS = 'attempts'
|
|
11
|
+
PDF_REPORT = 'pdf-report'
|
|
12
|
+
private_constant :ADDRESS_DOCUMENT_VERIFICATIONS, :ANONYMIZE, :ATTEMPTS, :PDF_REPORT
|
|
13
|
+
|
|
14
|
+
# @param [ApiClient] api_client
|
|
15
|
+
# @param [CheckoutConfiguration] configuration
|
|
16
|
+
def initialize(api_client, configuration)
|
|
17
|
+
super(api_client, configuration, CheckoutSdk::AuthorizationType::SECRET_KEY_OR_OAUTH)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# @param [Hash, AddressDocumentVerificationRequest] request
|
|
21
|
+
def create_address_document_verification(request)
|
|
22
|
+
api_client.invoke_post(ADDRESS_DOCUMENT_VERIFICATIONS, sdk_authorization, request)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# @param [String] address_document_verification_id
|
|
26
|
+
def get_address_document_verification(address_document_verification_id)
|
|
27
|
+
api_client.invoke_get(
|
|
28
|
+
build_path(ADDRESS_DOCUMENT_VERIFICATIONS, address_document_verification_id),
|
|
29
|
+
sdk_authorization
|
|
30
|
+
)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# @param [String] address_document_verification_id
|
|
34
|
+
def anonymize_address_document_verification(address_document_verification_id)
|
|
35
|
+
api_client.invoke_post(
|
|
36
|
+
build_path(ADDRESS_DOCUMENT_VERIFICATIONS, address_document_verification_id, ANONYMIZE),
|
|
37
|
+
sdk_authorization
|
|
38
|
+
)
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Create a new attempt for an existing address document verification.
|
|
42
|
+
# @param [String] address_document_verification_id
|
|
43
|
+
# @param [Hash, AddressDocumentVerificationAttemptRequest] attempt_request
|
|
44
|
+
def create_address_document_verification_attempt(address_document_verification_id, attempt_request = nil)
|
|
45
|
+
api_client.invoke_post(
|
|
46
|
+
build_path(ADDRESS_DOCUMENT_VERIFICATIONS, address_document_verification_id, ATTEMPTS),
|
|
47
|
+
sdk_authorization,
|
|
48
|
+
attempt_request
|
|
49
|
+
)
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# @param [String] address_document_verification_id
|
|
53
|
+
def get_address_document_verification_attempts(address_document_verification_id)
|
|
54
|
+
api_client.invoke_get(
|
|
55
|
+
build_path(ADDRESS_DOCUMENT_VERIFICATIONS, address_document_verification_id, ATTEMPTS),
|
|
56
|
+
sdk_authorization
|
|
57
|
+
)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# @param [String] address_document_verification_id
|
|
61
|
+
# @param [String] attempt_id
|
|
62
|
+
def get_address_document_verification_attempt(address_document_verification_id, attempt_id)
|
|
63
|
+
api_client.invoke_get(
|
|
64
|
+
build_path(ADDRESS_DOCUMENT_VERIFICATIONS, address_document_verification_id, ATTEMPTS, attempt_id),
|
|
65
|
+
sdk_authorization
|
|
66
|
+
)
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# @param [String] address_document_verification_id
|
|
70
|
+
def get_address_document_verification_pdf_report(address_document_verification_id)
|
|
71
|
+
api_client.invoke_get(
|
|
72
|
+
build_path(ADDRESS_DOCUMENT_VERIFICATIONS, address_document_verification_id, PDF_REPORT),
|
|
73
|
+
sdk_authorization
|
|
74
|
+
)
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Identities
|
|
5
|
+
module AddressDocumentVerification
|
|
6
|
+
# Request body for POST /address-document-verifications.
|
|
7
|
+
#
|
|
8
|
+
# @!attribute applicant_id
|
|
9
|
+
# @return [String] The applicant's unique identifier. [Required] Pattern: ^aplt_\w+$
|
|
10
|
+
# @!attribute user_journey_id
|
|
11
|
+
# @return [String] Your configuration ID. [Required] Pattern: ^usj_[a-z2-7]{26}$
|
|
12
|
+
# @!attribute declared_data
|
|
13
|
+
# @return [IdvDeclaredData, Hash] The personal details provided by the applicant. [Optional]
|
|
14
|
+
class AddressDocumentVerificationRequest
|
|
15
|
+
attr_accessor :applicant_id,
|
|
16
|
+
:user_journey_id,
|
|
17
|
+
:declared_data
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -14,6 +14,11 @@ require 'checkout_sdk/identities/aml_screening/aml_screening_client'
|
|
|
14
14
|
require 'checkout_sdk/identities/id_document_verification/id_document_verification_request'
|
|
15
15
|
require 'checkout_sdk/identities/id_document_verification/id_document_verification_client'
|
|
16
16
|
|
|
17
|
+
# Address Document Verification
|
|
18
|
+
require 'checkout_sdk/identities/address_document_verification/address_document_verification_request'
|
|
19
|
+
require 'checkout_sdk/identities/address_document_verification/address_document_verification_attempt_request'
|
|
20
|
+
require 'checkout_sdk/identities/address_document_verification/address_document_verification_client'
|
|
21
|
+
|
|
17
22
|
# Identity Verification
|
|
18
23
|
require 'checkout_sdk/identities/identity_verification/idv_declared_data'
|
|
19
24
|
require 'checkout_sdk/identities/identity_verification/idv_client_information'
|
data/lib/checkout_sdk/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: checkout_sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.10.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Checkout
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-07-
|
|
11
|
+
date: 2026-07-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|
|
@@ -149,11 +149,15 @@ files:
|
|
|
149
149
|
- lib/checkout_sdk/accounts/accounts_client.rb
|
|
150
150
|
- lib/checkout_sdk/accounts/additional_document.rb
|
|
151
151
|
- lib/checkout_sdk/accounts/additional_info.rb
|
|
152
|
+
- lib/checkout_sdk/accounts/agreed_terms.rb
|
|
153
|
+
- lib/checkout_sdk/accounts/articles_of_association.rb
|
|
152
154
|
- lib/checkout_sdk/accounts/articles_of_association_type.rb
|
|
153
155
|
- lib/checkout_sdk/accounts/bank_verification.rb
|
|
154
156
|
- lib/checkout_sdk/accounts/bank_verification_type.rb
|
|
155
157
|
- lib/checkout_sdk/accounts/business_type.rb
|
|
158
|
+
- lib/checkout_sdk/accounts/citizenship.rb
|
|
156
159
|
- lib/checkout_sdk/accounts/company.rb
|
|
160
|
+
- lib/checkout_sdk/accounts/company_position.rb
|
|
157
161
|
- lib/checkout_sdk/accounts/company_verification.rb
|
|
158
162
|
- lib/checkout_sdk/accounts/company_verification_type.rb
|
|
159
163
|
- lib/checkout_sdk/accounts/contact_details.rb
|
|
@@ -170,7 +174,10 @@ files:
|
|
|
170
174
|
- lib/checkout_sdk/accounts/entity_requirement_reason.rb
|
|
171
175
|
- lib/checkout_sdk/accounts/entity_requirement_update_request.rb
|
|
172
176
|
- lib/checkout_sdk/accounts/entity_requirement_update_status.rb
|
|
177
|
+
- lib/checkout_sdk/accounts/entity_roles.rb
|
|
173
178
|
- lib/checkout_sdk/accounts/file_request.rb
|
|
179
|
+
- lib/checkout_sdk/accounts/financial_statements.rb
|
|
180
|
+
- lib/checkout_sdk/accounts/financial_statements_type.rb
|
|
174
181
|
- lib/checkout_sdk/accounts/financial_verification.rb
|
|
175
182
|
- lib/checkout_sdk/accounts/financial_verification_type.rb
|
|
176
183
|
- lib/checkout_sdk/accounts/identification.rb
|
|
@@ -182,6 +189,7 @@ files:
|
|
|
182
189
|
- lib/checkout_sdk/accounts/instrument_details_sepa.rb
|
|
183
190
|
- lib/checkout_sdk/accounts/instrument_document.rb
|
|
184
191
|
- lib/checkout_sdk/accounts/invitee.rb
|
|
192
|
+
- lib/checkout_sdk/accounts/national_id_type.rb
|
|
185
193
|
- lib/checkout_sdk/accounts/onboard_entity.rb
|
|
186
194
|
- lib/checkout_sdk/accounts/onboard_sub_entity_documents.rb
|
|
187
195
|
- lib/checkout_sdk/accounts/payment_instrument.rb
|
|
@@ -190,12 +198,15 @@ files:
|
|
|
190
198
|
- lib/checkout_sdk/accounts/phone.rb
|
|
191
199
|
- lib/checkout_sdk/accounts/place_of_birth.rb
|
|
192
200
|
- lib/checkout_sdk/accounts/processing_details.rb
|
|
201
|
+
- lib/checkout_sdk/accounts/processing_details_ach.rb
|
|
202
|
+
- lib/checkout_sdk/accounts/processing_details_payments.rb
|
|
193
203
|
- lib/checkout_sdk/accounts/profile.rb
|
|
194
204
|
- lib/checkout_sdk/accounts/proof_of_legality.rb
|
|
195
205
|
- lib/checkout_sdk/accounts/proof_of_legality_type.rb
|
|
196
206
|
- lib/checkout_sdk/accounts/proof_of_principal_address.rb
|
|
197
207
|
- lib/checkout_sdk/accounts/proof_of_principal_address_type.rb
|
|
198
208
|
- lib/checkout_sdk/accounts/representative.rb
|
|
209
|
+
- lib/checkout_sdk/accounts/representative_individual.rb
|
|
199
210
|
- lib/checkout_sdk/accounts/reserve_rule_create_request.rb
|
|
200
211
|
- lib/checkout_sdk/accounts/reserve_rule_holding_duration.rb
|
|
201
212
|
- lib/checkout_sdk/accounts/reserve_rule_update_request.rb
|
|
@@ -305,6 +316,9 @@ files:
|
|
|
305
316
|
- lib/checkout_sdk/forward/forward_client.rb
|
|
306
317
|
- lib/checkout_sdk/forward/update_secret_request.rb
|
|
307
318
|
- lib/checkout_sdk/http_metadata.rb
|
|
319
|
+
- lib/checkout_sdk/identities/address_document_verification/address_document_verification_attempt_request.rb
|
|
320
|
+
- lib/checkout_sdk/identities/address_document_verification/address_document_verification_client.rb
|
|
321
|
+
- lib/checkout_sdk/identities/address_document_verification/address_document_verification_request.rb
|
|
308
322
|
- lib/checkout_sdk/identities/aml_screening/aml_screening_client.rb
|
|
309
323
|
- lib/checkout_sdk/identities/aml_screening/aml_search_parameters.rb
|
|
310
324
|
- lib/checkout_sdk/identities/aml_screening/aml_verification_request.rb
|