Created
December 9, 2010 21:36
-
-
Save jkugler/735374 to your computer and use it in GitHub Desktop.
Populating a MS AdCenter report request
This file contains hidden or 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
bsrr = client.factory.create('BudgetSummaryReportRequest') | |
bsrr.Format = 'Csv' | |
bsrr.ReturnOnlyCompleteData = True | |
bsrr.Language = "English" | |
bsrr.Time.CustomDateRangeStart.Year = 2010 | |
bsrr.Time.CustomDateRangeStart.Month = 12 | |
bsrr.Time.CustomDateRangeStart.Day = 1 | |
bsrr.Time.CustomDateRangeEnd.Year = 2010 | |
bsrr.Time.CustomDateRangeEnd.Month = 12 | |
bsrr.Time.CustomDateRangeEnd.Day = 31 | |
# The one that causes issues. | |
bsrr.Time.PredefinedTime = '' | |
bsrr.Columns = {'BudgetSummaryReportColumn':['AccountName', 'AccountNumber', 'CampaignName', | |
'CurrencyCode', 'Date', 'DailySpend', 'MonthlyBudget', | |
'MonthToDateSpend']} | |
# Another odd one. I had to assign to the .long element since AccountIds was | |
# an "ArrayOflong" Not quite sure why they couldn't define the Schema so you could | |
# assign directly to AccountIds | |
ars = client.factory.create('AccountReportScope') | |
ars.AccountIds.long = get_all_accounts(ac_soap, cfg) | |
bsrr.Scope = ars |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment