diff --git a/src/objects.rs b/src/objects.rs index 5081c27..418e8f9 100644 --- a/src/objects.rs +++ b/src/objects.rs @@ -4107,9 +4107,6 @@ pub enum RevenueWithdrawalState { #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder, Eq)] pub struct RevenueWithdrawalStatePending {} -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder, Eq)] -pub struct RevenueWithdrawalStateFailed {} - #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder, Eq)] pub struct RevenueWithdrawalStateSucceeded { pub date: u64, @@ -4118,23 +4115,32 @@ pub struct RevenueWithdrawalStateSucceeded { pub url: String, } +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder, Eq)] +pub struct RevenueWithdrawalStateFailed {} + #[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] #[serde(tag = "type", rename_all = "snake_case")] pub enum TransactionPartner { - Fragment(TransactionPartnerFragment), User(TransactionPartnerUser), + Fragment(TransactionPartnerFragment), TelegramAds(TransactionPartnerTelegramAds), Other(TransactionPartnerOther), } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] -pub struct TransactionPartnerFragment { - pub withdrawal_state: RevenueWithdrawalState, +pub struct TransactionPartnerUser { + pub user: User, + + #[serde(skip_serializing_if = "Option::is_none")] + #[builder(setter(into, strip_option), default)] + pub invoice_payload: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] -pub struct TransactionPartnerUser { - pub user: User, +pub struct TransactionPartnerFragment { + #[serde(skip_serializing_if = "Option::is_none")] + #[builder(setter(into, strip_option), default)] + pub withdrawal_state: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)]