Resource: Entitlement
Represents a procured product of a customer.
JSON representation |
---|
{ "name": string, "account": string, "provider": string, "product": string, "quoteExternalName": string, "productExternalName": string, "plan": string, "offer": string, "newOfferStartTime": string, "newPendingOffer": string, "newPendingPlan": string, "state": enum ( |
Fields | |
---|---|
name |
Output only. The resource name of the entitlement. Entitlement names have the form |
account |
Output only. The resource name of the account that this entitlement is based on, if any. |
provider |
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 |
Output only. The identifier of the entity that was purchased. This may actually represent a product, quote, or offer. We strongly recommend that you use the following more explicit fields: productExternalName, quoteExternalName, or offer. |
quoteExternalName |
Output only. The identifier of the quote that was used to procure. Empty if the order is not purchased using a quote. |
productExternalName |
Output only. The identifier of the product that was procured. |
plan |
Output only. The identifier of the plan that was procured. Required if the product has plans. |
offer |
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. The {service} in the name is the listing service of the offer. It could be either the product service that the offer is referencing, or a generic private offer parent service. We recommend that you don't build your integration to rely on the meaning of this {service} part. |
newOfferStartTime |
Output only. The timestamp when the new offer becomes effective. This field is populated even if the entitlement isn't active yet. If there's no upcoming offer, the field is empty. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
newPendingOffer |
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. This field isn't populated for entitlements which aren't active yet. 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. The {service} in the name is the listing service of the offer. It could be either the product service that the offer is referencing, or a generic private offer parent service. We recommend that you don't build your integration to rely on the meaning of this {service} part. |
newPendingPlan |
Output only. The identifier of the pending new plan. Required if the product has plans and the entitlement has a pending plan change. |
state |
Output only. The state of the entitlement. |
inputProperties |
Output only. The custom properties that were collected from the user to create this entitlement. |
updateTime |
Output only. The last update timestamp. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
createTime |
Output only. The creation timestamp. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
offerDuration |
Output only. The offer duration of the current offer in ISO 8601 duration format. Field is empty if entitlement was not made using an offer. If the offer was created with a specified end date instead of a duration, this field is empty. |
newPendingOfferDuration |
Output only. The duration of the new offer, in ISO 8601 duration format. This field isn't populated for entitlements which aren't active yet, only for pending offer changes. If the offer was created with a specified end date instead of a duration, this field is empty. |
usageReportingId |
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 |
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 This field is cleared automatically when the entitlement state changes. |
consumers[] |
Output only. The resources using this entitlement, if applicable. |
subscriptionEndTime |
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: |
offerEndTime |
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: |
newOfferEndTime |
Output only. The end time of the new offer. If the offer was created with a term instead of a specified end date, this field is empty. This field is populated even if the entitlement isn't active yet. If there's no upcoming offer, the field is empty. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
orderId |
Output only. The order ID of this entitlement, without any |
entitlementBenefitIds[] |
Output only. The entitlement benefit IDs associated with the purchase. |
cancellationReason |
Output only. The reason the entitlement was cancelled. If this entitlement wasn't cancelled, this field is empty. Possible values include "unknown", "expired", "user-cancelled", "account-closed", "billing-disabled" (if the customer has manually disabled billing to their resources), "user-aborted", and "migrated" (if the entitlement has migrated across products). Values of this field are subject to change, and we recommend that you don't build your technical integration to rely on these fields. |
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 |
ENTITLEMENT_ACTIVE |
Indicates that the entitlement is active. The procured item is now usable and any associated billing events will start occurring. Entitlements in this state WILL renew. The analogous state for an unexpired but non-renewing entitlement is ENTITLEMENT_PENDING_CANCELLATION. In this state, the customer can decide to cancel the entitlement, which would change the state to The user can also request a change of plan, which will transition the state to |
ENTITLEMENT_PENDING_CANCELLATION |
Indicates that the entitlement will expire at the end of its term. This could mean the customer has elected not to renew this entitlement or the customer elected to cancel an entitlement that only expires at term end. 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 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 If the provider rejects the plan change, then the pending plan change request is removed and the entitlement stays in |
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 |
A project name with format |
Methods |
|
---|---|
|
Approves an entitlement that is in the EntitlementState.ENTITLEMENT_ACTIVATION_REQUESTED state. |
|
Approves an entitlement plan change that is in the EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state. |
|
Gets a requested Entitlement resource. |
|
Lists Entitlement s for which the provider has read access. |
|
Updates an existing Entitlement . |
|
Rejects an entitlement that is in the EntitlementState.ENTITLEMENT_ACTIVATION_REQUESTED state. |
|
Rejects an entitlement plan change that is in the EntitlementState.ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state. |
|
Requests suspension of an active Entitlement . |