Class: Io::Flow::V0::Models::ExperienceCloneForm

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Overview

Form for cloning an experience

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ ExperienceCloneForm

Returns a new instance of ExperienceCloneForm.



29110
29111
29112
29113
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29110

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

#nameObject (readonly)

Returns the value of attribute name.



29108
29109
29110
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29108

def name
  @name
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



29119
29120
29121
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29119

def copy(incoming={})
  ExperienceCloneForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#to_hashObject



29123
29124
29125
29126
29127
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29123

def to_hash
  {
    :name => name
  }
end

#to_jsonObject



29115
29116
29117
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29115

def to_json
  JSON.dump(to_hash)
end