checkout_sdk 2.7.0 → 2.8.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/api_client.rb +3 -2
- data/lib/checkout_sdk/common/account_holder.rb +78 -1
- data/lib/checkout_sdk/common/account_holder_identification.rb +21 -0
- data/lib/checkout_sdk/common/common.rb +1 -0
- data/lib/checkout_sdk/common/customer_retry.rb +14 -2
- data/lib/checkout_sdk/common/residential_status_type.rb +11 -0
- data/lib/checkout_sdk/issuing/card_update_headers.rb +11 -12
- data/lib/checkout_sdk/issuing/issuing_client.rb +20 -11
- data/lib/checkout_sdk/payments/card_payout_item.rb +24 -0
- data/lib/checkout_sdk/payments/card_payout_processing.rb +39 -0
- data/lib/checkout_sdk/payments/destination/bank_account_destination.rb +29 -0
- data/lib/checkout_sdk/payments/destination/card_destination.rb +20 -0
- data/lib/checkout_sdk/payments/destination/destination.rb +5 -0
- data/lib/checkout_sdk/payments/destination/destination_type.rb +7 -0
- data/lib/checkout_sdk/payments/destination/id_destination.rb +16 -0
- data/lib/checkout_sdk/payments/destination/network_token_destination.rb +63 -0
- data/lib/checkout_sdk/payments/destination/token_destination.rb +15 -0
- data/lib/checkout_sdk/payments/downtime_retry_request.rb +14 -0
- data/lib/checkout_sdk/payments/dunning_retry_request.rb +22 -0
- data/lib/checkout_sdk/payments/flow/flow_client.rb +0 -4
- data/lib/checkout_sdk/payments/hosted/hosted_payment_instruction.rb +9 -0
- data/lib/checkout_sdk/payments/hosted/hosted_payments_session.rb +42 -31
- data/lib/checkout_sdk/payments/instruction_remittance.rb +17 -0
- data/lib/checkout_sdk/payments/instruction_scheme.rb +5 -0
- data/lib/checkout_sdk/payments/links/payment_link.rb +50 -29
- data/lib/checkout_sdk/payments/payment_instruction.rb +48 -1
- data/lib/checkout_sdk/payments/payment_request.rb +1 -1
- data/lib/checkout_sdk/payments/payment_retry_request.rb +9 -7
- data/lib/checkout_sdk/payments/payment_segment.rb +11 -0
- data/lib/checkout_sdk/payments/payment_type.rb +4 -1
- data/lib/checkout_sdk/payments/payments.rb +11 -0
- data/lib/checkout_sdk/payments/payments_client.rb +10 -0
- data/lib/checkout_sdk/payments/payout_billing_descriptor.rb +10 -0
- data/lib/checkout_sdk/payments/payout_request.rb +59 -1
- data/lib/checkout_sdk/payments/sender/corporate_sender.rb +19 -0
- data/lib/checkout_sdk/payments/sender/government_sender.rb +21 -0
- data/lib/checkout_sdk/payments/sender/individual_sender.rb +46 -0
- data/lib/checkout_sdk/payments/sender/instrument_sender.rb +3 -0
- data/lib/checkout_sdk/payments/sender/sender.rb +16 -0
- data/lib/checkout_sdk/payments/sessions/payment_sessions_request.rb +55 -32
- data/lib/checkout_sdk/payments/setups/account_funding_transaction_identification.rb +10 -1
- data/lib/checkout_sdk/payments/setups/account_funding_transaction_identification_type.rb +5 -4
- data/lib/checkout_sdk/payments/setups/account_funding_transaction_recipient.rb +29 -1
- data/lib/checkout_sdk/payments/setups/account_funding_transaction_sender.rb +34 -1
- data/lib/checkout_sdk/payments/setups/bacs_payment_method.rb +70 -33
- data/lib/checkout_sdk/payments/setups/blik_payment_method.rb +3 -2
- data/lib/checkout_sdk/payments/setups/card_present_payment_method.rb +2 -1
- data/lib/checkout_sdk/payments/setups/cash_app_payment_method.rb +3 -3
- data/lib/checkout_sdk/payments/setups/pay_by_bank_payment_method.rb +39 -15
- data/lib/checkout_sdk/payments/setups/payment_setup_payment_type.rb +19 -0
- data/lib/checkout_sdk/payments/setups/payment_setup_risk.rb +18 -0
- data/lib/checkout_sdk/payments/setups/payment_setups_client.rb +110 -6
- data/lib/checkout_sdk/payments/setups/stablecoin_payment_method.rb +2 -1
- data/lib/checkout_sdk/payments/source/currency_account_source.rb +8 -0
- data/lib/checkout_sdk/payments/source/entity_source.rb +5 -0
- data/lib/checkout_sdk/payments/source/payout_source.rb +12 -1
- data/lib/checkout_sdk/payments/unreferenced_refund_request.rb +89 -0
- data/lib/checkout_sdk/version.rb +1 -1
- metadata +12 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 26bd6c4871771d8d22c647b6724c577af0434c881b9af1433959cb1e4fdf98c8
|
|
4
|
+
data.tar.gz: b18c0c03cef39d44080aadbf798f76910c87fc84506ecb4d6dfcb9b6c67a5d76
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: abbd929efceca48389c89b804075ee1c49a18a2a99532e03445ce061221a69c07545dbd1271cbb209435ca60da1209ad3c30c585d35b15a1db1d29832023fee8
|
|
7
|
+
data.tar.gz: 2bb659ec58fa5022fd17278f9d4467ab9f18b8ca47f657240c2d8da0b76724bc13d136ab865d68d90d01b81791e2a32fb886258eaa3d9edc34f3f90b5a7fcf38
|
|
@@ -68,8 +68,9 @@ module CheckoutSdk
|
|
|
68
68
|
|
|
69
69
|
# Attribute name to HTTP header name, for every typed headers container the SDK supports.
|
|
70
70
|
#
|
|
71
|
-
# The header names are
|
|
72
|
-
# naive conversion would produce
|
|
71
|
+
# The header names are emitted with an exact spelling: return-encrypted-cvv (sent by the
|
|
72
|
+
# deprecated CardUpdateHeaders) is lower case where a naive conversion would produce
|
|
73
|
+
# Return-Encrypted-Cvv.
|
|
73
74
|
#
|
|
74
75
|
# The values are Strings, not Symbols, and that is load bearing. Faraday::Utils::Headers
|
|
75
76
|
# preserves a String key verbatim but rewrites a Symbol key as
|
|
@@ -2,37 +2,114 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Common
|
|
5
|
+
# The account holder of a payment source, an instrument, or a payout or unreferenced refund destination.
|
|
6
|
+
# This class is shared by many positions; the per-position notes below cover the card payout, bank payout
|
|
7
|
+
# and unreferenced refund destinations. Each position only accepts the keys its schema declares, so leave
|
|
8
|
+
# the other properties unset.
|
|
9
|
+
# - Card payout card and network_token destinations: type, first_name, middle_name, last_name,
|
|
10
|
+
# billing_address, phone, identification, email, date_of_birth, country_of_birth.
|
|
11
|
+
# - Card payout id and token destinations: type, first_name, middle_name, last_name, company_name.
|
|
12
|
+
# - Bank payout bank_account destination: type, first_name, last_name, company_name, tax_id,
|
|
13
|
+
# date_of_birth, country_of_birth, residential_status, billing_address, phone, identification.
|
|
14
|
+
# - Unreferenced refund destinations: as the card payout card and network_token destinations.
|
|
15
|
+
#
|
|
5
16
|
# @!attribute type
|
|
17
|
+
# The type of account holder.
|
|
18
|
+
# [Required] for payout and unreferenced refund destinations (when the account holder is sent)
|
|
19
|
+
# Enum: "individual" "corporate" "government"
|
|
6
20
|
# @return [String] {AccountHolderType}
|
|
7
21
|
# @!attribute full_name
|
|
22
|
+
# The account holder's full name.
|
|
23
|
+
# [Optional]
|
|
24
|
+
# @deprecated Not in the request schema of any account holder. Still returned in the PayPal payment
|
|
25
|
+
# details source account_holder.
|
|
26
|
+
# Retained for backwards compatibility and will be removed in the next major version. There is no
|
|
27
|
+
# replacement.
|
|
8
28
|
# @return [String]
|
|
9
29
|
# @!attribute first_name
|
|
30
|
+
# The account holder's legal first name. The combination of first_name, middle_name and last_name
|
|
31
|
+
# should exceed 3 letters in length for card payouts. A single character or all non-alphabetic
|
|
32
|
+
# characters return a field validation error.
|
|
33
|
+
# [Required] for individual account holders in card payouts, bank payouts and the unreferenced refund
|
|
34
|
+
# card and network_token destinations; [Optional] for the unreferenced refund id and token
|
|
35
|
+
# destinations. In the card payout id and token destinations it is not required if the first name is
|
|
36
|
+
# already stored with the token or instrument.
|
|
37
|
+
# max 50 characters (card payouts and unreferenced refunds)
|
|
10
38
|
# @return [String]
|
|
11
39
|
# @!attribute middle_name
|
|
40
|
+
# The account holder's middle name.
|
|
41
|
+
# [Optional] Card payouts and unreferenced refunds only.
|
|
42
|
+
# max 50 characters
|
|
12
43
|
# @return [String]
|
|
13
44
|
# @!attribute last_name
|
|
45
|
+
# The account holder's legal last name. The combination of first_name, middle_name and last_name
|
|
46
|
+
# should exceed 3 letters in length for card payouts. A single character or all non-alphabetic
|
|
47
|
+
# characters return a field validation error.
|
|
48
|
+
# [Required] for individual account holders in card payouts, bank payouts and the unreferenced refund
|
|
49
|
+
# card and network_token destinations; [Optional] for the unreferenced refund id and token
|
|
50
|
+
# destinations. In the card payout id and token destinations it is not required if the last name is
|
|
51
|
+
# already stored with the token or instrument.
|
|
52
|
+
# max 50 characters (card payouts and unreferenced refunds)
|
|
14
53
|
# @return [String]
|
|
15
54
|
# @!attribute email
|
|
55
|
+
# The account holder's email address.
|
|
56
|
+
# [Optional] Card payout card and network_token destinations and unreferenced refunds only.
|
|
57
|
+
# max 255 characters
|
|
16
58
|
# @return [String]
|
|
17
59
|
# @!attribute gender
|
|
60
|
+
# The account holder's gender.
|
|
61
|
+
# [Optional]
|
|
62
|
+
# @deprecated Not in the request schema of any account holder. Still returned in the Klarna payment
|
|
63
|
+
# details source account_holder.
|
|
64
|
+
# Retained for backwards compatibility and will be removed in the next major version. There is no
|
|
65
|
+
# replacement.
|
|
18
66
|
# @return [String]
|
|
19
67
|
# @!attribute company_name
|
|
68
|
+
# The legal name of the corporate or government account holder. A single character or all
|
|
69
|
+
# non-alphabetic characters return a field validation error.
|
|
70
|
+
# [Required] for corporate and government payout and unreferenced refund destinations
|
|
71
|
+
# max 50 characters (card payouts and unreferenced refunds)
|
|
20
72
|
# @return [String]
|
|
21
73
|
# @!attribute tax_id
|
|
74
|
+
# The legal account holder's tax number or reference.
|
|
75
|
+
# [Optional] Bank payouts only.
|
|
22
76
|
# @return [String]
|
|
23
77
|
# @!attribute date_of_birth
|
|
78
|
+
# The account holder's date of birth, in the format YYYY-MM-DD. Individual account holders only.
|
|
79
|
+
# [Optional]
|
|
80
|
+
# 10 characters (card payouts and unreferenced refunds)
|
|
24
81
|
# @return [String]
|
|
25
82
|
# @!attribute country_of_birth
|
|
26
|
-
#
|
|
83
|
+
# The account holder's country of birth, as a two-letter ISO country code. Individual account holders
|
|
84
|
+
# only.
|
|
85
|
+
# [Optional]
|
|
86
|
+
# 2 characters
|
|
87
|
+
# @return [String] {Country}
|
|
27
88
|
# @!attribute residential_status
|
|
89
|
+
# The account holder's residential status.
|
|
90
|
+
# [Optional] Bank payouts only.
|
|
91
|
+
# Enum: "resident" "non_resident"
|
|
28
92
|
# @return [String] {ResidentialStatusType}
|
|
29
93
|
# @!attribute billing_address
|
|
94
|
+
# The account holder's billing address. For card payouts and unreferenced refunds, it is required if
|
|
95
|
+
# your company is incorporated in the United States.
|
|
96
|
+
# [Required] for individual bank payout destinations, [Optional] otherwise
|
|
30
97
|
# @return [Address]
|
|
31
98
|
# @!attribute phone
|
|
99
|
+
# The account holder's phone number.
|
|
100
|
+
# [Optional] Not part of the card payout id and token destinations, nor of the corporate and
|
|
101
|
+
# government bank payout destinations.
|
|
32
102
|
# @return [Phone]
|
|
33
103
|
# @!attribute identification
|
|
104
|
+
# The account holder's identification. Providing identification details for the payout recipient
|
|
105
|
+
# increases the likelihood of a successful payout.
|
|
106
|
+
# [Optional] Not part of the card payout id and token destinations, nor of the corporate and
|
|
107
|
+
# government bank payout destinations.
|
|
34
108
|
# @return [AccountHolderIdentification]
|
|
35
109
|
# @!attribute account_name_inquiry
|
|
110
|
+
# Whether the ANI (account name inquiry) check should be performed with the scheme (Visa or
|
|
111
|
+
# Mastercard). Payment sources only.
|
|
112
|
+
# [Optional] Not declared by the payout or unreferenced refund destination schemas.
|
|
36
113
|
# @return [Boolean]
|
|
37
114
|
class AccountHolder
|
|
38
115
|
attr_accessor :type,
|
|
@@ -2,13 +2,34 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Common
|
|
5
|
+
# The identification of an account holder or a sender. Shared by the card payout, bank payout,
|
|
6
|
+
# unreferenced refund and regular payment positions.
|
|
7
|
+
#
|
|
5
8
|
# @!attribute type
|
|
9
|
+
# The type of identification.
|
|
10
|
+
# [Required] for card payout and unreferenced refund account holders and card payout senders,
|
|
11
|
+
# [Optional] for bank payout and regular payment senders and bank payout account holders
|
|
12
|
+
# Enum: "passport" "driving_license" "national_id" "company_registration" "tax_id" (card payouts and
|
|
13
|
+
# unreferenced refunds); "passport" "driving_licence" "national_id" (bank payout and regular payment
|
|
14
|
+
# senders)
|
|
6
15
|
# @return [String] {AccountHolderIdentificationType}
|
|
7
16
|
# @!attribute number
|
|
17
|
+
# The identification number.
|
|
18
|
+
# [Required] for card payout and unreferenced refund account holders and card payout senders,
|
|
19
|
+
# [Optional] for bank payout and regular payment senders and bank payout account holders
|
|
20
|
+
# max 25 characters (card payout and unreferenced refund account holders)
|
|
8
21
|
# @return [String]
|
|
9
22
|
# @!attribute issuing_country
|
|
23
|
+
# If applicable, the country that issued the identification, as a two-letter ISO country code.
|
|
24
|
+
# Providing it increases the likelihood of a successful identity verification.
|
|
25
|
+
# [Optional]
|
|
26
|
+
# 2 characters (card payouts and unreferenced refunds)
|
|
10
27
|
# @return [String] {Country}
|
|
11
28
|
# @!attribute date_of_expiry
|
|
29
|
+
# If applicable, the expiration date of the identification, in the format YYYY-MM-DD.
|
|
30
|
+
# Card payouts and unreferenced refunds only.
|
|
31
|
+
# [Optional]
|
|
32
|
+
# 10 characters
|
|
12
33
|
# @return [String]
|
|
13
34
|
class AccountHolderIdentification
|
|
14
35
|
attr_accessor :type,
|
|
@@ -9,6 +9,7 @@ require 'checkout_sdk/common/account_holder'
|
|
|
9
9
|
require 'checkout_sdk/common/country'
|
|
10
10
|
require 'checkout_sdk/common/account_holder_identification_type'
|
|
11
11
|
require 'checkout_sdk/common/account_holder_type'
|
|
12
|
+
require 'checkout_sdk/common/residential_status_type'
|
|
12
13
|
require 'checkout_sdk/common/instrument_type'
|
|
13
14
|
require 'checkout_sdk/common/bank_details'
|
|
14
15
|
require 'checkout_sdk/common/payment_source_type'
|
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
|
-
module
|
|
4
|
+
module Common
|
|
5
|
+
# Configures the parameters for customer retries. A customer retry is a payment attempt
|
|
6
|
+
# performed by the customer on the checkout page, used by hosted payments, payment links
|
|
7
|
+
# and payment sessions.
|
|
8
|
+
#
|
|
5
9
|
# @!attribute max_attempts
|
|
6
|
-
# @return [Integer]
|
|
10
|
+
# @return [Integer] [Optional] The maximum number of customer retry attempts, excluding the
|
|
11
|
+
# initial payment attempt. Minimum 0, maximum 5. Default 5.
|
|
12
|
+
# Required when used in a payment sessions request.
|
|
7
13
|
class CustomerRetry
|
|
8
14
|
attr_accessor :max_attempts
|
|
9
15
|
end
|
|
10
16
|
end
|
|
17
|
+
|
|
18
|
+
module Accounts
|
|
19
|
+
# @deprecated Please use {CheckoutSdk::Common::CustomerRetry} instead. This alias will be
|
|
20
|
+
# removed in the next major version.
|
|
21
|
+
CustomerRetry = CheckoutSdk::Common::CustomerRetry
|
|
22
|
+
end
|
|
11
23
|
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Common
|
|
5
|
+
# The account holder's residential status (bank payout and refund destination account holders).
|
|
6
|
+
module ResidentialStatusType
|
|
7
|
+
RESIDENT = 'resident'
|
|
8
|
+
NON_RESIDENT = 'non_resident'
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -4,26 +4,25 @@ module CheckoutSdk
|
|
|
4
4
|
module Issuing
|
|
5
5
|
# The optional HTTP headers accepted when updating a card's details.
|
|
6
6
|
#
|
|
7
|
+
# @deprecated The API no longer documents these headers; use the method without headers. Will
|
|
8
|
+
# be removed in the next major version. Headers that are set are still sent unchanged.
|
|
9
|
+
#
|
|
7
10
|
# Modelled as its own class rather than added to {CheckoutSdk::Common::Headers} because these
|
|
8
11
|
# two headers belong to one endpoint, and Common::Headers is shared by every client.
|
|
9
12
|
#
|
|
10
13
|
# @!attribute return_encrypted_cvv
|
|
11
|
-
#
|
|
12
|
-
#
|
|
13
|
-
#
|
|
14
|
-
#
|
|
15
|
-
# A String rather than a boolean: the value is emitted verbatim as an HTTP header, and "true"
|
|
16
|
-
# is what the spec shows.
|
|
14
|
+
# @deprecated The API no longer documents these headers; use the method without headers.
|
|
15
|
+
# Will be removed in the next major version.
|
|
16
|
+
# No longer documented by the API. Still sent unchanged as the return-encrypted-cvv HTTP
|
|
17
|
+
# header when set.
|
|
17
18
|
# [Optional]
|
|
18
|
-
# Maps to HTTP header return-encrypted-cvv.
|
|
19
|
-
# Example: "true"
|
|
20
19
|
# @return [String]
|
|
21
20
|
# @!attribute encryption_key
|
|
22
|
-
# The
|
|
23
|
-
#
|
|
24
|
-
#
|
|
21
|
+
# @deprecated The API no longer documents these headers; use the method without headers.
|
|
22
|
+
# Will be removed in the next major version.
|
|
23
|
+
# No longer documented by the API. Still sent unchanged as the Encryption-Key HTTP header
|
|
24
|
+
# when set.
|
|
25
25
|
# [Optional]
|
|
26
|
-
# Maps to HTTP header Encryption-Key.
|
|
27
26
|
# @return [String]
|
|
28
27
|
class CardUpdateHeaders
|
|
29
28
|
attr_accessor :return_encrypted_cvv, :encryption_key
|
|
@@ -90,13 +90,13 @@ module CheckoutSdk
|
|
|
90
90
|
#
|
|
91
91
|
# @param [String] card_id
|
|
92
92
|
# @param [Hash, UpdateCardRequest] update_card_request
|
|
93
|
-
# @param [CardUpdateHeaders, nil] headers
|
|
94
|
-
#
|
|
95
|
-
#
|
|
96
|
-
# @return [OpenStruct] the update
|
|
97
|
-
#
|
|
98
|
-
#
|
|
99
|
-
#
|
|
93
|
+
# @param [CardUpdateHeaders, nil] headers deprecated. The API no longer documents these
|
|
94
|
+
# headers; use the method without headers. Will be removed in the next major version.
|
|
95
|
+
# When set, the return-encrypted-cvv and Encryption-Key headers are still sent unchanged.
|
|
96
|
+
# @return [OpenStruct] the update-card-response: the updated card details and _links. The
|
|
97
|
+
# type field discriminates the variant; a virtual card response also carries
|
|
98
|
+
# is_single_use (boolean, default false), whether the card expires after a single use.
|
|
99
|
+
# Physical card responses never carry it.
|
|
100
100
|
def update_card(card_id, update_card_request, headers = nil)
|
|
101
101
|
api_client.invoke_patch(
|
|
102
102
|
build_path(ISSUING, CARDS, card_id),
|
|
@@ -134,15 +134,24 @@ module CheckoutSdk
|
|
|
134
134
|
api_client.invoke_get(build_path(ISSUING, CARDS, card_id, CREDENTIALS), sdk_authorization, query)
|
|
135
135
|
end
|
|
136
136
|
|
|
137
|
+
# Revoke a card. POST /issuing/cards/{cardId}/revoke. The request body is optional; when
|
|
138
|
+
# omitted an empty JSON object is sent.
|
|
137
139
|
# @param [String] card_id
|
|
138
|
-
# @param [Hash] revoke_request
|
|
139
|
-
|
|
140
|
+
# @param [Hash, nil] revoke_request optional, may carry reason (expired, reported_lost,
|
|
141
|
+
# reported_stolen)
|
|
142
|
+
# @return [OpenStruct] the revoke-card-response, carrying _links with self and controls.
|
|
143
|
+
def revoke_card(card_id, revoke_request = nil)
|
|
140
144
|
api_client.invoke_post(build_path(ISSUING, CARDS, card_id, REVOKE), sdk_authorization, revoke_request)
|
|
141
145
|
end
|
|
142
146
|
|
|
147
|
+
# Suspend a card. POST /issuing/cards/{cardId}/suspend. The request body is optional; when
|
|
148
|
+
# omitted an empty JSON object is sent.
|
|
143
149
|
# @param [String] card_id
|
|
144
|
-
# @param [Hash] suspend_request
|
|
145
|
-
|
|
150
|
+
# @param [Hash, nil] suspend_request optional, may carry reason (suspected_lost,
|
|
151
|
+
# suspected_stolen)
|
|
152
|
+
# @return [OpenStruct] the suspend-card-response, carrying _links with self, activate,
|
|
153
|
+
# revoke and controls.
|
|
154
|
+
def suspend_card(card_id, suspend_request = nil)
|
|
146
155
|
api_client.invoke_post(build_path(ISSUING, CARDS, card_id, SUSPEND), sdk_authorization, suspend_request)
|
|
147
156
|
end
|
|
148
157
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Payments
|
|
5
|
+
# A line item of a card payout.
|
|
6
|
+
#
|
|
7
|
+
# @!attribute type
|
|
8
|
+
# The item type. For example, physical or digital.
|
|
9
|
+
# This field is used to provide item level metadata where applicable.
|
|
10
|
+
# [Optional]
|
|
11
|
+
# Enum: "digital" "physical"
|
|
12
|
+
# @return [String] {ProductItemType}
|
|
13
|
+
# @!attribute sub_type
|
|
14
|
+
# The digital item type.
|
|
15
|
+
# If type is set to digital, this field is required.
|
|
16
|
+
# [Optional]
|
|
17
|
+
# Enum: "blockchain" "cbdc" "cryptocurrency" "nft" "stablecoin"
|
|
18
|
+
# @return [String] {ProductSubType}
|
|
19
|
+
class CardPayoutItem
|
|
20
|
+
attr_accessor :type,
|
|
21
|
+
:sub_type
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Payments
|
|
5
|
+
# Information related to the processing of a card payout.
|
|
6
|
+
#
|
|
7
|
+
# @!attribute affiliate_id
|
|
8
|
+
# The unique identifier for Visa-registered ramp providers.
|
|
9
|
+
# Must only contain alphanumeric characters.
|
|
10
|
+
# If you're a Visa-registered ramp provider operating with affiliates, this field is required.
|
|
11
|
+
# [Optional]
|
|
12
|
+
# ^[a-zA-Z0-9]{1,15}$
|
|
13
|
+
# max 15 characters
|
|
14
|
+
# @return [String]
|
|
15
|
+
# @!attribute affiliate_url
|
|
16
|
+
# The affiliate URL.
|
|
17
|
+
# If you're a Visa-registered ramp provider operating with affiliates, this field is required.
|
|
18
|
+
# [Optional]
|
|
19
|
+
# @return [String]
|
|
20
|
+
# @!attribute processing_speed
|
|
21
|
+
# The speed at which the payout is processed.
|
|
22
|
+
# Only applicable for unreferenced refunds.
|
|
23
|
+
# [Optional]
|
|
24
|
+
# Enum: "fast"
|
|
25
|
+
# @return [String]
|
|
26
|
+
# @!attribute purchase_country
|
|
27
|
+
# The two-letter ISO country code of the purchase country.
|
|
28
|
+
# If you're a Visa-registered ramp provider operating with affiliates, this field is required.
|
|
29
|
+
# [Optional]
|
|
30
|
+
# max 2 characters
|
|
31
|
+
# @return [String] {CheckoutSdk::Common::Country}
|
|
32
|
+
class CardPayoutProcessing
|
|
33
|
+
attr_accessor :affiliate_id,
|
|
34
|
+
:affiliate_url,
|
|
35
|
+
:processing_speed,
|
|
36
|
+
:purchase_country
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -2,25 +2,54 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Payments
|
|
5
|
+
# A bank account payout destination (bank payout, type bank_account).
|
|
6
|
+
#
|
|
5
7
|
# @!attribute account_type
|
|
8
|
+
# The type of the bank account. Note that some beneficiary banks do not accept payouts to
|
|
9
|
+
# savings accounts.
|
|
10
|
+
# [Required]
|
|
11
|
+
# Enum: "savings" "current" "cash"
|
|
6
12
|
# @return [String] {CheckoutSdk::Common::AccountType}
|
|
7
13
|
# @!attribute account_number
|
|
14
|
+
# Number (which can contain letters) that identifies the local account.
|
|
15
|
+
# [Optional]
|
|
8
16
|
# @return [String]
|
|
9
17
|
# @!attribute bank_code
|
|
18
|
+
# Code that identifies the bank. Also referred as Routing Number in the United States.
|
|
19
|
+
# [Optional]
|
|
10
20
|
# @return [String]
|
|
11
21
|
# @!attribute branch_code
|
|
22
|
+
# Code that identifies the bank branch.
|
|
23
|
+
# [Optional]
|
|
12
24
|
# @return [String]
|
|
13
25
|
# @!attribute iban
|
|
26
|
+
# Internationally agreed standard for identifying bank accounts. Lengths vary per destination_country.
|
|
27
|
+
# [Optional]
|
|
14
28
|
# @return [String]
|
|
15
29
|
# @!attribute bban
|
|
30
|
+
# The combination of bank code and/or branch code and account number.
|
|
31
|
+
# [Optional]
|
|
16
32
|
# @return [String]
|
|
17
33
|
# @!attribute swift_bic
|
|
34
|
+
# 8 or 11 character code which identifies the bank or bank branch.
|
|
35
|
+
# [Optional]
|
|
18
36
|
# @return [String]
|
|
19
37
|
# @!attribute country
|
|
38
|
+
# The two-letter ISO country code of where the account is based. Note that not all countries
|
|
39
|
+
# are available.
|
|
40
|
+
# [Required]
|
|
41
|
+
# 2 characters
|
|
20
42
|
# @return [String] {CheckoutSdk::Common::Country}
|
|
21
43
|
# @!attribute account_holder
|
|
44
|
+
# The account holder details.
|
|
45
|
+
# [Optional]
|
|
22
46
|
# @return [CheckoutSdk::Common::AccountHolder]
|
|
23
47
|
# @!attribute bank
|
|
48
|
+
# The bank details.
|
|
49
|
+
# [Optional]
|
|
50
|
+
# @deprecated Not in the request schema of the bank account payout destination; bank only exists on the
|
|
51
|
+
# Instruments bank account schemas. Retained for backwards compatibility and will be removed in the
|
|
52
|
+
# next major version. There is no replacement.
|
|
24
53
|
# @return [CheckoutSdk::Common::BankDetails]
|
|
25
54
|
class BankAccountDestination < Destination
|
|
26
55
|
attr_accessor :account_type,
|
|
@@ -2,13 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Payments
|
|
5
|
+
# A card payout destination. Also the card destination of an unreferenced refund.
|
|
6
|
+
#
|
|
5
7
|
# @!attribute number
|
|
8
|
+
# The card number.
|
|
9
|
+
# You can encrypt this field by using the Cko-Encryption-Key-Id and Cko-Encrypted-Properties headers.
|
|
10
|
+
# [Required]
|
|
11
|
+
# max 19 characters
|
|
6
12
|
# @return [String]
|
|
7
13
|
# @!attribute expiry_month
|
|
14
|
+
# The card's expiration month.
|
|
15
|
+
# [Required]
|
|
16
|
+
# 1 to 2 digits
|
|
8
17
|
# @return [Integer]
|
|
9
18
|
# @!attribute expiry_year
|
|
19
|
+
# The card's expiration year.
|
|
20
|
+
# [Required]
|
|
21
|
+
# 4 digits
|
|
10
22
|
# @return [Integer]
|
|
11
23
|
# @!attribute account_holder
|
|
24
|
+
# The payout or unreferenced refund destination account holder.
|
|
25
|
+
# [Required]
|
|
26
|
+
# The type discriminates the accepted keys:
|
|
27
|
+
# - individual: type, first_name, middle_name, last_name, billing_address, phone,
|
|
28
|
+
# identification, email, date_of_birth, country_of_birth
|
|
29
|
+
# - corporate, government: type, company_name, billing_address, phone, identification, email
|
|
30
|
+
# Other AccountHolder properties (full_name, gender, tax_id, residential_status,
|
|
31
|
+
# account_name_inquiry) are not part of this position.
|
|
12
32
|
# @return [CheckoutSdk::Common::AccountHolder]
|
|
13
33
|
class CardDestination < Destination
|
|
14
34
|
attr_accessor :number,
|
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Payments
|
|
5
|
+
# The destination of the payout, or of the unreferenced refund.
|
|
6
|
+
# You can encrypt this field by using the Cko-Encryption-Key-Id and Cko-Encrypted-Properties headers.
|
|
7
|
+
#
|
|
5
8
|
# @!attribute type
|
|
9
|
+
# The payout or unreferenced refund destination type. Set by each subclass.
|
|
10
|
+
# [Required]
|
|
6
11
|
# @return [String] {DestinationType}
|
|
7
12
|
class Destination
|
|
8
13
|
attr_reader :type
|
|
@@ -2,11 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Payments
|
|
5
|
+
# The payout destination type.
|
|
6
|
+
#
|
|
7
|
+
# Three destination discriminators share these values:
|
|
8
|
+
# - card payout destination: card, network_token, id, token
|
|
9
|
+
# - unreferenced refund destination: card, network_token, id, token
|
|
10
|
+
# - bank payout destination: id, bank_account
|
|
5
11
|
module DestinationType
|
|
6
12
|
CARD = 'card'
|
|
7
13
|
ID = 'id'
|
|
8
14
|
TOKEN = 'token'
|
|
9
15
|
BANK_ACCOUNT = 'bank_account'
|
|
16
|
+
NETWORK_TOKEN = 'network_token'
|
|
10
17
|
end
|
|
11
18
|
end
|
|
12
19
|
end
|
|
@@ -2,9 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Payments
|
|
5
|
+
# A payment instrument payout destination. Used by card payouts, bank payouts and unreferenced refunds.
|
|
6
|
+
#
|
|
5
7
|
# @!attribute id
|
|
8
|
+
# The payment source ID. This will be an ID with the prefix `src_`.
|
|
9
|
+
# [Required]
|
|
10
|
+
# ^(src)_(\w{26})$
|
|
11
|
+
# 30 characters (card payout and unreferenced refund)
|
|
6
12
|
# @return [String]
|
|
7
13
|
# @!attribute account_holder
|
|
14
|
+
# The payout or unreferenced refund destination account holder.
|
|
15
|
+
# [Required] for card payouts, [Optional] for unreferenced refunds.
|
|
16
|
+
# Not declared by the bank payout id destination.
|
|
17
|
+
# The type discriminates the accepted keys. For card payouts:
|
|
18
|
+
# - individual: type, first_name, middle_name, last_name
|
|
19
|
+
# - corporate, government: type, company_name
|
|
20
|
+
# For unreferenced refunds, where no name is required:
|
|
21
|
+
# - individual: type, first_name, middle_name, last_name, billing_address, phone,
|
|
22
|
+
# identification, email, date_of_birth, country_of_birth
|
|
23
|
+
# - corporate, government: type, company_name, billing_address, phone, identification, email
|
|
8
24
|
# @return [CheckoutSdk::Common::AccountHolder]
|
|
9
25
|
class IdDestination < Destination
|
|
10
26
|
attr_accessor :id,
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Payments
|
|
5
|
+
# A network token payout destination, used as the destination of a card payout or of an
|
|
6
|
+
# unreferenced refund.
|
|
7
|
+
#
|
|
8
|
+
# @!attribute token
|
|
9
|
+
# The network token's Primary Account Number (PAN).
|
|
10
|
+
# [Required]
|
|
11
|
+
# @return [String]
|
|
12
|
+
# @!attribute expiry_month
|
|
13
|
+
# The network token's expiration month.
|
|
14
|
+
# [Required]
|
|
15
|
+
# min 1
|
|
16
|
+
# 1 to 2 digits
|
|
17
|
+
# @return [Integer]
|
|
18
|
+
# @!attribute expiry_year
|
|
19
|
+
# The network token's expiration year.
|
|
20
|
+
# [Required]
|
|
21
|
+
# 4 digits
|
|
22
|
+
# @return [Integer]
|
|
23
|
+
# @!attribute token_type
|
|
24
|
+
# The network token type.
|
|
25
|
+
# [Required]
|
|
26
|
+
# Enum: "vts" "mdes" "applepay" "googlepay"
|
|
27
|
+
# @return [String] {CheckoutSdk::Payments::NetworkTokenType}
|
|
28
|
+
# @!attribute cryptogram
|
|
29
|
+
# The network token's Base64-encoded cryptographic identifier (TAVV).
|
|
30
|
+
# The cryptogram is used by card schemes to validate the token verification result.
|
|
31
|
+
# [Optional]
|
|
32
|
+
# max 50 characters
|
|
33
|
+
# @return [String]
|
|
34
|
+
# @!attribute eci
|
|
35
|
+
# The network token's Electronic Commerce Indicator (ECI) security level.
|
|
36
|
+
# [Optional]
|
|
37
|
+
# max 2 characters
|
|
38
|
+
# @return [String]
|
|
39
|
+
# @!attribute account_holder
|
|
40
|
+
# The payout or unreferenced refund destination account holder.
|
|
41
|
+
# [Required]
|
|
42
|
+
# The type discriminates the accepted keys:
|
|
43
|
+
# - individual: type, first_name, middle_name, last_name, billing_address, phone,
|
|
44
|
+
# identification, email, date_of_birth, country_of_birth
|
|
45
|
+
# - corporate, government: type, company_name, billing_address, phone, identification, email
|
|
46
|
+
# Other AccountHolder properties (full_name, gender, tax_id, residential_status,
|
|
47
|
+
# account_name_inquiry) are not part of this position.
|
|
48
|
+
# @return [CheckoutSdk::Common::AccountHolder]
|
|
49
|
+
class NetworkTokenDestination < Destination
|
|
50
|
+
attr_accessor :token,
|
|
51
|
+
:expiry_month,
|
|
52
|
+
:expiry_year,
|
|
53
|
+
:token_type,
|
|
54
|
+
:cryptogram,
|
|
55
|
+
:eci,
|
|
56
|
+
:account_holder
|
|
57
|
+
|
|
58
|
+
def initialize
|
|
59
|
+
super(CheckoutSdk::Payments::DestinationType::NETWORK_TOKEN)
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
@@ -2,9 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Payments
|
|
5
|
+
# A token payout destination. Also the token destination of an unreferenced refund.
|
|
6
|
+
#
|
|
5
7
|
# @!attribute token
|
|
8
|
+
# The Checkout.com card token ID. This will be an ID with the prefix `tok_`.
|
|
9
|
+
# [Required]
|
|
10
|
+
# ^(tok)_(\w{26})$
|
|
11
|
+
# 30 characters
|
|
6
12
|
# @return [String]
|
|
7
13
|
# @!attribute account_holder
|
|
14
|
+
# The payout or unreferenced refund destination account holder.
|
|
15
|
+
# [Required] for card payouts, [Optional] for unreferenced refunds.
|
|
16
|
+
# The type discriminates the accepted keys. For card payouts:
|
|
17
|
+
# - individual: type, first_name, middle_name, last_name
|
|
18
|
+
# - corporate, government: type, company_name
|
|
19
|
+
# For unreferenced refunds, where no name is required:
|
|
20
|
+
# - individual: type, first_name, middle_name, last_name, billing_address, phone,
|
|
21
|
+
# identification, email, date_of_birth, country_of_birth
|
|
22
|
+
# - corporate, government: type, company_name, billing_address, phone, identification, email
|
|
8
23
|
# @return [CheckoutSdk::Common::AccountHolder]
|
|
9
24
|
class TokenDestination < Destination
|
|
10
25
|
attr_accessor :token,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Payments
|
|
5
|
+
# Configuration of Downtime retries.
|
|
6
|
+
#
|
|
7
|
+
# @!attribute enabled
|
|
8
|
+
# @return [TrueClass, FalseClass] [Required] Indicates if Checkout.com retries the payment when it's declined
|
|
9
|
+
# due to issuer or acquirer downtime.
|
|
10
|
+
class DowntimeRetryRequest
|
|
11
|
+
attr_accessor :enabled
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|