Skip to content

Commit e7b5d90

Browse files
authored
Merge pull request #6 from BingAds/v13.0.27
v13.0.27
2 parents 6c6b3a5 + f4b56e6 commit e7b5d90

103 files changed

Lines changed: 21699 additions & 4339 deletions

File tree

Some content is hidden

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

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,5 +175,5 @@ Logs will be generated in the base directory of the project with the request and
175175

176176
## About this package
177177

178-
- SDK Package version: `13.0.26`
179-
- Generated date: `2025-12-11T13:28:36.717081200+08:00[Asia/Shanghai]`
178+
- SDK Package version: `13.0.27`
179+
- Generated date: `2026-03-12T19:18:48.112570400+08:00[Asia/Shanghai]`

src/Api/AdInsightServiceApi.php

Lines changed: 222 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ class AdInsightServiceApi extends AbstractServiceApi
4646
'getBidLandscapeByAdGroupIds' => [
4747
'application/json',
4848
],
49+
'getBidLandscapeByCampaignIds' => [
50+
'application/json',
51+
],
4952
'getBidLandscapeByKeywordIds' => [
5053
'application/json',
5154
],
@@ -1672,6 +1675,225 @@ public function getBidLandscapeByAdGroupIdsRequest($GetBidLandscapeByAdGroupIdsR
16721675
);
16731676
}
16741677

