class LicenseAssignments extends Resource (View source)

The "licenseAssignments" collection of methods.

Typical usage is:

 $licensingService = new Google\Service\Licensing(...);
 $licenseAssignments = $licensingService->licenseAssignments;

Methods

delete(string $productId, string $skuId, string $userId, array $optParams = [])

Revoke a license. (licenseAssignments.delete)

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

Get a specific user's license by product SKU. (licenseAssignments.get)

insert(string $productId, string $skuId, LicenseAssignmentInsert $postBody, array $optParams = [])

Assign a license. (licenseAssignments.insert)

listForProduct(string $productId, string $customerId, array $optParams = [])

List all users assigned licenses for a specific product SKU.

listForProductAndSku(string $productId, string $skuId, string $customerId, array $optParams = [])

List all users assigned licenses for a specific product SKU.

patch(string $productId, string $skuId, string $userId, LicenseAssignment $postBody, array $optParams = [])

Reassign a user's product SKU with a different SKU in the same product. This method supports patch semantics. (licenseAssignments.patch)

update(string $productId, string $skuId, string $userId, LicenseAssignment $postBody, array $optParams = [])

Reassign a user's product SKU with a different SKU in the same product.

Details

LicensingEmpty delete(string $productId, string $skuId, string $userId, array $optParams = [])

Revoke a license. (licenseAssignments.delete)

Parameters

string $productId

A product's unique identifier. For more information about products in this version of the API, see Products and SKUs.

string $skuId

A product SKU's unique identifier. For more information about available SKUs in this version of the API, see Products and SKUs.

string $userId

The user's current primary email address. If the user's email address changes, use the new email address in your API requests. Since a userId is subject to change, do not use a userId value as a key for persistent data. This key could break if the current user's email address changes. If the userId is suspended, the license status changes.

array $optParams

Optional parameters.

Return Value

LicensingEmpty

Exceptions

Exception

LicenseAssignment get(string $productId, string $skuId, string $userId, array $optParams = [])

Get a specific user's license by product SKU. (licenseAssignments.get)

Parameters

string $productId

A product's unique identifier. For more information about products in this version of the API, see Products and SKUs.

string $skuId

A product SKU's unique identifier. For more information about available SKUs in this version of the API, see Products and SKUs.

string $userId

The user's current primary email address. If the user's email address changes, use the new email address in your API requests. Since a userId is subject to change, do not use a userId value as a key for persistent data. This key could break if the current user's email address changes. If the userId is suspended, the license status changes.

array $optParams

Optional parameters.

Return Value

LicenseAssignment

Exceptions

Exception

LicenseAssignment insert(string $productId, string $skuId, LicenseAssignmentInsert $postBody, array $optParams = [])

Assign a license. (licenseAssignments.insert)

Parameters

string $productId

A product's unique identifier. For more information about products in this version of the API, see Products and SKUs.

string $skuId

A product SKU's unique identifier. For more information about available SKUs in this version of the API, see Products and SKUs.

LicenseAssignmentInsert $postBody
array $optParams

Optional parameters.

Return Value

LicenseAssignment

Exceptions

Exception

LicenseAssignmentList listForProduct(string $productId, string $customerId, array $optParams = [])

List all users assigned licenses for a specific product SKU.

(licenseAssignments.listForProduct)

Parameters

string $productId

A product's unique identifier. For more information about products in this version of the API, see Products and SKUs.

string $customerId

The customer's unique ID as defined in the Admin console, such as C00000000. If the customer is suspended, the server returns an error.

array $optParams

Optional parameters.

Return Value

LicenseAssignmentList

Exceptions

Exception

LicenseAssignmentList listForProductAndSku(string $productId, string $skuId, string $customerId, array $optParams = [])

List all users assigned licenses for a specific product SKU.

(licenseAssignments.listForProductAndSku)

Parameters

string $productId

A product's unique identifier. For more information about products in this version of the API, see Products and SKUs.

string $skuId

A product SKU's unique identifier. For more information about available SKUs in this version of the API, see Products and SKUs.

string $customerId

The customer's unique ID as defined in the Admin console, such as C00000000. If the customer is suspended, the server returns an error.

array $optParams

Optional parameters.

Return Value

LicenseAssignmentList

Exceptions

Exception

LicenseAssignment patch(string $productId, string $skuId, string $userId, LicenseAssignment $postBody, array $optParams = [])

Reassign a user's product SKU with a different SKU in the same product. This method supports patch semantics. (licenseAssignments.patch)

Parameters

string $productId

A product's unique identifier. For more information about products in this version of the API, see Products and SKUs.

string $skuId

A product SKU's unique identifier. For more information about available SKUs in this version of the API, see Products and SKUs.

string $userId

The user's current primary email address. If the user's email address changes, use the new email address in your API requests. Since a userId is subject to change, do not use a userId value as a key for persistent data. This key could break if the current user's email address changes. If the userId is suspended, the license status changes.

LicenseAssignment $postBody
array $optParams

Optional parameters.

Return Value

LicenseAssignment

Exceptions

Exception

LicenseAssignment update(string $productId, string $skuId, string $userId, LicenseAssignment $postBody, array $optParams = [])

Reassign a user's product SKU with a different SKU in the same product.

(licenseAssignments.update)

Parameters

string $productId

A product's unique identifier. For more information about products in this version of the API, see Products and SKUs.

string $skuId

A product SKU's unique identifier. For more information about available SKUs in this version of the API, see Products and SKUs.

string $userId

The user's current primary email address. If the user's email address changes, use the new email address in your API requests. Since a userId is subject to change, do not use a userId value as a key for persistent data. This key could break if the current user's email address changes. If the userId is suspended, the license status changes.

LicenseAssignment $postBody
array $optParams

Optional parameters.

Return Value

LicenseAssignment

Exceptions

Exception