Class: Io::Flow::V0::Models::Test
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::Test
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ Test
constructor
A new instance of Test.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ Test
Returns a new instance of Test.
70356 70357 70358 70359 70360 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 70356 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id], 'Test') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
70354 70355 70356 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 70354 def id @id end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
70366 70367 70368 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 70366 def copy(incoming={}) Test.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
70370 70371 70372 70373 70374 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 70370 def to_hash { :id => id } end |
#to_json ⇒ Object
70362 70363 70364 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 70362 def to_json JSON.dump(to_hash) end |