方法:jwt.insert

在 JWT 中插入資源。

HTTP 要求

POST https://walletobjects.googleapis.com/walletobjects/v1/jwt

這個網址使用 gRPC 轉碼語法。

要求內容

要求內容包含 JwtResource 的例項。

回應內容

如果成功,則回應內容包含具有以下結構的資料:

JSON 表示法

{
  "saveUri": string,
  "resources": {
    object (Resources)
  }
}
欄位
saveUri

string

URI,開啟此 URI 之後,使用者即可將 JWT 中識別的物件儲存至 Google 帳戶。

resources

object (Resources)

與在 JWT. 資源中提供的類別 ID 和物件 ID 對應的資料,只會包含非空白陣列 (也就是說,如果 JWT 僅包含 eventTicketObjects,那麼資源中只會出現這個欄位)。

授權範圍

需要下列 OAuth 範圍:

  • https://www.googleapis.com/auth/wallet_object.issuer

資源

JSON 表示法

{
  "eventTicketClasses": [
    {
      object (EventTicketClass)
    }
  ],
  "eventTicketObjects": [
    {
      object (EventTicketObject)
    }
  ],
  "flightClasses": [
    {
      object (FlightClass)
    }
  ],
  "flightObjects": [
    {
      object (FlightObject)
    }
  ],
  "giftCardClasses": [
    {
      object (GiftCardClass)
    }
  ],
  "giftCardObjects": [
    {
      object (GiftCardObject)
    }
  ],
  "loyaltyClasses": [
    {
      object (LoyaltyClass)
    }
  ],
  "loyaltyObjects": [
    {
      object (LoyaltyObject)
    }
  ],
  "offerClasses": [
    {
      object (OfferClass)
    }
  ],
  "offerObjects": [
    {
      object (OfferObject)
    }
  ],
  "transitClasses": [
    {
      object (TransitClass)
    }
  ],
  "transitObjects": [
    {
      object (TransitObject)
    }
  ]
}
欄位
eventTicketClasses[]

object (EventTicketClass)

eventTicketObjects[]

object (EventTicketObject)

flightClasses[]

object (FlightClass)

flightObjects[]

object (FlightObject)

giftCardClasses[]

object (GiftCardClass)

giftCardObjects[]

object (GiftCardObject)

loyaltyClasses[]

object (LoyaltyClass)

loyaltyObjects[]

object (LoyaltyObject)

offerClasses[]

object (OfferClass)

offerObjects[]

object (OfferObject)

transitClasses[]

object (TransitClass)

transitObjects[]

object (TransitObject)