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.



29947
29948
29949
29950
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29947

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.



29945
29946
29947
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29945

def name
  @name
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



29956
29957
29958
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29956

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

#to_hashObject



29960
29961
29962
29963
29964
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29960

def to_hash
  {
    :name => name
  }
end

#to_jsonObject



29952
29953
29954
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29952

def to_json
  JSON.dump(to_hash)
end