fastly_api/models/
invoice.rs

1/*
2 * Fastly API
3 *
4 * Via the Fastly API you can perform any of the operations that are possible within the management console,  including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://www.fastly.com/documentation/reference/api/) 
5 *
6 */
7
8
9
10
11#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12pub struct Invoice {
13    /// Customer ID associated with the invoice.
14    #[serde(rename = "customer_id", skip_serializing_if = "Option::is_none")]
15    pub customer_id: Option<String>,
16    /// Numeric string identifying the invoice.
17    #[serde(rename = "invoice_id", skip_serializing_if = "Option::is_none")]
18    pub invoice_id: Option<String>,
19    /// Date and time invoice was posted on, in ISO 8601 format.
20    #[serde(rename = "invoice_posted_on", skip_serializing_if = "Option::is_none")]
21    pub invoice_posted_on: Option<String>,
22    /// Date and time (in ISO 8601 format) for initiation point of a billing cycle, signifying the start of charges for a service or subscription.
23    #[serde(rename = "billing_start_date", skip_serializing_if = "Option::is_none")]
24    pub billing_start_date: Option<String>,
25    /// Date and time (in ISO 8601 format) for termination point of a billing cycle, signifying the end of charges for a service or subscription.
26    #[serde(rename = "billing_end_date", skip_serializing_if = "Option::is_none")]
27    pub billing_end_date: Option<String>,
28    /// Alphanumeric string identifying the statement number.
29    #[serde(rename = "statement_number", skip_serializing_if = "Option::is_none")]
30    pub statement_number: Option<String>,
31    /// Three-letter code representing a specific currency used for financial transactions.
32    #[serde(rename = "currency_code", skip_serializing_if = "Option::is_none")]
33    pub currency_code: Option<String>,
34    /// Total billable amount for invoiced services charged within a single month.
35    #[serde(rename = "monthly_transaction_amount", skip_serializing_if = "Option::is_none")]
36    pub monthly_transaction_amount: Option<f32>,
37    #[serde(rename = "transaction_line_items", skip_serializing_if = "Option::is_none")]
38    pub transaction_line_items: Option<Vec<crate::models::Invoicelineitems>>,
39}
40
41impl Invoice {
42    pub fn new() -> Invoice {
43        Invoice {
44            customer_id: None,
45            invoice_id: None,
46            invoice_posted_on: None,
47            billing_start_date: None,
48            billing_end_date: None,
49            statement_number: None,
50            currency_code: None,
51            monthly_transaction_amount: None,
52            transaction_line_items: None,
53        }
54    }
55}
56
57