Class: Google::Apis::DfareportingV4::Invoice

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/dfareporting_v4/classes.rb,
lib/google/apis/dfareporting_v4/representations.rb,
lib/google/apis/dfareporting_v4/representations.rb

Overview

Contains information about a single invoice

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Invoice

Returns a new instance of Invoice.



7231
7232
7233
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 7231

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#campaign_summariesArray<Google::Apis::DfareportingV4::CampaignSummary>

The list of summarized campaign information associated with this invoice. Corresponds to the JSON property campaign_summaries



7134
7135
7136
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 7134

def campaign_summaries
  @campaign_summaries
end

#corrected_invoice_idString

The originally issued invoice that is being adjusted by this invoice, if applicable. May appear on invoice PDF as Reference invoice number. Corresponds to the JSON property correctedInvoiceId

Returns:

  • (String)


7140
7141
7142
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 7140

def corrected_invoice_id
  @corrected_invoice_id
end

#currency_codeString

Invoice currency code in ISO 4217 format. Corresponds to the JSON property currencyCode

Returns:

  • (String)


7145
7146
7147
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 7145

def currency_code
  @currency_code
end

#due_dateString

The invoice due date. Corresponds to the JSON property dueDate

Returns:

  • (String)


7150
7151
7152
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 7150

def due_date
  @due_date
end

#idString

ID of this invoice. Corresponds to the JSON property id

Returns:

  • (String)


7155
7156
7157
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 7155

def id
  @id
end

#invoice_typeString

The type of invoice document. Corresponds to the JSON property invoiceType

Returns:

  • (String)


7160
7161
7162
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 7160

def invoice_type
  @invoice_type
end

#issue_dateString

The date when the invoice was issued. Corresponds to the JSON property issueDate

Returns:

  • (String)


7165
7166
7167
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 7165

def issue_date
  @issue_date
end

#kindString

Identifies what kind of resource this is. Value: the fixed string " dfareporting#invoice". Corresponds to the JSON property kind

Returns:

  • (String)


7171
7172
7173
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 7171

def kind
  @kind
end

#payments_account_idString

The ID of the payments account the invoice belongs to. Appears on the invoice PDF as Billing Account Number. Corresponds to the JSON property paymentsAccountId

Returns:

  • (String)


7177
7178
7179
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 7177

def 
  @payments_account_id
end

#payments_profile_idString

The ID of the payments profile the invoice belongs to. Appears on the invoice PDF as Billing ID. Corresponds to the JSON property paymentsProfileId

Returns:

  • (String)


7183
7184
7185
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 7183

def payments_profile_id
  @payments_profile_id
end

#pdf_urlString

The URL to download a PDF copy of the invoice. Note that this URL is user specific and requires a valid OAuth 2.0 access token to access. The access token must be provided in an Authorization: Bearer HTTP header. The URL will only be usable for 7 days from when the api is called. Corresponds to the JSON property pdfUrl

Returns:

  • (String)


7191
7192
7193
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 7191

def pdf_url
  @pdf_url
end

#purchase_order_numberString

Purchase order number associated with the invoice. Corresponds to the JSON property purchaseOrderNumber

Returns:

  • (String)


7196
7197
7198
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 7196

def purchase_order_number
  @purchase_order_number
end

#replaced_invoice_idsArray<String>

The originally issued invoice(s) that is being cancelled by this invoice, if applicable. May appear on invoice PDF as Replaced invoice numbers. Note: There may be multiple replaced invoices due to consolidation of multiple invoices into a single invoice. Corresponds to the JSON property replacedInvoiceIds

Returns:

  • (Array<String>)


7204
7205
7206
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 7204

def replaced_invoice_ids
  @replaced_invoice_ids
end

#service_end_dateString

The invoice service end date. Corresponds to the JSON property serviceEndDate

Returns:

  • (String)


7209
7210
7211
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 7209

def service_end_date
  @service_end_date
end

#service_start_dateString

The invoice service start date. Corresponds to the JSON property serviceStartDate

Returns:

  • (String)


7214
7215
7216
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 7214

def service_start_date
  @service_start_date
end

#subtotal_amount_microsFixnum

The pre-tax subtotal amount, in micros of the invoice's currency. Corresponds to the JSON property subtotalAmountMicros

Returns:

  • (Fixnum)


7219
7220
7221
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 7219

def subtotal_amount_micros
  @subtotal_amount_micros
end

#total_amount_microsFixnum

The invoice total amount, in micros of the invoice's currency. Corresponds to the JSON property totalAmountMicros

Returns:

  • (Fixnum)


7224
7225
7226
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 7224

def total_amount_micros
  @total_amount_micros
end

#total_tax_amount_microsFixnum

The sum of all taxes in invoice, in micros of the invoice's currency. Corresponds to the JSON property totalTaxAmountMicros

Returns:

  • (Fixnum)


7229
7230
7231
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 7229

def total_tax_amount_micros
  @total_tax_amount_micros
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
# File 'lib/google/apis/dfareporting_v4/classes.rb', line 7236

def update!(**args)
  @campaign_summaries = args[:campaign_summaries] if args.key?(:campaign_summaries)
  @corrected_invoice_id = args[:corrected_invoice_id] if args.key?(:corrected_invoice_id)
  @currency_code = args[:currency_code] if args.key?(:currency_code)
  @due_date = args[:due_date] if args.key?(:due_date)
  @id = args[:id] if args.key?(:id)
  @invoice_type = args[:invoice_type] if args.key?(:invoice_type)
  @issue_date = args[:issue_date] if args.key?(:issue_date)
  @kind = args[:kind] if args.key?(:kind)
  @payments_account_id = args[:payments_account_id] if args.key?(:payments_account_id)
  @payments_profile_id = args[:payments_profile_id] if args.key?(:payments_profile_id)
  @pdf_url = args[:pdf_url] if args.key?(:pdf_url)
  @purchase_order_number = args[:purchase_order_number] if args.key?(:purchase_order_number)
  @replaced_invoice_ids = args[:replaced_invoice_ids] if args.key?(:replaced_invoice_ids)
  @service_end_date = args[:service_end_date] if args.key?(:service_end_date)
  @service_start_date = args[:service_start_date] if args.key?(:service_start_date)
  @subtotal_amount_micros = args[:subtotal_amount_micros] if args.key?(:subtotal_amount_micros)
  @total_amount_micros = args[:total_amount_micros] if args.key?(:total_amount_micros)
  @total_tax_amount_micros = args[:total_tax_amount_micros] if args.key?(:total_tax_amount_micros)
end