class Io::Flow::V0::Models::NoInventoryReservationErrorItem

Attributes

available_quantity[R]
number[R]
requested_quantity[R]

Public Class Methods

new(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 50659
def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:number, :requested_quantity, :available_quantity], 'NoInventoryReservationErrorItem')
  @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
  @requested_quantity = HttpClient::Preconditions.assert_class('requested_quantity', opts.delete(:requested_quantity), Integer)
  @available_quantity = HttpClient::Preconditions.assert_class('available_quantity', opts.delete(:available_quantity), Integer)
end

Public Instance Methods

copy(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 50671
def copy(incoming={})
  NoInventoryReservationErrorItem.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 50675
def to_hash
  {
    :number => number,
    :requested_quantity => requested_quantity,
    :available_quantity => available_quantity
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 50667
def to_json
  JSON.dump(to_hash)
end