Module: Desk::Api::Creatable

Included in:
Articles, Cases, Companies, Customers, Topics, Translations
Defined in:
lib/desk/api/modules/creatable.rb

Instance Method Summary collapse

Instance Method Details

#create(data) ⇒ Object



5
6
7
# File 'lib/desk/api/modules/creatable.rb', line 5

def create(data)
  return_class.new(connection.post(endpoint, data))
end

#update(id, data) ⇒ Object



9
10
11
# File 'lib/desk/api/modules/creatable.rb', line 9

def update(id, data)
  return_class.new(connection.patch("#{endpoint}/#{id}", data))
end