Skip to content

Commit d4fa828

Browse files
authored
Merge pull request #150 from BingAds/jianyun/13.0.9
sdk 13.0.9
2 parents 24d028e + c0ede4a commit d4fa828

File tree

78 files changed

+651
-81
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+651
-81
lines changed

samples/V13/AuthHelper.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,6 @@ final class AuthHelper {
7878

7979
static function Authenticate()
8080
{
81-
// Disable WSDL caching.
82-
ini_set("soap.wsdl_cache_enabled", "0");
83-
ini_set("soap.wsdl_cache_ttl", "0");
84-
8581
// Authenticate with a Microsoft Account.
8682
AuthHelper::AuthenticateWithOAuth();
8783

src/Auth/ServiceClient.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class ServiceClient
3131
private $service;
3232
private $namespace;
3333
private $apiEnvironment;
34+
private $options;
3435

3536
private $sandboxServiceClientEndpoints = array(
3637
ServiceClientType::AdInsightVersion13 => AdInsightServiceSettingsVersion13::SandboxEndpoint,
@@ -83,7 +84,7 @@ private function to_long_xml($longVal)
8384
return '<long>' . $longVal . '</long>';
8485
}
8586

86-
public function __construct($serviceClientType, $authorizationData, $apiEnvironment)
87+
public function __construct($serviceClientType, $authorizationData, $apiEnvironment, $options = array())
8788
{
8889
// The sandbox environment is used unless the Production environment is explicitly set.
8990

@@ -102,6 +103,7 @@ public function __construct($serviceClientType, $authorizationData, $apiEnvironm
102103

103104
$this->apiEnvironment = $apiEnvironment;
104105
$this->namespace = $this->serviceClientNamespaces[$serviceClientType];
106+
$this->options = $options;
105107

106108
$this->SetAuthorizationData($authorizationData);
107109

@@ -234,13 +236,14 @@ private function RefreshServiceProxy()
234236
* To force PHP to always return an array for an array type in the
235237
* response, specify the SOAP_SINGLE_ELEMENT_ARRAYS feature.
236238
*/
237-
$options = array(
239+
$default_options = array(
238240
'trace' => TRUE,
239241
'exceptions' => TRUE,
240242
'features' => SOAP_SINGLE_ELEMENT_ARRAYS,
241243
// Disable keep_alive to avoid 'Process open FD table is full'
242244
'keep_alive' => FALSE,
243-
'user_agent' => 'BingAdsSDKPHP ' . '13.0.1 ' . PHP_VERSION,
245+
'user_agent' => 'BingAdsSDKPHP ' . '13.0.9 ' . PHP_VERSION,
246+
'cache_wsdl' => 'WSDL_CACHE_NONE',
244247

245248
/**
246249
* Map long type to string type. For details, see
@@ -256,7 +259,9 @@ private function RefreshServiceProxy()
256259
)
257260
);
258261

259-
$proxy = @new SOAPClient($this->wsdlUrl, $options);
262+
$mergedOptions = array_merge($default_options, $this->options);
263+
264+
$proxy = @new SOAPClient($this->wsdlUrl, $mergedOptions);
260265

261266
$proxy->__setSoapHeaders($headers);
262267

src/V13/Bulk/DownloadEntity.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,20 @@ final class DownloadEntity
405405
/** Include Ad Group Flyer Ad Extension records in the download that each represent the association relationship between an ad group and a flyer ad extension. */
406406
const AdGroupFlyerAdExtensions = 'AdGroupFlyerAdExtensions';
407407

408-
/** Reserved. */
408+
/** Include Bid Strategy records in the download data. */
409409
const BidStrategies = 'BidStrategies';
410+
411+
/** Reserved. */
412+
const VideoAdExtensions = 'VideoAdExtensions';
413+
414+
/** Reserved. */
415+
const AccountVideoAdExtensions = 'AccountVideoAdExtensions';
416+
417+
/** Reserved. */
418+
const CampaignVideoAdExtensions = 'CampaignVideoAdExtensions';
419+
420+
/** Reserved. */
421+
const AdGroupVideoAdExtensions = 'AdGroupVideoAdExtensions';
410422
}
411423

412424
}

src/V13/CampaignManagement/AccountPropertyName.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ final class AccountPropertyName
3232

3333
/** Used to get or set the property that determines whether LinkedIn profile targeting expansion is enabled for the account. */
3434
const ProfileExpansionEnabled = 'ProfileExpansionEnabled';
35+
36+
/** Reserved. */
37+
const AllowCrawlImagesFromLandingPage = 'AllowCrawlImagesFromLandingPage';
3538
}
3639

3740
}

src/V13/CampaignManagement/AdAdditionalField.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ final class AdAdditionalField
1515
{
1616
/** Request that the ImpressionTrackingUrls element be included within each returned ResponsiveAd object. */
1717
const ImpressionTrackingUrls = 'ImpressionTrackingUrls';
18+
19+
/** Reserved. */
20+
const Videos = 'Videos';
1821
}
1922

2023
}

src/V13/CampaignManagement/AdExtensionsTypeFilter.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ final class AdExtensionsTypeFilter
5151

5252
/** An ad extension that enables advertisers to distribute product or store catalogues (flyers) to potential customers. */
5353
const FlyerAdExtension = 'FlyerAdExtension';
54+
55+
/** Reserved. */
56+
const VideoAdExtension = 'VideoAdExtension';
5457
}
5558

