Class: Io::Flow::V0::Models::InputForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::InputForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#values ⇒ Object
readonly
Returns the value of attribute values.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ InputForm
constructor
A new instance of InputForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ InputForm
Returns a new instance of InputForm.
33921 33922 33923 33924 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 33921 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) @values = (x = opts.delete(:values); x.nil? ? nil : HttpClient::Preconditions.assert_class('values', x, Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('values', d[1], String); h }) end |
Instance Attribute Details
#values ⇒ Object (readonly)
Returns the value of attribute values.
33919 33920 33921 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 33919 def values @values end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
33930 33931 33932 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 33930 def copy(incoming={}) InputForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
33934 33935 33936 33937 33938 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 33934 def to_hash { :values => values.nil? ? nil : values } end |
#to_json ⇒ Object
33926 33927 33928 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 33926 def to_json JSON.dump(to_hash) end |