Class: Io::Flow::V0::Models::OrderSubmissionForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrderSubmissionForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Optional data to be processed during order submission
Instance Attribute Summary collapse
-
#identifiers ⇒ Object
readonly
Returns the value of attribute identifiers.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ OrderSubmissionForm
constructor
A new instance of OrderSubmissionForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ OrderSubmissionForm
Returns a new instance of OrderSubmissionForm.
54153 54154 54155 54156 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54153 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) @identifiers = HttpClient::Preconditions.assert_class('identifiers', (x = opts.delete(:identifiers); x.nil? ? [] : x), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::OrderSubmissionIdentifierForm) ? x : ::Io::Flow::V0::Models::OrderSubmissionIdentifierForm.new(x)) } end |
Instance Attribute Details
#identifiers ⇒ Object (readonly)
Returns the value of attribute identifiers.
54151 54152 54153 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54151 def identifiers @identifiers end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
54162 54163 54164 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54162 def copy(incoming={}) OrderSubmissionForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
54166 54167 54168 54169 54170 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54166 def to_hash { :identifiers => identifiers.map { |o| o.to_hash } } end |
#to_json ⇒ Object
54158 54159 54160 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54158 def to_json JSON.dump(to_hash) end |