class PartnersSubscriptions extends Resource (View source)

The "subscriptions" collection of methods.

Typical usage is:

 $paymentsresellersubscriptionService = new Google\Service\PaymentsResellerSubscription(...);
 $subscriptions = $paymentsresellersubscriptionService->partners_subscriptions;

Methods

cancel(string $name, GoogleCloudPaymentsResellerSubscriptionV1CancelSubscriptionRequest $postBody, array $optParams = [])

Used by partners to cancel a subscription service either immediately or by the end of the current billing cycle for their customers. It should be called directly by the partner using service accounts. (subscriptions.cancel)

create(string $parent, GoogleCloudPaymentsResellerSubscriptionV1Subscription $postBody, array $optParams = [])

Used by partners to create a subscription for their customers. The created subscription is associated with the end user inferred from the end user credentials. This API must be authorized by the end user using OAuth.

entitle(string $name, GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionRequest $postBody, array $optParams = [])

Used by partners to entitle a previously provisioned subscription to the current end user. The end user identity is inferred from the authorized credential of the request. This API must be authorized by the end user using OAuth. (subscriptions.entitle)

extend(string $name, GoogleCloudPaymentsResellerSubscriptionV1ExtendSubscriptionRequest $postBody, array $optParams = [])

[Opt-in only] Most partners should be on auto-extend by default. Used by partners to extend a subscription service for their customers on an ongoing basis for the subscription to remain active and renewable. It should be called directly by the partner using service accounts. (subscriptions.extend)

get(string $name, array $optParams = [])

Used by partners to get a subscription by id. It should be called directly by the partner using service accounts. (subscriptions.get)

provision(string $parent, GoogleCloudPaymentsResellerSubscriptionV1Subscription $postBody, array $optParams = [])

Used by partners to provision a subscription for their customers. This creates a subscription without associating it with the end user account.

undoCancel(string $name, GoogleCloudPaymentsResellerSubscriptionV1UndoCancelSubscriptionRequest $postBody, array $optParams = [])

Revokes the pending cancellation of a subscription, which is currently in STATE_CANCEL_AT_END_OF_CYCLE state. If the subscription is already cancelled, the request will fail. - This API doesn't apply to YouTube subscriptions. It should be called directly by the partner using service accounts. (subscriptions.undoCancel)

Details

GoogleCloudPaymentsResellerSubscriptionV1CancelSubscriptionResponse cancel(string $name, GoogleCloudPaymentsResellerSubscriptionV1CancelSubscriptionRequest $postBody, array $optParams = [])

Used by partners to cancel a subscription service either immediately or by the end of the current billing cycle for their customers. It should be called directly by the partner using service accounts. (subscriptions.cancel)

Parameters

string $name

Required. The name of the subscription resource to be cancelled. It will have the format of "partners/{partner_id}/subscriptions/{subscription_id}"

GoogleCloudPaymentsResellerSubscriptionV1CancelSubscriptionRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudPaymentsResellerSubscriptionV1CancelSubscriptionResponse

Exceptions

Exception

GoogleCloudPaymentsResellerSubscriptionV1Subscription create(string $parent, GoogleCloudPaymentsResellerSubscriptionV1Subscription $postBody, array $optParams = [])

Used by partners to create a subscription for their customers. The created subscription is associated with the end user inferred from the end user credentials. This API must be authorized by the end user using OAuth.

(subscriptions.create)

Parameters

string $parent

Required. The parent resource name, which is the identifier of the partner. It will have the format of "partners/{partner_id}".

GoogleCloudPaymentsResellerSubscriptionV1Subscription $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudPaymentsResellerSubscriptionV1Subscription

Exceptions

Exception

GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionResponse entitle(string $name, GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionRequest $postBody, array $optParams = [])

Used by partners to entitle a previously provisioned subscription to the current end user. The end user identity is inferred from the authorized credential of the request. This API must be authorized by the end user using OAuth. (subscriptions.entitle)

Parameters

string $name

Required. The name of the subscription resource that is entitled to the current end user. It will have the format of "partners/{partner_id}/subscriptions/{subscription_id}"

GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionResponse

Exceptions

Exception

GoogleCloudPaymentsResellerSubscriptionV1ExtendSubscriptionResponse extend(string $name, GoogleCloudPaymentsResellerSubscriptionV1ExtendSubscriptionRequest $postBody, array $optParams = [])

[Opt-in only] Most partners should be on auto-extend by default. Used by partners to extend a subscription service for their customers on an ongoing basis for the subscription to remain active and renewable. It should be called directly by the partner using service accounts. (subscriptions.extend)

Parameters

string $name

Required. The name of the subscription resource to be extended. It will have the format of "partners/{partner_id}/subscriptions/{subscription_id}".

GoogleCloudPaymentsResellerSubscriptionV1ExtendSubscriptionRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudPaymentsResellerSubscriptionV1ExtendSubscriptionResponse

Exceptions

Exception

GoogleCloudPaymentsResellerSubscriptionV1Subscription get(string $name, array $optParams = [])

Used by partners to get a subscription by id. It should be called directly by the partner using service accounts. (subscriptions.get)

Parameters

string $name

Required. The name of the subscription resource to retrieve. It will have the format of "partners/{partner_id}/subscriptions/{subscription_id}"

array $optParams

Optional parameters.

Return Value

GoogleCloudPaymentsResellerSubscriptionV1Subscription

Exceptions

Exception

GoogleCloudPaymentsResellerSubscriptionV1Subscription provision(string $parent, GoogleCloudPaymentsResellerSubscriptionV1Subscription $postBody, array $optParams = [])

Used by partners to provision a subscription for their customers. This creates a subscription without associating it with the end user account.

EntitleSubscription must be called separately using OAuth in order for the end user account to be associated with the subscription. It should be called directly by the partner using service accounts. (subscriptions.provision)

Parameters

string $parent

Required. The parent resource name, which is the identifier of the partner. It will have the format of "partners/{partner_id}".

GoogleCloudPaymentsResellerSubscriptionV1Subscription $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudPaymentsResellerSubscriptionV1Subscription

Exceptions

Exception

GoogleCloudPaymentsResellerSubscriptionV1UndoCancelSubscriptionResponse undoCancel(string $name, GoogleCloudPaymentsResellerSubscriptionV1UndoCancelSubscriptionRequest $postBody, array $optParams = [])

Revokes the pending cancellation of a subscription, which is currently in STATE_CANCEL_AT_END_OF_CYCLE state. If the subscription is already cancelled, the request will fail. - This API doesn't apply to YouTube subscriptions. It should be called directly by the partner using service accounts. (subscriptions.undoCancel)

Parameters

string $name

Required. The name of the subscription resource whose pending cancellation needs to be undone. It will have the format of "partners/{partner_id}/subscriptions/{subscription_id}"

GoogleCloudPaymentsResellerSubscriptionV1UndoCancelSubscriptionRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudPaymentsResellerSubscriptionV1UndoCancelSubscriptionResponse

Exceptions

Exception