Module: Milo::Product

Included in:
Main
Defined in:
lib/milo/product.rb

Instance Method Summary collapse

Instance Method Details

#get_product_by_id(id, options = {}) ⇒ Object



4
5
6
7
8
# File 'lib/milo/product.rb', line 4

def get_product_by_id(id, options = {})
  base = "products?product_ids=#{id}"
  result = apply_flag(base, options)
  make_request(result)
end

#get_product_by_postal_code(code, options = {}) ⇒ Object



16
17
18
19
20
# File 'lib/milo/product.rb', line 16

def get_product_by_postal_code(code, options = {})
  base = "products?postal_code=#{code}"
  result = apply_flag(base, options)
  make_request(result)
end

#get_product_by_upc(upc, options = {}) ⇒ Object



10
11
12
13
14
# File 'lib/milo/product.rb', line 10

def get_product_by_upc(upc, options = {})
  base = "products?q=upc:#{upc}"
  result = apply_flag(base, options)
  make_request(result)
end