import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; import type { IBinaryWriter } from "@protobuf-ts/runtime"; import type { BinaryReadOptions } from "@protobuf-ts/runtime"; import type { IBinaryReader } from "@protobuf-ts/runtime"; import type { PartialMessage } from "@protobuf-ts/runtime"; import { MessageType } from "@protobuf-ts/runtime"; import { DateRange } from "../common/dates"; import { InvoiceTypeEnum_InvoiceType } from "../enums/invoice_type"; /** * An invoice. All invoice information is snapshotted to match the PDF invoice. * For invoices older than the launch of InvoiceService, the snapshotted * information may not match the PDF invoice. * * @generated from protobuf message google.ads.googleads.v11.resources.Invoice */ export interface Invoice { /** * Output only. The resource name of the invoice. Multiple customers can share a given * invoice, so multiple resource names may point to the same invoice. * Invoice resource names have the form: * * `customers/{customer_id}/invoices/{invoice_id}` * * @generated from protobuf field: string resource_name = 1; */ resourceName: string; /** * Output only. The ID of the invoice. It appears on the invoice PDF as "Invoice number". * * @generated from protobuf field: optional string id = 25; */ id?: string; /** * Output only. The type of invoice. * * @generated from protobuf field: google.ads.googleads.v11.enums.InvoiceTypeEnum.InvoiceType type = 3; */ type: InvoiceTypeEnum_InvoiceType; /** * Output only. The resource name of this invoice's billing setup. * * `customers/{customer_id}/billingSetups/{billing_setup_id}` * * @generated from protobuf field: optional string billing_setup = 26; */ billingSetup?: string; /** * Output only. A 16 digit ID used to identify the payments account associated with the * billing setup, for example, "1234-5678-9012-3456". It appears on the * invoice PDF as "Billing Account Number". * * @generated from protobuf field: optional string payments_account_id = 27; */ paymentsAccountId?: string; /** * Output only. A 12 digit ID used to identify the payments profile associated with the * billing setup, for example, "1234-5678-9012". It appears on the invoice PDF * as "Billing ID". * * @generated from protobuf field: optional string payments_profile_id = 28; */ paymentsProfileId?: string; /** * Output only. The issue date in yyyy-mm-dd format. It appears on the invoice PDF as * either "Issue date" or "Invoice date". * * @generated from protobuf field: optional string issue_date = 29; */ issueDate?: string; /** * Output only. The due date in yyyy-mm-dd format. * * @generated from protobuf field: optional string due_date = 30; */ dueDate?: string; /** * Output only. The service period date range of this invoice. The end date is inclusive. * * @generated from protobuf field: google.ads.googleads.v11.common.DateRange service_date_range = 9; */ serviceDateRange?: DateRange; /** * Output only. The currency code. All costs are returned in this currency. A subset of the * currency codes derived from the ISO 4217 standard is supported. * * @generated from protobuf field: optional string currency_code = 31; */ currencyCode?: string; /** * Output only. The pretax subtotal amount of invoice level adjustments, in micros. * * @generated from protobuf field: int64 adjustments_subtotal_amount_micros = 19; */ adjustmentsSubtotalAmountMicros: bigint; /** * Output only. The sum of taxes on the invoice level adjustments, in micros. * * @generated from protobuf field: int64 adjustments_tax_amount_micros = 20; */ adjustmentsTaxAmountMicros: bigint; /** * Output only. The total amount of invoice level adjustments, in micros. * * @generated from protobuf field: int64 adjustments_total_amount_micros = 21; */ adjustmentsTotalAmountMicros: bigint; /** * Output only. The pretax subtotal amount of invoice level regulatory costs, in micros. * * @generated from protobuf field: int64 regulatory_costs_subtotal_amount_micros = 22; */ regulatoryCostsSubtotalAmountMicros: bigint; /** * Output only. The sum of taxes on the invoice level regulatory costs, in micros. * * @generated from protobuf field: int64 regulatory_costs_tax_amount_micros = 23; */ regulatoryCostsTaxAmountMicros: bigint; /** * Output only. The total amount of invoice level regulatory costs, in micros. * * @generated from protobuf field: int64 regulatory_costs_total_amount_micros = 24; */ regulatoryCostsTotalAmountMicros: bigint; /** * Output only. The pretax subtotal amount, in micros. This equals the * sum of the AccountBudgetSummary subtotal amounts, * Invoice.adjustments_subtotal_amount_micros, and * Invoice.regulatory_costs_subtotal_amount_micros. * Starting with v6, the Invoice.regulatory_costs_subtotal_amount_micros is no * longer included. * * @generated from protobuf field: optional int64 subtotal_amount_micros = 33; */ subtotalAmountMicros?: bigint; /** * Output only. The sum of all taxes on the invoice, in micros. This equals the sum of the * AccountBudgetSummary tax amounts, plus taxes not associated with a specific * account budget. * * @generated from protobuf field: optional int64 tax_amount_micros = 34; */ taxAmountMicros?: bigint; /** * Output only. The total amount, in micros. This equals the sum of * Invoice.subtotal_amount_micros and Invoice.tax_amount_micros. * Starting with v6, Invoice.regulatory_costs_subtotal_amount_micros is * also added as it is no longer already included in * Invoice.tax_amount_micros. * * @generated from protobuf field: optional int64 total_amount_micros = 35; */ totalAmountMicros?: bigint; /** * Output only. The resource name of the original invoice corrected, wrote off, or canceled * by this invoice, if applicable. If `corrected_invoice` is set, * `replaced_invoices` will not be set. * Invoice resource names have the form: * * `customers/{customer_id}/invoices/{invoice_id}` * * @generated from protobuf field: optional string corrected_invoice = 36; */ correctedInvoice?: string; /** * Output only. The resource name of the original invoice(s) being rebilled or replaced by * this invoice, if applicable. There might be multiple replaced invoices due * to invoice consolidation. The replaced invoices may not belong to the same * payments account. If `replaced_invoices` is set, `corrected_invoice` will * not be set. * Invoice resource names have the form: * * `customers/{customer_id}/invoices/{invoice_id}` * * @generated from protobuf field: repeated string replaced_invoices = 37; */ replacedInvoices: string[]; /** * Output only. The URL to a PDF copy of the invoice. Users need to pass in their OAuth * token to request the PDF with this URL. * * @generated from protobuf field: optional string pdf_url = 38; */ pdfUrl?: string; /** * Output only. The list of summarized account budget information associated with this * invoice. * * @generated from protobuf field: repeated google.ads.googleads.v11.resources.Invoice.AccountBudgetSummary account_budget_summaries = 18; */ accountBudgetSummaries: Invoice_AccountBudgetSummary[]; } /** * Represents a summarized account budget billable cost. * * @generated from protobuf message google.ads.googleads.v11.resources.Invoice.AccountBudgetSummary */ export interface Invoice_AccountBudgetSummary { /** * Output only. The resource name of the customer associated with this account budget. * This contains the customer ID, which appears on the invoice PDF as * "Account ID". * Customer resource names have the form: * * `customers/{customer_id}` * * @generated from protobuf field: optional string customer = 10; */ customer?: string; /** * Output only. The descriptive name of the account budget's customer. It appears on the * invoice PDF as "Account". * * @generated from protobuf field: optional string customer_descriptive_name = 11; */ customerDescriptiveName?: string; /** * Output only. The resource name of the account budget associated with this summarized * billable cost. * AccountBudget resource names have the form: * * `customers/{customer_id}/accountBudgets/{account_budget_id}` * * @generated from protobuf field: optional string account_budget = 12; */ accountBudget?: string; /** * Output only. The name of the account budget. It appears on the invoice PDF as "Account * budget". * * @generated from protobuf field: optional string account_budget_name = 13; */ accountBudgetName?: string; /** * Output only. The purchase order number of the account budget. It appears on the * invoice PDF as "Purchase order". * * @generated from protobuf field: optional string purchase_order_number = 14; */ purchaseOrderNumber?: string; /** * Output only. The pretax subtotal amount attributable to this budget during the service * period, in micros. * * @generated from protobuf field: optional int64 subtotal_amount_micros = 15; */ subtotalAmountMicros?: bigint; /** * Output only. The tax amount attributable to this budget during the service period, in * micros. * * @generated from protobuf field: optional int64 tax_amount_micros = 16; */ taxAmountMicros?: bigint; /** * Output only. The total amount attributable to this budget during the service period, * in micros. This equals the sum of the account budget subtotal amount and * the account budget tax amount. * * @generated from protobuf field: optional int64 total_amount_micros = 17; */ totalAmountMicros?: bigint; /** * Output only. The billable activity date range of the account budget, within the * service date range of this invoice. The end date is inclusive. This can * be different from the account budget's start and end time. * * @generated from protobuf field: google.ads.googleads.v11.common.DateRange billable_activity_date_range = 9; */ billableActivityDateRange?: DateRange; } declare class Invoice$Type extends MessageType { constructor(); create(value?: PartialMessage): Invoice; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Invoice): Invoice; internalBinaryWrite(message: Invoice, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message google.ads.googleads.v11.resources.Invoice */ export declare const Invoice: Invoice$Type; declare class Invoice_AccountBudgetSummary$Type extends MessageType { constructor(); create(value?: PartialMessage): Invoice_AccountBudgetSummary; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Invoice_AccountBudgetSummary): Invoice_AccountBudgetSummary; internalBinaryWrite(message: Invoice_AccountBudgetSummary, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message google.ads.googleads.v11.resources.Invoice.AccountBudgetSummary */ export declare const Invoice_AccountBudgetSummary: Invoice_AccountBudgetSummary$Type; export {};