Google_LicenseAssignmentsServiceResource
The "licenseAssignments" collection of methods.
Defined (1)
The class is defined in the following location(s).
- /src/contrib/Google_LicensingService.php
- class Google_LicenseAssignmentsServiceResource extends Google_ServiceResource {
- /**
- * Revoke License. (licenseAssignments.delete)
- *
- * @param string $productId Name for product
- * @param string $skuId Name for sku
- * @param string $userId email id or unique Id of the user
- * @param array $optParams Optional parameters.
- */
- public function delete($productId, $skuId, $userId, $optParams = array()) {
- $params = array('productId' => $productId, 'skuId' => $skuId, 'userId' => $userId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('delete', array($params));
- return $data;
- }
- /**
- * Get license assignment of a particular product and sku for a user (licenseAssignments.get)
- *
- * @param string $productId Name for product
- * @param string $skuId Name for sku
- * @param string $userId email id or unique Id of the user
- * @param array $optParams Optional parameters.
- * @return Google_LicenseAssignment
- */
- public function get($productId, $skuId, $userId, $optParams = array()) {
- $params = array('productId' => $productId, 'skuId' => $skuId, 'userId' => $userId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('get', array($params));
- if ($this->useObjects()) {
- return new Google_LicenseAssignment($data);
- } else {
- return $data;
- }
- }
- /**
- * Assign License. (licenseAssignments.insert)
- *
- * @param string $productId Name for product
- * @param string $skuId Name for sku
- * @param Google_LicenseAssignmentInsert $postBody
- * @param array $optParams Optional parameters.
- * @return Google_LicenseAssignment
- */
- public function insert($productId, $skuId, Google_LicenseAssignmentInsert $postBody, $optParams = array()) {
- $params = array('productId' => $productId, 'skuId' => $skuId, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('insert', array($params));
- if ($this->useObjects()) {
- return new Google_LicenseAssignment($data);
- } else {
- return $data;
- }
- }
- /**
- * List license assignments for given product of the customer. (licenseAssignments.listForProduct)
- *
- * @param string $productId Name for product
- * @param string $customerId CustomerId represents the customer for whom licenseassignments are queried
- * @param array $optParams Optional parameters.
- *
- * @opt_param string maxResults Maximum number of campaigns to return at one time. Must be positive. Optional. Default value is 100.
- * @opt_param string pageToken Token to fetch the next page.Optional. By default server will return first page
- * @return Google_LicenseAssignmentList
- */
- public function listForProduct($productId, $customerId, $optParams = array()) {
- $params = array('productId' => $productId, 'customerId' => $customerId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('listForProduct', array($params));
- if ($this->useObjects()) {
- return new Google_LicenseAssignmentList($data);
- } else {
- return $data;
- }
- }
- /**
- * List license assignments for given product and sku of the customer.
- * (licenseAssignments.listForProductAndSku)
- *
- * @param string $productId Name for product
- * @param string $skuId Name for sku
- * @param string $customerId CustomerId represents the customer for whom licenseassignments are queried
- * @param array $optParams Optional parameters.
- *
- * @opt_param string maxResults Maximum number of campaigns to return at one time. Must be positive. Optional. Default value is 100.
- * @opt_param string pageToken Token to fetch the next page.Optional. By default server will return first page
- * @return Google_LicenseAssignmentList
- */
- public function listForProductAndSku($productId, $skuId, $customerId, $optParams = array()) {
- $params = array('productId' => $productId, 'skuId' => $skuId, 'customerId' => $customerId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('listForProductAndSku', array($params));
- if ($this->useObjects()) {
- return new Google_LicenseAssignmentList($data);
- } else {
- return $data;
- }
- }
- /**
- * Assign License. This method supports patch semantics. (licenseAssignments.patch)
- *
- * @param string $productId Name for product
- * @param string $skuId Name for sku for which license would be revoked
- * @param string $userId email id or unique Id of the user
- * @param Google_LicenseAssignment $postBody
- * @param array $optParams Optional parameters.
- * @return Google_LicenseAssignment
- */
- public function patch($productId, $skuId, $userId, Google_LicenseAssignment $postBody, $optParams = array()) {
- $params = array('productId' => $productId, 'skuId' => $skuId, 'userId' => $userId, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('patch', array($params));
- if ($this->useObjects()) {
- return new Google_LicenseAssignment($data);
- } else {
- return $data;
- }
- }
- /**
- * Assign License. (licenseAssignments.update)
- *
- * @param string $productId Name for product
- * @param string $skuId Name for sku for which license would be revoked
- * @param string $userId email id or unique Id of the user
- * @param Google_LicenseAssignment $postBody
- * @param array $optParams Optional parameters.
- * @return Google_LicenseAssignment
- */
- public function update($productId, $skuId, $userId, Google_LicenseAssignment $postBody, $optParams = array()) {
- $params = array('productId' => $productId, 'skuId' => $skuId, 'userId' => $userId, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('update', array($params));
- if ($this->useObjects()) {
- return new Google_LicenseAssignment($data);
- } else {
- return $data;
- }
- }
- }