Class: Io::Flow::V0::Models::NoInventoryReservationErrorItem
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::NoInventoryReservationErrorItem
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#available_quantity ⇒ Object
readonly
Returns the value of attribute available_quantity.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#requested_quantity ⇒ Object
readonly
Returns the value of attribute requested_quantity.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ NoInventoryReservationErrorItem
constructor
A new instance of NoInventoryReservationErrorItem.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ NoInventoryReservationErrorItem
Returns a new instance of NoInventoryReservationErrorItem.
29663 29664 29665 29666 29667 29668 29669 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29663 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 |
Instance Attribute Details
#available_quantity ⇒ Object (readonly)
Returns the value of attribute available_quantity.
29661 29662 29663 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29661 def available_quantity @available_quantity end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
29661 29662 29663 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29661 def number @number end |
#requested_quantity ⇒ Object (readonly)
Returns the value of attribute requested_quantity.
29661 29662 29663 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29661 def requested_quantity @requested_quantity end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
29675 29676 29677 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29675 def copy(incoming={}) NoInventoryReservationErrorItem.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
29679 29680 29681 29682 29683 29684 29685 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29679 def to_hash { :number => number, :requested_quantity => requested_quantity, :available_quantity => available_quantity } end |
#to_json ⇒ Object
29671 29672 29673 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29671 def to_json JSON.dump(to_hash) end |