diff --git a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/send/SendInvoice.java b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/send/SendInvoice.java index d47d07f3..66520450 100644 --- a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/send/SendInvoice.java +++ b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/send/SendInvoice.java @@ -199,9 +199,6 @@ public class SendInvoice extends BotApiMethod { if (Strings.isNullOrEmpty(providerToken)) { throw new TelegramApiValidationException("ProviderToken parameter can't be empty", this); } - if (Strings.isNullOrEmpty(startParameter)) { - throw new TelegramApiValidationException("StartParameter parameter can't be empty", this); - } if (Strings.isNullOrEmpty(currency)) { throw new TelegramApiValidationException("Currency parameter can't be empty", this); } diff --git a/telegrambots-meta/src/test/java/org/telegram/telegrambots/meta/api/methods/send/SendInvoiceTest.java b/telegrambots-meta/src/test/java/org/telegram/telegrambots/meta/api/methods/send/SendInvoiceTest.java index 39e497fd..a5e5b0aa 100644 --- a/telegrambots-meta/src/test/java/org/telegram/telegrambots/meta/api/methods/send/SendInvoiceTest.java +++ b/telegrambots-meta/src/test/java/org/telegram/telegrambots/meta/api/methods/send/SendInvoiceTest.java @@ -67,14 +67,6 @@ public class SendInvoiceTest { assertEquals("ProviderToken parameter can't be empty", thrown.getMessage()); } - @Test - public void startParameterCantBeEmpty() { - SendInvoice sendInvoice = createSendInvoiceObject(); - sendInvoice.setStartParameter(""); - Throwable thrown = assertThrows(TelegramApiValidationException.class, sendInvoice::validate); - assertEquals("StartParameter parameter can't be empty", thrown.getMessage()); - } - @Test public void currencyCantBeEmpty() { SendInvoice sendInvoice = createSendInvoiceObject();