Class: Brightpearl::ProductPrice

Inherits:
Resource
  • Object
show all
Defined in:
lib/brightpearl/resources/product_price.rb

Class Method Summary collapse

Methods inherited from Resource

send_request, to_query

Class Method Details

.get(product_idset, price_list_idset = nil) ⇒ Object



5
6
7
8
9
# File 'lib/brightpearl/resources/product_price.rb', line 5

def get(product_idset, price_list_idset = nil)
  path = "product-service/product-price/#{product_idset}"
  path = "#{path}/price-list/#{price_list_id}" if price_list_idset
  send_request(path: path, method: :get)
end

.options(product_idset, price_list_idset = nil) ⇒ Object



17
18
19
20
21
# File 'lib/brightpearl/resources/product_price.rb', line 17

def options(product_idset, price_list_idset = nil)
  path = "product-service/product-price/#{product_idset}"
  path = "#{path}/price-list/#{price_list_id}" if price_list_idset
  send_request(path: path, method: :options)
end

.put(product_id, params) ⇒ Object



12
13
14
# File 'lib/brightpearl/resources/product_price.rb', line 12

def put(product_id, params)
  send_request(path: "product-service/product-price/#{product_id}/price-list", method: :put, body: params)
end