Module: CatalogAPI
- Defined in:
- lib/catalogapi.rb,
lib/catalogapi/item.rb,
lib/catalogapi/order.rb,
lib/catalogapi/catalog.rb,
lib/catalogapi/request.rb,
lib/catalogapi/version.rb,
lib/catalogapi/category.rb,
lib/catalogapi/metadata.rb,
lib/catalogapi/order_item.rb,
lib/catalogapi/fulfillment.rb
Defined Under Namespace
Classes: Catalog, Category, Error, Fulfillment, Item, Metadata, Order, OrderItem, Request
Constant Summary collapse
- VERSION =
'0.1.1'
Class Attribute Summary collapse
-
.environment ⇒ Object
Returns the value of attribute environment.
-
.key ⇒ Object
Returns the value of attribute key.
-
.token ⇒ Object
Returns the value of attribute token.
-
.username ⇒ Object
Returns the value of attribute username.
Class Method Summary collapse
Instance Method Summary collapse
- #catalog_breakdown(socket_id) ⇒ Services::OnlineRewards::Request
-
#list_available_catalogs ⇒ Services::OnlineRewards::Request
Request to the list_available_catalogs endpoint.
- #search_catalog(socket_id, search) ⇒ Services::OnlineRewards::Request
Class Attribute Details
.environment ⇒ Object
Returns the value of attribute environment.
17 18 19 |
# File 'lib/catalogapi.rb', line 17 def environment @environment end |
.key ⇒ Object
Returns the value of attribute key.
17 18 19 |
# File 'lib/catalogapi.rb', line 17 def key @key end |
.token ⇒ Object
Returns the value of attribute token.
17 18 19 |
# File 'lib/catalogapi.rb', line 17 def token @token end |
.username ⇒ Object
Returns the value of attribute username.
17 18 19 |
# File 'lib/catalogapi.rb', line 17 def username @username end |
Class Method Details
.development? ⇒ Boolean
19 20 21 |
# File 'lib/catalogapi.rb', line 19 def development? !production? end |
.production? ⇒ Boolean
23 24 25 |
# File 'lib/catalogapi.rb', line 23 def production? environment == 'production' end |
.request ⇒ Object
27 28 29 |
# File 'lib/catalogapi.rb', line 27 def request CatalogAPI::Request end |
Instance Method Details
#catalog_breakdown(socket_id) ⇒ Services::OnlineRewards::Request
39 40 41 |
# File 'lib/catalogapi.rb', line 39 def catalog_breakdown(socket_id) request.new(:catalog_breakdown).get(socket_id: socket_id) end |
#list_available_catalogs ⇒ Services::OnlineRewards::Request
Returns request to the list_available_catalogs endpoint.
33 34 35 |
# File 'lib/catalogapi.rb', line 33 def list_available_catalogs request.new(:list_available_catalogs).get end |
#search_catalog(socket_id, search) ⇒ Services::OnlineRewards::Request
46 47 48 |
# File 'lib/catalogapi.rb', line 46 def search_catalog(socket_id, search) request.new(:search_catalog).get(socket_id: socket_id, search: search) end |