Google_Service_AndroidPublisher_Purchases_Resource

The "purchases" collection of methods.

Defined (1)

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

/lib/Google/Service/AndroidPublisher.php  
  1. class Google_Service_AndroidPublisher_Purchases_Resource extends Google_Service_Resource 
  2.  
  3. /** 
  4. * Cancels a user's subscription purchase. The subscription remains valid until 
  5. * its expiration time. (purchases.cancel) 
  6. * @param string $packageName 
  7. * The package name of the application for which this subscription was purchased (for example,  
  8. * 'com.some.thing'). 
  9. * @param string $subscriptionId 
  10. * The purchased subscription ID (for example, 'monthly001'). 
  11. * @param string $token 
  12. * The token provided to the user's device when the subscription was purchased. 
  13. * @param array $optParams Optional parameters. 
  14. */ 
  15. public function cancel($packageName, $subscriptionId, $token, $optParams = array()) 
  16. $params = array('packageName' => $packageName, 'subscriptionId' => $subscriptionId, 'token' => $token); 
  17. $params = array_merge($params, $optParams); 
  18. return $this->call('cancel', array($params)); 
  19. /** 
  20. * Checks whether a user's subscription purchase is valid and returns its expiry 
  21. * time. (purchases.get) 
  22. * @param string $packageName 
  23. * The package name of the application for which this subscription was purchased (for example,  
  24. * 'com.some.thing'). 
  25. * @param string $subscriptionId 
  26. * The purchased subscription ID (for example, 'monthly001'). 
  27. * @param string $token 
  28. * The token provided to the user's device when the subscription was purchased. 
  29. * @param array $optParams Optional parameters. 
  30. * @return Google_Service_AndroidPublisher_SubscriptionPurchase 
  31. */ 
  32. public function get($packageName, $subscriptionId, $token, $optParams = array()) 
  33. $params = array('packageName' => $packageName, 'subscriptionId' => $subscriptionId, 'token' => $token); 
  34. $params = array_merge($params, $optParams); 
  35. return $this->call('get', array($params), "Google_Service_AndroidPublisher_SubscriptionPurchase");