checkout_sdk 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +15 -1
- data/lib/checkout_sdk/accounts/accounts.rb +10 -1
- data/lib/checkout_sdk/accounts/accounts_client.rb +134 -1
- data/lib/checkout_sdk/accounts/entity_files_request.rb +13 -0
- data/lib/checkout_sdk/accounts/entity_requirement_priority.rb +12 -0
- data/lib/checkout_sdk/accounts/entity_requirement_reason.rb +11 -0
- data/lib/checkout_sdk/accounts/entity_requirement_update_request.rb +22 -0
- data/lib/checkout_sdk/accounts/entity_requirement_update_status.rb +12 -0
- data/lib/checkout_sdk/accounts/onboard_entity.rb +9 -1
- data/lib/checkout_sdk/accounts/reserve_rule_create_request.rb +14 -0
- data/lib/checkout_sdk/accounts/reserve_rule_holding_duration.rb +13 -0
- data/lib/checkout_sdk/accounts/reserve_rule_update_request.rb +15 -0
- data/lib/checkout_sdk/accounts/rolling_reserve_rule.rb +15 -0
- data/lib/checkout_sdk/accounts/submitter.rb +13 -0
- data/lib/checkout_sdk/agentic_commerce/agentic_commerce.rb +8 -0
- data/lib/checkout_sdk/agentic_commerce/agentic_commerce_client.rb +31 -0
- data/lib/checkout_sdk/agentic_commerce/delegated_payment_allowance.rb +28 -0
- data/lib/checkout_sdk/agentic_commerce/delegated_payment_billing_address.rb +33 -0
- data/lib/checkout_sdk/agentic_commerce/delegated_payment_method_card.rb +64 -0
- data/lib/checkout_sdk/agentic_commerce/delegated_payment_request.rb +25 -0
- data/lib/checkout_sdk/agentic_commerce/delegated_payment_risk_signal.rb +20 -0
- data/lib/checkout_sdk/api_client.rb +25 -15
- data/lib/checkout_sdk/balances/balance_values.rb +28 -0
- data/lib/checkout_sdk/balances/balances.rb +4 -0
- data/lib/checkout_sdk/balances/balances_query.rb +32 -0
- data/lib/checkout_sdk/balances/collateral_breakdown.rb +16 -0
- data/lib/checkout_sdk/balances/currency_account_balance.rb +26 -0
- data/lib/checkout_sdk/checkout_api.rb +57 -1
- data/lib/checkout_sdk/common/common.rb +1 -0
- data/lib/checkout_sdk/common/headers.rb +16 -0
- data/lib/checkout_sdk/common/payment_source_type.rb +1 -0
- data/lib/checkout_sdk/compliance_requests/compliance_request_responded_field.rb +22 -0
- data/lib/checkout_sdk/compliance_requests/compliance_request_responded_fields.rb +15 -0
- data/lib/checkout_sdk/compliance_requests/compliance_requests.rb +6 -0
- data/lib/checkout_sdk/compliance_requests/compliance_requests_client.rb +34 -0
- data/lib/checkout_sdk/compliance_requests/compliance_response_request.rb +16 -0
- data/lib/checkout_sdk/disputes/dispute_status.rb +1 -0
- data/lib/checkout_sdk/disputes/disputes_client.rb +22 -1
- data/lib/checkout_sdk/disputes/disputes_query_filter.rb +49 -11
- data/lib/checkout_sdk/forward/create_secret_request.rb +17 -0
- data/lib/checkout_sdk/forward/forward.rb +2 -0
- data/lib/checkout_sdk/forward/forward_client.rb +27 -1
- data/lib/checkout_sdk/forward/update_secret_request.rb +15 -0
- data/lib/checkout_sdk/identities/aml_screening/aml_screening_client.rb +29 -0
- data/lib/checkout_sdk/identities/aml_screening/aml_search_parameters.rb +15 -0
- data/lib/checkout_sdk/identities/aml_screening/aml_verification_request.rb +19 -0
- data/lib/checkout_sdk/identities/applicants/applicants_client.rb +43 -0
- data/lib/checkout_sdk/identities/applicants/create_applicant_request.rb +21 -0
- data/lib/checkout_sdk/identities/applicants/update_applicant_request.rb +18 -0
- data/lib/checkout_sdk/identities/face_authentication/face_authentication_attempt_request.rb +17 -0
- data/lib/checkout_sdk/identities/face_authentication/face_authentication_client.rb +68 -0
- data/lib/checkout_sdk/identities/face_authentication/face_authentication_request.rb +21 -0
- data/lib/checkout_sdk/identities/id_document_verification/id_document_verification_client.rb +77 -0
- data/lib/checkout_sdk/identities/id_document_verification/id_document_verification_request.rb +27 -0
- data/lib/checkout_sdk/identities/identities.rb +27 -0
- data/lib/checkout_sdk/identities/identity_verification/identity_verification_attempt_request.rb +17 -0
- data/lib/checkout_sdk/identities/identity_verification/identity_verification_client.rb +84 -0
- data/lib/checkout_sdk/identities/identity_verification/identity_verification_request.rb +21 -0
- data/lib/checkout_sdk/identities/identity_verification/idv_client_information.rb +17 -0
- data/lib/checkout_sdk/identities/identity_verification/idv_declared_data.rb +15 -0
- data/lib/checkout_sdk/instruments/base_instruments_client.rb +9 -0
- data/lib/checkout_sdk/issuing/add_control_group_request.rb +19 -0
- data/lib/checkout_sdk/issuing/add_control_profile_request.rb +13 -0
- data/lib/checkout_sdk/issuing/cardholder_access_token_request.rb +26 -0
- data/lib/checkout_sdk/issuing/create_dispute_request.rb +24 -0
- data/lib/checkout_sdk/issuing/escalate_dispute_request.rb +19 -0
- data/lib/checkout_sdk/issuing/identification_document.rb +18 -0
- data/lib/checkout_sdk/issuing/issuing.rb +25 -0
- data/lib/checkout_sdk/issuing/issuing_address.rb +25 -0
- data/lib/checkout_sdk/issuing/issuing_client.rb +266 -13
- data/lib/checkout_sdk/issuing/issuing_phone_number.rb +16 -0
- data/lib/checkout_sdk/issuing/oob_authentication_request.rb +15 -0
- data/lib/checkout_sdk/issuing/oob_simulate_transaction_details.rb +19 -0
- data/lib/checkout_sdk/issuing/schedule_revocation_request.rb +13 -0
- data/lib/checkout_sdk/issuing/simulate_refund_request.rb +13 -0
- data/lib/checkout_sdk/issuing/update_card_request.rb +19 -0
- data/lib/checkout_sdk/issuing/update_cardholder_request.rb +32 -0
- data/lib/checkout_sdk/issuing/update_control_profile_request.rb +13 -0
- data/lib/checkout_sdk/network_tokens/network_token_cryptogram_request.rb +13 -0
- data/lib/checkout_sdk/network_tokens/network_token_source_card.rb +25 -0
- data/lib/checkout_sdk/network_tokens/network_token_source_id.rb +19 -0
- data/lib/checkout_sdk/network_tokens/network_tokens.rb +7 -0
- data/lib/checkout_sdk/network_tokens/network_tokens_client.rb +51 -0
- data/lib/checkout_sdk/network_tokens/provision_network_token_request.rb +14 -0
- data/lib/checkout_sdk/onboarding_simulator/onboarding_simulator.rb +6 -0
- data/lib/checkout_sdk/onboarding_simulator/onboarding_simulator_client.rb +72 -0
- data/lib/checkout_sdk/onboarding_simulator/simulator_entity_status.rb +16 -0
- data/lib/checkout_sdk/onboarding_simulator/simulator_set_requirements_due_request.rb +14 -0
- data/lib/checkout_sdk/onboarding_simulator/simulator_set_status_request.rb +13 -0
- data/lib/checkout_sdk/payment_methods/payment_methods.rb +4 -0
- data/lib/checkout_sdk/payment_methods/payment_methods_client.rb +24 -0
- data/lib/checkout_sdk/payment_methods/payment_methods_query.rb +13 -0
- data/lib/checkout_sdk/payments/apple_pay/apple_pay_certificate_request.rb +13 -0
- data/lib/checkout_sdk/payments/apple_pay/apple_pay_client.rb +44 -0
- data/lib/checkout_sdk/payments/apple_pay/apple_pay_enrollment_request.rb +13 -0
- data/lib/checkout_sdk/payments/apple_pay/apple_pay_signing_request.rb +13 -0
- data/lib/checkout_sdk/payments/base_payments_client.rb +19 -0
- data/lib/checkout_sdk/payments/cancellation_request.rb +13 -0
- data/lib/checkout_sdk/payments/google_pay/google_pay_client.rb +48 -0
- data/lib/checkout_sdk/payments/google_pay/google_pay_domain_request.rb +13 -0
- data/lib/checkout_sdk/payments/google_pay/google_pay_enrollment_request.rb +17 -0
- data/lib/checkout_sdk/payments/passenger.rb +20 -6
- data/lib/checkout_sdk/payments/payment_plan.rb +43 -0
- data/lib/checkout_sdk/payments/payment_request.rb +2 -1
- data/lib/checkout_sdk/payments/payments.rb +23 -1
- data/lib/checkout_sdk/payments/payments_search_request.rb +20 -0
- data/lib/checkout_sdk/payments/processing_data.rb +45 -0
- data/lib/checkout_sdk/payments/processing_settings.rb +5 -1
- data/lib/checkout_sdk/payments/sessions/payment_sessions_client.rb +12 -0
- data/lib/checkout_sdk/payments/setups/account_funding_transaction_identification.rb +17 -0
- data/lib/checkout_sdk/payments/setups/account_funding_transaction_identification_type.rb +15 -0
- data/lib/checkout_sdk/payments/setups/account_funding_transaction_purpose.rb +29 -0
- data/lib/checkout_sdk/payments/setups/account_funding_transaction_recipient.rb +26 -0
- data/lib/checkout_sdk/payments/setups/account_funding_transaction_sender.rb +29 -0
- data/lib/checkout_sdk/payments/setups/blik_payment_method.rb +20 -0
- data/lib/checkout_sdk/payments/setups/payment_setup_account_funding_transaction.rb +20 -0
- data/lib/checkout_sdk/payments/source/apm/blik_source.rb +31 -0
- data/lib/checkout_sdk/sessions/device_information.rb +17 -0
- data/lib/checkout_sdk/sessions/session_request.rb +2 -1
- data/lib/checkout_sdk/sessions/sessions.rb +1 -0
- data/lib/checkout_sdk/standalone_account_updater/account_updater_card.rb +17 -0
- data/lib/checkout_sdk/standalone_account_updater/account_updater_instrument.rb +13 -0
- data/lib/checkout_sdk/standalone_account_updater/account_updater_request.rb +13 -0
- data/lib/checkout_sdk/standalone_account_updater/account_updater_source_options.rb +15 -0
- data/lib/checkout_sdk/standalone_account_updater/standalone_account_updater.rb +7 -0
- data/lib/checkout_sdk/standalone_account_updater/standalone_account_updater_client.rb +29 -0
- data/lib/checkout_sdk/tokens/token_metadata_billing_address.rb +16 -0
- data/lib/checkout_sdk/tokens/token_metadata_response.rb +55 -0
- data/lib/checkout_sdk/tokens/tokens.rb +2 -0
- data/lib/checkout_sdk/tokens/tokens_client.rb +11 -0
- data/lib/checkout_sdk/version.rb +1 -1
- data/lib/checkout_sdk/workflows/workflows_client.rb +1 -1
- data/lib/checkout_sdk.rb +7 -0
- metadata +105 -4
- data/lib/checkout_sdk/accounts/headers.rb +0 -11
- data/lib/checkout_sdk/payments/passenger_name.rb +0 -11
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Payments
|
|
5
|
+
# Identification document type used by the sender of an Account Funding Transaction
|
|
6
|
+
# on a Payment Setup.
|
|
7
|
+
module AccountFundingTransactionIdentificationType
|
|
8
|
+
DRIVING_LICENSE = 'driving_license'
|
|
9
|
+
PASSPORT = 'passport'
|
|
10
|
+
NATIONAL_ID = 'national_id'
|
|
11
|
+
TAX_ID = 'tax_id'
|
|
12
|
+
OTHER = 'other'
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Payments
|
|
5
|
+
# Enum of allowed `purpose` values on a PaymentSetup AccountFundingTransaction.
|
|
6
|
+
# See https://api-reference.checkout.com (PaymentSetupAccountFundingTransaction.purpose).
|
|
7
|
+
module AccountFundingTransactionPurpose
|
|
8
|
+
DONATIONS = 'donations'
|
|
9
|
+
EDUCATION = 'education'
|
|
10
|
+
EMERGENCY_NEED = 'emergency_need'
|
|
11
|
+
EXPATRIATION = 'expatriation'
|
|
12
|
+
FAMILY_SUPPORT = 'family_support'
|
|
13
|
+
FINANCIAL_SERVICES = 'financial_services'
|
|
14
|
+
GIFTS = 'gifts'
|
|
15
|
+
INCOME = 'income'
|
|
16
|
+
INSURANCE = 'insurance'
|
|
17
|
+
INVESTMENT = 'investment'
|
|
18
|
+
IT_SERVICES = 'it_services'
|
|
19
|
+
LEISURE = 'leisure'
|
|
20
|
+
LOAN_PAYMENT = 'loan_payment'
|
|
21
|
+
MEDICAL_TREATMENT = 'medical_treatment'
|
|
22
|
+
OTHER = 'other'
|
|
23
|
+
PENSION = 'pension'
|
|
24
|
+
ROYALTIES = 'royalties'
|
|
25
|
+
SAVINGS = 'savings'
|
|
26
|
+
TRAVEL_AND_TOURISM = 'travel_and_tourism'
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Payments
|
|
5
|
+
# @!attribute first_name
|
|
6
|
+
# @return [String]
|
|
7
|
+
# @!attribute last_name
|
|
8
|
+
# @return [String]
|
|
9
|
+
# @!attribute account_number
|
|
10
|
+
# @return [String]
|
|
11
|
+
# @!attribute account_type
|
|
12
|
+
# @return [String]
|
|
13
|
+
# @!attribute date_of_birth
|
|
14
|
+
# @return [String] Format: YYYY-MM-DD
|
|
15
|
+
# @!attribute address
|
|
16
|
+
# @return [CheckoutSdk::Common::Address]
|
|
17
|
+
class AccountFundingTransactionRecipient
|
|
18
|
+
attr_accessor :first_name,
|
|
19
|
+
:last_name,
|
|
20
|
+
:account_number,
|
|
21
|
+
:account_type,
|
|
22
|
+
:date_of_birth,
|
|
23
|
+
:address
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Payments
|
|
5
|
+
# @!attribute first_name
|
|
6
|
+
# @return [String]
|
|
7
|
+
# @!attribute last_name
|
|
8
|
+
# @return [String]
|
|
9
|
+
# @!attribute date_of_birth
|
|
10
|
+
# @return [String] Format: YYYY-MM-DD
|
|
11
|
+
# @!attribute country_of_birth
|
|
12
|
+
# @return [String] {CheckoutSdk::Common::Country}
|
|
13
|
+
# @!attribute nationality
|
|
14
|
+
# @return [String] {CheckoutSdk::Common::Country}
|
|
15
|
+
# @!attribute address
|
|
16
|
+
# @return [CheckoutSdk::Common::Address]
|
|
17
|
+
# @!attribute identification
|
|
18
|
+
# @return [AccountFundingTransactionIdentification]
|
|
19
|
+
class AccountFundingTransactionSender
|
|
20
|
+
attr_accessor :first_name,
|
|
21
|
+
:last_name,
|
|
22
|
+
:date_of_birth,
|
|
23
|
+
:country_of_birth,
|
|
24
|
+
:nationality,
|
|
25
|
+
:address,
|
|
26
|
+
:identification
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Payments
|
|
5
|
+
# Blik payment method configuration on a Payment Setup.
|
|
6
|
+
#
|
|
7
|
+
# @!attribute status
|
|
8
|
+
# @return [String] (response-only) Payment method status (e.g. "available").
|
|
9
|
+
# @!attribute flags
|
|
10
|
+
# @return [Array(String)] (response-only) Diagnostic flags returned by the API.
|
|
11
|
+
# @!attribute partner_code
|
|
12
|
+
# @return [String] The 6-digit Blik code generated by the customer's banking app.
|
|
13
|
+
# Pattern: ^[0-9]{6}$
|
|
14
|
+
class BlikPaymentMethod
|
|
15
|
+
attr_accessor :status,
|
|
16
|
+
:flags,
|
|
17
|
+
:partner_code
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Payments
|
|
5
|
+
# @!attribute enabled
|
|
6
|
+
# @return [TrueClass, FalseClass]
|
|
7
|
+
# @!attribute purpose
|
|
8
|
+
# @return [String] {AccountFundingTransactionPurpose}
|
|
9
|
+
# @!attribute sender
|
|
10
|
+
# @return [AccountFundingTransactionSender]
|
|
11
|
+
# @!attribute recipient
|
|
12
|
+
# @return [AccountFundingTransactionRecipient]
|
|
13
|
+
class PaymentSetupAccountFundingTransaction
|
|
14
|
+
attr_accessor :enabled,
|
|
15
|
+
:purpose,
|
|
16
|
+
:sender,
|
|
17
|
+
:recipient
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Payments
|
|
5
|
+
# Blik payment source for the /payments endpoint.
|
|
6
|
+
#
|
|
7
|
+
# When source.type is "blik":
|
|
8
|
+
# - currency must be PLN
|
|
9
|
+
# - amount must not exceed 5,000,000 (minor unit)
|
|
10
|
+
# - reference is limited to 35 characters
|
|
11
|
+
# For customer-initiated payments, provide the 6-digit BLIK code in
|
|
12
|
+
# `processing.partner_code`. For merchant-initiated recurring payments,
|
|
13
|
+
# use either source.type: "id" with a previous source.id, or
|
|
14
|
+
# source.type: "blik" with `partner_agreement_id`.
|
|
15
|
+
#
|
|
16
|
+
# @!attribute id
|
|
17
|
+
# @return [String] (response-only) The Checkout.com source identifier
|
|
18
|
+
# for a partner agreement created during a Blik recurring payment.
|
|
19
|
+
# @!attribute partner_agreement_id
|
|
20
|
+
# @return [String] The Blik PAYID identifying an external partner
|
|
21
|
+
# agreement created with another PSP.
|
|
22
|
+
class BlikSource < PaymentSource
|
|
23
|
+
attr_accessor :id,
|
|
24
|
+
:partner_agreement_id
|
|
25
|
+
|
|
26
|
+
def initialize
|
|
27
|
+
super(CheckoutSdk::Common::PaymentSourceType::BLIK)
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Sessions
|
|
5
|
+
# Details of the device from which the authentication originated.
|
|
6
|
+
#
|
|
7
|
+
# @!attribute device_id
|
|
8
|
+
# @return [String] The unique identifier for the device.
|
|
9
|
+
# @!attribute device_session_id
|
|
10
|
+
# @return [String] Device session ID collected from the standalone Risk.js package.
|
|
11
|
+
# Pattern: ^(dsid)_(\w{26})$
|
|
12
|
+
class DeviceInformation
|
|
13
|
+
attr_accessor :device_id,
|
|
14
|
+
:device_session_id
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -73,7 +73,8 @@ module CheckoutSdk
|
|
|
73
73
|
:recurring,
|
|
74
74
|
:installment,
|
|
75
75
|
:optimization,
|
|
76
|
-
:initial_transaction
|
|
76
|
+
:initial_transaction,
|
|
77
|
+
:device_information
|
|
77
78
|
|
|
78
79
|
def initialize(source: CardSource.new,
|
|
79
80
|
authentication_type: CheckoutSdk::Sessions::AuthenticationType::REGULAR,
|
|
@@ -5,6 +5,7 @@ require 'checkout_sdk/sessions/authentication_type'
|
|
|
5
5
|
require 'checkout_sdk/sessions/card_holder_account_info'
|
|
6
6
|
require 'checkout_sdk/sessions/category'
|
|
7
7
|
require 'checkout_sdk/sessions/delivery_timeframe'
|
|
8
|
+
require 'checkout_sdk/sessions/device_information'
|
|
8
9
|
require 'checkout_sdk/sessions/installment'
|
|
9
10
|
require 'checkout_sdk/sessions/merchant_risk_info'
|
|
10
11
|
require 'checkout_sdk/sessions/recurring'
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module StandaloneAccountUpdater
|
|
5
|
+
# Card details for the standalone Account Updater request.
|
|
6
|
+
#
|
|
7
|
+
# @!attribute number
|
|
8
|
+
# @return [String] The card number.
|
|
9
|
+
# @!attribute expiry_month
|
|
10
|
+
# @return [Integer]
|
|
11
|
+
# @!attribute expiry_year
|
|
12
|
+
# @return [Integer] Four-digit expiry year.
|
|
13
|
+
class AccountUpdaterCard
|
|
14
|
+
attr_accessor :number, :expiry_month, :expiry_year
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module StandaloneAccountUpdater
|
|
5
|
+
# Instrument reference for the standalone Account Updater request.
|
|
6
|
+
#
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# @return [String] Unique instrument identifier (e.g. "src_...").
|
|
9
|
+
class AccountUpdaterInstrument
|
|
10
|
+
attr_accessor :id
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module StandaloneAccountUpdater
|
|
5
|
+
# Request body for POST /account-updater/cards.
|
|
6
|
+
#
|
|
7
|
+
# @!attribute source_options
|
|
8
|
+
# @return [AccountUpdaterSourceOptions]
|
|
9
|
+
class AccountUpdaterRequest
|
|
10
|
+
attr_accessor :source_options
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module StandaloneAccountUpdater
|
|
5
|
+
# The source to update. Provide either `card` or `instrument`, but not both.
|
|
6
|
+
#
|
|
7
|
+
# @!attribute card
|
|
8
|
+
# @return [AccountUpdaterCard]
|
|
9
|
+
# @!attribute instrument
|
|
10
|
+
# @return [AccountUpdaterInstrument]
|
|
11
|
+
class AccountUpdaterSourceOptions
|
|
12
|
+
attr_accessor :card, :instrument
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'checkout_sdk/standalone_account_updater/account_updater_card'
|
|
4
|
+
require 'checkout_sdk/standalone_account_updater/account_updater_instrument'
|
|
5
|
+
require 'checkout_sdk/standalone_account_updater/account_updater_source_options'
|
|
6
|
+
require 'checkout_sdk/standalone_account_updater/account_updater_request'
|
|
7
|
+
require 'checkout_sdk/standalone_account_updater/standalone_account_updater_client'
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module StandaloneAccountUpdater
|
|
5
|
+
# Client for the Standalone Account Updater API.
|
|
6
|
+
# Uses OAuth with the `vault:real-time-account-updater` scope.
|
|
7
|
+
class StandaloneAccountUpdaterClient < Client
|
|
8
|
+
ACCOUNT_UPDATER = 'account-updater'
|
|
9
|
+
CARDS = 'cards'
|
|
10
|
+
private_constant :ACCOUNT_UPDATER, :CARDS
|
|
11
|
+
|
|
12
|
+
# @param [ApiClient] api_client
|
|
13
|
+
# @param [CheckoutConfiguration] configuration
|
|
14
|
+
def initialize(api_client, configuration)
|
|
15
|
+
super(api_client, configuration, CheckoutSdk::AuthorizationType::OAUTH)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
# Get updated card credentials.
|
|
19
|
+
# @param [Hash, AccountUpdaterRequest] account_updater_request
|
|
20
|
+
def update_card(account_updater_request)
|
|
21
|
+
api_client.invoke_post(
|
|
22
|
+
build_path(ACCOUNT_UPDATER, CARDS),
|
|
23
|
+
sdk_authorization,
|
|
24
|
+
account_updater_request
|
|
25
|
+
)
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Tokens
|
|
5
|
+
# Partial billing address (city + country) returned by GET /tokens/{tokenId}/metadata.
|
|
6
|
+
#
|
|
7
|
+
# @!attribute city
|
|
8
|
+
# @return [String]
|
|
9
|
+
# @!attribute country
|
|
10
|
+
# @return [String] {CheckoutSdk::Common::Country}
|
|
11
|
+
class TokenMetadataBillingAddress
|
|
12
|
+
attr_accessor :city,
|
|
13
|
+
:country
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Tokens
|
|
5
|
+
# Response from GET /tokens/{tokenId}/metadata.
|
|
6
|
+
#
|
|
7
|
+
# @!attribute token
|
|
8
|
+
# @return [String]
|
|
9
|
+
# @!attribute type
|
|
10
|
+
# @return [String]
|
|
11
|
+
# @!attribute expires_on
|
|
12
|
+
# @return [String] RFC 3339 timestamp.
|
|
13
|
+
# @!attribute expiry_month
|
|
14
|
+
# @return [Integer]
|
|
15
|
+
# @!attribute expiry_year
|
|
16
|
+
# @return [Integer]
|
|
17
|
+
# @!attribute scheme
|
|
18
|
+
# @return [String]
|
|
19
|
+
# @!attribute last4
|
|
20
|
+
# @return [String]
|
|
21
|
+
# @!attribute bin
|
|
22
|
+
# @return [String]
|
|
23
|
+
# @!attribute card_type
|
|
24
|
+
# @return [String] One of CREDIT/DEBIT/PREPAID/CHARGE/"DEFERRED DEBIT".
|
|
25
|
+
# @!attribute card_category
|
|
26
|
+
# @return [String] One of CONSUMER/COMMERCIAL.
|
|
27
|
+
# @!attribute issuer
|
|
28
|
+
# @return [String]
|
|
29
|
+
# @!attribute issuer_country
|
|
30
|
+
# @return [String] ISO 3166-1 alpha-2.
|
|
31
|
+
# @!attribute product_id
|
|
32
|
+
# @return [String]
|
|
33
|
+
# @!attribute product_type
|
|
34
|
+
# @return [String]
|
|
35
|
+
# @!attribute billing_address
|
|
36
|
+
# @return [TokenMetadataBillingAddress]
|
|
37
|
+
class TokenMetadataResponse
|
|
38
|
+
attr_accessor :token,
|
|
39
|
+
:type,
|
|
40
|
+
:expires_on,
|
|
41
|
+
:expiry_month,
|
|
42
|
+
:expiry_year,
|
|
43
|
+
:scheme,
|
|
44
|
+
:last4,
|
|
45
|
+
:bin,
|
|
46
|
+
:card_type,
|
|
47
|
+
:card_category,
|
|
48
|
+
:issuer,
|
|
49
|
+
:issuer_country,
|
|
50
|
+
:product_id,
|
|
51
|
+
:product_type,
|
|
52
|
+
:billing_address
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -8,3 +8,5 @@ require 'checkout_sdk/tokens/apple_pay_token_request'
|
|
|
8
8
|
require 'checkout_sdk/tokens/google_pay_token_request'
|
|
9
9
|
require 'checkout_sdk/tokens/apple_pay_token_data'
|
|
10
10
|
require 'checkout_sdk/tokens/card_token_request'
|
|
11
|
+
require 'checkout_sdk/tokens/token_metadata_billing_address'
|
|
12
|
+
require 'checkout_sdk/tokens/token_metadata_response'
|
|
@@ -16,6 +16,17 @@ module CheckoutSdk
|
|
|
16
16
|
def request_token(token_request)
|
|
17
17
|
api_client.invoke_post(TOKENS, sdk_authorization, token_request)
|
|
18
18
|
end
|
|
19
|
+
|
|
20
|
+
# Returns the details for an active token without consuming it.
|
|
21
|
+
# The token remains usable after this call.
|
|
22
|
+
# Requires SecretKey or OAuth (not PublicKey).
|
|
23
|
+
# @param [String] token_id Pattern: ^(tok)_(\w{26})$
|
|
24
|
+
def get_token_metadata(token_id)
|
|
25
|
+
api_client.invoke_get(
|
|
26
|
+
build_path(TOKENS, token_id, 'metadata'),
|
|
27
|
+
sdk_authorization(CheckoutSdk::AuthorizationType::SECRET_KEY_OR_OAUTH)
|
|
28
|
+
)
|
|
29
|
+
end
|
|
19
30
|
end
|
|
20
31
|
end
|
|
21
32
|
end
|
data/lib/checkout_sdk/version.rb
CHANGED
data/lib/checkout_sdk.rb
CHANGED
|
@@ -68,6 +68,13 @@ require 'checkout_sdk/metadata/metadata'
|
|
|
68
68
|
require 'checkout_sdk/financial/financial'
|
|
69
69
|
require 'checkout_sdk/issuing/issuing'
|
|
70
70
|
require 'checkout_sdk/forward/forward'
|
|
71
|
+
require 'checkout_sdk/onboarding_simulator/onboarding_simulator'
|
|
72
|
+
require 'checkout_sdk/agentic_commerce/agentic_commerce'
|
|
73
|
+
require 'checkout_sdk/compliance_requests/compliance_requests'
|
|
74
|
+
require 'checkout_sdk/standalone_account_updater/standalone_account_updater'
|
|
75
|
+
require 'checkout_sdk/network_tokens/network_tokens'
|
|
76
|
+
require 'checkout_sdk/payment_methods/payment_methods'
|
|
77
|
+
require 'checkout_sdk/identities/identities'
|
|
71
78
|
|
|
72
79
|
# Checkout modules (previous)
|
|
73
80
|
require 'checkout_sdk/sources/sources'
|