5659
}

src/V13/CampaignManagement/AdGroup.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,18 @@ final class AdGroup
137137
* @var string
138138
*/
139139
public $AdGroupType;
140+
141+
/**
142+
* Reserved.
143+
* @var Bid
144+
*/
145+
public $CpvBid;
146+
147+
/**
148+
* Reserved.
149+
* @var Bid
150+
*/
151+
public $CpmBid;
140152
}
141153

142154
}

src/V13/CampaignManagement/AdGroupAdditionalField.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ final class AdGroupAdditionalField
1717

1818
/** Request that the AdGroupType element be included within each returned AdGroup object. */
1919
const AdGroupType = 'AdGroupType';
20+
21+
/** Reserved. */
22+
const CpvBid = 'CpvBid';
23+
24+
/** Reserved. */
25+
const CpmBid = 'CpmBid';
2026
}
2127

2228
}

src/V13/CampaignManagement/AddBidStrategiesRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
{
66
/**
7-
* Defines the AddBidStrategies Service Operation.
7+
* Adds bid strategies to an account's portfolio bid strategy library.
88
* @link https://docs.microsoft.com/en-us/advertising/campaign-management-service/addbidstrategies?view=bingads-13 AddBidStrategies Request Object
99
*
1010
* @uses BidStrategy
@@ -13,7 +13,7 @@
1313
final class AddBidStrategiesRequest
1414
{
1515
/**
16-
* Reserved.
16+
* An array of BidStrategy objects to add to the account's portfolio bid strategy library.
1717
* @var BidStrategy[]
1818
*/
1919
public $BidStrategies;

src/V13/CampaignManagement/AddBidStrategiesResponse.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
{
66
/**
7-
* Defines the AddBidStrategies Service Operation.
7+
* Adds bid strategies to an account's portfolio bid strategy library.
88
* @link https://docs.microsoft.com/en-us/advertising/campaign-management-service/addbidstrategies?view=bingads-13 AddBidStrategies Response Object
99
*
1010
* @uses BatchError
@@ -13,13 +13,13 @@
1313
final class AddBidStrategiesResponse
1414
{
1515
/**
16-
* Reserved.
16+
* A list of unique system identifiers corresponding to the bid strategies that were added.
1717
* @var integer[]
1818
*/
1919
public $BidStrategyIds;
2020

2121
/**
22-
* Reserved.
22+
* An array of BatchError objects that contain details for any request items that were not successful.
2323
* @var BatchError[]
2424
*/
2525
public $PartialErrors;

0 commit comments

Comments
 (0)