class Products extends Resource (View source)

The "products" collection of methods.

Typical usage is:

 $androidenterpriseService = new Google\Service\AndroidEnterprise(...);
 $products = $androidenterpriseService->products;

Methods

approve(string $enterpriseId, string $productId, ProductsApproveRequest $postBody, array $optParams = [])

Approves the specified product and the relevant app permissions, if any. The maximum number of products that you can approve per enterprise customer is 1,000. To learn how to use managed Google Play to design and create a store layout to display approved products to your users, see Store Layout Design.

generateApprovalUrl(string $enterpriseId, string $productId, array $optParams = [])

Generates a URL that can be rendered in an iframe to display the permissions (if any) of a product. An enterprise admin must view these permissions and accept them on behalf of their organization in order to approve that product.

get(string $enterpriseId, string $productId, array $optParams = [])

Retrieves details of a product for display to an enterprise admin.

getAppRestrictionsSchema(string $enterpriseId, string $productId, array $optParams = [])

Retrieves the schema that defines the configurable properties for this product. All products have a schema, but this schema may be empty if no managed configurations have been defined. This schema can be used to populate a UI that allows an admin to configure the product. To apply a managed configuration based on the schema obtained using this API, see Managed Configurations through Play. (products.getAppRestrictionsSchema)

getPermissions(string $enterpriseId, string $productId, array $optParams = [])

Retrieves the Android app permissions required by this app.

listProducts(string $enterpriseId, array $optParams = [])

Finds approved products that match a query, or all approved products if there is no query. Note: This item has been deprecated. New integrations cannot use this method and can refer to our new recommendations.

unapprove(string $enterpriseId, string $productId, array $optParams = [])

Unapproves the specified product (and the relevant app permissions, if any) Note: This item has been deprecated. New integrations cannot use this method and can refer to our new recommendations. (products.unapprove)

Details

approve(string $enterpriseId, string $productId, ProductsApproveRequest $postBody, array $optParams = [])

Approves the specified product and the relevant app permissions, if any. The maximum number of products that you can approve per enterprise customer is 1,000. To learn how to use managed Google Play to design and create a store layout to display approved products to your users, see Store Layout Design.

Note: This item has been deprecated. New integrations cannot use this method and can refer to our new recommendations. (products.approve)

Parameters

string $enterpriseId

The ID of the enterprise.

string $productId

The ID of the product.

ProductsApproveRequest $postBody
array $optParams

Optional parameters.

Exceptions

Exception

ProductsGenerateApprovalUrlResponse generateApprovalUrl(string $enterpriseId, string $productId, array $optParams = [])

Generates a URL that can be rendered in an iframe to display the permissions (if any) of a product. An enterprise admin must view these permissions and accept them on behalf of their organization in order to approve that product.

Admins should accept the displayed permissions by interacting with a separate UI element in the EMM console, which in turn should trigger the use of this URL as the approvalUrlInfo.approvalUrl property in a Products.approve call to approve the product. This URL can only be used to display permissions for up to 1 day. Note: This item has been deprecated. New integrations cannot use this method and can refer to our new recommendations. (products.generateApprovalUrl)

Parameters

string $enterpriseId

The ID of the enterprise.

string $productId

The ID of the product.

array $optParams

Optional parameters.

Return Value

ProductsGenerateApprovalUrlResponse

Exceptions

Exception

Product get(string $enterpriseId, string $productId, array $optParams = [])

Retrieves details of a product for display to an enterprise admin.

(products.get)

Parameters

string $enterpriseId

The ID of the enterprise.

string $productId

The ID of the product, e.g. "app:com.google.android.gm".

array $optParams

Optional parameters.

Return Value

Product

Exceptions

Exception

AppRestrictionsSchema getAppRestrictionsSchema(string $enterpriseId, string $productId, array $optParams = [])

Retrieves the schema that defines the configurable properties for this product. All products have a schema, but this schema may be empty if no managed configurations have been defined. This schema can be used to populate a UI that allows an admin to configure the product. To apply a managed configuration based on the schema obtained using this API, see Managed Configurations through Play. (products.getAppRestrictionsSchema)

Parameters

string $enterpriseId

The ID of the enterprise.

string $productId

The ID of the product.

array $optParams

Optional parameters.

Return Value

AppRestrictionsSchema

Exceptions

Exception

ProductPermissions getPermissions(string $enterpriseId, string $productId, array $optParams = [])

Retrieves the Android app permissions required by this app.

(products.getPermissions)

Parameters

string $enterpriseId

The ID of the enterprise.

string $productId

The ID of the product.

array $optParams

Optional parameters.

Return Value

ProductPermissions

Exceptions

Exception

ProductsListResponse listProducts(string $enterpriseId, array $optParams = [])

Finds approved products that match a query, or all approved products if there is no query. Note: This item has been deprecated. New integrations cannot use this method and can refer to our new recommendations.

(products.listProducts)

Parameters

string $enterpriseId

The ID of the enterprise.

array $optParams

Optional parameters.

Return Value

ProductsListResponse

Exceptions

Exception

unapprove(string $enterpriseId, string $productId, array $optParams = [])

Unapproves the specified product (and the relevant app permissions, if any) Note: This item has been deprecated. New integrations cannot use this method and can refer to our new recommendations. (products.unapprove)

Parameters

string $enterpriseId

The ID of the enterprise.

string $productId

The ID of the product.

array $optParams

Optional parameters.

Exceptions

Exception