Struct lexoffice::model::recurring_templates::RecurringTemplate[][src]

pub struct RecurringTemplate {
    pub id: ReadOnly<Uuid>,
    pub organization_id: ReadOnly<Uuid>,
    pub created_date: ReadOnly<DateTime>,
    pub updated_date: ReadOnly<DateTime>,
    pub version: i64,
    pub language: Option<String>,
    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 title: Option<String>,
    pub introduction: Option<String>,
    pub remark: Option<String>,
    pub recurring_template_settings: ReadOnly<RecurringTemplateSettings>,
}

The set of properties of recurring templates are almost the same as of regular invoices, however, recurring templates do not have any date values set because these will only be derived when the recurring invoices are created. Additionally, the configuration of recurring invoices is defined in a nested object. Recurring templates always reference an existing contact.

{
  "id": "ac1d66a8-6d59-408b-9413-d56b1db7946f",
  "organizationId": "aa93e8a8-2aa3-470b-b914-caad8a255dd8",
  "createdDate": "2021-02-10T09:00:00.000+01:00",
  "updatedDate": "2021-02-10T09:00:00.000+01:00",
  "version": 0,
  "language": "de",
  "archived": false,
  "address": {
    "contactId": "464f4881-7a8c-4dc4-87de-7c6fd9a506b8",
    "name": "Bike & Ride GmbH & Co. KG",
    "supplement": "Gebäude 10",
    "street": "Musterstraße 42",
    "city": "Freiburg",
    "zip": "79112",
    "countryCode": "DE"
  },
  "lineItems": [
    {
      "id": "97b98491-e953-4dc9-97a9-ae437a8052b4",
      "type": "material",
      "name": "Abus Kabelschloss Primo 590 ",
      "description": "· 9,5 mm starkes, smoke-mattes Spiralkabel mit integrierter Halterlösung zur Befestigung am Sattelklemmbolzen · bewährter Qualitäts-Schließzylinder mit praktischem Wendeschlüssel · KabelØ: 9,5 mm, Länge: 150 cm",
      "quantity": 2,
      "unitName": "Stück",
      "unitPrice": {
        "currency": "EUR",
        "netAmount": 13.4,
        "grossAmount": 15.95,
        "taxRatePercentage": 19
      },
      "discountPercentage": 50,
      "lineItemAmount": 13.4
    },
    {
      "id": "dc4c805b-7df1-4310-a548-22be4499eb04",
      "type": "service",
      "name": "Aufwändige Montage",
      "description": "Aufwand für arbeitsintensive Montagetätigkeit",
      "quantity": 1,
      "unitName": "Stunde",
      "unitPrice": {
        "currency": "EUR",
        "netAmount": 8.32,
        "grossAmount": 8.9,
        "taxRatePercentage": 7
      },
      "discountPercentage": 0,
      "lineItemAmount": 8.32
    },
    {
      "id": null,
      "type": "custom",
      "name": "Energieriegel Testpaket",
      "description": null,
      "quantity": 1,
      "unitName": "Stück",
      "unitPrice": {
        "currency": "EUR",
        "netAmount": 5,
        "grossAmount": 5,
        "taxRatePercentage": 0
      },
      "discountPercentage": 0,
      "lineItemAmount": 5
    },
    {
      "type": "text",
      "name": "Freitextposition",
      "description": "This item type can contain either a name or a description or both."
    }
  ],
  "totalPrice": {
    "currency": "EUR",
    "totalNetAmount": 26.72,
    "totalGrossAmount": 29.85,
    "totalTaxAmount": 3.13,
    "totalDiscountAbsolute": null,
    "totalDiscountPercentage": null
  },
  "taxAmounts": [
    {
      "taxRatePercentage": 0,
      "taxAmount": 0,
      "netAmount": 5
    },
    {
      "taxRatePercentage": 7,
      "taxAmount": 0.58,
      "netAmount": 8.32
    },
    {
      "taxRatePercentage": 19,
      "taxAmount": 2.55,
      "netAmount": 13.4
    }
  ],
  "taxConditions": {
    "taxType": "net",
    "taxTypeNote": null
  },
  "paymentConditions": {
    "paymentTermLabel": "10 Tage - 3 %, 30 Tage netto",
    "paymentTermLabelTemplate": "{discountRange} Tage -{discount}, {paymentRange} Tage netto",
    "paymentTermDuration": 30,
    "paymentDiscountConditions": {
      "discountPercentage": 3,
      "discountRange": 10
    }
  },
  "title": "Rechnung",
  "introduction": "Ihre bestellten Positionen stellen wir Ihnen hiermit in Rechnung",
  "remark": "Vielen Dank für Ihren Einkauf",
  "recurringTemplateSettings": {
    "id": "9c5b8bde-7d36-49e8-af5c-4fbe7dc9fa01",
    "startDate": "2021-03-01",
    "endDate": "2021-06-30",
    "finalize": true,
    "shippingType": "service",
    "executionInterval": "MONTHLY",
    "nextExecutionDate": "2021-03-01",
    "lastExecutionFailed": false,
    "lastExecutionErrorMessage": null,
    "executionStatus": "ACTIVE"
  }
}

Compared to invoices, recurring templates do not have a voucherStatus, voucherNumber, voucherDate, dueDate, shippingConditions, and files, as these are only derived or calculated during invoice creation.

Fields

id: ReadOnly<Uuid>

Unique id generated on creation by lexoffice.
Read-only.

organization_id: ReadOnly<Uuid>

Unique id of the organization the recurring template belongs to.
Read-only.

created_date: ReadOnly<DateTime>

The instant of time when the 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 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 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.

address: Option<Address>

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

line_items: Option<Vec<LineItems>>

The items of the invoice. For details see below.

total_price: Option<TotalPrice>

The total price of the 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.
Read-only.

tax_conditions: Option<TaxConditions>

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

payment_conditions: Option<PaymentConditions>

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

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.

recurring_template_settings: ReadOnly<RecurringTemplateSettings>

The settings for creating recurring template.
Read-only.

Implementations

impl RecurringTemplate[src]

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

Create a builder for building RecurringTemplate. On the builder, call .language(...)(optional), .address(...)(optional), .line_items(...)(optional), .total_price(...)(optional), .tax_conditions(...)(optional), .payment_conditions(...)(optional), .title(...)(optional), .introduction(...)(optional), .remark(...)(optional) to set the values of the fields. Finally, call .build() to create the instance of RecurringTemplate.

Trait Implementations

impl Clone for RecurringTemplate[src]

impl Debug for RecurringTemplate[src]

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

impl HasId for RecurringTemplate[src]

impl PartialEq<RecurringTemplate> for RecurringTemplate[src]

impl Serialize for RecurringTemplate[src]

impl StructuralPartialEq for RecurringTemplate[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.