Skip to content

Commit 35fda99

Browse files
authored
Merge pull request #390 from mircoianese/api_v7.7
BOT API v7.7
2 parents 0e6168f + cade9a7 commit 35fda99

File tree

6 files changed

+86
-6
lines changed

6 files changed

+86
-6
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ Java library for interacting with [Telegram Bot API](https://core.telegram.org/b
1313

1414
Gradle:
1515
```groovy
16-
implementation 'com.github.pengrad:java-telegram-bot-api:7.6.0'
16+
implementation 'com.github.pengrad:java-telegram-bot-api:7.7.0'
1717
```
1818
Maven:
1919
```xml
2020
<dependency>
2121
<groupId>com.github.pengrad</groupId>
2222
<artifactId>java-telegram-bot-api</artifactId>
23-
<version>7.6.0</version>
23+
<version>7.7.0</version>
2424
</dependency>
2525
```
2626
[JAR with all dependencies on release page](https://github.com/pengrad/java-telegram-bot-api/releases)

README_RU.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ Java библиотека, созданная для работы с [Telegram B
1313

1414
Gradle:
1515
```groovy
16-
implementation 'com.github.pengrad:java-telegram-bot-api:7.6.0'
16+
implementation 'com.github.pengrad:java-telegram-bot-api:7.7.0'
1717
```
1818
Maven:
1919
```xml
2020
<dependency>
2121
<groupId>com.github.pengrad</groupId>
2222
<artifactId>java-telegram-bot-api</artifactId>
23-
<version>7.6.0</version>
23+
<version>7.7.0</version>
2424
</dependency>
2525
```
2626
Также JAR со всеми зависимостями можно найти [в релизах](https://github.com/pengrad/java-telegram-bot-api/releases).

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
GROUP=com.github.pengrad
2-
VERSION_NAME=7.6.0
2+
VERSION_NAME=7.7.0
33

44
POM_DESCRIPTION=Java API for Telegram Bot API
55
POM_URL=https://github.com/pengrad/java-telegram-bot-api/

library/src/main/java/com/pengrad/telegrambot/model/Message.java

+7
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ public class Message extends MaybeInaccessibleMessage implements Serializable {
7777
private MaybeInaccessibleMessage pinned_message;
7878
private Invoice invoice;
7979
private SuccessfulPayment successful_payment;
80+
private RefundedPayment refunded_payment;
8081
private Story story;
8182
private UserShared user_shared; //@deprectated
8283
private UsersShared users_shared;
@@ -399,6 +400,10 @@ public SuccessfulPayment successfulPayment() {
399400
return successful_payment;
400401
}
401402

403+
public RefundedPayment refundedPayment() {
404+
return refunded_payment;
405+
}
406+
402407
public Story story() {
403408
return story;
404409
}
@@ -576,6 +581,7 @@ public boolean equals(Object o) {
576581
Objects.equals(pinned_message, message.pinned_message) &&
577582
Objects.equals(invoice, message.invoice) &&
578583
Objects.equals(successful_payment, message.successful_payment) &&
584+
Objects.equals(refunded_payment, message.refunded_payment) &&
579585
Objects.equals(story, message.story) &&
580586
Objects.equals(user_shared, message.user_shared) &&
581587
Objects.equals(users_shared, message.users_shared) &&
@@ -667,6 +673,7 @@ public String toString() {
667673
", pinned_message=" + pinned_message +
668674
", invoice=" + invoice +
669675
", successful_payment=" + successful_payment +
676+
", refunded_payment=" + refunded_payment +
670677
", story=" + story +
671678
", user_shared=" + user_shared +
672679
", users_shared=" + users_shared +
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
package com.pengrad.telegrambot.model;
2+
3+
import com.pengrad.telegrambot.model.stars.StarTransaction;
4+
5+
import java.io.Serializable;
6+
import java.util.Objects;
7+
8+
public class RefundedPayment implements Serializable {
9+
10+
private final static long serialVersionUID = 0L;
11+
12+
private String currency;
13+
14+
private Integer total_amount;
15+
16+
private String invoice_payload;
17+
18+
private String telegram_payment_charge_id;
19+
20+
private String provider_payment_charge_id;
21+
22+
public String currency() {
23+
return currency;
24+
}
25+
26+
public Integer totalAmount() {
27+
return total_amount;
28+
}
29+
30+
public String invoicePayload() {
31+
return invoice_payload;
32+
}
33+
34+
public String telegramPaymentChargeId() {
35+
return telegram_payment_charge_id;
36+
}
37+
38+
public String providerPaymentChargeId() {
39+
return provider_payment_charge_id;
40+
}
41+
42+
43+
@Override
44+
public boolean equals(Object o) {
45+
if (this == o) return true;
46+
if (o == null || getClass() != o.getClass()) return false;
47+
48+
RefundedPayment that = (RefundedPayment) o;
49+
return Objects.equals(currency, that.currency) &&
50+
Objects.equals(total_amount, that.total_amount) &&
51+
Objects.equals(invoice_payload, that.invoice_payload) &&
52+
Objects.equals(telegram_payment_charge_id, that.telegram_payment_charge_id) &&
53+
Objects.equals(provider_payment_charge_id, that.provider_payment_charge_id);
54+
}
55+
56+
@Override
57+
public int hashCode() {
58+
return Objects.hash(currency, total_amount, invoice_payload, telegram_payment_charge_id, provider_payment_charge_id);
59+
}
60+
61+
@Override
62+
public String toString() {
63+
return "RefundedPayment{" +
64+
"currency='" + currency + "'," +
65+
"total_amount='" + total_amount + "'," +
66+
"invoice_payload='" + invoice_payload + "'," +
67+
"telegram_payment_charge_id='" + telegram_payment_charge_id + "'," +
68+
"provider_payment_charge_id='" + provider_payment_charge_id + "'" +
69+
'}';
70+
}
71+
72+
73+
}

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<modelVersion>4.0.0</modelVersion>
1010
<groupId>com.github.pengrad</groupId>
1111
<artifactId>java-telegram-bot-api</artifactId>
12-
<version>7.6.0</version>
12+
<version>7.7.0</version>
1313
<name>JavaTelegramBotApi</name>
1414
<description>Java API for Telegram Bot API</description>
1515
<url>https://github.com/pengrad/java-telegram-bot-api/</url>

0 commit comments

Comments
 (0)