Class: Io::Flow::V0::Models::OrderSubmissionIdentifierForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrderSubmissionIdentifierForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Defines the data needed to attach an identifier to each order created by a checkout.
Instance Attribute Summary collapse
-
#identifier ⇒ Object
readonly
Returns the value of attribute identifier.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#primary ⇒ Object
readonly
Returns the value of attribute primary.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ OrderSubmissionIdentifierForm
constructor
A new instance of OrderSubmissionIdentifierForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ OrderSubmissionIdentifierForm
Returns a new instance of OrderSubmissionIdentifierForm.
41480 41481 41482 41483 41484 41485 41486 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41480 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:identifier], 'OrderSubmissionIdentifierForm') @identifier = HttpClient::Preconditions.assert_class('identifier', opts.delete(:identifier), String) @name = (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', 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.
41478 41479 41480 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41478 def identifier @identifier end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
41478 41479 41480 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41478 def name @name end |
#primary ⇒ Object (readonly)
Returns the value of attribute primary.
41478 41479 41480 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41478 def primary @primary end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
41492 41493 41494 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41492 def copy(incoming={}) OrderSubmissionIdentifierForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
41496 41497 41498 41499 41500 41501 41502 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41496 def to_hash { :identifier => identifier, :name => name, :primary => primary } end |
#to_json ⇒ Object
41488 41489 41490 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41488 def to_json JSON.dump(to_hash) end |