Skip to content

Commit

Permalink
Bing Ads Python SDK version 10.4.3 release
Browse files Browse the repository at this point in the history
  • Loading branch information
imagineful committed Apr 30, 2016
1 parent 9aa7380 commit e5a53f6
Show file tree
Hide file tree
Showing 16 changed files with 80 additions and 36 deletions.
8 changes: 8 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
Release History
---------------

10.4.3(2016-04-30)
++++++++++++++++++

* Changed condition to write delete value for Keyword Bid in bulk
* Support suds option in BulkServiceManager and ReportingServiceManager
* Updated wsdl proxy to latest version
* Bug fixes

10.4.2(2016-03-30)
++++++++++++++++++

Expand Down
17 changes: 15 additions & 2 deletions bingads/bulk/bulk_service_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def __init__(self, authorization_data, poll_interval_in_milliseconds=5000, envir
# make sure the working directory exists or create it.
if not os.path.exists(self._working_directory):
os.makedirs(self._working_directory)
self._suds_options = suds_options

def download_file(self, download_parameters, progress=None):
""" Downloads the specified Bulk entities to a local file.
Expand Down Expand Up @@ -225,7 +226,7 @@ def submit_download(self, submit_download_parameters):
authorization_data=self._authorization_data,
poll_interval_in_milliseconds=self._poll_interval_in_milliseconds,
environment=self._environment,
location=self.service_client.service_url,
**self.suds_options
)
return operation

Expand Down Expand Up @@ -256,7 +257,7 @@ def submit_upload(self, submit_upload_parameters):
authorization_data=self._authorization_data,
poll_interval_in_milliseconds=self._poll_interval_in_milliseconds,
environment=self._environment,
location=self.service_client.service_url,
**self.suds_options
)
return operation

Expand Down Expand Up @@ -351,3 +352,15 @@ def working_directory(self):
def working_directory(self, value):
self._working_directory = value

@property
def suds_options(self):
""" suds option parameters
:return: dict
"""
return self._suds_options

@suds_options.setter
def suds_options(self, value):
self._suds_options = value

Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ class BulkAdGroupSiteLinkAdExtension(_BulkAdGroupAdExtensionAssociation):
""" Represents an ad group level sitelink ad extension.
This class exposes properties that can be read and written
as fields of the Ad Group Sitelink Ad Extension record in a bulk file.
as fields of the AdGroup Sitelink Ad Extension record in a bulk file.
For more information, see Ad Group Sitelink Ad Extension at http://go.microsoft.com/fwlink/?LinkID=511552.
For more information, see AdGroup Sitelink Ad Extension at http://go.microsoft.com/fwlink/?LinkID=511552.
*See also:*
Expand Down Expand Up @@ -201,7 +201,7 @@ def version(self, value):
_SimpleBulkMapping(
header=_StringTable.SiteLinkExtensionOrder,
field_to_csv=lambda c: bulk_str(c.order),
csv_to_field=lambda c, v: setattr(c, 'order', int(v))
csv_to_field=lambda c, v: setattr(c, 'order', int(v) if v else None)
),
_SimpleBulkMapping(
header=_StringTable.SiteLinkDisplayText,
Expand Down
2 changes: 1 addition & 1 deletion bingads/bulk/file_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def _read_next_batch(self):
Batch means a set of related entities.
It can be one :class:`._SingleRecordBulkEntity`, one :class:`._MultiRecordBulkEntity` containing its child
entities or a set of related child entities (for example several :class:`.BulkSiteLink`s logically belonging
to the same SiteLink AdExtension.
to the same SiteLink Ad Extension.
:return: Next batch of entities
:rtype: _SingleRecordBulkEntity or _MultiRecordBulkEntity
Expand Down
4 changes: 2 additions & 2 deletions bingads/internal/bulk/string_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class _StringTable:
SocialNetworkAdExtension = "Social Network Ad Extension"
Version = "Version"

# Image AdExtension
# Image Ad Extension
AltText = "Alternative Text"
MediaId = "Media Id"
CampaignImageAdExtension = "Campaign Image Ad Extension"
Expand Down Expand Up @@ -137,7 +137,7 @@ class _StringTable:
KeywordMainLineBidType = "Keyword Main Line Bid"
KeywordBestPositionBidType = "Keyword Best Position Bid"

# Product AdExtension
# Product Ad Extension
CampaignProductAdExtension = "Campaign Product Ad Extension"
ProductCondition4 = "Product Condition 4"
ProductCondition5 = "Product Condition 5"
Expand Down
4 changes: 2 additions & 2 deletions bingads/internal/extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,9 @@ def ad_group_bid_bulk_str(value):

def keyword_bid_bulk_str(value):
if value is None:
return None
if value.Amount is None:
return DELETE_VALUE
if value.Amount is None:
return None
return bulk_str(value.Amount)


Expand Down
2 changes: 1 addition & 1 deletion bingads/manifest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = '10.4.2'
VERSION = '10.4.3'
BULK_FORMAT_VERSION = '3.0'
BULK_FORMAT_VERSION_4 = '4.0'
WORKING_NAME = 'BingAdsSDKPython'
Expand Down
2 changes: 1 addition & 1 deletion bingads/proxies/campaign_management_service.xml

Large diffs are not rendered by default.

15 changes: 14 additions & 1 deletion bingads/reporting/reporting_service_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def __init__(self, authorization_data, poll_interval_in_milliseconds=5000, envir
# make sure the working directory exists or create it.
if not os.path.exists(self._working_directory):
os.makedirs(self._working_directory)
self._suds_options = suds_options

def download_file(self, download_parameters):
""" Downloads the specified reporting to a local file.
Expand Down Expand Up @@ -88,7 +89,7 @@ def submit_download(self, report_request):
authorization_data=self._authorization_data,
poll_interval_in_milliseconds=self._poll_interval_in_milliseconds,
environment=self._environment,
location=self.service_client.service_url
**self.suds_options
)
return operation

Expand Down Expand Up @@ -127,3 +128,15 @@ def working_directory(self):
@working_directory.setter
def working_directory(self, value):
self._working_directory = value

@property
def suds_options(self):
""" suds option parameters
:return: dict
"""
return self._suds_options

@suds_options.setter
def suds_options(self, value):
self._suds_options = value
17 changes: 15 additions & 2 deletions bingads/v10/bulk/bulk_service_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def __init__(self, authorization_data, poll_interval_in_milliseconds=5000, envir
# make sure the working directory exists or create it.
if not os.path.exists(self._working_directory):
os.makedirs(self._working_directory)
self._suds_options = suds_options

def download_file(self, download_parameters, progress=None):
""" Downloads the specified Bulk entities to a local file.
Expand Down Expand Up @@ -221,7 +222,7 @@ def submit_download(self, submit_download_parameters):
authorization_data=self._authorization_data,
poll_interval_in_milliseconds=self._poll_interval_in_milliseconds,
environment=self._environment,
location=self.service_client.service_url,
**self.suds_options
)
return operation

Expand Down Expand Up @@ -251,7 +252,7 @@ def submit_upload(self, submit_upload_parameters):
authorization_data=self._authorization_data,
poll_interval_in_milliseconds=self._poll_interval_in_milliseconds,
environment=self._environment,
location=self.service_client.service_url,
**self.suds_options
)
return operation

Expand Down Expand Up @@ -343,3 +344,15 @@ def working_directory(self):
@working_directory.setter
def working_directory(self, value):
self._working_directory = value

@property
def suds_options(self):
""" suds option parameters
:return: dict
"""
return self._suds_options

@suds_options.setter
def suds_options(self, value):
self._suds_options = value
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ class BulkAdGroupSiteLinkAdExtension(_BulkAdGroupAdExtensionAssociation):
""" Represents an ad group level sitelink ad extension.
This class exposes properties that can be read and written
as fields of the Ad Group Sitelink Ad Extension record in a bulk file.
as fields of the AdGroup Sitelink Ad Extension record in a bulk file.
For more information, see Ad Group Sitelink Ad Extension at http://go.microsoft.com/fwlink/?LinkID=620262.
For more information, see AdGroup Sitelink Ad Extension at http://go.microsoft.com/fwlink/?LinkID=620262.
*See also:*
Expand Down Expand Up @@ -202,7 +202,7 @@ def version(self, value):
_SimpleBulkMapping(
header=_StringTable.SiteLinkExtensionOrder,
field_to_csv=lambda c: bulk_str(c.order),
csv_to_field=lambda c, v: setattr(c, 'order', int(v))
csv_to_field=lambda c, v: setattr(c, 'order', int(v) if v else None)
),
_SimpleBulkMapping(
header=_StringTable.SiteLinkDisplayText,
Expand Down
2 changes: 1 addition & 1 deletion bingads/v10/bulk/entities/bulk_ads.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def process_mappings_to_row_values(self, row_values, exclude_readonly_data):


class BulkTextAd(_BulkAd):
""" Represents a product ad.
""" Represents a Text Ad.
This class exposes the :attr:`text_ad` property that can be read and written as fields of the Text Ad record in a bulk file.
Expand Down
2 changes: 1 addition & 1 deletion bingads/v10/bulk/file_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def _read_next_batch(self):
Batch means a set of related entities.
It can be one :class:`._SingleRecordBulkEntity`, one :class:`._MultiRecordBulkEntity` containing its child
entities or a set of related child entities (for example several :class:`.BulkSiteLink`s logically belonging
to the same SiteLink AdExtension.
to the same SiteLink Ad Extension.
:return: Next batch of entities
:rtype: _SingleRecordBulkEntity or _MultiRecordBulkEntity
Expand Down
25 changes: 11 additions & 14 deletions bingads/v10/internal/bulk/string_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ class _StringTable:
SocialNetworkAdExtension = "Social Network Ad Extension"
Version = "Version"

# Image AdExtension
# Image Ad Extension
AltText = "Alternative Text"
MediaIds = "Media Ids"
CampaignImageAdExtension = "Campaign Image Ad Extension"
AdGroupImageAdExtension = "Ad Group Image Ad Extension"

# SiteLink AdExtensions
# SiteLink Ad Extensions
SiteLinkExtensionOrder = "Sitelink Extension Order"
SiteLinkDisplayText = "Sitelink Extension Link Text"
SiteLinkDestinationUrl = "Sitelink Extension Destination Url"
Expand All @@ -97,7 +97,7 @@ class _StringTable:
CampaignSiteLinksAdExtension = "Campaign Sitelink Ad Extension"
AdGroupSiteLinksAdExtension = "AdGroup Sitelink Ad Extension"

# Location AdExtensions
# Location Ad Extensions
AddressLine1 = "Address Line 1"
AddressLine2 = "Address Line 2"
PostalCode = "Postal Code"
Expand All @@ -109,7 +109,7 @@ class _StringTable:
ImageMediaId = "Business Icon"
CampaignLocationAdExtension = "Campaign Location Ad Extension"

# Call AdExtensions
# Call Ad Extensions
CountryCode = "Country Code"
IsCallOnly = "Call Only"
CampaignCallAdExtension = "Campaign Call Ad Extension"
Expand All @@ -119,31 +119,28 @@ class _StringTable:
# Editorial Rejection Reasons
PublisherCountries = "Publisher Countries"

# Product Target
ProductTargetType = "Ad Group Product Target"
ProductCondition1 = "Product Condition 1"
ProductCondition2 = "Product Condition 2"
ProductCondition3 = "Product Condition 3"
ProductValue1 = "Product Value 1"
ProductValue2 = "Product Value 2"
ProductValue3 = "Product Value 3"

# BTE Types
KeywordFirstPageBidType = "Keyword First Page Bid"
KeywordMainLineBidType = "Keyword Main Line Bid"
KeywordBestPositionBidType = "Keyword Best Position Bid"

# Product AdExtension
ProductCondition1 = "Product Condition 1"
ProductCondition2 = "Product Condition 2"
ProductCondition3 = "Product Condition 3"
ProductCondition4 = "Product Condition 4"
ProductCondition5 = "Product Condition 5"
ProductCondition6 = "Product Condition 6"
ProductCondition7 = "Product Condition 7"
ProductCondition8 = "Product Condition 8"
ProductValue1 = "Product Value 1"
ProductValue2 = "Product Value 2"
ProductValue3 = "Product Value 3"
ProductValue4 = "Product Value 4"
ProductValue5 = "Product Value 5"
ProductValue6 = "Product Value 6"
ProductValue7 = "Product Value 7"
ProductValue8 = "Product Value 8"

BingMerchantCenterId = "Store Id"
BingMerchantCenterName = "Store Name"

Expand Down
2 changes: 1 addition & 1 deletion bingads/v10/proxies/campaign_management_service.xml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
except ImportError:
from distutils.core import setup

VERSION = '10.4.2'
VERSION = '10.4.3'

with open('README.rst', 'r') as f:
readme = f.read()
Expand Down

0 comments on commit e5a53f6

Please sign in to comment.