Rename ChatRevenueWithdrawalState tp RevenueWithdrawalState.

This commit is contained in:
levlam 2024-06-13 19:22:45 +03:00
parent b33c7d9a02
commit 021c305770
2 changed files with 9 additions and 9 deletions

View File

@ -6863,18 +6863,18 @@ messageStatistics message_interaction_graph:StatisticalGraph message_reaction_gr
storyStatistics story_interaction_graph:StatisticalGraph story_reaction_graph:StatisticalGraph = StoryStatistics; storyStatistics story_interaction_graph:StatisticalGraph story_reaction_graph:StatisticalGraph = StoryStatistics;
//@class ChatRevenueWithdrawalState @description Describes state of a chat revenue withdrawal //@class RevenueWithdrawalState @description Describes state of a revenue withdrawal
//@description Withdrawal is pending //@description Withdrawal is pending
chatRevenueWithdrawalStatePending = ChatRevenueWithdrawalState; revenueWithdrawalStatePending = RevenueWithdrawalState;
//@description Withdrawal was completed //@description Withdrawal was completed
//@date Point in time (Unix timestamp) when the withdrawal was completed //@date Point in time (Unix timestamp) when the withdrawal was completed
//@url The URL where the withdrawal transaction can be viewed //@url The URL where the withdrawal transaction can be viewed
chatRevenueWithdrawalStateCompleted date:int32 url:string = ChatRevenueWithdrawalState; revenueWithdrawalStateCompleted date:int32 url:string = RevenueWithdrawalState;
//@description Withdrawal has_failed //@description Withdrawal has_failed
chatRevenueWithdrawalStateFailed = ChatRevenueWithdrawalState; revenueWithdrawalStateFailed = RevenueWithdrawalState;
//@class ChatRevenueTransactionType @description Describes type of transaction for revenue earned from sponsored messages in a chat //@class ChatRevenueTransactionType @description Describes type of transaction for revenue earned from sponsored messages in a chat
@ -6888,7 +6888,7 @@ chatRevenueTransactionTypeEarnings start_date:int32 end_date:int32 = ChatRevenue
//@withdrawal_date Point in time (Unix timestamp) when the earnings withdrawal started //@withdrawal_date Point in time (Unix timestamp) when the earnings withdrawal started
//@provider Name of the payment provider //@provider Name of the payment provider
//@state State of the withdrawal //@state State of the withdrawal
chatRevenueTransactionTypeWithdrawal withdrawal_date:int32 provider:string state:ChatRevenueWithdrawalState = ChatRevenueTransactionType; chatRevenueTransactionTypeWithdrawal withdrawal_date:int32 provider:string state:RevenueWithdrawalState = ChatRevenueTransactionType;
//@description Describes a refund for failed withdrawal of earnings //@description Describes a refund for failed withdrawal of earnings
//@refund_date Point in time (Unix timestamp) when the transaction was refunded //@refund_date Point in time (Unix timestamp) when the transaction was refunded

View File

@ -415,18 +415,18 @@ class GetBroadcastRevenueTransactionsQuery final : public Td::ResultHandler {
auto transaction = auto transaction =
telegram_api::move_object_as<telegram_api::broadcastRevenueTransactionWithdrawal>(transaction_ptr); telegram_api::move_object_as<telegram_api::broadcastRevenueTransactionWithdrawal>(transaction_ptr);
amount = get_amount(transaction->amount_, true); amount = get_amount(transaction->amount_, true);
auto state = [&]() -> td_api::object_ptr<td_api::ChatRevenueWithdrawalState> { auto state = [&]() -> td_api::object_ptr<td_api::RevenueWithdrawalState> {
if (transaction->transaction_date_ > 0) { if (transaction->transaction_date_ > 0) {
return td_api::make_object<td_api::chatRevenueWithdrawalStateCompleted>(transaction->transaction_date_, return td_api::make_object<td_api::revenueWithdrawalStateCompleted>(transaction->transaction_date_,
transaction->transaction_url_); transaction->transaction_url_);
} }
if (transaction->pending_) { if (transaction->pending_) {
return td_api::make_object<td_api::chatRevenueWithdrawalStatePending>(); return td_api::make_object<td_api::revenueWithdrawalStatePending>();
} }
if (!transaction->failed_) { if (!transaction->failed_) {
LOG(ERROR) << "Transaction has unknown state"; LOG(ERROR) << "Transaction has unknown state";
} }
return td_api::make_object<td_api::chatRevenueWithdrawalStateFailed>(); return td_api::make_object<td_api::revenueWithdrawalStateFailed>();
}(); }();
return td_api::make_object<td_api::chatRevenueTransactionTypeWithdrawal>( return td_api::make_object<td_api::chatRevenueTransactionTypeWithdrawal>(
transaction->date_, transaction->provider_, std::move(state)); transaction->date_, transaction->provider_, std::move(state));