Module: Seoshop::Product

Included in:
Client
Defined in:
lib/seoshop-api/api/product.rb

Instance Method Summary collapse

Instance Method Details

#get_product(product_id) ⇒ Object



13
14
15
16
# File 'lib/seoshop-api/api/product.rb', line 13

def get_product(product_id)
  response = get("#{@shop_language}/products/#{product_id}.json")
  response.body ? response.body['product'] : false
end

#get_products(params = {}) ⇒ Object



3
4
5
6
# File 'lib/seoshop-api/api/product.rb', line 3

def get_products(params = {})
  response = get("#{@shop_language}/products.json", params)
  response.body ? response.body['products'] : false
end

#get_products_countObject



8
9
10
11
# File 'lib/seoshop-api/api/product.rb', line 8

def get_products_count
  response = get("#{@shop_language}/products/count.json")
  response.body ? response.body['count'] : false
end