Class: Io::Flow::V0::Models::ExperienceCloneForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ExperienceCloneForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Form for cloning an experience
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ExperienceCloneForm
constructor
A new instance of ExperienceCloneForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ExperienceCloneForm
Returns a new instance of ExperienceCloneForm.
36562 36563 36564 36565 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 36562 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) @name = (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', x, String)) end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
36560 36561 36562 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 36560 def name @name end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
36571 36572 36573 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 36571 def copy(incoming={}) ExperienceCloneForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
36575 36576 36577 36578 36579 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 36575 def to_hash { :name => name } end |
#to_json ⇒ Object
36567 36568 36569 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 36567 def to_json JSON.dump(to_hash) end |