Struct lexoffice::model::down_payment_invoices::DownPaymentInvoice[][src]

pub struct DownPaymentInvoice {
    pub id: ReadOnly<Uuid>,
    pub organization_id: Option<Uuid>,
    pub created_date: ReadOnly<DateTime>,
    pub updated_date: ReadOnly<DateTime>,
    pub version: i64,
    pub language: Option<String>,
    pub archived: Option<bool>,
    pub voucher_status: Option<VoucherStatus>,
    pub voucher_number: Option<String>,
    pub voucher_date: Option<DateTime>,
    pub due_date: Option<DateTime>,
    pub address: Option<Address>,
    pub line_items: Option<Vec<LineItems>>,
    pub total_price: Option<TotalPrice>,
    pub tax_amounts: ReadOnly<Vec<TaxAmounts>>,
    pub tax_conditions: Option<TaxConditions>,
    pub payment_conditions: Option<PaymentConditions>,
    pub shipping_conditions: Option<ShippingConditions>,
    pub closing_invoice_id: Option<Uuid>,
    pub title: Option<String>,
    pub introduction: Option<String>,
    pub remark: Option<String>,
    pub files: Option<Files>,
}

Most properties of down payment invoices are identical with the ones of regular invoices.

{
  "id": "0333f0c7-2b89-4889-b64e-68b3ca3f167a",
  "organizationId": "aa93e8a8-2aa3-470b-b914-caad8a255dd8",
  "createdDate": "2021-01-20T10:26:40.956+01:00",
  "updatedDate": "2021-01-21T13:34:13.228+01:00",
  "version": 3,
  "language": "de",
  "archived": false,
  "voucherStatus": "open",
  "voucherNumber": "RE1129",
  "voucherDate": "2021-01-20T10:26:26.565+01:00",
  "dueDate": "2021-02-19T00:00:00.000+01:00",
  "address": {
    "name": "Bike & Ride GmbH & Co. KG",
    "supplement": "Gebäude 10",
    "street": "Musterstraße 42",
    "city": "Freiburg",
    "zip": "79112",
    "countryCode": "DE"
  },
  "lineItems": [
    {
      "type": "custom",
      "name": "Pauschaler Abschlag",
      "quantity": 1,
      "unitPrice": {
        "currency": "EUR",
        "netAmount": 559.66,
        "grossAmount": 666,
        "taxRatePercentage": 19
      },
      "lineItemAmount": 666.00
    }
  ],
  "totalPrice": {
    "currency": "EUR",
    "totalNetAmount": 559.66,
    "totalGrossAmount": 666.00,
    "totalTaxAmount": 106.34
  },
  "taxAmounts": [
    {
      "taxRatePercentage": 19,
      "taxAmount": 106.34,
      "netAmount": 559.66
    }
  ],
  "taxConditions": {
    "taxType": "gross"
  },
  "paymentConditions": {
    "paymentTermLabel": "10 Tage - 3 %, 30 Tage netto",
    "paymentTermLabelTemplate": "{discountRange} Tage -{discount}, {paymentRange} Tage netto",
    "paymentTermDuration": 30,
    "paymentDiscountConditions": {
      "discountPercentage": 3,
      "discountRange": 10
    }
  },
  "shippingConditions": {
    "shippingType": "none"
  },
  "closingInvoiceId": null,
  "introduction": "Wie vereinbart, erlauben wir uns folgenden pauschalen Abschlag in Rechnung zu stellen.",
  "remark": "Vielen Dank für die gute Zusammenarbeit.",
  "files": {
    "documentFileId": "aa0388c5-20b5-49d7-96ce-0c08ac0482f4"
  },
  "title": "1. Abschlagsrechnung"
}

All attributes are read-only, as down payment invoices cannot be created or modified by means of the API.

Fields

id: ReadOnly<Uuid>

Unique id generated on creation by lexoffice.

organization_id: Option<Uuid>

Unique id of the organization the down payment invoice belongs to.

created_date: ReadOnly<DateTime>

The instant of time when the down payment invoice was created by lexoffice in format yyyy-MM-ddTHH:mm:ss.SSSXXX as described in RFC 3339/ISO 8601 (e.g. 2020-02-21T00:00:00.000+01:00).
Read-only.

updated_date: ReadOnly<DateTime>

The instant of time when the down payment invoice was updated by lexoffice in format yyyy-MM-ddTHH:mm:ss.SSSXXX as described in RFC 3339/ISO 8601 (e.g. 2020-02-21T00:00:00.000+01:00).
Read-only.

version: i64

Version (revision) number which will be increased on each change to handle optimistic locking.
Read-only.

language: Option<String>

Specifies the language of the down payment invoice which affects the print document but also set translated default text modules when no values are send (e.g. for introduction). Values accepted in ISO 639-1 code. Possible values are German de (default) and English en.

archived: Option<bool>

Specifies if the down payment invoice is only available in the archive in lexoffice.

voucher_status: Option<VoucherStatus>

Specifies the status of the down payment invoice. Possible values are draft (is editable), open (finalized and no longer editable but yet unpaid or only partially paid), paid (has been fully paid), voided (cancelled)

voucher_number: Option<String>

The specific number a down payment invoice is aware of. This consecutive number is set by lexoffice on creation.

voucher_date: Option<DateTime>

The date of the down payment invoice in format yyyy-MM-ddTHH:mm:ss.SSSXXX as described in RFC 3339/ISO 8601 (e.g. 2020-02-21T00:00:00.000+01:00).

due_date: Option<DateTime>

Sets the date on which the down payment invoice is payable before becoming overdue in format yyyy-MM-ddTHH:mm:ss.SSSXXX as described in RFC 3339/ISO 8601 (e.g. 2020-02-21T00:00:00.000+01:00).

address: Option<Address>

The address of the down payment invoice recipient. For details see below.

line_items: Option<Vec<LineItems>>

The items of the down payment invoice. For down payment invoices, this list contains exactly one item. For details see below.

total_price: Option<TotalPrice>

The total price of the down payment invoice. For details see below.

tax_amounts: ReadOnly<Vec<TaxAmounts>>

The tax amounts for each tax rate. Please note: As done with every read-only element or object all submitted content (POST) will be ignored. For details see below.

tax_conditions: Option<TaxConditions>

The tax conditions of the down payment invoice. For details see below.

payment_conditions: Option<PaymentConditions>

The payment conditions of the down payment invoice. The organization’s (or contact-specific) default is used if no value was send. For details see below.

shipping_conditions: Option<ShippingConditions>

The shipping conditions of the invoice. For details see below.

closing_invoice_id: Option<Uuid>

Id of the closing invoice that references this down payment invoice, if one exists. Null otherwise.

title: Option<String>

(Optional) A title text. The organization’s default is used if no value was sent.

introduction: Option<String>

(Optional) An introductory text / header. The organization’s default is used if no value was send.

remark: Option<String>

(Optional) A closing text note. The organization’s default is used if no value was send.

files: Option<Files>

The document id for the PDF version of the down payment invoice. For details see below.

Implementations

impl DownPaymentInvoice[src]

pub fn builder(
) -> DownPaymentInvoiceBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
[src]

Create a builder for building DownPaymentInvoice. On the builder, call .organization_id(...)(optional), .language(...)(optional), .archived(...)(optional), .voucher_status(...)(optional), .voucher_number(...)(optional), .voucher_date(...)(optional), .due_date(...)(optional), .address(...)(optional), .line_items(...)(optional), .total_price(...)(optional), .tax_conditions(...)(optional), .payment_conditions(...)(optional), .shipping_conditions(...)(optional), .closing_invoice_id(...)(optional), .title(...)(optional), .introduction(...)(optional), .remark(...)(optional), .files(...)(optional) to set the values of the fields. Finally, call .build() to create the instance of DownPaymentInvoice.

Trait Implementations

impl Clone for DownPaymentInvoice[src]

impl Debug for DownPaymentInvoice[src]

impl<'de> Deserialize<'de> for DownPaymentInvoice[src]

impl HasId for DownPaymentInvoice[src]

impl PartialEq<DownPaymentInvoice> for DownPaymentInvoice[src]

impl Serialize for DownPaymentInvoice[src]

impl StructuralPartialEq for DownPaymentInvoice[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.