Last active
December 14, 2015 06:09
-
-
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'.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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