class Sagekit::IC::LocationsResource

Public Instance Methods

create(company, **attributes) click to toggle source
# File lib/sagekit/resources/IC/locations.rb, line 12
def create(company, **attributes)
  Location.new post_request("#{company}/IC/ICLocations", body: attributes).body
end
delete(company, location_id) click to toggle source
# File lib/sagekit/resources/IC/locations.rb, line 21
def delete(company, location_id)
  delete_request("#{company}/IC/ICLocations('#{location_id}')")
  true
end
list(company, **params) click to toggle source
# File lib/sagekit/resources/IC/locations.rb, line 4
def list(company, **params)
  Collection.from_response get_request("#{company}/IC/ICLocations?$count=true", params: params), type: Item
end
retreive(company, location_id, **params) click to toggle source
# File lib/sagekit/resources/IC/locations.rb, line 8
def retreive(company, location_id, **params)
  Location.new get_request("#{company}/IC/ICLocations('#{locations_id}')", params: params).body
end
update(company, location_id, **attributes) click to toggle source
# File lib/sagekit/resources/IC/locations.rb, line 16
def update(company, location_id, **attributes)
  patch_request("#{company}/IC/ICLocations('#{location_id}')", body: attributes)
  true
end