checkout_sdk 2.5.0 → 2.7.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 +8 -0
- data/lib/checkout_sdk/accounts/accounts_client.rb +35 -9
- data/lib/checkout_sdk/accounts/additional_document.rb +6 -0
- data/lib/checkout_sdk/accounts/additional_info.rb +5 -0
- data/lib/checkout_sdk/accounts/agreed_terms.rb +14 -1
- data/lib/checkout_sdk/accounts/articles_of_association.rb +8 -1
- data/lib/checkout_sdk/accounts/articles_of_association_type.rb +1 -0
- data/lib/checkout_sdk/accounts/bank_verification.rb +8 -1
- data/lib/checkout_sdk/accounts/bank_verification_type.rb +1 -0
- data/lib/checkout_sdk/accounts/business_type.rb +2 -0
- data/lib/checkout_sdk/accounts/certified_authorised_signatory.rb +24 -0
- data/lib/checkout_sdk/accounts/certified_authorised_signatory_type.rb +10 -0
- data/lib/checkout_sdk/accounts/citizenship.rb +6 -1
- data/lib/checkout_sdk/accounts/company.rb +54 -1
- data/lib/checkout_sdk/accounts/company_position.rb +1 -0
- data/lib/checkout_sdk/accounts/company_verification.rb +9 -0
- data/lib/checkout_sdk/accounts/company_verification_type.rb +3 -0
- data/lib/checkout_sdk/accounts/contact_details.rb +18 -0
- data/lib/checkout_sdk/accounts/date_of_birth.rb +10 -0
- data/lib/checkout_sdk/accounts/date_of_incorporation.rb +10 -0
- data/lib/checkout_sdk/accounts/document.rb +12 -0
- data/lib/checkout_sdk/accounts/document_type.rb +1 -0
- data/lib/checkout_sdk/accounts/entity_document.rb +5 -0
- data/lib/checkout_sdk/accounts/entity_email_addresses.rb +12 -1
- data/lib/checkout_sdk/accounts/entity_files_request.rb +4 -3
- data/lib/checkout_sdk/accounts/entity_financial_details.rb +15 -0
- data/lib/checkout_sdk/accounts/entity_financial_documents.rb +5 -0
- data/lib/checkout_sdk/accounts/entity_roles.rb +1 -0
- data/lib/checkout_sdk/accounts/file_purpose.rb +24 -0
- data/lib/checkout_sdk/accounts/file_request.rb +7 -0
- data/lib/checkout_sdk/accounts/financial_statements.rb +9 -1
- data/lib/checkout_sdk/accounts/financial_statements_type.rb +2 -0
- data/lib/checkout_sdk/accounts/financial_verification.rb +11 -3
- data/lib/checkout_sdk/accounts/financial_verification_type.rb +2 -0
- data/lib/checkout_sdk/accounts/identification.rb +7 -0
- data/lib/checkout_sdk/accounts/individual.rb +26 -0
- data/lib/checkout_sdk/accounts/invitee.rb +6 -0
- data/lib/checkout_sdk/accounts/national_id_type.rb +1 -0
- data/lib/checkout_sdk/accounts/onboard_entity.rb +30 -3
- data/lib/checkout_sdk/accounts/onboard_sub_entity_documents.rb +38 -1
- data/lib/checkout_sdk/accounts/phone.rb +7 -1
- data/lib/checkout_sdk/accounts/place_of_birth.rb +4 -0
- data/lib/checkout_sdk/accounts/processing_details.rb +27 -0
- data/lib/checkout_sdk/accounts/processing_details_ach.rb +14 -1
- data/lib/checkout_sdk/accounts/processing_details_payments.rb +3 -1
- data/lib/checkout_sdk/accounts/profile.rb +14 -0
- data/lib/checkout_sdk/accounts/proof_of_legality.rb +8 -1
- data/lib/checkout_sdk/accounts/proof_of_legality_type.rb +1 -0
- data/lib/checkout_sdk/accounts/proof_of_principal_address.rb +10 -3
- data/lib/checkout_sdk/accounts/proof_of_principal_address_type.rb +3 -0
- data/lib/checkout_sdk/accounts/proof_of_registration.rb +22 -0
- data/lib/checkout_sdk/accounts/proof_of_registration_type.rb +11 -0
- data/lib/checkout_sdk/accounts/proof_of_residential_address.rb +22 -0
- data/lib/checkout_sdk/accounts/proof_of_residential_address_type.rb +12 -0
- data/lib/checkout_sdk/accounts/representative.rb +67 -4
- data/lib/checkout_sdk/accounts/representative_documents.rb +43 -0
- data/lib/checkout_sdk/accounts/representative_individual.rb +35 -2
- data/lib/checkout_sdk/accounts/shareholder_structure.rb +9 -1
- data/lib/checkout_sdk/accounts/shareholder_structure_type.rb +1 -0
- data/lib/checkout_sdk/accounts/submitter.rb +4 -3
- data/lib/checkout_sdk/accounts/tax_verification.rb +8 -0
- data/lib/checkout_sdk/accounts/tax_verification_type.rb +1 -0
- data/lib/checkout_sdk/accounts/update_payment_instrument_request.rb +13 -1
- data/lib/checkout_sdk/payments/payments.rb +6 -0
- data/lib/checkout_sdk/payments/sessions/payment_methods_type.rb +36 -0
- data/lib/checkout_sdk/payments/setups/cash_app_action_type.rb +11 -0
- data/lib/checkout_sdk/payments/setups/cash_app_payment_method.rb +93 -0
- data/lib/checkout_sdk/payments/setups/payment_setup_device_client.rb +13 -0
- data/lib/checkout_sdk/payments/setups/payment_setup_device_os.rb +12 -0
- data/lib/checkout_sdk/payments/setups/payment_setup_payment_method_initialization.rb +12 -0
- data/lib/checkout_sdk/payments/setups/payment_setup_payment_method_status.rb +15 -0
- data/lib/checkout_sdk/payments/setups/payment_setups_client.rb +78 -8
- data/lib/checkout_sdk/version.rb +1 -1
- metadata +16 -2
|
@@ -2,32 +2,93 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Accounts
|
|
5
|
+
# A representative of the sub-entity. One class covers every shape the Accounts API defines: the v3.0
|
|
6
|
+
# person of interest (individual, roles, company_position, ownership_percentage, documents), the v3.0
|
|
7
|
+
# controlling company of EEA and GB Company Full (company, ownership_percentage), and the v2.0 company
|
|
8
|
+
# representative (the flat person fields, roles, documents and, on the US variants, identification).
|
|
5
9
|
# @!attribute id
|
|
10
|
+
# The representative's id.
|
|
11
|
+
# [Optional]
|
|
12
|
+
# ^rep_[a-z0-9]{26}$
|
|
13
|
+
# 30 characters
|
|
6
14
|
# @return [String]
|
|
7
15
|
# @!attribute individual
|
|
16
|
+
# Information about the individual representing the sub-entity.
|
|
17
|
+
# [Required] for every v3.0 person of interest.
|
|
8
18
|
# @return [RepresentativeIndividual] Personal details (Accounts API v3.0).
|
|
9
19
|
# @!attribute company_position
|
|
20
|
+
# The position of the representative within the company (required for the control_person role).
|
|
21
|
+
# [Optional] (EEA, GB and US Company Full (3.0) and US ISV Seller Company (3.0))
|
|
10
22
|
# @return [String] {CompanyPosition}
|
|
11
23
|
# @!attribute ownership_percentage
|
|
24
|
+
# The percentage ownership of the UBO or controlling company (required when over 25%).
|
|
25
|
+
# [Optional]
|
|
26
|
+
# min 25, max 100 on the EEA, GB and US Company Full (3.0) variants; min 0, max 100 on the US ISV
|
|
27
|
+
# Seller variants
|
|
12
28
|
# @return [Integer]
|
|
29
|
+
# @!attribute roles
|
|
30
|
+
# The individual's roles within the company ({EntityRoles} values). For sole traders, must be ubo only.
|
|
31
|
+
# [Required] for every variant except EEA and US Company Lite (2.0), where it is [Optional].
|
|
32
|
+
# @return [Array(String)] {EntityRoles}
|
|
33
|
+
# @!attribute documents
|
|
34
|
+
# Verification documents for the individual representative. On the EEA, GB and US Company Full (3.0)
|
|
35
|
+
# and Sole Trader Full (3.0) variants the API validates this object strictly and rejects any key the
|
|
36
|
+
# variant does not define; the US ISV Seller (3.0) and v2.0 variants do not declare it strict. See
|
|
37
|
+
# {RepresentativeDocuments} for the keys each variant accepts.
|
|
38
|
+
# [Required] for the EEA, GB and US Sole Trader Full (3.0) variants and EEA Company Full (2.0);
|
|
39
|
+
# [Optional] otherwise.
|
|
40
|
+
# @return [RepresentativeDocuments]
|
|
41
|
+
# @!attribute company
|
|
42
|
+
# The controlling company, when the representative is a company rather than an individual.
|
|
43
|
+
# [Required] for a controlling company representative (EEA and GB Company Full (3.0) only).
|
|
44
|
+
# The API reads only three attributes here, all [Required]: legal_name, trading_name and
|
|
45
|
+
# registered_address. Leave the other {Company} attributes unset.
|
|
46
|
+
# @return [Company]
|
|
13
47
|
# @!attribute first_name
|
|
48
|
+
# The representative's first name. Accounts API v2.0 only.
|
|
49
|
+
# [Required] (v2.0)
|
|
50
|
+
# min 2 characters, max 50 characters
|
|
51
|
+
# @deprecated Not used by the Accounts API v3.0 schema; use individual.
|
|
52
|
+
# @return [String]
|
|
53
|
+
# @!attribute middle_name
|
|
54
|
+
# The representative's middle name. Required if it appears in official documents. Accounts API v2.0
|
|
55
|
+
# only.
|
|
56
|
+
# [Optional]
|
|
57
|
+
# min 2 characters, max 50 characters
|
|
58
|
+
# @deprecated Not used by the Accounts API v3.0 schema; use individual.
|
|
14
59
|
# @return [String]
|
|
15
60
|
# @!attribute last_name
|
|
61
|
+
# The representative's last name. Accounts API v2.0 only.
|
|
62
|
+
# [Required] (v2.0)
|
|
63
|
+
# min 2 characters, max 50 characters
|
|
64
|
+
# @deprecated Not used by the Accounts API v3.0 schema; use individual.
|
|
16
65
|
# @return [String]
|
|
17
66
|
# @!attribute address
|
|
67
|
+
# The representative's address. Accounts API v2.0 only.
|
|
68
|
+
# [Required] (v2.0)
|
|
69
|
+
# @deprecated Not used by the Accounts API v3.0 schema; use individual.
|
|
18
70
|
# @return [CheckoutSdk::Common::Address]
|
|
19
71
|
# @!attribute identification
|
|
72
|
+
# The representative's identification. Accounts API v2.0 US Company variants only.
|
|
73
|
+
# [Required] for US Company Full (2.0); [Optional] for US Company Lite (2.0).
|
|
74
|
+
# @deprecated Not used by the Accounts API v3.0 schema.
|
|
20
75
|
# @return [Identification]
|
|
21
76
|
# @!attribute phone
|
|
77
|
+
# The representative's phone number. Accounts API v2.0 only.
|
|
78
|
+
# [Optional]
|
|
79
|
+
# @deprecated Not used by the Accounts API v3.0 schema; use individual.
|
|
22
80
|
# @return [Phone]
|
|
23
81
|
# @!attribute date_of_birth
|
|
82
|
+
# The date of birth of the person according to the Gregorian calendar. Accounts API v2.0 only.
|
|
83
|
+
# [Required] for the v2.0 Full variants; [Optional] for the v2.0 Lite variants.
|
|
84
|
+
# @deprecated Not used by the Accounts API v3.0 schema; use individual.
|
|
24
85
|
# @return [DateOfBirth]
|
|
25
86
|
# @!attribute place_of_birth
|
|
87
|
+
# The place of birth of the person. Accounts API v2.0 only.
|
|
88
|
+
# [Required] for EEA Company Full (2.0); [Optional] for EEA Company Lite (2.0). Not part of the other
|
|
89
|
+
# v2.0 variants.
|
|
90
|
+
# @deprecated Not used by the Accounts API v3.0 schema; use individual.
|
|
26
91
|
# @return [PlaceOfBirth]
|
|
27
|
-
# @!attribute roles
|
|
28
|
-
# @return [Array(String)]
|
|
29
|
-
# @!attribute documents
|
|
30
|
-
# @return [OnboardSubEntityDocuments]
|
|
31
92
|
class Representative
|
|
32
93
|
attr_accessor :id,
|
|
33
94
|
:individual,
|
|
@@ -35,8 +96,10 @@ module CheckoutSdk
|
|
|
35
96
|
:ownership_percentage,
|
|
36
97
|
:roles,
|
|
37
98
|
:documents,
|
|
99
|
+
:company,
|
|
38
100
|
# v2.0 only — deprecated; use `individual` for v3.0
|
|
39
101
|
:first_name,
|
|
102
|
+
:middle_name,
|
|
40
103
|
:last_name,
|
|
41
104
|
:address,
|
|
42
105
|
:identification,
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Accounts
|
|
5
|
+
# Verification documents for an individual representative, sent as company.representatives[].documents.
|
|
6
|
+
#
|
|
7
|
+
# On the EEA, GB and US Company Full (3.0) and the EEA, GB and US Sole Trader Full (3.0) variants the
|
|
8
|
+
# API validates this object strictly: a key it does not recognise is rejected, not ignored. The US ISV
|
|
9
|
+
# Seller variants (3.0) and the v2.0 variants do not declare it strict. These four are the only keys
|
|
10
|
+
# any variant defines, and which apply depends on the variant: EEA Sole Trader Full (3.0) requires
|
|
11
|
+
# identity_verification, proof_of_residential_address and proof_of_registration; GB and US Sole Trader
|
|
12
|
+
# Full (3.0) require identity_verification; the EEA, GB and US Company Full (3.0) variants and US ISV
|
|
13
|
+
# Seller Company (3.0) accept identity_verification and certified_authorised_signatory, both optional;
|
|
14
|
+
# US ISV Seller Sole Trader (3.0) accepts identity_verification, optional. The v2.0 company
|
|
15
|
+
# representatives use identity_verification only.
|
|
16
|
+
#
|
|
17
|
+
# Leave an attribute unset rather than assigning nil: an attribute set to nil is sent as null.
|
|
18
|
+
# Company-level documents such as bank_verification belong on {OnboardSubEntityDocuments}.
|
|
19
|
+
# @!attribute identity_verification
|
|
20
|
+
# The document to use to confirm the individual's identity.
|
|
21
|
+
# [Optional] (required for the sole trader full variants)
|
|
22
|
+
# @return [Document]
|
|
23
|
+
# @!attribute certified_authorised_signatory
|
|
24
|
+
# Certified authorised signatory document. Required when the legal representative or other role
|
|
25
|
+
# owner is not registered on the certificate of incorporation.
|
|
26
|
+
# [Optional] (EEA, GB and US Company Full (3.0) and US ISV Seller Company (3.0) only)
|
|
27
|
+
# @return [CertifiedAuthorisedSignatory]
|
|
28
|
+
# @!attribute proof_of_residential_address
|
|
29
|
+
# Proof of residential address of the representative.
|
|
30
|
+
# [Optional] (required for EEA Sole Trader Full (3.0), and only valid there)
|
|
31
|
+
# @return [ProofOfResidentialAddress]
|
|
32
|
+
# @!attribute proof_of_registration
|
|
33
|
+
# Proof of the sole trader's registration, for example an extract from a trade register.
|
|
34
|
+
# [Optional] (required for EEA Sole Trader Full (3.0), and only valid there)
|
|
35
|
+
# @return [ProofOfRegistration]
|
|
36
|
+
class RepresentativeDocuments
|
|
37
|
+
attr_accessor :identity_verification,
|
|
38
|
+
:certified_authorised_signatory,
|
|
39
|
+
:proof_of_residential_address,
|
|
40
|
+
:proof_of_registration
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -2,29 +2,62 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Accounts
|
|
5
|
-
# The personal details of a company representative (
|
|
6
|
-
#
|
|
5
|
+
# The personal details of a company representative (company.representatives[].individual), Accounts
|
|
6
|
+
# API v3.0.
|
|
7
7
|
# @!attribute first_name
|
|
8
|
+
# The representative's first name.
|
|
9
|
+
# [Required]
|
|
10
|
+
# min 2 characters, max 50 characters
|
|
8
11
|
# @return [String]
|
|
9
12
|
# @!attribute middle_name
|
|
13
|
+
# The representative's middle name. Required if it appears in official documents.
|
|
14
|
+
# [Optional]
|
|
15
|
+
# min 2 characters, max 50 characters
|
|
10
16
|
# @return [String]
|
|
11
17
|
# @!attribute last_name
|
|
18
|
+
# The representative's last name.
|
|
19
|
+
# [Required]
|
|
20
|
+
# min 2 characters, max 50 characters
|
|
12
21
|
# @return [String]
|
|
13
22
|
# @!attribute date_of_birth
|
|
23
|
+
# The date of birth of the person according to the Gregorian calendar.
|
|
24
|
+
# [Required]
|
|
14
25
|
# @return [DateOfBirth]
|
|
15
26
|
# @!attribute place_of_birth
|
|
27
|
+
# The place of birth of the person.
|
|
28
|
+
# [Required]
|
|
16
29
|
# @return [PlaceOfBirth]
|
|
17
30
|
# @!attribute citizenships
|
|
31
|
+
# The list of citizenships or legal statuses for the representative.
|
|
32
|
+
# [Required] for the US ISV Seller variants only; not part of the other v3.0 schemas, leave unset for
|
|
33
|
+
# them.
|
|
18
34
|
# @return [Array(Citizenship)]
|
|
19
35
|
# @!attribute national_id_type
|
|
36
|
+
# The classification of the national identification number provided.
|
|
37
|
+
# [Required] for the US ISV Seller variants only; not part of the other v3.0 schemas, leave unset for
|
|
38
|
+
# them.
|
|
20
39
|
# @return [String] {NationalIdType}
|
|
21
40
|
# @!attribute national_id_number
|
|
41
|
+
# The representative's national identification number.
|
|
42
|
+
# [Required] for the US ISV Seller variants; [Optional] for the other v3.0 variants.
|
|
43
|
+
# The format depends on the variant:
|
|
44
|
+
# US ISV Seller: the number for the national_id_type given. ^[a-zA-Z0-9\-]+$, min 5 characters, max
|
|
45
|
+
# 16 characters.
|
|
46
|
+
# Other v3.0 variants: a Social Security Number (SSN) or Individual Taxpayer Identification Number
|
|
47
|
+
# (ITIN), US residents only. ^\d{9}$, 9 characters.
|
|
22
48
|
# @return [String]
|
|
23
49
|
# @!attribute email_address
|
|
50
|
+
# The representative's personal email address.
|
|
51
|
+
# [Required] for the US ISV Seller variants; [Optional] for the other v3.0 variants.
|
|
52
|
+
# Format: email
|
|
24
53
|
# @return [String]
|
|
25
54
|
# @!attribute phone
|
|
55
|
+
# The representative's phone number.
|
|
56
|
+
# [Required] for the US ISV Seller variants; [Optional] for the other v3.0 variants.
|
|
26
57
|
# @return [Phone]
|
|
27
58
|
# @!attribute address
|
|
59
|
+
# The representative's address.
|
|
60
|
+
# [Required]
|
|
28
61
|
# @return [CheckoutSdk::Common::Address]
|
|
29
62
|
class RepresentativeIndividual
|
|
30
63
|
attr_accessor :first_name,
|
|
@@ -2,9 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Accounts
|
|
5
|
+
# Shareholder structure chart (including % of shares) certified by a competent authority individual and
|
|
6
|
+
# dated within the last 3 months.
|
|
5
7
|
# @!attribute type
|
|
6
|
-
#
|
|
8
|
+
# The type of document.
|
|
9
|
+
# [Required]
|
|
10
|
+
# @return [String] {ShareholderStructureType}
|
|
7
11
|
# @!attribute front
|
|
12
|
+
# The ID of the front side of the document as represented within Checkout.com systems.
|
|
13
|
+
# [Required]
|
|
14
|
+
# ^file_[a-z2-7]{26}$
|
|
15
|
+
# 31 characters
|
|
8
16
|
# @return [String]
|
|
9
17
|
class ShareholderStructure
|
|
10
18
|
attr_accessor :type,
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Accounts
|
|
5
|
-
#
|
|
6
|
-
#
|
|
5
|
+
# Not defined by any Accounts API onboarding schema.
|
|
6
|
+
# @deprecated Not part of any Accounts API onboarding schema; the API does not read it.
|
|
7
7
|
# @!attribute ip_address
|
|
8
|
-
# @
|
|
8
|
+
# @deprecated Not defined by any Accounts API onboarding schema.
|
|
9
|
+
# @return [String]
|
|
9
10
|
class Submitter
|
|
10
11
|
attr_accessor :ip_address
|
|
11
12
|
end
|
|
@@ -2,9 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Accounts
|
|
5
|
+
# IRS-issued Employer Identification Number document used to verify the entity's tax identification
|
|
6
|
+
# (US variants).
|
|
5
7
|
# @!attribute type
|
|
8
|
+
# The type of IRS-issued document used for tax verification.
|
|
9
|
+
# [Required]
|
|
6
10
|
# @return [String] {TaxVerificationType}
|
|
7
11
|
# @!attribute front
|
|
12
|
+
# The ID of the front side of the document as represented within Checkout.com systems.
|
|
13
|
+
# [Required]
|
|
14
|
+
# ^file_[a-z2-7]{26}$
|
|
15
|
+
# 31 characters
|
|
8
16
|
# @return [String]
|
|
9
17
|
class TaxVerification
|
|
10
18
|
attr_accessor :type,
|
|
@@ -2,12 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Accounts
|
|
5
|
+
# Request for PATCH /accounts/entities/{entityId}/payment-instruments/{id}
|
|
6
|
+
# (PlatformsPaymentInstrumentUpdate).
|
|
5
7
|
# @!attribute label
|
|
8
|
+
# A reference that you can use to identify the payment instrument.
|
|
9
|
+
# [Optional]
|
|
10
|
+
# min 1 character, max 50 characters
|
|
6
11
|
# @return [String]
|
|
7
12
|
# @!attribute default
|
|
13
|
+
# Deprecated by the API: for scheduled payouts the first payment instrument created for a currency
|
|
14
|
+
# is used; to change it, update the payout schedule.
|
|
15
|
+
# [Optional]
|
|
8
16
|
# @return [TrueClass, FalseClass]
|
|
9
17
|
# @!attribute headers
|
|
10
|
-
#
|
|
18
|
+
# The payment instrument ETag, as returned in the ETag header of the GET, in headers.if_match.
|
|
19
|
+
# {AccountsClient#update_payment_instrument} sends it as the If-Match HTTP header; the API
|
|
20
|
+
# answers 428 without it and 412 when it does not match.
|
|
21
|
+
# [Required] by the API.
|
|
22
|
+
# @return [CheckoutSdk::Common::Headers]
|
|
11
23
|
class UpdatePaymentInstrumentRequest
|
|
12
24
|
attr_accessor :label,
|
|
13
25
|
:default,
|
|
@@ -233,6 +233,12 @@ require 'checkout_sdk/payments/setups/blik_payment_method'
|
|
|
233
233
|
require 'checkout_sdk/payments/setups/bacs_payment_method'
|
|
234
234
|
require 'checkout_sdk/payments/setups/card_present_payment_method'
|
|
235
235
|
require 'checkout_sdk/payments/setups/pay_by_bank_payment_method'
|
|
236
|
+
require 'checkout_sdk/payments/setups/cash_app_action_type'
|
|
237
|
+
require 'checkout_sdk/payments/setups/cash_app_payment_method'
|
|
238
|
+
require 'checkout_sdk/payments/setups/payment_setup_device_client'
|
|
239
|
+
require 'checkout_sdk/payments/setups/payment_setup_device_os'
|
|
240
|
+
require 'checkout_sdk/payments/setups/payment_setup_payment_method_initialization'
|
|
241
|
+
require 'checkout_sdk/payments/setups/payment_setup_payment_method_status'
|
|
236
242
|
require 'checkout_sdk/payments/setups/stablecoin_payment_method'
|
|
237
243
|
require 'checkout_sdk/payments/setups/payment_setups_client'
|
|
238
244
|
|
|
@@ -2,19 +2,55 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Payments
|
|
5
|
+
# The type of payment method that can be enabled or disabled for a payment session.
|
|
6
|
+
#
|
|
7
|
+
# This is a consolidated list covering every payment method the Flow API accepts for
|
|
8
|
+
# enabled_payment_methods / disabled_payment_methods. Constants marked deprecated are no
|
|
9
|
+
# longer part of the specification but are kept for backward compatibility.
|
|
5
10
|
module PaymentMethodsType
|
|
11
|
+
ALIPAY_CN = 'alipay_cn'
|
|
12
|
+
ALIPAY_HK = 'alipay_hk'
|
|
13
|
+
ALMA = 'alma'
|
|
6
14
|
APPLEPAY = 'applepay'
|
|
7
15
|
BANCONTACT = 'bancontact'
|
|
16
|
+
BENEFIT = 'benefit'
|
|
17
|
+
BIZUM = 'bizum'
|
|
8
18
|
CARD = 'card'
|
|
19
|
+
DANA = 'dana'
|
|
9
20
|
EPS = 'eps'
|
|
21
|
+
# @deprecated No longer part of the specification.
|
|
10
22
|
GIROPAY = 'giropay'
|
|
23
|
+
GCASH = 'gcash'
|
|
11
24
|
GOOGLEPAY = 'googlepay'
|
|
12
25
|
IDEAL = 'ideal'
|
|
26
|
+
KAKAOPAY = 'kakaopay'
|
|
27
|
+
KLARNA = 'klarna'
|
|
13
28
|
KNET = 'knet'
|
|
29
|
+
MBWAY = 'mbway'
|
|
30
|
+
MOBILEPAY = 'mobilepay'
|
|
14
31
|
MULTIBANCO = 'multibanco'
|
|
32
|
+
OCTOPUS = 'octopus'
|
|
15
33
|
PRZELEWY24 = 'p24'
|
|
34
|
+
PAYNOW = 'paynow'
|
|
16
35
|
PAYPAL = 'paypal'
|
|
36
|
+
PLAID = 'plaid'
|
|
37
|
+
QPAY = 'qpay'
|
|
38
|
+
# Fully supported by the API but deliberately unlisted in the public specification, so
|
|
39
|
+
# that merchants do not disable Remember Me en masse. Do not remove it as an unspecified
|
|
40
|
+
# value.
|
|
41
|
+
REMEMBER_ME = 'remember_me'
|
|
42
|
+
SEPA = 'sepa'
|
|
43
|
+
# @deprecated No longer part of the specification.
|
|
17
44
|
SOFORT = 'sofort'
|
|
45
|
+
STCPAY = 'stcpay'
|
|
46
|
+
STORED_CARD = 'stored_card'
|
|
47
|
+
TABBY = 'tabby'
|
|
48
|
+
TAMARA = 'tamara'
|
|
49
|
+
TNG = 'tng'
|
|
50
|
+
TRUEMONEY = 'truemoney'
|
|
51
|
+
TWINT = 'twint'
|
|
52
|
+
VIPPS = 'vipps'
|
|
53
|
+
WECHATPAY = 'wechatpay'
|
|
18
54
|
end
|
|
19
55
|
end
|
|
20
56
|
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Payments
|
|
5
|
+
# The type of the next available action for the Cash App Pay payment method on a
|
|
6
|
+
# Payment Setup. Maps swagger `CashApp.action.type`.
|
|
7
|
+
module CashAppActionType
|
|
8
|
+
REDIRECT = 'redirect'
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Payments
|
|
5
|
+
# The Cash App payment method's details and configuration on a Payment Setup.
|
|
6
|
+
# Maps swagger `CashApp`. Sent under the `payment_methods.cashapp` key (one lowercase word,
|
|
7
|
+
# not `cash_app`).
|
|
8
|
+
#
|
|
9
|
+
# The Payment Setup request is a Hash, and a Hash request is sent as is, so do not nest an
|
|
10
|
+
# instance of this class in it directly: it would not be serialized. Pass a Hash with these keys,
|
|
11
|
+
# or convert an instance first:
|
|
12
|
+
# cash_app = CheckoutSdk::Payments::CashAppPaymentMethod.new
|
|
13
|
+
# cash_app.initialization = 'enabled'
|
|
14
|
+
# cash_app.customer_profile_sharing = true
|
|
15
|
+
# request[:payment_methods] = { cashapp: CheckoutSdk::JsonSerializer.to_custom_hash(cash_app) }
|
|
16
|
+
# Responses are read with dot access, for example response.payment_methods.cashapp.action.redirect_url.
|
|
17
|
+
class CashAppPaymentMethod
|
|
18
|
+
# The payment method status.
|
|
19
|
+
# [Optional]
|
|
20
|
+
# Read only.
|
|
21
|
+
# Enum: "unavailable" "action_required" "ready" "initialization_required" "invalid"
|
|
22
|
+
# @return [String] One of {PaymentSetupPaymentMethodStatus}.
|
|
23
|
+
attr_accessor :status
|
|
24
|
+
|
|
25
|
+
# The list of error codes or indicators that highlight missing or invalid information.
|
|
26
|
+
# [Optional]
|
|
27
|
+
# Read only.
|
|
28
|
+
# @return [Array(String)]
|
|
29
|
+
attr_accessor :flags
|
|
30
|
+
|
|
31
|
+
# The initialization state of the payment method.
|
|
32
|
+
# When you create a Payment Setup, this defaults to `disabled`.
|
|
33
|
+
# [Optional]
|
|
34
|
+
# Default: "disabled"
|
|
35
|
+
# Enum: "disabled" "enabled"
|
|
36
|
+
# @return [String] One of {PaymentSetupPaymentMethodInitialization}.
|
|
37
|
+
attr_accessor :initialization
|
|
38
|
+
|
|
39
|
+
# Indicates whether the customer consents to share their Cash App customer profile with Checkout.com.
|
|
40
|
+
# [Optional]
|
|
41
|
+
# @return [TrueClass, FalseClass]
|
|
42
|
+
attr_accessor :customer_profile_sharing
|
|
43
|
+
|
|
44
|
+
# The customer's Cash App profile that they consented to share. Included in the response when
|
|
45
|
+
# `customer_profile_sharing` is enabled.
|
|
46
|
+
# Cash App releases this profile only once. It's present in the first successful response when you
|
|
47
|
+
# get the Payment Setup after the customer authorizes the payment. Every subsequent response omits it.
|
|
48
|
+
# [Optional]
|
|
49
|
+
# Read only.
|
|
50
|
+
# Keys (all strings, all optional):
|
|
51
|
+
# - `customer_id`: Cash App's identifier for the customer. This is not a Checkout.com customer identifier.
|
|
52
|
+
# - `cashtag`: The customer's $Cashtag.
|
|
53
|
+
# - `reference_id`: Cash App's reference for the customer profile.
|
|
54
|
+
# - `full_name`: The customer's full name.
|
|
55
|
+
# - `given_name`: The customer's given name.
|
|
56
|
+
# - `middle_name`: The customer's middle name.
|
|
57
|
+
# - `family_name`: The customer's family name.
|
|
58
|
+
# - `suffix`: The suffix of the customer's name.
|
|
59
|
+
# - `birth_date`: The customer's date of birth. Format: date (the API example carries a time part,
|
|
60
|
+
# so the value is kept as a string).
|
|
61
|
+
# - `address` (Hash): The customer's address, with Cash App's own key names (not the Checkout.com
|
|
62
|
+
# common address): `address_line_1` (the first line of the address), `address_line_2` (the second
|
|
63
|
+
# line of the address), `address_line_3` (the third line of the address), `locality` (the address
|
|
64
|
+
# locality, such as the city or town), `sublocality` (the address sublocality, such as the district
|
|
65
|
+
# or neighborhood), `administrative_district_level_1` (the address's top-level administrative
|
|
66
|
+
# district, such as the state or province), `postal_code` (the postal or zip code) and `country`
|
|
67
|
+
# (the address country, in ISO 3166-1 alpha-2 format, max 2 characters).
|
|
68
|
+
# - `phone_number`: The customer's phone number.
|
|
69
|
+
# - `email_address`: The customer's email address.
|
|
70
|
+
# - `customer_since`: The date and time the customer's Cash App account was created.
|
|
71
|
+
# Format: date-time (kept as a string).
|
|
72
|
+
# @return [Hash]
|
|
73
|
+
attr_accessor :customer_profile
|
|
74
|
+
|
|
75
|
+
# A reference for the Cash App Pay transaction, returned by the provider.
|
|
76
|
+
# [Optional]
|
|
77
|
+
# Read only.
|
|
78
|
+
# max 80 characters
|
|
79
|
+
# @return [String]
|
|
80
|
+
attr_accessor :reference
|
|
81
|
+
|
|
82
|
+
# The next available action for the payment method.
|
|
83
|
+
# [Optional]
|
|
84
|
+
# Read only.
|
|
85
|
+
# Keys:
|
|
86
|
+
# - `type` (String): The type of action. One of {CashAppActionType}.
|
|
87
|
+
# - `redirect_url` (String): The URL to redirect the customer to so they can authorize the payment
|
|
88
|
+
# with Cash App. Format: uri
|
|
89
|
+
# @return [Hash]
|
|
90
|
+
attr_accessor :action
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Payments
|
|
5
|
+
# The type of client the customer uses to initiate the payment.
|
|
6
|
+
# Maps swagger `PaymentSetup.customer.device.client`.
|
|
7
|
+
module PaymentSetupDeviceClient
|
|
8
|
+
WEB = 'web'
|
|
9
|
+
MOBILE_WEB = 'mobile_web'
|
|
10
|
+
APP = 'app'
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Payments
|
|
5
|
+
# The operating system of the customer's device.
|
|
6
|
+
# Maps swagger `PaymentSetup.customer.device.os`.
|
|
7
|
+
module PaymentSetupDeviceOs
|
|
8
|
+
ANDROID = 'android'
|
|
9
|
+
IOS = 'ios'
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Payments
|
|
5
|
+
# The initialization state of a payment method on a Payment Setup.
|
|
6
|
+
# Maps swagger `PaymentMethodInitialization.initialization`.
|
|
7
|
+
module PaymentSetupPaymentMethodInitialization
|
|
8
|
+
DISABLED = 'disabled'
|
|
9
|
+
ENABLED = 'enabled'
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Payments
|
|
5
|
+
# The payment method status on a Payment Setup.
|
|
6
|
+
# Maps swagger `PaymentMethodStatus`.
|
|
7
|
+
module PaymentSetupPaymentMethodStatus
|
|
8
|
+
UNAVAILABLE = 'unavailable'
|
|
9
|
+
ACTION_REQUIRED = 'action_required'
|
|
10
|
+
READY = 'ready'
|
|
11
|
+
INITIALIZATION_REQUIRED = 'initialization_required'
|
|
12
|
+
INVALID = 'invalid'
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|