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

必要欄位。向使用者顯示的方案 ID 字串。

planId

string

必要欄位。不重複的字串,可用來明確識別方案,並在使用者願意的情況下進行後續購買。

planDescription

string

必要欄位。向使用者說明優惠的較長字串。

promoMessage

string

促銷活動的說明字串。

overusagePolicy

enum (OverUsagePolicy)

決定使用者用量超出方案提供量時的處理方式。目前支援的選項包括:受到節流、遭到封鎖,以及預付型方案 (從使用者帳戶扣除餘額)。

maxRateKbps

string (int64 format)

方案為使用者提供的頻寬上限。系統向使用者顯示優惠時,可能會一併顯示這項資訊。

cost

object (Money)

必要欄位。這項方案的費用。

duration

string (Duration format)

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

期間以秒為單位,小數部分最多九位數,以「s」結尾。範例:"3.5s"

offerContext

string

提供內容,用於 TransactionRequest 訊息。

trafficCategories[]

enum (PlanModuleTrafficCategory)

系統會根據這份清單,針對這個方案模組收取費用。

connectionType

enum (ConnectionType)

這項優惠提供的連線類型。

refreshPeriod

enum (RefreshPeriod)

這項方案優惠的重新整理週期,如果方案不會重新整理配額,則為 REFRESH_PERIOD_NONE。配額更新方案會在每個更新週期更新一次配額。

offerType

enum (OfferType)

找出優惠類型。根據優惠類型,用戶購買優惠的體驗可由用戶端自訂。

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

string (int64 format)

以位元組為單位的套件配額。

quotaMinutes

integer

以分鐘為單位的套裝方案配額。