class MonetizationSubscriptions extends Resource (View source)

The "subscriptions" collection of methods.

Typical usage is:

 $androidpublisherService = new Google\Service\AndroidPublisher(...);
 $subscriptions = $androidpublisherService->monetization_subscriptions;

Methods

archive(string $packageName, string $productId, ArchiveSubscriptionRequest $postBody, array $optParams = [])

Deprecated: subscription archiving is not supported. (subscriptions.archive)

batchGet(string $packageName, array $optParams = [])

Reads one or more subscriptions. (subscriptions.batchGet)

batchUpdate(string $packageName, BatchUpdateSubscriptionsRequest $postBody, array $optParams = [])

Updates a batch of subscriptions. Set the latencyTolerance field on nested requests to PRODUCT_UPDATE_LATENCY_TOLERANCE_LATENCY_TOLERANT to achieve maximum update throughput. (subscriptions.batchUpdate)

create(string $packageName, Subscription $postBody, array $optParams = [])

Creates a new subscription. Newly added base plans will remain in draft state until activated. (subscriptions.create)

delete(string $packageName, string $productId, array $optParams = [])

Deletes a subscription. A subscription can only be deleted if it has never had a base plan published. (subscriptions.delete)

get(string $packageName, string $productId, array $optParams = [])

Reads a single subscription. (subscriptions.get)

listMonetizationSubscriptions(string $packageName, array $optParams = [])

Lists all subscriptions under a given app.

patch(string $packageName, string $productId, Subscription $postBody, array $optParams = [])

Updates an existing subscription. (subscriptions.patch)

Details

Subscription archive(string $packageName, string $productId, ArchiveSubscriptionRequest $postBody, array $optParams = [])

Deprecated: subscription archiving is not supported. (subscriptions.archive)

Parameters

string $packageName

Required. The parent app (package name) of the app of the subscription to delete.

string $productId

Required. The unique product ID of the subscription to delete.

ArchiveSubscriptionRequest $postBody
array $optParams

Optional parameters.

Return Value

Subscription

Exceptions

Exception

BatchGetSubscriptionsResponse batchGet(string $packageName, array $optParams = [])

Reads one or more subscriptions. (subscriptions.batchGet)

Parameters

string $packageName

Required. The parent app (package name) for which the subscriptions should be retrieved. Must be equal to the package_name field on all the requests.

array $optParams

Optional parameters.

Return Value

BatchGetSubscriptionsResponse

Exceptions

Exception

BatchUpdateSubscriptionsResponse batchUpdate(string $packageName, BatchUpdateSubscriptionsRequest $postBody, array $optParams = [])

Updates a batch of subscriptions. Set the latencyTolerance field on nested requests to PRODUCT_UPDATE_LATENCY_TOLERANCE_LATENCY_TOLERANT to achieve maximum update throughput. (subscriptions.batchUpdate)

Parameters

string $packageName

Required. The parent app (package name) for which the subscriptions should be updated. Must be equal to the package_name field on all the Subscription resources.

BatchUpdateSubscriptionsRequest $postBody
array $optParams

Optional parameters.

Return Value

BatchUpdateSubscriptionsResponse

Exceptions

Exception

Subscription create(string $packageName, Subscription $postBody, array $optParams = [])

Creates a new subscription. Newly added base plans will remain in draft state until activated. (subscriptions.create)

Parameters

string $packageName

Required. The parent app (package name) for which the subscription should be created. Must be equal to the package_name field on the Subscription resource.

Subscription $postBody
array $optParams

Optional parameters.

Return Value

Subscription

Exceptions

Exception

delete(string $packageName, string $productId, array $optParams = [])

Deletes a subscription. A subscription can only be deleted if it has never had a base plan published. (subscriptions.delete)

Parameters

string $packageName

Required. The parent app (package name) of the app of the subscription to delete.

string $productId

Required. The unique product ID of the subscription to delete.

array $optParams

Optional parameters.

Exceptions

Exception

Subscription get(string $packageName, string $productId, array $optParams = [])

Reads a single subscription. (subscriptions.get)

Parameters

string $packageName

Required. The parent app (package name) of the subscription to get.

string $productId

Required. The unique product ID of the subscription to get.

array $optParams

Optional parameters.

Return Value

Subscription

Exceptions

Exception

ListSubscriptionsResponse listMonetizationSubscriptions(string $packageName, array $optParams = [])

Lists all subscriptions under a given app.

(subscriptions.listMonetizationSubscriptions)

Parameters

string $packageName

Required. The parent app (package name) for which the subscriptions should be read.

array $optParams

Optional parameters.

Return Value

ListSubscriptionsResponse

Exceptions

Exception

Subscription patch(string $packageName, string $productId, Subscription $postBody, array $optParams = [])

Updates an existing subscription. (subscriptions.patch)

Parameters

string $packageName

Immutable. Package name of the parent app.

string $productId

Immutable. Unique product ID of the product. Unique within the parent app. Product IDs must be composed of lower-case letters (a-z), numbers (0-9), underscores (_) and dots (.). It must start with a lower-case letter or number, and be between 1 and 40 (inclusive) characters in length.

Subscription $postBody
array $optParams

Optional parameters.

Return Value

Subscription

Exceptions

Exception