checkout_sdk 1.2.2 → 1.9.1
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/.overcommit.yml +30 -0
- data/.rubocop.yml +15 -1
- data/.ruby-version +1 -0
- data/Gemfile +3 -1
- data/README.md +38 -0
- data/Rakefile +2 -2
- data/lib/checkout_sdk/accounts/account_holder.rb +10 -2
- data/lib/checkout_sdk/accounts/account_holder_corporate.rb +15 -0
- data/lib/checkout_sdk/accounts/account_holder_individual.rb +18 -0
- data/lib/checkout_sdk/accounts/accounts.rb +34 -1
- data/lib/checkout_sdk/accounts/accounts_client.rb +134 -1
- data/lib/checkout_sdk/accounts/additional_document.rb +11 -0
- data/lib/checkout_sdk/accounts/additional_info.rb +17 -0
- data/lib/checkout_sdk/accounts/articles_of_association_type.rb +10 -0
- data/lib/checkout_sdk/accounts/bank_verification.rb +14 -0
- data/lib/checkout_sdk/accounts/bank_verification_type.rb +9 -0
- data/lib/checkout_sdk/accounts/company.rb +7 -1
- data/lib/checkout_sdk/accounts/contact_details.rb +4 -1
- data/lib/checkout_sdk/accounts/date_of_incorporation.rb +14 -0
- 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/financial_verification.rb +14 -0
- data/lib/checkout_sdk/accounts/financial_verification_type.rb +9 -0
- data/lib/checkout_sdk/accounts/instrument_details_ach.rb +21 -0
- data/lib/checkout_sdk/accounts/{headers.rb → invitee.rb} +3 -3
- data/lib/checkout_sdk/accounts/onboard_entity.rb +21 -4
- data/lib/checkout_sdk/accounts/onboard_sub_entity_documents.rb +31 -4
- data/lib/checkout_sdk/accounts/processing_details.rb +26 -0
- data/lib/checkout_sdk/accounts/proof_of_legality.rb +14 -0
- data/lib/checkout_sdk/accounts/proof_of_legality_type.rb +9 -0
- data/lib/checkout_sdk/accounts/proof_of_principal_address.rb +14 -0
- data/lib/checkout_sdk/accounts/proof_of_principal_address_type.rb +9 -0
- 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/schedule_frequency_daily.rb +1 -1
- data/lib/checkout_sdk/accounts/schedule_frequency_monthly.rb +1 -1
- data/lib/checkout_sdk/accounts/schedule_frequency_weekly.rb +1 -1
- data/lib/checkout_sdk/accounts/shareholder_structure.rb +14 -0
- data/lib/checkout_sdk/accounts/shareholder_structure_type.rb +9 -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 +81 -62
- data/lib/checkout_sdk/apm/ideal/ideal_client.rb +1 -1
- data/lib/checkout_sdk/apm/previous/klarna/klarna_client.rb +1 -1
- data/lib/checkout_sdk/apm/previous/sepa/sepa_client.rb +1 -1
- 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 +75 -1
- data/lib/checkout_sdk/checkout_oauth_sdk_builder.rb +12 -1
- data/lib/checkout_sdk/client.rb +2 -3
- data/lib/checkout_sdk/common/account_change_indicator_type.rb +12 -0
- data/lib/checkout_sdk/common/account_holder.rb +12 -9
- data/lib/checkout_sdk/common/account_password_change_indicator_type.rb +13 -0
- data/lib/checkout_sdk/common/account_type_card_product_type.rb +11 -0
- data/lib/checkout_sdk/common/cardholder_account_age_indicator_type.rb +13 -0
- data/lib/checkout_sdk/common/common.rb +7 -0
- data/lib/checkout_sdk/common/customer_retry.rb +11 -0
- data/lib/checkout_sdk/common/destination.rb +38 -0
- data/lib/checkout_sdk/common/headers.rb +16 -0
- data/lib/checkout_sdk/common/payment_source_type.rb +9 -0
- data/lib/checkout_sdk/common/product.rb +4 -1
- 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/customers/customers_client.rb +1 -1
- data/lib/checkout_sdk/disputes/dispute_status.rb +1 -0
- data/lib/checkout_sdk/disputes/disputes_client.rb +23 -2
- data/lib/checkout_sdk/disputes/disputes_query_filter.rb +49 -11
- data/lib/checkout_sdk/environment.rb +8 -1
- data/lib/checkout_sdk/environment_subdomain.rb +16 -12
- data/lib/checkout_sdk/error.rb +24 -8
- data/lib/checkout_sdk/financial/financial_client.rb +1 -1
- data/lib/checkout_sdk/forward/create_secret_request.rb +17 -0
- data/lib/checkout_sdk/forward/forward.rb +5 -0
- data/lib/checkout_sdk/forward/forward_client.rb +52 -0
- 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 +82 -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 +99 -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/instruments/create/instrument_bank_account.rb +1 -1
- data/lib/checkout_sdk/instruments/create/instrument_sepa.rb +1 -1
- data/lib/checkout_sdk/instruments/create/instrument_token.rb +1 -1
- data/lib/checkout_sdk/instruments/instruments_client.rb +1 -1
- data/lib/checkout_sdk/instruments/previous/instruments_client.rb +1 -1
- data/lib/checkout_sdk/instruments/update/update_instrument_bank_account.rb +1 -1
- data/lib/checkout_sdk/instruments/update/update_instrument_card.rb +1 -1
- data/lib/checkout_sdk/instruments/update/update_instrument_token.rb +1 -1
- 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/amend_dispute_request.rb +31 -0
- data/lib/checkout_sdk/issuing/cardholder_access_token_request.rb +26 -0
- data/lib/checkout_sdk/issuing/create_dispute_request.rb +27 -0
- data/lib/checkout_sdk/issuing/escalate_dispute_request.rb +23 -0
- data/lib/checkout_sdk/issuing/issuing.rb +27 -0
- data/lib/checkout_sdk/issuing/issuing_address.rb +25 -0
- data/lib/checkout_sdk/issuing/issuing_client.rb +274 -14
- data/lib/checkout_sdk/issuing/issuing_dispute_fraud_details.rb +18 -0
- data/lib/checkout_sdk/issuing/issuing_dispute_fraud_type.rb +21 -0
- 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/simulate_refund_request.rb +13 -0
- data/lib/checkout_sdk/issuing/submit_dispute_request.rb +21 -0
- data/lib/checkout_sdk/issuing/update_card_request.rb +27 -0
- data/lib/checkout_sdk/issuing/update_cardholder_request.rb +29 -0
- data/lib/checkout_sdk/issuing/update_control_profile_request.rb +13 -0
- data/lib/checkout_sdk/metadata/metadata_client.rb +1 -1
- data/lib/checkout_sdk/metadata/source/bin_metadata_source.rb +1 -1
- data/lib/checkout_sdk/metadata/source/card_metadata_source.rb +1 -1
- data/lib/checkout_sdk/metadata/source/id_metadata_source.rb +1 -1
- data/lib/checkout_sdk/metadata/source/token_metadata_source.rb +1 -1
- 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/oauth_access_token.rb +6 -1
- data/lib/checkout_sdk/oauth_scopes.rb +4 -0
- data/lib/checkout_sdk/oauth_sdk_credentials.rb +2 -1
- 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/applepay.rb +14 -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/{sessions/card.rb → card.rb} +4 -1
- data/lib/checkout_sdk/payments/contexts/payment_contexts_client.rb +1 -1
- data/lib/checkout_sdk/payments/destination/bank_account_destination.rb +1 -1
- data/lib/checkout_sdk/payments/destination/card_destination.rb +1 -1
- data/lib/checkout_sdk/payments/destination/id_destination.rb +1 -1
- data/lib/checkout_sdk/payments/destination/token_destination.rb +1 -1
- data/lib/checkout_sdk/payments/exemption.rb +2 -0
- data/lib/checkout_sdk/payments/flow/flow_client.rb +59 -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/googlepay.rb +14 -0
- data/lib/checkout_sdk/payments/hosted/hosted_payment_instruction.rb +11 -0
- data/lib/checkout_sdk/payments/hosted/hosted_payments_client.rb +1 -1
- data/lib/checkout_sdk/payments/hosted/hosted_payments_session.rb +51 -23
- data/lib/checkout_sdk/payments/hosted/payment_purpose_type.rb +27 -0
- data/lib/checkout_sdk/payments/links/payment_link.rb +26 -1
- data/lib/checkout_sdk/payments/links/payments_links_client.rb +1 -1
- data/lib/checkout_sdk/payments/locale_type.rb +31 -0
- data/lib/checkout_sdk/payments/partial_authorization.rb +11 -0
- data/lib/checkout_sdk/payments/passenger.rb +20 -6
- data/lib/checkout_sdk/payments/payment_method_configuration.rb +17 -0
- data/lib/checkout_sdk/payments/payment_plan.rb +43 -0
- data/lib/checkout_sdk/payments/payment_request.rb +5 -1
- data/lib/checkout_sdk/payments/payments.rb +48 -4
- data/lib/checkout_sdk/payments/payments_client.rb +1 -1
- data/lib/checkout_sdk/payments/payments_search_request.rb +20 -0
- data/lib/checkout_sdk/payments/previous/destination/card_destination.rb +1 -1
- data/lib/checkout_sdk/payments/previous/destination/id_destination.rb +1 -1
- data/lib/checkout_sdk/payments/previous/destination/token_destination.rb +1 -1
- data/lib/checkout_sdk/payments/previous/payments_client.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/alipay_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/alma_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/bancontact_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/benefit_pay_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/boleto_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/eps_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/fawry_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/giropay_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/ideal_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/klarna_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/knet_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/multi_banco_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/oxxo_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/p24_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/pago_facil_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/paypal_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/poli_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/qpay_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/rapi_pago_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/apm/sofort_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/card_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/customer_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/d_local_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/id_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/network_token_source.rb +1 -1
- data/lib/checkout_sdk/payments/previous/source/token_source.rb +1 -1
- data/lib/checkout_sdk/payments/processing_data.rb +45 -0
- data/lib/checkout_sdk/payments/processing_settings.rb +14 -1
- data/lib/checkout_sdk/payments/product.rb +14 -1
- data/lib/checkout_sdk/payments/product_item_type.rb +11 -0
- data/lib/checkout_sdk/payments/product_sub_type.rb +13 -0
- data/lib/checkout_sdk/payments/refund_order.rb +53 -0
- data/lib/checkout_sdk/payments/refund_request.rb +11 -2
- data/lib/checkout_sdk/payments/sender/corporate_sender.rb +1 -1
- data/lib/checkout_sdk/payments/sender/government_sender.rb +4 -1
- data/lib/checkout_sdk/payments/sender/individual_sender.rb +4 -1
- data/lib/checkout_sdk/payments/sender/instrument_sender.rb +1 -1
- data/lib/checkout_sdk/payments/sessions/payment_sessions_client.rb +13 -1
- data/lib/checkout_sdk/payments/sessions/payment_sessions_request.rb +11 -1
- data/lib/checkout_sdk/payments/sessions/store_payment_details_type.rb +1 -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/bacs_payment_method.rb +41 -0
- data/lib/checkout_sdk/payments/setups/blik_payment_method.rb +20 -0
- data/lib/checkout_sdk/payments/setups/card_present_payment_method.rb +35 -0
- data/lib/checkout_sdk/payments/setups/pay_by_bank_payment_method.rb +24 -0
- data/lib/checkout_sdk/payments/setups/payment_setup_account_funding_transaction.rb +20 -0
- data/lib/checkout_sdk/payments/setups/payment_setups_client.rb +75 -0
- data/lib/checkout_sdk/payments/setups/stablecoin_payment_method.rb +16 -0
- data/lib/checkout_sdk/payments/source/apm/ach_source.rb +27 -0
- data/lib/checkout_sdk/payments/source/apm/after_pay_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/alma_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/bancontact_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/benefit_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/bizum_source.rb +15 -0
- data/lib/checkout_sdk/payments/source/apm/blik_source.rb +31 -0
- data/lib/checkout_sdk/payments/source/apm/cv_connect_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/eps_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/fawry_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/giropay_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/ideal_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/illicado_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/klarna_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/knet_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/mbway_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/multi_banco_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/octopus_source.rb +11 -0
- data/lib/checkout_sdk/payments/source/apm/p24_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/paypal_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/plaid_source.rb +17 -0
- data/lib/checkout_sdk/payments/source/apm/post_finance_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/qpay_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/sepa_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/sequra_source.rb +15 -0
- data/lib/checkout_sdk/payments/source/apm/sofort_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/stcpay_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/tamara_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/trustly_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/apm/we_chat_pay_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/bank_account_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/card_source.rb +5 -2
- data/lib/checkout_sdk/payments/source/currency_account_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/customer_source.rb +5 -2
- data/lib/checkout_sdk/payments/source/entity_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/id_source.rb +5 -2
- data/lib/checkout_sdk/payments/source/network_token_source.rb +8 -2
- data/lib/checkout_sdk/payments/source/provider_token_source.rb +1 -1
- data/lib/checkout_sdk/payments/source/token_source.rb +5 -2
- data/lib/checkout_sdk/reports/reports_client.rb +1 -1
- data/lib/checkout_sdk/risk/source/card_source.rb +1 -1
- data/lib/checkout_sdk/risk/source/customer_source.rb +1 -1
- data/lib/checkout_sdk/risk/source/id_source.rb +1 -1
- data/lib/checkout_sdk/risk/source/token_source.rb +1 -1
- data/lib/checkout_sdk/sessions/authentication_method.rb +3 -3
- data/lib/checkout_sdk/sessions/authentication_type.rb +3 -3
- data/lib/checkout_sdk/sessions/card_holder_account_info.rb +39 -3
- data/lib/checkout_sdk/sessions/channel/app_session.rb +1 -1
- data/lib/checkout_sdk/sessions/channel/browser_session.rb +5 -2
- data/lib/checkout_sdk/sessions/channel/channel_data_type.rb +1 -0
- data/lib/checkout_sdk/sessions/channel/merchant_initiated_session.rb +15 -0
- data/lib/checkout_sdk/sessions/channel/request_type.rb +19 -0
- data/lib/checkout_sdk/sessions/channel/sdk_interface_type.rb +2 -2
- data/lib/checkout_sdk/sessions/completion/hosted_completion_info.rb +1 -1
- data/lib/checkout_sdk/sessions/completion/non_hosted_completion_info.rb +1 -1
- data/lib/checkout_sdk/sessions/device_information.rb +17 -0
- data/lib/checkout_sdk/sessions/initial_transaction.rb +23 -0
- data/lib/checkout_sdk/sessions/installment.rb +5 -0
- data/lib/checkout_sdk/sessions/merchant_risk_info.rb +20 -2
- data/lib/checkout_sdk/sessions/optimization.rb +19 -0
- data/lib/checkout_sdk/sessions/optimized_properties.rb +17 -0
- data/lib/checkout_sdk/sessions/pre_order_purchase_indicator_type.rb +10 -0
- data/lib/checkout_sdk/sessions/recurring.rb +5 -0
- data/lib/checkout_sdk/sessions/reorder_items_indicator_type.rb +10 -0
- data/lib/checkout_sdk/sessions/session_request.rb +26 -2
- data/lib/checkout_sdk/sessions/sessions.rb +10 -0
- data/lib/checkout_sdk/sessions/sessions_client.rb +2 -2
- data/lib/checkout_sdk/sessions/source/card_source.rb +3 -2
- data/lib/checkout_sdk/sessions/source/id_source.rb +1 -1
- data/lib/checkout_sdk/sessions/source/network_token_source.rb +1 -1
- data/lib/checkout_sdk/sessions/source/token_source.rb +1 -1
- data/lib/checkout_sdk/sessions/three_ds_method_completion_request.rb +3 -1
- data/lib/checkout_sdk/sessions/three_ds_req_auth_method.rb +16 -0
- data/lib/checkout_sdk/sessions/three_ds_requestor_authentication_info.rb +17 -0
- data/lib/checkout_sdk/sessions/transaction_type.rb +3 -3
- data/lib/checkout_sdk/sources/sepa_source_request.rb +1 -1
- data/lib/checkout_sdk/sources/sources_client.rb +1 -1
- 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/apple_pay_token_request.rb +1 -1
- data/lib/checkout_sdk/tokens/google_pay_token_request.rb +1 -1
- 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/transfers/create_transfer.rb +5 -5
- data/lib/checkout_sdk/transfers/transfer_source.rb +4 -1
- data/lib/checkout_sdk/transfers/transfers_client.rb +2 -2
- data/lib/checkout_sdk/version.rb +1 -1
- data/lib/checkout_sdk/workflows/entity_workflow_condition.rb +1 -1
- data/lib/checkout_sdk/workflows/event_workflow_condition.rb +1 -1
- data/lib/checkout_sdk/workflows/processing_channel_workflow_condition.rb +1 -1
- data/lib/checkout_sdk/workflows/webhook_workflow_action.rb +1 -1
- data/lib/checkout_sdk/workflows/workflows_client.rb +1 -1
- data/lib/checkout_sdk.rb +8 -0
- metadata +194 -19
- data/lib/checkout_sdk/payments/passenger_name.rb +0 -11
- data/lib/checkout_sdk/payments/sessions/payment_method_configuration.rb +0 -11
|
@@ -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
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Sessions
|
|
5
|
+
# @!attribute acs_transaction_id
|
|
6
|
+
# @return [String]
|
|
7
|
+
# @!attribute authentication_method
|
|
8
|
+
# @return [String]
|
|
9
|
+
# @!attribute authentication_timestamp
|
|
10
|
+
# @return [String]
|
|
11
|
+
# @!attribute authentication_data
|
|
12
|
+
# @return [String]
|
|
13
|
+
# @!attribute initial_session_id
|
|
14
|
+
# @return [String]
|
|
15
|
+
class InitialTransaction
|
|
16
|
+
attr_accessor :acs_transaction_id,
|
|
17
|
+
:authentication_method,
|
|
18
|
+
:authentication_timestamp,
|
|
19
|
+
:authentication_data,
|
|
20
|
+
:initial_session_id
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -12,6 +12,11 @@ module CheckoutSdk
|
|
|
12
12
|
attr_accessor :number_of_payments,
|
|
13
13
|
:days_between_payments,
|
|
14
14
|
:expiry
|
|
15
|
+
|
|
16
|
+
def initialize(days_between_payments: 1, expiry: '99991231')
|
|
17
|
+
@days_between_payments = days_between_payments
|
|
18
|
+
@expiry = expiry
|
|
19
|
+
end
|
|
15
20
|
end
|
|
16
21
|
end
|
|
17
22
|
end
|
|
@@ -5,19 +5,37 @@ module CheckoutSdk
|
|
|
5
5
|
# @!attribute delivery_email
|
|
6
6
|
# @return [String]
|
|
7
7
|
# @!attribute delivery_timeframe
|
|
8
|
-
# @return [String] {DeliveryTimeframe}
|
|
8
|
+
# @return [String] {}DeliveryTimeframe}
|
|
9
9
|
# @!attribute is_preorder
|
|
10
10
|
# @return [TrueClass, FalseClass]
|
|
11
11
|
# @!attribute is_reorder
|
|
12
12
|
# @return [TrueClass, FalseClass]
|
|
13
13
|
# @!attribute shipping_indicator
|
|
14
14
|
# @return [String] {ShippingIndicator}
|
|
15
|
+
# @!attribute reorder_items_indicator
|
|
16
|
+
# @return [String] {ReorderItemsIndicatorType}
|
|
17
|
+
# @!attribute pre_order_purchase_indicator
|
|
18
|
+
# @return [String] {PreOrderPurchaseIndicatorType}
|
|
19
|
+
# @!attribute pre_order_date
|
|
20
|
+
# @return [Time]
|
|
21
|
+
# @!attribute gift_card_amount
|
|
22
|
+
# @return [String]
|
|
23
|
+
# @!attribute gift_card_currency
|
|
24
|
+
# @return [String]
|
|
25
|
+
# @!attribute gift_card_count
|
|
26
|
+
# @return [String]
|
|
15
27
|
class MerchantRiskInfo
|
|
16
28
|
attr_accessor :delivery_email,
|
|
17
29
|
:delivery_timeframe,
|
|
18
30
|
:is_preorder,
|
|
19
31
|
:is_reorder,
|
|
20
|
-
:shipping_indicator
|
|
32
|
+
:shipping_indicator,
|
|
33
|
+
:reorder_items_indicator,
|
|
34
|
+
:pre_order_purchase_indicator,
|
|
35
|
+
:pre_order_date,
|
|
36
|
+
:gift_card_amount,
|
|
37
|
+
:gift_card_currency,
|
|
38
|
+
:gift_card_count
|
|
21
39
|
end
|
|
22
40
|
end
|
|
23
41
|
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'checkout_sdk/sessions/optimized_properties'
|
|
4
|
+
|
|
5
|
+
module CheckoutSdk
|
|
6
|
+
module Sessions
|
|
7
|
+
# @!attribute optimized
|
|
8
|
+
# @return [TrueClass, FalseClass]
|
|
9
|
+
# @!attribute framework
|
|
10
|
+
# @return [String]
|
|
11
|
+
# @!attribute optimized_properties
|
|
12
|
+
# @return [Array(OptimizedProperties)]
|
|
13
|
+
class Optimization
|
|
14
|
+
attr_accessor :optimized,
|
|
15
|
+
:framework,
|
|
16
|
+
:optimized_properties
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Sessions
|
|
5
|
+
# @!attribute field
|
|
6
|
+
# @return [String]
|
|
7
|
+
# @!attribute original_value
|
|
8
|
+
# @return [String]
|
|
9
|
+
# @!attribute optimized_value
|
|
10
|
+
# @return [String]
|
|
11
|
+
class OptimizedProperties
|
|
12
|
+
attr_accessor :field,
|
|
13
|
+
:original_value,
|
|
14
|
+
:optimized_value
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require 'checkout_sdk/sessions/authentication_type'
|
|
4
|
+
require 'checkout_sdk/sessions/category'
|
|
5
|
+
require 'checkout_sdk/sessions/transaction_type'
|
|
6
|
+
require 'checkout_sdk/common/challenge_indicator'
|
|
7
|
+
|
|
3
8
|
module CheckoutSdk
|
|
4
9
|
module Sessions
|
|
5
10
|
# @!attribute source
|
|
@@ -35,13 +40,17 @@ module CheckoutSdk
|
|
|
35
40
|
# @!attribute shipping_address_matches_billing
|
|
36
41
|
# @return [TrueClass, FalseClass]
|
|
37
42
|
# @!attribute completion
|
|
38
|
-
# @return [
|
|
43
|
+
# @return [Completion]
|
|
39
44
|
# @!attribute channel_data
|
|
40
45
|
# @return [ChannelData]
|
|
41
46
|
# @!attribute recurring
|
|
42
47
|
# @return [Recurring]
|
|
43
48
|
# @!attribute installment
|
|
44
49
|
# @return [Installment]
|
|
50
|
+
# @!attribute optimization
|
|
51
|
+
# @return [Optimization]
|
|
52
|
+
# @!attribute initial_transaction
|
|
53
|
+
# @return [InitialTransaction]
|
|
45
54
|
class SessionRequest
|
|
46
55
|
attr_accessor :source,
|
|
47
56
|
:amount,
|
|
@@ -62,7 +71,22 @@ module CheckoutSdk
|
|
|
62
71
|
:completion,
|
|
63
72
|
:channel_data,
|
|
64
73
|
:recurring,
|
|
65
|
-
:installment
|
|
74
|
+
:installment,
|
|
75
|
+
:optimization,
|
|
76
|
+
:initial_transaction,
|
|
77
|
+
:device_information
|
|
78
|
+
|
|
79
|
+
def initialize(source: CardSource.new,
|
|
80
|
+
authentication_type: CheckoutSdk::Sessions::AuthenticationType::REGULAR,
|
|
81
|
+
authentication_category: CheckoutSdk::Sessions::Category::PAYMENT,
|
|
82
|
+
challenge_indicator: CheckoutSdk::Common::ChallengeIndicator::NO_PREFERENCE,
|
|
83
|
+
transaction_type: CheckoutSdk::Sessions::TransactionType::GOODS_SERVICE)
|
|
84
|
+
@source = source
|
|
85
|
+
@authentication_type = authentication_type
|
|
86
|
+
@authentication_category = authentication_category
|
|
87
|
+
@challenge_indicator = challenge_indicator
|
|
88
|
+
@transaction_type = transaction_type
|
|
89
|
+
end
|
|
66
90
|
end
|
|
67
91
|
end
|
|
68
92
|
end
|
|
@@ -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'
|
|
@@ -16,6 +17,13 @@ require 'checkout_sdk/sessions/sessions_billing_descriptor'
|
|
|
16
17
|
require 'checkout_sdk/sessions/shipping_indicator'
|
|
17
18
|
require 'checkout_sdk/sessions/transaction_type'
|
|
18
19
|
require 'checkout_sdk/sessions/three_ds_method_completion_request'
|
|
20
|
+
require 'checkout_sdk/sessions/three_ds_req_auth_method'
|
|
21
|
+
require 'checkout_sdk/sessions/three_ds_requestor_authentication_info'
|
|
22
|
+
require 'checkout_sdk/sessions/reorder_items_indicator_type'
|
|
23
|
+
require 'checkout_sdk/sessions/pre_order_purchase_indicator_type'
|
|
24
|
+
require 'checkout_sdk/sessions/optimized_properties'
|
|
25
|
+
require 'checkout_sdk/sessions/optimization'
|
|
26
|
+
require 'checkout_sdk/sessions/initial_transaction'
|
|
19
27
|
|
|
20
28
|
# channel
|
|
21
29
|
require 'checkout_sdk/sessions/channel/channel_data'
|
|
@@ -26,6 +34,8 @@ require 'checkout_sdk/sessions/channel/three_ds_method_completion'
|
|
|
26
34
|
require 'checkout_sdk/sessions/channel/uie_elements'
|
|
27
35
|
require 'checkout_sdk/sessions/channel/app_session'
|
|
28
36
|
require 'checkout_sdk/sessions/channel/browser_session'
|
|
37
|
+
require 'checkout_sdk/sessions/channel/request_type'
|
|
38
|
+
require 'checkout_sdk/sessions/channel/merchant_initiated_session'
|
|
29
39
|
|
|
30
40
|
# completion
|
|
31
41
|
require 'checkout_sdk/sessions/completion/completion_info'
|
|
@@ -12,7 +12,7 @@ module CheckoutSdk
|
|
|
12
12
|
# @param [ApiClient] api_client
|
|
13
13
|
# @param [CheckoutConfiguration] configuration
|
|
14
14
|
def initialize(api_client, configuration)
|
|
15
|
-
super
|
|
15
|
+
super(api_client, configuration, CheckoutSdk::AuthorizationType::OAUTH)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
# @param [Hash, SessionRequest] session_request
|
|
@@ -55,7 +55,7 @@ module CheckoutSdk
|
|
|
55
55
|
if session_secret.nil?
|
|
56
56
|
sdk_authorization
|
|
57
57
|
else
|
|
58
|
-
SessionSecretCredentials.new(session_secret)
|
|
58
|
+
SessionSecretCredentials.new(session_secret)
|
|
59
59
|
.get_authorization(AuthorizationType::CUSTOM)
|
|
60
60
|
end
|
|
61
61
|
end
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require 'checkout_sdk/sessions/channel/three_ds_method_completion'
|
|
4
|
+
|
|
3
5
|
module CheckoutSdk
|
|
4
6
|
module Sessions
|
|
5
7
|
# @!attribute three_ds_method_completion
|
|
6
|
-
# @return [String] {ThreeDsMethodCompletion}
|
|
8
|
+
# @return [String] {CheckoutSdk::Sessions::Channel::ThreeDsMethodCompletion}
|
|
7
9
|
class ThreeDsMethodCompletionRequest
|
|
8
10
|
attr_accessor :three_ds_method_completion
|
|
9
11
|
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Sessions
|
|
5
|
+
module ThreeDsReqAuthMethod
|
|
6
|
+
NO_THREEDS_REQUESTOR_AUTHENTICATION_OCCURRED = 'no_threeds_requestor_authentication_occurred'
|
|
7
|
+
THREE3DS_REQUESTOR_OWN_CREDENTIALS = 'three3ds_requestor_own_credentials'
|
|
8
|
+
FEDERATED_ID = 'federated_id'
|
|
9
|
+
ISSUER_CREDENTIALS = 'issuer_credentials'
|
|
10
|
+
THIRD_PARTY_AUTHENTICATION = 'third_party_authentication'
|
|
11
|
+
FIDO_AUTHENTICATOR = 'fido_authenticator'
|
|
12
|
+
FIDO_AUTHENTICATOR_FIDO_ASSURANCE_DATA_SIGNED = 'fido_authenticator_fido_assurance_data_signed'
|
|
13
|
+
SRC_ASSURANCE_DATA = 'src_assurance_data'
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Sessions
|
|
5
|
+
# @!attribute three_ds_req_auth_method
|
|
6
|
+
# @return [String] {ThreeDsReqAuthMethod}
|
|
7
|
+
# @!attribute three_ds_req_auth_timestamp
|
|
8
|
+
# @return [Time]
|
|
9
|
+
# @!attribute three_ds_req_auth_data
|
|
10
|
+
# @return [String]
|
|
11
|
+
class ThreeDsRequestorAuthenticationInfo
|
|
12
|
+
attr_accessor :three_ds_req_auth_method,
|
|
13
|
+
:three_ds_req_auth_timestamp,
|
|
14
|
+
:three_ds_req_auth_data
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Sessions
|
|
5
5
|
module TransactionType
|
|
6
|
-
GOODS_SERVICE = 'goods_service'
|
|
7
|
-
CHECK_ACCEPTANCE = 'check_acceptance'
|
|
8
6
|
ACCOUNT_FUNDING = 'account_funding'
|
|
9
|
-
|
|
7
|
+
CHECK_ACCEPTANCE = 'check_acceptance'
|
|
8
|
+
GOODS_SERVICE = 'goods_service'
|
|
10
9
|
PREPAID_ACTIVATION_AND_LOAD = 'prepaid_activation_and_load'
|
|
10
|
+
QUASHI_CARD_TRANSACTION = 'quashi_card_transaction'
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
end
|
|
@@ -10,7 +10,7 @@ module CheckoutSdk
|
|
|
10
10
|
# @param [ApiClient] api_client
|
|
11
11
|
# @param [CheckoutConfiguration] configuration
|
|
12
12
|
def initialize(api_client, configuration)
|
|
13
|
-
super
|
|
13
|
+
super(api_client, configuration, CheckoutSdk::AuthorizationType::SECRET_KEY)
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
# @param [Hash, SepaSourceRequest] sepa_source_request
|
|
@@ -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
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
module CheckoutSdk
|
|
4
4
|
module Transfers
|
|
5
|
-
# @!attribute reference
|
|
6
|
-
# @return [String]
|
|
7
5
|
# @!attribute transfer_type
|
|
8
6
|
# @return [String] {TransferType}
|
|
9
7
|
# @!attribute source
|
|
10
8
|
# @return [TransferSource]
|
|
11
9
|
# @!attribute destination
|
|
12
10
|
# @return [TransferDestination]
|
|
11
|
+
# @!attribute reference
|
|
12
|
+
# @return [String]
|
|
13
13
|
class CreateTransfer
|
|
14
|
-
attr_accessor :
|
|
15
|
-
:transfer_type,
|
|
14
|
+
attr_accessor :transfer_type,
|
|
16
15
|
:source,
|
|
17
|
-
:destination
|
|
16
|
+
:destination,
|
|
17
|
+
:reference
|
|
18
18
|
end
|
|
19
19
|
end
|
|
20
20
|
end
|