Class: FlexCommerce::LineItem
- Inherits:
-
FlexCommerceApi::ApiBase
- Object
- JsonApiClient::Resource
- FlexCommerceApi::BaseResource
- FlexCommerceApi::ApiBase
- FlexCommerce::LineItem
- Defined in:
- app/models/line_item.rb
Overview
A flex commerce LineItem model
This model provides access to the flex commerce cart’s line_items. This model allows you to create a line_item, update its contents, delete a line_item or list the line items for a specific cart.
It is used much like an active record model.
Examples:
# Creating a line item for a specific cart
FlexCommerce::LineItem.create container: cart, item: variant, unit_quantity: 3 #creates and returns a new line item ready for use
Constant Summary
Constants inherited from FlexCommerceApi::BaseResource
FlexCommerceApi::BaseResource::PRIVATE_ATTRIBUTES, FlexCommerceApi::BaseResource::RELATED_META_RESOURCES
Instance Method Summary collapse
-
#item ⇒ FlexCommerce::Variant|FlexCommerce::Bundle
The item (either a variant or a bundle).
Methods inherited from FlexCommerceApi::ApiBase
Methods inherited from FlexCommerceApi::BaseResource
all, append_version, #as_json_api, capture_surrogate_keys, create!, endpoint_version, find, find_all, #freeze, #initialize, load, #meta_attribute, #method_missing, paginate, password, path, #public_attributes, reconfigure, reconfigure_all, reconfigure_api_base, reload_connection_if_required, #save!, username
Constructor Details
This class inherits a constructor from FlexCommerceApi::BaseResource
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class FlexCommerceApi::BaseResource
Instance Method Details
#item ⇒ FlexCommerce::Variant|FlexCommerce::Bundle
The item (either a variant or a bundle)
|
# File 'app/models/line_item.rb', line 21
|