Sha256: 1b0b1c7b91b5f60875b419bccbe2127f183b3cc0a310c00a56b2342bf1d15a7e

Contents?: true

Size: 1.2 KB

Versions: 5

Compression:

Stored size: 1.2 KB

Contents

module GenesisRuby
  module Api
    module Requests
      module Base
        # Base class used by all Financial transaction requests
        class Financial < Request

          include Mixins::Requests::Financial::BaseAttributes

          protected

          # Returns the Request transaction type
          def transaction_type
            raise NotImplementedError, 'Transaction Type method must be implemented'
          end

          # Return additional request attributes
          def payment_transaction_structure
            raise NotImplementedError, 'Payment Transaction Structure method must be implemented'
          end

          # Request Configuration
          def init_configuration
            super
            init_xml_configuration
            init_api_gateway_configuration
          end

          def populate_structure
            self.tree_structure = {
              payment_transaction: {
                transaction_type: transaction_type,
                transaction_id:   transaction_id,
                usage:            usage,
                remote_ip:        remote_ip
              }.merge(payment_transaction_structure)
            }
          end

        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
genesis_ruby-0.1.4 lib/genesis_ruby/api/requests/base/financial.rb
genesis_ruby-0.1.3 lib/genesis_ruby/api/requests/base/financial.rb
genesis_ruby-0.1.2 lib/genesis_ruby/api/requests/base/financial.rb
genesis_ruby-0.1.1 lib/genesis_ruby/api/requests/base/financial.rb
genesis_ruby-0.1.0 lib/genesis_ruby/api/requests/base/financial.rb