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.
41328 41329 41330 41331 41332 41333 41334 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41328 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.
41326 41327 41328 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41326 def identifier @identifier end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
41326 41327 41328 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41326 def name @name end |
#primary ⇒ Object (readonly)
Returns the value of attribute primary.
41326 41327 41328 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41326 def primary @primary end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
41340 41341 41342 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41340 def copy(incoming={}) OrderSubmissionIdentifierForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
41344 41345 41346 41347 41348 41349 41350 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41344 def to_hash { :identifier => identifier, :name => name, :primary => primary } end |
#to_json ⇒ Object
41336 41337 41338 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41336 def to_json JSON.dump(to_hash) end |