-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from Desiders/add-support-bot-api-8.1
Add support Bot API 8.1
- Loading branch information
Showing
6 changed files
with
71 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
use super::{Chat, User}; | ||
|
||
use serde::{Deserialize, Serialize}; | ||
use serde_with::skip_serializing_none; | ||
|
||
/// Contains information about the affiliate that received a commission via this transaction | ||
/// # Documentation | ||
/// <https://core.telegram.org/bots/api#affiliateinfo> | ||
#[skip_serializing_none] | ||
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize)] | ||
pub struct AffiliateInfo { | ||
/// The bot or the user that received an affiliate commission if it was received by a bot or a user | ||
pub affiliate_user: Option<User>, | ||
/// The chat that received an affiliate commission if it was received by a chat | ||
pub affiliate_chat: Option<Chat>, | ||
/// The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the bot from referred users | ||
pub commission_per_mille: i64, | ||
/// Integer amount of Telegram Stars received by the affiliate from the transaction, rounded to 0; can be negative for refunds | ||
pub amount: i64, | ||
/// The number of 1/1000000000 shares of Telegram Stars received by the affiliate; from -999999999 to 999999999; can be negative for refunds | ||
pub nanostar_amount: Option<i64>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
use super::User; | ||
|
||
use serde::{Deserialize, Serialize}; | ||
use serde_with::skip_serializing_none; | ||
|
||
/// Describes the affiliate program that issued the affiliate commission received via this transaction. | ||
/// # Documentation | ||
/// <https://core.telegram.org/bots/api#transactionpartneraffiliateprogram> | ||
#[skip_serializing_none] | ||
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize)] | ||
pub struct TransactionPartnerAffiliateProgram { | ||
/// Information about the bot that sponsored the affiliate program | ||
pub sponsor_user: Option<User>, | ||
/// The number of Telegram Stars received by the bot for each 1000 Telegram Stars received by the affiliate program sponsor from referred users | ||
pub commission_per_mille: i64, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters