Invoice

Struct Invoice 

Source
pub struct Invoice {
Show 33 fields pub number: Option<String>, pub issue_date: Option<String>, pub due_date: Option<String>, pub subject: Option<String>, pub closed_at: Option<String>, pub period_start: Option<String>, pub payment_term: Option<String>, pub paid_at: Option<String>, pub amount: Option<f64>, pub notes: Option<String>, pub tax2: Option<f64>, pub due_amount: Option<f64>, pub discount_amount: Option<f64>, pub currency: Option<String>, pub paid_date: Option<String>, pub client_key: Option<String>, pub recurring_invoice_id: Option<i64>, pub estimate: Option<Value>, pub sent_at: Option<String>, pub discount: Option<f64>, pub period_end: Option<String>, pub tax: Option<f64>, pub client: Option<Value>, pub purchase_order: Option<String>, pub line_items: Option<Vec<InvoiceLineItem>>, pub id: Option<i64>, pub state: Option<String>, pub creator: Option<Value>, pub tax2_amount: Option<f64>, pub retainer: Option<Value>, pub created_at: Option<String>, pub tax_amount: Option<f64>, pub updated_at: Option<String>,
}

Fields§

§number: Option<String>

If no value is set, the number will be automatically generated.

§issue_date: Option<String>

Date the invoice was issued.

§due_date: Option<String>

Date the invoice is due.

§subject: Option<String>

The invoice subject.

§closed_at: Option<String>

Date and time the invoice was closed.

§period_start: Option<String>

Start of the period during which time entries were added to this invoice.

§payment_term: Option<String>

The timeframe in which the invoice should be paid. Options: upon receipt, net 15, net 30, net 45, net 60, or custom.

§paid_at: Option<String>

Date and time the invoice was paid.

§amount: Option<f64>

The total amount for the invoice, including any discounts and taxes.

§notes: Option<String>

Any additional notes included on the invoice.

§tax2: Option<f64>

This percentage is applied to the subtotal, including line items and discounts.

§due_amount: Option<f64>

The total amount due at this time for this invoice.

§discount_amount: Option<f64>

The amount calcuated from discount.

§currency: Option<String>

The currency code associated with this invoice.

§paid_date: Option<String>

Date the invoice was paid.

§client_key: Option<String>

Used to build a URL to the public web invoice for your client:https://{ACCOUNT_SUBDOMAIN}.harvestapp.com/client/invoices/{CLIENT_KEY}

§recurring_invoice_id: Option<i64>

Unique ID of the associated recurring invoice.

§estimate: Option<Value>

An object containing the associated estimate’s id.

§sent_at: Option<String>

Date and time the invoice was sent.

§discount: Option<f64>

This percentage is subtracted from the subtotal.

§period_end: Option<String>

End of the period during which time entries were added to this invoice.

§tax: Option<f64>

This percentage is applied to the subtotal, including line items and discounts.

§client: Option<Value>

An object containing invoice’s client id and name.

§purchase_order: Option<String>

The purchase order number.

§line_items: Option<Vec<InvoiceLineItem>>

Array of invoice line items.

§id: Option<i64>

Unique ID for the invoice.

§state: Option<String>

The current state of the invoice: draft, open, paid, or closed.

§creator: Option<Value>

An object containing the id and name of the person that created the invoice.

§tax2_amount: Option<f64>

The amount calculated from tax2.

§retainer: Option<Value>

An object containing the associated retainer’s id.

§created_at: Option<String>

Date and time the invoice was created.

§tax_amount: Option<f64>

The first amount of tax included, calculated from tax. If no tax is defined, this value will be null.

§updated_at: Option<String>

Date and time the invoice was last updated.

Trait Implementations§

Source§

impl Debug for Invoice

Source§

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

Formats the value using the given formatter. 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 Display for Invoice

Source§

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

Formats the value using the given formatter. 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

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> 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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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>,