Sha256: 92f1abda529c942f9be6770354129c481550ec744be1e3909c769c83816c344f

Contents?: true

Size: 977 Bytes

Versions: 5

Compression:

Stored size: 977 Bytes

Contents

module Brightpearl
  class ProductPrice < Resource
    class << self 
      # https://api-docs.brightpearl.com/product/product-price/get.html
      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
  
      # https://api-docs.brightpearl.com/product/product-price/put.html
      def put(product_id, params)
        send_request(path: "product-service/product-price/#{product_id}/price-list", method: :put, body: params)
      end
      
      # https://api-docs.brightpearl.com/product/product-price/options.html
      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
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ruby-brightpearl-0.4.0 lib/brightpearl/resources/product_price.rb
ruby-brightpearl-0.3.0 lib/brightpearl/resources/product_price.rb
ruby-brightpearl-0.2.0 lib/brightpearl/resources/product_price.rb
ruby-brightpearl-0.1.01 lib/brightpearl/resources/product_price.rb
ruby-brightpearl-0.1.0 lib/brightpearl/resources/product_price.rb