本文整理汇总了PHP中AdWordsSoapClient类的典型用法代码示例。如果您正苦于以下问题:PHP AdWordsSoapClient类的具体用法?PHP AdWordsSoapClient怎么用?PHP AdWordsSoapClient使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了AdWordsSoapClient类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: UpdateFeedMappings
/**
* Updates the FeedMapping for the Feed to include AttributeFieldMappings for
* the new line 1 and line 2 FeedAttributes.
*
* @param AdWordsSoapClient $feedMappingService the feed mapping service
* @param string $feedId the feedId to attach the items to.
* @param FeedAttribute $line1Attribute the FeedAttribute for line 1 description
* @param FeedAttribute $line2Attribute the FeedAttribute for line 2 description
*/
function UpdateFeedMappings(AdWordsSoapClient $feedMappingService, $feedId, $line1Attribute, $line2Attribute)
{
$selector = new Selector();
$selector->fields = array('FeedId', 'FeedMappingId', 'PlaceholderType', 'AttributeFieldMappings');
$selector->predicates = array();
$selector->predicates[0] = new Predicate('FeedId', 'EQUALS', array($feedId));
$selector->predicates[1] = new Predicate('Status', 'EQUALS', array('ACTIVE'));
$feedMapping = $feedMappingService->get($selector)->entries[0];
// Remove the existing mapping (FeedMapping is immutable).
$feedMapping = $feedMappingService->mutate(array(new FeedMappingOperation($feedMapping, 'REMOVE')))->value[0];
// Create line 1 and line 2 attribute field mappings.
$line1FieldMapping = new AttributeFieldMapping();
$line1FieldMapping->feedAttributeId = $line1Attribute->id;
$line1FieldMapping->fieldId = PLACEHOLDER_FIELD_LINE_1_TEXT;
$line2FieldMapping = new AttributeFieldMapping();
$line2FieldMapping->feedAttributeId = $line2Attribute->id;
$line2FieldMapping->fieldId = PLACEHOLDER_FIELD_LINE_2_TEXT;
// Combine the existing field mappings with the new mappings.
$feedMapping->attributeFieldMappings = array_merge($feedMapping->attributeFieldMappings, array($line1FieldMapping, $line2FieldMapping));
$response = $feedMappingService->mutate(array(new FeedMappingOperation($feedMapping, 'ADD')));
$mutatedMapping = $response->value[0];
printf("Updated field mappings for feedId %d and feedMappingId %d to:\n", $mutatedMapping->feedId, $mutatedMapping->feedMappingId);
foreach ($mutatedMapping->attributeFieldMappings as $fieldMapping) {
printf(" feedAttributeId %s --> fieldId %s\n", $fieldMapping->feedAttributeId, $fieldMapping->fieldId);
}
}
示例2: __doRequest
public function __doRequest($request, $location = NULL, $action = NULL, $version = NULL, $one_way = 0)
{
if (!$location) {
$location = $this->location;
}
if (!$version) {
$version = $this->_soap_version;
}
return parent::__doRequest($request, $location, $action, $version, $one_way);
}
示例3: __construct
/**
* Constructor using wsdl location and options array
* @param string $wsdl WSDL location for this service
* @param array $options Options for the SoapClient
*/
public function __construct($wsdl = null, $options, $user)
{
$options["classmap"] = VideoCampaignCriterionService::$classmap;
parent::__construct($wsdl, $options, $user, 'VideoCampaignCriterionService', 'https://adwords.google.com/api/adwords/video/v201302');
}
示例4: __construct
/**
* Constructor using wsdl location and options array
* @param string $wsdl WSDL location for this service
* @param array $options Options for the SoapClient
*/
public function __construct($wsdl = null, $options, $user)
{
$options["classmap"] = CustomerSyncService::$classmap;
parent::__construct($wsdl, $options, $user, 'CustomerSyncService', 'https://adwords.google.com/api/adwords/ch/v201309');
}
示例5: __construct
/**
* Constructor using wsdl location and options array
* @param string $wsdl WSDL location for this service
* @param array $options Options for the SoapClient
*/
public function __construct($wsdl = null, $options, $user)
{
$options["classmap"] = SharedCriterionService::$classmap;
parent::__construct($wsdl, $options, $user, 'SharedCriterionService', 'https://adwords.google.com/api/adwords/cm/v201306');
}
示例6: __construct
/**
* Constructor using wsdl location and options array
* @param string $wsdl WSDL location for this service
* @param array $options Options for the SoapClient
*/
public function __construct($wsdl = null, $options, $user)
{
$options["classmap"] = ReportDefinitionService::$classmap;
parent::__construct($wsdl, $options, $user, 'ReportDefinitionService', 'https://adwords.google.com/api/adwords/cm/v201209');
}
示例7: __construct
/**
* Constructor using wsdl location and options array
* @param string $wsdl WSDL location for this service
* @param array $options Options for the SoapClient
*/
public function __construct($wsdl = null, $options, $user)
{
$options["classmap"] = CampaignSharedSetService::$classmap;
parent::__construct($wsdl, $options, $user, 'CampaignSharedSetService', 'https://adwords.google.com/api/adwords/cm/v201309');
}
示例8: __construct
/**
* Constructor using wsdl location and options array
* @param string $wsdl WSDL location for this service
* @param array $options Options for the SoapClient
*/
public function __construct($wsdl = null, $options, $user)
{
$options["classmap"] = ConversionTrackerService::$classmap;
parent::__construct($wsdl, $options, $user, 'ConversionTrackerService', 'https://adwords.google.com/api/adwords/cm/v201309');
}
示例9: __construct
/**
* Constructor using wsdl location and options array
* @param string $wsdl WSDL location for this service
* @param array $options Options for the SoapClient
*/
public function __construct($wsdl = null, $options, $user)
{
$options["classmap"] = BiddingStrategyService::$classmap;
parent::__construct($wsdl, $options, $user, 'BiddingStrategyService', 'https://adwords.google.com/api/adwords/cm/v201306');
}
示例10: __construct
/**
* Constructor using wsdl location and options array
* @param string $wsdl WSDL location for this service
* @param array $options Options for the SoapClient
*/
public function __construct($wsdl = null, $options, $user)
{
$options["classmap"] = BudgetOrderService::$classmap;
parent::__construct($wsdl, $options, $user, 'BudgetOrderService', 'https://adwords.google.com/api/adwords/billing/v201309');
}
示例11: __construct
/**
* Constructor using wsdl location and options array
* @param string $wsdl WSDL location for this service
* @param array $options Options for the SoapClient
*/
public function __construct($wsdl = null, $options, $user)
{
$options["classmap"] = ManagedCustomerService::$classmap;
parent::__construct($wsdl, $options, $user, 'ManagedCustomerService', 'https://adwords.google.com/api/adwords/mcm/v201302');
}
示例12: __construct
/**
* Constructor using wsdl location and options array
* @param string $wsdl WSDL location for this service
* @param array $options Options for the SoapClient
*/
public function __construct($wsdl = null, $options, $user)
{
$options["classmap"] = PromotionService::$classmap;
parent::__construct($wsdl, $options, $user, 'PromotionService', 'https://adwords.google.com/api/adwords/express/v201309');
}
示例13: __construct
/**
* Constructor using wsdl location and options array
* @param string $wsdl WSDL location for this service
* @param array $options Options for the SoapClient
*/
public function __construct($wsdl = null, $options, $user)
{
$options["classmap"] = AdwordsUserListService::$classmap;
parent::__construct($wsdl, $options, $user, 'AdwordsUserListService', 'https://adwords.google.com/api/adwords/rm/v201309');
}
示例14: __construct
/**
* Constructor using wsdl location and options array
* @param string $wsdl WSDL location for this service
* @param array $options Options for the SoapClient
*/
public function __construct($wsdl = null, $options, $user)
{
$options["classmap"] = InfoService::$classmap;
parent::__construct($wsdl, $options, $user, 'InfoService', 'https://adwords.google.com/api/adwords/info/v201209');
}
示例15: __construct
/**
* Constructor using wsdl location and options array
* @param string $wsdl WSDL location for this service
* @param array $options Options for the SoapClient
*/
public function __construct($wsdl = null, $options, $user)
{
$options["classmap"] = ExperimentService::$classmap;
parent::__construct($wsdl, $options, $user, 'ExperimentService', 'https://adwords.google.com/api/adwords/cm/v201302');
}