Skip to content

Commit

Permalink
Merge pull request #390 from mircoianese/api_v7.7
Browse files Browse the repository at this point in the history
BOT API v7.7
  • Loading branch information
pengrad authored Jul 8, 2024
2 parents 0e6168f + cade9a7 commit 35fda99
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ Java library for interacting with [Telegram Bot API](https://core.telegram.org/b

Gradle:
```groovy
implementation 'com.github.pengrad:java-telegram-bot-api:7.6.0'
implementation 'com.github.pengrad:java-telegram-bot-api:7.7.0'
```
Maven:
```xml
<dependency>
<groupId>com.github.pengrad</groupId>
<artifactId>java-telegram-bot-api</artifactId>
<version>7.6.0</version>
<version>7.7.0</version>
</dependency>
```
[JAR with all dependencies on release page](https://github.com/pengrad/java-telegram-bot-api/releases)
Expand Down
4 changes: 2 additions & 2 deletions README_RU.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ Java библиотека, созданная для работы с [Telegram B

Gradle:
```groovy
implementation 'com.github.pengrad:java-telegram-bot-api:7.6.0'
implementation 'com.github.pengrad:java-telegram-bot-api:7.7.0'
```
Maven:
```xml
<dependency>
<groupId>com.github.pengrad</groupId>
<artifactId>java-telegram-bot-api</artifactId>
<version>7.6.0</version>
<version>7.7.0</version>
</dependency>
```
Также JAR со всеми зависимостями можно найти [в релизах](https://github.com/pengrad/java-telegram-bot-api/releases).
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
GROUP=com.github.pengrad
VERSION_NAME=7.6.0
VERSION_NAME=7.7.0

POM_DESCRIPTION=Java API for Telegram Bot API
POM_URL=https://github.com/pengrad/java-telegram-bot-api/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public class Message extends MaybeInaccessibleMessage implements Serializable {
private MaybeInaccessibleMessage pinned_message;
private Invoice invoice;
private SuccessfulPayment successful_payment;
private RefundedPayment refunded_payment;
private Story story;
private UserShared user_shared; //@deprectated
private UsersShared users_shared;
Expand Down Expand Up @@ -399,6 +400,10 @@ public SuccessfulPayment successfulPayment() {
return successful_payment;
}

public RefundedPayment refundedPayment() {
return refunded_payment;
}

public Story story() {
return story;
}
Expand Down Expand Up @@ -576,6 +581,7 @@ public boolean equals(Object o) {
Objects.equals(pinned_message, message.pinned_message) &&
Objects.equals(invoice, message.invoice) &&
Objects.equals(successful_payment, message.successful_payment) &&
Objects.equals(refunded_payment, message.refunded_payment) &&
Objects.equals(story, message.story) &&
Objects.equals(user_shared, message.user_shared) &&
Objects.equals(users_shared, message.users_shared) &&
Expand Down Expand Up @@ -667,6 +673,7 @@ public String toString() {
", pinned_message=" + pinned_message +
", invoice=" + invoice +
", successful_payment=" + successful_payment +
", refunded_payment=" + refunded_payment +
", story=" + story +
", user_shared=" + user_shared +
", users_shared=" + users_shared +
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
package com.pengrad.telegrambot.model;

import com.pengrad.telegrambot.model.stars.StarTransaction;

import java.io.Serializable;
import java.util.Objects;

public class RefundedPayment implements Serializable {

private final static long serialVersionUID = 0L;

private String currency;

private Integer total_amount;

private String invoice_payload;

private String telegram_payment_charge_id;

private String provider_payment_charge_id;

public String currency() {
return currency;
}

public Integer totalAmount() {
return total_amount;
}

public String invoicePayload() {
return invoice_payload;
}

public String telegramPaymentChargeId() {
return telegram_payment_charge_id;
}

public String providerPaymentChargeId() {
return provider_payment_charge_id;
}


@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;

RefundedPayment that = (RefundedPayment) o;
return Objects.equals(currency, that.currency) &&
Objects.equals(total_amount, that.total_amount) &&
Objects.equals(invoice_payload, that.invoice_payload) &&
Objects.equals(telegram_payment_charge_id, that.telegram_payment_charge_id) &&
Objects.equals(provider_payment_charge_id, that.provider_payment_charge_id);
}

@Override
public int hashCode() {
return Objects.hash(currency, total_amount, invoice_payload, telegram_payment_charge_id, provider_payment_charge_id);
}

@Override
public String toString() {
return "RefundedPayment{" +
"currency='" + currency + "'," +
"total_amount='" + total_amount + "'," +
"invoice_payload='" + invoice_payload + "'," +
"telegram_payment_charge_id='" + telegram_payment_charge_id + "'," +
"provider_payment_charge_id='" + provider_payment_charge_id + "'" +
'}';
}


}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.pengrad</groupId>
<artifactId>java-telegram-bot-api</artifactId>
<version>7.6.0</version>
<version>7.7.0</version>
<name>JavaTelegramBotApi</name>
<description>Java API for Telegram Bot API</description>
<url>https://github.com/pengrad/java-telegram-bot-api/</url>
Expand Down

0 comments on commit 35fda99

Please sign in to comment.