-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Niklas Weimann <[email protected]>
- Loading branch information
1 parent
fd00043
commit 1e4de0c
Showing
9 changed files
with
76 additions
and
6 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
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,36 @@ | ||
using RxTelegram.Bot.Interface.BaseTypes; | ||
|
||
namespace RxTelegram.Bot.Interface.Payments; | ||
|
||
/// <summary> | ||
/// Contains information about the affiliate that received a commission via this transaction. | ||
/// </summary> | ||
public class AffiliateInfo | ||
{ | ||
/// <summary> | ||
/// Optional. The bot or the user that received an affiliate commission if it was received by a bot or a user | ||
/// </summary> | ||
public User AffiliateUser { get; set; } | ||
|
||
/// <summary> | ||
/// Optional. The chat that received an affiliate commission if it was received by a chat | ||
/// </summary> | ||
public Chat AffiliateChat { get; set; } | ||
|
||
/// <summary> | ||
/// The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the bot from referred users | ||
/// </summary> | ||
public int CommissionPerMille { get; set; } | ||
|
||
/// <summary> | ||
/// Integer amount of Telegram Stars received by the affiliate from the transaction, rounded to 0; | ||
/// can be negative for refunds | ||
/// </summary> | ||
public int Amount { get; set; } | ||
|
||
/// <summary> | ||
/// Optional. The number of 1/1000000000 shares of Telegram Stars received by the affiliate; from -999999999 to 999999999; | ||
/// can be negative for refunds | ||
/// </summary> | ||
public int? NanostarAmount { get; set; } | ||
} |
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
25 changes: 25 additions & 0 deletions
25
src/RxTelegram.Bot/Interface/Payments/TransactionPartnerAffiliateProgram.cs
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,25 @@ | ||
using RxTelegram.Bot.Interface.BaseTypes; | ||
using RxTelegram.Bot.Interface.BaseTypes.Enums; | ||
|
||
namespace RxTelegram.Bot.Interface.Payments; | ||
|
||
/// <summary> | ||
/// Describes the affiliate program that issued the affiliate commission received via this transaction. | ||
/// </summary> | ||
public class TransactionPartnerAffiliateProgram : TransactionPartner | ||
{ | ||
/// <summary> | ||
/// Type of the transaction partner, always “affiliate_program” | ||
/// </summary> | ||
public override TransactionPartnerType Type { get; set; } = TransactionPartnerType.AffiliateProgram; | ||
|
||
/// <summary> | ||
/// Optional. Information about the bot that sponsored the affiliate program | ||
/// </summary> | ||
public User SponsorUser { get; set; } | ||
|
||
/// <summary> | ||
/// The number of Telegram Stars received by the bot for each 1000 Telegram Stars received by the affiliate program sponsor from referred users | ||
/// </summary> | ||
public int CommissionPerMille { get; set; } | ||
} |
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
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