checkout_sdk 2.4.0 → 2.6.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/issuing/issuing_client.rb +4 -1
- data/lib/checkout_sdk/issuing/update_card_request.rb +13 -6
- data/lib/checkout_sdk/payments/accommodation_data.rb +160 -0
- data/lib/checkout_sdk/payments/ach_service_type.rb +14 -0
- data/lib/checkout_sdk/payments/aggregator.rb +28 -0
- data/lib/checkout_sdk/payments/airline_data.rb +37 -3
- data/lib/checkout_sdk/payments/flight_leg_details.rb +39 -13
- data/lib/checkout_sdk/payments/pan_processed_type.rb +15 -0
- data/lib/checkout_sdk/payments/partner_customer_risk_data.rb +23 -0
- data/lib/checkout_sdk/payments/passenger.rb +24 -7
- data/lib/checkout_sdk/payments/payments.rb +7 -1
- data/lib/checkout_sdk/payments/processing_card_type.rb +17 -0
- data/lib/checkout_sdk/payments/processing_data.rb +4 -4
- data/lib/checkout_sdk/payments/processing_settings.rb +249 -55
- data/lib/checkout_sdk/payments/ticket.rb +46 -0
- data/lib/checkout_sdk/version.rb +1 -1
- metadata +17 -3
- data/lib/checkout_sdk/payments/sender/ticket.rb +0 -23
|
@@ -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,
|
|
@@ -93,7 +93,10 @@ module CheckoutSdk
|
|
|
93
93
|
# @param [CardUpdateHeaders, nil] headers the optional return-encrypted-cvv and
|
|
94
94
|
# Encryption-Key HTTP headers. Setting return_encrypted_cvv without encryption_key returns
|
|
95
95
|
# a 422 with error code encryption_key_required.
|
|
96
|
-
# @return [OpenStruct] the update response, carrying encrypted_cvv when requested
|
|
96
|
+
# @return [OpenStruct] the update response, carrying encrypted_cvv when requested. For a
|
|
97
|
+
# virtual card the response may also carry is_single_use (boolean, default false),
|
|
98
|
+
# specifying whether the card is set to expire after a single use. Physical cards never
|
|
99
|
+
# send it.
|
|
97
100
|
def update_card(card_id, update_card_request, headers = nil)
|
|
98
101
|
api_client.invoke_patch(
|
|
99
102
|
build_path(ISSUING, CARDS, card_id),
|
|
@@ -39,14 +39,21 @@ module CheckoutSdk
|
|
|
39
39
|
# Example: 2026-06-01T10:00Z
|
|
40
40
|
# @return [String]
|
|
41
41
|
# @!attribute revocation_date
|
|
42
|
-
# Date
|
|
43
|
-
#
|
|
44
|
-
#
|
|
45
|
-
#
|
|
46
|
-
# @return [String]
|
|
42
|
+
# @return [String] Date for the card to be automatically revoked, in the form `yyyy-mm-dd`.
|
|
43
|
+
# Must be after the current date. Maps swagger `IssuingRevocationDate`.
|
|
44
|
+
# @deprecated Use {#scheduled_revocation_date} instead.
|
|
45
|
+
# @!attribute scheduled_revocation_date
|
|
46
|
+
# @return [String] Date for the card to be automatically revoked, in the form `yyyy-mm-dd`.
|
|
47
|
+
# Overrides the deprecated {#revocation_date} when both are given. Maps swagger
|
|
48
|
+
# `IssuingScheduledRevocationDate`.
|
|
49
|
+
# @!attribute status
|
|
50
|
+
# @return [String] Set to `active` to reactivate an `inactive` or `suspended` card.
|
|
51
|
+
# Mutually exclusive with `scheduled_activation_date`: submitting both returns a
|
|
52
|
+
# `scheduled_activation_date_conflicts_with_activation` error. The only supported
|
|
53
|
+
# value is `active`.
|
|
47
54
|
class UpdateCardRequest
|
|
48
55
|
attr_accessor :reference, :metadata, :expiry_month, :expiry_year,
|
|
49
|
-
:scheduled_activation_date, :revocation_date
|
|
56
|
+
:scheduled_activation_date, :revocation_date, :scheduled_revocation_date, :status
|
|
50
57
|
end
|
|
51
58
|
end
|
|
52
59
|
end
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Payments
|
|
5
|
+
# Contains information about the accommodation booked by the customer.
|
|
6
|
+
#
|
|
7
|
+
# Maps the swagger `AccommodationData` schema, which `POST /payments`, the
|
|
8
|
+
# `GET /payments/{id}` response and `PaymentContextProcessing` all resolve to.
|
|
9
|
+
#
|
|
10
|
+
# `property_phone` and `customer_service_phone` are declared on `AccommodationData` only.
|
|
11
|
+
# The `PaymentInterfacesProcessingAccommodationData` schema used by hosted payments, payment
|
|
12
|
+
# links and payment sessions carries the other eleven properties but neither phone array, so
|
|
13
|
+
# those two are read on `POST /payments` and payment contexts and ignored elsewhere.
|
|
14
|
+
#
|
|
15
|
+
# @!attribute name
|
|
16
|
+
# @return [String] The name of the accommodation.
|
|
17
|
+
# [Optional]
|
|
18
|
+
# Example: "The Sea View Hotel"
|
|
19
|
+
# @!attribute booking_reference
|
|
20
|
+
# @return [String] The booking reference for the stay.
|
|
21
|
+
# [Optional]
|
|
22
|
+
# Example: "HOTEL123"
|
|
23
|
+
# @!attribute check_in_date
|
|
24
|
+
# @return [String] The date the customer checks in.
|
|
25
|
+
# [Optional]
|
|
26
|
+
# Format: date (YYYY-MM-DD)
|
|
27
|
+
# Example: "2023-06-20"
|
|
28
|
+
# @!attribute check_out_date
|
|
29
|
+
# @return [String] The date the customer checks out.
|
|
30
|
+
# [Optional]
|
|
31
|
+
# Format: date (YYYY-MM-DD)
|
|
32
|
+
# Example: "2023-06-23"
|
|
33
|
+
# @!attribute address
|
|
34
|
+
# @return [AccommodationAddress] The address of the accommodation.
|
|
35
|
+
# [Optional]
|
|
36
|
+
# @!attribute state
|
|
37
|
+
# @return [String] The state or region the accommodation is in.
|
|
38
|
+
# [Optional]
|
|
39
|
+
# A plain string, not a country code. Example: "FL"
|
|
40
|
+
# @!attribute country
|
|
41
|
+
# @return [String] The country the accommodation is in.
|
|
42
|
+
# [Optional]
|
|
43
|
+
# A plain string, not an ISO 3166-1 alpha-2 code: the specification's own example is the
|
|
44
|
+
# three-letter "USA", which no alpha-2 enum can hold. Example: "USA"
|
|
45
|
+
# @!attribute city
|
|
46
|
+
# @return [String] The city the accommodation is in.
|
|
47
|
+
# [Optional]
|
|
48
|
+
# Example: "Los Angeles"
|
|
49
|
+
# @!attribute number_of_rooms
|
|
50
|
+
# @return [Integer] The number of rooms booked.
|
|
51
|
+
# [Optional]
|
|
52
|
+
# Example: 2
|
|
53
|
+
# @!attribute guests
|
|
54
|
+
# @return [Array(AccommodationGuest)] The guests staying at the accommodation.
|
|
55
|
+
# [Optional]
|
|
56
|
+
# @!attribute room
|
|
57
|
+
# @return [Array(AccommodationRoom)] The rooms booked by the customer.
|
|
58
|
+
# [Optional]
|
|
59
|
+
# Named `room` in the singular by the specification, and it is an array.
|
|
60
|
+
# @!attribute property_phone
|
|
61
|
+
# @return [Array(AccommodationPhone)] Phone numbers for the property.
|
|
62
|
+
# [Optional]
|
|
63
|
+
# Declared on `AccommodationData` only.
|
|
64
|
+
# @!attribute customer_service_phone
|
|
65
|
+
# @return [Array(AccommodationPhone)] Customer service phone numbers for the property.
|
|
66
|
+
# [Optional]
|
|
67
|
+
# Declared on `AccommodationData` only.
|
|
68
|
+
class AccommodationData
|
|
69
|
+
attr_accessor :name,
|
|
70
|
+
:booking_reference,
|
|
71
|
+
:check_in_date,
|
|
72
|
+
:check_out_date,
|
|
73
|
+
:address,
|
|
74
|
+
:state,
|
|
75
|
+
:country,
|
|
76
|
+
:city,
|
|
77
|
+
:number_of_rooms,
|
|
78
|
+
:guests,
|
|
79
|
+
:room,
|
|
80
|
+
:property_phone,
|
|
81
|
+
:customer_service_phone
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Partial address information for an accommodation.
|
|
85
|
+
#
|
|
86
|
+
# The specification declares exactly these two properties, so this is deliberately not the
|
|
87
|
+
# wide {CheckoutSdk::Common::Address}.
|
|
88
|
+
#
|
|
89
|
+
# @!attribute address_line1
|
|
90
|
+
# @return [String] The first line of the address.
|
|
91
|
+
# [Optional]
|
|
92
|
+
# Example: "123 Beach Road"
|
|
93
|
+
# @!attribute zip
|
|
94
|
+
# @return [String] The postal code of the address.
|
|
95
|
+
# [Optional]
|
|
96
|
+
# Example: "10001"
|
|
97
|
+
class AccommodationAddress
|
|
98
|
+
attr_accessor :address_line1,
|
|
99
|
+
:zip
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# A guest staying at the accommodation.
|
|
103
|
+
#
|
|
104
|
+
# @!attribute first_name
|
|
105
|
+
# @return [String] The guest's first name.
|
|
106
|
+
# [Optional]
|
|
107
|
+
# Example: "Jane"
|
|
108
|
+
# @!attribute last_name
|
|
109
|
+
# @return [String] The guest's last name.
|
|
110
|
+
# [Optional]
|
|
111
|
+
# Example: "Doe"
|
|
112
|
+
# @!attribute date_of_birth
|
|
113
|
+
# @return [String] The guest's date of birth.
|
|
114
|
+
# [Optional]
|
|
115
|
+
# Format: date (YYYY-MM-DD)
|
|
116
|
+
# Example: "1985-07-14"
|
|
117
|
+
class AccommodationGuest
|
|
118
|
+
attr_accessor :first_name,
|
|
119
|
+
:last_name,
|
|
120
|
+
:date_of_birth
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# A room booked at the accommodation.
|
|
124
|
+
#
|
|
125
|
+
# Both properties are strings in this schema. The payment setups equivalent,
|
|
126
|
+
# {PaymentSetupAccommodationRoom}, declares a numeric `rate` and an integer
|
|
127
|
+
# `number_of_nights` instead, so the two are not interchangeable.
|
|
128
|
+
#
|
|
129
|
+
# @!attribute rate
|
|
130
|
+
# @return [String] The nightly rate for the room.
|
|
131
|
+
# [Optional]
|
|
132
|
+
# A string, not a number. Example: "70"
|
|
133
|
+
# @!attribute number_of_nights_at_room_rate
|
|
134
|
+
# @return [String] The number of nights booked at that rate.
|
|
135
|
+
# [Optional]
|
|
136
|
+
# A string, not an integer. Example: "3"
|
|
137
|
+
class AccommodationRoom
|
|
138
|
+
attr_accessor :rate,
|
|
139
|
+
:number_of_nights_at_room_rate
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# A phone number for an accommodation property.
|
|
143
|
+
#
|
|
144
|
+
# The specification declares exactly these two properties, so this is deliberately not the
|
|
145
|
+
# wide {CheckoutSdk::Common::Phone}.
|
|
146
|
+
#
|
|
147
|
+
# @!attribute country_code
|
|
148
|
+
# @return [String] The international dialling code.
|
|
149
|
+
# [Optional]
|
|
150
|
+
# Example: "44"
|
|
151
|
+
# @!attribute number
|
|
152
|
+
# @return [String] The phone number.
|
|
153
|
+
# [Optional]
|
|
154
|
+
# Example: "7123456789"
|
|
155
|
+
class AccommodationPhone
|
|
156
|
+
attr_accessor :country_code,
|
|
157
|
+
:number
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Payments
|
|
5
|
+
# Which ACH service to use for the payment, when `source.type` is `ach`.
|
|
6
|
+
#
|
|
7
|
+
# Named after the .NET `AchServiceType` enum and the PHP doc reference, which map the same
|
|
8
|
+
# property.
|
|
9
|
+
module AchServiceType
|
|
10
|
+
SAME_DAY = 'same_day'
|
|
11
|
+
STANDARD = 'standard'
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Payments
|
|
5
|
+
# Information about the payment aggregator.
|
|
6
|
+
#
|
|
7
|
+
# Maps the swagger `Aggregator` schema. Named after the schema, unlike .NET which calls its
|
|
8
|
+
# equivalent `ProcessingAggregator`; Ruby has no name collision here.
|
|
9
|
+
#
|
|
10
|
+
# @!attribute sub_merchant_id
|
|
11
|
+
# @return [String] The sub-merchant ID.
|
|
12
|
+
# [Optional]
|
|
13
|
+
# Example: "9cf70789ba90123"
|
|
14
|
+
# @!attribute aggregator_id_visa
|
|
15
|
+
# @return [String] The Visa identifier for the payment aggregator.
|
|
16
|
+
# [Optional]
|
|
17
|
+
# Example: "10012345"
|
|
18
|
+
# @!attribute aggregator_id_mc
|
|
19
|
+
# @return [String] The Mastercard identifier for the payment aggregator.
|
|
20
|
+
# [Optional]
|
|
21
|
+
# Example: "00000123456"
|
|
22
|
+
class Aggregator
|
|
23
|
+
attr_accessor :sub_merchant_id,
|
|
24
|
+
:aggregator_id_visa,
|
|
25
|
+
:aggregator_id_mc
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -2,12 +2,46 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Payments
|
|
5
|
+
# Contains information about the airline ticket and flights booked by the customer.
|
|
6
|
+
#
|
|
7
|
+
# Maps the swagger `AirlineData` schema, which `POST /payments`, the `GET /payments/{id}`
|
|
8
|
+
# response and `PaymentContextProcessing` all resolve to, and the
|
|
9
|
+
# `PaymentInterfacesProcessingAirlineData` schema used by hosted payments, payment links and
|
|
10
|
+
# payment sessions. The two declare the same three properties.
|
|
11
|
+
#
|
|
5
12
|
# @!attribute ticket
|
|
6
|
-
# @return [Ticket]
|
|
13
|
+
# @return [Ticket] Contains information about the airline ticket.
|
|
14
|
+
# [Optional]
|
|
15
|
+
# A single object, not a collection.
|
|
7
16
|
# @!attribute passenger
|
|
8
|
-
# @return [Passenger]
|
|
17
|
+
# @return [Passenger, Array(Passenger)] Contains information about the passenger or
|
|
18
|
+
# passengers on the flight.
|
|
19
|
+
# [Optional]
|
|
20
|
+
#
|
|
21
|
+
# Accepts either a single {Passenger} or an array of them, and the choice is not
|
|
22
|
+
# cosmetic. Verified against the sandbox on 2026-09-25:
|
|
23
|
+
#
|
|
24
|
+
# | Surface | object | array |
|
|
25
|
+
# |--------------------------|--------|-------|
|
|
26
|
+
# | POST /payments | 201 | 201 |
|
|
27
|
+
# | POST /hosted-payments | 201 | 422 |
|
|
28
|
+
# | POST /payment-links | 201 | 422 |
|
|
29
|
+
# | POST /payment-contexts | 201 | 422 |
|
|
30
|
+
#
|
|
31
|
+
# So assign a single {Passenger} for one passenger: that is accepted on every request
|
|
32
|
+
# surface. Assign an array only for two or more, and only on `POST /payments`, which is
|
|
33
|
+
# the sole surface that takes it. Leave the attribute unset when there are no passengers:
|
|
34
|
+
# an empty array and an explicit null are both rejected with
|
|
35
|
+
# `processing_airline_data_0_passenger_invalid`.
|
|
36
|
+
#
|
|
37
|
+
# This inverts the specification, which declares the property array-only on `AirlineData`
|
|
38
|
+
# and `oneOf[array, object]` on `PaymentInterfacesProcessingAirlineData`. The array branch
|
|
39
|
+
# does not exist in practice on three of the four surfaces. Responses may carry either
|
|
40
|
+
# shape, so read defensively.
|
|
9
41
|
# @!attribute flight_leg_details
|
|
10
|
-
# @return [Array(FlightLegDetails)]
|
|
42
|
+
# @return [Array(FlightLegDetails)] Contains information about the flight legs booked by the
|
|
43
|
+
# customer.
|
|
44
|
+
# [Optional]
|
|
11
45
|
class AirlineData
|
|
12
46
|
attr_accessor :ticket,
|
|
13
47
|
:passenger,
|