diff --git a/src/core/types/answer_pre_checkout_query.rs b/src/core/types/answer_pre_checkout_query.rs index b38cffe7..02231abe 100644 --- a/src/core/types/answer_pre_checkout_query.rs +++ b/src/core/types/answer_pre_checkout_query.rs @@ -2,5 +2,6 @@ pub struct AnswerPreCheckoutQuery { pub pre_checkout_query_id: String, pub ok: bool, + #[serde(skip_serializing_if = "Option::is_none")] pub error_message: Option, } diff --git a/src/core/types/answer_shipping_query.rs b/src/core/types/answer_shipping_query.rs index 6b14a015..bb6e472d 100644 --- a/src/core/types/answer_shipping_query.rs +++ b/src/core/types/answer_shipping_query.rs @@ -4,6 +4,8 @@ use crate::core::types::ShippingOption; pub struct AnswerShippingQuery { pub shipping_query_id: String, pub ok: bool, + #[serde(skip_serializing_if = "Option::is_none")] pub shipping_options: Option>, + #[serde(skip_serializing_if = "Option::is_none")] pub error_message: Option, } diff --git a/src/core/types/audio.rs b/src/core/types/audio.rs index 1ccf1084..bcad5f21 100644 --- a/src/core/types/audio.rs +++ b/src/core/types/audio.rs @@ -5,9 +5,14 @@ use crate::core::types::PhotoSize; pub struct Audio { pub file_id: String, pub duration: u32, + #[serde(skip_serializing_if = "Option::is_none")] pub performer: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub title: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub mime_type: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub file_size: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub thumb: Option } \ No newline at end of file diff --git a/src/core/types/login_url.rs b/src/core/types/login_url.rs index 5dbf2ec9..bed6b7cb 100644 --- a/src/core/types/login_url.rs +++ b/src/core/types/login_url.rs @@ -1,7 +1,10 @@ #[derive(Debug, Deserialize, Hash, PartialEq, Eq)] pub struct LoginUrl { url: String, + #[serde(skip_serializing_if = "Option::is_none")] forward_text: Option, + #[serde(skip_serializing_if = "Option::is_none")] bot_username: Option, + #[serde(skip_serializing_if = "Option::is_none")] request_write_access: Option, } \ No newline at end of file diff --git a/src/core/types/venue.rs b/src/core/types/venue.rs new file mode 100644 index 00000000..77e02b31 --- /dev/null +++ b/src/core/types/venue.rs @@ -0,0 +1,13 @@ +use crate::core::types::Location; + + +#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Serialize)] +pub struct Venue { + pub location: Location, + pub title: String, + pub address: String, + #[serde(skip_serializing_if = "Option::is_none")] + pub foursquare_id: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub foursquare_type: Option +} \ No newline at end of file