Class: Io::Flow::V0::Models::OrderLineUpdateForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrderLineUpdateForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#item_number ⇒ Object
readonly
Returns the value of attribute item_number.
-
#quantity ⇒ Object
readonly
Returns the value of attribute quantity.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ OrderLineUpdateForm
constructor
A new instance of OrderLineUpdateForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ OrderLineUpdateForm
Returns a new instance of OrderLineUpdateForm.
22033 22034 22035 22036 22037 22038 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22033 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:item_number, :quantity], 'OrderLineUpdateForm') @item_number = HttpClient::Preconditions.assert_class('item_number', opts.delete(:item_number), String) @quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer) end |
Instance Attribute Details
#item_number ⇒ Object (readonly)
Returns the value of attribute item_number.
22031 22032 22033 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22031 def item_number @item_number end |
#quantity ⇒ Object (readonly)
Returns the value of attribute quantity.
22031 22032 22033 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22031 def quantity @quantity end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
22044 22045 22046 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22044 def copy(incoming={}) OrderLineUpdateForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
22048 22049 22050 22051 22052 22053 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22048 def to_hash { :item_number => item_number, :quantity => quantity } end |
#to_json ⇒ Object
22040 22041 22042 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22040 def to_json JSON.dump(to_hash) end |