Class: MeducationSDK::EcommerceProduct
- Defined in:
- lib/meducation_sdk/resources/ecommerce_product.rb
Direct Known Subclasses
Constant Summary
Constants included from Helpers
Instance Method Summary collapse
Methods inherited from Resource
#created_at, spi_type=, #updated_at
Methods included from Helpers
#sdk_class_for, #sdk_type_for, #spi_type_for
Instance Method Details
#collection ⇒ Object
9 10 11 |
# File 'lib/meducation_sdk/resources/ecommerce_product.rb', line 9 def collection item.is_a?(Collection) ? item : (raise MeducationSDKError.new("Item is not a collection. It is a #{item.class.name}")) end |
#item ⇒ Object
5 6 7 |
# File 'lib/meducation_sdk/resources/ecommerce_product.rb', line 5 def item @item ||= sdk_class_for(item_type).find(item_id) end |