BillingSetup

帳單設定,用於將付款帳戶和廣告客戶建立關聯。每項帳單設定僅供一個廣告客戶使用。

JSON 表示法
{
  "resourceName": string,
  "status": enum (BillingSetupStatus),
  "paymentsAccountInfo": {
    object (PaymentsAccountInfo)
  },
  "id": string,
  "paymentsAccount": string,

  // Union field start_time can be only one of the following:
  "startDateTime": string,
  "startTimeType": enum (TimeType)
  // End of list of possible types for union field start_time.

  // Union field end_time can be only one of the following:
  "endDateTime": string,
  "endTimeType": enum (TimeType)
  // End of list of possible types for union field end_time.
}
欄位
resourceName

string

不可變動。帳單設定的資源名稱。BillingSetup 資源名稱的格式如下:

customers/{customerId}/billingSetups/{billing_setup_id}

status

enum (BillingSetupStatus)

僅供輸出。帳單設定的狀態。

paymentsAccountInfo

object (PaymentsAccountInfo)

不可變動。與這個帳單設定相關聯的付款帳戶資訊。設定帳單時,這類帳戶會用來註冊新的付款帳戶,因此不得設定 paymentsAccount。設定帳單設定時,系統會填入此付款資料和 paymentsAccount。

id

string (int64 format)

僅供輸出。帳單設定的 ID。

paymentsAccount

string

不可變動。與此帳單設定相關聯的付款帳戶資源名稱。付款資源名稱的格式如下:

customers/{customerId}/paymentsAccounts/{paymentsAccountId} 設定帳單時,使用者必須使用現有的付款帳戶才能註冊,因此不得設定 paymentsAccountInfo。設定帳單設定時,系統會填入這個 ID 和 paymentsAccountInfo。

聯集欄位 start_time。建立新的帳單設定時,新設定應該就會生效。如果客戶沒有任何已核准的設定,現在是唯一可接受的開始時間。

擷取現有帳單設定時,這是指請求的開始時間。不過,如果設定在要求的開始時間後獲得核准 (顯示狀態),這就是核准時間。start_time 只能採用下列其中一種設定:

startDateTime

string

不可變動。開始日期時間,格式為 yyyy-MM-dd 或 yyyy-MM-dd HH:mm:ss。僅允許未來的時間。

startTimeType

enum (TimeType)

不可變動。類型的開始時間。僅允許使用 NOW。

聯集欄位 end_time。帳單設定結束 / 結束時。可能是「永久」或下次預定帳單設定的開始時間。end_time 只能是下列其中一項:
endDateTime

string

僅供輸出。結束日期時間,格式為 yyyy-MM-dd 或 yyyy-MM-dd HH:mm:ss。

endTimeType

enum (TimeType)

僅供輸出。結束時間類型。可能的值只有 FOREVER。

BillingSetupStatus

可能的帳單設定狀態。

列舉
UNSPECIFIED 未指定。
UNKNOWN 僅用於傳回值。代表這個版本未知的值。
PENDING 帳單設定尚待審核。
APPROVED_HELD 帳單設定已獲準,但對應的第一筆預算尚未獲準。只有設為採用月結方式的帳單設定才會發生這種情形。
APPROVED 帳單設定已獲準。
CANCELLED 使用者在核准前取消了帳單設定。

PaymentsAccountInfo

此帳單的付款帳戶資訊容器。

JSON 表示法
{
  "paymentsAccountId": string,
  "paymentsAccountName": string,
  "paymentsProfileId": string,
  "paymentsProfileName": string,
  "secondaryPaymentsProfileId": string
}
欄位
paymentsAccountId

string

僅供輸出。16 位數 ID,用於識別與帳單設定相關聯的付款帳戶。

而且必須以破折號的形式傳遞,例如「1234-5678-9012-3456」。

paymentsAccountName

string

不可變動。與帳單設定相關聯的付款帳戶名稱。

可讓使用者為付款帳戶指定有意義的名稱,以便對月結單核對。

這個名稱會列印在月結單中。

paymentsProfileId

string

不可變動。12 位數 ID,用於識別與帳單設定相關聯的付款資料。

這個值必須以破折號的形式傳遞,例如「1234-5678-9012」。

paymentsProfileName

string

僅供輸出。與帳單設定相關聯的付款資料名稱。

secondaryPaymentsProfileId

string

僅供輸出。在罕見情況下顯示次要付款資料 ID,例如簽訂連帶責任協議時。