Google_LicenseAssignmentsServiceResource

The "licenseAssignments" collection of methods.

Defined (1)

The class is defined in the following location(s).

/inc/google-api-php-client/src/contrib/Google_LicensingService.php  
  1. class Google_LicenseAssignmentsServiceResource extends Google_ServiceResource { 
  2.  
  3.  
  4. /** 
  5. * Assign License. (licenseAssignments.insert) 
  6. * @param string $productId Name for product 
  7. * @param string $skuId Name for sku 
  8. * @param Google_LicenseAssignmentInsert $postBody 
  9. * @param array $optParams Optional parameters. 
  10. * @return Google_LicenseAssignment 
  11. */ 
  12. public function insert($productId, $skuId, Google_LicenseAssignmentInsert $postBody, $optParams = array()) { 
  13. $params = array('productId' => $productId, 'skuId' => $skuId, 'postBody' => $postBody); 
  14. $params = array_merge($params, $optParams); 
  15. $data = $this->__call('insert', array($params)); 
  16. if ($this->useObjects()) { 
  17. return new Google_LicenseAssignment($data); 
  18. } else { 
  19. return $data; 
  20. /** 
  21. * Get license assignment of a particular product and sku for a user (licenseAssignments.get) 
  22. * @param string $productId Name for product 
  23. * @param string $skuId Name for sku 
  24. * @param string $userId email id or unique Id of the user 
  25. * @param array $optParams Optional parameters. 
  26. * @return Google_LicenseAssignment 
  27. */ 
  28. public function get($productId, $skuId, $userId, $optParams = array()) { 
  29. $params = array('productId' => $productId, 'skuId' => $skuId, 'userId' => $userId); 
  30. $params = array_merge($params, $optParams); 
  31. $data = $this->__call('get', array($params)); 
  32. if ($this->useObjects()) { 
  33. return new Google_LicenseAssignment($data); 
  34. } else { 
  35. return $data; 
  36. /** 
  37. * List license assignments for given product and sku of the customer. 
  38. * (licenseAssignments.listForProductAndSku) 
  39. * @param string $productId Name for product 
  40. * @param string $skuId Name for sku 
  41. * @param string $customerId CustomerId represents the customer for whom licenseassignments are queried 
  42. * @param array $optParams Optional parameters. 
  43. * @opt_param string pageToken Token to fetch the next page.Optional. By default server will return first page 
  44. * @opt_param string maxResults Maximum number of campaigns to return at one time. Must be positive. Optional. Default value is 100. 
  45. * @return Google_LicenseAssignmentList 
  46. */ 
  47. public function listForProductAndSku($productId, $skuId, $customerId, $optParams = array()) { 
  48. $params = array('productId' => $productId, 'skuId' => $skuId, 'customerId' => $customerId); 
  49. $params = array_merge($params, $optParams); 
  50. $data = $this->__call('listForProductAndSku', array($params)); 
  51. if ($this->useObjects()) { 
  52. return new Google_LicenseAssignmentList($data); 
  53. } else { 
  54. return $data; 
  55. /** 
  56. * List license assignments for given product of the customer. (licenseAssignments.listForProduct) 
  57. * @param string $productId Name for product 
  58. * @param string $customerId CustomerId represents the customer for whom licenseassignments are queried 
  59. * @param array $optParams Optional parameters. 
  60. * @opt_param string pageToken Token to fetch the next page.Optional. By default server will return first page 
  61. * @opt_param string maxResults Maximum number of campaigns to return at one time. Must be positive. Optional. Default value is 100. 
  62. * @return Google_LicenseAssignmentList 
  63. */ 
  64. public function listForProduct($productId, $customerId, $optParams = array()) { 
  65. $params = array('productId' => $productId, 'customerId' => $customerId); 
  66. $params = array_merge($params, $optParams); 
  67. $data = $this->__call('listForProduct', array($params)); 
  68. if ($this->useObjects()) { 
  69. return new Google_LicenseAssignmentList($data); 
  70. } else { 
  71. return $data; 
  72. /** 
  73. * Assign License. (licenseAssignments.update) 
  74. * @param string $productId Name for product 
  75. * @param string $skuId Name for sku for which license would be revoked 
  76. * @param string $userId email id or unique Id of the user 
  77. * @param Google_LicenseAssignment $postBody 
  78. * @param array $optParams Optional parameters. 
  79. * @return Google_LicenseAssignment 
  80. */ 
  81. public function update($productId, $skuId, $userId, Google_LicenseAssignment $postBody, $optParams = array()) { 
  82. $params = array('productId' => $productId, 'skuId' => $skuId, 'userId' => $userId, 'postBody' => $postBody); 
  83. $params = array_merge($params, $optParams); 
  84. $data = $this->__call('update', array($params)); 
  85. if ($this->useObjects()) { 
  86. return new Google_LicenseAssignment($data); 
  87. } else { 
  88. return $data; 
  89. /** 
  90. * Assign License. This method supports patch semantics. (licenseAssignments.patch) 
  91. * @param string $productId Name for product 
  92. * @param string $skuId Name for sku for which license would be revoked 
  93. * @param string $userId email id or unique Id of the user 
  94. * @param Google_LicenseAssignment $postBody 
  95. * @param array $optParams Optional parameters. 
  96. * @return Google_LicenseAssignment 
  97. */ 
  98. public function patch($productId, $skuId, $userId, Google_LicenseAssignment $postBody, $optParams = array()) { 
  99. $params = array('productId' => $productId, 'skuId' => $skuId, 'userId' => $userId, 'postBody' => $postBody); 
  100. $params = array_merge($params, $optParams); 
  101. $data = $this->__call('patch', array($params)); 
  102. if ($this->useObjects()) { 
  103. return new Google_LicenseAssignment($data); 
  104. } else { 
  105. return $data; 
  106. /** 
  107. * Revoke License. (licenseAssignments.delete) 
  108. * @param string $productId Name for product 
  109. * @param string $skuId Name for sku 
  110. * @param string $userId email id or unique Id of the user 
  111. * @param array $optParams Optional parameters. 
  112. */ 
  113. public function delete($productId, $skuId, $userId, $optParams = array()) { 
  114. $params = array('productId' => $productId, 'skuId' => $skuId, 'userId' => $userId); 
  115. $params = array_merge($params, $optParams); 
  116. $data = $this->__call('delete', array($params)); 
  117. return $data;