checkout_sdk 2.7.1 → 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/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 +10 -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 -34
- data/lib/checkout_sdk/payments/setups/cash_app_payment_method.rb +3 -3
- data/lib/checkout_sdk/payments/setups/payment_setup_payment_type.rb +19 -0
- data/lib/checkout_sdk/payments/setups/payment_setups_client.rb +10 -0
- 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 +11 -2
|
@@ -2,15 +2,34 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Payments
|
|
5
|
+
# A corporate sender, with type corporate. Used by card payouts, bank payouts and regular payments.
|
|
6
|
+
# The reference is inherited from {Sender}.
|
|
7
|
+
#
|
|
5
8
|
# @!attribute company_name
|
|
9
|
+
# The sender's company name. For card payouts, this must be a valid legal name: a single character or
|
|
10
|
+
# all non-alphabetic characters return a field validation error.
|
|
11
|
+
# [Required]
|
|
12
|
+
# max 35 characters for card payouts
|
|
6
13
|
# @return [String]
|
|
7
14
|
# @!attribute address
|
|
15
|
+
# The sender's address. For card payouts, the residential address of an individual sender or the
|
|
16
|
+
# registered corporate address of a corporate or government sender.
|
|
17
|
+
# [Required]
|
|
8
18
|
# @return [CheckoutSdk::Common::Address]
|
|
9
19
|
# @!attribute reference_type
|
|
20
|
+
# The type of identifier used as the reference. Card payouts only.
|
|
21
|
+
# [Required] for card payouts
|
|
22
|
+
# Enum: "other"
|
|
10
23
|
# @return [String]
|
|
11
24
|
# @!attribute source_of_funds
|
|
25
|
+
# The source of the funds used to fund the card payout. Card payouts only.
|
|
26
|
+
# [Required] for card payouts
|
|
27
|
+
# Enum: "credit" "debit" "prepaid" "deposit_account" "mobile_money_account" "cash"
|
|
12
28
|
# @return [String] {SourceOfFunds}
|
|
13
29
|
# @!attribute identification
|
|
30
|
+
# The sender's identification. For card payouts, required if the card's issuer_country is one of AR, BR,
|
|
31
|
+
# CO or PE.
|
|
32
|
+
# [Optional] Card payouts only.
|
|
14
33
|
# @return [CheckoutSdk::Common::AccountHolderIdentification]
|
|
15
34
|
class CorporateSender < Sender
|
|
16
35
|
attr_accessor :company_name,
|
|
@@ -2,17 +2,38 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Payments
|
|
5
|
+
# A government sender, with type government. Card payouts only.
|
|
6
|
+
#
|
|
5
7
|
# @!attribute company_name
|
|
8
|
+
# The sender's company name. This must be a valid legal name: a single character or all non-alphabetic
|
|
9
|
+
# characters return a field validation error.
|
|
10
|
+
# [Required]
|
|
11
|
+
# max 35 characters
|
|
6
12
|
# @return [String]
|
|
7
13
|
# @!attribute address
|
|
14
|
+
# The sender's registered corporate address.
|
|
15
|
+
# [Required]
|
|
8
16
|
# @return [CheckoutSdk::Common::Address]
|
|
9
17
|
# @!attribute reference
|
|
18
|
+
# The unique identifier for the sender, for example a customer number. Only alphanumeric characters
|
|
19
|
+
# are supported.
|
|
20
|
+
# [Required]
|
|
21
|
+
# min 5 characters
|
|
22
|
+
# max 15 characters
|
|
10
23
|
# @return [String]
|
|
11
24
|
# @!attribute reference_type
|
|
25
|
+
# The type of identifier used as the reference.
|
|
26
|
+
# [Required]
|
|
27
|
+
# Enum: "other"
|
|
12
28
|
# @return [String]
|
|
13
29
|
# @!attribute source_of_funds
|
|
30
|
+
# The source of the funds used to fund the card payout.
|
|
31
|
+
# [Required]
|
|
32
|
+
# Enum: "credit" "debit" "prepaid" "deposit_account" "mobile_money_account" "cash"
|
|
14
33
|
# @return [String] {SourceOfFunds}
|
|
15
34
|
# @!attribute identification
|
|
35
|
+
# The sender's identification. Required if the card's issuer_country is one of AR, BR, CO or PE.
|
|
36
|
+
# [Optional]
|
|
16
37
|
# @return [CheckoutSdk::Common::AccountHolderIdentification]
|
|
17
38
|
class GovernmentSender < Sender
|
|
18
39
|
attr_accessor :company_name,
|
|
@@ -2,29 +2,75 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Payments
|
|
5
|
+
# An individual sender, with type individual. Used by card payouts, bank payouts and regular payments.
|
|
6
|
+
#
|
|
5
7
|
# @!attribute first_name
|
|
8
|
+
# The sender's legal first name. For card payouts, the combination of first_name, middle_name and
|
|
9
|
+
# last_name should exceed 3 letters in length, and a single character or all non-alphabetic
|
|
10
|
+
# characters return a field validation error.
|
|
11
|
+
# [Required]
|
|
12
|
+
# max 50 characters for card payouts
|
|
6
13
|
# @return [String]
|
|
7
14
|
# @!attribute middle_name
|
|
15
|
+
# The sender's middle name. Card payouts only.
|
|
16
|
+
# [Optional]
|
|
17
|
+
# max 50 characters
|
|
8
18
|
# @return [String]
|
|
9
19
|
# @!attribute last_name
|
|
20
|
+
# The sender's legal last name. For card payouts, the combination of first_name, middle_name and
|
|
21
|
+
# last_name must exceed 3 letters in length, and a single character or all non-alphabetic characters
|
|
22
|
+
# return a field validation error.
|
|
23
|
+
# [Required]
|
|
24
|
+
# max 50 characters for card payouts
|
|
10
25
|
# @return [String]
|
|
11
26
|
# @!attribute dob
|
|
27
|
+
# The sender's date of birth in a YYYY-MM-DD format. Strongly recommended where available. Bank
|
|
28
|
+
# payouts only; card payouts and regular payments use date_of_birth.
|
|
29
|
+
# [Optional]
|
|
30
|
+
# max 10 characters
|
|
12
31
|
# @return [String]
|
|
13
32
|
# @!attribute address
|
|
33
|
+
# The sender's address. For card payouts, the sender's residential address.
|
|
34
|
+
# [Required]
|
|
14
35
|
# @return [CheckoutSdk::Common::Address]
|
|
15
36
|
# @!attribute identification
|
|
37
|
+
# The sender's identification. For card payouts, required if the card's issuer_country is one of AR, BR,
|
|
38
|
+
# CO or PE.
|
|
39
|
+
# [Optional]
|
|
16
40
|
# @return [CheckoutSdk::Common::AccountHolderIdentification]
|
|
17
41
|
# @!attribute reference
|
|
42
|
+
# For card payouts, the unique identifier for the sender, for example a customer number; only
|
|
43
|
+
# alphanumeric characters are supported. For bank payouts, a unique reference to the underlying
|
|
44
|
+
# client's customer, a global KYC requirement. For regular payments, the unique reference for the
|
|
45
|
+
# sender of the payment.
|
|
46
|
+
# [Required] for card payouts and bank payouts, [Optional] for regular payments
|
|
47
|
+
# min 5 characters, max 15 characters for card payouts
|
|
18
48
|
# @return [String]
|
|
19
49
|
# @!attribute reference_type
|
|
50
|
+
# The type of identifier used as the reference. Card payouts only.
|
|
51
|
+
# [Required] for card payouts
|
|
52
|
+
# Enum: "other"
|
|
20
53
|
# @return [String]
|
|
21
54
|
# @!attribute date_of_birth
|
|
55
|
+
# The sender's date of birth, in the format YYYY-MM-DD. For card payouts, required for cross-border
|
|
56
|
+
# money transfers. Card payouts and regular payments; bank payouts use dob.
|
|
57
|
+
# [Optional]
|
|
58
|
+
# 10 characters for card payouts, max 10 characters for regular payments
|
|
22
59
|
# @return [String]
|
|
23
60
|
# @!attribute source_of_funds
|
|
61
|
+
# The source of the funds used to fund the card payout. Card payouts only.
|
|
62
|
+
# [Required] for card payouts
|
|
63
|
+
# Enum: "credit" "debit" "prepaid" "deposit_account" "mobile_money_account" "cash"
|
|
24
64
|
# @return [String] {SourceOfFunds}
|
|
25
65
|
# @!attribute country_of_birth
|
|
66
|
+
# The sender's country of birth, as a two-letter ISO country code. Card payouts only.
|
|
67
|
+
# [Optional]
|
|
68
|
+
# 2 characters
|
|
26
69
|
# @return [String] {CheckoutSdk::Common::Country}
|
|
27
70
|
# @!attribute nationality
|
|
71
|
+
# The sender's nationality, as a two-letter ISO country code. Card payouts only.
|
|
72
|
+
# [Optional]
|
|
73
|
+
# 2 characters
|
|
28
74
|
# @return [String] {CheckoutSdk::Common::Country}
|
|
29
75
|
class IndividualSender < Sender
|
|
30
76
|
attr_accessor :first_name,
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Payments
|
|
5
|
+
# An instrument sender, with type instrument: the sender information is retrieved from the payment
|
|
6
|
+
# instrument (the destination, for bank payouts). Used by bank payouts and regular payments.
|
|
7
|
+
# The reference is inherited from {Sender}: [Required] for bank payouts, [Optional] for regular payments.
|
|
5
8
|
class InstrumentSender < Sender
|
|
6
9
|
def initialize
|
|
7
10
|
super(CheckoutSdk::Payments::SenderType::INSTRUMENT)
|
|
@@ -2,9 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Payments
|
|
5
|
+
# The sender of a payment or a payout. Set the subclass that matches the sender type.
|
|
6
|
+
# - Card payouts (money transfers): {IndividualSender}, {CorporateSender}, {GovernmentSender}.
|
|
7
|
+
# - Bank payouts: {IndividualSender}, {CorporateSender}, {InstrumentSender}. Not supported for Platform or
|
|
8
|
+
# Direct Seller Checkout.com clients.
|
|
9
|
+
# - Regular payments (PaymentRequest): {IndividualSender}, {CorporateSender}, {InstrumentSender}.
|
|
10
|
+
#
|
|
5
11
|
# @!attribute type
|
|
12
|
+
# The sender type. Set by each subclass.
|
|
13
|
+
# [Required]
|
|
14
|
+
# Enum: "individual" "corporate" "government" (card payouts); "instrument" "individual" "corporate"
|
|
15
|
+
# (bank payouts and regular payments)
|
|
6
16
|
# @return [String] {SenderType}
|
|
7
17
|
# @!attribute reference
|
|
18
|
+
# For card payouts, the unique identifier for the sender, for example a customer number; only
|
|
19
|
+
# alphanumeric characters are supported. For bank payouts, a unique reference to the underlying
|
|
20
|
+
# client's customer, a global KYC requirement. For regular payments, the unique reference for the
|
|
21
|
+
# sender of the payment.
|
|
22
|
+
# [Required] for card payouts and bank payouts, [Optional] for regular payments
|
|
23
|
+
# min 5 characters, max 15 characters for card payouts
|
|
8
24
|
# @return [String]
|
|
9
25
|
class Sender
|
|
10
26
|
attr_reader :type
|
|
@@ -3,69 +3,90 @@
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Payments
|
|
5
5
|
# @!attribute amount
|
|
6
|
-
# @return [Integer]
|
|
6
|
+
# @return [Integer] [Required] The payment amount.
|
|
7
7
|
# @!attribute currency
|
|
8
|
-
# @return [String] {CheckoutSdk::Common::Currency}
|
|
8
|
+
# @return [String] {CheckoutSdk::Common::Currency} [Required] The three-letter ISO currency code.
|
|
9
9
|
# @!attribute payment_type
|
|
10
|
-
# @return [
|
|
10
|
+
# @return [String] {PaymentType} [Optional] Must be specified for card-not-present (CNP) payments.
|
|
11
|
+
# Enum: "Regular" "Recurring" "MOTO" "Installment" "Unscheduled". Default: "Regular".
|
|
11
12
|
# @!attribute billing
|
|
12
|
-
# @return [BillingInformation]
|
|
13
|
+
# @return [BillingInformation] [Required] The billing details.
|
|
13
14
|
# @!attribute billing_descriptor
|
|
14
|
-
# @return [BillingDescriptor]
|
|
15
|
+
# @return [BillingDescriptor] [Optional] A description of the purchase, which is displayed on the customer's
|
|
16
|
+
# statement.
|
|
15
17
|
# @!attribute reference
|
|
16
|
-
# @return [String]
|
|
18
|
+
# @return [String] [Optional] A reference you can use to identify the payment.
|
|
17
19
|
# @!attribute description
|
|
18
|
-
# @return [String]
|
|
20
|
+
# @return [String] [Optional] A description for the payment.
|
|
19
21
|
# @!attribute customer
|
|
20
|
-
# @return [CheckoutSdk::Common::CustomerRequest]
|
|
22
|
+
# @return [CheckoutSdk::Common::CustomerRequest] [Optional] The customer's details.
|
|
21
23
|
# @!attribute shipping
|
|
22
|
-
# @return [ShippingDetails]
|
|
24
|
+
# @return [ShippingDetails] [Optional] The shipping details
|
|
23
25
|
# @!attribute recipient
|
|
24
|
-
# @return [PaymentRecipient]
|
|
26
|
+
# @return [PaymentRecipient] [Optional] Information about the recipient of the payment's funds.
|
|
25
27
|
# @!attribute processing
|
|
26
|
-
# @return [ProcessingSettings]
|
|
28
|
+
# @return [ProcessingSettings] [Optional] Use the processing object to influence or override the data sent
|
|
29
|
+
# during card processing
|
|
27
30
|
# @!attribute processing_channel_id
|
|
28
|
-
# @return [String]
|
|
31
|
+
# @return [String] [Optional] The processing channel to use for the payment.
|
|
29
32
|
# @!attribute expires_on
|
|
30
|
-
# @return [Time]
|
|
33
|
+
# @return [Time] [Optional] A timestamp specifying when the `PaymentSession` should expire, as an ISO 8601 code.
|
|
31
34
|
# @!attribute payment_method_configuration
|
|
32
|
-
# @return [PaymentMethodConfiguration]
|
|
35
|
+
# @return [PaymentMethodConfiguration] [Optional] Configurations for payment method-specific settings.
|
|
33
36
|
# @!attribute enabled_payment_methods
|
|
34
|
-
# @return [Array(PaymentMethodsType)]
|
|
37
|
+
# @return [Array(PaymentMethodsType)] [Optional] Specifies which payment method options to present to the
|
|
38
|
+
# customer.
|
|
35
39
|
# @!attribute disabled_payment_methods
|
|
36
|
-
# @return [Array(PaymentMethodsType)]
|
|
40
|
+
# @return [Array(PaymentMethodsType)] [Optional] Specifies which payment method options to not present to the
|
|
41
|
+
# customer.
|
|
37
42
|
# @!attribute items
|
|
38
|
-
# @return [Array(Product)]
|
|
43
|
+
# @return [Array(Product)] [Optional] The line items in the order.
|
|
39
44
|
# @!attribute amount_allocations
|
|
40
|
-
# @return [Array(CheckoutSdk::Common::AmountAllocations)]
|
|
45
|
+
# @return [Array(CheckoutSdk::Common::AmountAllocations)] [Optional] The sub-entities that the payment is being
|
|
46
|
+
# processed on behalf of.
|
|
41
47
|
# @!attribute risk
|
|
42
|
-
# @return [RiskRequest]
|
|
48
|
+
# @return [RiskRequest] [Optional] Configures the risk assessment performed during payment processing.
|
|
43
49
|
# @!attribute retry
|
|
44
|
-
# @return [PaymentRetryRequest]
|
|
50
|
+
# @return [PaymentRetryRequest] [Optional] Configuration of asynchronous retries.
|
|
51
|
+
# @deprecated Not part of the payment sessions request; the API ignores it. Will be removed in the next
|
|
52
|
+
# major version.
|
|
53
|
+
# @!attribute customer_retry
|
|
54
|
+
# @return [CheckoutSdk::Common::CustomerRetry] [Optional] Configures the parameters for customer retries
|
|
55
|
+
# performed by the customer on the checkout page. max_attempts is the maximum number of customer retry
|
|
56
|
+
# attempts, excluding the initial payment attempt (minimum 0, maximum 5, default 5); it is required
|
|
57
|
+
# when customer_retry is set.
|
|
45
58
|
# @!attribute display_name
|
|
46
|
-
# @return [String]
|
|
59
|
+
# @return [String] [Optional] The merchant's display name.
|
|
47
60
|
# @!attribute success_url
|
|
48
|
-
# @return [String]
|
|
61
|
+
# @return [String] [Required] Overrides the default success redirect URL configured on your account, for payment
|
|
62
|
+
# methods that require a redirect.
|
|
49
63
|
# @!attribute failure_url
|
|
50
|
-
# @return [String]
|
|
64
|
+
# @return [String] [Required] Overrides the default failure redirect URL configured on your account, for payment
|
|
65
|
+
# methods that require a redirect.
|
|
51
66
|
# @!attribute metadata
|
|
52
|
-
# @return [Hash{String => Object}]
|
|
67
|
+
# @return [Hash{String => Object}] [Optional] Allows you to store additional information about a transaction
|
|
68
|
+
# with custom fields and up to five user-defined fields, which can be used for reporting purposes.
|
|
53
69
|
# @!attribute locale
|
|
54
|
-
# @return [String]
|
|
70
|
+
# @return [String] [Optional] Creates a translated version of the page in the specified language.
|
|
55
71
|
# @!attribute three_ds
|
|
56
|
-
# @return [ThreeDSRequest]
|
|
72
|
+
# @return [ThreeDSRequest] [Optional] Information required for 3D Secure authentication payments.
|
|
57
73
|
# @!attribute sender
|
|
58
|
-
# @return [Sender]
|
|
74
|
+
# @return [Sender] [Optional] The sender of the payment.
|
|
59
75
|
# @!attribute capture
|
|
60
|
-
# @return [TrueClass, FalseClass]
|
|
76
|
+
# @return [TrueClass, FalseClass] [Optional] Specifies whether to capture the payment, if applicable.
|
|
61
77
|
# @!attribute ip_address
|
|
62
|
-
# @return [String]
|
|
78
|
+
# @return [String] [Optional] The Customers IP address. Only IPv4 and IPv6 addresses are accepted.
|
|
79
|
+
# @deprecated The Customers IP address is deprecated in the API reference. Will be removed in the next
|
|
80
|
+
# major version.
|
|
63
81
|
# @!attribute capture_on
|
|
64
|
-
# @return [Time]
|
|
82
|
+
# @return [Time] [Optional] A timestamp specifying when to capture the payment, as an ISO 8601 code.
|
|
65
83
|
# @!attribute tax_amount
|
|
66
|
-
# @return [Integer]
|
|
84
|
+
# @return [Integer] [Optional] The total tax amount, in the minor currency unit. Not in the
|
|
85
|
+
# payment sessions request specification.
|
|
67
86
|
# @!attribute authorization_type
|
|
68
87
|
# @return [String] [Optional] {AuthorizationType} Enum: "Final" "Estimated". Default: "Final".
|
|
88
|
+
# @!attribute instruction
|
|
89
|
+
# @return [HostedPaymentInstruction] [Optional] Details about the payment instruction.
|
|
69
90
|
# @!attribute payment_plan
|
|
70
91
|
# @return [PaymentPlan] [Optional] The information to process a recurring payment request.
|
|
71
92
|
# To be used when the payment_type is Recurring.
|
|
@@ -90,6 +111,7 @@ module CheckoutSdk
|
|
|
90
111
|
:amount_allocations,
|
|
91
112
|
:risk,
|
|
92
113
|
:retry,
|
|
114
|
+
:customer_retry,
|
|
93
115
|
:display_name,
|
|
94
116
|
:success_url,
|
|
95
117
|
:failure_url,
|
|
@@ -102,7 +124,8 @@ module CheckoutSdk
|
|
|
102
124
|
:capture_on,
|
|
103
125
|
:tax_amount,
|
|
104
126
|
:authorization_type,
|
|
105
|
-
:payment_plan
|
|
127
|
+
:payment_plan,
|
|
128
|
+
:instruction
|
|
106
129
|
end
|
|
107
130
|
end
|
|
108
131
|
end
|
|
@@ -2,11 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Payments
|
|
5
|
+
# Sender identification details of an Account Funding Transaction on a Payment Setup.
|
|
6
|
+
# Maps swagger `PaymentSetup.account_funding_transaction.sender.identification`.
|
|
7
|
+
#
|
|
5
8
|
# @!attribute type
|
|
6
|
-
#
|
|
9
|
+
# The type of identification used to identify the sender.
|
|
10
|
+
# [Optional]
|
|
11
|
+
# @return [String] One of {AccountFundingTransactionIdentificationType}.
|
|
7
12
|
# @!attribute number
|
|
13
|
+
# The identification number.
|
|
14
|
+
# [Optional]
|
|
8
15
|
# @return [String]
|
|
9
16
|
# @!attribute issuing_country
|
|
17
|
+
# The two-letter ISO country code of the country that issued the identification.
|
|
18
|
+
# [Optional]
|
|
10
19
|
# @return [String] {CheckoutSdk::Common::Country}
|
|
11
20
|
class AccountFundingTransactionIdentification
|
|
12
21
|
attr_accessor :type,
|
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Payments
|
|
5
|
-
#
|
|
6
|
-
#
|
|
5
|
+
# The type of identification used to identify the sender of an Account Funding Transaction on a
|
|
6
|
+
# Payment Setup. Maps swagger `PaymentSetup.account_funding_transaction.sender.identification.type`.
|
|
7
7
|
module AccountFundingTransactionIdentificationType
|
|
8
|
+
# A driving license.
|
|
8
9
|
DRIVING_LICENSE = 'driving_license'
|
|
10
|
+
# A passport.
|
|
9
11
|
PASSPORT = 'passport'
|
|
12
|
+
# A national identity document.
|
|
10
13
|
NATIONAL_ID = 'national_id'
|
|
11
|
-
TAX_ID = 'tax_id'
|
|
12
|
-
OTHER = 'other'
|
|
13
14
|
end
|
|
14
15
|
end
|
|
15
16
|
end
|
|
@@ -2,17 +2,45 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Payments
|
|
5
|
+
# Account funding transaction recipient details on a Payment Setup.
|
|
6
|
+
# Maps swagger `PaymentSetup.account_funding_transaction.recipient`.
|
|
7
|
+
#
|
|
5
8
|
# @!attribute first_name
|
|
9
|
+
# The recipient's first name.
|
|
10
|
+
# [Optional]
|
|
11
|
+
# max 50 characters
|
|
6
12
|
# @return [String]
|
|
7
13
|
# @!attribute last_name
|
|
14
|
+
# The recipient's last name.
|
|
15
|
+
# [Optional]
|
|
16
|
+
# max 50 characters
|
|
8
17
|
# @return [String]
|
|
9
18
|
# @!attribute account_number
|
|
19
|
+
# Any identifier like part of the PAN (first six digits and last four digits), an IBAN, an internal
|
|
20
|
+
# account number, or a phone number related to the primary recipient's account.
|
|
21
|
+
# [Optional]
|
|
22
|
+
# max 34 characters
|
|
10
23
|
# @return [String]
|
|
11
24
|
# @!attribute account_type
|
|
25
|
+
# The type of the recipient's account.
|
|
26
|
+
# [Optional]
|
|
27
|
+
# @deprecated Not part of the Recipient schema of the Payment Setups account funding transaction; the
|
|
28
|
+
# API ignores it on requests. There is no replacement. Will be removed in the next major version.
|
|
12
29
|
# @return [String]
|
|
13
30
|
# @!attribute date_of_birth
|
|
14
|
-
#
|
|
31
|
+
# Date of birth of the recipient (yyyy-mm-dd).
|
|
32
|
+
# [Optional]
|
|
33
|
+
# Format: date
|
|
34
|
+
# @return [String]
|
|
15
35
|
# @!attribute address
|
|
36
|
+
# The recipient's address. Maps swagger `PaymentSetupAddress`; all keys are optional:
|
|
37
|
+
# - `address_line1`: The first line of the address. max 200 characters
|
|
38
|
+
# - `address_line2`: The second line of the address. max 200 characters
|
|
39
|
+
# - `city`: The address city. max 50 characters
|
|
40
|
+
# - `state`: The address state or county. max 50 characters
|
|
41
|
+
# - `zip`: The postal or zip code. max 50 characters
|
|
42
|
+
# - `country`: The address country, in ISO 3166-1 alpha-2 format. max 2 characters
|
|
43
|
+
# [Optional]
|
|
16
44
|
# @return [CheckoutSdk::Common::Address]
|
|
17
45
|
class AccountFundingTransactionRecipient
|
|
18
46
|
attr_accessor :first_name,
|
|
@@ -2,19 +2,51 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Payments
|
|
5
|
+
# Account funding transaction sender details on a Payment Setup.
|
|
6
|
+
# Maps swagger `PaymentSetup.account_funding_transaction.sender`.
|
|
7
|
+
#
|
|
5
8
|
# @!attribute first_name
|
|
9
|
+
# The sender's first name.
|
|
10
|
+
# [Optional]
|
|
11
|
+
# @deprecated Not part of the Sender schema of the Payment Setups account funding transaction; the
|
|
12
|
+
# API ignores it on requests. There is no replacement. Will be removed in the next major version.
|
|
6
13
|
# @return [String]
|
|
7
14
|
# @!attribute last_name
|
|
15
|
+
# The sender's last name.
|
|
16
|
+
# [Optional]
|
|
17
|
+
# @deprecated Not part of the Sender schema of the Payment Setups account funding transaction; the
|
|
18
|
+
# API ignores it on requests. There is no replacement. Will be removed in the next major version.
|
|
8
19
|
# @return [String]
|
|
9
20
|
# @!attribute date_of_birth
|
|
10
|
-
#
|
|
21
|
+
# Date of birth of the sender (yyyy-mm-dd).
|
|
22
|
+
# [Optional]
|
|
23
|
+
# Format: date
|
|
24
|
+
# @return [String]
|
|
11
25
|
# @!attribute country_of_birth
|
|
26
|
+
# The sender's country of birth, as an ISO 3166-1 alpha-2 code.
|
|
27
|
+
# [Optional]
|
|
28
|
+
# @deprecated Not part of the Sender schema of the Payment Setups account funding transaction; the
|
|
29
|
+
# API ignores it on requests. There is no replacement. Will be removed in the next major version.
|
|
12
30
|
# @return [String] {CheckoutSdk::Common::Country}
|
|
13
31
|
# @!attribute nationality
|
|
32
|
+
# The sender's nationality, as an ISO 3166-1 alpha-2 code.
|
|
33
|
+
# [Optional]
|
|
34
|
+
# @deprecated Not part of the Sender schema of the Payment Setups account funding transaction; the
|
|
35
|
+
# API ignores it on requests. There is no replacement. Will be removed in the next major version.
|
|
14
36
|
# @return [String] {CheckoutSdk::Common::Country}
|
|
15
37
|
# @!attribute address
|
|
38
|
+
# The sender's address.
|
|
39
|
+
# [Optional]
|
|
40
|
+
# @deprecated Not part of the Sender schema of the Payment Setups account funding transaction; the
|
|
41
|
+
# API ignores it on requests. There is no replacement. Will be removed in the next major version.
|
|
16
42
|
# @return [CheckoutSdk::Common::Address]
|
|
43
|
+
# @!attribute reference
|
|
44
|
+
# The unique reference for the sender of the payment.
|
|
45
|
+
# [Optional]
|
|
46
|
+
# @return [String]
|
|
17
47
|
# @!attribute identification
|
|
48
|
+
# Sender identification details.
|
|
49
|
+
# [Optional]
|
|
18
50
|
# @return [AccountFundingTransactionIdentification]
|
|
19
51
|
class AccountFundingTransactionSender
|
|
20
52
|
attr_accessor :first_name,
|
|
@@ -23,6 +55,7 @@ module CheckoutSdk
|
|
|
23
55
|
:country_of_birth,
|
|
24
56
|
:nationality,
|
|
25
57
|
:address,
|
|
58
|
+
:reference,
|
|
26
59
|
:identification
|
|
27
60
|
end
|
|
28
61
|
end
|
|
@@ -2,41 +2,77 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Payments
|
|
5
|
-
# Bacs payment method configuration on a Payment Setup. Maps swagger `Bacs`.
|
|
6
|
-
#
|
|
7
|
-
# @!attribute status
|
|
8
|
-
# @return [String] (response-only) Payment method status, one of
|
|
9
|
-
# {PaymentSetupPaymentMethodStatus} (e.g. "ready").
|
|
10
|
-
# @!attribute flags
|
|
11
|
-
# @return [Array(String)] (response-only) Diagnostic flags returned by the API.
|
|
12
|
-
# @!attribute initialization
|
|
13
|
-
# @return [String] The initialization type for the payment method.
|
|
14
|
-
# @!attribute instrument_id
|
|
15
|
-
# @return [String] (response-only) The ID of the Bacs instrument used for the payment.
|
|
16
|
-
# @!attribute account_holder
|
|
17
|
-
# @return [Hash] The account holder details (`type`, `first_name`, `last_name`,
|
|
18
|
-
# `company_name`, `email`).
|
|
19
|
-
# @!attribute account_number
|
|
20
|
-
# @return [String] The account number of the Bacs Direct Debit account.
|
|
21
|
-
# @!attribute bank_code
|
|
22
|
-
# @return [String] The bank code (sort code) of the Bacs Direct Debit account.
|
|
23
|
-
# @!attribute country
|
|
24
|
-
# @return [String] {CheckoutSdk::Common::Country}
|
|
25
|
-
# @!attribute currency
|
|
26
|
-
# @return [String] {CheckoutSdk::Common::Currency}
|
|
27
|
-
# @!attribute allow_partial_match
|
|
28
|
-
# @return [TrueClass, FalseClass] Whether to allow a partial match of the account holder details.
|
|
5
|
+
# The Bacs payment method's details and configuration on a Payment Setup. Maps swagger `Bacs`.
|
|
6
|
+
# Sent under the `payment_methods.bacs` key.
|
|
29
7
|
class BacsPaymentMethod
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
8
|
+
# The payment method status.
|
|
9
|
+
# [Optional]
|
|
10
|
+
# Read only.
|
|
11
|
+
# @return [String] One of {PaymentSetupPaymentMethodStatus}.
|
|
12
|
+
attr_accessor :status
|
|
13
|
+
|
|
14
|
+
# The list of error codes or indicators that highlight missing or invalid information.
|
|
15
|
+
# [Optional]
|
|
16
|
+
# Read only.
|
|
17
|
+
# @return [Array(String)]
|
|
18
|
+
attr_accessor :flags
|
|
19
|
+
|
|
20
|
+
# The initialization state of the payment method.
|
|
21
|
+
# When you create a Payment Setup, this defaults to `disabled`.
|
|
22
|
+
# On update the API replaces the payment methods, so send `enabled` again to keep the method enabled.
|
|
23
|
+
# The specification does not state this; it is the API's behaviour.
|
|
24
|
+
# [Optional]
|
|
25
|
+
# Default: disabled
|
|
26
|
+
# @return [String] One of {PaymentSetupPaymentMethodInitialization}.
|
|
27
|
+
attr_accessor :initialization
|
|
28
|
+
|
|
29
|
+
# The ID of the Bacs instrument used for the payment.
|
|
30
|
+
# [Optional]
|
|
31
|
+
# Read only.
|
|
32
|
+
# @return [String]
|
|
33
|
+
attr_accessor :instrument_id
|
|
34
|
+
|
|
35
|
+
# The account holder details.
|
|
36
|
+
# [Optional]
|
|
37
|
+
# Keys:
|
|
38
|
+
# - `type` (String): The type of account holder. Enum: "individual" "corporate".
|
|
39
|
+
# - `first_name` (String): The first name of the account holder.
|
|
40
|
+
# - `last_name` (String): The last name of the account holder.
|
|
41
|
+
# - `company_name` (String): The legal name of a registered company that holds the account.
|
|
42
|
+
# - `email` (String): The email address of the account holder.
|
|
43
|
+
# @return [Hash]
|
|
44
|
+
attr_accessor :account_holder
|
|
45
|
+
|
|
46
|
+
# The account number of the Bacs Direct Debit account.
|
|
47
|
+
# [Optional]
|
|
48
|
+
# Write only.
|
|
49
|
+
# @return [String]
|
|
50
|
+
attr_accessor :account_number
|
|
51
|
+
|
|
52
|
+
# The sort code of the Bacs Direct Debit account.
|
|
53
|
+
# [Optional]
|
|
54
|
+
# Write only.
|
|
55
|
+
# @return [String]
|
|
56
|
+
attr_accessor :bank_code
|
|
57
|
+
|
|
58
|
+
# The account's country, as an ISO 3166-1 alpha-2 code.
|
|
59
|
+
# [Optional]
|
|
60
|
+
# min 2 characters, max 2 characters
|
|
61
|
+
# @return [String] {CheckoutSdk::Common::Country}
|
|
62
|
+
attr_accessor :country
|
|
63
|
+
|
|
64
|
+
# The account holder's account currency.
|
|
65
|
+
# [Optional]
|
|
66
|
+
# @return [String] {CheckoutSdk::Common::Currency}
|
|
67
|
+
attr_accessor :currency
|
|
68
|
+
|
|
69
|
+
# Indicates whether the Bacs instrument is created when account validation returns a partial
|
|
70
|
+
# match. When `true`, the instrument is created on a partial match; when `false`, instrument
|
|
71
|
+
# creation fails on a partial match.
|
|
72
|
+
# [Optional]
|
|
73
|
+
# Default: false
|
|
74
|
+
# @return [TrueClass, FalseClass]
|
|
75
|
+
attr_accessor :allow_partial_match
|
|
40
76
|
end
|
|
41
77
|
end
|
|
42
78
|
end
|
|
@@ -18,7 +18,6 @@ module CheckoutSdk
|
|
|
18
18
|
# The payment method status.
|
|
19
19
|
# [Optional]
|
|
20
20
|
# Read only.
|
|
21
|
-
# Enum: "unavailable" "action_required" "ready" "initialization_required" "invalid"
|
|
22
21
|
# @return [String] One of {PaymentSetupPaymentMethodStatus}.
|
|
23
22
|
attr_accessor :status
|
|
24
23
|
|
|
@@ -30,9 +29,10 @@ module CheckoutSdk
|
|
|
30
29
|
|
|
31
30
|
# The initialization state of the payment method.
|
|
32
31
|
# When you create a Payment Setup, this defaults to `disabled`.
|
|
32
|
+
# On update the API replaces the payment methods, so send `enabled` again to keep the method enabled.
|
|
33
|
+
# The specification does not state this; it is the API's behaviour.
|
|
33
34
|
# [Optional]
|
|
34
|
-
# Default:
|
|
35
|
-
# Enum: "disabled" "enabled"
|
|
35
|
+
# Default: disabled
|
|
36
36
|
# @return [String] One of {PaymentSetupPaymentMethodInitialization}.
|
|
37
37
|
attr_accessor :initialization
|
|
38
38
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Payments
|
|
5
|
+
# The type of payment on a Payment Setup. Maps swagger `PaymentSetup.payment_type`.
|
|
6
|
+
#
|
|
7
|
+
# The Payment Setups API declares these values in lowercase, unlike {PaymentType}, which is the
|
|
8
|
+
# capitalized enum of the payments API. Use this module for the :payment_type key of a Payment
|
|
9
|
+
# Setup request. When :payment_type is not sent, the API uses "regular".
|
|
10
|
+
module PaymentSetupPaymentType
|
|
11
|
+
REGULAR = 'regular'
|
|
12
|
+
RECURRING = 'recurring'
|
|
13
|
+
MOTO = 'moto'
|
|
14
|
+
INSTALLMENT = 'installment'
|
|
15
|
+
PAY_LATER = 'pay_later'
|
|
16
|
+
UNSCHEDULED = 'unscheduled'
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -32,6 +32,11 @@ module CheckoutSdk
|
|
|
32
32
|
# {PaymentSetupRisk}), convert it first with
|
|
33
33
|
# CheckoutSdk::JsonSerializer.to_custom_hash(object); a typed object nested directly in the
|
|
34
34
|
# Hash is not serialized and is sent as "#<CheckoutSdk::...>".
|
|
35
|
+
# :payment_type - String, the type of payment, one of {PaymentSetupPaymentType} (lowercase,
|
|
36
|
+
# unlike {PaymentType}): "regular", "recurring", "moto", "installment", "pay_later" or
|
|
37
|
+
# "unscheduled". Default "regular". You must provide it for card payments in which the
|
|
38
|
+
# cardholder is not present, for example a recurring payment or a mail order/telephone order
|
|
39
|
+
# (MOTO) payment.
|
|
35
40
|
# :payment_methods may include :cashapp (the key is the single lowercase word `cashapp`), a Hash
|
|
36
41
|
# with the keys documented on {CashAppPaymentMethod}; you send :initialization ("disabled" or
|
|
37
42
|
# "enabled") and :customer_profile_sharing (Boolean).
|
|
@@ -128,6 +133,11 @@ module CheckoutSdk
|
|
|
128
133
|
# {PaymentSetupRisk}), convert it first with
|
|
129
134
|
# CheckoutSdk::JsonSerializer.to_custom_hash(object); a typed object nested directly in the
|
|
130
135
|
# Hash is not serialized and is sent as "#<CheckoutSdk::...>".
|
|
136
|
+
# :payment_type - String, the type of payment, one of {PaymentSetupPaymentType} (lowercase,
|
|
137
|
+
# unlike {PaymentType}): "regular", "recurring", "moto", "installment", "pay_later" or
|
|
138
|
+
# "unscheduled". Default "regular". You must provide it for card payments in which the
|
|
139
|
+
# cardholder is not present, for example a recurring payment or a mail order/telephone order
|
|
140
|
+
# (MOTO) payment.
|
|
131
141
|
# :payment_methods may include :cashapp (the key is the single lowercase word `cashapp`), a Hash
|
|
132
142
|
# with the keys documented on {CashAppPaymentMethod}; you send :initialization ("disabled" or
|
|
133
143
|
# "enabled") and :customer_profile_sharing (Boolean).
|