Skip to content

Commit 2f0f8ec

Browse files
author
Eric Urban
authored
Merge pull request #108 from BingAds/v12-13-5
proxy updates
2 parents beba139 + f05235b commit 2f0f8ec

File tree

67 files changed

+387
-77
lines changed

Some content is hidden

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

67 files changed

+387
-77
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "microsoft/bingads",
3-
"description": "This project provides a set of PHP client libraries that make it easy to access Bing Ads service APIs.",
4-
"keywords": [ "php", "bingads", "bing ads", "sdk" ],
3+
"description": "This project provides the PHP client library for the SOAP-based Bing Ads API at Microsoft.",
4+
"keywords": [ "php", "bingads", "bing ads", "microsoft advertising", "sdk" ],
55
"license": "Apache-2.0",
66
"type": "library",
77
"homepage": "https://github.com/BingAds/BingAds-PHP-SDK",

samples/V13/CampaignManagementExampleHelper.php

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,8 @@ static function GetAdExtensionsAssociations(
671671
$accountId,
672672
$adExtensionType,
673673
$associationType,
674-
$entityIds)
674+
$entityIds,
675+
$returnAdditionalFields)
675676
{
676677
$GLOBALS['CampaignManagementProxy']->SetAuthorizationData($GLOBALS['AuthorizationData']);
677678
$GLOBALS['Proxy'] = $GLOBALS['CampaignManagementProxy'];
@@ -682,13 +683,15 @@ static function GetAdExtensionsAssociations(
682683
$request->AdExtensionType = $adExtensionType;
683684
$request->AssociationType = $associationType;
684685
$request->EntityIds = $entityIds;
686+
$request->ReturnAdditionalFields = $returnAdditionalFields;
685687

686688
return $GLOBALS['CampaignManagementProxy']->GetService()->GetAdExtensionsAssociations($request);
687689
}
688690
static function GetAdExtensionsByIds(
689691
$accountId,
690692
$adExtensionIds,
691-
$adExtensionType)
693+
$adExtensionType,
694+
$returnAdditionalFields)
692695
{
693696
$GLOBALS['CampaignManagementProxy']->SetAuthorizationData($GLOBALS['AuthorizationData']);
694697
$GLOBALS['Proxy'] = $GLOBALS['CampaignManagementProxy'];
@@ -698,6 +701,7 @@ static function GetAdExtensionsByIds(
698701
$request->AccountId = $accountId;
699702
$request->AdExtensionIds = $adExtensionIds;
700703
$request->AdExtensionType = $adExtensionType;
704+
$request->ReturnAdditionalFields = $returnAdditionalFields;
701705

702706
return $GLOBALS['CampaignManagementProxy']->GetService()->GetAdExtensionsByIds($request);
703707
}
@@ -3699,6 +3703,7 @@ static function OutputImageAdExtension($dataObject)
36993703
self::OutputStatusMessage(sprintf("AlternativeText: %s", $dataObject->AlternativeText));
37003704
self::OutputStatusMessage(sprintf("Description: %s", $dataObject->Description));
37013705
self::OutputStatusMessage(sprintf("DestinationUrl: %s", $dataObject->DestinationUrl));
3706+
self::OutputStatusMessage(sprintf("DisplayText: %s", $dataObject->DisplayText));
37023707
self::OutputStatusMessage("FinalAppUrls:");
37033708
self::OutputArrayOfAppUrl($dataObject->FinalAppUrls);
37043709
self::OutputStatusMessage("FinalMobileUrls:");
@@ -3708,6 +3713,8 @@ static function OutputImageAdExtension($dataObject)
37083713
self::OutputArrayOfString($dataObject->FinalUrls);
37093714
self::OutputStatusMessage("ImageMediaIds:");
37103715
self::OutputArrayOfLong($dataObject->ImageMediaIds);
3716+
self::OutputStatusMessage("Images:");
3717+
self::OutputArrayOfAssetLink($dataObject->Images);
37113718
self::OutputStatusMessage(sprintf("TrackingUrlTemplate: %s", $dataObject->TrackingUrlTemplate));
37123719
self::OutputStatusMessage("UrlCustomParameters:");
37133720
self::OutputCustomParameters($dataObject->UrlCustomParameters);
@@ -6098,6 +6105,29 @@ static function OutputArrayOfAdExtensionsTypeFilter($valueSets)
60986105
}
60996106
self::OutputStatusMessage("* * * End OutputArrayOfAdExtensionsTypeFilter * * *");
61006107
}
6108+
static function OutputAdExtensionAdditionalField($valueSet)
6109+
{
6110+
self::OutputStatusMessage("* * * Begin OutputAdExtensionAdditionalField * * *");
6111+
self::OutputStatusMessage(sprintf("Values in %s", $valueSet->type));
6112+
foreach ($valueSet->string as $value)
6113+
{
6114+
self::OutputStatusMessage($value);
6115+
}
6116+
self::OutputStatusMessage("* * * End OutputAdExtensionAdditionalField * * *");
6117+
}
6118+
static function OutputArrayOfAdExtensionAdditionalField($valueSets)
6119+
{
6120+
if(count((array)$valueSets) == 0)
6121+
{
6122+
return;
6123+
}
6124+
self::OutputStatusMessage("* * * Begin OutputArrayOfAdExtensionAdditionalField * * *");
6125+
foreach ($valueSets->AdExtensionAdditionalField as $valueSet)
6126+
{
6127+
self::OutputAdExtensionAdditionalField($valueSet);
6128+
}
6129+
self::OutputStatusMessage("* * * End OutputArrayOfAdExtensionAdditionalField * * *");
6130+
}
61016131
static function OutputAssociationType($valueSet)
61026132
{
61036133
self::OutputStatusMessage("* * * Begin OutputAssociationType * * *");

samples/V13/ReportingExampleHelper.php

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1525,6 +1525,53 @@ static function OutputArrayOfProductMatchCountReportRequest($dataObjects)
15251525
self::OutputProductMatchCountReportRequest($dataObject);
15261526
}
15271527
}
1528+
static function OutputProductNegativeKeywordConflictReportFilter($dataObject)
1529+
{
1530+
if (!empty($dataObject))
1531+
{
1532+
self::OutputStatusMessage("* * * Begin OutputProductNegativeKeywordConflictReportFilter * * *");
1533+
self::OutputStatusMessage(sprintf("AccountStatus: %s", $dataObject->AccountStatus));
1534+
self::OutputStatusMessage(sprintf("AdGroupStatus: %s", $dataObject->AdGroupStatus));
1535+
self::OutputStatusMessage(sprintf("CampaignStatus: %s", $dataObject->CampaignStatus));
1536+
self::OutputStatusMessage("* * * End OutputProductNegativeKeywordConflictReportFilter * * *");
1537+
}
1538+
}
1539+
static function OutputArrayOfProductNegativeKeywordConflictReportFilter($dataObjects)
1540+
{
1541+
if(count((array)$dataObjects) == 0 || !isset($dataObjects->ProductNegativeKeywordConflictReportFilter))
1542+
{
1543+
return;
1544+
}
1545+
foreach ($dataObjects->ProductNegativeKeywordConflictReportFilter as $dataObject)
1546+
{
1547+
self::OutputProductNegativeKeywordConflictReportFilter($dataObject);
1548+
}
1549+
}
1550+
static function OutputProductNegativeKeywordConflictReportRequest($dataObject)
1551+
{
1552+
if (!empty($dataObject))
1553+
{
1554+
self::OutputStatusMessage("* * * Begin OutputProductNegativeKeywordConflictReportRequest * * *");
1555+
self::OutputStatusMessage("Columns:");
1556+
self::OutputArrayOfProductNegativeKeywordConflictReportColumn($dataObject->Columns);
1557+
self::OutputStatusMessage("Filter:");
1558+
self::OutputProductNegativeKeywordConflictReportFilter($dataObject->Filter);
1559+
self::OutputStatusMessage("Scope:");
1560+
self::OutputAccountThroughAdGroupReportScope($dataObject->Scope);
1561+
self::OutputStatusMessage("* * * End OutputProductNegativeKeywordConflictReportRequest * * *");
1562+
}
1563+
}
1564+
static function OutputArrayOfProductNegativeKeywordConflictReportRequest($dataObjects)
1565+
{
1566+
if(count((array)$dataObjects) == 0 || !isset($dataObjects->ProductNegativeKeywordConflictReportRequest))
1567+
{
1568+
return;
1569+
}
1570+
foreach ($dataObjects->ProductNegativeKeywordConflictReportRequest as $dataObject)
1571+
{
1572+
self::OutputProductNegativeKeywordConflictReportRequest($dataObject);
1573+
}
1574+
}
15281575
static function OutputProductPartitionPerformanceReportFilter($dataObject)
15291576
{
15301577
if (!empty($dataObject))
@@ -1894,6 +1941,10 @@ static function OutputReportRequest($dataObject)
18941941
{
18951942
self::OutputProductMatchCountReportRequest($dataObject);
18961943
}
1944+
if($dataObject->Type === "ProductNegativeKeywordConflictReportRequest")
1945+
{
1946+
self::OutputProductNegativeKeywordConflictReportRequest($dataObject);
1947+
}
18971948
if($dataObject->Type === "ProductPartitionPerformanceReportRequest")
18981949
{
18991950
self::OutputProductPartitionPerformanceReportRequest($dataObject);
@@ -3288,6 +3339,29 @@ static function OutputArrayOfProductMatchCountReportColumn($valueSets)
32883339
}
32893340
self::OutputStatusMessage("* * * End OutputArrayOfProductMatchCountReportColumn * * *");
32903341
}
3342+
static function OutputProductNegativeKeywordConflictReportColumn($valueSet)
3343+
{
3344+
self::OutputStatusMessage("* * * Begin OutputProductNegativeKeywordConflictReportColumn * * *");
3345+
self::OutputStatusMessage(sprintf("Values in %s", $valueSet->type));
3346+
foreach ($valueSet->string as $value)
3347+
{
3348+
self::OutputStatusMessage($value);
3349+
}
3350+
self::OutputStatusMessage("* * * End OutputProductNegativeKeywordConflictReportColumn * * *");
3351+
}
3352+
static function OutputArrayOfProductNegativeKeywordConflictReportColumn($valueSets)
3353+
{
3354+
if(count((array)$valueSets) == 0)
3355+
{
3356+
return;
3357+
}
3358+
self::OutputStatusMessage("* * * Begin OutputArrayOfProductNegativeKeywordConflictReportColumn * * *");
3359+
foreach ($valueSets->ProductNegativeKeywordConflictReportColumn as $valueSet)
3360+
{
3361+
self::OutputProductNegativeKeywordConflictReportColumn($valueSet);
3362+
}
3363+
self::OutputStatusMessage("* * * End OutputArrayOfProductNegativeKeywordConflictReportColumn * * *");
3364+
}
32913365
static function OutputCallDetailReportColumn($valueSet)
32923366
{
32933367
self::OutputStatusMessage("* * * Begin OutputCallDetailReportColumn * * *");

src/Auth/ServiceClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ private function RefreshServiceProxy()
252252
'features' => SOAP_SINGLE_ELEMENT_ARRAYS,
253253
// Disable keep-alive to avoid 'Process open FD table is full'
254254
'keep-alive' => FALSE,
255-
'user_agent' => 'BingAdsSDKPHP ' . '12.13.4 ' . PHP_VERSION,
255+
'user_agent' => 'BingAdsSDKPHP ' . '12.13.5 ' . PHP_VERSION,
256256

257257
/**
258258
* Map long type to string type. For details, see

src/V12/CampaignManagement/CoOpSetting.php

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

55
{
66
/**
7-
* Defines the ad group level settings for feed-based cooperative bidding campaigns.
7+
* Defines the ad group level settings for feed-based Microsoft Shopping Campaigns.
88
* @link https://docs.microsoft.com/en-us/advertising/campaign-management-service/coopsetting?view=bingads-12 CoOpSetting Data Object
99
*
1010
* @uses BidOption
1111
*/
1212
final class CoOpSetting extends Setting
1313
{
1414
/**
15-
* The percentage (greater than zero) that allows your cooperative bid to flex.
15+
* The default bid boost percentage that you'll see in the Microsoft Advertising web application for new product groups.
1616
* @var double
1717
*/
1818
public $BidBoostValue;
1919

2020
/**
21-
* The flat amount of your cooperative bid.
21+
* The flat amount of your Sponsored Products bid.
2222
* @var double
2323
*/
2424
public $BidMaxValue;

src/V12/CustomerManagement/AccountInfo.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
{
66
/**
7-
* Defines an account identification object that contains information that identifies an account.
7+
* Defines an object that contains an account's identifier, name, and number.
88
* @link https://docs.microsoft.com/en-us/advertising/customer-management-service/accountinfo?view=bingads-12 AccountInfo Data Object
99
*
1010
* @uses AccountLifeCycleStatus

src/V12/CustomerManagement/AddClientLinksRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
{
66
/**
7-
* Initiates the client link process to manage the account of another customer.
7+
* Initiates the client link process to manage the accounts of another customer.
88
* @link https://docs.microsoft.com/en-us/advertising/customer-management-service/addclientlinks?view=bingads-12 AddClientLinks Request Object
99
*
1010
* @uses ClientLink

src/V12/CustomerManagement/AddClientLinksResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
{
66
/**
7-
* Initiates the client link process to manage the account of another customer.
7+
* Initiates the client link process to manage the accounts of another customer.
88
* @link https://docs.microsoft.com/en-us/advertising/customer-management-service/addclientlinks?view=bingads-12 AddClientLinks Response Object
99
*
1010
* @uses OperationError

src/V12/CustomerManagement/ClientLink.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ final class ClientLink
5858
public $InviterEmail;
5959

6060
/**
61-
* The name of the parent customer of the user who created the client link request.
61+
* The name of the parent customer of the user who created the client link request.
6262
* @var string
6363
*/
6464
public $InviterName;
@@ -70,7 +70,7 @@ final class ClientLink
7070
public $InviterPhone;
7171

7272
/**
73-
* Determines whether the owner of the client account or the managing customer is responsible for billing payments.
73+
* Determines whether the owner of the client advertiser account or the managing customer is responsible for billing payments.
7474
* @var boolean
7575
*/
7676
public $IsBillToClient;

src/V12/CustomerManagement/CustomerInfo.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
{
66
/**
7-
* Defines a customer identification object that contains information that identifies a customer.
7+
* Defines an object that contains a customer's identifier and name.
88
* @link https://docs.microsoft.com/en-us/advertising/customer-management-service/customerinfo?view=bingads-12 CustomerInfo Data Object
99
*
1010
* @used-by AdvertiserAccount

0 commit comments

Comments
 (0)