checkout_sdk 2.0.0 → 2.2.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/apm/apm.rb +5 -0
- data/lib/checkout_sdk/apm/bacs/bacs_client.rb +29 -0
- data/lib/checkout_sdk/apm/bacs/bacs_notification_request.rb +52 -0
- data/lib/checkout_sdk/apm/bacs/bacs_notification_type.rb +10 -0
- data/lib/checkout_sdk/balances/balances.rb +3 -0
- data/lib/checkout_sdk/balances/balances_client.rb +37 -3
- data/lib/checkout_sdk/balances/top_up_bank_details.rb +22 -0
- data/lib/checkout_sdk/balances/top_up_funding_details.rb +53 -0
- data/lib/checkout_sdk/balances/top_up_instructions.rb +34 -0
- data/lib/checkout_sdk/checkout_api.rb +4 -0
- data/lib/checkout_sdk/common/account_holder_type.rb +16 -0
- data/lib/checkout_sdk/common/customer_request.rb +15 -3
- data/lib/checkout_sdk/common/instrument_type.rb +8 -0
- data/lib/checkout_sdk/common/payment_source_type.rb +19 -0
- data/lib/checkout_sdk/instruments/ach_account_type.rb +14 -0
- data/lib/checkout_sdk/instruments/bacs_payment_type.rb +15 -0
- data/lib/checkout_sdk/instruments/create/create_ach_account_holder.rb +29 -0
- data/lib/checkout_sdk/instruments/create/create_ach_instrument_data.rb +30 -0
- data/lib/checkout_sdk/instruments/create/create_bacs_account_holder.rb +24 -0
- data/lib/checkout_sdk/instruments/create/create_bacs_billing_address.rb +30 -0
- data/lib/checkout_sdk/instruments/create/create_bacs_instrument_account.rb +14 -0
- data/lib/checkout_sdk/instruments/create/create_bacs_instrument_data.rb +36 -0
- data/lib/checkout_sdk/instruments/create/create_sepa_account_holder.rb +28 -0
- data/lib/checkout_sdk/instruments/create/create_sepa_billing_address.rb +31 -0
- data/lib/checkout_sdk/instruments/create/create_sepa_instrument_data.rb +40 -0
- data/lib/checkout_sdk/instruments/create/instrument_ach.rb +25 -0
- data/lib/checkout_sdk/instruments/create/instrument_bacs.rb +29 -0
- data/lib/checkout_sdk/instruments/create/instrument_sepa.rb +9 -3
- data/lib/checkout_sdk/instruments/get/payment_network.rb +8 -4
- data/lib/checkout_sdk/instruments/instrument_account_holder_type.rb +14 -0
- data/lib/checkout_sdk/instruments/instruments.rb +28 -1
- data/lib/checkout_sdk/instruments/sepa_mandate_type.rb +11 -0
- data/lib/checkout_sdk/instruments/sepa_payment_type.rb +15 -0
- data/lib/checkout_sdk/instruments/update/update_ach_account_holder.rb +28 -0
- data/lib/checkout_sdk/instruments/update/update_ach_instrument_data.rb +32 -0
- data/lib/checkout_sdk/instruments/update/update_bacs_account_holder.rb +31 -0
- data/lib/checkout_sdk/instruments/update/update_bacs_billing_address.rb +30 -0
- data/lib/checkout_sdk/instruments/update/update_bacs_instrument_data.rb +36 -0
- data/lib/checkout_sdk/instruments/update/update_instrument_ach.rb +21 -0
- data/lib/checkout_sdk/instruments/update/update_instrument_bacs.rb +21 -0
- data/lib/checkout_sdk/instruments/update/update_instrument_sepa.rb +20 -0
- data/lib/checkout_sdk/instruments/update/update_sepa_account_holder.rb +31 -0
- data/lib/checkout_sdk/instruments/update/update_sepa_billing_address.rb +31 -0
- data/lib/checkout_sdk/instruments/update/update_sepa_instrument_data.rb +43 -0
- data/lib/checkout_sdk/json_serializer.rb +3 -1
- data/lib/checkout_sdk/oauth_scopes.rb +1 -0
- data/lib/checkout_sdk/payments/flow/flow_client.rb +6 -0
- data/lib/checkout_sdk/payments/payments.rb +22 -0
- data/lib/checkout_sdk/payments/setups/payment_setup_billing_descriptor.rb +19 -0
- data/lib/checkout_sdk/payments/setups/payment_setup_presentment_details.rb +17 -0
- data/lib/checkout_sdk/payments/setups/payment_setup_terminal.rb +16 -0
- data/lib/checkout_sdk/payments/setups/payment_setups_client.rb +11 -5
- data/lib/checkout_sdk/payments/source/apm/ach_source.rb +16 -5
- data/lib/checkout_sdk/payments/source/apm/ach_source_account_holder.rb +45 -0
- data/lib/checkout_sdk/payments/source/apm/ach_source_account_type.rb +22 -0
- data/lib/checkout_sdk/payments/source/apm/alipay_cn_source.rb +14 -0
- data/lib/checkout_sdk/payments/source/apm/alipay_hk_source.rb +14 -0
- data/lib/checkout_sdk/payments/source/apm/alipay_plus_source.rb +9 -0
- data/lib/checkout_sdk/payments/source/apm/bacs_source.rb +18 -0
- data/lib/checkout_sdk/payments/source/apm/dana_source.rb +14 -0
- data/lib/checkout_sdk/payments/source/apm/gcash_source.rb +14 -0
- data/lib/checkout_sdk/payments/source/apm/kakaopay_source.rb +14 -0
- data/lib/checkout_sdk/payments/source/apm/mobile_pay_source.rb +14 -0
- data/lib/checkout_sdk/payments/source/apm/pay_now_source.rb +14 -0
- data/lib/checkout_sdk/payments/source/apm/sepa_source.rb +28 -11
- data/lib/checkout_sdk/payments/source/apm/sepa_source_account_holder.rb +37 -0
- data/lib/checkout_sdk/payments/source/apm/sepa_source_billing_address.rb +31 -0
- data/lib/checkout_sdk/payments/source/apm/swish_account_holder.rb +18 -0
- data/lib/checkout_sdk/payments/source/apm/swish_billing_descriptor.rb +14 -0
- data/lib/checkout_sdk/payments/source/apm/swish_source.rb +29 -0
- data/lib/checkout_sdk/payments/source/apm/tng_source.rb +14 -0
- data/lib/checkout_sdk/payments/source/apm/truemoney_source.rb +14 -0
- data/lib/checkout_sdk/payments/source/apm/twint_source.rb +14 -0
- data/lib/checkout_sdk/payments/source/apm/vipps_source.rb +14 -0
- data/lib/checkout_sdk/version.rb +1 -1
- metadata +57 -3
- data/lib/checkout_sdk/instruments/create/instrument_data.rb +0 -26
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Instruments
|
|
5
|
+
# The account holder details of a SEPA instrument being stored.
|
|
6
|
+
#
|
|
7
|
+
# @!attribute first_name
|
|
8
|
+
# @return [String] The first name of the account holder. [Required]
|
|
9
|
+
# @!attribute last_name
|
|
10
|
+
# @return [String] The last name of the account holder. [Required]
|
|
11
|
+
# @!attribute billing_address
|
|
12
|
+
# @return [CreateSepaBillingAddress] The billing address of the account
|
|
13
|
+
# holder. [Required]
|
|
14
|
+
# @!attribute company_name
|
|
15
|
+
# @return [String] The legal name of a registered company that holds the
|
|
16
|
+
# account. [Optional] max 50 characters.
|
|
17
|
+
# @!attribute type
|
|
18
|
+
# @return [String] {InstrumentAccountHolderType} The type of account holder.
|
|
19
|
+
# [Optional]
|
|
20
|
+
class CreateSepaAccountHolder
|
|
21
|
+
attr_accessor :first_name,
|
|
22
|
+
:last_name,
|
|
23
|
+
:billing_address,
|
|
24
|
+
:company_name,
|
|
25
|
+
:type
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Instruments
|
|
5
|
+
# The billing address of the account holder of a SEPA instrument being stored.
|
|
6
|
+
#
|
|
7
|
+
# Every property is required on this shape.
|
|
8
|
+
#
|
|
9
|
+
# @!attribute address_line1
|
|
10
|
+
# @return [String] The first line of the address. [Required] max 200 characters.
|
|
11
|
+
# @!attribute address_line2
|
|
12
|
+
# @return [String] The street number. If no number, pass "w/n".
|
|
13
|
+
# [Required] max 10 characters.
|
|
14
|
+
# @!attribute city
|
|
15
|
+
# @return [String] The address city. [Required] max 35 characters.
|
|
16
|
+
# Note the update variant allows max 50.
|
|
17
|
+
# @!attribute zip
|
|
18
|
+
# @return [String] The address zip/postal code. [Required] max 16 characters.
|
|
19
|
+
# Note the update variant allows max 50.
|
|
20
|
+
# @!attribute country
|
|
21
|
+
# @return [String] {CheckoutSdk::Common::Country} The two-letter ISO country
|
|
22
|
+
# code of the address. [Required] min 2 characters, max 2 characters.
|
|
23
|
+
class CreateSepaBillingAddress
|
|
24
|
+
attr_accessor :address_line1,
|
|
25
|
+
:address_line2,
|
|
26
|
+
:city,
|
|
27
|
+
:zip,
|
|
28
|
+
:country
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Instruments
|
|
5
|
+
# The details of the mandate of a SEPA instrument being stored.
|
|
6
|
+
#
|
|
7
|
+
# @!attribute account_number
|
|
8
|
+
# @return [String] The International Bank Account Number (IBAN) of the
|
|
9
|
+
# account. [Required] min 15 characters, max 34 characters.
|
|
10
|
+
# @!attribute country
|
|
11
|
+
# @return [String] {CheckoutSdk::Common::Country} The country of the account.
|
|
12
|
+
# [Required] min 2 characters, max 2 characters.
|
|
13
|
+
# @!attribute currency
|
|
14
|
+
# @return [String] {CheckoutSdk::Common::Currency} The currency of the account.
|
|
15
|
+
# [Required] min 3 characters, max 3 characters.
|
|
16
|
+
# @!attribute payment_type
|
|
17
|
+
# @return [String] {SepaPaymentType} The type of payment, recurring or
|
|
18
|
+
# regular. [Required] Lowercase, unlike the Bacs equivalent.
|
|
19
|
+
# @!attribute type
|
|
20
|
+
# @return [String] {SepaMandateType} The type of mandate, Core or B2B.
|
|
21
|
+
# [Optional]
|
|
22
|
+
# @!attribute mandate_id
|
|
23
|
+
# @return [String] The mandate ID. If a mandate ID is not provided, a new,
|
|
24
|
+
# random mandate ID will be generated. [Optional] min 1 character,
|
|
25
|
+
# max 35 characters.
|
|
26
|
+
# @!attribute date_of_signature
|
|
27
|
+
# @return [String] The date on which the mandate was signed, in the format
|
|
28
|
+
# yyyy-MM-dd. Required if mandate_id is provided. [Optional]
|
|
29
|
+
# Format: date - pass a yyyy-MM-dd String, not a DateTime.
|
|
30
|
+
class CreateSepaInstrumentData
|
|
31
|
+
attr_accessor :account_number,
|
|
32
|
+
:country,
|
|
33
|
+
:currency,
|
|
34
|
+
:payment_type,
|
|
35
|
+
:type,
|
|
36
|
+
:mandate_id,
|
|
37
|
+
:date_of_signature
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Instruments
|
|
5
|
+
# Store ACH bank account details.
|
|
6
|
+
#
|
|
7
|
+
# @!attribute instrument_data
|
|
8
|
+
# @return [CreateAchInstrumentData] The details of the bank account.
|
|
9
|
+
# [Required]
|
|
10
|
+
# @!attribute account_holder
|
|
11
|
+
# @return [CreateAchAccountHolder] The account holder details. [Required]
|
|
12
|
+
# @!attribute customer
|
|
13
|
+
# @return [CheckoutSdk::Common::CustomerRequest] The customer's details.
|
|
14
|
+
# [Optional]
|
|
15
|
+
class InstrumentAch < Instrument
|
|
16
|
+
attr_accessor :instrument_data,
|
|
17
|
+
:account_holder,
|
|
18
|
+
:customer
|
|
19
|
+
|
|
20
|
+
def initialize
|
|
21
|
+
super(CheckoutSdk::Common::InstrumentType::ACH)
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Instruments
|
|
5
|
+
# Store Bacs Direct Debit account details.
|
|
6
|
+
#
|
|
7
|
+
# @!attribute account
|
|
8
|
+
# @return [CreateBacsInstrumentAccount] The account configuration for the
|
|
9
|
+
# instrument. [Required]
|
|
10
|
+
# @!attribute instrument_data
|
|
11
|
+
# @return [CreateBacsInstrumentData] The details of the Bacs Direct Debit
|
|
12
|
+
# account. [Required]
|
|
13
|
+
# @!attribute account_holder
|
|
14
|
+
# @return [CreateBacsAccountHolder] The account holder details. [Required]
|
|
15
|
+
# @!attribute customer
|
|
16
|
+
# @return [CheckoutSdk::Common::CustomerRequest] The customer's details.
|
|
17
|
+
# [Optional]
|
|
18
|
+
class InstrumentBacs < Instrument
|
|
19
|
+
attr_accessor :account,
|
|
20
|
+
:instrument_data,
|
|
21
|
+
:account_holder,
|
|
22
|
+
:customer
|
|
23
|
+
|
|
24
|
+
def initialize
|
|
25
|
+
super(CheckoutSdk::Common::InstrumentType::BACS)
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -2,13 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Instruments
|
|
5
|
+
# Store SEPA account details.
|
|
6
|
+
#
|
|
5
7
|
# @!attribute instrument_data
|
|
6
|
-
# @return [
|
|
8
|
+
# @return [CreateSepaInstrumentData] The details of the mandate. [Required]
|
|
7
9
|
# @!attribute account_holder
|
|
8
|
-
# @return [
|
|
10
|
+
# @return [CreateSepaAccountHolder] The account holder details. [Required]
|
|
11
|
+
# @!attribute customer
|
|
12
|
+
# @return [CheckoutSdk::Common::CustomerRequest] The customer's details.
|
|
13
|
+
# [Optional]
|
|
9
14
|
class InstrumentSepa < Instrument
|
|
10
15
|
attr_accessor :instrument_data,
|
|
11
|
-
:account_holder
|
|
16
|
+
:account_holder,
|
|
17
|
+
:customer
|
|
12
18
|
|
|
13
19
|
def initialize
|
|
14
20
|
super(CheckoutSdk::Common::InstrumentType::SEPA)
|
|
@@ -2,13 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Instruments
|
|
5
|
+
# The banking network used to filter the fields returned by
|
|
6
|
+
# GET /validation/bank-accounts/{country}/{currency}.
|
|
7
|
+
#
|
|
8
|
+
# All six values are declared lowercase by the specification.
|
|
5
9
|
module PaymentNetwork
|
|
6
10
|
LOCAL = 'local'
|
|
7
11
|
SEPA = 'sepa'
|
|
8
|
-
FPS = '
|
|
9
|
-
ACH = '
|
|
10
|
-
FEDWIRE = '
|
|
11
|
-
SWIFT = '
|
|
12
|
+
FPS = 'fps'
|
|
13
|
+
ACH = 'ach'
|
|
14
|
+
FEDWIRE = 'fedwire'
|
|
15
|
+
SWIFT = 'swift'
|
|
12
16
|
end
|
|
13
17
|
end
|
|
14
18
|
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Instruments
|
|
5
|
+
# The type of account holder on a stored instrument.
|
|
6
|
+
#
|
|
7
|
+
# The instrument schemas declare individual and corporate only, unlike
|
|
8
|
+
# {CheckoutSdk::Common::AccountHolderType} which also declares government.
|
|
9
|
+
module InstrumentAccountHolderType
|
|
10
|
+
INDIVIDUAL = 'individual'
|
|
11
|
+
CORPORATE = 'corporate'
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -1,19 +1,46 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
# Enums
|
|
4
|
+
require 'checkout_sdk/instruments/sepa_payment_type'
|
|
5
|
+
require 'checkout_sdk/instruments/bacs_payment_type'
|
|
6
|
+
require 'checkout_sdk/instruments/sepa_mandate_type'
|
|
7
|
+
require 'checkout_sdk/instruments/ach_account_type'
|
|
8
|
+
require 'checkout_sdk/instruments/instrument_account_holder_type'
|
|
3
9
|
# Update
|
|
4
10
|
require 'checkout_sdk/instruments/update/update_instrument'
|
|
11
|
+
require 'checkout_sdk/instruments/update/update_bacs_billing_address'
|
|
12
|
+
require 'checkout_sdk/instruments/update/update_bacs_account_holder'
|
|
13
|
+
require 'checkout_sdk/instruments/update/update_bacs_instrument_data'
|
|
14
|
+
require 'checkout_sdk/instruments/update/update_sepa_billing_address'
|
|
15
|
+
require 'checkout_sdk/instruments/update/update_sepa_account_holder'
|
|
16
|
+
require 'checkout_sdk/instruments/update/update_sepa_instrument_data'
|
|
17
|
+
require 'checkout_sdk/instruments/update/update_ach_account_holder'
|
|
18
|
+
require 'checkout_sdk/instruments/update/update_ach_instrument_data'
|
|
5
19
|
require 'checkout_sdk/instruments/update/update_instrument_card'
|
|
6
20
|
require 'checkout_sdk/instruments/update/update_instrument_bank_account'
|
|
7
21
|
require 'checkout_sdk/instruments/update/update_instrument_token'
|
|
22
|
+
require 'checkout_sdk/instruments/update/update_instrument_sepa'
|
|
23
|
+
require 'checkout_sdk/instruments/update/update_instrument_ach'
|
|
24
|
+
require 'checkout_sdk/instruments/update/update_instrument_bacs'
|
|
8
25
|
# Get
|
|
9
26
|
require 'checkout_sdk/instruments/get/payment_network'
|
|
10
27
|
require 'checkout_sdk/instruments/get/bank_account_field_query'
|
|
11
28
|
# Create
|
|
12
29
|
require 'checkout_sdk/instruments/create/instrument'
|
|
30
|
+
require 'checkout_sdk/instruments/create/create_bacs_billing_address'
|
|
31
|
+
require 'checkout_sdk/instruments/create/create_bacs_account_holder'
|
|
32
|
+
require 'checkout_sdk/instruments/create/create_bacs_instrument_account'
|
|
33
|
+
require 'checkout_sdk/instruments/create/create_bacs_instrument_data'
|
|
34
|
+
require 'checkout_sdk/instruments/create/create_sepa_billing_address'
|
|
35
|
+
require 'checkout_sdk/instruments/create/create_sepa_account_holder'
|
|
36
|
+
require 'checkout_sdk/instruments/create/create_sepa_instrument_data'
|
|
37
|
+
require 'checkout_sdk/instruments/create/create_ach_account_holder'
|
|
38
|
+
require 'checkout_sdk/instruments/create/create_ach_instrument_data'
|
|
13
39
|
require 'checkout_sdk/instruments/create/instrument_token'
|
|
14
40
|
require 'checkout_sdk/instruments/create/instrument_bank_account'
|
|
15
41
|
require 'checkout_sdk/instruments/create/instrument_sepa'
|
|
16
|
-
require 'checkout_sdk/instruments/create/
|
|
42
|
+
require 'checkout_sdk/instruments/create/instrument_ach'
|
|
43
|
+
require 'checkout_sdk/instruments/create/instrument_bacs'
|
|
17
44
|
# Client
|
|
18
45
|
require 'checkout_sdk/instruments/base_instruments_client'
|
|
19
46
|
require 'checkout_sdk/instruments/instruments_client'
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Instruments
|
|
5
|
+
# The type of payment on a SEPA instrument.
|
|
6
|
+
#
|
|
7
|
+
# Declared lowercase by the SEPA instrument schemas. Do not confuse this with
|
|
8
|
+
# {BacsPaymentType}, which declares the same two concepts capitalized, or with
|
|
9
|
+
# {CheckoutSdk::Payments::PaymentType}, which is the payment-level enum.
|
|
10
|
+
module SepaPaymentType
|
|
11
|
+
RECURRING = 'recurring'
|
|
12
|
+
REGULAR = 'regular'
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Instruments
|
|
5
|
+
# The account holder details of an ACH instrument being updated.
|
|
6
|
+
#
|
|
7
|
+
# account_holder is itself optional, but the specification lists all four of its
|
|
8
|
+
# properties in the required array while the field descriptions make them
|
|
9
|
+
# conditional on type. The two readings contradict each other; send the pair that
|
|
10
|
+
# matches your type value. This shape declares no billing_address at all.
|
|
11
|
+
#
|
|
12
|
+
# @!attribute first_name
|
|
13
|
+
# @return [String] First name. Required for individual account holder type.
|
|
14
|
+
# @!attribute last_name
|
|
15
|
+
# @return [String] Last name. Required for individual account holder type.
|
|
16
|
+
# @!attribute company_name
|
|
17
|
+
# @return [String] Company name. Required for corporate account holder type.
|
|
18
|
+
# @!attribute type
|
|
19
|
+
# @return [String] {InstrumentAccountHolderType} Account holder type.
|
|
20
|
+
# [Required]
|
|
21
|
+
class UpdateAchAccountHolder
|
|
22
|
+
attr_accessor :first_name,
|
|
23
|
+
:last_name,
|
|
24
|
+
:company_name,
|
|
25
|
+
:type
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Instruments
|
|
5
|
+
# The details of the bank account of an ACH instrument being updated.
|
|
6
|
+
#
|
|
7
|
+
# Every property is optional on this shape.
|
|
8
|
+
#
|
|
9
|
+
# @!attribute account_type
|
|
10
|
+
# @return [String] {AchAccountType} The type of Direct Debit account,
|
|
11
|
+
# savings or checking. [Optional]
|
|
12
|
+
# @!attribute account_number
|
|
13
|
+
# @return [String] The account number of the Direct Debit account.
|
|
14
|
+
# [Optional] min 4 characters, max 17 characters.
|
|
15
|
+
# @!attribute bank_code
|
|
16
|
+
# @return [String] The bank code of the Direct Debit account.
|
|
17
|
+
# [Optional] min 8 characters, max 9 characters.
|
|
18
|
+
# @!attribute currency
|
|
19
|
+
# @return [String] {CheckoutSdk::Common::Currency} The currency of the account.
|
|
20
|
+
# [Optional] min 3 characters, max 3 characters.
|
|
21
|
+
# @!attribute country
|
|
22
|
+
# @return [String] {CheckoutSdk::Common::Country} The country of the account.
|
|
23
|
+
# [Optional] min 2 characters, max 2 characters.
|
|
24
|
+
class UpdateAchInstrumentData
|
|
25
|
+
attr_accessor :account_type,
|
|
26
|
+
:account_number,
|
|
27
|
+
:bank_code,
|
|
28
|
+
:currency,
|
|
29
|
+
:country
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Instruments
|
|
5
|
+
# The account holder details of a Bacs Direct Debit instrument being updated.
|
|
6
|
+
#
|
|
7
|
+
# Unlike {CreateBacsAccountHolder} this shape also declares company_name and
|
|
8
|
+
# type.
|
|
9
|
+
#
|
|
10
|
+
# @!attribute first_name
|
|
11
|
+
# @return [String] The first name of the account holder. [Optional]
|
|
12
|
+
# @!attribute last_name
|
|
13
|
+
# @return [String] The last name of the account holder. [Optional]
|
|
14
|
+
# @!attribute company_name
|
|
15
|
+
# @return [String] The legal name of a registered company that holds the
|
|
16
|
+
# account. [Optional] max 50 characters.
|
|
17
|
+
# @!attribute billing_address
|
|
18
|
+
# @return [UpdateBacsBillingAddress] The billing address of the account
|
|
19
|
+
# holder. [Optional]
|
|
20
|
+
# @!attribute type
|
|
21
|
+
# @return [String] {InstrumentAccountHolderType} The type of account holder.
|
|
22
|
+
# [Optional]
|
|
23
|
+
class UpdateBacsAccountHolder
|
|
24
|
+
attr_accessor :first_name,
|
|
25
|
+
:last_name,
|
|
26
|
+
:company_name,
|
|
27
|
+
:billing_address,
|
|
28
|
+
:type
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Instruments
|
|
5
|
+
# The billing address of the account holder of a Bacs Direct Debit instrument
|
|
6
|
+
# being updated.
|
|
7
|
+
#
|
|
8
|
+
# @!attribute address_line1
|
|
9
|
+
# @return [String] The first line of the address. [Optional] max 200 characters.
|
|
10
|
+
# @!attribute address_line2
|
|
11
|
+
# @return [String] The street number. If no number, pass "w/n".
|
|
12
|
+
# [Optional] max 10 characters.
|
|
13
|
+
# @!attribute city
|
|
14
|
+
# @return [String] The address city. [Optional] max 50 characters.
|
|
15
|
+
# Note the store variant allows max 35 only.
|
|
16
|
+
# @!attribute zip
|
|
17
|
+
# @return [String] The address zip/postal code. [Optional] max 50 characters.
|
|
18
|
+
# Note the store variant allows max 16 only.
|
|
19
|
+
# @!attribute country
|
|
20
|
+
# @return [String] {CheckoutSdk::Common::Country} The two-letter ISO country
|
|
21
|
+
# code of the address. [Optional] min 2 characters, max 2 characters.
|
|
22
|
+
class UpdateBacsBillingAddress
|
|
23
|
+
attr_accessor :address_line1,
|
|
24
|
+
:address_line2,
|
|
25
|
+
:city,
|
|
26
|
+
:zip,
|
|
27
|
+
:country
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Instruments
|
|
5
|
+
# The details of a Bacs Direct Debit account being updated.
|
|
6
|
+
#
|
|
7
|
+
# Every property is optional on this shape.
|
|
8
|
+
#
|
|
9
|
+
# @!attribute account_number
|
|
10
|
+
# @return [String] The account number of the Bacs Direct Debit account.
|
|
11
|
+
# [Optional] min 8 characters, max 8 characters.
|
|
12
|
+
# @!attribute bank_code
|
|
13
|
+
# @return [String] The sort code of the Bacs Direct Debit account.
|
|
14
|
+
# [Optional] min 6 characters, max 6 characters.
|
|
15
|
+
# @!attribute country
|
|
16
|
+
# @return [String] {CheckoutSdk::Common::Country} The country of the account,
|
|
17
|
+
# as an ISO 3166-1 alpha-2 code. [Optional] min 2 characters, max 2 characters.
|
|
18
|
+
# @!attribute currency
|
|
19
|
+
# @return [String] {CheckoutSdk::Common::Currency} The currency of the account.
|
|
20
|
+
# [Optional] min 3 characters, max 3 characters.
|
|
21
|
+
# @!attribute payment_type
|
|
22
|
+
# @return [String] {BacsPaymentType} The type of payment, Recurring or
|
|
23
|
+
# Regular. [Optional] Capitalized, unlike the SEPA equivalent.
|
|
24
|
+
# @!attribute allow_partial_match
|
|
25
|
+
# @return [TrueClass, FalseClass] Whether vault accepted a partial match when
|
|
26
|
+
# looking up the Bacs instrument for the supplied account details. [Optional]
|
|
27
|
+
class UpdateBacsInstrumentData
|
|
28
|
+
attr_accessor :account_number,
|
|
29
|
+
:bank_code,
|
|
30
|
+
:country,
|
|
31
|
+
:currency,
|
|
32
|
+
:payment_type,
|
|
33
|
+
:allow_partial_match
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Instruments
|
|
5
|
+
# Update ACH bank account details.
|
|
6
|
+
#
|
|
7
|
+
# @!attribute instrument_data
|
|
8
|
+
# @return [UpdateAchInstrumentData] The details of the bank account.
|
|
9
|
+
# [Optional]
|
|
10
|
+
# @!attribute account_holder
|
|
11
|
+
# @return [UpdateAchAccountHolder] The account holder details. [Optional]
|
|
12
|
+
class UpdateInstrumentAch < UpdateInstrument
|
|
13
|
+
attr_accessor :instrument_data,
|
|
14
|
+
:account_holder
|
|
15
|
+
|
|
16
|
+
def initialize
|
|
17
|
+
super(CheckoutSdk::Common::InstrumentType::ACH)
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Instruments
|
|
5
|
+
# Update Bacs Direct Debit account details.
|
|
6
|
+
#
|
|
7
|
+
# @!attribute instrument_data
|
|
8
|
+
# @return [UpdateBacsInstrumentData] The details of the Bacs Direct Debit
|
|
9
|
+
# account. [Optional]
|
|
10
|
+
# @!attribute account_holder
|
|
11
|
+
# @return [UpdateBacsAccountHolder] The account holder details. [Optional]
|
|
12
|
+
class UpdateInstrumentBacs < UpdateInstrument
|
|
13
|
+
attr_accessor :instrument_data,
|
|
14
|
+
:account_holder
|
|
15
|
+
|
|
16
|
+
def initialize
|
|
17
|
+
super(CheckoutSdk::Common::InstrumentType::BACS)
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Instruments
|
|
5
|
+
# Update SEPA account details.
|
|
6
|
+
#
|
|
7
|
+
# @!attribute instrument_data
|
|
8
|
+
# @return [UpdateSepaInstrumentData] The details of the mandate. [Optional]
|
|
9
|
+
# @!attribute account_holder
|
|
10
|
+
# @return [UpdateSepaAccountHolder] The account holder details. [Optional]
|
|
11
|
+
class UpdateInstrumentSepa < UpdateInstrument
|
|
12
|
+
attr_accessor :instrument_data,
|
|
13
|
+
:account_holder
|
|
14
|
+
|
|
15
|
+
def initialize
|
|
16
|
+
super(CheckoutSdk::Common::InstrumentType::SEPA)
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Instruments
|
|
5
|
+
# The account holder details of a SEPA instrument being updated.
|
|
6
|
+
#
|
|
7
|
+
# account_holder is itself optional, but if you send it then first_name,
|
|
8
|
+
# last_name and billing_address are all required.
|
|
9
|
+
#
|
|
10
|
+
# @!attribute first_name
|
|
11
|
+
# @return [String] The first name of the account holder. [Required]
|
|
12
|
+
# @!attribute last_name
|
|
13
|
+
# @return [String] The last name of the account holder. [Required]
|
|
14
|
+
# @!attribute billing_address
|
|
15
|
+
# @return [UpdateSepaBillingAddress] The billing address of the account
|
|
16
|
+
# holder. [Required]
|
|
17
|
+
# @!attribute company_name
|
|
18
|
+
# @return [String] The legal name of a registered company that holds the
|
|
19
|
+
# account. [Optional] max 50 characters.
|
|
20
|
+
# @!attribute type
|
|
21
|
+
# @return [String] {InstrumentAccountHolderType} The type of account holder.
|
|
22
|
+
# [Optional]
|
|
23
|
+
class UpdateSepaAccountHolder
|
|
24
|
+
attr_accessor :first_name,
|
|
25
|
+
:last_name,
|
|
26
|
+
:billing_address,
|
|
27
|
+
:company_name,
|
|
28
|
+
:type
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Instruments
|
|
5
|
+
# The billing address of the account holder of a SEPA instrument being updated.
|
|
6
|
+
#
|
|
7
|
+
# Every property is required if billing_address is sent at all.
|
|
8
|
+
#
|
|
9
|
+
# @!attribute address_line1
|
|
10
|
+
# @return [String] The first line of the address. [Required] max 200 characters.
|
|
11
|
+
# @!attribute address_line2
|
|
12
|
+
# @return [String] The street number. If no number, pass "w/n".
|
|
13
|
+
# [Required] max 10 characters.
|
|
14
|
+
# @!attribute city
|
|
15
|
+
# @return [String] The address city. [Required] max 50 characters.
|
|
16
|
+
# Note the store variant allows max 35 only.
|
|
17
|
+
# @!attribute zip
|
|
18
|
+
# @return [String] The address zip/postal code. [Required] max 50 characters.
|
|
19
|
+
# Note the store variant allows max 16 only.
|
|
20
|
+
# @!attribute country
|
|
21
|
+
# @return [String] {CheckoutSdk::Common::Country} The two-letter ISO country
|
|
22
|
+
# code of the address. [Required] min 2 characters, max 2 characters.
|
|
23
|
+
class UpdateSepaBillingAddress
|
|
24
|
+
attr_accessor :address_line1,
|
|
25
|
+
:address_line2,
|
|
26
|
+
:city,
|
|
27
|
+
:zip,
|
|
28
|
+
:country
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Instruments
|
|
5
|
+
# The details of the mandate of a SEPA instrument being updated.
|
|
6
|
+
#
|
|
7
|
+
# instrument_data is itself optional, but if you send it then account_number,
|
|
8
|
+
# country, currency and payment_type are all required.
|
|
9
|
+
#
|
|
10
|
+
# @!attribute account_number
|
|
11
|
+
# @return [String] The International Bank Account Number (IBAN) of the
|
|
12
|
+
# account. [Required] min 15 characters, max 34 characters.
|
|
13
|
+
# @!attribute country
|
|
14
|
+
# @return [String] {CheckoutSdk::Common::Country} The country of the account.
|
|
15
|
+
# [Required] min 2 characters, max 2 characters.
|
|
16
|
+
# @!attribute currency
|
|
17
|
+
# @return [String] {CheckoutSdk::Common::Currency} The currency of the account.
|
|
18
|
+
# [Required] min 3 characters, max 3 characters.
|
|
19
|
+
# @!attribute payment_type
|
|
20
|
+
# @return [String] {SepaPaymentType} The type of payment, recurring or
|
|
21
|
+
# regular. [Required] Lowercase, unlike the Bacs equivalent.
|
|
22
|
+
# @!attribute type
|
|
23
|
+
# @return [String] {SepaMandateType} The type of mandate, Core or B2B.
|
|
24
|
+
# [Optional]
|
|
25
|
+
# @!attribute mandate_id
|
|
26
|
+
# @return [String] The mandate ID. If a mandate ID is not provided, a new,
|
|
27
|
+
# random mandate ID will be generated. [Optional] min 1 character,
|
|
28
|
+
# max 35 characters.
|
|
29
|
+
# @!attribute date_of_signature
|
|
30
|
+
# @return [String] The date on which the mandate was signed, in the format
|
|
31
|
+
# yyyy-MM-dd. Required if mandate_id is provided. [Optional]
|
|
32
|
+
# Format: date - pass a yyyy-MM-dd String, not a DateTime.
|
|
33
|
+
class UpdateSepaInstrumentData
|
|
34
|
+
attr_accessor :account_number,
|
|
35
|
+
:country,
|
|
36
|
+
:currency,
|
|
37
|
+
:payment_type,
|
|
38
|
+
:type,
|
|
39
|
+
:mandate_id,
|
|
40
|
+
:date_of_signature
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -6,7 +6,9 @@ module CheckoutSdk
|
|
|
6
6
|
account_holder_type: 'account-holder-type',
|
|
7
7
|
payment_network: 'payment-network',
|
|
8
8
|
from_: 'from',
|
|
9
|
-
if_match: 'if-match'
|
|
9
|
+
if_match: 'if-match',
|
|
10
|
+
with_currency_account_id: 'withCurrencyAccountId',
|
|
11
|
+
balances_at: 'balancesAt' }.freeze
|
|
10
12
|
|
|
11
13
|
def self.to_custom_hash(object)
|
|
12
14
|
hash = {}
|
|
@@ -36,6 +36,7 @@ module CheckoutSdk
|
|
|
36
36
|
TRANSFERS_VIEW = 'transfers:view'
|
|
37
37
|
BALANCES = 'balances'
|
|
38
38
|
BALANCES_VIEW = 'balances:view'
|
|
39
|
+
BALANCES_TOP_UP_INSTRUCTIONS = 'balances:top-up-instructions'
|
|
39
40
|
MIDDLEWARE = 'middleware'
|
|
40
41
|
MIDDLEWARE_MERCHANTS_SECRET = 'middleware:merchants-secret'
|
|
41
42
|
MIDDLEWARE_MERCHANTS_PUBLIC = 'middleware:merchants-public'
|