Search Ads 360 Reporting API . customers . invoices

Instance Methods

close()

Close httplib2 connections.

list(customerId, billingSetup=None, includeGranularLevelInvoiceDetails=None, issueMonth=None, issueYear=None, x__xgafv=None)

Returns all invoices associated with a billing setup, for a given month. List of thrown errors: [AuthenticationError]() [AuthorizationError]() [FieldError]() [HeaderError]() [InternalError]() [InvoiceError]() [QuotaError]() [RequestError]()

Method Details

close()
Close httplib2 connections.
list(customerId, billingSetup=None, includeGranularLevelInvoiceDetails=None, issueMonth=None, issueYear=None, x__xgafv=None)
Returns all invoices associated with a billing setup, for a given month. List of thrown errors: [AuthenticationError]() [AuthorizationError]() [FieldError]() [HeaderError]() [InternalError]() [InvoiceError]() [QuotaError]() [RequestError]()

Args:
  customerId: string, Required. The ID of the customer to fetch invoices for. (required)
  billingSetup: string, Required. The billing setup resource name of the requested invoices. `customers/{customer_id}/billingSetups/{billing_setup_id}`
  includeGranularLevelInvoiceDetails: boolean, Optional. When true, the response will include more granular level invoice details such as campaign level cost breakdown, itemized regulatory costs and adjustments. The default value is false.
  issueMonth: string, Required. The issue month to retrieve invoices.
    Allowed values
      UNSPECIFIED - Not specified.
      UNKNOWN - The value is unknown in this version.
      JANUARY - January.
      FEBRUARY - February.
      MARCH - March.
      APRIL - April.
      MAY - May.
      JUNE - June.
      JULY - July.
      AUGUST - August.
      SEPTEMBER - September.
      OCTOBER - October.
      NOVEMBER - November.
      DECEMBER - December.
  issueYear: string, Required. The issue year to retrieve invoices, in yyyy format. Only invoices issued in 2019 or later can be retrieved.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response message for InvoiceService.ListInvoices.
  "invoices": [ # The list of invoices that match the billing setup and time period.
    { # 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.
      "accountBudgetSummaries": [ # Output only. The list of summarized account budget information associated with this invoice.
        { # Represents a summarized account budget billable cost.
          "accountBudget": "A 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}`
          "accountBudgetName": "A String", # Output only. The name of the account budget. It appears on the invoice PDF as "Account budget".
          "billableActivityDateRange": { # A date range. # 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.
            "endDate": "A String", # The end date, in yyyy-mm-dd format. This date is inclusive.
            "startDate": "A String", # The start date, in yyyy-mm-dd format. This date is inclusive.
          },
          "billedAmountMicros": "A String", # Output only. The pretax billed amount attributable to this budget during the service period, in micros. This does not account for any adjustments.
          "campaignSummaries": [ # Output only. The list of summarized campaign level information associated with this account budget.
            { # Represents campaign level billable cost information associated with an account budget.
              "amountMicros": "A String", # Output only. The amount attributable to this campaign for the given unit of measure during the service period, in micros. The currency code for this amount is the same as the Invoice.currency_code.
              "campaignDescription": "A String", # Output only. The description of the campaign. This is generally the same as the campaign name, but may differ.
              "quantity": "A String", # Output only. The quantity served for the given unit of measure.
              "unitOfMeasure": "A String", # Output only. The unit of measure for the quantity served.
            },
          ],
          "customer": "A String", # 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}`
          "customerDescriptiveName": "A String", # Output only. The descriptive name of the account budget's customer. It appears on the invoice PDF as "Account".
          "invalidActivityAmountMicros": "A String", # Output only. The pretax invalid activity amount attributable to this budget in previous months, in micros (negative value).
          "invalidActivitySummaries": [ # Output only. The list of summarized invalid activity credits with original linkages.
            { # Details about the invalid activity for the invoice that contain additional details about invoice against which corrections are made.
              "amountMicros": "A String", # Output only. Invalid activity amount in micros.
              "originalAccountBudgetName": "A String", # Output only. Original account budget name related to this invalid activity credit.
              "originalInvoiceId": "A String", # Output only. Original invoice number related to this invalid activity credit.
              "originalMonthOfService": "A String", # Output only. Original month of service related to this invalid activity credit.
              "originalPurchaseOrderNumber": "A String", # Output only. Original purchase order number related to this invalid activity credit.
              "originalYearOfService": "A String", # Output only. Original year of service related to this invalid activity credit.
            },
          ],
          "overdeliveryAmountMicros": "A String", # Output only. The pretax overdelivery amount attributable to this budget during the service period, in micros (negative value).
          "purchaseOrderNumber": "A String", # Output only. The purchase order number of the account budget. It appears on the invoice PDF as "Purchase order".
          "servedAmountMicros": "A String", # Output only. The pretax served amount attributable to this budget during the service period, in micros. This is only useful to reconcile invoice and delivery data.
          "subtotalAmountMicros": "A String", # Output only. The pretax subtotal amount attributable to this budget during the service period, in micros.
          "taxAmountMicros": "A String", # Output only. The tax amount attributable to this budget during the service period, in micros.
          "totalAmountMicros": "A String", # 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.
        },
      ],
      "accountSummaries": [ # Output only. The list of summarized account information associated with this invoice.
        { # Represents a summarized view at account level.
          "adjustmentSummaries": [ # Output only. The list of adjustment information associated with this account.
            { # Represents adjustment information associated with an account.
              "adjustmentDescription": "A String", # Output only. The description of the adjustment. Example: Incentive Adjustment, discount.
              "amountMicros": "A String", # Output only. The amount of the adjustment, in micros. The currency code for this amount is the same as the Invoice.currency_code.
            },
          ],
          "billingCorrectionSubtotalAmountMicros": "A String", # Output only. Pretax billing correction subtotal amount, in micros.
          "billingCorrectionTaxAmountMicros": "A String", # Output only. Tax on billing correction, in micros.
          "billingCorrectionTotalAmountMicros": "A String", # Output only. Total billing correction amount, in micros.
          "couponAdjustmentSubtotalAmountMicros": "A String", # Output only. Pretax coupon adjustment subtotal amount, in micros.
          "couponAdjustmentTaxAmountMicros": "A String", # Output only. Tax on coupon adjustment, in micros.
          "couponAdjustmentTotalAmountMicros": "A String", # Output only. Total coupon adjustment amount, in micros.
          "customer": "A String", # Output only. The account associated with the account summary.
          "excessCreditAdjustmentSubtotalAmountMicros": "A String", # Output only. Pretax excess credit adjustment subtotal amount, in micros.
          "excessCreditAdjustmentTaxAmountMicros": "A String", # Output only. Tax on excess credit adjustment, in micros.
          "excessCreditAdjustmentTotalAmountMicros": "A String", # Output only. Total excess credit adjustment amount, in micros.
          "exportChargeSubtotalAmountMicros": "A String", # Output only. Pretax export charge subtotal amount, in micros.
          "exportChargeTaxAmountMicros": "A String", # Output only. Tax on export charge, in micros.
          "exportChargeTotalAmountMicros": "A String", # Output only. Total export charge amount, in micros.
          "regulatoryCostSummaries": [ # Output only. The list of regulatory cost information associated with this account.
            { # Represents regulatory cost information associated with an account.
              "amountMicros": "A String", # Output only. The amount of the regulatory fee, in micros. The currency code for this amount is the same as the Invoice.currency_code.
              "regulatoryFeeType": "A String", # Output only. The type of regulatory fee.
            },
          ],
          "regulatoryCostsSubtotalAmountMicros": "A String", # Output only. Pretax regulatory costs subtotal amount, in micros.
          "regulatoryCostsTaxAmountMicros": "A String", # Output only. Tax on regulatory costs, in micros.
          "regulatoryCostsTotalAmountMicros": "A String", # Output only. Total regulatory costs amount, in micros.
          "subtotalAmountMicros": "A String", # Output only. Total pretax subtotal amount attributable to the account during the service period, in micros.
          "taxAmountMicros": "A String", # Output only. Total tax amount attributable to the account during the service period, in micros.
          "totalAmountMicros": "A String", # Output only. Total amount attributable to the account during the service period, in micros. This equals the sum of the subtotal_amount_micros and tax_amount_micros.
        },
      ],
      "adjustmentsSubtotalAmountMicros": "A String", # Output only. The pretax subtotal amount of invoice level adjustments, in micros.
      "adjustmentsTaxAmountMicros": "A String", # Output only. The sum of taxes on the invoice level adjustments, in micros.
      "adjustmentsTotalAmountMicros": "A String", # Output only. The total amount of invoice level adjustments, in micros.
      "billingSetup": "A String", # Output only. The resource name of this invoice's billing setup. `customers/{customer_id}/billingSetups/{billing_setup_id}`
      "correctedInvoice": "A String", # 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}`
      "currencyCode": "A String", # 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.
      "dueDate": "A String", # Output only. The due date in yyyy-mm-dd format.
      "exportChargeSubtotalAmountMicros": "A String", # Output only. The pretax subtotal amount of invoice level export charges, in micros.
      "exportChargeTaxAmountMicros": "A String", # Output only. The sum of taxes on the invoice level export charges, in micros.
      "exportChargeTotalAmountMicros": "A String", # Output only. The total amount of invoice level export charges, in micros.
      "id": "A String", # Output only. The ID of the invoice. It appears on the invoice PDF as "Invoice number".
      "issueDate": "A String", # Output only. The issue date in yyyy-mm-dd format. It appears on the invoice PDF as either "Issue date" or "Invoice date".
      "paymentsAccountId": "A 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".
      "paymentsProfileId": "A 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".
      "pdfUrl": "A 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.
      "regulatoryCostsSubtotalAmountMicros": "A String", # Output only. The pretax subtotal amount of invoice level regulatory costs, in micros.
      "regulatoryCostsTaxAmountMicros": "A String", # Output only. The sum of taxes on the invoice level regulatory costs, in micros.
      "regulatoryCostsTotalAmountMicros": "A String", # Output only. The total amount of invoice level regulatory costs, in micros.
      "replacedInvoices": [ # 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}`
        "A String",
      ],
      "resourceName": "A String", # 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}`
      "serviceDateRange": { # A date range. # Output only. The service period date range of this invoice. The end date is inclusive.
        "endDate": "A String", # The end date, in yyyy-mm-dd format. This date is inclusive.
        "startDate": "A String", # The start date, in yyyy-mm-dd format. This date is inclusive.
      },
      "subtotalAmountMicros": "A String", # Output only. The pretax subtotal amount, in micros. This is equal to the sum of the AccountBudgetSummary subtotal amounts and Invoice.adjustments_subtotal_amount_micros.
      "taxAmountMicros": "A String", # 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.
      "totalAmountMicros": "A String", # Output only. The total amount, in micros. This equals the sum of Invoice.subtotal_amount_micros, Invoice.tax_amount_micros, Invoice.regulatory_costs_subtotal_amount_micros, and Invoice.export_charge_subtotal_amount_micros (which is separated into a separate line item starting with V14.1).
      "type": "A String", # Output only. The type of invoice.
    },
  ],
}