Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ayrat555 committed Jul 2, 2024
1 parent 669c774 commit 4d5a341
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions src/objects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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<String>,
}

#[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<RevenueWithdrawalState>,
}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)]
Expand Down

0 comments on commit 4d5a341

Please sign in to comment.