Sha256: 8e5bfbb2abbe607c0947d1ece16cf6efb5e9662502bdf4b8ab0a398828ba0595

Contents?: true

Size: 812 Bytes

Versions: 1

Compression:

Stored size: 812 Bytes

Contents

module NetSuite
  module Actions
    module SavonSupport

      def self.included(base)
        base.send(:extend, ClassMethods)
      end

      module ClassMethods

        def call(*args)
          new(*args).call
        end

      end

      def call
        @response = request
        build_response
      end

      private

      def request
        raise NotImplementedError
      end

      def connection
        NetSuite::Configuration.connection
      end

      def auth_header
        NetSuite::Configuration.auth_header
      end

      def build_response
        NetSuite::Response.new(:success => success?, :body => response_body)
      end

      def success?
        raise NotImplementedError
      end

      def response_body
        raise NotImplementedError
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
netsuite-0.0.4 lib/netsuite/savon_support.rb