-
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 #252 from BingAds/v13.0.17
v13.0.17
- Loading branch information
Showing
26 changed files
with
2,067 additions
and
590 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.16' | ||
VERSION = '13.0.17' | ||
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
52 changes: 52 additions & 0 deletions
52
bingads/v13/bulk/entities/target_criterions/bulk_ad_group_genre_criterion.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,52 @@ | ||
from bingads.v13.bulk.entities import * | ||
from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 | ||
from bingads.v13.bulk.entities.target_criterions.bulk_ad_group_biddable_criterion import BulkAdGroupBiddableCriterion | ||
from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping | ||
from bingads.v13.internal.bulk.string_table import _StringTable | ||
from bingads.v13.internal.extensions import * | ||
|
||
|
||
class BulkAdGroupGenreCriterion(BulkAdGroupBiddableCriterion): | ||
""" Represents an Ad Group Genre Criterion that can be read or written in a bulk file. | ||
This class exposes the :attr:`biddable_ad_group_criterion` property that can be read and written as fields of the | ||
Ad Group Genre Criterion record in a bulk file. | ||
For more information, see Ad Group Genre Criterion at https://go.microsoft.com/fwlink/?linkid=846127. | ||
*See also:* | ||
* :class:`.BulkServiceManager` | ||
* :class:`.BulkOperation` | ||
* :class:`.BulkFileReader` | ||
* :class:`.BulkFileWriter` | ||
""" | ||
|
||
def __init__(self, | ||
biddable_ad_group_criterion=None, | ||
campaign_name=None, | ||
ad_group_name=None, ): | ||
super(BulkAdGroupGenreCriterion, self).__init__(biddable_ad_group_criterion, campaign_name, ad_group_name) | ||
|
||
_MAPPINGS = [ | ||
_SimpleBulkMapping( | ||
_StringTable.Target, | ||
field_to_csv=lambda c: field_to_csv_GenreId(c.biddable_ad_group_criterion), | ||
csv_to_field=lambda c, v: csv_to_field_GenreId(c.biddable_ad_group_criterion, v) | ||
) | ||
] | ||
|
||
def create_criterion(self): | ||
self._biddable_ad_group_criterion.Criterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('GenreCriterion') | ||
self._biddable_ad_group_criterion.Criterion.Type = 'GenreCriterion' | ||
|
||
def process_mappings_to_row_values(self, row_values, exclude_readonly_data): | ||
super(BulkAdGroupGenreCriterion, self).process_mappings_to_row_values(row_values, exclude_readonly_data) | ||
self.convert_to_values(row_values, BulkAdGroupGenreCriterion._MAPPINGS) | ||
|
||
def process_mappings_from_row_values(self, row_values): | ||
super(BulkAdGroupGenreCriterion, self).process_mappings_from_row_values(row_values) | ||
row_values.convert_to_entity(self, BulkAdGroupGenreCriterion._MAPPINGS) | ||
|
||
def read_additional_data(self, stream_reader): | ||
super(BulkAdGroupGenreCriterion, self).read_additional_data(stream_reader) |
50 changes: 50 additions & 0 deletions
50
bingads/v13/bulk/entities/target_criterions/bulk_campaign_deal_criterion.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,50 @@ | ||
from bingads.v13.bulk.entities import * | ||
from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13 | ||
from bingads.v13.bulk.entities.target_criterions.bulk_campaign_biddable_criterion import BulkCampaignBiddableCriterion | ||
from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping | ||
from bingads.v13.internal.bulk.string_table import _StringTable | ||
from bingads.v13.internal.extensions import * | ||
|
||
class BulkCampaignDealCriterion(BulkCampaignBiddableCriterion): | ||
""" Represents an Campaign Deal Criterion that can be read or written in a bulk file. | ||
This class exposes the :attr:`biddable_campaign_criterion` property that can be read and written as fields of the | ||
Campaign Deal Criterion record in a bulk file. | ||
For more information, see Campaign Deal Criterion at https://go.microsoft.com/fwlink/?linkid=846127. | ||
*See also:* | ||
* :class:`.BulkServiceManager` | ||
* :class:`.BulkOperation` | ||
* :class:`.BulkFileReader` | ||
* :class:`.BulkFileWriter` | ||
""" | ||
|
||
def __init__(self, | ||
biddable_campaign_criterion=None, | ||
campaign_name=None, ): | ||
super(BulkCampaignDealCriterion, self).__init__(biddable_campaign_criterion, campaign_name) | ||
|
||
_MAPPINGS = [ | ||
_SimpleBulkMapping( | ||
_StringTable.Target, | ||
field_to_csv=lambda c: field_to_csv_DealTarget(c.biddable_campaign_criterion), | ||
csv_to_field=lambda c, v: csv_to_field_DealTarget(c.biddable_campaign_criterion, v) | ||
) | ||
] | ||
|
||
def create_criterion(self): | ||
self._biddable_campaign_criterion.Criterion = _CAMPAIGN_OBJECT_FACTORY_V13.create('DealCriterion') | ||
self._biddable_campaign_criterion.Criterion.Type = 'DealCriterion' | ||
|
||
def process_mappings_to_row_values(self, row_values, exclude_readonly_data): | ||
super(BulkCampaignDealCriterion, self).process_mappings_to_row_values(row_values, exclude_readonly_data) | ||
self.convert_to_values(row_values, BulkCampaignDealCriterion._MAPPINGS) | ||
|
||
def process_mappings_from_row_values(self, row_values): | ||
super(BulkCampaignDealCriterion, self).process_mappings_from_row_values(row_values) | ||
row_values.convert_to_entity(self, BulkCampaignDealCriterion._MAPPINGS) | ||
|
||
def read_additional_data(self, stream_reader): | ||
super(BulkCampaignDealCriterion, self).read_additional_data(stream_reader) |
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
Oops, something went wrong.