ProposedOrder

呼叫端要求使用者確認的訂單。

JSON 表示法
{
  "id": string,
  "cart": {
    object(Cart)
  },
  "otherItems": [
    {
      object(LineItem)
    }
  ],
  "image": {
    object(Image)
  },
  "termsOfServiceUrl": string,
  "totalPrice": {
    object(Price)
  },
  "extension": {
    "@type": string,
    field1: ...,
    ...
  }
}
欄位
id

string

此 ProposedOrder 的選用 ID。隨附於 ProposedOrder,於確認時將商品退回整合商。

cart

object(Cart)

使用者的項目。

otherItems[]

object(LineItem)

費用、調整項、小計等

image

object(Image)

與所提出訂單相關聯的圖片。

termsOfServiceUrl

string

適用於此提案訂單的服務條款連結。

totalPrice

object(Price)

提案訂單的總價。如果類型為 ACTUAL,這是呼叫端在使用者確認建議的訂單時要收取的金額。

extension

object

根據訂單類型為提議訂單延伸的內容。舉例來說,如果訂單包含地點,則這則額外資訊會包含 OrderLocation 值。

含有任意類型欄位的物件。額外的 "@type" 欄位則包含能辨識類型的 URI。範例:{ "id": 1234, "@type": "types.example.com/standard/id" }

購物車

使用者想要的商品購物車。

JSON 表示法
{
  "id": string,
  "merchant": {
    object(Merchant)
  },
  "lineItems": [
    {
      object(LineItem)
    }
  ],
  "otherItems": [
    {
      object(LineItem)
    }
  ],
  "notes": string,
  "promotions": [
    {
      object(Promotion)
    }
  ],
  "extension": {
    "@type": string,
    field1: ...,
    ...
  }
}
欄位
id

string

這個購物車的選填 ID。此為購物車的一部分,在確認時將商品退回整合商。

merchant

object(Merchant)

購物車的商家 (如果與呼叫端不同的話)。

lineItems[]

object(LineItem)

使用者訂購的商品或服務。必須至少有一個委刊項。

otherItems[]

object(LineItem)

使用者輸入的調整項,例如:也沒有問題

notes

string

這個購物車的相關附註。

promotions[]

object(Promotion)

選用設定。已加入購物車的促銷優待券。系統會將符合資格的促銷活動做為建議訂單中的折扣委刊項退回。

extension

object

根據訂單類型納入購物車中的額外資訊。

含有任意類型欄位的物件。額外的 "@type" 欄位則包含能辨識類型的 URI。範例:{ "id": 1234, "@type": "types.example.com/standard/id" }

商家

購物車的商家。

JSON 表示法
{
  "id": string,
  "name": string
}
欄位
id

string

商家的 ID。

name

string

向使用者顯示的商家名稱。這是必要項目。

LineItem

訂單中的委刊項。

JSON 表示法
{
  "id": string,
  "name": string,
  "type": enum(LineItemType),
  "quantity": number,
  "description": string,
  "image": {
    object(Image)
  },
  "price": {
    object(Price)
  },
  "subLines": [
    {
      object(SubLine)
    }
  ],
  "offerId": string,
  "extension": {
    "@type": string,
    field1: ...,
    ...
  }
}
欄位
id

string

購物車/訂單中明細項目的專屬 ID。這是必要項目。

name

string

收據中顯示的明細項目名稱。這是必要項目。

type

enum(LineItemType)

委刊項類型。

quantity

number

包含項目數量。

description

string

商品說明。

image

object(Image)

與這個項目相關聯的小型圖片。

price

object(Price)

每個委刊項都必須設定價格,即使價格為 0 也一樣。必要欄位。這是收據上列載的總金額 (即單價 * 數量)。

subLines[]

object(SubLine)

子委刊項。只有類型為 REGULAR 時才有效。

offerId

string

選填的產品或優惠 ID。

extension

object

根據類型加入委刊項的額外資訊。

含有任意類型欄位的物件。額外的 "@type" 欄位則包含能辨識類型的 URI。範例:{ "id": 1234, "@type": "types.example.com/standard/id" }

SubLine

與訂單中的委刊項相關聯的子委刊項。

JSON 表示法
{

  // Union field subline can be only one of the following:
  "lineItem": {
    object(LineItem)
  },
  "note": string
  // End of list of possible types for union field subline.
}
欄位
聯集欄位 subline。子委刊項。subline 只能是下列其中一項:
lineItem

object(LineItem)

一般委刊項 (例如附加廣告)。

note

string

與委刊項相關聯的附註。

宣傳

促銷活動已加入購物車。

JSON 表示法
{
  "coupon": string
}
欄位
coupon

string

必要欄位。第三方可解讀優待券代碼。例如:GOOGLE10。