lib/genesis_ruby/api/requests/wpf/create.rb in genesis_ruby-0.1.4 vs lib/genesis_ruby/api/requests/wpf/create.rb in genesis_ruby-0.1.5

- old
+ new

@@ -4,13 +4,12 @@ module GenesisRuby module Api module Requests module Wpf # Web-Payment Form Request - class Create < Request + class Create < Request # rubocop:disable Metrics/ClassLength - include Mixins::Requests::RestrictedSetter include Mixins::Requests::Financial::PaymentAttributes include Mixins::Requests::AddressInfoAttributes include Mixins::Requests::Financial::AsyncAttributes include Mixins::Requests::Financial::NotificationAttributes include Mixins::Requests::Financial::PendingPaymentAttributes @@ -64,9 +63,22 @@ # Load base configuration def init_configuration init_xml_configuration init_api_wpf_configuration + end + + def init_required_fields + self.required_fields = %i[ + transaction_id + amount + currency + notification_url + return_success_url + return_failure_url + return_cancel_url + transaction_types + ] end # Perform validation over the defined parameters upon request execution def check_requirements unless GenesisRuby::Api::Constants::Currencies::Iso4217.valid?(currency)