Sha256: 5c4036d4c914b5e88fbb5729ee5df6110a755a39e6ea12328c3f8747fba564cc

Contents?: true

Size: 571 Bytes

Versions: 3

Compression:

Stored size: 571 Bytes

Contents

module WirecardSepa
  module DirectDebit
    class Request
      attr_reader :params

      def initialize(params = {})
        Utils::ParamsValidator.validate!(params, expected_params)
        @params = params
      end

      def to_xml
        Utils::Template.new(self).to_xml
      end

      private

      def expected_params
        %i( merchant_account_id request_id requested_amount
          account_holder_first_name account_holder_last_name bank_account_iban
          bank_account_bic mandate_id mandate_signed_date creditor_id )
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
wirecard_sepa-0.0.3 lib/wirecard_sepa/direct_debit/request.rb
wirecard_sepa-0.0.2 lib/wirecard_sepa/direct_debit/request.rb
wirecard_sepa-0.0.1 lib/wirecard_sepa/direct_debit/request.rb