Google_SubscriptionsServiceResource

The "subscriptions" collection of methods.

Defined (3)

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

/google-api/src/contrib/Google_MirrorService.php  
  1. class Google_SubscriptionsServiceResource extends Google_ServiceResource { 
  2.  
  3.  
  4. /** 
  5. * Deletes a subscription. (subscriptions.delete) 
  6. * @param string $id The ID of the subscription. 
  7. * @param array $optParams Optional parameters. 
  8. */ 
  9. public function delete($id, $optParams = array()) { 
  10. $params = array('id' => $id); 
  11. $params = array_merge($params, $optParams); 
  12. $data = $this->__call('delete', array($params)); 
  13. return $data; 
  14. /** 
  15. * Creates a new subscription. (subscriptions.insert) 
  16. * @param Google_Subscription $postBody 
  17. * @param array $optParams Optional parameters. 
  18. * @return Google_Subscription 
  19. */ 
  20. public function insert(Google_Subscription $postBody, $optParams = array()) { 
  21. $params = array('postBody' => $postBody); 
  22. $params = array_merge($params, $optParams); 
  23. $data = $this->__call('insert', array($params)); 
  24. if ($this->useObjects()) { 
  25. return new Google_Subscription($data); 
  26. } else { 
  27. return $data; 
  28. /** 
  29. * Retrieves a list of subscriptions for the authenticated user and service. (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/src/contrib/Google_ResellerService.php  
  1. class Google_SubscriptionsServiceResource extends Google_ServiceResource { 
  2.  
  3.  
  4. /** 
  5. * Changes the plan of a subscription (subscriptions.changePlan) 
  6. * @param string $customerId Id of the Customer 
  7. * @param string $subscriptionId Id of the subscription, which is unique for a customer 
  8. * @param Google_ChangePlanRequest $postBody 
  9. * @param array $optParams Optional parameters. 
  10. * @return Google_Subscription 
  11. */ 
  12. public function changePlan($customerId, $subscriptionId, Google_ChangePlanRequest $postBody, $optParams = array()) { 
  13. $params = array('customerId' => $customerId, 'subscriptionId' => $subscriptionId, 'postBody' => $postBody); 
  14. $params = array_merge($params, $optParams); 
  15. $data = $this->__call('changePlan', array($params)); 
  16. if ($this->useObjects()) { 
  17. return new Google_Subscription($data); 
  18. } else { 
  19. return $data; 
  20. /** 
  21. * Changes the renewal settings of a subscription (subscriptions.changeRenewalSettings) 
  22. * @param string $customerId Id of the Customer 
  23. * @param string $subscriptionId Id of the subscription, which is unique for a customer 
  24. * @param Google_RenewalSettings $postBody 
  25. * @param array $optParams Optional parameters. 
  26. * @return Google_Subscription 
  27. */ 
  28. public function changeRenewalSettings($customerId, $subscriptionId, Google_RenewalSettings $postBody, $optParams = array()) { 
  29. $params = array('customerId' => $customerId, 'subscriptionId' => $subscriptionId, 'postBody' => $postBody); 
  30. $params = array_merge($params, $optParams); 
  31. $data = $this->__call('changeRenewalSettings', array($params)); 
  32. if ($this->useObjects()) { 
  33. return new Google_Subscription($data); 
  34. } else { 
  35. return $data; 
  36. /** 
  37. * Changes the seats configuration of a subscription (subscriptions.changeSeats) 
  38. * @param string $customerId Id of the Customer 
  39. * @param string $subscriptionId Id of the subscription, which is unique for a customer 
  40. * @param Google_Seats $postBody 
  41. * @param array $optParams Optional parameters. 
  42. * @return Google_Subscription 
  43. */ 
  44. public function changeSeats($customerId, $subscriptionId, Google_Seats $postBody, $optParams = array()) { 
  45. $params = array('customerId' => $customerId, 'subscriptionId' => $subscriptionId, 'postBody' => $postBody); 
  46. $params = array_merge($params, $optParams); 
  47. $data = $this->__call('changeSeats', array($params)); 
  48. if ($this->useObjects()) { 
  49. return new Google_Subscription($data); 
  50. } else { 
  51. return $data; 
  52. /** 
  53. * Cancels/Downgrades a subscription. (subscriptions.delete) 
  54. * @param string $customerId Id of the Customer 
  55. * @param string $subscriptionId Id of the subscription, which is unique for a customer 
  56. * @param string $deletionType Whether the subscription is to be fully cancelled or downgraded 
  57. * @param array $optParams Optional parameters. 
  58. */ 
  59. public function delete($customerId, $subscriptionId, $deletionType, $optParams = array()) { 
  60. $params = array('customerId' => $customerId, 'subscriptionId' => $subscriptionId, 'deletionType' => $deletionType); 
  61. $params = array_merge($params, $optParams); 
  62. $data = $this->__call('delete', array($params)); 
  63. return $data; 
  64. /** 
  65. * Gets a subscription of the customer. (subscriptions.get) 
  66. * @param string $customerId Id of the Customer 
  67. * @param string $subscriptionId Id of the subscription, which is unique for a customer 
  68. * @param array $optParams Optional parameters. 
  69. * @return Google_Subscription 
  70. */ 
  71. public function get($customerId, $subscriptionId, $optParams = array()) { 
  72. $params = array('customerId' => $customerId, 'subscriptionId' => $subscriptionId); 
  73. $params = array_merge($params, $optParams); 
  74. $data = $this->__call('get', array($params)); 
  75. if ($this->useObjects()) { 
  76. return new Google_Subscription($data); 
  77. } else { 
  78. return $data; 
  79. /** 
  80. * Creates/Transfers a subscription for the customer. (subscriptions.insert) 
  81. * @param string $customerId Id of the Customer 
  82. * @param Google_Subscription $postBody 
  83. * @param array $optParams Optional parameters. 
  84. * @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. 
  85. * @return Google_Subscription 
  86. */ 
  87. public function insert($customerId, Google_Subscription $postBody, $optParams = array()) { 
  88. $params = array('customerId' => $customerId, 'postBody' => $postBody); 
  89. $params = array_merge($params, $optParams); 
  90. $data = $this->__call('insert', array($params)); 
  91. if ($this->useObjects()) { 
  92. return new Google_Subscription($data); 
  93. } else { 
  94. return $data; 
  95. /** 
  96. * Lists subscriptions of a reseller, optionally filtered by a customer name prefix. 
  97. * (subscriptions.list) 
  98. * @param array $optParams Optional parameters. 
  99. * @opt_param string pageToken Token to specify next page in the list 
  100. * @opt_param string maxResults Maximum number of results to return 
  101. * @opt_param string customerNamePrefix Prefix of the customer's domain name by which the subscriptions should be filtered. Optional 
  102. * @return Google_Subscriptions 
  103. */ 
  104. public function listSubscriptions($optParams = array()) { 
  105. $params = array(); 
  106. $params = array_merge($params, $optParams); 
  107. $data = $this->__call('list', array($params)); 
  108. if ($this->useObjects()) { 
  109. return new Google_Subscriptions($data); 
  110. } else { 
  111. return $data; 
  112. /** 
  113. * Starts paid service of a trial subscription (subscriptions.startPaidService) 
  114. * @param string $customerId Id of the Customer 
  115. * @param string $subscriptionId Id of the subscription, which is unique for a customer 
  116. * @param array $optParams Optional parameters. 
  117. * @return Google_Subscription 
  118. */ 
  119. public function startPaidService($customerId, $subscriptionId, $optParams = array()) { 
  120. $params = array('customerId' => $customerId, 'subscriptionId' => $subscriptionId); 
  121. $params = array_merge($params, $optParams); 
  122. $data = $this->__call('startPaidService', array($params)); 
  123. if ($this->useObjects()) { 
  124. return new Google_Subscription($data); 
  125. } else { 
  126. return $data; 
/google-api/src/contrib/Google_YouTubeService.php  
  1. class Google_SubscriptionsServiceResource extends Google_ServiceResource { 
  2.  
  3.  
  4. /** 
  5. * Deletes a subscription. (subscriptions.delete) 
  6. * @param string $id The id parameter specifies the YouTube subscription ID for the resource that is being deleted. In a subscription resource, the id property specifies the YouTube subscription ID. 
  7. * @param array $optParams Optional parameters. 
  8. */ 
  9. public function delete($id, $optParams = array()) { 
  10. $params = array('id' => $id); 
  11. $params = array_merge($params, $optParams); 
  12. $data = $this->__call('delete', array($params)); 
  13. return $data; 
  14. /** 
  15. * Adds a subscription for the authenticated user's channel. (subscriptions.insert) 
  16. * @param string $part The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. 
  17. The part names that you can include in the parameter value are snippet and contentDetails. 
  18. * @param Google_Subscription $postBody 
  19. * @param array $optParams Optional parameters. 
  20. * @return Google_Subscription 
  21. */ 
  22. public function insert($part, Google_Subscription $postBody, $optParams = array()) { 
  23. $params = array('part' => $part, 'postBody' => $postBody); 
  24. $params = array_merge($params, $optParams); 
  25. $data = $this->__call('insert', array($params)); 
  26. if ($this->useObjects()) { 
  27. return new Google_Subscription($data); 
  28. } else { 
  29. return $data; 
  30. /** 
  31. * Returns subscription resources that match the API request criteria. (subscriptions.list) 
  32. * @param string $part The part parameter specifies a comma-separated list of one or more subscription resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, and contentDetails. 
  33. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a subscription resource, the snippet property contains other properties, such as a display title for the subscription. If you set part=snippet, the API response will also contain all of those nested properties. 
  34. * @param array $optParams Optional parameters. 
  35. * @opt_param string channelId The channelId parameter specifies a YouTube channel ID. The API will only return that channel's subscriptions. 
  36. * @opt_param string forChannelId The forChannelId parameter specifies a comma-separated list of channel IDs. The API response will then only contain subscriptions matching those channels. 
  37. * @opt_param string id The id parameter specifies a comma-separated list of the YouTube subscription ID(s) for the resource(s) that are being retrieved. In a subscription resource, the id property specifies the YouTube subscription ID. 
  38. * @opt_param string maxResults USE_DESCRIPTION --- channels:list:maxResults 
  39. * @opt_param bool mine Set this parameter's value to true to retrieve a feed of the authenticated user's subscriptions. 
  40. * @opt_param string order The order parameter specifies the method that will be used to sort resources in the API response. 
  41. * @opt_param string pageToken USE_DESCRIPTION --- channels:list:pageToken 
  42. * @return Google_SubscriptionListResponse 
  43. */ 
  44. public function listSubscriptions($part, $optParams = array()) { 
  45. $params = array('part' => $part); 
  46. $params = array_merge($params, $optParams); 
  47. $data = $this->__call('list', array($params)); 
  48. if ($this->useObjects()) { 
  49. return new Google_SubscriptionListResponse($data); 
  50. } else { 
  51. return $data;