Skip to content

Instantly share code, notes, and snippets.

@iovino
Last active December 14, 2015 06:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iovino/5040081 to your computer and use it in GitHub Desktop.
Save iovino/5040081 to your computer and use it in GitHub Desktop.
Returns all approved orders from a Google DFP account via their API using their Ruby gem 'google-dfp-api'.
require 'dfp_api'
dfp = DfpApi::Api.new
order_service = dfp.service(:OrderService, :v201211)
order_results = order_service.get_orders_by_statement({
:query => 'WHERE status = :order_status LIMIT 500',
:values => [
{:key => 'order_status',
:value => {:value => 'APPROVED', :xsi_type => 'TextValue'}}
]
})
puts order_results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment