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
|
@@ -9,12 +9,21 @@ module CheckoutSdk
|
|
|
9
9
|
# @!attribute metadata
|
|
10
10
|
# @return [Hash{String => Object}]
|
|
11
11
|
# @!attribute amount_allocations
|
|
12
|
-
# @return [Array(CheckoutSdk::Common::AmountAllocations)]
|
|
12
|
+
# @return [Array(CheckoutSdk::Common::AmountAllocations)]
|
|
13
|
+
# @!attribute capture_action_id
|
|
14
|
+
# @return [String]
|
|
15
|
+
# @!attribute destination
|
|
16
|
+
# @return [CheckoutSdk::Common::Destination]
|
|
17
|
+
# @!attribute items
|
|
18
|
+
# @return [Array(CheckoutSdk::Payments::RefundOrder)]
|
|
13
19
|
class RefundRequest
|
|
14
20
|
attr_accessor :amount,
|
|
15
21
|
:reference,
|
|
16
22
|
:metadata,
|
|
17
|
-
:amount_allocations
|
|
23
|
+
:amount_allocations,
|
|
24
|
+
:capture_action_id,
|
|
25
|
+
:destination,
|
|
26
|
+
:items
|
|
18
27
|
end
|
|
19
28
|
end
|
|
20
29
|
end
|
|
@@ -6,6 +6,8 @@ module CheckoutSdk
|
|
|
6
6
|
# @return [String]
|
|
7
7
|
# @!attribute address
|
|
8
8
|
# @return [CheckoutSdk::Common::Address]
|
|
9
|
+
# @!attribute reference
|
|
10
|
+
# @return [String]
|
|
9
11
|
# @!attribute reference_type
|
|
10
12
|
# @return [String]
|
|
11
13
|
# @!attribute source_of_funds
|
|
@@ -15,12 +17,13 @@ module CheckoutSdk
|
|
|
15
17
|
class GovernmentSender < Sender
|
|
16
18
|
attr_accessor :company_name,
|
|
17
19
|
:address,
|
|
20
|
+
:reference,
|
|
18
21
|
:reference_type,
|
|
19
22
|
:source_of_funds,
|
|
20
23
|
:identification
|
|
21
24
|
|
|
22
25
|
def initialize
|
|
23
|
-
super
|
|
26
|
+
super(CheckoutSdk::Payments::SenderType::GOVERNMENT)
|
|
24
27
|
end
|
|
25
28
|
end
|
|
26
29
|
end
|
|
@@ -14,6 +14,8 @@ module CheckoutSdk
|
|
|
14
14
|
# @return [CheckoutSdk::Common::Address]
|
|
15
15
|
# @!attribute identification
|
|
16
16
|
# @return [CheckoutSdk::Common::AccountHolderIdentification]
|
|
17
|
+
# @!attribute reference
|
|
18
|
+
# @return [String]
|
|
17
19
|
# @!attribute reference_type
|
|
18
20
|
# @return [String]
|
|
19
21
|
# @!attribute date_of_birth
|
|
@@ -31,6 +33,7 @@ module CheckoutSdk
|
|
|
31
33
|
:dob,
|
|
32
34
|
:address,
|
|
33
35
|
:identification,
|
|
36
|
+
:reference,
|
|
34
37
|
:reference_type,
|
|
35
38
|
:date_of_birth,
|
|
36
39
|
:source_of_funds,
|
|
@@ -38,7 +41,7 @@ module CheckoutSdk
|
|
|
38
41
|
:nationality
|
|
39
42
|
|
|
40
43
|
def initialize
|
|
41
|
-
super
|
|
44
|
+
super(CheckoutSdk::Payments::SenderType::INDIVIDUAL)
|
|
42
45
|
end
|
|
43
46
|
end
|
|
44
47
|
end
|
|
@@ -4,17 +4,29 @@ module CheckoutSdk
|
|
|
4
4
|
module Payments
|
|
5
5
|
class PaymentSessionsClient < Client
|
|
6
6
|
PAYMENT_SESSIONS = 'payment-sessions'
|
|
7
|
+
COMPLETE = 'complete'
|
|
8
|
+
private_constant :COMPLETE
|
|
7
9
|
|
|
8
10
|
# @param [ApiClient] api_client
|
|
9
11
|
# @param [CheckoutConfiguration] configuration
|
|
10
12
|
def initialize(api_client, configuration)
|
|
11
|
-
super
|
|
13
|
+
super(api_client, configuration, CheckoutSdk::AuthorizationType::SECRET_KEY)
|
|
12
14
|
end
|
|
13
15
|
|
|
14
16
|
# @param [Hash, PaymentSessionsRequest] payment_sessions
|
|
15
17
|
def create_payment_sessions(payment_sessions)
|
|
16
18
|
api_client.invoke_post(PAYMENT_SESSIONS, sdk_authorization, payment_sessions)
|
|
17
19
|
end
|
|
20
|
+
|
|
21
|
+
# Create and immediately submit a payment session. POST /payment-sessions/complete.
|
|
22
|
+
# @param [Hash] payment_sessions_request
|
|
23
|
+
def create_and_complete_payment_sessions(payment_sessions_request)
|
|
24
|
+
api_client.invoke_post(
|
|
25
|
+
build_path(PAYMENT_SESSIONS, COMPLETE),
|
|
26
|
+
sdk_authorization,
|
|
27
|
+
payment_sessions_request
|
|
28
|
+
)
|
|
29
|
+
end
|
|
18
30
|
end
|
|
19
31
|
end
|
|
20
32
|
end
|
|
@@ -60,8 +60,15 @@ module CheckoutSdk
|
|
|
60
60
|
# @return [TrueClass, FalseClass]
|
|
61
61
|
# @!attribute ip_address
|
|
62
62
|
# @return [String]
|
|
63
|
+
# @!attribute capture_on
|
|
64
|
+
# @return [Time]
|
|
63
65
|
# @!attribute tax_amount
|
|
64
66
|
# @return [Integer]
|
|
67
|
+
# @!attribute authorization_type
|
|
68
|
+
# @return [String] [Optional] {AuthorizationType} Enum: "Final" "Estimated". Default: "Final".
|
|
69
|
+
# @!attribute payment_plan
|
|
70
|
+
# @return [PaymentPlan] [Optional] The information to process a recurring payment request.
|
|
71
|
+
# To be used when the payment_type is Recurring.
|
|
65
72
|
class PaymentSessionsRequest
|
|
66
73
|
attr_accessor :amount,
|
|
67
74
|
:currency,
|
|
@@ -92,7 +99,10 @@ module CheckoutSdk
|
|
|
92
99
|
:sender,
|
|
93
100
|
:capture,
|
|
94
101
|
:ip_address,
|
|
95
|
-
:
|
|
102
|
+
:capture_on,
|
|
103
|
+
:tax_amount,
|
|
104
|
+
:authorization_type,
|
|
105
|
+
:payment_plan
|
|
96
106
|
end
|
|
97
107
|
end
|
|
98
108
|
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Payments
|
|
5
|
+
# @!attribute type
|
|
6
|
+
# @return [String] {AccountFundingTransactionIdentificationType}
|
|
7
|
+
# @!attribute number
|
|
8
|
+
# @return [String]
|
|
9
|
+
# @!attribute issuing_country
|
|
10
|
+
# @return [String] {CheckoutSdk::Common::Country}
|
|
11
|
+
class AccountFundingTransactionIdentification
|
|
12
|
+
attr_accessor :type,
|
|
13
|
+
:number,
|
|
14
|
+
:issuing_country
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -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,41 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Payments
|
|
5
|
+
# Bacs payment method configuration on a Payment Setup. Maps swagger `Bacs`.
|
|
6
|
+
#
|
|
7
|
+
# @!attribute status
|
|
8
|
+
# @return [String] (response-only) Payment method status.
|
|
9
|
+
# @!attribute flags
|
|
10
|
+
# @return [Array(String)] (response-only) Diagnostic flags returned by the API.
|
|
11
|
+
# @!attribute initialization
|
|
12
|
+
# @return [String] The initialization type for the payment method.
|
|
13
|
+
# @!attribute instrument_id
|
|
14
|
+
# @return [String] (response-only) The ID of the Bacs instrument used for the payment.
|
|
15
|
+
# @!attribute account_holder
|
|
16
|
+
# @return [Hash] The account holder details (`type`, `first_name`, `last_name`,
|
|
17
|
+
# `company_name`, `email`).
|
|
18
|
+
# @!attribute account_number
|
|
19
|
+
# @return [String] The account number of the Bacs Direct Debit account.
|
|
20
|
+
# @!attribute bank_code
|
|
21
|
+
# @return [String] The bank code (sort code) of the Bacs Direct Debit account.
|
|
22
|
+
# @!attribute country
|
|
23
|
+
# @return [String] {CheckoutSdk::Common::Country}
|
|
24
|
+
# @!attribute currency
|
|
25
|
+
# @return [String] {CheckoutSdk::Common::Currency}
|
|
26
|
+
# @!attribute allow_partial_match
|
|
27
|
+
# @return [TrueClass, FalseClass] Whether to allow a partial match of the account holder details.
|
|
28
|
+
class BacsPaymentMethod
|
|
29
|
+
attr_accessor :status,
|
|
30
|
+
:flags,
|
|
31
|
+
:initialization,
|
|
32
|
+
:instrument_id,
|
|
33
|
+
:account_holder,
|
|
34
|
+
:account_number,
|
|
35
|
+
:bank_code,
|
|
36
|
+
:country,
|
|
37
|
+
:currency,
|
|
38
|
+
:allow_partial_match
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
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,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Payments
|
|
5
|
+
# Card Present payment method configuration on a Payment Setup. Maps swagger `CardPresent`.
|
|
6
|
+
#
|
|
7
|
+
# @!attribute status
|
|
8
|
+
# @return [String] (response-only) Payment method status.
|
|
9
|
+
# @!attribute flags
|
|
10
|
+
# @return [Array(String)] (response-only) Diagnostic flags returned by the API.
|
|
11
|
+
# @!attribute track2
|
|
12
|
+
# @return [String] The Track 2 data read from card or device.
|
|
13
|
+
# @!attribute emv
|
|
14
|
+
# @return [String] The EMV data read from the card or device.
|
|
15
|
+
# @!attribute entry_mode
|
|
16
|
+
# @return [String] The mode used to capture the card details at the point of sale.
|
|
17
|
+
# @!attribute pin
|
|
18
|
+
# @return [Hash] The encrypted PIN block details (`key_set_id`, `block`, `block_format`).
|
|
19
|
+
# @!attribute store_for_future_use
|
|
20
|
+
# @return [TrueClass, FalseClass] Set to `true` if you intend to reuse the payment credentials
|
|
21
|
+
# in subsequent payments.
|
|
22
|
+
# @!attribute name
|
|
23
|
+
# @return [String] The cardholder name.
|
|
24
|
+
class CardPresentPaymentMethod
|
|
25
|
+
attr_accessor :status,
|
|
26
|
+
:flags,
|
|
27
|
+
:track2,
|
|
28
|
+
:emv,
|
|
29
|
+
:entry_mode,
|
|
30
|
+
:pin,
|
|
31
|
+
:store_for_future_use,
|
|
32
|
+
:name
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Payments
|
|
5
|
+
# Pay by Bank (Open Banking) payment method configuration on a Payment Setup.
|
|
6
|
+
# Maps swagger `PayByBank`.
|
|
7
|
+
#
|
|
8
|
+
# @!attribute status
|
|
9
|
+
# @return [String] (response-only) Payment method status.
|
|
10
|
+
# @!attribute flags
|
|
11
|
+
# @return [Array(String)] (response-only) Diagnostic flags returned by the API.
|
|
12
|
+
# @!attribute bank_id
|
|
13
|
+
# @return [String] The identifier of the bank the customer has selected for the payment.
|
|
14
|
+
# @!attribute action
|
|
15
|
+
# @return [Hash] (response-only) The next available action for the payment method
|
|
16
|
+
# (`type`, `banks`).
|
|
17
|
+
class PayByBankPaymentMethod
|
|
18
|
+
attr_accessor :status,
|
|
19
|
+
:flags,
|
|
20
|
+
:bank_id,
|
|
21
|
+
:action
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
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,75 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Payments
|
|
5
|
+
# Client for Payment Setups API operations
|
|
6
|
+
# [Beta]
|
|
7
|
+
class PaymentSetupsClient < Client
|
|
8
|
+
PAYMENTS_PATH = 'payments'
|
|
9
|
+
SETUPS_PATH = 'setups'
|
|
10
|
+
CONFIRM_PATH = 'confirm'
|
|
11
|
+
|
|
12
|
+
# @param [ApiClient] api_client
|
|
13
|
+
# @param [CheckoutConfiguration] configuration
|
|
14
|
+
def initialize(api_client, configuration)
|
|
15
|
+
super(api_client, configuration, CheckoutSdk::AuthorizationType::SECRET_KEY_OR_OAUTH)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
# Creates a Payment Setup.
|
|
19
|
+
# To maximize the amount of information the payment setup can use, we recommend that you create
|
|
20
|
+
# a payment setup as early as possible in the customer's journey. For example, the first time
|
|
21
|
+
# they land on the basket page.
|
|
22
|
+
# [Beta]
|
|
23
|
+
#
|
|
24
|
+
# @param [Hash] payment_setups_request
|
|
25
|
+
def create_payment_setup(payment_setups_request)
|
|
26
|
+
api_client.invoke_post(
|
|
27
|
+
build_path(PAYMENTS_PATH, SETUPS_PATH),
|
|
28
|
+
sdk_authorization,
|
|
29
|
+
payment_setups_request
|
|
30
|
+
)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Updates a Payment Setup.
|
|
34
|
+
# You should update the payment setup whenever there are significant changes in the data relevant
|
|
35
|
+
# to the customer's transaction. For example, when the customer makes a change that impacts the
|
|
36
|
+
# total payment amount.
|
|
37
|
+
# [Beta]
|
|
38
|
+
#
|
|
39
|
+
# @param [String] id - The unique identifier of the Payment Setup to update
|
|
40
|
+
# @param [Hash] payment_setups_request
|
|
41
|
+
def update_payment_setup(id, payment_setups_request)
|
|
42
|
+
api_client.invoke_put(
|
|
43
|
+
build_path(PAYMENTS_PATH, SETUPS_PATH, id),
|
|
44
|
+
sdk_authorization,
|
|
45
|
+
payment_setups_request
|
|
46
|
+
)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Retrieves a Payment Setup.
|
|
50
|
+
# [Beta]
|
|
51
|
+
#
|
|
52
|
+
# @param [String] id - The unique identifier of the Payment Setup to retrieve
|
|
53
|
+
def get_payment_setup(id)
|
|
54
|
+
api_client.invoke_get(
|
|
55
|
+
build_path(PAYMENTS_PATH, SETUPS_PATH, id),
|
|
56
|
+
sdk_authorization
|
|
57
|
+
)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Confirms a Payment Setup to begin processing the payment request with your chosen
|
|
61
|
+
# payment method option.
|
|
62
|
+
# [Beta]
|
|
63
|
+
#
|
|
64
|
+
# @param [String] id - The unique identifier of the Payment Setup
|
|
65
|
+
# @param [String] payment_method_option_id - The unique identifier of the payment option
|
|
66
|
+
# to process the payment with
|
|
67
|
+
def confirm_payment_setup(id, payment_method_option_id)
|
|
68
|
+
api_client.invoke_post(
|
|
69
|
+
build_path(PAYMENTS_PATH, SETUPS_PATH, id, CONFIRM_PATH, payment_method_option_id),
|
|
70
|
+
sdk_authorization
|
|
71
|
+
)
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Payments
|
|
5
|
+
# Stablecoin payment method configuration on a Payment Setup. Maps swagger `Stablecoin`.
|
|
6
|
+
#
|
|
7
|
+
# @!attribute status
|
|
8
|
+
# @return [String] (response-only) Payment method status.
|
|
9
|
+
# @!attribute flags
|
|
10
|
+
# @return [Array(String)] (response-only) Diagnostic flags returned by the API.
|
|
11
|
+
class StablecoinPaymentMethod
|
|
12
|
+
attr_accessor :status,
|
|
13
|
+
:flags
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Payments
|
|
5
|
+
# @!attribute account_type
|
|
6
|
+
# @return [CheckoutSdk::Common::AccountType]
|
|
7
|
+
# @!attribute country
|
|
8
|
+
# @return [CheckoutSdk::Common::Country]
|
|
9
|
+
# @!attribute account_number
|
|
10
|
+
# @return [String]
|
|
11
|
+
# @!attribute bank_code
|
|
12
|
+
# @return [String]
|
|
13
|
+
# @!attribute account_holder
|
|
14
|
+
# @return [CheckoutSdk::Common::AccountHolder]
|
|
15
|
+
class AchSource < PaymentSource
|
|
16
|
+
attr_accessor :account_type,
|
|
17
|
+
:country,
|
|
18
|
+
:account_number,
|
|
19
|
+
:bank_code,
|
|
20
|
+
:account_holder
|
|
21
|
+
|
|
22
|
+
def initialize
|
|
23
|
+
super(CheckoutSdk::Common::PaymentSourceType::ACH)
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CheckoutSdk
|
|
4
|
+
module Payments
|
|
5
|
+
# @!attribute mobile_number
|
|
6
|
+
# @return [String]
|
|
7
|
+
class BizumSource < PaymentSource
|
|
8
|
+
attr_accessor :mobile_number
|
|
9
|
+
|
|
10
|
+
def initialize
|
|
11
|
+
super(CheckoutSdk::Common::PaymentSourceType::BIZUM)
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
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
|