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.
-
#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.
37959 37960 37961 37962 37963 37964 37965 37966 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37959 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) @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.
37957 37958 37959 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37957 def identifier @identifier end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
37957 37958 37959 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37957 def number @number end |
#order ⇒ Object (readonly)
Returns the value of attribute order.
37957 37958 37959 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37957 def order @order end |
#primary ⇒ Object (readonly)
Returns the value of attribute primary.
37957 37958 37959 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37957 def primary @primary end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
37972 37973 37974 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37972 def copy(incoming={}) OrderIdentifierForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
37976 37977 37978 37979 37980 37981 37982 37983 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37976 def to_hash { :order => order, :identifier => identifier, :number => number, :primary => primary } end |
#to_json ⇒ Object
37968 37969 37970 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 37968 def to_json JSON.dump(to_hash) end |