class Io::Flow::V0::Models::InventoryFollowEcommercePlatform

Items affected with rules pursuing an ecommerce platform strategy will always follow the ecommerce platform inventory

Attributes

quantity[R]

Public Class Methods

new(incoming={}) click to toggle source
# 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

Public Instance Methods

copy(incoming={}) click to toggle source
# 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() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 46209
def subtype_to_hash
  {
    :quantity => quantity
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 46201
def to_json
  JSON.dump(to_hash)
end