Entitlement
import type { Entitlement } from "https://googleapis.deno.dev/v1/cloudcommerceprocurement:v1.ts";
Represents a procured product of a customer.
§Properties
Output only. The resource name of the account that this entitlement is based on, if any.
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.
Output only. The entitlement benefit IDs associated with the purchase.
Output only. The custom properties that were collected from the user to create this entitlement.
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.
Output only. The resource name of the entitlement. Entitlement names have
the form providers/{provider_id}/entitlements/{entitlement_id}
.
Output only. The end time of the new offer. If the offer was has a term duration 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. * If the entitlement is in ENTITLEMENT_ACTIVATION_REQUESTED, ENTITLEMENT_ACTIVE, or ENTITLEMENT_PENDING_CANCELLATION state, then this field will be empty. * If the entitlement is in ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL or ENTITLEMENT_PENDING_PLAN_CHANGE state, then this field will be populated with the expected end time of the upcoming offer (in the future) if the upcoming offer has a specified end date. Otherwise, this field will be empty. * If the entitlement is in ENTITLEMENT_CANCELLED state, then this field will be empty.
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. * If the entitlement is in ENTITLEMENT_ACTIVATION_REQUESTED state, this field will not be populated when the entitlement is not yet approved. But after the entitlement is approved, then this field will be populated with effective time of the upcoming offer. * If the entitlement is in ENTITLEMENT_ACTIVE or ENTITLEMENT_PENDING_CANCELLATION state, this field will not be populated. * If the entitlement is in ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state, this field will not be populated since the entitlement change is waiting on approval. * If the entitlement is in ENTITLEMENT_PENDING_PLAN_CHANGE state, this field will be populated with the expected effective time of the upcoming offer (in the future). * If the entitlement is in ENTITLEMENT_CANCELLED state, then this field will be empty.
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}' OR 'projects/{project}/services/{service}/standardOffers/{offer}', 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. * If the entitlement is in ENTITLEMENT_ACTIVATION_REQUESTED, ENTITLEMENT_ACTIVE or ENTITLEMENT_PENDING_CANCELLATION state, then this field will be empty. * If the entitlement is in ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL or ENTITLEMENT_PENDING_PLAN_CHANGE state, then this field will be populated with the upcoming offer. * If the entitlement is in ENTITLEMENT_CANCELLED state, then this will be empty.
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 has a specified end date instead of a duration, this field is empty. * If the entitlement is in ENTITLEMENT_ACTIVATION_REQUESTED, ENTITLEENTITLEMENT_ACTIVE, or ENTITLEMENT_PENDING_CANCELLATION state, then this field is empty. * If the entitlement is in ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL or ENTITLEMENT_PENDING_PLAN_CHANGE state, then this field will be populated with the duration of the upcoming offer, if the upcoming offer is does not have a specified end date. Otherwise, this field will be empty. * If the entitlement is in ENTITLEMENT_CANCELLED state, then this field will be empty.
Output only. The identifier of the pending new plan. Required if the product has plans and the entitlement has a pending plan change.
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}' OR 'projects/{project}/services/{service}/standardOffers/{offer}', 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. * If the entitlement is in ENTITLEMENT_ACTIVATION_REQUESTED state, this field will be populated with the upcoming offer. * If the entitlement is in ENTITLEMENT_ACTIVE, ENTITLEMENT_PENDING_CANCELLATION, ENTITLEMENT_PENDING_PLAN_CHANGE, or ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state, this field will be populated with the current offer. * If the entitlement is in ENTITLEMENT_CANCELLED state, then this field will be populated with the latest offer the order was associated with.
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 has a specified end date instead of a duration, this field is empty.
- If the entitlement is in ENTITLEMENT_ACTIVATION_REQUESTED state, then this field will be populated with the duration of the upcoming offer, if the upcoming offer does not have a specified end date. Otherwise, this field will be empty. * If the entitlement is in ENTITLEMENT_ACTIVE, ENTITLEMENT_PENDING_CANCELLATION, ENTITLEMENT_PENDING_PLAN_CHANGE, or ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL state, then this field will be populated with the duration of the current offer if the current offer is does not have a specific end date. Otherwise, this field will be empty. * If the entitlement is in ENTITLEMENT_CANCELLED state, then this field will be populated with the duration of the latest offer the order was associated with if that offer does not have a specific end date. Otherwise, this field will be empty.
Output only. End time for the Offer associated with this entitlement. Note that this field value can change over time. This occurs naturally even if the offer is not changed, due to auto renewal. * If the entitlement is in ENTITLEMENT_ACTIVATION_REQUESTED state, then: * If the entitlement is not yet approved, then this field will be populated with the expected end time of the upcoming offer (in the future) if the upcoming offer has a specified end date. Otherwise this field will be empty. * If the entitlement is approved, then this field will always be populated with the expected end time of the upcoming offer (in the future). This means both this field, and the offer_duration field, can co-exist. * If the entitlement is in ENTITLEMENT_ACTIVE or ENTITLEMENT_PENDING_CANCELLATION state, then this field will be populated with the actual expected end time of the current offer (in the futre). Meaning, this field will be set, regardless of whether the offer has a specific end date or a duration. This means both this field, and the offer_duration field, can co-exist. * If the entitlement is in ENTITLEMENT_PENDING_PLAN_CHANGE_APPROVAL or ENTITLEMENT_PENDING_PLAN_CHANGE state: * If the current offer has already ended and became pure PAYG, then this field reflects the ACTUAL end time of the current offer (in the past). * Otherwise, then this is the EXPECTED end date of the current offer (in the future). * If the entitlement is in ENTITLEMENT_CANCELLED state, then this field will be populated with the ACTUAL end time of the latest offer the order was associated with (in the past). If the entitlement was cancelled before any offer started, then this field will be empty.
Output only. The order ID of this entitlement, without any orders/
resource name prefix.
Output only. The identifier of the plan that was procured. Required if the product has plans.
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.
Output only. The identifier of the product that was procured.
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.
Output only. The identifier of the quote that was used to procure. Empty if the order is not purchased using a quote.
Output only. The state of the entitlement.
Output only. End time for the subscription corresponding to this entitlement.
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.