Sha256: 48e21a991286eaeb3259375823b5a391500471becf58c4a704be0e5ec069c5a0

Contents?: true

Size: 655 Bytes

Versions: 2

Compression:

Stored size: 655 Bytes

Contents

module Awis
  module API
    class Base
      include Utils::Extra
      attr_reader :arguments, :response_body

      def parsed_body
        @parsed_body ||= MultiXml.parse(response_body)
      end

      def root_node_name
        "#{action_name}Response"
      end

      def action_name
        self.class.name.split(/\:\:/)[-1]
      end

      def load_request_uri(params)
        collection = Awis::Connection.new
        collection.setup_params(params)
        collection.uri
      end

      class << self
        def loading_data_from_xml(xml_file_path)
          MultiXml.parse(File.new(xml_file_path))
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
awis-sdk-ruby-0.0.6 lib/awis/api/base.rb
awis-sdk-ruby-0.0.5 lib/awis/api/base.rb