Offer

優惠適用的資料方案詳細說明。

JSON 表示法
{
  "planName": string,
  "planId": string,
  "planDescription": string,
  "promoMessage": string,
  "overusagePolicy": enum (OverUsagePolicy),
  "maxRateKbps": string,
  "cost": {
    object (Money)
  },
  "duration": string,
  "offerContext": string,
  "trafficCategories": [
    enum (PlanModuleTrafficCategory)
  ],
  "connectionType": enum (ConnectionType),
  "refreshPeriod": enum (RefreshPeriod),
  "offerType": enum (OfferType),

  // Union field quota can be only one of the following:
  "quotaBytes": string,
  "quotaMinutes": integer
  // End of list of possible types for union field quota.
}
欄位
planName

string

必要,用於識別優惠內容的字串。

planId

string

必要,不重複字串,可用於識別優惠,並在使用者想要日後購物時購買。

planDescription

string

必要,用於向使用者描述優惠的較長的字串。

promoMessage

string

描述促銷活動的字串。

overusagePolicy

enum (OverUsagePolicy)

判斷使用者最終使用的資料量是否增加。目前支援的選項包括:節流、封鎖和即付即用,系統會從使用者帳戶中扣除餘額。

maxRateKbps

string (int64 format)

方案為使用者提供的頻寬上限。並會在向使用者顯示優惠時向使用者顯示。

cost

object (Money)

必要,這個方案的費用。

duration

string (Duration format)

方案啟用後,方案有效期間的秒數。

時間長度以秒為單位,最多可有 9 個小數位數,並應以「s」結尾,例如:"3.5s"

offerContext

string

TransactionRequest 訊息中使用的優惠內容。

trafficCategories[]

enum (PlanModuleTrafficCategory)

系統將根據這個企劃書模組計費的流量類別清單。

connectionType

enum (ConnectionType)

此優惠適用的連線類型。

refreshPeriod

enum (RefreshPeriod)

這個方案的重新整理週期;如果方案並未重新整理配額,則提供 REFRESH_PERIOD_NONE。重新整理配額的方案會在每次重新整理週期執行一次。

offerType

enum (OfferType)

指明優惠類型。視優惠類型而定,客戶可以自訂優惠購買時的使用者體驗。

聯集欄位 quota。方案配額資訊,應為下列其中一個:配額_bytes、quota_minutes。quota 只能是下列其中一項:
quotaBytes

string (int64 format)

套件配額 (以位元組為單位)。

quotaMinutes

integer

套件配額 (以分鐘為單位)。