Class: Io::Flow::V0::Models::InventoryFollowEcommercePlatform
- Inherits:
-
InventoryStrategy
- Object
- InventoryStrategy
- Io::Flow::V0::Models::InventoryFollowEcommercePlatform
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Items affected with rules pursuing an ecommerce platform strategy will always follow the ecommerce platform inventory
Instance Attribute Summary collapse
-
#quantity ⇒ Object
readonly
Returns the value of attribute quantity.
Attributes inherited from InventoryStrategy
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ InventoryFollowEcommercePlatform
constructor
A new instance of InventoryFollowEcommercePlatform.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from InventoryStrategy
Constructor Details
#initialize(incoming = {}) ⇒ InventoryFollowEcommercePlatform
Returns a new instance of InventoryFollowEcommercePlatform.
46194 46195 46196 46197 46198 46199 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46194 def initialize(incoming={}) super(:discriminator => InventoryStrategy::Types::INVENTORY_FOLLOW_ECOMMERCE_PLATFORM) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:quantity], 'InventoryFollowEcommercePlatform') @quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer) end |
Instance Attribute Details
#quantity ⇒ Object (readonly)
Returns the value of attribute quantity.
46192 46193 46194 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46192 def quantity @quantity end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
46205 46206 46207 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46205 def copy(incoming={}) InventoryFollowEcommercePlatform.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
46209 46210 46211 46212 46213 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46209 def subtype_to_hash { :quantity => quantity } end |
#to_json ⇒ Object
46201 46202 46203 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46201 def to_json JSON.dump(to_hash) end |