1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//! Shop label models: the merchant's own tags for grouping shops, for
//! example by industry, brand or region.
use serde::Deserialize;
use serde_json::Value;
/// A label of the merchant and the shops that carry it.
#[derive(Debug, Clone, Deserialize)]
#[non_exhaustive]
pub struct ShopLabelResponse {
/// The label's ID.
pub label_id: String,
/// The label's name.
pub name: String,
/// The shops carrying this label that the caller may see, in no
/// particular order. A shop-scoped caller sees at most its own shop.
#[serde(default)]
pub profile_ids: Vec<String>,
/// Any additional response fields not modeled above.
#[serde(flatten)]
pub extra: serde_json::Map<String, Value>,
}
/// One label, as a shop carries it.
#[derive(Debug, Clone, Deserialize)]
#[non_exhaustive]
pub struct ShopLabelSummary {
/// The label's ID.
pub label_id: String,
/// The label's name.
pub name: String,
/// Any additional response fields not modeled above.
#[serde(flatten)]
pub extra: serde_json::Map<String, Value>,
}
/// The labels one shop carries.
#[derive(Debug, Clone, Deserialize)]
#[non_exhaustive]
pub struct ShopLabelsResponse {
/// The shop.
pub profile_id: String,
/// The shop's labels, ordered by name.
#[serde(default)]
pub labels: Vec<ShopLabelSummary>,
/// Any additional response fields not modeled above.
#[serde(flatten)]
pub extra: serde_json::Map<String, Value>,
}
/// Outcome of deleting a shop label.
#[derive(Debug, Clone, Deserialize)]
#[non_exhaustive]
pub struct ShopLabelDeleteResponse {
/// The deleted label's ID.
pub label_id: String,
/// Always `true`: the label is gone and no shop carries it any more. The
/// shops themselves are unchanged.
pub deleted: bool,
/// Any additional response fields not modeled above.
#[serde(flatten)]
pub extra: serde_json::Map<String, Value>,
}