Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
statement.ToStatement())
if 'results' in response and len(response['results']):
for product_package in response['results']:
# Print out some information for each product package.
print('Product package with ID "%d" and name "%s" was found.\n' %
(product_package['id'], product_package['name']))
statement.offset += statement.limit
else:
break
print '\nNumber of results found: %s' % response['totalResultSetSize']
if __name__ == '__main__':
# Initialize client object.
ad_manager_client = ad_manager.AdManagerClient.LoadFromStorage()
main(ad_manager_client)
# Perform action.
result = (reconciliation_order_report_service
.performReconciliationOrderReportAction(
{'xsi_type': 'SubmitReconciliationOrderReports'},
statement.ToStatement()))
if result and result['numChanges'] > 0:
print('Number of reconciliation order reports submitted: %d' %
result['numChanges'])
else:
print('No reconciliation order reports were submitted.')
if __name__ == '__main__':
# Initialize client object.
ad_manager_client = ad_manager.AdManagerClient.LoadFromStorage()
main(ad_manager_client)
# Display results.
for lica in licas:
print('LICA with line item id "%s", creative id "%s", and status '
'"%s" was updated.' % (lica['lineItemId'], lica['creativeId'],
lica['status']))
statement.offset += statement.limit
else:
break
if response['totalResultSetSize'] == 0:
print('No LICAs found to update.')
if __name__ == '__main__':
# Initialize client object.
ad_manager_client = ad_manager.AdManagerClient.LoadFromStorage()
main(ad_manager_client)
statement.ToStatement())
if 'results' in response and len(response['results']):
for creative_set in response['results']:
# Print out some information for each creative set.
print('Creative set with ID "%d" and name "%s" was found.\n' %
(creative_set['id'], creative_set['name']))
statement.offset += statement.limit
else:
break
print('\nNumber of results found: %s' % response['totalResultSetSize'])
if __name__ == '__main__':
# Initialize client object.
ad_manager_client = ad_manager.AdManagerClient.LoadFromStorage()
main(ad_manager_client)
'value': 'Pie Noon'
}
]
}
# Call service to create the creative.
creative = creative_service.createCreatives([creative])[0]
# Display results.
print('Native creative with id "%s" and name "%s" was '
'created and can be previewed at %s.'
% (creative['id'], creative['name'], creative['previewUrl']))
if __name__ == '__main__':
# Initialize client object.
ad_manager_client = ad_manager.AdManagerClient.LoadFromStorage()
main(ad_manager_client, ADVERTISER_ID)
# Add programmatic proposal line items.
proposal_line_items = proposal_line_item_service.createProposalLineItems(
[proposal_line_item])
# Display results.
for proposal_line_item in proposal_line_items:
print('Programmatic proposal line item with id "%s", belonging to '
'proposal id "%s", and named "%s" was created.' %
(proposal_line_item['id'], proposal_line_item['proposalId'],
proposal_line_item['name']))
if __name__ == '__main__':
# Initialize client object.
ad_manager_client = ad_manager.AdManagerClient.LoadFromStorage()
main(ad_manager_client, PROPOSAL_ID, PRODUCT_ID, RATE_CARD_ID)
statement.ToStatement())
if 'results' in response and len(response['results']):
for product_template in response['results']:
# Print out some information for each product template.
print('Product template with ID "%d" and name "%s" was found.\n' %
(product_template['id'], product_template['name']))
statement.offset += statement.limit
else:
break
print('\nNumber of results found: %s' % response['totalResultSetSize'])
if __name__ == '__main__':
# Initialize client object.
ad_manager_client = ad_manager.AdManagerClient.LoadFromStorage()
main(ad_manager_client)
# Display results.
if proposal_line_items:
for proposal_line_item in proposal_line_items:
print('Line item with id "%s", belonging to proposal id "%s" and,'
' named "%s" was updated.' % (
proposal_line_item['id'], proposal_line_item['proposalId'],
proposal_line_item['name']))
else:
print('No proposal line items were updated.')
else:
print('No proposal line items found to update.')
if __name__ == '__main__':
# Initialize client object.
ad_manager_client = ad_manager.AdManagerClient.LoadFromStorage()
main(ad_manager_client, PROPOSAL_LINE_ITEM_ID)
for workflow_request in response['results']:
# Print out some information for each workflow request.
print('Workflow request with ID "%d", entity type "%s", and entity ID '
'"%d" was found.\n' % (workflow_request['id'],
workflow_request['entityType'],
workflow_request['entityId']))
statement.offset += statement.limit
else:
break
print '\nNumber of results found: %s' % response['totalResultSetSize']
if __name__ == '__main__':
# Initialize client object.
ad_manager_client = ad_manager.AdManagerClient.LoadFromStorage()
main(ad_manager_client)
# Add proposal line items.
proposal_line_items = proposal_line_item_service.createProposalLineItems(
[proposal_line_item])
# Display results.
for proposal_line_item in proposal_line_items:
print('Programmatic proposal line item for non-sales management with id '
'"%s", belonging to proposal id "%s", and named "%s" '
'was created.' % (proposal_line_item['id'],
proposal_line_item['proposalId'],
proposal_line_item['name']))
if __name__ == '__main__':
# Initialize client object.
ad_manager_client = ad_manager.AdManagerClient.LoadFromStorage()
main(ad_manager_client, PROPOSAL_ID, PRODUCT_ID)