Class: Io::Flow::V0::Models::ConsumerInvoiceItemForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ConsumerInvoiceItemForm
- 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 = {}) ⇒ ConsumerInvoiceItemForm
constructor
A new instance of ConsumerInvoiceItemForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ConsumerInvoiceItemForm
Returns a new instance of ConsumerInvoiceItemForm.
19177 19178 19179 19180 19181 19182 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19177 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:item_number, :quantity], 'ConsumerInvoiceItemForm') @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.
19175 19176 19177 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19175 def item_number @item_number end |
#quantity ⇒ Object (readonly)
Returns the value of attribute quantity.
19175 19176 19177 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19175 def quantity @quantity end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
19188 19189 19190 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19188 def copy(incoming={}) ConsumerInvoiceItemForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
19192 19193 19194 19195 19196 19197 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19192 def to_hash { :item_number => item_number, :quantity => quantity } end |
#to_json ⇒ Object
19184 19185 19186 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 19184 def to_json JSON.dump(to_hash) end |