Class: FlexCommerce::Variant
- Inherits:
-
FlexCommerceApi::ApiBase
- Object
- JsonApiClient::Resource
- FlexCommerceApi::BaseResource
- FlexCommerceApi::ApiBase
- FlexCommerce::Variant
- Defined in:
- app/models/variant.rb
Overview
A flex commerce variant model
This model is used by the Product model as an association so is not usable directly on the API as there is no corresponding URL
Constant Summary
Constants inherited from FlexCommerceApi::BaseResource
FlexCommerceApi::BaseResource::PRIVATE_ATTRIBUTES, FlexCommerceApi::BaseResource::RELATED_META_RESOURCES
Instance Method Summary collapse
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
#add_markdown_prices(markdown_prices) ⇒ Object
14 15 16 |
# File 'app/models/variant.rb', line 14 def add_markdown_prices(markdown_prices) self.class.requestor.custom("relationships/markdown_prices", {request_method: :post}, {id: id, data: markdown_prices.map(&:as_relation)}) end |