csgoempire/models/structs/api/response/
inventory.rs

1use serde::{Deserialize, Serialize};
2use serde_json::Value;
3
4#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
5pub struct InventoryResponse {
6    #[serde(default)]
7    pub success: bool,
8    pub updated_at: Option<i64>,
9    pub allow_update: Option<bool>,
10    pub data: Option<Vec<Data>>,
11}
12
13#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
14pub struct Data {
15    pub asset_id: i64,
16    pub created_at: String,
17    pub custom_price_percentage: Option<i64>,
18    pub full_position: i64,
19    pub icon_url: String,
20    pub id: i64,
21    pub invalid: Option<String>,
22    pub is_commodity: bool,
23    pub market_name: String,
24    pub market_value: i64,
25    pub name_color: String,
26    pub position: Option<i64>,
27    pub preview_id: Option<String>,
28    pub price_is_unreliable: i64,
29    pub stickers: Vec<Sticker>,
30    pub tradable: bool,
31    pub tradelock: bool,
32    pub updated_at: String,
33    pub wear: f64,
34}
35
36#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
37pub struct Sticker {
38    pub sticker_id: i64,
39    pub wear: Value,
40    pub name: String,
41    pub image: String,
42}