class Io::Flow::V0::Models::FulfillmentItemQuantity

Fulfillment status of item quantities

Attributes

quantity[R]
status[R]

Public Class Methods

new(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 44149
def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:status, :quantity], 'FulfillmentItemQuantity')
  @status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::FulfillmentItemQuantityStatus) ? x : ::Io::Flow::V0::Models::FulfillmentItemQuantityStatus.apply(x))
  @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 44160
def copy(incoming={})
  FulfillmentItemQuantity.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 44164
def to_hash
  {
    :status => status.value,
    :quantity => quantity
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 44156
def to_json
  JSON.dump(to_hash)
end