Skip to content

Commit

Permalink
Updated to Telegram Bot Api 7.7
Browse files Browse the repository at this point in the history
  • Loading branch information
DEHuckaKpyT committed Jul 10, 2024
1 parent e608be8 commit c984f0a
Show file tree
Hide file tree
Showing 8 changed files with 75 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Writerside/v.list
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE vars SYSTEM "https://resources.jetbrains.com/writerside/1.0/vars.dtd">
<vars>
<var name="current_version" value="0.9.6"/>
<var name="current_version" value="0.9.7"/>
</vars>
2 changes: 1 addition & 1 deletion Writerside/writerside.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
<ihp version="2.0">
<topics dir="topics" web-path="topics"/>
<images dir="images" web-path="telegram-bot"/>
<instance src="ktb.tree" web-path="/ktb/" version="0.9.6"/>
<instance src="ktb.tree" web-path="/ktb/" version="0.9.7"/>
</ihp>
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {

allprojects {
group = "io.github.dehuckakpyt.telegrambot"
version = "0.9.6"
version = "0.9.7"
}

subprojects {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import io.github.dehuckakpyt.telegrambot.api.client.TelegramApiClient
import kotlin.String

/**
* Created on 05.07.2024.
* Created on 10.07.2024.
*
* @author KScript
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ import kotlin.collections.Iterable
import kotlin.collections.List

/**
* Created on 05.07.2024.
* Created on 10.07.2024.
*
* @author KScript
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ import kotlin.collections.List
* payments ](https://core.telegram.org/bots/api/#payments)
* @param successfulPayment *Optional*. Message is a service message about a successful payment,
* information about the payment. [More about payments ](https://core.telegram.org/bots/api/#payments)
* @param refundedPayment *Optional*. Message is a service message about a refunded payment,
* information about the payment. [More about payments ](https://core.telegram.org/bots/api/#payments)
* @param usersShared *Optional*. Service message: users were shared with the bot
* @param chatShared *Optional*. Service message: a chat was shared with the bot
* @param connectedWebsite *Optional*. The domain name of the website on which the user has logged
Expand Down Expand Up @@ -563,6 +565,13 @@ public data class Message(
@get:JsonProperty("successful_payment")
@param:JsonProperty("successful_payment")
public val successfulPayment: SuccessfulPayment? = null,
/**
* *Optional*. Message is a service message about a refunded payment, information about the
* payment. [More about payments ](https://core.telegram.org/bots/api/#payments)
*/
@get:JsonProperty("refunded_payment")
@param:JsonProperty("refunded_payment")
public val refundedPayment: RefundedPayment? = null,
/**
* *Optional*. Service message: users were shared with the bot
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
package io.github.dehuckakpyt.telegrambot.model.telegram

import com.fasterxml.jackson.`annotation`.JsonProperty
import kotlin.Int
import kotlin.String

/**
* This object contains basic information about a refunded payment.
*
* @see [RefundedPayment] (https://core.telegram.org/bots/api/#refundedpayment)
*
* @author KScript
*
* @param currency Three-letter ISO 4217
* [currency](https://core.telegram.org/bots/payments#supported-currencies) code, or “XTR” for payments
* in [Telegram Stars](https://t.me/BotNews/90). Currently, always “XTR”
* @param totalAmount Total refunded price in the *smallest units* of the currency (integer, **not**
* float/double). For example, for a price of `US$ 1.45`, `total_amount = 145`. See the *exp* parameter
* in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number
* of digits past the decimal point for each currency (2 for the majority of currencies).
* @param invoicePayload Bot-specified invoice payload
* @param telegramPaymentChargeId Telegram payment identifier
* @param providerPaymentChargeId *Optional*. Provider payment identifier
*/
public data class RefundedPayment(
/**
* Three-letter ISO 4217
* [currency](https://core.telegram.org/bots/payments#supported-currencies) code, or “XTR” for
* payments in [Telegram Stars](https://t.me/BotNews/90). Currently, always “XTR”
*/
@get:JsonProperty("currency")
@param:JsonProperty("currency")
public val currency: String,
/**
* Total refunded price in the *smallest units* of the currency (integer, **not** float/double).
* For example, for a price of `US$ 1.45`, `total_amount = 145`. See the *exp* parameter in
* [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number
* of digits past the decimal point for each currency (2 for the majority of currencies).
*/
@get:JsonProperty("total_amount")
@param:JsonProperty("total_amount")
public val totalAmount: Int,
/**
* Bot-specified invoice payload
*/
@get:JsonProperty("invoice_payload")
@param:JsonProperty("invoice_payload")
public val invoicePayload: String,
/**
* Telegram payment identifier
*/
@get:JsonProperty("telegram_payment_charge_id")
@param:JsonProperty("telegram_payment_charge_id")
public val telegramPaymentChargeId: String,
/**
* *Optional*. Provider payment identifier
*/
@get:JsonProperty("provider_payment_charge_id")
@param:JsonProperty("provider_payment_charge_id")
public val providerPaymentChargeId: String? = null,
)

0 comments on commit c984f0a

Please sign in to comment.