gw2lib_model/authenticated/account/
inventory.rs1use serde::{Deserialize, Serialize};
2
3use crate::{
4 authenticated::characters::Binding,
5 items::{skins::SkinId, ItemId},
6 Endpoint, FixedEndpoint,
7};
8
9pub type AccountInventory = Vec<Option<AccountInventoryItem>>;
10
11#[derive(Clone, PartialEq, Debug, Serialize, Deserialize, Eq)]
12#[cfg_attr(test, serde(deny_unknown_fields))]
13pub struct AccountInventoryItem {
14 pub id: ItemId,
15 pub count: u8,
16 pub charges: Option<u8>,
17 pub upgrades: Option<Vec<ItemId>>,
18 pub skin: Option<SkinId>,
19 pub infusions: Option<Vec<ItemId>>,
20 pub binding: Option<Binding>,
21}
22
23impl Endpoint for AccountInventory {
24 const AUTHENTICATED: bool = true;
25 const LOCALE: bool = false;
26 const URL: &'static str = "v2/account/inventory";
27 const VERSION: &'static str = "2023-07-01T00:00:00.000Z";
28}
29
30impl FixedEndpoint for AccountInventory {}