Method: Contentful::Management::Resource#update

Defined in:
lib/contentful/management/resource.rb

#update(attributes) ⇒ Contentful::Management::Resource

Updates a resource.

Parameters:

  • attributes (Hash)

Returns:

See Also:

  • README for more information on how to create each resource


64
65
66
67
68
69
70
71
72
73
74
# File 'lib/contentful/management/resource.rb', line 64

def update(attributes)
  headers = self.class.create_headers(client, attributes, self)
  headers = headers.merge(update_headers)

  ResourceRequester.new(client, self.class).update(
    self,
    update_url_attributes,
    query_attributes(attributes),
    headers
  )
end