|
4 | 4 | import com.pengrad.telegrambot.model.business.BusinessIntro; |
5 | 5 | import com.pengrad.telegrambot.model.business.BusinessLocation; |
6 | 6 | import com.pengrad.telegrambot.model.business.BusinessOpeningHours; |
| 7 | +import com.pengrad.telegrambot.model.gift.AcceptedGiftTypes; |
7 | 8 | import com.pengrad.telegrambot.model.reaction.ReactionType; |
8 | 9 |
|
9 | 10 |
|
@@ -71,6 +72,7 @@ public enum Type { |
71 | 72 | private Long linked_chat_id; |
72 | 73 | private ChatLocation location; |
73 | 74 | private Boolean can_send_gift; |
| 75 | + private AcceptedGiftTypes accepted_gift_types; |
74 | 76 |
|
75 | 77 | public Long id() { |
76 | 78 | return id; |
@@ -247,10 +249,19 @@ public ChatLocation location() { |
247 | 249 | return location; |
248 | 250 | } |
249 | 251 |
|
| 252 | + /** |
| 253 | + * |
| 254 | + * @deprecated Use 'acceptedGiftTypes' instead |
| 255 | + */ |
| 256 | + @Deprecated |
250 | 257 | public Boolean canSendGift() { |
251 | 258 | return can_send_gift; |
252 | 259 | } |
253 | 260 |
|
| 261 | + public AcceptedGiftTypes acceptedGiftTypes() { |
| 262 | + return accepted_gift_types; |
| 263 | + } |
| 264 | + |
254 | 265 | @Override |
255 | 266 | public boolean equals(Object o) { |
256 | 267 | if (this == o) return true; |
@@ -300,7 +311,7 @@ public boolean equals(Object o) { |
300 | 311 | Objects.equals(custom_emoji_sticker_set_name, chat.custom_emoji_sticker_set_name) && |
301 | 312 | Objects.equals(linked_chat_id, chat.linked_chat_id) && |
302 | 313 | Objects.equals(location, chat.location) && |
303 | | - Objects.equals(can_send_gift, chat.can_send_gift); |
| 314 | + Objects.equals(accepted_gift_types, chat.accepted_gift_types); |
304 | 315 | } |
305 | 316 |
|
306 | 317 | @Override |
@@ -355,7 +366,7 @@ public String toString() { |
355 | 366 | ", custom_emoji_sticker_set_name=" + custom_emoji_sticker_set_name + |
356 | 367 | ", linked_chat_id=" + linked_chat_id + |
357 | 368 | ", location=" + location + |
358 | | - ", can_send_gift=" + can_send_gift + |
| 369 | + ", accepted_gift_types=" + accepted_gift_types + |
359 | 370 | '}'; |
360 | 371 | } |
361 | 372 | } |
0 commit comments