Sha256: 8f816d632091d6d3d40ae1ba482fcfba67437e5ae43aacf04b3a20c3a3bfea55

Contents?: true

Size: 734 Bytes

Versions: 16

Compression:

Stored size: 734 Bytes

Contents

 module Clearsale
  class Analysis
    def self.connector
      @connector ||= Clearsale::Connector.build
    end

    def self.send_order(order_hash, payment_hash, user_hash)
      order = Object.new(order_hash)
      payment = Object.new(payment_hash)
      user = Object.new(user_hash)

      order_xml = Clearsale::Order.to_xml(order, payment, user)
      request = {"xml" => order_xml}

      OrderResponse.build_from_send_order(connector.do_request('SendOrders', request))
    end

    def self.clear_connector
      @connector = nil
    end

    def self.get_order_status(order_id)
      request = {'orderID' => order_id}
      OrderResponse.build_from_update(connector.do_request('GetOrderStatus', request))
    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
clearsaleID-1.4.1 lib/clearsale/analysis.rb
clearsaleID-1.4.0 lib/clearsale/analysis.rb
clearsaleID-1.3.3 lib/clearsale/analysis.rb
clearsaleID-1.3.2 lib/clearsale/analysis.rb
clearsaleID-1.3.1 lib/clearsale/analysis.rb
clearsaleID-1.3.0 lib/clearsale/analysis.rb
clearsaleID-1.2.1 lib/clearsale/analysis.rb
clearsaleID-1.1.0 lib/clearsale/analysis.rb
clearsaleID-1.0.5 lib/clearsale/analysis.rb
clearsale-0.1.6 lib/clearsale/analysis.rb
clearsale-0.1.5 lib/clearsale/analysis.rb
clearsale-0.1.4 lib/clearsale/analysis.rb
clearsale-0.1.3 lib/clearsale/analysis.rb
clearsale-0.1.2 lib/clearsale/analysis.rb
clearsale-0.1.1 lib/clearsale/analysis.rb
clearsale-0.1.0 lib/clearsale/analysis.rb