REST Resource: billingAccounts.orders

Resource: Order

Represents a purchase made by a customer on Cloud Marketplace. Creating an order makes sure that both the Google backend systems as well as external service provider's systems (if needed) allow use of purchased products and ensures the appropriate billing events occur.

An Order can be made against one Product with multiple add-ons (optional) or one Quote which might reference multiple products.

Customers typically choose a price plan for each Product purchased when they create an order and can change their plan later, if the product allows.

JSON representation
{
  "name": string,
  "displayName": string,
  "lineItems": [
    {
      object (LineItem)
    }
  ],
  "cancelledLineItems": [
    {
      object (LineItem)
    }
  ],
  "createTime": string,
  "updateTime": string,
  "etag": string
}
Fields
name

string

Output only. The resource name of the order. Has the form billingAccounts/{billing_account}/orders/{order}.

displayName

string

Required. The user-specified name of the order.

lineItems[]

object (LineItem)

Output only. The items being purchased.

cancelledLineItems[]

object (LineItem)

Output only. Line items that were cancelled.

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".

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".

etag

string

The weak etag of the order.

LineItem

A single item within an order.

JSON representation
{
  "lineItemId": string,
  "lineItemInfo": {
    object (LineItemInfo)
  },
  "pendingChange": {
    object (LineItemChange)
  },
  "changeHistory": [
    {
      object (LineItemChange)
    }
  ]
}
Fields
lineItemId

string

Output only. Line item ID.

lineItemInfo

object (LineItemInfo)

Output only. Current state and information of this item. It tells what, e.g. which offer, is currently effective.

pendingChange

object (LineItemChange)

Output only. A change made on the item which is pending and not yet effective. Absence of this field indicates the line item is not undergoing a change.

changeHistory[]

object (LineItemChange)

Output only. Changes made on the item that are not pending anymore which might be because they already took effect, were reverted by the customer, or were rejected by the partner. No more operations are allowed on these changes.

LineItemInfo

Line item information.

JSON representation
{
  "offer": string,
  "parameters": [
    {
      object (Parameter)
    }
  ],
  "subscription": {
    object (Subscription)
  }
}
Fields
offer

string

Optional. The name of the offer can have either of these formats: 'billingAccounts/{billing_account}/offers/{offer}', or 'services/{service}/standardOffers/{offer}'.

parameters[]

object (Parameter)

Optional. User-provided parameters.

subscription

object (Subscription)

Output only. Information about the subscription created, if applicable.

Parameter

User-provided Parameters.

JSON representation
{
  "name": string,
  "value": {
    object (Value)
  }
}
Fields
name

string

Name of the parameter.

value

object (Value)

Value of parameter.

Value

JSON representation
{

  // Union field kind can be only one of the following:
  "int64Value": string,
  "stringValue": string,
  "doubleValue": number
  // End of list of possible types for union field kind.
}
Fields
Union field kind. The kind of value. kind can be only one of the following:
int64Value

string (int64 format)

Represents an int64 value.

stringValue

string

Represents a string value.

doubleValue

number

Represents a double value.

Subscription

Subscription information.

JSON representation
{
  "startTime": string,
  "endTime": string,
  "autoRenewalEnabled": boolean
}
Fields
startTime

string (Timestamp format)

The timestamp when the subscription begins, if applicable.

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".

endTime

string (Timestamp format)

The timestamp when the subscription ends, if applicable.

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".

autoRenewalEnabled

boolean

Whether auto renewal is enabled by user choice on current subscription. This field indicates order/subscription status after pending plan change is cancelled or rejected.

LineItemChange

A change made on a line item.

JSON representation
{
  "changeId": string,
  "changeType": enum (LineItemChangeType),
  "oldLineItemInfo": {
    object (LineItemInfo)
  },
  "newLineItemInfo": {
    object (LineItemInfo)
  },
  "changeState": enum (LineItemChangeState),
  "stateReason": string,
  "changeStateReasonType": enum (LineItemChangeStateReasonType),
  "changeEffectiveTime": string,
  "createTime": string,
  "updateTime": string
}
Fields
changeId

