Method: CTM::Call#save

Defined in:
lib/ctm/call.rb

#save(options = {}) ⇒ Object



32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/ctm/call.rb', line 32

def save(options={})
  #puts "save: #{options.inspect}"
  path_str = "/api/v1/#{@list_type_path}/#{@id}/modify.json"

  save_options = {}
  ReadWriteFields.each do |field|
    save_options[field == :notes ? :comments : field] = self.send field
  end

  options[:call] = (options[:call] || {}).merge save_options

  #puts path_str
  self.class.put(path_str, :body => options.merge(:auth_token => @token))
end