Google_LicenseAssignmentsServiceResource

The "licenseAssignments" collection of methods.

Defined (1)

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

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