Struct Invoice

Source
pub struct Invoice {
Show 20 fields pub budget_invoice_grouping_id: Option<String>, pub budget_summaries: Option<Vec<BudgetSummary>>, pub corrected_invoice_id: Option<String>, pub currency_code: Option<String>, pub display_name: Option<String>, pub due_date: Option<Date>, pub invoice_id: Option<String>, pub invoice_type: Option<String>, pub issue_date: Option<Date>, pub name: Option<String>, pub non_budget_micros: Option<i64>, pub payments_account_id: Option<String>, pub payments_profile_id: Option<String>, pub pdf_url: Option<String>, pub purchase_order_number: Option<String>, pub replaced_invoice_ids: Option<Vec<String>>, pub service_date_range: Option<DateRange>, pub subtotal_amount_micros: Option<i64>, pub total_amount_micros: Option<i64>, pub total_tax_amount_micros: Option<i64>,
}
Expand description

A single invoice.

This type is not used in any activity, and only used as part of another schema.

Fields§

§budget_invoice_grouping_id: Option<String>

The budget grouping ID for this invoice. This field will only be set if the invoice level of the corresponding billing profile was set to “Budget invoice grouping ID”.

§budget_summaries: Option<Vec<BudgetSummary>>

The list of summarized information for each budget associated with this invoice. This field will only be set if the invoice detail level of the corresponding billing profile was set to “Budget level PO”.

§corrected_invoice_id: Option<String>

The ID of the original invoice being adjusted by this invoice, if applicable. May appear on the invoice PDF as Reference invoice number. If replaced_invoice_ids is set, this field will be empty.

§currency_code: Option<String>

The currency used in the invoice in ISO 4217 format.

§display_name: Option<String>

The display name of the invoice.

§due_date: Option<Date>

The date when the invoice is due.

§invoice_id: Option<String>

The unique ID of the invoice.

§invoice_type: Option<String>

The type of invoice document.

§issue_date: Option<Date>

The date when the invoice was issued.

§name: Option<String>

The resource name of the invoice.

§non_budget_micros: Option<i64>

The total amount of costs or adjustments not tied to a particular budget, in micros of the invoice’s currency. For example, if currency_code is USD, then 1000000 represents one US dollar.

§payments_account_id: Option<String>

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

§payments_profile_id: Option<String>

The ID of the payments profile the invoice belongs to. Appears on the invoice PDF as Billing ID.

§pdf_url: Option<String>

The URL to download a PDF copy of the invoice. 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 and be authorized for one of the following scopes: * https://www.googleapis.com/auth/display-video-mediaplanning * https://www.googleapis.com/auth/display-video The URL will be valid for 7 days after retrieval of this invoice object or until this invoice is retrieved again.

§purchase_order_number: Option<String>

Purchase order number associated with the invoice.

§replaced_invoice_ids: Option<Vec<String>>

The ID(s) of any originally issued invoice that is being cancelled by this invoice, if applicable. Multiple invoices may be listed if those invoices are being consolidated into a single invoice. May appear on invoice PDF as Replaced invoice numbers. If corrected_invoice_id is set, this field will be empty.

§service_date_range: Option<DateRange>

The service start and end dates which are covered by this invoice.

§subtotal_amount_micros: Option<i64>

The pre-tax subtotal amount, in micros of the invoice’s currency. For example, if currency_code is USD, then 1000000 represents one US dollar.

§total_amount_micros: Option<i64>

The invoice total amount, in micros of the invoice’s currency. For example, if currency_code is USD, then 1000000 represents one US dollar.

§total_tax_amount_micros: Option<i64>

The sum of all taxes in invoice, in micros of the invoice’s currency. For example, if currency_code is USD, then 1000000 represents one US dollar.

Trait Implementations§

Source§

impl Clone for Invoice

Source§

fn clone(&self) -> Invoice

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Invoice

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Invoice

Source§

fn default() -> Invoice

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Invoice

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Invoice

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Part for Invoice

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,