in lib/facebook_ads/ad_objects/server_side/event_request.rb [99:143]
def build(attributes = {})
return unless attributes.is_a?(Hash)
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
if attributes.has_key?(:'pixel_id')
self.pixel_id = attributes[:'pixel_id']
end
if attributes.has_key?(:'events')
if (value = attributes[:'events']).is_a?(Array)
self.events = value
end
end
if attributes.has_key?(:'test_event_code')
self.test_event_code = attributes[:'test_event_code']
end
if attributes.has_key?(:'partner_agent')
self.partner_agent = attributes[:'partner_agent']
end
if attributes.has_key?(:'namespace_id')
self.namespace_id = attributes[:'namespace_id']
end
if attributes.has_key?(:'upload_id')
self.upload_id = attributes[:'upload_id']
end
if attributes.has_key?(:'upload_tag')
self.upload_tag = attributes[:'upload_tag']
end
if attributes.has_key?(:'upload_source')
self.upload_source = attributes[:'upload_source']
end
if attributes.has_key?(:'http_service_client')
self.http_service_client = attributes[:'http_service_client']
end
end