class Lipseys::Items

Constants

ENDPOINTS

Public Class Methods

new(client) click to toggle source
# File lib/lipseys/items.rb, line 15
def initialize(client)
  @client = client
end

Public Instance Methods

catalog_feed() click to toggle source
# File lib/lipseys/items.rb, line 19
def catalog_feed
  endpoint = ENDPOINTS[:catalog_feed]

  get_request(endpoint, auth_header(@client.access_token))
end
catalog_feed_item(identifier) click to toggle source

`identifier` can be Item #, Mfg Model #, or UPC

# File lib/lipseys/items.rb, line 43
def catalog_feed_item(identifier)
  endpoint = ENDPOINTS[:catalog_feed_item]
  headers  = [
    *auth_header(@client.access_token),
    *content_type_header('application/json'),
  ].to_h

  post_request(endpoint, "'#{identifier}'", headers)
end
pricing_quantity_feed() click to toggle source
# File lib/lipseys/items.rb, line 25
def pricing_quantity_feed
  endpoint = ENDPOINTS[:pricing_quantity_feed]

  get_request(endpoint, auth_header(@client.access_token))
end
validate_item(identifier) click to toggle source

`identifier` can be Item #, Mfg Model #, or UPC

# File lib/lipseys/items.rb, line 32
def validate_item(identifier)
  endpoint = ENDPOINTS[:validate_item]
  headers  = [
    *auth_header(@client.access_token),
    *content_type_header('application/json'),
  ].to_h

  post_request(endpoint, "'#{identifier}'", headers)
end