Google_SubscriptionsServiceResource

The "subscriptions" collection of methods.

Defined (2)

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

/google-api-php-client/src/contrib/Google_MirrorService.php  
  1. class Google_SubscriptionsServiceResource extends Google_ServiceResource { 
  2.  
  3. /** 
  4. * Deletes a subscription. (subscriptions.delete) 
  5. * @param string $id The ID of the subscription. 
  6. * @param array $optParams Optional parameters. 
  7. */ 
  8. public function delete($id, $optParams = array()) { 
  9. $params = array('id' => $id); 
  10. $params = array_merge($params, $optParams); 
  11. $data = $this->__call('delete', array($params)); 
  12. return $data; 
  13. /** 
  14. * Creates a new subscription. (subscriptions.insert) 
  15. * @param Google_Subscription $postBody 
  16. * @param array $optParams Optional parameters. 
  17. * @return Google_Subscription 
  18. */ 
  19. public function insert(Google_Subscription $postBody, $optParams = array()) { 
  20. $params = array('postBody' => $postBody); 
  21. $params = array_merge($params, $optParams); 
  22. $data = $this->__call('insert', array($params)); 
  23. if ($this->useObjects()) { 
  24. return new Google_Subscription($data); 
  25. } else { 
  26. return $data; 
  27. /** 
  28. * Retrieves a list of subscriptions for the authenticated user and service. 
  29. * (subscriptions.list) 
  30. * @param array $optParams Optional parameters. 
  31. * @return Google_SubscriptionsListResponse 
  32. */ 
  33. public function listSubscriptions($optParams = array()) { 
  34. $params = array(); 
  35. $params = array_merge($params, $optParams); 
  36. $data = $this->__call('list', array($params)); 
  37. if ($this->useObjects()) { 
  38. return new Google_SubscriptionsListResponse($data); 
  39. } else { 
  40. return $data; 
  41. /** 
  42. * Updates an existing subscription in place. (subscriptions.update) 
  43. * @param string $id The ID of the subscription. 
  44. * @param Google_Subscription $postBody 
  45. * @param array $optParams Optional parameters. 
  46. * @return Google_Subscription 
  47. */ 
  48. public function update($id, Google_Subscription $postBody, $optParams = array()) { 
  49. $params = array('id' => $id, 'postBody' => $postBody); 
  50. $params = array_merge($params, $optParams); 
  51. $data = $this->__call('update', array($params)); 
  52. if ($this->useObjects()) { 
  53. return new Google_Subscription($data); 
  54. } else { 
  55. return $data; 
/google-api-php-client/src/contrib/Google_ResellerService.php  
  1. class Google_SubscriptionsServiceResource extends Google_ServiceResource { 
  2.  
  3. /** 
  4. * Changes the plan of a subscription (subscriptions.changePlan) 
  5. * @param string $customerId Id of the Customer 
  6. * @param string $subscriptionId Id of the subscription, which is unique for a customer 
  7. * @param Google_ChangePlanRequest $postBody 
  8. * @param array $optParams Optional parameters. 
  9. * @return Google_Subscription 
  10. */ 
  11. public function changePlan($customerId, $subscriptionId, Google_ChangePlanRequest $postBody, $optParams = array()) { 
  12. $params = array('customerId' => $customerId, 'subscriptionId' => $subscriptionId, 'postBody' => $postBody); 
  13. $params = array_merge($params, $optParams); 
  14. $data = $this->__call('changePlan', array($params)); 
  15. if ($this->useObjects()) { 
  16. return new Google_Subscription($data); 
  17. } else { 
  18. return $data; 
  19. /** 
  20. * Changes the renewal settings of a subscription (subscriptions.changeRenewalSettings) 
  21. * @param string $customerId Id of the Customer 
  22. * @param string $subscriptionId Id of the subscription, which is unique for a customer 
  23. * @param Google_RenewalSettings $postBody 
  24. * @param array $optParams Optional parameters. 
  25. * @return Google_Subscription 
  26. */ 
  27. public function changeRenewalSettings($customerId, $subscriptionId, Google_RenewalSettings $postBody, $optParams = array()) { 
  28. $params = array('customerId' => $customerId, 'subscriptionId' => $subscriptionId, 'postBody' => $postBody); 
  29. $params = array_merge($params, $optParams); 
  30. $data = $this->__call('changeRenewalSettings', array($params)); 
  31. if ($this->useObjects()) { 
  32. return new Google_Subscription($data); 
  33. } else { 
  34. return $data; 
  35. /** 
  36. * Changes the seats configuration of a subscription (subscriptions.changeSeats) 
  37. * @param string $customerId Id of the Customer 
  38. * @param string $subscriptionId Id of the subscription, which is unique for a customer 
  39. * @param Google_Seats $postBody 
  40. * @param array $optParams Optional parameters. 
  41. * @return Google_Subscription 
  42. */ 
  43. public function changeSeats($customerId, $subscriptionId, Google_Seats $postBody, $optParams = array()) { 
  44. $params = array('customerId' => $customerId, 'subscriptionId' => $subscriptionId, 'postBody' => $postBody); 
  45. $params = array_merge($params, $optParams); 
  46. $data = $this->__call('changeSeats', array($params)); 
  47. if ($this->useObjects()) { 
  48. return new Google_Subscription($data); 
  49. } else { 
  50. return $data; 
  51. /** 
  52. * Cancels/Downgrades a subscription. (subscriptions.delete) 
  53. * @param string $customerId Id of the Customer 
  54. * @param string $subscriptionId Id of the subscription, which is unique for a customer 
  55. * @param string $deletionType Whether the subscription is to be fully cancelled or downgraded 
  56. * @param array $optParams Optional parameters. 
  57. */ 
  58. public function delete($customerId, $subscriptionId, $deletionType, $optParams = array()) { 
  59. $params = array('customerId' => $customerId, 'subscriptionId' => $subscriptionId, 'deletionType' => $deletionType); 
  60. $params = array_merge($params, $optParams); 
  61. $data = $this->__call('delete', array($params)); 
  62. return $data; 
  63. /** 
  64. * Gets a subscription of the customer. (subscriptions.get) 
  65. * @param string $customerId Id of the Customer 
  66. * @param string $subscriptionId Id of the subscription, which is unique for a customer 
  67. * @param array $optParams Optional parameters. 
  68. * @return Google_Subscription 
  69. */ 
  70. public function get($customerId, $subscriptionId, $optParams = array()) { 
  71. $params = array('customerId' => $customerId, 'subscriptionId' => $subscriptionId); 
  72. $params = array_merge($params, $optParams); 
  73. $data = $this->__call('get', array($params)); 
  74. if ($this->useObjects()) { 
  75. return new Google_Subscription($data); 
  76. } else { 
  77. return $data; 
  78. /** 
  79. * Creates/Transfers a subscription for the customer. (subscriptions.insert) 
  80. * @param string $customerId Id of the Customer 
  81. * @param Google_Subscription $postBody 
  82. * @param array $optParams Optional parameters. 
  83. * @opt_param string customerAuthToken An auth token needed for transferring a subscription. Can be generated at https://www.google.com/a/cpanel/customer-domain/TransferToken. Optional. 
  84. * @return Google_Subscription 
  85. */ 
  86. public function insert($customerId, Google_Subscription $postBody, $optParams = array()) { 
  87. $params = array('customerId' => $customerId, 'postBody' => $postBody); 
  88. $params = array_merge($params, $optParams); 
  89. $data = $this->__call('insert', array($params)); 
  90. if ($this->useObjects()) { 
  91. return new Google_Subscription($data); 
  92. } else { 
  93. return $data; 
  94. /** 
  95. * Lists subscriptions of a reseller, optionally filtered by a customer name prefix. 
  96. * (subscriptions.list) 
  97. * @param array $optParams Optional parameters. 
  98. * @opt_param string customerAuthToken An auth token needed if the customer is not a resold customer of this reseller. Can be generated at https://www.google.com/a/cpanel/customer-domain/TransferToken.Optional. 
  99. * @opt_param string customerId Id of the Customer 
  100. * @opt_param string customerNamePrefix Prefix of the customer's domain name by which the subscriptions should be filtered. Optional 
  101. * @opt_param string maxResults Maximum number of results to return 
  102. * @opt_param string pageToken Token to specify next page in the list 
  103. * @return Google_Subscriptions 
  104. */ 
  105. public function listSubscriptions($optParams = array()) { 
  106. $params = array(); 
  107. $params = array_merge($params, $optParams); 
  108. $data = $this->__call('list', array($params)); 
  109. if ($this->useObjects()) { 
  110. return new Google_Subscriptions($data); 
  111. } else { 
  112. return $data; 
  113. /** 
  114. * Starts paid service of a trial subscription (subscriptions.startPaidService) 
  115. * @param string $customerId Id of the Customer 
  116. * @param string $subscriptionId Id of the subscription, which is unique for a customer 
  117. * @param array $optParams Optional parameters. 
  118. * @return Google_Subscription 
  119. */ 
  120. public function startPaidService($customerId, $subscriptionId, $optParams = array()) { 
  121. $params = array('customerId' => $customerId, 'subscriptionId' => $subscriptionId); 
  122. $params = array_merge($params, $optParams); 
  123. $data = $this->__call('startPaidService', array($params)); 
  124. if ($this->useObjects()) { 
  125. return new Google_Subscription($data); 
  126. } else { 
  127. return $data;