Class: Square::Types::CatalogItemVariation
- Inherits:
-
Internal::Types::Model
- Object
- Internal::Types::Model
- Square::Types::CatalogItemVariation
- Defined in:
- lib/square/types/catalog_item_variation.rb
Overview
An item variation, representing a product for sale, in the Catalog object model. Each [item](entity:CatalogItem) must have at least one item variation and can have at most 250 item variations.
An item variation can be sellable, stockable, or both if it has a unit of measure for its count for the sold number of the variation, the stocked number of the variation, or both. For example, when a variation representing wine is stocked and sold by the bottle, the variation is both stockable and sellable. But when a variation of the wine is sold by the glass, the sold units cannot be used as a measure of the stocked units. This by-the-glass variation is sellable, but not stockable. To accurately keep track of the wine’s inventory count at any time, the sellable count must be converted to stockable count. Typically, the seller defines this unit conversion. For example, 1 bottle equals 5 glasses. The Square API exposes the ‘stockable_conversion` property on the variation to specify the conversion. Thus, when two glasses of the wine are sold, the sellable count decreases by 2, and the stockable count automatically decreases by 0.4 bottle according to the conversion.
Method Summary
Methods inherited from Internal::Types::Model
#==, ===, add_extra_field_definition, coerce, extra_fields, field, fields, #initialize, #inspect, literal, load, #to_h
Methods included from Internal::Types::Type
Methods included from Internal::JSON::Serializable
Constructor Details
This class inherits a constructor from Square::Internal::Types::Model