MCP Tools Reference: paydeveloper.googleapis.com

工具:list_pass_classes

擷取與已驗證使用者相關聯的 Google 錢包商家控制台中,註冊的所有票證類別完整清單。這項工具可為管理會員卡、禮物卡或航班等 Google 錢包票證的開發人員,提供重要資訊。

以下範例示範如何使用 curl 叫用 list_pass_classes MCP 工具。

Curl 要求
                  
curl --location 'https://paydeveloper.googleapis.com/mcp' \
--header 'content-type: application/json' \
--header 'accept: application/json, text/event-stream' \
--data '{
  "method": "tools/call",
  "params": {
    "name": "list_pass_classes",
    "arguments": {
      // provide these details according to the tool's MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'
                

輸入內容的結構定義

要求訊息,列出發卡機構的票證類別。

ListPassClassesRequest

JSON 表示法
{
  "issuerId": string,
  "passType": enum (PassType),
  "view": enum (PassClassView)
}
欄位
issuerId

string (int64 format)

必填。要列出票證類別的發卡機構專屬 ID。

passType

enum (PassType)

(選用步驟) 要列出的票證類別。如未指定,系統會傳回所有類型的票證類別。

view

enum (PassClassView)

(選用步驟) 指定要為每個票證類別傳回的詳細資料層級。

輸出內容的結構定義

列出核發機構票證類別的回應訊息。

ListPassClassesResponse

JSON 表示法
{
  "passClasses": [
    {
      object (PassClass)
    }
  ]
}
欄位
passClasses[]

object (PassClass)

發卡機構的票證類別。

PassClass

JSON 表示法
{

  // Union field resource can be only one of the following:
  "loyaltyClass": {
    object (LoyaltyClass)
  },
  "giftCardClass": {
    object (GiftCardClass)
  },
  "offerClass": {
    object (OfferClass)
  },
  "eventTicketClass": {
    object (EventTicketClass)
  },
  "flightClass": {
    object (FlightClass)
  },
  "transitClass": {
    object (TransitClass)
  },
  "genericClass": {
    object (GenericClass)
  }
  // End of list of possible types for union field resource.
}
欄位

聯集欄位 resource

resource 只能是下列其中一項:

loyaltyClass

object (LoyaltyClass)

(選用步驟) 核發機構的會員類別。

giftCardClass

object (GiftCardClass)

(選用步驟) 發卡機構的儲值卡類別。

offerClass

object (OfferClass)

(選用步驟) 發卡機構的優惠類別。

eventTicketClass

object (EventTicketClass)

(選用步驟) 發卡機構的活動票券類別。

flightClass

object (FlightClass)

(選用步驟) 發卡機構的航班艙等。

transitClass

object (TransitClass)

(選用步驟) 發卡機構的交通運輸類別。

genericClass

object (GenericClass)

(選用步驟) 發卡機構的泛型類別。

LoyaltyClass

JSON 表示法
{
  "id": string,
  "issuerName": string,
  "localizedIssuerName": {
    object (LocalizedString)
  },
  "programName": string,
  "localizedProgramName": {
    object (LocalizedString)
  },
  "programLogoUri": string,
  "hexBackgroundColor": string,
  "heroImageUri": string,
  "discoverableProgram": {
    object (DiscoverableProgram)
  },
  "classTemplateInfo": {
    object (ClassTemplateInfo)
  }
}
欄位
id

string

(選用步驟) 會員類別的 ID。

issuerName

string

(選用步驟) 會員類別的發卡機構名稱。

localizedIssuerName

object (LocalizedString)

(選用步驟) 會員等級的本地化發卡機構名稱。

programName

string

(選用步驟) 會員類別的方案名稱。

localizedProgramName

object (LocalizedString)

(選用步驟) 會員等級的本地化方案名稱。

programLogoUri

string

(選用步驟) 會員等級的方案標誌。

hexBackgroundColor

string

(選用步驟) 會員等級的背景顏色。格式為十六進位顏色字串,例如「#RRGGBB」。

heroImageUri

string

(選用步驟) 顯示在會員卡正面的橫幅圖片。

discoverableProgram

object (DiscoverableProgram)

(選用步驟) 如何在 Google 錢包中探索會員類別及將類別例項化的相關資訊。

classTemplateInfo

object (ClassTemplateInfo)

(選用步驟) 會員類別的顯示方式範本資訊。

LocalizedString

JSON 表示法
{
  "translatedValues": [
    {
      object (TranslatedString)
    }
  ],
  "defaultValue": {
    object (TranslatedString)
  }
}
欄位
translatedValues[]

object (TranslatedString)

(選用步驟) 字串的翻譯字串。

defaultValue

object (TranslatedString)

(選用步驟) 沒有適當翻譯時顯示的字串。

TranslatedString

JSON 表示法
{
  "languageCode": string,
  "value": string
}
欄位
languageCode

string

(選用步驟) BCP 47 語言標記。範例值:「en-US」、「en-GB」、「de」或「de-AT」。

value

string

(選用步驟) 採 UTF-8 編碼的翻譯字串。

DiscoverableProgram

JSON 表示法
{
  "merchantSignupInfo": {
    object (MerchantSignupInfo)
  },
  "merchantSigninInfo": {
    object (MerchantSigninInfo)
  },
  "state": enum (State)
}
欄位
merchantSignupInfo

object (MerchantSignupInfo)

(選用步驟) 透過商家網站註冊這項可探索方案並為該方案新增有價值項目之功能的相關資訊。

merchantSigninInfo

object (MerchantSigninInfo)

(選用步驟) 有關如何登入以及透過商家網站為該可探索方案加值的相關資訊。

state

enum (State)

僅供輸出。可探索方案的狀態。

MerchantSignupInfo

JSON 表示法
{
  "signupWebsite": {
    object (Uri)
  },
  "signupSharedDatas": [
    enum (SharedDataType)
  ]
}
欄位
signupWebsite

object (Uri)

(選用步驟) 可探索方案的註冊網站。

signupSharedDatas[]

enum (SharedDataType)

(選用步驟) 在 POST 要求中傳送至註冊網站網址的使用者資料。這項資訊會先經過編碼再共用,因此商家網站可以預先填入欄位,以便讓使用者註冊可供搜索的方案。

URI

JSON 表示法
{
  "uri": string,
  "description": string,
  "localizedDescription": {
    object (LocalizedString)
  }
}
欄位
uri

string

(選用步驟) URI。

description

string

(選用步驟) 在 Google 錢包中以文字顯示的 URI 標題。

localizedDescription

object (LocalizedString)

(選用步驟) 在 Google 錢包中以文字顯示的 URI 標題譯文。

MerchantSigninInfo

JSON 表示法
{
  "signinWebsite": {
    object (Uri)
  }
}
欄位
signinWebsite

object (Uri)

(選用步驟) 可探索方案的登入網站。

ClassTemplateInfo

JSON 表示法
{
  "cardBarcodeSectionDetails": {
    object (CardBarcodeSectionDetails)
  },
  "cardTemplateOverride": {
    object (CardTemplateOverride)
  },
  "detailsTemplateOverride": {
    object (DetailsTemplateOverride)
  },
  "listTemplateOverride": {
    object (ListTemplateOverride)
  }
}
欄位
cardBarcodeSectionDetails

object (CardBarcodeSectionDetails)

(選用步驟) 顯示於條碼上方和下方的其他資訊。

cardTemplateOverride

object (CardTemplateOverride)

(選用步驟) 資訊卡檢視畫面的範本覆寫內容。

detailsTemplateOverride

object (DetailsTemplateOverride)

(選用步驟) 詳細資料檢視畫面的範本覆寫。

listTemplateOverride

object (ListTemplateOverride)

(選用步驟) 票證清單檢視畫面的範本覆寫內容。

CardBarcodeSectionDetails

JSON 表示法
{
  "firstTopDetail": {
    object (BarcodeSectionDetail)
  },
  "firstBottomDetail": {
    object (BarcodeSectionDetail)
  },
  "secondTopDetail": {
    object (BarcodeSectionDetail)
  }
}
欄位
firstTopDetail

object (BarcodeSectionDetail)

(選用步驟) 要顯示於條碼上方的選擇性資訊。如已定義 secondTopDetail,這項資訊將會顯示在這個詳細資料區段的開頭。

firstBottomDetail

object (BarcodeSectionDetail)

(選用步驟) 要顯示於條碼下方的選擇性資訊。

secondTopDetail

object (BarcodeSectionDetail)

(選用步驟) 顯示於條碼上方的第二則選擇性資訊。如已定義 firstTopDetail,這項資訊將會顯示在這個詳細資料區段的結尾。

BarcodeSectionDetail

JSON 表示法
{
  "fieldSelector": {
    object (FieldSelector)
  }
}
欄位
fieldSelector

object (FieldSelector)

(選用步驟) 要顯示的現有文字或圖片欄位參照。

FieldSelector

JSON 表示法
{
  "fields": [
    {
      object (FieldReference)
    }
  ]
}
欄位
fields[]

object (FieldReference)

(選用步驟) 用於欄位覆寫的欄位參照。如果提供多個參照,將顯示第一個參照非空白欄位的參照。

FieldReference

JSON 表示法
{
  "fieldPath": string,
  "dateFormat": enum (DateFormat)
}
欄位
fieldPath

string

(選用步驟) 參照欄位的路徑,前面加上「object」或「class」,並以點號分隔。

dateFormat

enum (DateFormat)

(選用步驟) 用於顯示日期/時間欄位的日期格式。

CardTemplateOverride

JSON 表示法
{
  "cardRowTemplateInfos": [
    {
      object (CardRowTemplateInfo)
    }
  ]
}
欄位
cardRowTemplateInfos[]

object (CardRowTemplateInfo)

(選用步驟) 資訊卡檢視畫面中的資料列範本資訊。最多只能指定三列。

CardRowTemplateInfo

JSON 表示法
{

  // Union field row_template can be only one of the following:
  "oneItem": {
    object (CardRowOneItem)
  },
  "twoItems": {
    object (CardRowTwoItems)
  },
  "threeItems": {
    object (CardRowThreeItems)
  }
  // End of list of possible types for union field row_template.
}
欄位
聯集欄位 row_template。單一列包含一、二或三個項目的範本。row_template 只能是下列其中一項:
oneItem

object (CardRowOneItem)

(選用步驟) 單一列包含一個項目的範本。

twoItems

object (CardRowTwoItems)

(選用步驟) 單一列包含兩個項目的範本。

threeItems

object (CardRowThreeItems)

(選用步驟) 單一列包含三個項目的範本。

CardRowOneItem

JSON 表示法
{
  "item": {
    object (TemplateItem)
  }
}
欄位
item

object (TemplateItem)

(選用步驟) 要在資料列中顯示的項目。此項目會置中。

TemplateItem

JSON 表示法
{
  "firstValue": {
    object (FieldSelector)
  },
  "secondValue": {
    object (FieldSelector)
  },
  "predefinedItem": enum (PredefinedItem)
}
欄位
firstValue

object (FieldSelector)

(選用步驟) 要顯示的第一個欄位參照。

secondValue

object (FieldSelector)

(選用步驟) 要顯示的第二個欄位參照。

predefinedItem

enum (PredefinedItem)

(選用步驟) 要顯示的預先定義項目。

CardRowTwoItems

JSON 表示法
{
  "startItem": {
    object (TemplateItem)
  },
  "endItem": {
    object (TemplateItem)
  }
}
欄位
startItem

object (TemplateItem)

(選用步驟) 要在資料列開頭顯示的項目。這個項目會靠左對齊。

endItem

object (TemplateItem)

(選用步驟) 要顯示於資料列結尾的項目。這個項目會靠右對齊。

CardRowThreeItems

JSON 表示法
{
  "startItem": {
    object (TemplateItem)
  },
  "middleItem": {
    object (TemplateItem)
  },
  "endItem": {
    object (TemplateItem)
  }
}
欄位
startItem

object (TemplateItem)

(選用步驟) 要在資料列開頭顯示的項目。這個項目會靠左對齊。

middleItem

object (TemplateItem)

(選用步驟) 要顯示於資料列中間的項目。這個項目會置中放置在開始和結束項目之間。

endItem

object (TemplateItem)

(選用步驟) 要顯示於資料列結尾的項目。這個項目會靠右對齊。

DetailsTemplateOverride

JSON 表示法
{
  "detailsItemInfos": [
    {
      object (DetailsItemInfo)
    }
  ]
}
欄位
detailsItemInfos[]

object (DetailsItemInfo)

(選用步驟) 詳細資料清單中顯示項目的範本資訊。

DetailsItemInfo

JSON 表示法
{
  "item": {
    object (TemplateItem)
  }
}
欄位
item

object (TemplateItem)

(選用步驟) 要在詳細資料清單中顯示的項目。

ListTemplateOverride

JSON 表示法
{
  "firstRowOption": {
    object (FirstRowOption)
  },
  "secondRowOption": {
    object (FieldSelector)
  }
}
欄位
firstRowOption

object (FirstRowOption)

(選用步驟) 要在第一列顯示的欄位參照。

secondRowOption

object (FieldSelector)

(選用步驟) 要在第二列顯示的欄位參照。

FirstRowOption

JSON 表示法
{
  "transitOption": enum (TransitOption),
  "fieldOption": {
    object (FieldSelector)
  }
}
欄位
transitOption

enum (TransitOption)

(選用步驟) 要在第一列顯示的大眾運輸選項。

fieldOption

object (FieldSelector)

(選用步驟) 要在第一列顯示的欄位參照。

GiftCardClass

JSON 表示法
{
  "id": string,
  "issuerName": string,
  "localizedIssuerName": {
    object (LocalizedString)
  },
  "merchantName": string,
  "localizedMerchantName": {
    object (LocalizedString)
  },
  "programLogoUri": string,
  "hexBackgroundColor": string,
  "heroImageUri": string,
  "homePageUri": {
    object (Uri)
  },
  "classTemplateInfo": {
    object (ClassTemplateInfo)
  }
}
欄位
id

string

(選用步驟) 儲值卡類別的 ID。

issuerName

string

(選用步驟) 儲值卡類別的核發機構名稱。

localizedIssuerName

object (LocalizedString)

(選用步驟) 儲值卡類別的本地化發卡機構名稱。

merchantName

string

(選用步驟) 禮物卡類別的商家名稱。

localizedMerchantName

object (LocalizedString)

(選用步驟) 禮物卡類別的本地化商家名稱。

programLogoUri

string

(選用步驟) 儲值卡類別的方案標誌。

hexBackgroundColor

string

(選用步驟) 禮物卡類別的背景顏色。格式為十六進位顏色字串,例如「#RRGGBB」。

heroImageUri

string

(選用步驟) 顯示在禮物卡類別正面的橫幅圖片。

homePageUri

object (Uri)

(選用步驟) 應用程式首頁的網站。

classTemplateInfo

object (ClassTemplateInfo)

(選用步驟) 禮物卡類別的顯示方式範本資訊。

OfferClass

JSON 表示法
{
  "id": string,
  "issuerName": string,
  "localizedIssuerName": {
    object (LocalizedString)
  },
  "provider": string,
  "localizedProvider": {
    object (LocalizedString)
  },
  "title": string,
  "localizedTitle": {
    object (LocalizedString)
  },
  "titleImageUri": string,
  "hexBackgroundColor": string,
  "heroImageUri": string,
  "redemptionChannel": enum (RedemptionChannel),
  "classTemplateInfo": {
    object (ClassTemplateInfo)
  }
}
欄位
id

string

(選用步驟) 優惠類別的 ID。

issuerName

string

(選用步驟) 優惠類別的發卡機構名稱。

localizedIssuerName

object (LocalizedString)

(選用步驟) 優惠類別的本地化發卡機構名稱。

provider

string

(選用步驟) 優惠類別的供應商。

localizedProvider

object (LocalizedString)

(選用步驟) 優惠類別的本地化供應商。

title

string

(選用步驟) 優惠類別的標題。

localizedTitle

object (LocalizedString)

(選用步驟) 優惠類別的本地化標題。

titleImageUri

string

(選用步驟) 優惠類別的標題圖片。

hexBackgroundColor

string

(選用步驟) 優惠類別的背景顏色。格式為十六進位顏色字串,例如「#RRGGBB」。

heroImageUri

string

(選用步驟) 顯示在優惠類別正面的橫幅圖片。

redemptionChannel

enum (RedemptionChannel)

(選用步驟) 優惠類別的兌換管道。

classTemplateInfo

object (ClassTemplateInfo)

(選用步驟) 優惠類別的顯示方式範本資訊。

EventTicketClass

JSON 表示法
{
  "id": string,
  "issuerName": string,
  "localizedIssuerName": {
    object (LocalizedString)
  },
  "logoUri": string,
  "eventName": {
    object (LocalizedString)
  },
  "venue": {
    object (EventVenue)
  },
  "dateTime": {
    object (EventDateTime)
  },
  "hexBackgroundColor": string,
  "heroImageUri": string,
  "classTemplateInfo": {
    object (ClassTemplateInfo)
  }
}
欄位
id

string

(選用步驟) 活動票券類別的 ID。

issuerName

string

(選用步驟) 活動票券類別的發卡機構名稱。

localizedIssuerName

object (LocalizedString)

(選用步驟) 活動票券類別的本地化發卡機構名稱。

logoUri

string

(選用步驟) 活動票券類別的標誌。

eventName

object (LocalizedString)

(選用步驟) 活動的名稱。

venue

object (EventVenue)

(選用步驟) 活動場地。

dateTime

object (EventDateTime)

(選用步驟) 活動的日期和時間資訊。

hexBackgroundColor

string

(選用步驟) 活動票券類別的背景顏色。格式為十六進位顏色字串,例如「#RRGGBB」。

heroImageUri

string

(選用步驟) 顯示在活動票券類別正面的橫幅圖片。

classTemplateInfo

object (ClassTemplateInfo)

(選用步驟) 活動票券類別的顯示範本資訊。

EventVenue

JSON 表示法
{
  "name": {
    object (LocalizedString)
  },
  "address": {
    object (LocalizedString)
  }
}
欄位
name

object (LocalizedString)

(選用步驟) 場地的名稱。

address

object (LocalizedString)

(選用步驟) 場地地址。

EventDateTime

JSON 表示法
{
  "start": string,
  "end": string
}
欄位
start

string

(選用步驟) 活動開始的日期/時間。如果活動橫跨數天,則應為活動第一天的開始日期/時間。格式為 ISO 8601 擴充格式的日期/時間 (不含時差),時間可精確指定到毫秒,例如 2027-03-05T06:30:00。

end

string

(選用步驟) 活動結束的日期/時間。如果活動橫跨數天,則應為活動最後一天的結束日期/時間。格式為 ISO 8601 擴充格式的日期/時間 (不含時差),時間可精確指定到毫秒,例如 2027-03-05T06:30:00。

FlightClass

JSON 表示法
{
  "id": string,
  "issuerName": string,
  "localizedIssuerName": {
    object (LocalizedString)
  },
  "flightHeader": {
    object (FlightHeader)
  },
  "origin": {
    object (AirportInfo)
  },
  "destination": {
    object (AirportInfo)
  },
  "localScheduledDepartureDateTime": string,
  "hexBackgroundColor": string,
  "heroImageUri": string,
  "classTemplateInfo": {
    object (ClassTemplateInfo)
  }
}
欄位
id

string

(選用步驟) 航班類別的 ID。

issuerName

string

(選用步驟) 航班類別的發卡機構名稱。

localizedIssuerName

object (LocalizedString)

(選用步驟) 航班艙等的本地化發行者名稱。

flightHeader

object (FlightHeader)

(選用步驟) 航班所屬航空公司和航班編號的相關資訊。

origin

object (AirportInfo)

(選用步驟) 出發地機場資訊。

destination

object (AirportInfo)

(選用步驟) 目的地機場的相關資訊。

localScheduledDepartureDateTime

string

(選用步驟) 飛機離開登機門 (而非跑道) 的表定日期和時間。格式為 ISO 8601 擴充格式的日期/時間 (不含時差),時間可準確指定到毫秒,例如 2027-03-05T06:30:00。這是機場的當地日期/時間 (並非世界標準時間)。

hexBackgroundColor

string

(選用步驟) 航班艙等的背景顏色。格式為十六進位顏色字串,例如「#RRGGBB」。

heroImageUri

string

(選用步驟) 顯示在航班艙等正面的橫幅圖片。

classTemplateInfo

object (ClassTemplateInfo)

(選用步驟) 航班艙等顯示方式的範本資訊。

FlightHeader

JSON 表示法
{
  "carrier": {
    object (FlightCarrier)
  },
  "flightNumber": string
}
欄位
carrier

object (FlightCarrier)

(選用步驟) 航空公司資訊。

flightNumber

string

(選用步驟) 航班編號 (不含航空公司 IATA 代碼)。欄位只包含數字,例如「123」。

FlightCarrier

JSON 表示法
{
  "carrierIataCode": string,
  "carrierIcaoCode": string,
  "airlineLogoUri": string
}
欄位
carrierIataCode

string

(選用步驟) 航空公司的 IATA 航空公司代碼 (共兩個字元)。

carrierIcaoCode

string

(選用步驟) 航空公司的 ICAO 航空公司代碼 (共 3 個字元)。

airlineLogoUri

string

(選用步驟) 由航空公司 IATA 代碼定義的航空公司標誌。

AirportInfo

JSON 表示法
{
  "airportIataCode": string,
  "terminal": string,
  "gate": string
}
欄位
airportIataCode

string

(選用步驟) IATA 機場代碼 (共三個字元),例如「SFO」。

terminal

string

(選用步驟) 航廈名稱,例如「I」。

gate

string

(選用步驟) 登機門名稱,例如「B59」。

TransitClass

JSON 表示法
{
  "id": string,
  "issuerName": string,
  "localizedIssuerName": {
    object (LocalizedString)
  },
  "hexBackgroundColor": string,
  "heroImageUri": string,
  "transitType": enum (TransitType),
  "classTemplateInfo": {
    object (ClassTemplateInfo)
  }
}
欄位
id

string

(選用步驟) 大眾運輸類別的 ID。

issuerName

string

(選用步驟) 大眾運輸類別的發卡機構名稱。

localizedIssuerName

object (LocalizedString)

(選用步驟) 大眾運輸票證類別的本地化發卡機構名稱。

hexBackgroundColor

string

(選用步驟) 大眾運輸類別的背景顏色。格式為十六進位顏色字串,例如「#RRGGBB」。

heroImageUri

string

(選用步驟) 顯示在交通運輸課程正面的橫幅圖片。

transitType

enum (TransitType)

(選用步驟) 大眾運輸類別的大眾運輸類型。

classTemplateInfo

object (ClassTemplateInfo)

(選用步驟) 運送類別的顯示方式範本資訊。

GenericClass

JSON 表示法
{
  "id": string,
  "classTemplateInfo": {
    object (ClassTemplateInfo)
  }
}
欄位
id

string

(選用步驟) 泛型類別的 ID。

classTemplateInfo

object (ClassTemplateInfo)

(選用步驟) 泛型類別的顯示方式範本資訊。

工具註解

破壞性提示:❌ | 等冪提示:✅ | 唯讀提示:✅ | 開放世界提示:❌