-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #289 from BingAds/v13.0.21
v13.0.21
- Loading branch information
Showing
46 changed files
with
2,420 additions
and
61 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import sys | ||
VERSION = '13.0.19.1' | ||
VERSION = '13.0.21' | ||
BULK_FORMAT_VERSION_6 = '6.0' | ||
WORKING_NAME = 'BingAdsSDKPython' | ||
USER_AGENT = '{0} {1} {2}'.format(WORKING_NAME, VERSION, sys.version_info[0:3]) |
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
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
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
14 changes: 14 additions & 0 deletions
14
...13/bulk/entities/audiences/bulk_ad_group_impression_based_remarketing_list_association.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from bingads.v13.bulk.entities.audiences.bulk_ad_group_audience_association import BulkAdGroupAudienceAssociation | ||
|
||
class BulkAdGroupImpressionBasedRemarketingListAssociation(BulkAdGroupAudienceAssociation): | ||
""" Represents an Ad Group Impression Based Remarketing List Association that can be read or written in a bulk file. | ||
For more information, see Ad Group Impression Based Remarketing List Association at https://go.microsoft.com/fwlink/?linkid=846127. | ||
*See also:* | ||
* :class:`.BulkServiceManager` | ||
* :class:`.BulkOperation` | ||
* :class:`.BulkFileReader` | ||
* :class:`.BulkFileWriter` | ||
""" |
14 changes: 14 additions & 0 deletions
14
...ntities/audiences/bulk_ad_group_negative_impression_based_remarketing_list_association.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from bingads.v13.bulk.entities.audiences.bulk_ad_group_negative_audience_association import BulkAdGroupNegativeAudienceAssociation | ||
|
||
class BulkAdGroupNegativeImpressionBasedRemarketingListAssociation(BulkAdGroupNegativeAudienceAssociation): | ||
""" Represents an Ad Group Negative Impression Based Remarketing List Association that can be read or written in a bulk file. | ||
For more information, see Ad Group Negative Impression Based Remarketing List Association at https://go.microsoft.com/fwlink/?linkid=846127. | ||
*See also:* | ||
* :class:`.BulkServiceManager` | ||
* :class:`.BulkOperation` | ||
* :class:`.BulkFileReader` | ||
* :class:`.BulkFileWriter` | ||
""" |
14 changes: 14 additions & 0 deletions
14
...13/bulk/entities/audiences/bulk_campaign_impression_based_remarketing_list_association.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from bingads.v13.bulk.entities.audiences.bulk_campaign_audience_association import BulkCampaignAudienceAssociation | ||
|
||
class BulkCampaignImpressionBasedRemarketingListAssociation(BulkCampaignAudienceAssociation): | ||
""" Represents a Campaign Impression Based Remarketing List Association that can be read or written in a bulk file. | ||
For more information, see Campaign Impression Based Remarketing List Association at https://go.microsoft.com/fwlink/?linkid=846127. | ||
*See also:* | ||
* :class:`.BulkServiceManager` | ||
* :class:`.BulkOperation` | ||
* :class:`.BulkFileReader` | ||
* :class:`.BulkFileWriter` | ||
""" |
14 changes: 14 additions & 0 deletions
14
...ntities/audiences/bulk_campaign_negative_impression_based_remarketing_list_association.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from bingads.v13.bulk.entities.audiences.bulk_campaign_negative_audience_association import BulkCampaignNegativeAudienceAssociation | ||
|
||
class BulkCampaignNegativeImpressionBasedRemarketingListAssociation(BulkCampaignNegativeAudienceAssociation): | ||
""" Represents a Campaign Negative Impression Based Remarketing List Association that can be read or written in a bulk file. | ||
For more information, see Campaign Negative Impression Based Remarketing List Association at https://go.microsoft.com/fwlink/?linkid=846127. | ||
*See also:* | ||
* :class:`.BulkServiceManager` | ||
* :class:`.BulkOperation` | ||
* :class:`.BulkFileReader` | ||
* :class:`.BulkFileWriter` | ||
""" |
67 changes: 67 additions & 0 deletions
67
bingads/v13/bulk/entities/audiences/bulk_impression_based_remarketing_list.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
from bingads.v13.bulk.entities import * | ||
from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 | ||
from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity | ||
from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping | ||
from bingads.v13.internal.bulk.string_table import _StringTable | ||
from bingads.v13.internal.extensions import * | ||
from .bulk_audience import BulkAudience | ||
|
||
class BulkImpressionBasedRemarketingList(BulkAudience): | ||
""" Represents a Impression Based Remarketing List that can be read or written in a bulk file. | ||
This class exposes the :attr:`impression_based_remarketing_list` property that can be read and written as fields of the | ||
Impression Based Remarketing List record in a bulk file. | ||
For more information, see Impression Based Remarketing List at https://go.microsoft.com/fwlink/?linkid=846127. | ||
*See also:* | ||
* :class:`.BulkServiceManager` | ||
* :class:`.BulkOperation` | ||
* :class:`.BulkFileReader` | ||
* :class:`.BulkFileWriter` | ||
""" | ||
|
||
def __init__(self, | ||
impression_based_remarketing_list=None, | ||
status=None,): | ||
super(BulkImpressionBasedRemarketingList, self).__init__(audience = impression_based_remarketing_list, status = status) | ||
|
||
_MAPPINGS = [ | ||
_SimpleBulkMapping( | ||
_StringTable.ImpressionCampaignId, | ||
field_to_csv=lambda c: bulk_str(c.impression_based_remarketing_list.CampaignId), | ||
csv_to_field=lambda c, v: setattr(c.impression_based_remarketing_list, 'CampaignId', int(v) if v else None) | ||
), | ||
_SimpleBulkMapping( | ||
_StringTable.ImpressionAdGroupId, | ||
field_to_csv=lambda c: bulk_str(c.impression_based_remarketing_list.AdGroupId), | ||
csv_to_field=lambda c, v: setattr(c.impression_based_remarketing_list, 'AdGroupId', int(v) if v else None) | ||
), | ||
_SimpleBulkMapping( | ||
header=_StringTable.EntityType, | ||
field_to_csv=lambda c: bulk_str(c.impression_based_remarketing_list.EntityType), | ||
csv_to_field=lambda c, v: setattr(c.impression_based_remarketing_list, 'EntityType', v) | ||
), | ||
] | ||
|
||
@property | ||
def impression_based_remarketing_list(self): | ||
""" Defines a Impression Based Remarketing List """ | ||
|
||
return self._audience | ||
|
||
@impression_based_remarketing_list.setter | ||
def impression_based_remarketing_list(self, impression_based_remarketing_list): | ||
self._audience = impression_based_remarketing_list | ||
|
||
def process_mappings_to_row_values(self, row_values, exclude_readonly_data): | ||
self._validate_property_not_null(self.impression_based_remarketing_list, 'impression_based_remarketing_list') | ||
super(BulkImpressionBasedRemarketingList, self).process_mappings_to_row_values(row_values, exclude_readonly_data) | ||
self.convert_to_values(row_values, BulkImpressionBasedRemarketingList._MAPPINGS) | ||
|
||
def process_mappings_from_row_values(self, row_values): | ||
self.impression_based_remarketing_list = _CAMPAIGN_OBJECT_FACTORY_V13.create('ImpressionBasedRemarketingList') | ||
super(BulkImpressionBasedRemarketingList, self).process_mappings_from_row_values(row_values) | ||
row_values.convert_to_entity(self, BulkImpressionBasedRemarketingList._MAPPINGS) | ||
|
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
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
87 changes: 87 additions & 0 deletions
87
bingads/v13/bulk/entities/bulk_asset_group_search_theme.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 | ||
|
||
from bingads.v13.internal.bulk.string_table import _StringTable | ||
from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity | ||
from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping | ||
from bingads.v13.internal.extensions import * | ||
|
||
class BulkAssetGroupSearchTheme(_SingleRecordBulkEntity): | ||
""" Represents an asset group search theme. | ||
This class exposes the property :attr:`asset_group_search_theme` that can be read and written as fields of the asset group search theme record | ||
in a bulk file. | ||
For more information, see asset group search theme at https://go.microsoft.com/fwlink/?linkid=846127. | ||
*See also:* | ||
* :class:`.BulkServiceManager` | ||
* :class:`.BulkOperation` | ||
* :class:`.BulkFileReader` | ||
* :class:`.BulkFileWriter` | ||
""" | ||
|
||
def __init__(self, asset_group_id=None, asset_group_search_theme=None): | ||
super(BulkAssetGroupSearchTheme, self).__init__() | ||
|
||
self._asset_group_search_theme = asset_group_search_theme | ||
self._asset_group_id = asset_group_id | ||
|
||
@property | ||
def asset_group_search_theme(self): | ||
""" The AssetGroupSearchTheme Data Object of the Campaign Management Service. | ||
A subset of AssetGroupSearchTheme properties are available in the Ad Group record. | ||
For more information, see Ad Group at https://go.microsoft.com/fwlink/?linkid=846127. | ||
""" | ||
return self._asset_group_search_theme | ||
|
||
@asset_group_search_theme.setter | ||
def asset_group_search_theme(self, asset_group_search_theme): | ||
self._asset_group_search_theme = asset_group_search_theme | ||
|
||
@property | ||
def asset_group_id(self): | ||
""" The identifier of the asset group that contains the search theme. | ||
Corresponds to the 'Parent Id' field in the bulk file. | ||
:rtype: int | ||
""" | ||
|
||
return self._asset_group_id | ||
|
||
@asset_group_id.setter | ||
def asset_group_id(self, asset_group_id): | ||
self._asset_group_id = asset_group_id | ||
|
||
|
||
_MAPPINGS = [ | ||
_SimpleBulkMapping( | ||
header=_StringTable.Id, | ||
field_to_csv=lambda c: bulk_str(c.asset_group_search_theme.Id), | ||
csv_to_field=lambda c, v: setattr(c.asset_group_search_theme, 'Id', int(v) if v else None) | ||
), | ||
_SimpleBulkMapping( | ||
header=_StringTable.ParentId, | ||
field_to_csv=lambda c: bulk_str(c.asset_group_id), | ||
csv_to_field=lambda c, v: setattr(c, 'asset_group_id', int(v) if v else None) | ||
), | ||
_SimpleBulkMapping( | ||
header=_StringTable.SearchTheme, | ||
field_to_csv=lambda c: bulk_str(c.asset_group_search_theme.SearchTheme), | ||
csv_to_field=lambda c, v: setattr(c.asset_group_search_theme, 'SearchTheme', v) | ||
), | ||
] | ||
|
||
def process_mappings_from_row_values(self, row_values): | ||
self.asset_group_search_theme = _CAMPAIGN_OBJECT_FACTORY_V13.create('AssetGroupSearchTheme') | ||
|
||
row_values.convert_to_entity(self, BulkAssetGroupSearchTheme._MAPPINGS) | ||
|
||
def process_mappings_to_row_values(self, row_values, exclude_readonly_data): | ||
self._validate_property_not_null(self._asset_group_search_theme, 'AssetGroupSearchTheme') | ||
self.convert_to_values(row_values, BulkAssetGroupSearchTheme._MAPPINGS) | ||
|
||
def read_additional_data(self, stream_reader): | ||
super(BulkAssetGroupSearchTheme, self).read_additional_data(stream_reader) |
Oops, something went wrong.