string

Output only. Change ID. All changes made within one order update operation have the same changeId.

changeType

enum (LineItemChangeType)

Required. Type of the change to make.

oldLineItemInfo

object (LineItemInfo)

Output only. Line item info before the change.

newLineItemInfo

object (LineItemInfo)

Line item info after the change.

changeState

enum (LineItemChangeState)

Output only. State of the change.

stateReason

string

Output only. Provider-supplied message explaining the LineItemChange's state. Mainly used to communicate progress and ETA for provisioning in the case of PENDING_APPROVAL, and to explain why the change request was denied or canceled in the case of REJECTED and CANCELED states.

changeStateReasonType

enum (LineItemChangeStateReasonType)

Output only. Predefined enum types for why this line item change is in current state. For example, a line item change's state could be LINE_ITEM_CHANGE_STATE_COMPLETED because of end-of-term expiration, immediate cancellation initiated by the user, or system-initiated cancellation.

changeEffectiveTime

string (Timestamp format)

Output only. A time at which the change became or will become (in case of pending change) effective.

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 time when change was initiated.

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".

updateTime

string (Timestamp format)

Output only. The time when change was updated, e.g. approved/rejected by partners or cancelled by the user.

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".

LineItemChangeType

Type of a line item change.

Enums
LINE_ITEM_CHANGE_TYPE_UNSPECIFIED Sentinel value. Do not use.
LINE_ITEM_CHANGE_TYPE_CREATE The change is to create a new line item.
LINE_ITEM_CHANGE_TYPE_UPDATE The change is to update an existing line item.
LINE_ITEM_CHANGE_TYPE_CANCEL The change is to cancel an existing line item.
LINE_ITEM_CHANGE_TYPE_REVERT_CANCELLATION The change is to revert a cancellation.

LineItemChangeState

State of a change.

Enums
LINE_ITEM_CHANGE_STATE_UNSPECIFIED Sentinel value. Do not use.
LINE_ITEM_CHANGE_STATE_PENDING_APPROVAL Change is in this state when a change is initiated and waiting for partner approval. This state is only applicable for pending change.
LINE_ITEM_CHANGE_STATE_APPROVED Change is in this state after it's approved by the partner or auto-approved but before it takes effect. The change can be overwritten or cancelled depending on the new line item info property (pending Private Offer change cannot be cancelled and can only be overwritten by another Private Offer). This state is only applicable for pending change.
LINE_ITEM_CHANGE_STATE_COMPLETED Change is in this state after it's been activated. This state is only applicable for change in history.
LINE_ITEM_CHANGE_STATE_REJECTED Change is in this state if it was rejected by the partner. This state is only applicable for change in history.
LINE_ITEM_CHANGE_STATE_ABANDONED Change is in this state if it was abandoned by the user. This state is only applicable for change in history.
LINE_ITEM_CHANGE_STATE_ACTIVATING Change is in this state if it's currently being provisioned downstream. The change can't be overwritten or cancelled when it's in this state. This state is only applicable for pending change.

LineItemChangeStateReasonType

Predefined types for line item change state reason.

Enums
LINE_ITEM_CHANGE_STATE_REASON_TYPE_UNSPECIFIED Default value, indicating there's no predefined type for change state reason.
LINE_ITEM_CHANGE_STATE_REASON_TYPE_EXPIRED Change is in current state due to term expiration.
LINE_ITEM_CHANGE_STATE_REASON_TYPE_USER_CANCELLED Change is in current state due to user-initiated cancellation.
LINE_ITEM_CHANGE_STATE_REASON_TYPE_SYSTEM_CANCELLED Change is in current state due to system-initiated cancellation.

Methods

cancel

Cancels an existing Order.

get

Returns the requested Order resource.

getLicensePool

Gets the license pool.

list

Lists Order resources that the user has access to, within the scope of the parent resource.

modify

Modifies an existing Order resource.

place

Creates a new Order.