方法:jwt.insert

在 JWT 中插入资源。

HTTP 请求

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

网址采用 gRPC 转码语法。

请求正文

请求正文包含 JwtResource 的实例。

响应正文

如果成功,响应正文将包含结构如下的数据:

JSON 表示法

{
      "saveUri": string,
      "resources": {
        object (Resources)
      }
    }
字段
saveUri

string

打开 URI 后,最终用户可以将在 JWT 中标识的对象保存到其 Google 帐号中。

resources

Resourcesobject ()

与在 JWT 中提供的类和对象的 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[]

EventTicketClassobject ()

eventTicketObjects[]

EventTicketObjectobject ()

flightClasses[]

FlightClassobject ()

flightObjects[]

FlightObjectobject ()

giftCardClasses[]

GiftCardClassobject ()

giftCardObjects[]

GiftCardObjectobject ()

loyaltyClasses[]

LoyaltyClassobject ()

loyaltyObjects[]

LoyaltyObjectobject ()

offerClasses[]

OfferClassobject ()

offerObjects[]

OfferObjectobject ()

transitClasses[]

TransitClassobject ()

transitObjects[]

TransitObjectobject ()