Class: Incentivale::Resources::Product

Inherits:
Resource
  • Object
show all
Defined in:
lib/incentivale/resources/product.rb

Constant Summary collapse

ENDPOINTS =
{ index: '/products' }

Instance Attribute Summary

Attributes inherited from Resource

#client

Instance Method Summary collapse

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from Incentivale::Resources::Resource

Instance Method Details

#allObject



6
7
8
9
# File 'lib/incentivale/resources/product.rb', line 6

def all
  response = client.get(ENDPOINTS[:index])
  response.success ? response.products : response
end