fns_api_client/dto/
ticket.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Serialize, Deserialize, Debug, Clone)]
4#[serde(rename_all = "camelCase")]
5pub struct Ticket {
6    id: u64,
7    ofd_id: String,
8    receive_date: String,
9    subtype: String,
10    address: String,
11    content: Content,
12}
13
14#[derive(Serialize, Deserialize, Debug, Clone)]
15#[serde(rename_all = "camelCase")]
16struct Content {
17    message_fiscal_sign: u64,
18    code: u32,
19    fiscal_document_format_ver: u32,
20    fiscal_drive_number: String,
21    kkt_reg_id: String,
22    user_inn: String,
23    fiscal_document_number: u32,
24    date_time: u64,
25    fiscal_sign: u32,
26    shift_number: u32,
27    request_number: u32,
28    operation_type: u32,
29    total_sum: u32,
30    operator: String,
31    items: Vec<Item>,
32    nds_no: u32,
33    user: String,
34    retail_place_address: String,
35    retail_place: String,
36    applied_taxation_type: u32,
37    fns_url: String,
38    cash_total_sum: u32,
39    ecash_total_sum: u32,
40    prepaid_sum: u32,
41    credit_sum: u32,
42    provision_sum: u32,
43    region: String,
44    number_kkt: String,
45    #[serde(rename = "redefine_mask")]
46    redefine_mask: u32,
47}
48
49#[derive(Serialize, Deserialize, Debug, Clone)]
50#[serde(rename_all = "camelCase")]
51struct Item {
52    name: String,
53    price: u32,
54    quantity: f64,
55    nds: u32,
56    nds_sum: u32,
57    product_type: u32,
58    payment_type: u32,
59    sum: u32,
60    items_quantity_measure: u32,
61}