1678+
/**
1679+
* Operation getBidLandscapeByCampaignIds
1680+
*
1681+
* @param \Microsoft\MsAds\Rest\Model\AdInsightService\GetBidLandscapeByCampaignIdsRequest $GetBidLandscapeByCampaignIdsRequest GetBidLandscapeByCampaignIdsRequest (required)
1682+
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBidLandscapeByCampaignIds'] to see the possible values for this operation
1683+
*
1684+
* @throws \Microsoft\MsAds\Rest\ApiException on non-2xx response or if the response body is not in the expected format
1685+
* @throws \InvalidArgumentException
1686+
* @return \Microsoft\MsAds\Rest\Model\AdInsightService\GetBidLandscapeByCampaignIdsResponse|\Microsoft\MsAds\Rest\Model\AdInsightService\ApplicationFault|\Microsoft\MsAds\Rest\Model\AdInsightService\ApplicationFault|\Microsoft\MsAds\Rest\Model\AdInsightService\ApplicationFault|\Microsoft\MsAds\Rest\Model\AdInsightService\ApplicationFault
1687+
*/
1688+
public function getBidLandscapeByCampaignIds($GetBidLandscapeByCampaignIdsRequest, string $contentType = self::contentTypes['getBidLandscapeByCampaignIds'][0])
1689+
{
1690+
list($response) = $this->getBidLandscapeByCampaignIdsWithHttpInfo($GetBidLandscapeByCampaignIdsRequest, $contentType);
1691+
return $response;
1692+
}
1693+
1694+
/**
1695+
* Operation getBidLandscapeByCampaignIdsWithHttpInfo
1696+
*
1697+
* @param \Microsoft\MsAds\Rest\Model\AdInsightService\GetBidLandscapeByCampaignIdsRequest $GetBidLandscapeByCampaignIdsRequest (required)
1698+
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBidLandscapeByCampaignIds'] to see the possible values for this operation
1699+
*
1700+
* @throws \Microsoft\MsAds\Rest\ApiException on non-2xx response or if the response body is not in the expected format
1701+
* @throws \InvalidArgumentException
1702+
* @return array of \Microsoft\MsAds\Rest\Model\AdInsightService\GetBidLandscapeByCampaignIdsResponse|\Microsoft\MsAds\Rest\Model\AdInsightService\ApplicationFault|\Microsoft\MsAds\Rest\Model\AdInsightService\ApplicationFault|\Microsoft\MsAds\Rest\Model\AdInsightService\ApplicationFault|\Microsoft\MsAds\Rest\Model\AdInsightService\ApplicationFault, HTTP status code, HTTP response headers (array of strings)
1703+
*/
1704+
public function getBidLandscapeByCampaignIdsWithHttpInfo($GetBidLandscapeByCampaignIdsRequest, string $contentType = self::contentTypes['getBidLandscapeByCampaignIds'][0])
1705+
{
1706+
$request = $this->getBidLandscapeByCampaignIdsRequest($GetBidLandscapeByCampaignIdsRequest, $contentType);
1707+
1708+
try {
1709+
$options = $this->createHttpClientOption();
1710+
try {
1711+
$response = $this->client->send($request, $options);
1712+
} catch (RequestException $e) {
1713+
$response = $e->getResponse();
1714+
} catch (ConnectException $e) {
1715+
throw new ApiException(
1716+
"[{$e->getCode()}] {$e->getMessage()}",
1717+
(int) $e->getCode(),
1718+
null,
1719+
null
1720+
);
1721+
}
1722+
1723+
$statusCode = $response->getStatusCode();
1724+
1725+
1726+
switch($statusCode) {
1727+
case 200:
1728+
return $this->getResponseContent($request, $response, '\Microsoft\MsAds\Rest\Model\AdInsightService\GetBidLandscapeByCampaignIdsResponse');
1729+
case 400:
1730+
return $this->getResponseContent($request, $response, '\Microsoft\MsAds\Rest\Model\AdInsightService\ApplicationFault');
1731+
case 500:
1732+
return $this->getResponseContent($request, $response, '\Microsoft\MsAds\Rest\Model\AdInsightService\ApplicationFault');
1733+
case 401:
1734+
return $this->getResponseContent($request, $response, '\Microsoft\MsAds\Rest\Model\AdInsightService\ApplicationFault');
1735+
case 403:
1736+
return $this->getResponseContent($request, $response, '\Microsoft\MsAds\Rest\Model\AdInsightService\ApplicationFault');
1737+
}
1738+
1739+
if ($statusCode < 200 || $statusCode > 299) {
1740+
throw new ApiException(
1741+
sprintf(
1742+
'[%d] Error connecting to the API (%s)',
1743+
$statusCode,
1744+
(string) $request->getUri()
1745+
),
1746+
$statusCode,
1747+
$response->getHeaders(),
1748+
(string) $response->getBody()
1749+
);
1750+
}
1751+
1752+
$returnType = '\Microsoft\MsAds\Rest\Model\AdInsightService\GetBidLandscapeByCampaignIdsResponse';
1753+
return $this->getResponseContent($request, $response, $returnType);
1754+
1755+
} catch (ApiException $e) {
1756+
switch ($e->getCode()) {
1757+
case 200:
1758+
$data = ObjectSerializer::deserialize(
1759+
$e->getResponseBody(),
1760+
'\Microsoft\MsAds\Rest\Model\AdInsightService\GetBidLandscapeByCampaignIdsResponse',
1761+
$e->getResponseHeaders()
1762+
);
1763+
$e->setResponseObject($data);
1764+
break;
1765+
case 400:
1766+
$data = ObjectSerializer::deserialize(
1767+
$e->getResponseBody(),
1768+
'\Microsoft\MsAds\Rest\Model\AdInsightService\ApplicationFault',
1769+
$e->getResponseHeaders()
1770+
);
1771+
$e->setResponseObject($data);
1772+
break;
1773+
case 500:
1774+
$data = ObjectSerializer::deserialize(
1775+
$e->getResponseBody(),
1776+
'\Microsoft\MsAds\Rest\Model\AdInsightService\ApplicationFault',
1777+
$e->getResponseHeaders()
1778+
);
1779+
$e->setResponseObject($data);
1780+
break;
1781+
case 401:
1782+
$data = ObjectSerializer::deserialize(
1783+
$e->getResponseBody(),
1784+
'\Microsoft\MsAds\Rest\Model\AdInsightService\ApplicationFault',
1785+
$e->getResponseHeaders()
1786+
);
1787+
$e->setResponseObject($data);
1788+
break;
1789+
case 403:
1790+
$data = ObjectSerializer::deserialize(
1791+
$e->getResponseBody(),
1792+
'\Microsoft\MsAds\Rest\Model\AdInsightService\ApplicationFault',
1793+
$e->getResponseHeaders()
1794+
);
1795+
$e->setResponseObject($data);
1796+
break;
1797+
}
1798+
throw $e;
1799+
}
1800+
}
1801+
1802+
/**
1803+
* Operation getBidLandscapeByCampaignIdsAsync
1804+
*
1805+
* @param \Microsoft\MsAds\Rest\Model\AdInsightService\GetBidLandscapeByCampaignIdsRequest $GetBidLandscapeByCampaignIdsRequest (required)
1806+
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBidLandscapeByCampaignIds'] to see the possible values for this operation
1807+
*
1808+
* @throws \InvalidArgumentException
1809+
* @return \GuzzleHttp\Promise\PromiseInterface
1810+
*/
1811+
public function getBidLandscapeByCampaignIdsAsync($GetBidLandscapeByCampaignIdsRequest, string $contentType = self::contentTypes['getBidLandscapeByCampaignIds'][0])
1812+
{
1813+
return $this->getBidLandscapeByCampaignIdsAsyncWithHttpInfo($GetBidLandscapeByCampaignIdsRequest, $contentType)
1814+
->then(
1815+
function ($response) {
1816+
return $response[0];
1817+
}
1818+
);
1819+
}
1820+
1821+
/**
1822+
* Operation getBidLandscapeByCampaignIdsAsyncWithHttpInfo
1823+
*
1824+
* @param \Microsoft\MsAds\Rest\Model\AdInsightService\GetBidLandscapeByCampaignIdsRequest $GetBidLandscapeByCampaignIdsRequest (required)
1825+
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBidLandscapeByCampaignIds'] to see the possible values for this operation
1826+
*
1827+
* @throws \InvalidArgumentException
1828+
* @return \GuzzleHttp\Promise\PromiseInterface
1829+
*/
1830+
public function getBidLandscapeByCampaignIdsAsyncWithHttpInfo($GetBidLandscapeByCampaignIdsRequest, string $contentType = self::contentTypes['getBidLandscapeByCampaignIds'][0])
1831+
{
1832+
$returnType = '\Microsoft\MsAds\Rest\Model\AdInsightService\GetBidLandscapeByCampaignIdsResponse';
1833+
$request = $this->getBidLandscapeByCampaignIdsRequest($GetBidLandscapeByCampaignIdsRequest, $contentType);
1834+
1835+
return $this->client
1836+
->sendAsync($request, $this->createHttpClientOption())
1837+
->then(
1838+
function ($response) use ($returnType) {
1839+
return $this->onFulfilledResponse($response, $returnType);
1840+
},
1841+
function ($exception) {
1842+
$this->onRejectedResponse($exception);
1843+
}
1844+
);
1845+
}
1846+
1847+
/**
1848+
* Create request for operation 'getBidLandscapeByCampaignIds'
1849+
*
1850+
* @param \Microsoft\MsAds\Rest\Model\AdInsightService\GetBidLandscapeByCampaignIdsRequest $GetBidLandscapeByCampaignIdsRequest (required)
1851+
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBidLandscapeByCampaignIds'] to see the possible values for this operation
1852+
*
1853+
* @throws \InvalidArgumentException
1854+
* @return \GuzzleHttp\Psr7\Request
1855+
*/
1856+
public function getBidLandscapeByCampaignIdsRequest($GetBidLandscapeByCampaignIdsRequest, string $contentType = self::contentTypes['getBidLandscapeByCampaignIds'][0])
1857+
{
1858+
1859+
// verify the required parameter 'GetBidLandscapeByCampaignIdsRequest' is set
1860+
if ($GetBidLandscapeByCampaignIdsRequest === null || (is_array($GetBidLandscapeByCampaignIdsRequest) && count($GetBidLandscapeByCampaignIdsRequest) === 0)) {
1861+
throw new \InvalidArgumentException(
1862+
'Missing the required parameter $GetBidLandscapeByCampaignIdsRequest when calling getBidLandscapeByCampaignIds'
1863+
);
1864+
}
1865+
1866+
1867+
$resourcePath = '/AdInsight/v13/BidLandscape/queryByCampaignIds';
1868+
$formParams = [];
1869+
$queryParams = [];
1870+
$headerParams = [];
1871+
$multipart = false;
1872+
1873+
$headers = $this->headerSelector->selectHeaders(
1874+
['application/json', ],
1875+
$contentType,
1876+
$multipart
1877+
);
1878+
1879+
return $this->setupAndSendRequest(
1880+
'POST',
1881+
$resourcePath,
1882+
$headers,
1883+
$headerParams,
1884+
$GetBidLandscapeByCampaignIdsRequest,
1885+
$formParams,
1886+
$multipart,
1887+
true,
1888+
true,
1889+
false,
1890+
'getHostSettingsForgetBidLandscapeByCampaignIds',
1891+
null,
1892+
[],
1893+
$queryParams
1894+
);
1895+
}
1896+
16751897
/**
16761898
* Operation getBidLandscapeByKeywordIds
16771899
*

0 commit comments

Comments
 (0)