Method: FreshdeskAPI::Update::ClassMethods#update!
- Defined in:
- lib/freshdesk_api/actions.rb
#update!(client, attributes = {}, &block) ⇒ Object
Updates a resource given the id passed in
129 130 131 132 133 134 135 136 137 |
# File 'lib/freshdesk_api/actions.rb', line 129 def update!(client, attributes = {}, &block) response = nil new(client, id: attributes.delete(:id)).tap do |resource| resource.attributes.merge!(attributes) response = resource.save!(&block) end response end |