REST Resource: providers.entitlements

Resource: Entitlement

Represents a procured product of a customer. Next Id: 26

JSON representation
{
  "name": string,
  "account": string,
  "provider": string,
  "product": string,
  "quoteExternalName": string,
  "productExternalName": string,
  "plan": string,
  "offer": string,
  "newPendingOffer": string,
  "newPendingPlan": string,
  "state": enum (EntitlementState),
  "inputProperties": {
    object
  },
  "updateTime": string,
  "createTime": string,
  "usageReportingId": string,
  "messageToUser": string,
  "consumers": [
    {
      object (Consumer)
    }
  ],
  "subscriptionEndTime": string,
  "offerEndTime": string,
  "offerDuration": string,
  "newPendingOfferDuration": string
}
Fields
name

string

Output only. The resource name of the entitlement. Entitlement names have the form providers/{providerId}/entitlements/{entitlement_id}.

account

string

Output only. The resource name of the account that this entitlement is based on, if any.

provider

string

Output only. The identifier of the service provider that this entitlement was created against. Each service provider is assigned a unique provider value when they onboard with Cloud Commerce platform.

product
(deprecated)

string

Output only. The identifier of the entity that was purchased. This may actually represent a product, quote, or offer.

quoteExternalName

string

Output only. The identifier of the quote that was used to procure. Empty if the order is not purchased using a quote.

productExternalName

string

Output only. The identifier of the product that was procured.

plan

string

Output only. The identifier of the plan that was procured. Required if the product has plans.

offer

string

Output only. The name of the offer that was procured. Field is empty if order was not made using an offer. Format: 'projects/{project}/services/{service}/privateOffers/{offer-id}' OR 'projects/{project}/services/{service}/standardOffers/{offer-id}', depending on whether the offer is private or public.

newPendingOffer

string

Output only. The name of the offer the entitlement is switching to upon a pending plan change. Only exists if the pending plan change is moving to an offer. Format: 'projects/{project}/services/{service}/privateOffers/{offer-id}' OR 'projects/{project}/services/{service}/standardOffers/{offer-id}', depending on whether the offer is private or public.

newPendingPlan

string

Output only. The identifier of the pending new plan. Required if the product has plans and the entitlement has a pending plan change.

state

enum (EntitlementState)

Output only. The state of the entitlement.

inputProperties
(deprecated)

object (Struct format)

Output only. The custom properties that were collected from the user to create this entitlement.

updateTime

string (Timestamp format)

Output only. The last update timestamp.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

createTime

string (Timestamp format)

Output only. The creation timestamp.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

usageReportingId

string

Output only. The consumerId to use when reporting usage through the Service Control API. See the consumerId field at Reporting Metrics for more details.

This field is present only if the product has usage-based billing configured.

messageToUser

string

Provider-supplied message that is displayed to the end user. Currently this is used to communicate progress and ETA for provisioning. This field can be updated only when a user is waiting for an action from the provider, i.e. entitlement state is EntitlementState.ENTITLEMENT_ACTIVATION_REQUESTED or EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL.

This field is cleared automatically when the entitlement state changes.

consumers[]

object (Consumer)

Output only. The resources using this entitlement, if applicable.

subscriptionEndTime

string (Timestamp format)

Output only. End time for the subscription corresponding to this entitlement.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

offerEndTime

string (Timestamp format)

Output only. End time for the Offer association corresponding to this entitlement. The field is only populated if the entitlement is currently associated with an Offer.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

offerDuration

string

Output only. The duration of the current entitlement, if the current entitlement is offer-based. Field is empty if order was not made using an offer.

A duration in ISO8601 duration format with year, month, and day precision. Examples: "P1Y" is the equivalent of 1 Year and "P1Y6M" is the equivalent of 1 Year and 6 Months.

newPendingOfferDuration

string

Output only. The duration of the new pending offer. Field is empty if the new pending offer is empty.

A duration in ISO8601 duration format with year, month, and day precision. Examples: "P1Y" is the equivalent of 1 Year and "P1Y6M" is the is the equivalent of 1 Year and 6 Months.

EntitlementState

Indicates the current state of an entitlement.

Enums
ENTITLEMENT_STATE_UNSPECIFIED Default state of the entitlement. It's only set to this value when the entitlement is first created and has not been initialized.
ENTITLEMENT_ACTIVATION_REQUESTED

Indicates that the entitlement is being created and the backend has sent a notification to the provider for the activation approval.

If the provider approves, then the entitlement will transition to the EntitlementState.ENTITLEMENT_ACTIVE state. Otherwise, the entitlement will be removed. Plan changes are not allowed in this state. Instead the entitlement is cancelled and re-created with a new plan name.

ENTITLEMENT_ACTIVE

Indicates that the entitlement is active. The procured item is now usable and any associated billing events will start occurring.

In this state, the customer can decide to cancel the entitlement, which would change the state to EntitlementState.ENTITLEMENT_PENDING_CANCELLATION, and then EntitlementState.ENTITLEMENT_CANCELLED.

The user can also request a change of plan, which will transition the state to EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE, and then back to EntitlementState.ENTITLEMENT_ACTIVE.

ENTITLEMENT_PENDING_CANCELLATION

Indicates that the entitlement was cancelled by the customer. The entitlement typically stays in this state if the entitlement/plan allows use of the underlying resource until the end of the current billing cycle. Once the billing cycle completes, the resource will transition to EntitlementState.ENTITLEMENT_CANCELLED state.

The resource cannot be modified during this state.

ENTITLEMENT_CANCELLED Indicates that the entitlement was cancelled. The entitlement can now be deleted.
ENTITLEMENT_PENDING_PLAN_CHANGE Indicates that the entitlement is currently active, but there is a pending plan change that is requested by the customer. The entitlement typically stays in this state, if the entitlement/plan requires the completion of the current billing cycle before the plan can be changed. Once the billing cycle completes, the resource will transition to EntitlementState.ENTITLEMENT_ACTIVE, with its plan changed.
ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL

Indicates that the entitlement is currently active, but there is a plan change request pending provider approval. If the provider approves the plan change, then the entitlement will transition either to EntitlementState.ENTITLEMENT_ACTIVE or EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE depending on whether current plan requires that the billing cycle completes.

If the provider rejects the plan change, then the pending plan change request is removed and the entitlement stays in EntitlementState.ENTITLEMENT_ACTIVE state with the old plan.

ENTITLEMENT_SUSPENDED

Indicates that the entitlement is suspended either by Google or provider request.

This can be triggered for various external reasons (e.g. expiration of credit card on the billing account, violation of terms-of-service of the provider etc.). As such, any remediating action needs to be taken externally, before the entitlement can be activated.

This is not yet supported.

Consumer

A resource using (consuming) this entitlement.

JSON representation
{
  "project": string
}
Fields
project

string

A project name with format projects/<project number>.

Methods

approve

Approves an entitlement that is in the EntitlementState.ENTITLEMENT_ACTIVATION_REQUESTED state.

approvePlanChange

Approves an entitlement plan change that is in the EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state.

get

Gets a requested Entitlement resource.

list

Lists Entitlements for which the provider has read access.

patch

Updates an existing Entitlement.

reject

Rejects an entitlement that is in the EntitlementState.ENTITLEMENT_ACTIVATION_REQUESTED state.

rejectPlanChange

Rejects an entitlement plan change that is in the EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state.

suspend

Requests suspension of an active Entitlement.