Class: Product::ProductResource

Inherits:
Object
  • Object
show all
Includes:
Request
Defined in:
lib/tremendous/product.rb

Instance Method Summary collapse

Methods included from Request

#_execute, #access_token, #delete, #get, #handle_response, #initialize, #post, #put, #uri, #url

Instance Method Details

#list(filters = {}) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/tremendous/product.rb', line 15

def list(filters={})
  get(
    'products',
    query: filters,
    format: 'json'
  )[:products]
end

#show(id) ⇒ Object



23
24
25
# File 'lib/tremendous/product.rb', line 23

def show(id)
  get("products/#{id}")[:product]
end