checkout_sdk 1.9.1 → 1.11.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/sessions/category.rb +1 -1
- data/lib/checkout_sdk/sessions/channel/browser_session.rb +8 -1
- data/lib/checkout_sdk/sessions/channel/three_ds_method_completion.rb +3 -3
- data/lib/checkout_sdk/sessions/experience.rb +18 -0
- data/lib/checkout_sdk/sessions/google_spa.rb +15 -0
- data/lib/checkout_sdk/sessions/session_challenge_indicator.rb +31 -0
- data/lib/checkout_sdk/sessions/session_request.rb +12 -7
- data/lib/checkout_sdk/sessions/sessions.rb +3 -0
- data/lib/checkout_sdk/sessions/shipping_indicator.rb +13 -1
- data/lib/checkout_sdk/sessions/source/card_source.rb +1 -4
- data/lib/checkout_sdk/sessions/source/session_scheme.rb +2 -0
- data/lib/checkout_sdk/sessions/transaction_type.rb +1 -1
- data/lib/checkout_sdk/version.rb +1 -1
- metadata +19 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 45ebb2b2eaa19b09ab21a461f8a5dd756a97e29d1bd06740e9de75b851100662
|
|
4
|
+
data.tar.gz: 5d28f0b1d1187bfb0ef21230eb51397f6b9ec8af9953763957f8fdd50a41753a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e6b22a9a4f136e7f9615a3ea24addfd683af30d416728e51fac8c145fe4c37c049d2bd97a2933161a4facf45cf1777e0b6da304c2b1ee035ccb2d467b05c6e26
|
|
7
|
+
data.tar.gz: '08954406dad8050207e56060670a2e2ea44c39339d95684abc4ed0ec7f71fc860ccacf8430c2854fe7b3037adbac0bea61ffd96344c4df2a9bb07bdd09540fa8'
|
|
@@ -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'
|
|
@@ -26,6 +26,11 @@ module CheckoutSdk
|
|
|
26
26
|
# @return [String]
|
|
27
27
|
# @!attribute ip_address
|
|
28
28
|
# @return [String]
|
|
29
|
+
# @!attribute iframe_payment_allowed
|
|
30
|
+
# @return [TrueClass, FalseClass] Whether the Payment API is enabled for all parent frames.
|
|
31
|
+
# Required for Google SPA support in hosted sessions.
|
|
32
|
+
# @!attribute user_agent_client_hint
|
|
33
|
+
# @return [String] The raw Sec-CH-UA header value. This can improve Google SPA support.
|
|
29
34
|
class BrowserSession < ChannelData
|
|
30
35
|
attr_accessor :three_ds_method_completion,
|
|
31
36
|
:accept_header,
|
|
@@ -37,7 +42,9 @@ module CheckoutSdk
|
|
|
37
42
|
:screen_width,
|
|
38
43
|
:timezone,
|
|
39
44
|
:user_agent,
|
|
40
|
-
:ip_address
|
|
45
|
+
:ip_address,
|
|
46
|
+
:iframe_payment_allowed,
|
|
47
|
+
:user_agent_client_hint
|
|
41
48
|
|
|
42
49
|
def initialize(three_ds_method_completion: CheckoutSdk::Sessions::ThreeDsMethodCompletion::U)
|
|
43
50
|
super(ChannelDataType::BROWSER)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Sessions
|
|
5
|
+
# The authentication experience chosen for a session.
|
|
6
|
+
#
|
|
7
|
+
# Used by {SessionRequest#preferred_experiences}, which takes an array of these values.
|
|
8
|
+
#
|
|
9
|
+
# [Optional]
|
|
10
|
+
module Experience
|
|
11
|
+
# 3D Secure authentication. The constant is named THREE_DS because a Ruby constant cannot
|
|
12
|
+
# begin with a digit; the wire value is '3ds'.
|
|
13
|
+
THREE_DS = '3ds'
|
|
14
|
+
# Google Secure Payment Authentication.
|
|
15
|
+
GOOGLE_SPA = 'google_spa'
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Sessions
|
|
5
|
+
# This object contains the Google SPA properties (non-hosted only).
|
|
6
|
+
#
|
|
7
|
+
# @!attribute continue_url
|
|
8
|
+
# @return [String] Fully qualified URL for redirecting the user's browser session after
|
|
9
|
+
# authentication. For example, this field may be the merchant's website for purchase
|
|
10
|
+
# confirmation once payment is complete. Required if in full redirect (not iframe) mode.
|
|
11
|
+
class GoogleSpa
|
|
12
|
+
attr_accessor :continue_url
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Sessions
|
|
5
|
+
# Indicates whether a challenge is requested for this session.
|
|
6
|
+
#
|
|
7
|
+
# Used by {SessionRequest#challenge_indicator} for POST /sessions. This is the only field in the
|
|
8
|
+
# API that accepts the exemption values below; the 3ds.challenge_indicator field on payments,
|
|
9
|
+
# hosted payments, payment links and payment sessions accepts only the first four values and is
|
|
10
|
+
# modelled by {CheckoutSdk::Common::ChallengeIndicator}.
|
|
11
|
+
#
|
|
12
|
+
# The following are requests for exemption: {LOW_VALUE}, {TRUSTED_LISTING},
|
|
13
|
+
# {TRUSTED_LISTING_PROMPT} and {TRANSACTION_RISK_ASSESSMENT}. If an exemption cannot be applied,
|
|
14
|
+
# then the value {NO_CHALLENGE_REQUESTED} will be used instead.
|
|
15
|
+
#
|
|
16
|
+
# [Optional]
|
|
17
|
+
# Default: {NO_PREFERENCE}
|
|
18
|
+
# max 50 characters
|
|
19
|
+
module SessionChallengeIndicator
|
|
20
|
+
NO_PREFERENCE = 'no_preference'
|
|
21
|
+
NO_CHALLENGE_REQUESTED = 'no_challenge_requested'
|
|
22
|
+
CHALLENGE_REQUESTED = 'challenge_requested'
|
|
23
|
+
CHALLENGE_REQUESTED_MANDATE = 'challenge_requested_mandate'
|
|
24
|
+
LOW_VALUE = 'low_value'
|
|
25
|
+
TRUSTED_LISTING = 'trusted_listing'
|
|
26
|
+
TRUSTED_LISTING_PROMPT = 'trusted_listing_prompt'
|
|
27
|
+
TRANSACTION_RISK_ASSESSMENT = 'transaction_risk_assessment'
|
|
28
|
+
DATA_SHARE = 'data_share'
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
require 'checkout_sdk/sessions/authentication_type'
|
|
4
4
|
require 'checkout_sdk/sessions/category'
|
|
5
5
|
require 'checkout_sdk/sessions/transaction_type'
|
|
6
|
-
require 'checkout_sdk/
|
|
6
|
+
require 'checkout_sdk/sessions/session_challenge_indicator'
|
|
7
7
|
|
|
8
8
|
module CheckoutSdk
|
|
9
9
|
module Sessions
|
|
@@ -24,15 +24,13 @@ module CheckoutSdk
|
|
|
24
24
|
# @!attribute account_info
|
|
25
25
|
# @return [CardHolderAccountInfo]
|
|
26
26
|
# @!attribute challenge_indicator
|
|
27
|
-
# @return [String] {
|
|
27
|
+
# @return [String] {SessionChallengeIndicator}
|
|
28
28
|
# @!attribute billing_descriptor
|
|
29
29
|
# @return [SessionsBillingDescriptor]
|
|
30
30
|
# @!attribute reference
|
|
31
31
|
# @return [String]
|
|
32
32
|
# @!attribute merchant_risk_info
|
|
33
33
|
# @return [MerchantRiskInfo]
|
|
34
|
-
# @!attribute prior_transaction_reference
|
|
35
|
-
# @return [String]
|
|
36
34
|
# @!attribute transaction_type
|
|
37
35
|
# @return [String] {TransactionType}
|
|
38
36
|
# @!attribute shipping_address
|
|
@@ -51,6 +49,12 @@ module CheckoutSdk
|
|
|
51
49
|
# @return [Optimization]
|
|
52
50
|
# @!attribute initial_transaction
|
|
53
51
|
# @return [InitialTransaction]
|
|
52
|
+
# @!attribute device_information
|
|
53
|
+
# @return [DeviceInformation]
|
|
54
|
+
# @!attribute google_spa
|
|
55
|
+
# @return [GoogleSpa] Google SPA properties (non-hosted only).
|
|
56
|
+
# @!attribute preferred_experiences
|
|
57
|
+
# @return [Array<String>] The chosen experience(s) for this session. {Experience}
|
|
54
58
|
class SessionRequest
|
|
55
59
|
attr_accessor :source,
|
|
56
60
|
:amount,
|
|
@@ -64,7 +68,6 @@ module CheckoutSdk
|
|
|
64
68
|
:billing_descriptor,
|
|
65
69
|
:reference,
|
|
66
70
|
:merchant_risk_info,
|
|
67
|
-
:prior_transaction_reference,
|
|
68
71
|
:transaction_type,
|
|
69
72
|
:shipping_address,
|
|
70
73
|
:shipping_address_matches_billing,
|
|
@@ -74,12 +77,14 @@ module CheckoutSdk
|
|
|
74
77
|
:installment,
|
|
75
78
|
:optimization,
|
|
76
79
|
:initial_transaction,
|
|
77
|
-
:device_information
|
|
80
|
+
:device_information,
|
|
81
|
+
:google_spa,
|
|
82
|
+
:preferred_experiences
|
|
78
83
|
|
|
79
84
|
def initialize(source: CardSource.new,
|
|
80
85
|
authentication_type: CheckoutSdk::Sessions::AuthenticationType::REGULAR,
|
|
81
86
|
authentication_category: CheckoutSdk::Sessions::Category::PAYMENT,
|
|
82
|
-
challenge_indicator: CheckoutSdk::
|
|
87
|
+
challenge_indicator: CheckoutSdk::Sessions::SessionChallengeIndicator::NO_PREFERENCE,
|
|
83
88
|
transaction_type: CheckoutSdk::Sessions::TransactionType::GOODS_SERVICE)
|
|
84
89
|
@source = source
|
|
85
90
|
@authentication_type = authentication_type
|
|
@@ -6,10 +6,13 @@ require 'checkout_sdk/sessions/card_holder_account_info'
|
|
|
6
6
|
require 'checkout_sdk/sessions/category'
|
|
7
7
|
require 'checkout_sdk/sessions/delivery_timeframe'
|
|
8
8
|
require 'checkout_sdk/sessions/device_information'
|
|
9
|
+
require 'checkout_sdk/sessions/experience'
|
|
10
|
+
require 'checkout_sdk/sessions/google_spa'
|
|
9
11
|
require 'checkout_sdk/sessions/installment'
|
|
10
12
|
require 'checkout_sdk/sessions/merchant_risk_info'
|
|
11
13
|
require 'checkout_sdk/sessions/recurring'
|
|
12
14
|
require 'checkout_sdk/sessions/session_address'
|
|
15
|
+
require 'checkout_sdk/sessions/session_challenge_indicator'
|
|
13
16
|
require 'checkout_sdk/sessions/session_marketplace_data'
|
|
14
17
|
require 'checkout_sdk/sessions/session_request'
|
|
15
18
|
require 'checkout_sdk/sessions/session_source_type'
|
|
@@ -2,8 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Sessions
|
|
5
|
+
# Indicates the shipping method chosen for the transaction.
|
|
6
|
+
#
|
|
7
|
+
# Used by {MerchantRiskInfo#shipping_indicator}. Choose the option that accurately describes the
|
|
8
|
+
# cardholder's specific transaction.
|
|
9
|
+
#
|
|
10
|
+
# [Optional]
|
|
5
11
|
module ShippingIndicator
|
|
6
|
-
|
|
12
|
+
BILLING_ADDRESS = 'billing_address'
|
|
13
|
+
ANOTHER_ADDRESS_ON_FILE = 'another_address_on_file'
|
|
14
|
+
NOT_ON_FILE = 'not_on_file'
|
|
15
|
+
STORE_PICK_UP = 'store_pick_up'
|
|
16
|
+
DIGITAL_GOODS = 'digital_goods'
|
|
17
|
+
TRAVEL_AND_EVENT_NO_SHIPPING = 'travel_and_event_no_shipping'
|
|
18
|
+
OTHER = 'other'
|
|
7
19
|
end
|
|
8
20
|
end
|
|
9
21
|
end
|
|
@@ -12,15 +12,12 @@ module CheckoutSdk
|
|
|
12
12
|
# @return [String]
|
|
13
13
|
# @!attribute stored
|
|
14
14
|
# @return [TrueClass, FalseClass]
|
|
15
|
-
# @!attribute store_for_future_use
|
|
16
|
-
# @return [TrueClass, FalseClass]
|
|
17
15
|
class CardSource < SessionSource
|
|
18
16
|
attr_accessor :number,
|
|
19
17
|
:expiry_month,
|
|
20
18
|
:expiry_year,
|
|
21
19
|
:name,
|
|
22
|
-
:stored
|
|
23
|
-
:store_for_future_use
|
|
20
|
+
:stored
|
|
24
21
|
|
|
25
22
|
def initialize(stored: false)
|
|
26
23
|
super(SessionSourceType::CARD)
|
|
@@ -7,7 +7,7 @@ module CheckoutSdk
|
|
|
7
7
|
CHECK_ACCEPTANCE = 'check_acceptance'
|
|
8
8
|
GOODS_SERVICE = 'goods_service'
|
|
9
9
|
PREPAID_ACTIVATION_AND_LOAD = 'prepaid_activation_and_load'
|
|
10
|
-
|
|
10
|
+
QUASI_CARD_TRANSACTION = 'quasi_card_transaction'
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
end
|
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.11.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-
|
|
11
|
+
date: 2026-08-06 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
|
|
@@ -621,6 +635,8 @@ files:
|
|
|
621
635
|
- lib/checkout_sdk/sessions/completion/non_hosted_completion_info.rb
|
|
622
636
|
- lib/checkout_sdk/sessions/delivery_timeframe.rb
|
|
623
637
|
- lib/checkout_sdk/sessions/device_information.rb
|
|
638
|
+
- lib/checkout_sdk/sessions/experience.rb
|
|
639
|
+
- lib/checkout_sdk/sessions/google_spa.rb
|
|
624
640
|
- lib/checkout_sdk/sessions/initial_transaction.rb
|
|
625
641
|
- lib/checkout_sdk/sessions/installment.rb
|
|
626
642
|
- lib/checkout_sdk/sessions/merchant_risk_info.rb
|
|
@@ -630,6 +646,7 @@ files:
|
|
|
630
646
|
- lib/checkout_sdk/sessions/recurring.rb
|
|
631
647
|
- lib/checkout_sdk/sessions/reorder_items_indicator_type.rb
|
|
632
648
|
- lib/checkout_sdk/sessions/session_address.rb
|
|
649
|
+
- lib/checkout_sdk/sessions/session_challenge_indicator.rb
|
|
633
650
|
- lib/checkout_sdk/sessions/session_marketplace_data.rb
|
|
634
651
|
- lib/checkout_sdk/sessions/session_request.rb
|
|
635
652
|
- lib/checkout_sdk/sessions/session_secret_credentials.rb
|