Class: SageWorld::Api::CategoryList

Inherits:
Base
  • Object
show all
Defined in:
lib/sage_world/api/category_list.rb

Class Method Summary collapse

Class Method Details

.get(params = {}) ⇒ Object

Sorting results Category list can be sorted by Category Name or Category Number. By Default Category list is sorted by Name. response = SageWorld::Api::CategoryList.get({ sort: “name”}) => sorts category list by name response = SageWorld::Api::CategoryList.get({ sort: “catnum”}) => sorts category list by category number



20
21
22
23
24
25
26
27
28
# File 'lib/sage_world/api/category_list.rb', line 20

def self.get(params = {})
  if @existing_params == params
    @response
  else
    @existing_params = params
    response = SageWorld::Client.new(list_builder(params)).send_request
    @response = SageWorld::ResponseHandler.new(response)
  end
end