PHP Class ProductService, googleads-php-lib

Author: Xie Haozhe ([email protected])
Inheritance: extends Service
显示文件 Open project: googleads/googleads-php-lib Class Usage Examples

Public Properties

Property Type Description
$classmap array Default class map for wsdl=>php
$endpoint string The endpoint of the service
$locale string
$text string

Public Methods

Method Description
__construct ( $text = null, $locale = null, $id = null, $type = null, $CriterionType = null )
__construct ( string $wsdl, array $options, $user ) Constructor using wsdl location and options array
getNamespace ( ) : string Gets the namesapce of this class
getProductsByStatement ( $statement ) : the Gets a {@link ProductPage} of {@link Product} objects that satisfy the criteria specified by given {@link Statement#query}.
getXsiTypeName ( ) : string Gets the xsi:type name of this class
performProductAction ( $productAction, $filterStatement ) : the Performs action on {@link Product} objects that satisfy the given {@link Statement}.
updateProducts ( $products ) : the Updates the specified {@link Product} objects.

Method Details

__construct() public method

public __construct ( $text = null, $locale = null, $id = null, $type = null, $CriterionType = null )

__construct() public method

Constructor using wsdl location and options array
public __construct ( string $wsdl, array $options, $user )
$wsdl string WSDL location for this service
$options array Options for the SoapClient

getNamespace() public method

Gets the namesapce of this class
public getNamespace ( ) : string
return string the namespace of this class

getProductsByStatement() public method

When using sales management, the following fields are supported for filtering and/or sorting.

PQL Property Object Property Filterable Sortable
{@code rateCardId} Rate card ID which the product is associated with Yes No
{@code status} {@link Product#status} Yes Yes
{@code lineItemType} {@link Product#lineItemType} Yes Yes
{@code productType} {@link Product#productType} Yes Yes
{@code rateType} {@link Product#rateType} Yes Yes
{@code productTemplateId} {@link Product#productTemplateId} Yes No
{@code name} {@link Product#name} Yes Yes
{@code description} {@link Product#description} Yes No
{@code id} {@link Product#id} Yes Yes
{@code lastModifiedDateTime} {@link Product#lastModifiedDateTime} Yes Yes
When using programmatic guaranteed and not sales management, the following fields are supported for filtering and/or sorting.
PQL Property Object Property Filterable Sortable
{@code status} {@link Product#status} Yes Yes
{@code rateType} {@link Product#rateType} Yes Yes
{@code name} {@link Product#name} Yes Yes
{@code id} {@link Product#id} Yes Yes
{@code lastModifiedDateTime} {@link Product#lastModifiedDateTime} Yes Yes
public getProductsByStatement ( $statement ) : the
return the products that match the given statement

getXsiTypeName() public method

Gets the xsi:type name of this class
public getXsiTypeName ( ) : string
return string the xsi:type name of this class

performProductAction() public method

Performs action on {@link Product} objects that satisfy the given {@link Statement}.
public performProductAction ( $productAction, $filterStatement ) : the
return the result of the action performed

updateProducts() public method

Note non-updatable fields will not be backfilled.
public updateProducts ( $products ) : the
return the updated products

Property Details

$classmap public_oe static_oe property

Default class map for wsdl=>php
public static array $classmap
return array

$endpoint public_oe static_oe property

The endpoint of the service
public static string $endpoint
return string

$locale public_oe property

public string $locale
return string

$text public_oe property

public string $text
return string