REST Resource: partners.purchaseorders

Resource: PurchaseOrder

A purchase order resold via a third-party reseller.

JSON representation
{
  "name": string,
  "partnerUserToken": string,
  "lineItems": [
    {
      object (PurchaseOrderLineItem)
    }
  ],
  "subscriptionDetails": {
    object (SubscriptionDetails)
  }
}
Fields
name

string

Output only. Identifier. PurchaseOrder resource name in the format of: "partners/{partner_id}/purchaseorders/{purchaseOrderId}"

partnerUserToken

string

Required. Identifier of the end-user in partner’s system.

lineItems[]

object (PurchaseOrderLineItem)

Required. Purchase order line items.

subscriptionDetails

object (SubscriptionDetails)

Optional. Only populated if this order is related to a subscription, such as renewal or proration.

PurchaseOrderLineItem

Purchase order line item.

JSON representation
{
  "product": string,
  "description": string,
  "amount": {
    object (Amount)
  },
  "servicePeriod": {
    object (ServicePeriod)
  },
  "chargedDetails": {
    object (UnitLevelDetails)
  },
  "refundedDetails": {
    object (UnitLevelDetails)
  },
  "lineItemIndex": integer
}
Fields
product

string

Required. Product resource name in the format of partners/{partner_id}/products/{productId}.

description

string

Required. Description of this line item.

amount

object (Amount)

Required. Line item amount.

servicePeriod

object (ServicePeriod)

Optional. Service period this purchase order line item is being delivered over.

chargedDetails

object (UnitLevelDetails)

Optional. Details about units that are charged.

refundedDetails

object (UnitLevelDetails)

Optional. Details about units that are refunded.

lineItemIndex

integer

Output only. A unique index of the purchase order line item.

UnitLevelDetails

Details about a subset of units in a given process.

JSON representation
{
  "priceDetails": {
    object (PriceDetails)
  }
}
Fields
priceDetails

object (PriceDetails)

Optional. The pricing details about units in a given process.

PriceDetails

A wrapper message containing various prices.

JSON representation
{
  "pretaxAmount": {
    object (Amount)
  },
  "taxAmount": {
    object (Amount)
  },
  "totalAmount": {
    object (Amount)
  }
}
Fields
pretaxAmount

object (Amount)

Optional. The tax-exclusive amount.

taxAmount

object (Amount)

Optional. The amount of tax to collect.

totalAmount

object (Amount)

Optional. The total cost, including tax.

SubscriptionDetails

Details of the subscription this charge is related to.

JSON representation
{
  "subscription": string,
  "purchaseOrderType": enum (PurchaseOrderType)
}
Fields
subscription

string

Required. Subscription resource name in the format of: "partners/{partner_id}/subscription/{subscriptionId}"

purchaseOrderType

enum (PurchaseOrderType)

Required. The type of the purchase order.

PurchaseOrderType

The type of the purchase order.

Enums
PURCHASE_ORDER_TYPE_UNSPECIFIED Purchase order type is unspecified.
PURCHASE_ORDER_TYPE_RENEWAL This is a renewal purchase order.
PURCHASE_ORDER_TYPE_PRORATION The is a proration purchase order.
PURCHASE_ORDER_TYPE_ONE_TIME The is a one-time purchase order.
PURCHASE_ORDER_TYPE_OFF_CYCLE_CHARGE The is an off cycle charge purchase order.

Methods

authorizeCharge

Used by Google to check with reseller whether a charge for purchase order is authorized.