REST Resource: partners.subscriptions.lineItems

Resource: LineItem

Individual line item definition of a subscription.

JSON representation
{
  "name": string,
  "product": string,
  "description": string,
  "lineItemPromotionSpecs": [
    {
      object (PromotionSpec)
    }
  ],
  "state": enum (LineItemState),
  "lineItemFreeTrialEndTime": string,
  "recurrenceType": enum (LineItemRecurrenceType),
  "oneTimeRecurrenceDetails": {
    object (OneTimeRecurrenceDetails)
  },
  "productPayload": {
    object (ProductPayload)
  },
  "amount": {
    object (Amount)
  },
  "bundleDetails": {
    object (BundleDetails)
  },
  "finiteBillingCycleDetails": {
    object (FiniteBillingCycleDetails)
  },
  "lineItemIndex": integer
}
Fields
name

string

Identifier. Resource name of the line item. Format: partners/{partner}/subscriptions/{subscription}/lineItems/{lineItem}

product

string

Required. Product resource name that identifies one the line item The format is 'partners/{partner_id}/products/{productId}'.

description

string

Output only. Description of this line item.

lineItemPromotionSpecs[]

object (PromotionSpec)

Optional. The promotions applied on the line item. It can be:

  • an introductory pricing promotion.
  • a free trial promotion. This feature is not enabled. If used, the request will be rejected.

When used as input in Create or Provision API, specify its resource name only.

state

enum (LineItemState)

Output only. The state of the line item.

lineItemFreeTrialEndTime

string (Timestamp format)

Output only. The free trial end time will be populated after the line item is successfully processed. End time of the line item free trial period, in ISO 8061 format. For example, "2019-08-31T17:28:54.564Z". It will be set the same as createTime if no free trial promotion is specified.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

recurrenceType

enum (LineItemRecurrenceType)

Output only. The recurrence type of the line item.

oneTimeRecurrenceDetails

object (OneTimeRecurrenceDetails)

Output only. Details only set for a ONE_TIME recurrence line item.

productPayload

object (ProductPayload)

Optional. Product specific payload for this line item.

amount

object (Amount)

Output only. The price of the product/service in this line item. The amount could be the wholesale price, or it can include a cost of sale based on the contract.

bundleDetails

object (BundleDetails)

Output only. The bundle details for the line item. Only populated if the line item corresponds to a hard bundle.

finiteBillingCycleDetails

object (FiniteBillingCycleDetails)

Optional. Details for a subscription line item with finite billing cycles. If unset, the line item will be charged indefinitely. Used only with LINE_ITEM_RECURRENCE_TYPE_PERIODIC.

lineItemIndex

integer

Output only. A unique index of the subscription line item.

LineItemState

The state of a subscription line item.

Enums
LINE_ITEM_STATE_UNSPECIFIED Unspecified state.
LINE_ITEM_STATE_ACTIVE The line item is in ACTIVE state. If the subscription is cancelled or suspended, the line item will not be charged even if the line item is active.
LINE_ITEM_STATE_INACTIVE The line item is in INACTIVE state.
LINE_ITEM_STATE_NEW The line item is new, and is not activated or charged yet.
LINE_ITEM_STATE_ACTIVATING The line item is being activated in order to be charged. If a free trial applies to the line item, the line item is pending a prorated charge at the end of the free trial period, as indicated by lineItemFreeTrialEndTime.
LINE_ITEM_STATE_DEACTIVATING The line item is being deactivated, and a prorated refund in being processed.
LINE_ITEM_STATE_WAITING_TO_DEACTIVATE The line item is scheduled to be deactivated at the end of the current cycle.
LINE_ITEM_STATE_OFF_CYCLE_CHARGING Line item is being charged off-cycle.

LineItemRecurrenceType

The recurrence type of the line item.

Enums
LINE_ITEM_RECURRENCE_TYPE_UNSPECIFIED The line item recurrence type is unspecified.
LINE_ITEM_RECURRENCE_TYPE_PERIODIC The line item recurs periodically.
LINE_ITEM_RECURRENCE_TYPE_ONE_TIME The line item does not recur in the future.

OneTimeRecurrenceDetails

Details for a ONE_TIME recurrence line item.

JSON representation
{
  "servicePeriod": {
    object (ServicePeriod)
  }
}
Fields
servicePeriod

object (ServicePeriod)

Output only. The service period of the ONE_TIME line item.

ProductPayload

Specifies product specific payload.

