lib/genesis_ruby/api/requests/wpf/create.rb in genesis_ruby-0.1.9 vs lib/genesis_ruby/api/requests/wpf/create.rb in genesis_ruby-0.2.0
- old
+ new
@@ -8,21 +8,22 @@
module Requests
module Wpf
# Web-Payment Form Request
class Create < Request # rubocop:disable Metrics/ClassLength
- include Mixins::Requests::Financial::PaymentAttributes
include Mixins::Requests::AddressInfoAttributes
include Mixins::Requests::Financial::AsyncAttributes
- include Mixins::Requests::Financial::NotificationAttributes
- include Mixins::Requests::Financial::PendingPaymentAttributes
- include Mixins::Requests::Financial::Threeds::Version2::WpfAttributes
+ include Mixins::Requests::Financial::Business::BusinessAttributes
include Mixins::Requests::Financial::Cards::AccountOwnerAttributes
include Mixins::Requests::Financial::Cards::Recurring::RecurringCategoryAttributes
include Mixins::Requests::Financial::DynamicDescriptorAttributes
+ include Mixins::Requests::Financial::FundingAttributes
+ include Mixins::Requests::Financial::NotificationAttributes
+ include Mixins::Requests::Financial::PaymentAttributes
+ include Mixins::Requests::Financial::PendingPaymentAttributes
include Mixins::Requests::Financial::RiskAttributes
- include Mixins::Requests::Financial::Business::BusinessAttributes
+ include Mixins::Requests::Financial::Threeds::Version2::WpfAttributes
include Mixins::Requests::WpfRemindersAttributes
attr_reader :locale, :sca_preference, :sca_exemption
attr_accessor :transaction_id, :usage, :description, :consumer_id, :return_cancel_url, :remember_card,
:web_payment_form_id
@@ -120,11 +121,12 @@
required_fields.push *%i[transaction_id amount currency notification_url return_success_url
return_failure_url return_cancel_url transaction_types]
field_values.merge!(
{ currency: Api::Constants::Currencies::Iso4217.all.map(&:upcase) },
- threeds_field_validations
+ threeds_field_validations,
+ funding_attributes_field_validations
)
end
# Perform validation over the defined parameters upon request execution
def check_requirements
@@ -166,10 +168,11 @@
recurring_category: recurring_category,
dynamic_descriptor_params: dynamic_descriptor_structure,
risk_params: risk_parameters_structure,
account_owner: account_owner_attributes_structure,
pay_later: pay_later,
- reminders: pay_later ? reminders_structure : []
+ reminders: pay_later ? reminders_structure : [],
+ funding: funding_attributes_structure
}
}
end
private