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
use super::*;

/// <https://vk.com/dev/objects/link>
#[derive(Deserialize, Clone, Debug)]
pub struct Link {
    pub url: String,
    pub title: String,
    pub caption: Option<String>,
    pub description: Option<String>,
    pub photo: Option<photo::Photo>,
    pub product: Option<Product>,
    pub button: button::Button,
    pub preview_page: String,
    pub preview_url: String,
}

/// <https://vk.com/dev/link_product>
#[derive(Deserialize, Clone, Debug)]
pub struct Product {
    pub price: Price,
}

/// <https://vk.com/dev/price>
#[derive(Deserialize, Clone, Debug)]
pub struct Price {
    pub amount: Integer,
    pub currency: Currency,
    pub text: String,
}

/// <https://vk.com/dev/price>
#[derive(Deserialize, Clone, Debug)]
pub struct Currency {
    pub id: Integer,
    pub name: String,
}