JSON representation
{
  "googleOnePayload": {
    object (GoogleOnePayload)
  },
  "youtubePayload": {
    object (YoutubePayload)
  },
  "googleHomePayload": {
    object (GoogleHomePayload)
  }
}
Fields
googleOnePayload

object (GoogleOnePayload)

Product-specific payloads. Payload specific to Google One products.

youtubePayload

object (YoutubePayload)

Payload specific to Youtube products.

googleHomePayload

object (GoogleHomePayload)

Payload specific to Google Home products.

GoogleOnePayload

Payload specific to Google One products.

JSON representation
{
  "campaigns": [
    string
  ],
  "salesChannel": enum (Channel),
  "storeId": string,
  "offering": enum (Offering)
}
Fields
campaigns[]

string

Campaign attributed to sales of this subscription.

salesChannel

enum (Channel)

The type of sales channel through which the subscription was sold.

storeId

string

The identifier for the partner store where the subscription was sold.

offering

enum (Offering)

The type of offering the subscription was sold by the partner. e.g. VAS.

Channel

Describes the channel through which the subscription was sold by partner.

Enums
CHANNEL_UNSPECIFIED The channel type is unspecified.
CHANNEL_RETAIL Sold at store.
CHANNEL_ONLINE_WEB Sold through partner website.
CHANNEL_ONLINE_ANDROID_APP Sold through partner android app.
CHANNEL_ONLINE_IOS_APP Sold through partner iOS app.

Offering

Describes the type of partner offering the subscription was part of.

Enums
OFFERING_UNSPECIFIED The type of partner offering is unspecified.
OFFERING_VAS_BUNDLE Google One product purchased as a Value added service in addition to existing partner's products. Customer pays additional amount for Google One product.
OFFERING_VAS_STANDALONE Google One product purchased by itself by customer as a value add service. Customer pays additional amount for Google One product.
OFFERING_HARD_BUNDLE Product purchased as part of a hard bundle where Google One was included with the bundle. Google One pricing is included in the bundle.
OFFERING_SOFT_BUNDLE Purchased as part of a bundle where Google One was provided as an option. Google One pricing is included in the bundle.

YoutubePayload

Payload specific to Youtube products.

JSON representation
{
  "partnerEligibilityIds": [
    string
  ],
  "accessEndTime": string,
  "partnerPlanType": enum (PartnerPlanType)
}
Fields
partnerEligibilityIds[]

string

The list of eligibility_ids which are applicable for the line item.

accessEndTime

string (Timestamp format)

Output only. The access expiration time for this line item.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

partnerPlanType

enum (PartnerPlanType)

Optional. Specifies the plan type offered to the end user by the partner.

PartnerPlanType

Partner side plan type.

Enums
PARTNER_PLAN_TYPE_UNSPECIFIED Unspecified. Should not use, reserved as an invalid value.
PARTNER_PLAN_TYPE_STANDALONE This item is offered as a standalone product to the user.
PARTNER_PLAN_TYPE_HARD_BUNDLE This item is bundled with another partner offering, the item is provisioned at purchase time.
PARTNER_PLAN_TYPE_SOFT_BUNDLE This item is bundled with another partner offering, the item is provisioned after puchase, when the user opts in this Google service.

GoogleHomePayload

Payload specific for Google Home products.

JSON representation
{
  "partnerStructureId": string,
  "googleStructureId": string,
  "attachedToGoogleStructure": boolean
}
Fields
partnerStructureId

string

Optional. This identifies the structure ID on partner side that the subscription should be applied to. Only required when the partner requires structure mapping.

googleStructureId

string

Optional. Structure identifier on Google side.

attachedToGoogleStructure

boolean

Output only. This identifies whether the subscription is attached to a Google Home structure.

BundleDetails

The bundle details for a line item corresponding to a hard bundle.

JSON representation
{
  "bundleElementDetails": [
    {
      object (BundleElementDetails)
    }
  ]
}
Fields
bundleElementDetails[]

object (BundleElementDetails)

Output only. The details for each element in the hard bundle.

BundleElementDetails

The details for an element in the hard bundle.

JSON representation
{
  "product": string,
  "userAccountLinkedTime": string
}
Fields
product

string

Output only. Product resource name that identifies the bundle element. The format is 'partners/{partner_id}/products/{productId}'.

userAccountLinkedTime

string (Timestamp format)

Output only. The time when this product is linked to an end user.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

Methods

patch

Updates a line item of a subscription.