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)

無法變更。與這個帳單設定相關聯的付款帳戶資訊。設定帳單時,系統會使用這個信息註冊新的付款帳戶 (不應設定 PaymentAccount)。取得帳單設定時,系統會填入這個帳戶和 PaymentsAccount。

id

string (int64 format)

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

paymentsAccount

string

無法變更。與這個帳單設定相關聯的付款帳戶資源名稱。付款資源名稱格式如下:

customers/{customerId}/paymentsAccounts/{paymentsAccountId}設定帳單資訊時,目的是透過現有的付款帳戶提出申請 (不應設定 paymentsAccountInfo)。系統取得帳單設定時,就會填入 paymentsAccountInfo 和 paymentsAccountInfo。

聯集欄位 start_time。建立新的帳單設定時,此時設定程序應該會生效。從現在起,如果客戶沒有任何經過核准的設定,就只能接受這個開始時間。

擷取現有帳單設定時,系統會根據您要求的開始時間。不過,如果設定是在要求的開始時間之後獲得核准 (查看狀態),則代表審核時間。start_time 只能採用下列其中一種設定:

startDateTime

string

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

startTimeType

enum (TimeType)

無法變更。作為類型的開始時間。僅允許「現在」。

聯集欄位 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,用於識別與帳單設定相關聯的付款帳戶。

這個 ID 必須以附破折號的字串傳遞,例如「1234-5678-9012-3456」。

paymentsAccountName

string

無法變更。與帳單設定相關聯的付款帳戶名稱。

如此一來,使用者就能為付款帳戶指定有意義的名稱,以便核對月結單。

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

paymentsProfileId

string

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

必須以附連字號的字串傳遞,例如「1234-5678-9012」。

paymentsProfileName

string

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

secondaryPaymentsProfileId

string

僅供輸出。次要付款資料 ID 偶爾會發生,例如既定連帶責任協議也已安排完成。