Class: Io::Flow::V0::Models::OrderIdentifierForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrderIdentifierForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#identifier ⇒ Object
readonly
Returns the value of attribute identifier.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#order ⇒ Object
readonly
Returns the value of attribute order.
-
#primary ⇒ Object
readonly
Returns the value of attribute primary.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ OrderIdentifierForm
constructor
A new instance of OrderIdentifierForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ OrderIdentifierForm
Returns a new instance of OrderIdentifierForm.
40498 40499 40500 40501 40502 40503 40504 40505 40506 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40498 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:order], 'OrderIdentifierForm') @order = HttpClient::Preconditions.assert_class('order', opts.delete(:order), String) @name = (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', x, String)) @identifier = (x = opts.delete(:identifier); x.nil? ? nil : HttpClient::Preconditions.assert_class('identifier', x, String)) @number = (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, String)) @primary = (x = opts.delete(:primary); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('primary', x)) end |
Instance Attribute Details
#identifier ⇒ Object (readonly)
Returns the value of attribute identifier.
40496 40497 40498 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40496 def identifier @identifier end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
40496 40497 40498 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40496 def name @name end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
40496 40497 40498 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40496 def number @number end |
#order ⇒ Object (readonly)
Returns the value of attribute order.
40496 40497 40498 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40496 def order @order end |
#primary ⇒ Object (readonly)
Returns the value of attribute primary.
40496 40497 40498 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40496 def primary @primary end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
40512 40513 40514 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40512 def copy(incoming={}) OrderIdentifierForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
40516 40517 40518 40519 40520 40521 40522 40523 40524 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40516 def to_hash { :order => order, :name => name, :identifier => identifier, :number => number, :primary => primary } end |
#to_json ⇒ Object
40508 40509 40510 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40508 def to_json JSON.dump(to_hash) end |