Method: FbGraph::AdGroup#update

Defined in:
lib/fb_graph/ad_group.rb

#update(options) ⇒ Object

We override update to handle the “redownload” parameter If redownload is specified, the FbGraph::AdGroup object will be updated with the data returned from Facebook.



16
17
18
19
20
21
22
23
24
25
# File 'lib/fb_graph/ad_group.rb', line 16

def update(options)
  response = super(options)

  if options[:redownload]
    attributes = options.merge(response[:data][:adgroups][identifier]).with_indifferent_access
    set_attrs(attributes)
  end

  response
end