Class: Clearsale::Analysis
- Inherits:
-
Object
- Object
- Clearsale::Analysis
- Defined in:
- lib/clearsale/analysis.rb
Class Method Summary collapse
- .clear_connector ⇒ Object
- .connector ⇒ Object
- .get_order_status(order_id) ⇒ Object
- .send_order(order_hash, payment_hash, user_hash) ⇒ Object
Class Method Details
.clear_connector ⇒ Object
18 19 20 |
# File 'lib/clearsale/analysis.rb', line 18 def self.clear_connector @connector = nil end |
.connector ⇒ Object
3 4 5 |
# File 'lib/clearsale/analysis.rb', line 3 def self.connector @connector ||= Clearsale::Connector.build end |
.get_order_status(order_id) ⇒ Object
22 23 24 25 |
# File 'lib/clearsale/analysis.rb', line 22 def self.get_order_status(order_id) request = {'orderID' => order_id} OrderResponse.build_from_update(connector.do_request('GetOrderStatus', request)) end |
.send_order(order_hash, payment_hash, user_hash) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/clearsale/analysis.rb', line 7 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 |