class Io::Flow::V0::Models::ShopifyVariantInventoryMetafield
For enabled organizations, this indicates the total number of available units of inventory for customers in this experience.
Attributes
experience[R]
status[R]
Public Class Methods
new(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 68465 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:experience, :status], 'ShopifyVariantInventoryMetafield') @experience = (x = opts.delete(:experience); x.is_a?(::Io::Flow::V0::Models::ExperienceReference) ? x : ::Io::Flow::V0::Models::ExperienceReference.new(x)) @status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::ItemAvailabilityStatus) ? x : ::Io::Flow::V0::Models::ItemAvailabilityStatus.apply(x)) end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 68476 def copy(incoming={}) ShopifyVariantInventoryMetafield.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end
to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 68480 def to_hash { :experience => experience.to_hash, :status => status.value } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 68472 def to_json JSON.dump(to_hash) end