class Morpheus::PriceSetsInterface
Public Instance Methods
base_path()
click to toggle source
# File lib/morpheus/api/price_sets_interface.rb, line 5 def base_path "/api/price-sets" end
create(payload)
click to toggle source
# File lib/morpheus/api/price_sets_interface.rb, line 21 def create(payload) url = base_path headers = { :authorization => "Bearer #{@access_token}", 'Content-Type' => 'application/json' } execute(method: :post, url: url, headers: headers, payload: payload.to_json) end
deactivate(id, params={})
click to toggle source
# File lib/morpheus/api/price_sets_interface.rb, line 33 def deactivate(id, params={}) url = "#{base_path}/#{id}/deactivate" headers = { :params => params, :authorization => "Bearer #{@access_token}", 'Content-Type' => 'application/json' } execute(method: :put, url: url, headers: headers) end
get(id, params={})
click to toggle source
# File lib/morpheus/api/price_sets_interface.rb, line 15 def get(id, params={}) url = "#{base_path}/#{id}" headers = { params: params, authorization: "Bearer #{@access_token}" } execute(method: :get, url: url, headers: headers) end
list(params={})
click to toggle source
# File lib/morpheus/api/price_sets_interface.rb, line 9 def list(params={}) url = base_path headers = { params: params, authorization: "Bearer #{@access_token}" } execute(method: :get, url: url, headers: headers) end
update(id, payload)
click to toggle source
# File lib/morpheus/api/price_sets_interface.rb, line 27 def update(id, payload) url = "#{base_path}/#{id}" headers = { :authorization => "Bearer #{@access_token}", 'Content-Type' => 'application/json' } execute(method: :put, url: url, headers: headers, payload: payload.to_json) end