require 'genesis_ruby/api/requests/base/financials/credit_card' module GenesisRuby module Api module Requests module Financial module Cards # Authorize 3D transactions, credit card based, can be synchronous or asynchronous based on the workflow and # the additional parameters for card holder authentication class Authorize3d < Requests::Base::Financials::CreditCard include Mixins::Requests::AddressInfoAttributes include Mixins::Requests::DocumentAttributes include Mixins::Requests::Financial::AsyncAttributes include Mixins::Requests::Financial::Business::BusinessAttributes include Mixins::Requests::Financial::Cards::FxRateAttributes include Mixins::Requests::Financial::Cards::Recurring::RecurringCategoryAttributes include Mixins::Requests::Financial::Cards::Recurring::RecurringTypeAttributes include Mixins::Requests::Financial::CryptoAttributes include Mixins::Requests::Financial::DynamicDescriptorAttributes include Mixins::Requests::Financial::GamingAttributes include Mixins::Requests::Financial::MotoAttributes include Mixins::Requests::Financial::NotificationAttributes include Mixins::Requests::Financial::RiskAttributes include Mixins::Requests::Financial::ScaAttributes include Mixins::Requests::Financial::Threeds::Version2::CommonAttributes include Mixins::Requests::RestrictedSetter # Specifies the recurring type of transaction def recurring_type=(value) allowed_values = [ GenesisRuby::Api::Constants::Transactions::Parameters::Recurring::Types::INITIAL, GenesisRuby::Api::Constants::Transactions::Parameters::Recurring::Types::MANAGED ] allowed_options attribute: __method__, allowed: allowed_values, value: value, allow_empty: true end protected # Authorize 3D Transaction Type def transaction_type GenesisRuby::Api::Constants::Transactions::AUTHORIZE_3D end # Authorize 3D transaction request parameters def payment_transaction_structure # rubocop:disable Metrics/MethodLength, Metrics/AbcSize super.merge( notification_url: notification_url, return_success_url: return_success_url, return_failure_url: return_failure_url, gaming: gaming, moto: moto, crypto: crypto, customer_email: customer_email, customer_phone: customer_phone, document_id: document_id, fx_rate_id: fx_rate_id, billing_address: billing_address_parameters_structure, shipping_address: shipping_address_parameters_structure, risk_params: risk_parameters_structure, dynamic_descriptor_params: dynamic_descriptor_structure, business_attributes: business_attributes_structure, recurring_type: recurring_type, recurring_category: recurring_category, sca_params: sca_attributes_structure, threeds_v2_params: threeds_v2_common_attributes_structure ) end end end end end end end