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.



31075
31076
31077
31078
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31075

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.



31073
31074
31075
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31073

def name
  @name
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



31084
31085
31086
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31084

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

#to_hashObject



31088
31089
31090
31091
31092
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31088

def to_hash
  {
    :name => name
  }
end

#to_jsonObject



31080
31081
31082
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31080

def to_json
  JSON.dump(to_hash)
end