Class: Vpsa::Api::Orders
Instance Attribute Summary
Attributes inherited from Client
#access_token
Instance Method Summary
collapse
Methods inherited from Client
#category_levels, #client_classes, #companies, #credit_limits, #default_entries, #entities, #initialize, #installments, #orders, #payment_conditions, #product_categories, #products, #provisions, #receipts, #sales_history, #sellers, #third_parties, #user_data
#require_all
Constructor Details
This class inherits a constructor from Vpsa::Client
Instance Method Details
#find(id) ⇒ Object
16
17
18
|
# File 'lib/vpsa/api/orders.rb', line 16
def find(id)
return parse_response(self.class.get("/#{id}", :body => build_body, :headers => ))
end
|
#list(searcher = nil) ⇒ Object
9
10
11
12
13
14
|
# File 'lib/vpsa/api/orders.rb', line 9
def list(searcher = nil)
raise ArgumentError unless searcher.nil? || searcher.is_a?(Vpsa::Searcher::Operational::OrderSearcher)
return parse_response(self.class.get("/", :body => build_body(searcher.as_parameter), :headers => )) if searcher
return parse_response(self.class.get("/", :body => build_body, :headers => )) unless searcher
end
|
#save(order) ⇒ Object
20
21
22
23
|
# File 'lib/vpsa/api/orders.rb', line 20
def save(order)
raise ArgumentError unless order.nil? || order.is_a?(Vpsa::Entity::Commercial::Order)
return parse_response(self.class.post("/", :body => build_body(order.as_parameter), :headers => ))
end
|