-
Notifications
You must be signed in to change notification settings - Fork 165
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 #213 from BingAds/users/qitia/v13.0.14
v13.0.14
- Loading branch information
Showing
26 changed files
with
4,066 additions
and
368 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.13' | ||
VERSION = '13.0.14' | ||
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
150 changes: 150 additions & 0 deletions
150
bingads/v13/bulk/entities/bulk_ad_customizer_attribute.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,150 @@ | ||
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 BulkAdCustomizerAttribute(_SingleRecordBulkEntity): | ||
""" Represents an AdCustomizerAttribute. | ||
Properties of this class and of classes that it is derived from, correspond to fields of the AdCustomizerAttribute record in a bulk file. | ||
For more information, see AdCustomizerAttribute at https://go.microsoft.com/fwlink/?linkid=846127 | ||
*See also:* | ||
* :class:`.BulkServiceManager` | ||
* :class:`.BulkOperation` | ||
* :class:`.BulkFileReader` | ||
* :class:`.BulkFileWriter` | ||
""" | ||
|
||
def __init__(self, id = None, name=None, account_value=None, data_type=None, editorial_status = None, status=None): | ||
super(BulkAdCustomizerAttribute, self).__init__() | ||
self._id = id | ||
self._name = name | ||
self._account_value = account_value | ||
self._data_type = data_type | ||
self._editorial_status = editorial_status | ||
self._status = status | ||
|
||
|
||
@property | ||
def id(self): | ||
""" the id of bulk record | ||
Corresponds to the 'Id' field in the bulk file. | ||
:rtype: str | ||
""" | ||
return self._id | ||
|
||
@id.setter | ||
def id(self, value): | ||
self._id = value | ||
|
||
@property | ||
def name(self): | ||
""" the name of the ad customizer attribute | ||
Corresponds to the 'Name' field in the bulk file. | ||
:rtype: str | ||
""" | ||
return self._name | ||
|
||
@name.setter | ||
def name(self, value): | ||
self._name = value | ||
|
||
@property | ||
def account_value(self): | ||
""" the value of the account of ad customizer attribute | ||
Corresponds to the 'AdCustomizer AttributeValue' field in the bulk file. | ||
:rtype: str | ||
""" | ||
return self._account_value | ||
|
||
@account_value.setter | ||
def account_value(self, value): | ||
self._account_value = value | ||
|
||
@property | ||
def data_type(self): | ||
""" the data type of ad customizer attribute | ||
Corresponds to the 'AdCustomizer DataType' field in the bulk file. | ||
:rtype: str | ||
""" | ||
return self._data_type | ||
|
||
@data_type.setter | ||
def data_type(self, value): | ||
self._data_type = value | ||
|
||
@property | ||
def editorial_status(self): | ||
""" the editorial status of ad customizer attribute | ||
Corresponds to the 'Editorial Status' field in the bulk file. | ||
:rtype: str | ||
""" | ||
return self._editorial_status | ||
|
||
@editorial_status.setter | ||
def editorial_status(self, value): | ||
self._editorial_status = value | ||
|
||
@property | ||
def status(self): | ||
""" the status of ad customizer attribute | ||
Corresponds to the 'Status' field in the bulk file. | ||
:rtype: str | ||
""" | ||
return self._status | ||
|
||
@status.setter | ||
def status(self, value): | ||
self._status = value | ||
|
||
_MAPPINGS = [ | ||
_SimpleBulkMapping( | ||
header=_StringTable.Id, | ||
field_to_csv=lambda c: bulk_str(c.id), | ||
csv_to_field=lambda c, v: setattr(c, 'id', v) | ||
), | ||
_SimpleBulkMapping( | ||
header=_StringTable.Name, | ||
field_to_csv=lambda c: bulk_str(c.name), | ||
csv_to_field=lambda c, v: setattr(c, 'name', v) | ||
), | ||
_SimpleBulkMapping( | ||
header=_StringTable.AdCustomizerAttributeValue, | ||
field_to_csv=lambda c: bulk_str(c.account_value), | ||
csv_to_field=lambda c, v: setattr(c, 'account_value', v) | ||
), | ||
_SimpleBulkMapping( | ||
header=_StringTable.AdCustomizerDataType, | ||
field_to_csv=lambda c: bulk_str(c.data_type), | ||
csv_to_field=lambda c, v: setattr(c, 'data_type', v) | ||
), | ||
_SimpleBulkMapping( | ||
header=_StringTable.EditorialStatus, | ||
field_to_csv=lambda c: bulk_str(c.editorial_status), | ||
csv_to_field=lambda c, v: setattr(c, 'editorial_status', v) | ||
), | ||
_SimpleBulkMapping( | ||
header=_StringTable.Status, | ||
field_to_csv=lambda c: c.status, | ||
csv_to_field=lambda c, v: setattr(c, 'status', v) | ||
), | ||
] | ||
|
||
def process_mappings_from_row_values(self, row_values): | ||
row_values.convert_to_entity(self, BulkAdCustomizerAttribute._MAPPINGS) | ||
|
||
def process_mappings_to_row_values(self, row_values, exclude_readonly_data): | ||
self.convert_to_values(row_values, BulkAdCustomizerAttribute._MAPPINGS) | ||
|
||
def read_additional_data(self, stream_reader): | ||
super(BulkAdCustomizerAttribute, self).read_additional_data(stream_reader) |
36 changes: 36 additions & 0 deletions
36
bingads/v13/bulk/entities/bulk_ad_customizer_attribute_ad_group.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,36 @@ | ||
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 * | ||
|
||
from. import BulkAdCustomizerAttributeEntityBase | ||
|
||
class BulkAdGroupAdCustomizerAttribute(BulkAdCustomizerAttributeEntityBase): | ||
""" Represents an AdGroupAdCustomizerAttribute. | ||
*See also:* | ||
* :class:`.BulkServiceManager` | ||
* :class:`.BulkOperation` | ||
* :class:`.BulkFileReader` | ||
* :class:`.BulkFileWriter` | ||
""" | ||
|
||
def __init__(self, id = None, name=None, parent_id=None, attribute_value=None, editorial_status = None): | ||
super(BulkAdGroupAdCustomizerAttribute, self).__init__(id, name, parent_id, attribute_value, editorial_status) | ||
|
||
|
||
@property | ||
def ad_group_id(self): | ||
""" the ad group id of bulk record | ||
Corresponds to the 'ParentId' field in the bulk file. | ||
:rtype: str | ||
""" | ||
return self._parent_id | ||
|
||
@ad_group_id.setter | ||
def ad_group_id(self, value): | ||
self._parent_id = value | ||
|
37 changes: 37 additions & 0 deletions
37
bingads/v13/bulk/entities/bulk_ad_customizer_attribute_campaign.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,37 @@ | ||
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 * | ||
|
||
from. import BulkAdCustomizerAttributeEntityBase | ||
|
||
|
||
class BulkCampaignAdCustomizerAttribute(BulkAdCustomizerAttributeEntityBase): | ||
""" Represents a CampaignAdCustomizerAttribute. | ||
*See also:* | ||
* :class:`.BulkServiceManager` | ||
* :class:`.BulkOperation` | ||
* :class:`.BulkFileReader` | ||
* :class:`.BulkFileWriter` | ||
""" | ||
|
||
def __init__(self, id = None, name=None, parent_id=None, attribute_value=None, editorial_status = None): | ||
super(BulkCampaignAdCustomizerAttribute, self).__init__(id, name, parent_id, attribute_value, editorial_status) | ||
|
||
|
||
@property | ||
def campaign_id(self): | ||
""" the campaign id of bulk record | ||
Corresponds to the 'ParentId' field in the bulk file. | ||
:rtype: str | ||
""" | ||
return self._parent_id | ||
|
||
@campaign_id.setter | ||
def campaign_id(self, value): | ||
self._parent_id = value | ||
|
Oops, something went wrong.