def main(client, creative_wrapper_id):
  # Initialize appropriate service.
  creative_wrapper_service = client.GetService('CreativeWrapperService',
                                               version='v201511')

  # Create statement to get a creative wrapper by ID.
  values = [{
      'key': 'creativeWrapperId',
      'value': {
          'xsi_type': 'NumberValue',
          'value': creative_wrapper_id
      }
  }]
  query = 'WHERE id = :creativeWrapperId'
  statement = dfp.FilterStatement(query, values)

  # Get creative wrappers.
  response = creative_wrapper_service.getCreativeWrappersByStatement(
      statement.ToStatement())

  if 'results' in response:
    updated_creative_wrappers = []
    for creative_wrapper in response['results']:
      creative_wrapper['ordering'] = 'OUTER'
      updated_creative_wrappers.append(creative_wrapper)

    # Update the creative wrappers on the server.
    creative_wrappers = creative_wrapper_service.updateCreativeWrappers(
        updated_creative_wrappers)

    # Display results.
    for creative_wrapper in creative_wrappers:
      print (('Creative wrapper with ID \'%s\' and wrapping order \'%s\' '
              'was updated.') % (creative_wrapper['id'],
                                 creative_wrapper['ordering']))
  else:
    print 'No creative wrappers found to update.'
dataset/ETHPy150Open googleads/googleads-python-lib/examples/dfp/v201511/creative_wrapper_service/update_creative_wrappers.py/main/original