Class: Jet::Client::Products

Inherits:
Object
  • Object
show all
Defined in:
lib/jet/client/products.rb

Overview

Products client

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Products

Returns a new instance of Products.



5
6
7
# File 'lib/jet/client/products.rb', line 5

def initialize(client)
  @client = client
end

Instance Method Details

#archive_sku(merchant_sku, body = {}) ⇒ Object



29
30
31
# File 'lib/jet/client/products.rb', line 29

def archive_sku(merchant_sku, body = {})
  @client.rest_put_with_token("/merchant-skus/#{merchant_sku}/status/archive", body)
end

#get_inventory(merchant_sku) ⇒ Object



13
14
15
# File 'lib/jet/client/products.rb', line 13

def get_inventory(merchant_sku)
  @client.rest_get_with_token("/merchant-skus/#{merchant_sku}/inventory")
end

#get_price(merchant_sku) ⇒ Object



33
34
35
# File 'lib/jet/client/products.rb', line 33

def get_price(merchant_sku)
  @client.rest_get_with_token("/merchant-skus/#{merchant_sku}/price")
end

#get_product(merchant_sku) ⇒ Object



21
22
23
# File 'lib/jet/client/products.rb', line 21

def get_product(merchant_sku)
  @client.rest_get_with_token("/merchant-skus/#{merchant_sku}")
end

#get_products(params = {}) ⇒ Object



41
42
43
# File 'lib/jet/client/products.rb', line 41

def get_products(params = {})
  @client.rest_get_with_token('/merchant-skus', params)
end

#update_image(merchant_sku, body = {}) ⇒ Object



37
38
39
# File 'lib/jet/client/products.rb', line 37

def update_image(merchant_sku, body = {})
  @client.rest_put_with_token("/merchant-skus/#{merchant_sku}/image", body)
end

#update_inventory(merchant_sku, body = {}) ⇒ Object



9
10
11
# File 'lib/jet/client/products.rb', line 9

def update_inventory(merchant_sku, body = {})
  @client.rest_patch_with_token("/merchant-skus/#{merchant_sku}/inventory", body)
end

#update_price(merchant_sku, body = {}) ⇒ Object



25
26
27
# File 'lib/jet/client/products.rb', line 25

def update_price(merchant_sku, body = {})
  @client.rest_put_with_token("/merchant-skus/#{merchant_sku}/price", body)
end

#update_product(merchant_sku, body = {}) ⇒ Object



17
18
19
# File 'lib/jet/client/products.rb', line 17

def update_product(merchant_sku, body = {})
  @client.rest_put_with_token("/merchant-skus/#{merchant_sku}", body)
end