From 6783e9db2ac1d4a839fc664594ddfd079ad8fd37 Mon Sep 17 00:00:00 2001 From: ekta-slt Date: Fri, 9 Feb 2018 15:21:08 +0530 Subject: [PATCH] Initial release of SendinBlue API V3 Java Package --- .gitignore | 21 + .swagger-codegen-ignore | 23 + .swagger-codegen/VERSION | 1 + .travis.yml | 17 + LICENSE.md | 9 + README.md | 374 +- build.gradle | 104 + build.sbt | 21 + docs/AccountApi.md | 58 + docs/AddCredits.md | 11 + docs/AddRemoveContactToList.md | 10 + docs/AttributesApi.md | 227 ++ docs/ContactsApi.md | 1388 +++++++ docs/CreateAttribute.md | 23 + docs/CreateAttributeEnumeration.md | 11 + docs/CreateChild.md | 14 + docs/CreateContact.md | 16 + docs/CreateEmailCampaign.md | 35 + docs/CreateEmailCampaignRecipients.md | 11 + docs/CreateEmailCampaignSender.md | 11 + docs/CreateList.md | 11 + docs/CreateModel.md | 10 + docs/CreateReseller.md | 10 + docs/CreateSender.md | 12 + docs/CreateSenderIps.md | 12 + docs/CreateSenderModel.md | 12 + docs/CreateSmsCampaign.md | 14 + docs/CreateSmsCampaignRecipients.md | 11 + docs/CreateSmtpEmail.md | 10 + docs/CreateSmtpTemplate.md | 19 + docs/CreateSmtpTemplateSender.md | 11 + docs/CreateUpdateFolder.md | 10 + docs/CreateWebhook.md | 40 + docs/CreatedProcessId.md | 10 + docs/DeleteHardbounces.md | 12 + docs/EmailCampaignsApi.md | 560 +++ docs/EmailExportRecipients.md | 25 + docs/ErrorModel.md | 32 + docs/FoldersApi.md | 338 ++ docs/GetAccount.md | 17 + docs/GetAccountMarketingAutomation.md | 11 + docs/GetAccountPlan.md | 34 + docs/GetAccountRelay.md | 11 + docs/GetAccountRelayData.md | 12 + docs/GetAggregatedReport.md | 21 + docs/GetAttributes.md | 10 + docs/GetAttributesAttributes.md | 35 + docs/GetAttributesEnumeration.md | 11 + docs/GetCampaignOverview.md | 35 + docs/GetCampaignRecipients.md | 11 + docs/GetCampaignStats.md | 21 + docs/GetChildInfo.md | 18 + docs/GetChildInfoApiKeys.md | 11 + docs/GetChildInfoApiKeysV2.md | 11 + docs/GetChildInfoApiKeysV3.md | 11 + docs/GetChildInfoCredits.md | 11 + docs/GetChildInfoStatistics.md | 12 + docs/GetChildrenList.md | 10 + docs/GetClient.md | 13 + docs/GetContactCampaignStats.md | 17 + docs/GetContactCampaignStatsClicked.md | 11 + docs/GetContactCampaignStatsOpened.md | 13 + ...etContactCampaignStatsTransacAttributes.md | 12 + .../GetContactCampaignStatsUnsubscriptions.md | 11 + docs/GetContactDetails.md | 17 + docs/GetContacts.md | 11 + docs/GetEmailCampaign.md | 49 + docs/GetEmailCampaigns.md | 11 + docs/GetEmailEventReport.md | 10 + docs/GetEmailEventReportEvents.md | 36 + docs/GetExtendedCampaignOverview.md | 49 + docs/GetExtendedCampaignOverviewSender.md | 11 + docs/GetExtendedCampaignStats.md | 14 + docs/GetExtendedCampaignStatsLinksStats.md | 10 + docs/GetExtendedClient.md | 14 + docs/GetExtendedClientAddress.md | 13 + docs/GetExtendedContactDetails.md | 18 + docs/GetExtendedContactDetailsStatistics.md | 17 + ...ExtendedContactDetailsStatisticsClicked.md | 11 + ...etExtendedContactDetailsStatisticsLinks.md | 13 + ...dedContactDetailsStatisticsMessagesSent.md | 11 + ...tExtendedContactDetailsStatisticsOpened.md | 13 + ...ContactDetailsStatisticsUnsubscriptions.md | 11 + ...sticsUnsubscriptionsAdminUnsubscription.md | 11 + ...isticsUnsubscriptionsUserUnsubscription.md | 12 + docs/GetExtendedList.md | 17 + docs/GetExtendedListCampaignStats.md | 11 + docs/GetFolder.md | 14 + docs/GetFolderLists.md | 11 + docs/GetFolders.md | 11 + docs/GetIp.md | 13 + docs/GetIpFromSender.md | 13 + docs/GetIps.md | 10 + docs/GetIpsFromSender.md | 10 + docs/GetList.md | 13 + docs/GetLists.md | 11 + docs/GetProcess.md | 22 + docs/GetProcesses.md | 11 + docs/GetReports.md | 10 + docs/GetReportsReports.md | 21 + docs/GetSendersList.md | 10 + docs/GetSendersListIps.md | 12 + docs/GetSendersListSenders.md | 14 + docs/GetSmsCampaign.md | 30 + docs/GetSmsCampaignOverview.md | 30 + docs/GetSmsCampaignStats.md | 16 + docs/GetSmsCampaigns.md | 11 + docs/GetSmsEventReport.md | 10 + docs/GetSmsEventReportEvents.md | 31 + docs/GetSmtpTemplateOverview.md | 21 + docs/GetSmtpTemplateOverviewSender.md | 11 + docs/GetSmtpTemplates.md | 11 + docs/GetStatsByDomain.md | 9 + docs/GetTransacAggregatedSmsReport.md | 19 + docs/GetTransacSmsReport.md | 10 + docs/GetTransacSmsReportReports.md | 19 + docs/GetWebhook.md | 24 + docs/GetWebhooks.md | 10 + docs/ListsApi.md | 510 +++ docs/ManageIp.md | 10 + docs/PostContactInfo.md | 10 + docs/PostContactInfoContacts.md | 11 + docs/PostSendFailed.md | 14 + docs/PostSendSmsTestFailed.md | 13 + docs/ProcessApi.md | 118 + docs/RemainingCreditModel.md | 11 + docs/RemainingCreditModelChild.md | 11 + docs/RemainingCreditModelReseller.md | 11 + docs/RemoveCredits.md | 11 + docs/RequestContactExport.md | 12 + docs/RequestContactImport.md | 14 + docs/RequestContactImportNewList.md | 11 + docs/RequestSmsRecipientExport.md | 23 + docs/ResellerApi.md | 496 +++ docs/SendEmail.md | 17 + docs/SendEmailAttachment.md | 11 + docs/SendReport.md | 23 + docs/SendReportEmail.md | 23 + docs/SendSms.md | 11 + docs/SendSmtpEmail.md | 21 + docs/SendSmtpEmailAttachment.md | 12 + docs/SendSmtpEmailBcc.md | 11 + docs/SendSmtpEmailCc.md | 11 + docs/SendSmtpEmailReplyTo.md | 11 + docs/SendSmtpEmailSender.md | 11 + docs/SendSmtpEmailTo.md | 11 + docs/SendTemplateEmail.md | 10 + docs/SendTestEmail.md | 10 + docs/SendTestSms.md | 10 + docs/SendTransacSms.md | 23 + docs/SendersApi.md | 330 ++ docs/SmsCampaignsApi.md | 562 +++ docs/SmtpApi.md | 698 ++++ docs/TransactionalSmsApi.md | 250 ++ docs/UpdateAttribute.md | 11 + docs/UpdateAttributeEnumeration.md | 11 + docs/UpdateCampaignStatus.md | 24 + docs/UpdateChild.md | 14 + docs/UpdateContact.md | 15 + docs/UpdateEmailCampaign.md | 26 + docs/UpdateEmailCampaignRecipients.md | 11 + docs/UpdateEmailCampaignSender.md | 11 + docs/UpdateList.md | 11 + docs/UpdateSender.md | 12 + docs/UpdateSmsCampaign.md | 14 + docs/UpdateSmtpTemplate.md | 19 + docs/UpdateSmtpTemplateSender.md | 11 + docs/UpdateWebhook.md | 31 + docs/WebhooksApi.md | 278 ++ git_push.sh | 52 + gradle.properties | 2 + gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 53639 bytes gradle/wrapper/gradle-wrapper.properties | 6 + gradlew | 160 + gradlew.bat | 90 + pom.xml | 258 ++ settings.gradle | 1 + src/main/AndroidManifest.xml | 3 + src/main/java/sendinblue/ApiCallback.java | 62 + src/main/java/sendinblue/ApiClient.java | 1206 ++++++ src/main/java/sendinblue/ApiException.java | 91 + src/main/java/sendinblue/ApiResponse.java | 59 + src/main/java/sendinblue/Configuration.java | 39 + .../sendinblue/GzipRequestInterceptor.java | 81 + src/main/java/sendinblue/JSON.java | 362 ++ src/main/java/sendinblue/Pair.java | 52 + .../java/sendinblue/ProgressRequestBody.java | 77 + .../java/sendinblue/ProgressResponseBody.java | 76 + src/main/java/sendinblue/StringUtil.java | 55 + src/main/java/sendinblue/auth/ApiKeyAuth.java | 75 + .../java/sendinblue/auth/Authentication.java | 29 + .../java/sendinblue/auth/HttpBasicAuth.java | 54 + src/main/java/sendinblue/auth/OAuth.java | 39 + src/main/java/sendinblue/auth/OAuthFlow.java | 18 + src/main/java/sibApi/AccountApi.java | 170 + src/main/java/sibApi/AttributesApi.java | 578 +++ src/main/java/sibApi/ContactsApi.java | 3253 +++++++++++++++++ src/main/java/sibApi/EmailCampaignsApi.java | 1327 +++++++ src/main/java/sibApi/FoldersApi.java | 824 +++++ src/main/java/sibApi/ListsApi.java | 1224 +++++++ src/main/java/sibApi/ProcessApi.java | 307 ++ src/main/java/sibApi/ResellerApi.java | 1186 ++++++ src/main/java/sibApi/SendersApi.java | 783 ++++ src/main/java/sibApi/SmsCampaignsApi.java | 1330 +++++++ src/main/java/sibApi/SmtpApi.java | 1650 +++++++++ src/main/java/sibApi/TransactionalSmsApi.java | 620 ++++ src/main/java/sibApi/WebhooksApi.java | 673 ++++ src/main/java/sibModel/AddCredits.java | 116 + .../java/sibModel/AddRemoveContactToList.java | 103 + src/main/java/sibModel/CreateAttribute.java | 203 + .../sibModel/CreateAttributeEnumeration.java | 116 + src/main/java/sibModel/CreateChild.java | 185 + src/main/java/sibModel/CreateContact.java | 249 ++ .../java/sibModel/CreateEmailCampaign.java | 534 +++ .../CreateEmailCampaignRecipients.java | 134 + .../sibModel/CreateEmailCampaignSender.java | 116 + src/main/java/sibModel/CreateList.java | 116 + src/main/java/sibModel/CreateModel.java | 93 + src/main/java/sibModel/CreateReseller.java | 93 + src/main/java/sibModel/CreateSender.java | 150 + src/main/java/sibModel/CreateSenderIps.java | 141 + src/main/java/sibModel/CreateSenderModel.java | 139 + src/main/java/sibModel/CreateSmsCampaign.java | 187 + .../sibModel/CreateSmsCampaignRecipients.java | 128 + src/main/java/sibModel/CreateSmtpEmail.java | 93 + .../java/sibModel/CreateSmtpTemplate.java | 301 ++ .../sibModel/CreateSmtpTemplateSender.java | 116 + .../java/sibModel/CreateUpdateFolder.java | 93 + src/main/java/sibModel/CreateWebhook.java | 288 ++ src/main/java/sibModel/CreatedProcessId.java | 93 + src/main/java/sibModel/DeleteHardbounces.java | 140 + .../java/sibModel/EmailExportRecipients.java | 175 + src/main/java/sibModel/ErrorModel.java | 189 + src/main/java/sibModel/GetAccount.java | 266 ++ .../GetAccountMarketingAutomation.java | 116 + src/main/java/sibModel/GetAccountPlan.java | 288 ++ src/main/java/sibModel/GetAccountRelay.java | 118 + .../java/sibModel/GetAccountRelayData.java | 140 + .../java/sibModel/GetAggregatedReport.java | 346 ++ src/main/java/sibModel/GetAttributes.java | 101 + .../sibModel/GetAttributesAttributes.java | 300 ++ .../sibModel/GetAttributesEnumeration.java | 116 + .../java/sibModel/GetCampaignOverview.java | 311 ++ .../java/sibModel/GetCampaignRecipients.java | 128 + src/main/java/sibModel/GetCampaignStats.java | 346 ++ src/main/java/sibModel/GetChildInfo.java | 291 ++ .../java/sibModel/GetChildInfoApiKeys.java | 134 + .../java/sibModel/GetChildInfoApiKeysV2.java | 116 + .../java/sibModel/GetChildInfoApiKeysV3.java | 116 + .../java/sibModel/GetChildInfoCredits.java | 117 + .../java/sibModel/GetChildInfoStatistics.java | 140 + src/main/java/sibModel/GetChildrenList.java | 103 + src/main/java/sibModel/GetClient.java | 162 + .../sibModel/GetContactCampaignStats.java | 318 ++ .../GetContactCampaignStatsClicked.java | 124 + .../GetContactCampaignStatsOpened.java | 163 + ...ContactCampaignStatsTransacAttributes.java | 140 + ...etContactCampaignStatsUnsubscriptions.java | 130 + src/main/java/sibModel/GetContactDetails.java | 277 ++ src/main/java/sibModel/GetContacts.java | 123 + src/main/java/sibModel/GetEmailCampaign.java | 635 ++++ src/main/java/sibModel/GetEmailCampaigns.java | 126 + .../java/sibModel/GetEmailEventReport.java | 104 + .../sibModel/GetEmailEventReportEvents.java | 366 ++ .../sibModel/GetExtendedCampaignOverview.java | 635 ++++ .../GetExtendedCampaignOverviewSender.java | 116 + .../sibModel/GetExtendedCampaignStats.java | 201 + .../GetExtendedCampaignStatsLinksStats.java | 94 + src/main/java/sibModel/GetExtendedClient.java | 187 + .../sibModel/GetExtendedClientAddress.java | 163 + .../sibModel/GetExtendedContactDetails.java | 302 ++ .../GetExtendedContactDetailsStatistics.java | 317 ++ ...tendedContactDetailsStatisticsClicked.java | 124 + ...ExtendedContactDetailsStatisticsLinks.java | 163 + ...dContactDetailsStatisticsMessagesSent.java | 117 + ...xtendedContactDetailsStatisticsOpened.java | 163 + ...ntactDetailsStatisticsUnsubscriptions.java | 131 + ...icsUnsubscriptionsAdminUnsubscription.java | 117 + ...ticsUnsubscriptionsUserUnsubscription.java | 140 + src/main/java/sibModel/GetExtendedList.java | 267 ++ .../GetExtendedListCampaignStats.java | 117 + src/main/java/sibModel/GetFolder.java | 185 + src/main/java/sibModel/GetFolderLists.java | 123 + src/main/java/sibModel/GetFolders.java | 126 + src/main/java/sibModel/GetIp.java | 162 + src/main/java/sibModel/GetIpFromSender.java | 162 + src/main/java/sibModel/GetIps.java | 101 + src/main/java/sibModel/GetIpsFromSender.java | 101 + src/main/java/sibModel/GetList.java | 162 + src/main/java/sibModel/GetLists.java | 123 + src/main/java/sibModel/GetProcess.java | 211 ++ src/main/java/sibModel/GetProcesses.java | 127 + src/main/java/sibModel/GetReports.java | 104 + src/main/java/sibModel/GetReportsReports.java | 347 ++ src/main/java/sibModel/GetSendersList.java | 104 + src/main/java/sibModel/GetSendersListIps.java | 139 + .../java/sibModel/GetSendersListSenders.java | 196 + src/main/java/sibModel/GetSmsCampaign.java | 334 ++ .../java/sibModel/GetSmsCampaignOverview.java | 333 ++ .../java/sibModel/GetSmsCampaignStats.java | 231 ++ src/main/java/sibModel/GetSmsCampaigns.java | 126 + src/main/java/sibModel/GetSmsEventReport.java | 104 + .../sibModel/GetSmsEventReportEvents.java | 293 ++ .../sibModel/GetSmtpTemplateOverview.java | 348 ++ .../GetSmtpTemplateOverviewSender.java | 116 + src/main/java/sibModel/GetSmtpTemplates.java | 127 + src/main/java/sibModel/GetStatsByDomain.java | 65 + .../GetTransacAggregatedSmsReport.java | 300 ++ .../java/sibModel/GetTransacSmsReport.java | 104 + .../sibModel/GetTransacSmsReportReports.java | 301 ++ src/main/java/sibModel/GetWebhook.java | 286 ++ src/main/java/sibModel/GetWebhooks.java | 100 + src/main/java/sibModel/ManageIp.java | 93 + src/main/java/sibModel/PostContactInfo.java | 94 + .../sibModel/PostContactInfoContacts.java | 131 + src/main/java/sibModel/PostSendFailed.java | 211 ++ .../java/sibModel/PostSendSmsTestFailed.java | 180 + .../java/sibModel/RemainingCreditModel.java | 118 + .../sibModel/RemainingCreditModelChild.java | 117 + .../RemainingCreditModelReseller.java | 116 + src/main/java/sibModel/RemoveCredits.java | 116 + .../java/sibModel/RequestContactExport.java | 149 + .../java/sibModel/RequestContactImport.java | 196 + .../sibModel/RequestContactImportNewList.java | 116 + .../sibModel/RequestSmsRecipientExport.java | 171 + src/main/java/sibModel/SendEmail.java | 304 ++ .../java/sibModel/SendEmailAttachment.java | 116 + src/main/java/sibModel/SendReport.java | 172 + src/main/java/sibModel/SendReportEmail.java | 281 ++ src/main/java/sibModel/SendSms.java | 116 + src/main/java/sibModel/SendSmtpEmail.java | 401 ++ .../sibModel/SendSmtpEmailAttachment.java | 139 + src/main/java/sibModel/SendSmtpEmailBcc.java | 116 + src/main/java/sibModel/SendSmtpEmailCc.java | 116 + .../java/sibModel/SendSmtpEmailReplyTo.java | 117 + .../java/sibModel/SendSmtpEmailSender.java | 116 + src/main/java/sibModel/SendSmtpEmailTo.java | 116 + src/main/java/sibModel/SendTemplateEmail.java | 93 + src/main/java/sibModel/SendTestEmail.java | 103 + src/main/java/sibModel/SendTestSms.java | 103 + src/main/java/sibModel/SendTransacSms.java | 255 ++ src/main/java/sibModel/UpdateAttribute.java | 127 + .../sibModel/UpdateAttributeEnumeration.java | 116 + .../java/sibModel/UpdateCampaignStatus.java | 153 + src/main/java/sibModel/UpdateChild.java | 185 + src/main/java/sibModel/UpdateContact.java | 244 ++ .../java/sibModel/UpdateEmailCampaign.java | 464 +++ .../UpdateEmailCampaignRecipients.java | 134 + .../sibModel/UpdateEmailCampaignSender.java | 116 + src/main/java/sibModel/UpdateList.java | 116 + src/main/java/sibModel/UpdateSender.java | 150 + src/main/java/sibModel/UpdateSmsCampaign.java | 187 + .../java/sibModel/UpdateSmtpTemplate.java | 301 ++ .../sibModel/UpdateSmtpTemplateSender.java | 116 + src/main/java/sibModel/UpdateWebhook.java | 218 ++ src/test/java/sibApi/AccountApiTest.java | 50 + src/test/java/sibApi/AttributesApiTest.java | 106 + src/test/java/sibApi/ContactsApiTest.java | 476 +++ .../java/sibApi/EmailCampaignsApiTest.java | 214 ++ src/test/java/sibApi/FoldersApiTest.java | 140 + src/test/java/sibApi/ListsApiTest.java | 198 + src/test/java/sibApi/ProcessApiTest.java | 70 + src/test/java/sibApi/ResellerApiTest.java | 192 + src/test/java/sibApi/SendersApiTest.java | 138 + src/test/java/sibApi/SmsCampaignsApiTest.java | 214 ++ src/test/java/sibApi/SmtpApiTest.java | 265 ++ .../java/sibApi/TransactionalSmsApiTest.java | 118 + src/test/java/sibApi/WebhooksApiTest.java | 121 + 368 files changed, 54461 insertions(+), 2 deletions(-) create mode 100644 .gitignore create mode 100644 .swagger-codegen-ignore create mode 100644 .swagger-codegen/VERSION create mode 100644 .travis.yml create mode 100644 LICENSE.md create mode 100644 build.gradle create mode 100644 build.sbt create mode 100644 docs/AccountApi.md create mode 100644 docs/AddCredits.md create mode 100644 docs/AddRemoveContactToList.md create mode 100644 docs/AttributesApi.md create mode 100644 docs/ContactsApi.md create mode 100644 docs/CreateAttribute.md create mode 100644 docs/CreateAttributeEnumeration.md create mode 100644 docs/CreateChild.md create mode 100644 docs/CreateContact.md create mode 100644 docs/CreateEmailCampaign.md create mode 100644 docs/CreateEmailCampaignRecipients.md create mode 100644 docs/CreateEmailCampaignSender.md create mode 100644 docs/CreateList.md create mode 100644 docs/CreateModel.md create mode 100644 docs/CreateReseller.md create mode 100644 docs/CreateSender.md create mode 100644 docs/CreateSenderIps.md create mode 100644 docs/CreateSenderModel.md create mode 100644 docs/CreateSmsCampaign.md create mode 100644 docs/CreateSmsCampaignRecipients.md create mode 100644 docs/CreateSmtpEmail.md create mode 100644 docs/CreateSmtpTemplate.md create mode 100644 docs/CreateSmtpTemplateSender.md create mode 100644 docs/CreateUpdateFolder.md create mode 100644 docs/CreateWebhook.md create mode 100644 docs/CreatedProcessId.md create mode 100644 docs/DeleteHardbounces.md create mode 100644 docs/EmailCampaignsApi.md create mode 100644 docs/EmailExportRecipients.md create mode 100644 docs/ErrorModel.md create mode 100644 docs/FoldersApi.md create mode 100644 docs/GetAccount.md create mode 100644 docs/GetAccountMarketingAutomation.md create mode 100644 docs/GetAccountPlan.md create mode 100644 docs/GetAccountRelay.md create mode 100644 docs/GetAccountRelayData.md create mode 100644 docs/GetAggregatedReport.md create mode 100644 docs/GetAttributes.md create mode 100644 docs/GetAttributesAttributes.md create mode 100644 docs/GetAttributesEnumeration.md create mode 100644 docs/GetCampaignOverview.md create mode 100644 docs/GetCampaignRecipients.md create mode 100644 docs/GetCampaignStats.md create mode 100644 docs/GetChildInfo.md create mode 100644 docs/GetChildInfoApiKeys.md create mode 100644 docs/GetChildInfoApiKeysV2.md create mode 100644 docs/GetChildInfoApiKeysV3.md create mode 100644 docs/GetChildInfoCredits.md create mode 100644 docs/GetChildInfoStatistics.md create mode 100644 docs/GetChildrenList.md create mode 100644 docs/GetClient.md create mode 100644 docs/GetContactCampaignStats.md create mode 100644 docs/GetContactCampaignStatsClicked.md create mode 100644 docs/GetContactCampaignStatsOpened.md create mode 100644 docs/GetContactCampaignStatsTransacAttributes.md create mode 100644 docs/GetContactCampaignStatsUnsubscriptions.md create mode 100644 docs/GetContactDetails.md create mode 100644 docs/GetContacts.md create mode 100644 docs/GetEmailCampaign.md create mode 100644 docs/GetEmailCampaigns.md create mode 100644 docs/GetEmailEventReport.md create mode 100644 docs/GetEmailEventReportEvents.md create mode 100644 docs/GetExtendedCampaignOverview.md create mode 100644 docs/GetExtendedCampaignOverviewSender.md create mode 100644 docs/GetExtendedCampaignStats.md create mode 100644 docs/GetExtendedCampaignStatsLinksStats.md create mode 100644 docs/GetExtendedClient.md create mode 100644 docs/GetExtendedClientAddress.md create mode 100644 docs/GetExtendedContactDetails.md create mode 100644 docs/GetExtendedContactDetailsStatistics.md create mode 100644 docs/GetExtendedContactDetailsStatisticsClicked.md create mode 100644 docs/GetExtendedContactDetailsStatisticsLinks.md create mode 100644 docs/GetExtendedContactDetailsStatisticsMessagesSent.md create mode 100644 docs/GetExtendedContactDetailsStatisticsOpened.md create mode 100644 docs/GetExtendedContactDetailsStatisticsUnsubscriptions.md create mode 100644 docs/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.md create mode 100644 docs/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.md create mode 100644 docs/GetExtendedList.md create mode 100644 docs/GetExtendedListCampaignStats.md create mode 100644 docs/GetFolder.md create mode 100644 docs/GetFolderLists.md create mode 100644 docs/GetFolders.md create mode 100644 docs/GetIp.md create mode 100644 docs/GetIpFromSender.md create mode 100644 docs/GetIps.md create mode 100644 docs/GetIpsFromSender.md create mode 100644 docs/GetList.md create mode 100644 docs/GetLists.md create mode 100644 docs/GetProcess.md create mode 100644 docs/GetProcesses.md create mode 100644 docs/GetReports.md create mode 100644 docs/GetReportsReports.md create mode 100644 docs/GetSendersList.md create mode 100644 docs/GetSendersListIps.md create mode 100644 docs/GetSendersListSenders.md create mode 100644 docs/GetSmsCampaign.md create mode 100644 docs/GetSmsCampaignOverview.md create mode 100644 docs/GetSmsCampaignStats.md create mode 100644 docs/GetSmsCampaigns.md create mode 100644 docs/GetSmsEventReport.md create mode 100644 docs/GetSmsEventReportEvents.md create mode 100644 docs/GetSmtpTemplateOverview.md create mode 100644 docs/GetSmtpTemplateOverviewSender.md create mode 100644 docs/GetSmtpTemplates.md create mode 100644 docs/GetStatsByDomain.md create mode 100644 docs/GetTransacAggregatedSmsReport.md create mode 100644 docs/GetTransacSmsReport.md create mode 100644 docs/GetTransacSmsReportReports.md create mode 100644 docs/GetWebhook.md create mode 100644 docs/GetWebhooks.md create mode 100644 docs/ListsApi.md create mode 100644 docs/ManageIp.md create mode 100644 docs/PostContactInfo.md create mode 100644 docs/PostContactInfoContacts.md create mode 100644 docs/PostSendFailed.md create mode 100644 docs/PostSendSmsTestFailed.md create mode 100644 docs/ProcessApi.md create mode 100644 docs/RemainingCreditModel.md create mode 100644 docs/RemainingCreditModelChild.md create mode 100644 docs/RemainingCreditModelReseller.md create mode 100644 docs/RemoveCredits.md create mode 100644 docs/RequestContactExport.md create mode 100644 docs/RequestContactImport.md create mode 100644 docs/RequestContactImportNewList.md create mode 100644 docs/RequestSmsRecipientExport.md create mode 100644 docs/ResellerApi.md create mode 100644 docs/SendEmail.md create mode 100644 docs/SendEmailAttachment.md create mode 100644 docs/SendReport.md create mode 100644 docs/SendReportEmail.md create mode 100644 docs/SendSms.md create mode 100644 docs/SendSmtpEmail.md create mode 100644 docs/SendSmtpEmailAttachment.md create mode 100644 docs/SendSmtpEmailBcc.md create mode 100644 docs/SendSmtpEmailCc.md create mode 100644 docs/SendSmtpEmailReplyTo.md create mode 100644 docs/SendSmtpEmailSender.md create mode 100644 docs/SendSmtpEmailTo.md create mode 100644 docs/SendTemplateEmail.md create mode 100644 docs/SendTestEmail.md create mode 100644 docs/SendTestSms.md create mode 100644 docs/SendTransacSms.md create mode 100644 docs/SendersApi.md create mode 100644 docs/SmsCampaignsApi.md create mode 100644 docs/SmtpApi.md create mode 100644 docs/TransactionalSmsApi.md create mode 100644 docs/UpdateAttribute.md create mode 100644 docs/UpdateAttributeEnumeration.md create mode 100644 docs/UpdateCampaignStatus.md create mode 100644 docs/UpdateChild.md create mode 100644 docs/UpdateContact.md create mode 100644 docs/UpdateEmailCampaign.md create mode 100644 docs/UpdateEmailCampaignRecipients.md create mode 100644 docs/UpdateEmailCampaignSender.md create mode 100644 docs/UpdateList.md create mode 100644 docs/UpdateSender.md create mode 100644 docs/UpdateSmsCampaign.md create mode 100644 docs/UpdateSmtpTemplate.md create mode 100644 docs/UpdateSmtpTemplateSender.md create mode 100644 docs/UpdateWebhook.md create mode 100644 docs/WebhooksApi.md create mode 100644 git_push.sh create mode 100644 gradle.properties create mode 100644 gradle/wrapper/gradle-wrapper.jar create mode 100644 gradle/wrapper/gradle-wrapper.properties create mode 100644 gradlew create mode 100644 gradlew.bat create mode 100644 pom.xml create mode 100644 settings.gradle create mode 100644 src/main/AndroidManifest.xml create mode 100644 src/main/java/sendinblue/ApiCallback.java create mode 100644 src/main/java/sendinblue/ApiClient.java create mode 100644 src/main/java/sendinblue/ApiException.java create mode 100644 src/main/java/sendinblue/ApiResponse.java create mode 100644 src/main/java/sendinblue/Configuration.java create mode 100644 src/main/java/sendinblue/GzipRequestInterceptor.java create mode 100644 src/main/java/sendinblue/JSON.java create mode 100644 src/main/java/sendinblue/Pair.java create mode 100644 src/main/java/sendinblue/ProgressRequestBody.java create mode 100644 src/main/java/sendinblue/ProgressResponseBody.java create mode 100644 src/main/java/sendinblue/StringUtil.java create mode 100644 src/main/java/sendinblue/auth/ApiKeyAuth.java create mode 100644 src/main/java/sendinblue/auth/Authentication.java create mode 100644 src/main/java/sendinblue/auth/HttpBasicAuth.java create mode 100644 src/main/java/sendinblue/auth/OAuth.java create mode 100644 src/main/java/sendinblue/auth/OAuthFlow.java create mode 100644 src/main/java/sibApi/AccountApi.java create mode 100644 src/main/java/sibApi/AttributesApi.java create mode 100644 src/main/java/sibApi/ContactsApi.java create mode 100644 src/main/java/sibApi/EmailCampaignsApi.java create mode 100644 src/main/java/sibApi/FoldersApi.java create mode 100644 src/main/java/sibApi/ListsApi.java create mode 100644 src/main/java/sibApi/ProcessApi.java create mode 100644 src/main/java/sibApi/ResellerApi.java create mode 100644 src/main/java/sibApi/SendersApi.java create mode 100644 src/main/java/sibApi/SmsCampaignsApi.java create mode 100644 src/main/java/sibApi/SmtpApi.java create mode 100644 src/main/java/sibApi/TransactionalSmsApi.java create mode 100644 src/main/java/sibApi/WebhooksApi.java create mode 100644 src/main/java/sibModel/AddCredits.java create mode 100644 src/main/java/sibModel/AddRemoveContactToList.java create mode 100644 src/main/java/sibModel/CreateAttribute.java create mode 100644 src/main/java/sibModel/CreateAttributeEnumeration.java create mode 100644 src/main/java/sibModel/CreateChild.java create mode 100644 src/main/java/sibModel/CreateContact.java create mode 100644 src/main/java/sibModel/CreateEmailCampaign.java create mode 100644 src/main/java/sibModel/CreateEmailCampaignRecipients.java create mode 100644 src/main/java/sibModel/CreateEmailCampaignSender.java create mode 100644 src/main/java/sibModel/CreateList.java create mode 100644 src/main/java/sibModel/CreateModel.java create mode 100644 src/main/java/sibModel/CreateReseller.java create mode 100644 src/main/java/sibModel/CreateSender.java create mode 100644 src/main/java/sibModel/CreateSenderIps.java create mode 100644 src/main/java/sibModel/CreateSenderModel.java create mode 100644 src/main/java/sibModel/CreateSmsCampaign.java create mode 100644 src/main/java/sibModel/CreateSmsCampaignRecipients.java create mode 100644 src/main/java/sibModel/CreateSmtpEmail.java create mode 100644 src/main/java/sibModel/CreateSmtpTemplate.java create mode 100644 src/main/java/sibModel/CreateSmtpTemplateSender.java create mode 100644 src/main/java/sibModel/CreateUpdateFolder.java create mode 100644 src/main/java/sibModel/CreateWebhook.java create mode 100644 src/main/java/sibModel/CreatedProcessId.java create mode 100644 src/main/java/sibModel/DeleteHardbounces.java create mode 100644 src/main/java/sibModel/EmailExportRecipients.java create mode 100644 src/main/java/sibModel/ErrorModel.java create mode 100644 src/main/java/sibModel/GetAccount.java create mode 100644 src/main/java/sibModel/GetAccountMarketingAutomation.java create mode 100644 src/main/java/sibModel/GetAccountPlan.java create mode 100644 src/main/java/sibModel/GetAccountRelay.java create mode 100644 src/main/java/sibModel/GetAccountRelayData.java create mode 100644 src/main/java/sibModel/GetAggregatedReport.java create mode 100644 src/main/java/sibModel/GetAttributes.java create mode 100644 src/main/java/sibModel/GetAttributesAttributes.java create mode 100644 src/main/java/sibModel/GetAttributesEnumeration.java create mode 100644 src/main/java/sibModel/GetCampaignOverview.java create mode 100644 src/main/java/sibModel/GetCampaignRecipients.java create mode 100644 src/main/java/sibModel/GetCampaignStats.java create mode 100644 src/main/java/sibModel/GetChildInfo.java create mode 100644 src/main/java/sibModel/GetChildInfoApiKeys.java create mode 100644 src/main/java/sibModel/GetChildInfoApiKeysV2.java create mode 100644 src/main/java/sibModel/GetChildInfoApiKeysV3.java create mode 100644 src/main/java/sibModel/GetChildInfoCredits.java create mode 100644 src/main/java/sibModel/GetChildInfoStatistics.java create mode 100644 src/main/java/sibModel/GetChildrenList.java create mode 100644 src/main/java/sibModel/GetClient.java create mode 100644 src/main/java/sibModel/GetContactCampaignStats.java create mode 100644 src/main/java/sibModel/GetContactCampaignStatsClicked.java create mode 100644 src/main/java/sibModel/GetContactCampaignStatsOpened.java create mode 100644 src/main/java/sibModel/GetContactCampaignStatsTransacAttributes.java create mode 100644 src/main/java/sibModel/GetContactCampaignStatsUnsubscriptions.java create mode 100644 src/main/java/sibModel/GetContactDetails.java create mode 100644 src/main/java/sibModel/GetContacts.java create mode 100644 src/main/java/sibModel/GetEmailCampaign.java create mode 100644 src/main/java/sibModel/GetEmailCampaigns.java create mode 100644 src/main/java/sibModel/GetEmailEventReport.java create mode 100644 src/main/java/sibModel/GetEmailEventReportEvents.java create mode 100644 src/main/java/sibModel/GetExtendedCampaignOverview.java create mode 100644 src/main/java/sibModel/GetExtendedCampaignOverviewSender.java create mode 100644 src/main/java/sibModel/GetExtendedCampaignStats.java create mode 100644 src/main/java/sibModel/GetExtendedCampaignStatsLinksStats.java create mode 100644 src/main/java/sibModel/GetExtendedClient.java create mode 100644 src/main/java/sibModel/GetExtendedClientAddress.java create mode 100644 src/main/java/sibModel/GetExtendedContactDetails.java create mode 100644 src/main/java/sibModel/GetExtendedContactDetailsStatistics.java create mode 100644 src/main/java/sibModel/GetExtendedContactDetailsStatisticsClicked.java create mode 100644 src/main/java/sibModel/GetExtendedContactDetailsStatisticsLinks.java create mode 100644 src/main/java/sibModel/GetExtendedContactDetailsStatisticsMessagesSent.java create mode 100644 src/main/java/sibModel/GetExtendedContactDetailsStatisticsOpened.java create mode 100644 src/main/java/sibModel/GetExtendedContactDetailsStatisticsUnsubscriptions.java create mode 100644 src/main/java/sibModel/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.java create mode 100644 src/main/java/sibModel/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.java create mode 100644 src/main/java/sibModel/GetExtendedList.java create mode 100644 src/main/java/sibModel/GetExtendedListCampaignStats.java create mode 100644 src/main/java/sibModel/GetFolder.java create mode 100644 src/main/java/sibModel/GetFolderLists.java create mode 100644 src/main/java/sibModel/GetFolders.java create mode 100644 src/main/java/sibModel/GetIp.java create mode 100644 src/main/java/sibModel/GetIpFromSender.java create mode 100644 src/main/java/sibModel/GetIps.java create mode 100644 src/main/java/sibModel/GetIpsFromSender.java create mode 100644 src/main/java/sibModel/GetList.java create mode 100644 src/main/java/sibModel/GetLists.java create mode 100644 src/main/java/sibModel/GetProcess.java create mode 100644 src/main/java/sibModel/GetProcesses.java create mode 100644 src/main/java/sibModel/GetReports.java create mode 100644 src/main/java/sibModel/GetReportsReports.java create mode 100644 src/main/java/sibModel/GetSendersList.java create mode 100644 src/main/java/sibModel/GetSendersListIps.java create mode 100644 src/main/java/sibModel/GetSendersListSenders.java create mode 100644 src/main/java/sibModel/GetSmsCampaign.java create mode 100644 src/main/java/sibModel/GetSmsCampaignOverview.java create mode 100644 src/main/java/sibModel/GetSmsCampaignStats.java create mode 100644 src/main/java/sibModel/GetSmsCampaigns.java create mode 100644 src/main/java/sibModel/GetSmsEventReport.java create mode 100644 src/main/java/sibModel/GetSmsEventReportEvents.java create mode 100644 src/main/java/sibModel/GetSmtpTemplateOverview.java create mode 100644 src/main/java/sibModel/GetSmtpTemplateOverviewSender.java create mode 100644 src/main/java/sibModel/GetSmtpTemplates.java create mode 100644 src/main/java/sibModel/GetStatsByDomain.java create mode 100644 src/main/java/sibModel/GetTransacAggregatedSmsReport.java create mode 100644 src/main/java/sibModel/GetTransacSmsReport.java create mode 100644 src/main/java/sibModel/GetTransacSmsReportReports.java create mode 100644 src/main/java/sibModel/GetWebhook.java create mode 100644 src/main/java/sibModel/GetWebhooks.java create mode 100644 src/main/java/sibModel/ManageIp.java create mode 100644 src/main/java/sibModel/PostContactInfo.java create mode 100644 src/main/java/sibModel/PostContactInfoContacts.java create mode 100644 src/main/java/sibModel/PostSendFailed.java create mode 100644 src/main/java/sibModel/PostSendSmsTestFailed.java create mode 100644 src/main/java/sibModel/RemainingCreditModel.java create mode 100644 src/main/java/sibModel/RemainingCreditModelChild.java create mode 100644 src/main/java/sibModel/RemainingCreditModelReseller.java create mode 100644 src/main/java/sibModel/RemoveCredits.java create mode 100644 src/main/java/sibModel/RequestContactExport.java create mode 100644 src/main/java/sibModel/RequestContactImport.java create mode 100644 src/main/java/sibModel/RequestContactImportNewList.java create mode 100644 src/main/java/sibModel/RequestSmsRecipientExport.java create mode 100644 src/main/java/sibModel/SendEmail.java create mode 100644 src/main/java/sibModel/SendEmailAttachment.java create mode 100644 src/main/java/sibModel/SendReport.java create mode 100644 src/main/java/sibModel/SendReportEmail.java create mode 100644 src/main/java/sibModel/SendSms.java create mode 100644 src/main/java/sibModel/SendSmtpEmail.java create mode 100644 src/main/java/sibModel/SendSmtpEmailAttachment.java create mode 100644 src/main/java/sibModel/SendSmtpEmailBcc.java create mode 100644 src/main/java/sibModel/SendSmtpEmailCc.java create mode 100644 src/main/java/sibModel/SendSmtpEmailReplyTo.java create mode 100644 src/main/java/sibModel/SendSmtpEmailSender.java create mode 100644 src/main/java/sibModel/SendSmtpEmailTo.java create mode 100644 src/main/java/sibModel/SendTemplateEmail.java create mode 100644 src/main/java/sibModel/SendTestEmail.java create mode 100644 src/main/java/sibModel/SendTestSms.java create mode 100644 src/main/java/sibModel/SendTransacSms.java create mode 100644 src/main/java/sibModel/UpdateAttribute.java create mode 100644 src/main/java/sibModel/UpdateAttributeEnumeration.java create mode 100644 src/main/java/sibModel/UpdateCampaignStatus.java create mode 100644 src/main/java/sibModel/UpdateChild.java create mode 100644 src/main/java/sibModel/UpdateContact.java create mode 100644 src/main/java/sibModel/UpdateEmailCampaign.java create mode 100644 src/main/java/sibModel/UpdateEmailCampaignRecipients.java create mode 100644 src/main/java/sibModel/UpdateEmailCampaignSender.java create mode 100644 src/main/java/sibModel/UpdateList.java create mode 100644 src/main/java/sibModel/UpdateSender.java create mode 100644 src/main/java/sibModel/UpdateSmsCampaign.java create mode 100644 src/main/java/sibModel/UpdateSmtpTemplate.java create mode 100644 src/main/java/sibModel/UpdateSmtpTemplateSender.java create mode 100644 src/main/java/sibModel/UpdateWebhook.java create mode 100644 src/test/java/sibApi/AccountApiTest.java create mode 100644 src/test/java/sibApi/AttributesApiTest.java create mode 100644 src/test/java/sibApi/ContactsApiTest.java create mode 100644 src/test/java/sibApi/EmailCampaignsApiTest.java create mode 100644 src/test/java/sibApi/FoldersApiTest.java create mode 100644 src/test/java/sibApi/ListsApiTest.java create mode 100644 src/test/java/sibApi/ProcessApiTest.java create mode 100644 src/test/java/sibApi/ResellerApiTest.java create mode 100644 src/test/java/sibApi/SendersApiTest.java create mode 100644 src/test/java/sibApi/SmsCampaignsApiTest.java create mode 100644 src/test/java/sibApi/SmtpApiTest.java create mode 100644 src/test/java/sibApi/TransactionalSmsApiTest.java create mode 100644 src/test/java/sibApi/WebhooksApiTest.java diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a530464 --- /dev/null +++ b/.gitignore @@ -0,0 +1,21 @@ +*.class + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.ear + +# exclude jar for gradle wrapper +!gradle/wrapper/*.jar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +# build files +**/target +target +.gradle +build diff --git a/.swagger-codegen-ignore b/.swagger-codegen-ignore new file mode 100644 index 0000000..c5fa491 --- /dev/null +++ b/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/.swagger-codegen/VERSION b/.swagger-codegen/VERSION new file mode 100644 index 0000000..a625450 --- /dev/null +++ b/.swagger-codegen/VERSION @@ -0,0 +1 @@ +2.3.1 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..70cb81a --- /dev/null +++ b/.travis.yml @@ -0,0 +1,17 @@ +# +# Generated by: https://github.com/swagger-api/swagger-codegen.git +# +language: java +jdk: + - oraclejdk8 + - oraclejdk7 +before_install: + # ensure gradlew has proper permission + - chmod a+x ./gradlew +script: + # test using maven + - mvn test + # uncomment below to test using gradle + # - gradle test + # uncomment below to test using sbt + # - sbt test diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..601973b --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) 2018 SendinBlue + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index 51a16a7..6834715 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,372 @@ -# APIv3-java-library -SendinBlue's API v3 Java Library +# SendinBlue's API v3 Java Library + +SendinBlue's API exposes the entire SendinBlue features via a standardized programmatic interface. Please refer to the full [documentation](https://developers.sendinblue.com) to learn more. + +This is the wrapper for the API. It implements all the features of the API v3. + +SendinBlue's API matches the [OpenAPI v2 definition](https://www.openapis.org/). The specification can be downloaded [here](https://api.sendinblue.com/v3/swagger_definition.yml). + +## Installation + +To install the API client library to your local Maven repository, simply execute: + +```shell +mvn install +``` + +### Maven users + +Add this dependency to your project's POM: + +```xml + + com.sendinblue + sib-api-v3-sdk + 1.0.0 + compile + +``` + +### Gradle users + +Add this dependency to your project's build file: + +```groovy +compile "com.sendinblue:sib-api-v3-sdk:1.0.0" +``` + +### Others + +At first generate the JAR by executing: + +```shell + mvn package +``` + +Then manually install the following JARs: + +* target/sib-api-v3-sdk-1.0.0.jar +* target/lib/*.jar + +## Getting Started + +Please follow the [installation](#installation) instruction and execute the following Java code: + +```java + +import sendinblue.*; +import sendinblue.auth.*; +import sibModel.*; +import sibApi.AccountApi; + +import java.io.File; +import java.util.*; + +public class AccountApiExample { + + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + + // Configure API key authorization: api-key + ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); + apiKey.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //apiKey.setApiKeyPrefix("Token"); + + AccountApi apiInstance = new AccountApi(); + try { + GetAccount result = apiInstance.getAccount(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AccountApi#getAccount"); + e.printStackTrace(); + } + } +} + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendinblue.com/v3* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AccountApi* | [**getAccount**](docs/AccountApi.md#getAccount) | **GET** /account | Get your account informations, plans and credits details +*AttributesApi* | [**createAttribute**](docs/AttributesApi.md#createAttribute) | **POST** /contacts/attributes/{attributeCategory}/{attributeName} | Creates contact attribute +*AttributesApi* | [**deleteAttribute**](docs/AttributesApi.md#deleteAttribute) | **DELETE** /contacts/attributes/{attributeCategory}/{attributeName} | Deletes an attribute +*AttributesApi* | [**getAttributes**](docs/AttributesApi.md#getAttributes) | **GET** /contacts/attributes | Lists all attributes +*AttributesApi* | [**updateAttribute**](docs/AttributesApi.md#updateAttribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Updates contact attribute +*ContactsApi* | [**addContactToList**](docs/ContactsApi.md#addContactToList) | **POST** /contacts/lists/{listId}/contacts/add | Add existing contacts to a list +*ContactsApi* | [**createAttribute**](docs/ContactsApi.md#createAttribute) | **POST** /contacts/attributes/{attributeCategory}/{attributeName} | Creates contact attribute +*ContactsApi* | [**createContact**](docs/ContactsApi.md#createContact) | **POST** /contacts | Create a contact +*ContactsApi* | [**createFolder**](docs/ContactsApi.md#createFolder) | **POST** /contacts/folders | Create a folder +*ContactsApi* | [**createList**](docs/ContactsApi.md#createList) | **POST** /contacts/lists | Create a list +*ContactsApi* | [**deleteAttribute**](docs/ContactsApi.md#deleteAttribute) | **DELETE** /contacts/attributes/{attributeCategory}/{attributeName} | Deletes an attribute +*ContactsApi* | [**deleteFolder**](docs/ContactsApi.md#deleteFolder) | **DELETE** /contacts/folders/{folderId} | Delete a folder (and all its lists) +*ContactsApi* | [**deleteList**](docs/ContactsApi.md#deleteList) | **DELETE** /contacts/lists/{listId} | Delete a list +*ContactsApi* | [**getAttributes**](docs/ContactsApi.md#getAttributes) | **GET** /contacts/attributes | Lists all attributes +*ContactsApi* | [**getContactInfo**](docs/ContactsApi.md#getContactInfo) | **GET** /contacts/{email} | Retrieves contact informations +*ContactsApi* | [**getContactStats**](docs/ContactsApi.md#getContactStats) | **GET** /contacts/{email}/campaignStats | Get the campaigns statistics for a contact +*ContactsApi* | [**getContacts**](docs/ContactsApi.md#getContacts) | **GET** /contacts | Get all the contacts +*ContactsApi* | [**getContactsFromList**](docs/ContactsApi.md#getContactsFromList) | **GET** /contacts/lists/{listId}/contacts | Get the contacts in a list +*ContactsApi* | [**getFolder**](docs/ContactsApi.md#getFolder) | **GET** /contacts/folders/{folderId} | Returns folder details +*ContactsApi* | [**getFolderLists**](docs/ContactsApi.md#getFolderLists) | **GET** /contacts/folders/{folderId}/lists | Get the lists in a folder +*ContactsApi* | [**getFolders**](docs/ContactsApi.md#getFolders) | **GET** /contacts/folders | Get all the folders +*ContactsApi* | [**getList**](docs/ContactsApi.md#getList) | **GET** /contacts/lists/{listId} | Get the details of a list +*ContactsApi* | [**getLists**](docs/ContactsApi.md#getLists) | **GET** /contacts/lists | Get all the lists +*ContactsApi* | [**importContacts**](docs/ContactsApi.md#importContacts) | **POST** /contacts/import | Import contacts +*ContactsApi* | [**removeContactToList**](docs/ContactsApi.md#removeContactToList) | **POST** /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list +*ContactsApi* | [**requestContactExport**](docs/ContactsApi.md#requestContactExport) | **POST** /contacts/export | Export contacts +*ContactsApi* | [**updateAttribute**](docs/ContactsApi.md#updateAttribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Updates contact attribute +*ContactsApi* | [**updateContact**](docs/ContactsApi.md#updateContact) | **PUT** /contacts/{email} | Updates a contact +*ContactsApi* | [**updateFolder**](docs/ContactsApi.md#updateFolder) | **PUT** /contacts/folders/{folderId} | Update a contact folder +*ContactsApi* | [**updateList**](docs/ContactsApi.md#updateList) | **PUT** /contacts/lists/{listId} | Update a list +*EmailCampaignsApi* | [**createEmailCampaign**](docs/EmailCampaignsApi.md#createEmailCampaign) | **POST** /emailCampaigns | Create an email campaign +*EmailCampaignsApi* | [**deleteEmailCampaign**](docs/EmailCampaignsApi.md#deleteEmailCampaign) | **DELETE** /emailCampaigns/{campaignId} | Delete an email campaign +*EmailCampaignsApi* | [**emailExportRecipients**](docs/EmailCampaignsApi.md#emailExportRecipients) | **POST** /emailCampaigns/{campaignId}/exportRecipients | Export the recipients of a campaign +*EmailCampaignsApi* | [**getEmailCampaign**](docs/EmailCampaignsApi.md#getEmailCampaign) | **GET** /emailCampaigns/{campaignId} | Get campaign informations +*EmailCampaignsApi* | [**getEmailCampaigns**](docs/EmailCampaignsApi.md#getEmailCampaigns) | **GET** /emailCampaigns | Return all your created campaigns +*EmailCampaignsApi* | [**sendEmailCampaignNow**](docs/EmailCampaignsApi.md#sendEmailCampaignNow) | **POST** /emailCampaigns/{campaignId}/sendNow | Send an email campaign id of the campaign immediately +*EmailCampaignsApi* | [**sendReport**](docs/EmailCampaignsApi.md#sendReport) | **POST** /emailCampaigns/{campaignId}/sendReport | Send the report of a campaigns +*EmailCampaignsApi* | [**sendTestEmail**](docs/EmailCampaignsApi.md#sendTestEmail) | **POST** /emailCampaigns/{campaignId}/sendTest | Send an email campaign to your test list +*EmailCampaignsApi* | [**updateCampaignStatus**](docs/EmailCampaignsApi.md#updateCampaignStatus) | **PUT** /emailCampaigns/{campaignId}/status | Update a campaign status +*EmailCampaignsApi* | [**updateEmailCampaign**](docs/EmailCampaignsApi.md#updateEmailCampaign) | **PUT** /emailCampaigns/{campaignId} | Update a campaign +*FoldersApi* | [**createFolder**](docs/FoldersApi.md#createFolder) | **POST** /contacts/folders | Create a folder +*FoldersApi* | [**deleteFolder**](docs/FoldersApi.md#deleteFolder) | **DELETE** /contacts/folders/{folderId} | Delete a folder (and all its lists) +*FoldersApi* | [**getFolder**](docs/FoldersApi.md#getFolder) | **GET** /contacts/folders/{folderId} | Returns folder details +*FoldersApi* | [**getFolderLists**](docs/FoldersApi.md#getFolderLists) | **GET** /contacts/folders/{folderId}/lists | Get the lists in a folder +*FoldersApi* | [**getFolders**](docs/FoldersApi.md#getFolders) | **GET** /contacts/folders | Get all the folders +*FoldersApi* | [**updateFolder**](docs/FoldersApi.md#updateFolder) | **PUT** /contacts/folders/{folderId} | Update a contact folder +*ListsApi* | [**addContactToList**](docs/ListsApi.md#addContactToList) | **POST** /contacts/lists/{listId}/contacts/add | Add existing contacts to a list +*ListsApi* | [**createList**](docs/ListsApi.md#createList) | **POST** /contacts/lists | Create a list +*ListsApi* | [**deleteList**](docs/ListsApi.md#deleteList) | **DELETE** /contacts/lists/{listId} | Delete a list +*ListsApi* | [**getContactsFromList**](docs/ListsApi.md#getContactsFromList) | **GET** /contacts/lists/{listId}/contacts | Get the contacts in a list +*ListsApi* | [**getFolderLists**](docs/ListsApi.md#getFolderLists) | **GET** /contacts/folders/{folderId}/lists | Get the lists in a folder +*ListsApi* | [**getList**](docs/ListsApi.md#getList) | **GET** /contacts/lists/{listId} | Get the details of a list +*ListsApi* | [**getLists**](docs/ListsApi.md#getLists) | **GET** /contacts/lists | Get all the lists +*ListsApi* | [**removeContactToList**](docs/ListsApi.md#removeContactToList) | **POST** /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list +*ListsApi* | [**updateList**](docs/ListsApi.md#updateList) | **PUT** /contacts/lists/{listId} | Update a list +*ProcessApi* | [**getProcess**](docs/ProcessApi.md#getProcess) | **GET** /processes/{processId} | Return the informations for a process +*ProcessApi* | [**getProcesses**](docs/ProcessApi.md#getProcesses) | **GET** /processes | Return all the processes for your account +*ResellerApi* | [**addCredits**](docs/ResellerApi.md#addCredits) | **POST** /reseller/children/{childAuthKey}/credits/add | Add Email and/or SMS credits to a specific child account +*ResellerApi* | [**associateIpToChild**](docs/ResellerApi.md#associateIpToChild) | **POST** /reseller/children/{childAuthKey}/ips/associate | Associate a dedicated IP to the child +*ResellerApi* | [**createResellerChild**](docs/ResellerApi.md#createResellerChild) | **POST** /reseller/children | Creates a reseller child +*ResellerApi* | [**deleteResellerChild**](docs/ResellerApi.md#deleteResellerChild) | **DELETE** /reseller/children/{childAuthKey} | Deletes a single reseller child based on the childAuthKey supplied +*ResellerApi* | [**dissociateIpFromChild**](docs/ResellerApi.md#dissociateIpFromChild) | **POST** /reseller/children/{childAuthKey}/ips/dissociate | Dissociate a dedicated IP to the child +*ResellerApi* | [**getChildInfo**](docs/ResellerApi.md#getChildInfo) | **GET** /reseller/children/{childAuthKey} | Gets the info about a specific child account +*ResellerApi* | [**getResellerChilds**](docs/ResellerApi.md#getResellerChilds) | **GET** /reseller/children | Gets the list of all reseller's children accounts +*ResellerApi* | [**removeCredits**](docs/ResellerApi.md#removeCredits) | **POST** /reseller/children/{childAuthKey}/credits/remove | Remove Email and/or SMS credits from a specific child account +*ResellerApi* | [**updateResellerChild**](docs/ResellerApi.md#updateResellerChild) | **PUT** /reseller/children/{childAuthKey} | Updates infos of reseller's child based on the childAuthKey supplied +*SendersApi* | [**createSender**](docs/SendersApi.md#createSender) | **POST** /senders | Create a new sender +*SendersApi* | [**deleteSender**](docs/SendersApi.md#deleteSender) | **DELETE** /senders/{senderId} | Delete a sender +*SendersApi* | [**getIps**](docs/SendersApi.md#getIps) | **GET** /senders/ips | Return all the dedicated IPs for your account +*SendersApi* | [**getIpsFromSender**](docs/SendersApi.md#getIpsFromSender) | **GET** /senders/{senderId}/ips | Return all the dedicated IPs for a sender +*SendersApi* | [**getSenders**](docs/SendersApi.md#getSenders) | **GET** /senders | Get the list of all your senders +*SendersApi* | [**updateSender**](docs/SendersApi.md#updateSender) | **PUT** /senders/{senderId} | Update a sender +*SmsCampaignsApi* | [**createSmsCampaign**](docs/SmsCampaignsApi.md#createSmsCampaign) | **POST** /smsCampaigns | Creates an SMS campaign +*SmsCampaignsApi* | [**deleteSmsCampaign**](docs/SmsCampaignsApi.md#deleteSmsCampaign) | **DELETE** /smsCampaigns/{campaignId} | Delete the SMS campaign +*SmsCampaignsApi* | [**getSmsCampaign**](docs/SmsCampaignsApi.md#getSmsCampaign) | **GET** /smsCampaigns/{campaignId} | Get an SMS campaign +*SmsCampaignsApi* | [**getSmsCampaigns**](docs/SmsCampaignsApi.md#getSmsCampaigns) | **GET** /smsCampaigns | Returns the informations for all your created SMS campaigns +*SmsCampaignsApi* | [**requestSmsRecipientExport**](docs/SmsCampaignsApi.md#requestSmsRecipientExport) | **POST** /smsCampaigns/{campaignId}/exportRecipients | Exports the recipients of the specified campaign. +*SmsCampaignsApi* | [**sendSmsCampaignNow**](docs/SmsCampaignsApi.md#sendSmsCampaignNow) | **POST** /smsCampaigns/{campaignId}/sendNow | Send your SMS campaign immediately +*SmsCampaignsApi* | [**sendSmsReport**](docs/SmsCampaignsApi.md#sendSmsReport) | **POST** /smsCampaigns/{campaignId}/sendReport | Send report of SMS campaigns +*SmsCampaignsApi* | [**sendTestSms**](docs/SmsCampaignsApi.md#sendTestSms) | **POST** /smsCampaigns/{campaignId}/sendTest | Send an SMS +*SmsCampaignsApi* | [**updateSmsCampaign**](docs/SmsCampaignsApi.md#updateSmsCampaign) | **PUT** /smsCampaigns/{campaignId} | Updates an SMS campaign +*SmsCampaignsApi* | [**updateSmsCampaignStatus**](docs/SmsCampaignsApi.md#updateSmsCampaignStatus) | **PUT** /smsCampaigns/{campaignId}/status | Update the campaign status +*SmtpApi* | [**createSmtpTemplate**](docs/SmtpApi.md#createSmtpTemplate) | **POST** /smtp/templates | Create an smtp template +*SmtpApi* | [**deleteHardbounces**](docs/SmtpApi.md#deleteHardbounces) | **POST** /smtp/deleteHardbounces | Delete hardbounces +*SmtpApi* | [**deleteSmtpTemplate**](docs/SmtpApi.md#deleteSmtpTemplate) | **DELETE** /smtp/templates/{templateId} | Delete an inactive smtp template +*SmtpApi* | [**getAggregatedSmtpReport**](docs/SmtpApi.md#getAggregatedSmtpReport) | **GET** /smtp/statistics/aggregatedReport | Get your SMTP activity aggregated over a period of time +*SmtpApi* | [**getEmailEventReport**](docs/SmtpApi.md#getEmailEventReport) | **GET** /smtp/statistics/events | Get all your SMTP activity (unaggregated events) +*SmtpApi* | [**getSmtpReport**](docs/SmtpApi.md#getSmtpReport) | **GET** /smtp/statistics/reports | Get your SMTP activity aggregated per day +*SmtpApi* | [**getSmtpTemplate**](docs/SmtpApi.md#getSmtpTemplate) | **GET** /smtp/templates/{templateId} | Returns the template informations +*SmtpApi* | [**getSmtpTemplates**](docs/SmtpApi.md#getSmtpTemplates) | **GET** /smtp/templates | Get the list of SMTP templates +*SmtpApi* | [**sendTemplate**](docs/SmtpApi.md#sendTemplate) | **POST** /smtp/templates/{templateId}/send | Send a template +*SmtpApi* | [**sendTestTemplate**](docs/SmtpApi.md#sendTestTemplate) | **POST** /smtp/templates/{templateId}/sendTest | Send a template to your test list +*SmtpApi* | [**sendTransacEmail**](docs/SmtpApi.md#sendTransacEmail) | **POST** /smtp/email | Send a transactional email +*SmtpApi* | [**updateSmtpTemplate**](docs/SmtpApi.md#updateSmtpTemplate) | **PUT** /smtp/templates/{templateId} | Updates an smtp templates +*TransactionalSmsApi* | [**getSmsEvents**](docs/TransactionalSmsApi.md#getSmsEvents) | **GET** /transactionalSMS/statistics/events | Get all the SMS activity (unaggregated events) +*TransactionalSmsApi* | [**getTransacAggregatedSmsReport**](docs/TransactionalSmsApi.md#getTransacAggregatedSmsReport) | **GET** /transactionalSMS/statistics/aggregatedReport | Get your SMS activity aggregated over a period of time +*TransactionalSmsApi* | [**getTransacSmsReport**](docs/TransactionalSmsApi.md#getTransacSmsReport) | **GET** /transactionalSMS/statistics/reports | Get your SMS activity aggregated per day +*TransactionalSmsApi* | [**sendTransacSms**](docs/TransactionalSmsApi.md#sendTransacSms) | **POST** /transactionalSMS/sms | Send the SMS campaign to the specified mobile number +*WebhooksApi* | [**createWebhook**](docs/WebhooksApi.md#createWebhook) | **POST** /webhooks | Create a webhook +*WebhooksApi* | [**deleteWebhook**](docs/WebhooksApi.md#deleteWebhook) | **DELETE** /webhooks/{webhookId} | Delete a webhook +*WebhooksApi* | [**getWebhook**](docs/WebhooksApi.md#getWebhook) | **GET** /webhooks/{webhookId} | Get a webhook details +*WebhooksApi* | [**getWebhooks**](docs/WebhooksApi.md#getWebhooks) | **GET** /webhooks | Get all webhooks +*WebhooksApi* | [**updateWebhook**](docs/WebhooksApi.md#updateWebhook) | **PUT** /webhooks/{webhookId} | Update a webhook + + +## Documentation for Models + + - [AddCredits](docs/AddCredits.md) + - [AddRemoveContactToList](docs/AddRemoveContactToList.md) + - [CreateAttribute](docs/CreateAttribute.md) + - [CreateAttributeEnumeration](docs/CreateAttributeEnumeration.md) + - [CreateChild](docs/CreateChild.md) + - [CreateContact](docs/CreateContact.md) + - [CreateEmailCampaign](docs/CreateEmailCampaign.md) + - [CreateEmailCampaignRecipients](docs/CreateEmailCampaignRecipients.md) + - [CreateEmailCampaignSender](docs/CreateEmailCampaignSender.md) + - [CreateList](docs/CreateList.md) + - [CreateModel](docs/CreateModel.md) + - [CreateReseller](docs/CreateReseller.md) + - [CreateSender](docs/CreateSender.md) + - [CreateSenderIps](docs/CreateSenderIps.md) + - [CreateSenderModel](docs/CreateSenderModel.md) + - [CreateSmsCampaign](docs/CreateSmsCampaign.md) + - [CreateSmsCampaignRecipients](docs/CreateSmsCampaignRecipients.md) + - [CreateSmtpEmail](docs/CreateSmtpEmail.md) + - [CreateSmtpTemplate](docs/CreateSmtpTemplate.md) + - [CreateSmtpTemplateSender](docs/CreateSmtpTemplateSender.md) + - [CreateUpdateFolder](docs/CreateUpdateFolder.md) + - [CreateWebhook](docs/CreateWebhook.md) + - [CreatedProcessId](docs/CreatedProcessId.md) + - [DeleteHardbounces](docs/DeleteHardbounces.md) + - [EmailExportRecipients](docs/EmailExportRecipients.md) + - [ErrorModel](docs/ErrorModel.md) + - [GetAccountMarketingAutomation](docs/GetAccountMarketingAutomation.md) + - [GetAccountPlan](docs/GetAccountPlan.md) + - [GetAccountRelay](docs/GetAccountRelay.md) + - [GetAccountRelayData](docs/GetAccountRelayData.md) + - [GetAggregatedReport](docs/GetAggregatedReport.md) + - [GetAttributes](docs/GetAttributes.md) + - [GetAttributesAttributes](docs/GetAttributesAttributes.md) + - [GetAttributesEnumeration](docs/GetAttributesEnumeration.md) + - [GetCampaignOverview](docs/GetCampaignOverview.md) + - [GetCampaignRecipients](docs/GetCampaignRecipients.md) + - [GetCampaignStats](docs/GetCampaignStats.md) + - [GetChildInfoApiKeys](docs/GetChildInfoApiKeys.md) + - [GetChildInfoApiKeysV2](docs/GetChildInfoApiKeysV2.md) + - [GetChildInfoApiKeysV3](docs/GetChildInfoApiKeysV3.md) + - [GetChildInfoCredits](docs/GetChildInfoCredits.md) + - [GetChildInfoStatistics](docs/GetChildInfoStatistics.md) + - [GetChildrenList](docs/GetChildrenList.md) + - [GetClient](docs/GetClient.md) + - [GetContactCampaignStats](docs/GetContactCampaignStats.md) + - [GetContactCampaignStatsClicked](docs/GetContactCampaignStatsClicked.md) + - [GetContactCampaignStatsOpened](docs/GetContactCampaignStatsOpened.md) + - [GetContactCampaignStatsTransacAttributes](docs/GetContactCampaignStatsTransacAttributes.md) + - [GetContactCampaignStatsUnsubscriptions](docs/GetContactCampaignStatsUnsubscriptions.md) + - [GetContactDetails](docs/GetContactDetails.md) + - [GetContacts](docs/GetContacts.md) + - [GetEmailCampaigns](docs/GetEmailCampaigns.md) + - [GetEmailEventReport](docs/GetEmailEventReport.md) + - [GetEmailEventReportEvents](docs/GetEmailEventReportEvents.md) + - [GetExtendedCampaignOverviewSender](docs/GetExtendedCampaignOverviewSender.md) + - [GetExtendedCampaignStats](docs/GetExtendedCampaignStats.md) + - [GetExtendedCampaignStatsLinksStats](docs/GetExtendedCampaignStatsLinksStats.md) + - [GetExtendedClientAddress](docs/GetExtendedClientAddress.md) + - [GetExtendedContactDetailsStatistics](docs/GetExtendedContactDetailsStatistics.md) + - [GetExtendedContactDetailsStatisticsClicked](docs/GetExtendedContactDetailsStatisticsClicked.md) + - [GetExtendedContactDetailsStatisticsLinks](docs/GetExtendedContactDetailsStatisticsLinks.md) + - [GetExtendedContactDetailsStatisticsMessagesSent](docs/GetExtendedContactDetailsStatisticsMessagesSent.md) + - [GetExtendedContactDetailsStatisticsOpened](docs/GetExtendedContactDetailsStatisticsOpened.md) + - [GetExtendedContactDetailsStatisticsUnsubscriptions](docs/GetExtendedContactDetailsStatisticsUnsubscriptions.md) + - [GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription](docs/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.md) + - [GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription](docs/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.md) + - [GetExtendedListCampaignStats](docs/GetExtendedListCampaignStats.md) + - [GetFolder](docs/GetFolder.md) + - [GetFolderLists](docs/GetFolderLists.md) + - [GetFolders](docs/GetFolders.md) + - [GetIp](docs/GetIp.md) + - [GetIpFromSender](docs/GetIpFromSender.md) + - [GetIps](docs/GetIps.md) + - [GetIpsFromSender](docs/GetIpsFromSender.md) + - [GetList](docs/GetList.md) + - [GetLists](docs/GetLists.md) + - [GetProcess](docs/GetProcess.md) + - [GetProcesses](docs/GetProcesses.md) + - [GetReports](docs/GetReports.md) + - [GetReportsReports](docs/GetReportsReports.md) + - [GetSendersList](docs/GetSendersList.md) + - [GetSendersListIps](docs/GetSendersListIps.md) + - [GetSendersListSenders](docs/GetSendersListSenders.md) + - [GetSmsCampaignOverview](docs/GetSmsCampaignOverview.md) + - [GetSmsCampaignStats](docs/GetSmsCampaignStats.md) + - [GetSmsCampaigns](docs/GetSmsCampaigns.md) + - [GetSmsEventReport](docs/GetSmsEventReport.md) + - [GetSmsEventReportEvents](docs/GetSmsEventReportEvents.md) + - [GetSmtpTemplateOverview](docs/GetSmtpTemplateOverview.md) + - [GetSmtpTemplateOverviewSender](docs/GetSmtpTemplateOverviewSender.md) + - [GetSmtpTemplates](docs/GetSmtpTemplates.md) + - [GetStatsByDomain](docs/GetStatsByDomain.md) + - [GetTransacAggregatedSmsReport](docs/GetTransacAggregatedSmsReport.md) + - [GetTransacSmsReport](docs/GetTransacSmsReport.md) + - [GetTransacSmsReportReports](docs/GetTransacSmsReportReports.md) + - [GetWebhook](docs/GetWebhook.md) + - [GetWebhooks](docs/GetWebhooks.md) + - [ManageIp](docs/ManageIp.md) + - [PostContactInfo](docs/PostContactInfo.md) + - [PostContactInfoContacts](docs/PostContactInfoContacts.md) + - [PostSendFailed](docs/PostSendFailed.md) + - [PostSendSmsTestFailed](docs/PostSendSmsTestFailed.md) + - [RemainingCreditModel](docs/RemainingCreditModel.md) + - [RemainingCreditModelChild](docs/RemainingCreditModelChild.md) + - [RemainingCreditModelReseller](docs/RemainingCreditModelReseller.md) + - [RemoveCredits](docs/RemoveCredits.md) + - [RequestContactExport](docs/RequestContactExport.md) + - [RequestContactImport](docs/RequestContactImport.md) + - [RequestContactImportNewList](docs/RequestContactImportNewList.md) + - [RequestSmsRecipientExport](docs/RequestSmsRecipientExport.md) + - [SendEmail](docs/SendEmail.md) + - [SendEmailAttachment](docs/SendEmailAttachment.md) + - [SendReport](docs/SendReport.md) + - [SendReportEmail](docs/SendReportEmail.md) + - [SendSms](docs/SendSms.md) + - [SendSmtpEmail](docs/SendSmtpEmail.md) + - [SendSmtpEmailAttachment](docs/SendSmtpEmailAttachment.md) + - [SendSmtpEmailBcc](docs/SendSmtpEmailBcc.md) + - [SendSmtpEmailCc](docs/SendSmtpEmailCc.md) + - [SendSmtpEmailReplyTo](docs/SendSmtpEmailReplyTo.md) + - [SendSmtpEmailSender](docs/SendSmtpEmailSender.md) + - [SendSmtpEmailTo](docs/SendSmtpEmailTo.md) + - [SendTemplateEmail](docs/SendTemplateEmail.md) + - [SendTestEmail](docs/SendTestEmail.md) + - [SendTestSms](docs/SendTestSms.md) + - [SendTransacSms](docs/SendTransacSms.md) + - [UpdateAttribute](docs/UpdateAttribute.md) + - [UpdateAttributeEnumeration](docs/UpdateAttributeEnumeration.md) + - [UpdateCampaignStatus](docs/UpdateCampaignStatus.md) + - [UpdateChild](docs/UpdateChild.md) + - [UpdateContact](docs/UpdateContact.md) + - [UpdateEmailCampaign](docs/UpdateEmailCampaign.md) + - [UpdateEmailCampaignRecipients](docs/UpdateEmailCampaignRecipients.md) + - [UpdateEmailCampaignSender](docs/UpdateEmailCampaignSender.md) + - [UpdateList](docs/UpdateList.md) + - [UpdateSender](docs/UpdateSender.md) + - [UpdateSmsCampaign](docs/UpdateSmsCampaign.md) + - [UpdateSmtpTemplate](docs/UpdateSmtpTemplate.md) + - [UpdateSmtpTemplateSender](docs/UpdateSmtpTemplateSender.md) + - [UpdateWebhook](docs/UpdateWebhook.md) + - [GetChildInfo](docs/GetChildInfo.md) + - [GetExtendedCampaignOverview](docs/GetExtendedCampaignOverview.md) + - [GetExtendedClient](docs/GetExtendedClient.md) + - [GetExtendedContactDetails](docs/GetExtendedContactDetails.md) + - [GetExtendedList](docs/GetExtendedList.md) + - [GetSmsCampaign](docs/GetSmsCampaign.md) + - [GetAccount](docs/GetAccount.md) + - [GetEmailCampaign](docs/GetEmailCampaign.md) + + +## Documentation for Authorization + +Authentication schemes defined for the API: +### api-key + +- **Type**: API key +- **API key parameter name**: api-key +- **Location**: HTTP header + + +## Recommendation + +It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. + +## Support and Feedback + +Be sure to visit the SendinBlue official [documentation website](https://sendinblue.readme.io/docs ) for additional information about our API. + +If you find a bug, please post the issue on [Github](https://github.com/sendinblue/APIv3-java-library/issues). + +As always, if you need additional assistance, drop us a note [here](https://account.sendinblue.com/support). \ No newline at end of file diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..9ddea42 --- /dev/null +++ b/build.gradle @@ -0,0 +1,104 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' + +group = 'com.sendinblue' +version = '1.0.0' + +buildscript { + repositories { + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:2.3.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' + } +} + +repositories { + jcenter() +} + + +if(hasProperty('target') && target == 'android') { + + apply plugin: 'com.android.library' + apply plugin: 'com.github.dcendents.android-maven' + + android { + compileSdkVersion 25 + buildToolsVersion '25.0.2' + defaultConfig { + minSdkVersion 14 + targetSdkVersion 25 + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_7 + targetCompatibility JavaVersion.VERSION_1_7 + } + + // Rename the aar correctly + libraryVariants.all { variant -> + variant.outputs.each { output -> + def outputFile = output.outputFile + if (outputFile != null && outputFile.name.endsWith('.aar')) { + def fileName = "${project.name}-${variant.baseName}-${version}.aar" + output.outputFile = new File(outputFile.parent, fileName) + } + } + } + + dependencies { + provided 'javax.annotation:jsr250-api:1.0' + } + } + + afterEvaluate { + android.libraryVariants.all { variant -> + def task = project.tasks.create "jar${variant.name.capitalize()}", Jar + task.description = "Create jar artifact for ${variant.name}" + task.dependsOn variant.javaCompile + task.from variant.javaCompile.destinationDir + task.destinationDir = project.file("${project.buildDir}/outputs/jar") + task.archiveName = "${project.name}-${variant.baseName}-${version}.jar" + artifacts.add('archives', task); + } + } + + task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' + } + + artifacts { + archives sourcesJar + } + +} else { + + apply plugin: 'java' + apply plugin: 'maven' + + sourceCompatibility = JavaVersion.VERSION_1_7 + targetCompatibility = JavaVersion.VERSION_1_7 + + install { + repositories.mavenInstaller { + pom.artifactId = 'sib-api-v3-sdk' + } + } + + task execute(type:JavaExec) { + main = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath + } +} + +dependencies { + compile 'io.swagger:swagger-annotations:1.5.15' + compile 'com.squareup.okhttp:okhttp:2.7.5' + compile 'com.squareup.okhttp:logging-interceptor:2.7.5' + compile 'com.google.code.gson:gson:2.8.1' + compile 'io.gsonfire:gson-fire:1.8.0' + compile 'org.threeten:threetenbp:1.3.5' + testCompile 'junit:junit:4.12' +} diff --git a/build.sbt b/build.sbt new file mode 100644 index 0000000..7ab8702 --- /dev/null +++ b/build.sbt @@ -0,0 +1,21 @@ +lazy val root = (project in file(".")). + settings( + organization := "com.sendinblue", + name := "sib-api-v3-sdk", + version := "1.0.0", + scalaVersion := "2.11.4", + scalacOptions ++= Seq("-feature"), + javacOptions in compile ++= Seq("-Xlint:deprecation"), + publishArtifact in (Compile, packageDoc) := false, + resolvers += Resolver.mavenLocal, + libraryDependencies ++= Seq( + "io.swagger" % "swagger-annotations" % "1.5.15", + "com.squareup.okhttp" % "okhttp" % "2.7.5", + "com.squareup.okhttp" % "logging-interceptor" % "2.7.5", + "com.google.code.gson" % "gson" % "2.8.1", + "org.threeten" % "threetenbp" % "1.3.5" % "compile", + "io.gsonfire" % "gson-fire" % "1.8.0" % "compile", + "junit" % "junit" % "4.12" % "test", + "com.novocode" % "junit-interface" % "0.10" % "test" + ) + ) diff --git a/docs/AccountApi.md b/docs/AccountApi.md new file mode 100644 index 0000000..1a570ac --- /dev/null +++ b/docs/AccountApi.md @@ -0,0 +1,58 @@ +# AccountApi + +All URIs are relative to *https://api.sendinblue.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getAccount**](AccountApi.md#getAccount) | **GET** /account | Get your account informations, plans and credits details + + + +# **getAccount** +> GetAccount getAccount() + +Get your account informations, plans and credits details + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.AccountApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +AccountApi apiInstance = new AccountApi(); +try { + GetAccount result = apiInstance.getAccount(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AccountApi#getAccount"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**GetAccount**](GetAccount.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + diff --git a/docs/AddCredits.md b/docs/AddCredits.md new file mode 100644 index 0000000..a442c82 --- /dev/null +++ b/docs/AddCredits.md @@ -0,0 +1,11 @@ + +# AddCredits + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sms** | **Long** | SMS credits to be added to the child account | [optional] +**email** | **Long** | Email credits to be added to the child account | [optional] + + + diff --git a/docs/AddRemoveContactToList.md b/docs/AddRemoveContactToList.md new file mode 100644 index 0000000..487881e --- /dev/null +++ b/docs/AddRemoveContactToList.md @@ -0,0 +1,10 @@ + +# AddRemoveContactToList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**emails** | **List<String>** | Emails to add or remove from a list | [optional] + + + diff --git a/docs/AttributesApi.md b/docs/AttributesApi.md new file mode 100644 index 0000000..8ccd1e8 --- /dev/null +++ b/docs/AttributesApi.md @@ -0,0 +1,227 @@ +# AttributesApi + +All URIs are relative to *https://api.sendinblue.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createAttribute**](AttributesApi.md#createAttribute) | **POST** /contacts/attributes/{attributeCategory}/{attributeName} | Creates contact attribute +[**deleteAttribute**](AttributesApi.md#deleteAttribute) | **DELETE** /contacts/attributes/{attributeCategory}/{attributeName} | Deletes an attribute +[**getAttributes**](AttributesApi.md#getAttributes) | **GET** /contacts/attributes | Lists all attributes +[**updateAttribute**](AttributesApi.md#updateAttribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Updates contact attribute + + + +# **createAttribute** +> createAttribute(attributeCategory, attributeName, createAttribute) + +Creates contact attribute + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.AttributesApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +AttributesApi apiInstance = new AttributesApi(); +String attributeCategory = "attributeCategory_example"; // String | Category of the attribute +String attributeName = "attributeName_example"; // String | Name of the attribute +CreateAttribute createAttribute = new CreateAttribute(); // CreateAttribute | Values to create an attribute +try { + apiInstance.createAttribute(attributeCategory, attributeName, createAttribute); +} catch (ApiException e) { + System.err.println("Exception when calling AttributesApi#createAttribute"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attributeCategory** | **String**| Category of the attribute | [enum: normal, transactional, category, calculated, global] + **attributeName** | **String**| Name of the attribute | + **createAttribute** | [**CreateAttribute**](CreateAttribute.md)| Values to create an attribute | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **deleteAttribute** +> deleteAttribute(attributeCategory, attributeName) + +Deletes an attribute + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.AttributesApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +AttributesApi apiInstance = new AttributesApi(); +String attributeCategory = "attributeCategory_example"; // String | Category of the attribute +String attributeName = "attributeName_example"; // String | Name of the existing attribute +try { + apiInstance.deleteAttribute(attributeCategory, attributeName); +} catch (ApiException e) { + System.err.println("Exception when calling AttributesApi#deleteAttribute"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attributeCategory** | **String**| Category of the attribute | [enum: normal, transactional, category, calculated, global] + **attributeName** | **String**| Name of the existing attribute | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getAttributes** +> GetAttributes getAttributes() + +Lists all attributes + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.AttributesApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +AttributesApi apiInstance = new AttributesApi(); +try { + GetAttributes result = apiInstance.getAttributes(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AttributesApi#getAttributes"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**GetAttributes**](GetAttributes.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **updateAttribute** +> updateAttribute(attributeCategory, attributeName, updateAttribute) + +Updates contact attribute + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.AttributesApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +AttributesApi apiInstance = new AttributesApi(); +String attributeCategory = "attributeCategory_example"; // String | Category of the attribute +String attributeName = "attributeName_example"; // String | Name of the existing attribute +UpdateAttribute updateAttribute = new UpdateAttribute(); // UpdateAttribute | Values to update an attribute +try { + apiInstance.updateAttribute(attributeCategory, attributeName, updateAttribute); +} catch (ApiException e) { + System.err.println("Exception when calling AttributesApi#updateAttribute"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attributeCategory** | **String**| Category of the attribute | [enum: category, calculated, global] + **attributeName** | **String**| Name of the existing attribute | + **updateAttribute** | [**UpdateAttribute**](UpdateAttribute.md)| Values to update an attribute | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + diff --git a/docs/ContactsApi.md b/docs/ContactsApi.md new file mode 100644 index 0000000..69ee314 --- /dev/null +++ b/docs/ContactsApi.md @@ -0,0 +1,1388 @@ +# ContactsApi + +All URIs are relative to *https://api.sendinblue.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addContactToList**](ContactsApi.md#addContactToList) | **POST** /contacts/lists/{listId}/contacts/add | Add existing contacts to a list +[**createAttribute**](ContactsApi.md#createAttribute) | **POST** /contacts/attributes/{attributeCategory}/{attributeName} | Creates contact attribute +[**createContact**](ContactsApi.md#createContact) | **POST** /contacts | Create a contact +[**createFolder**](ContactsApi.md#createFolder) | **POST** /contacts/folders | Create a folder +[**createList**](ContactsApi.md#createList) | **POST** /contacts/lists | Create a list +[**deleteAttribute**](ContactsApi.md#deleteAttribute) | **DELETE** /contacts/attributes/{attributeCategory}/{attributeName} | Deletes an attribute +[**deleteFolder**](ContactsApi.md#deleteFolder) | **DELETE** /contacts/folders/{folderId} | Delete a folder (and all its lists) +[**deleteList**](ContactsApi.md#deleteList) | **DELETE** /contacts/lists/{listId} | Delete a list +[**getAttributes**](ContactsApi.md#getAttributes) | **GET** /contacts/attributes | Lists all attributes +[**getContactInfo**](ContactsApi.md#getContactInfo) | **GET** /contacts/{email} | Retrieves contact informations +[**getContactStats**](ContactsApi.md#getContactStats) | **GET** /contacts/{email}/campaignStats | Get the campaigns statistics for a contact +[**getContacts**](ContactsApi.md#getContacts) | **GET** /contacts | Get all the contacts +[**getContactsFromList**](ContactsApi.md#getContactsFromList) | **GET** /contacts/lists/{listId}/contacts | Get the contacts in a list +[**getFolder**](ContactsApi.md#getFolder) | **GET** /contacts/folders/{folderId} | Returns folder details +[**getFolderLists**](ContactsApi.md#getFolderLists) | **GET** /contacts/folders/{folderId}/lists | Get the lists in a folder +[**getFolders**](ContactsApi.md#getFolders) | **GET** /contacts/folders | Get all the folders +[**getList**](ContactsApi.md#getList) | **GET** /contacts/lists/{listId} | Get the details of a list +[**getLists**](ContactsApi.md#getLists) | **GET** /contacts/lists | Get all the lists +[**importContacts**](ContactsApi.md#importContacts) | **POST** /contacts/import | Import contacts +[**removeContactToList**](ContactsApi.md#removeContactToList) | **POST** /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list +[**requestContactExport**](ContactsApi.md#requestContactExport) | **POST** /contacts/export | Export contacts +[**updateAttribute**](ContactsApi.md#updateAttribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Updates contact attribute +[**updateContact**](ContactsApi.md#updateContact) | **PUT** /contacts/{email} | Updates a contact +[**updateFolder**](ContactsApi.md#updateFolder) | **PUT** /contacts/folders/{folderId} | Update a contact folder +[**updateList**](ContactsApi.md#updateList) | **PUT** /contacts/lists/{listId} | Update a list + + + +# **addContactToList** +> PostContactInfo addContactToList(listId, contactEmails) + +Add existing contacts to a list + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ContactsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ContactsApi apiInstance = new ContactsApi(); +Long listId = 789L; // Long | Id of the list +AddRemoveContactToList contactEmails = new AddRemoveContactToList(); // AddRemoveContactToList | Emails addresses of the contacts +try { + PostContactInfo result = apiInstance.addContactToList(listId, contactEmails); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ContactsApi#addContactToList"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **Long**| Id of the list | + **contactEmails** | [**AddRemoveContactToList**](AddRemoveContactToList.md)| Emails addresses of the contacts | + +### Return type + +[**PostContactInfo**](PostContactInfo.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **createAttribute** +> createAttribute(attributeCategory, attributeName, createAttribute) + +Creates contact attribute + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ContactsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ContactsApi apiInstance = new ContactsApi(); +String attributeCategory = "attributeCategory_example"; // String | Category of the attribute +String attributeName = "attributeName_example"; // String | Name of the attribute +CreateAttribute createAttribute = new CreateAttribute(); // CreateAttribute | Values to create an attribute +try { + apiInstance.createAttribute(attributeCategory, attributeName, createAttribute); +} catch (ApiException e) { + System.err.println("Exception when calling ContactsApi#createAttribute"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attributeCategory** | **String**| Category of the attribute | [enum: normal, transactional, category, calculated, global] + **attributeName** | **String**| Name of the attribute | + **createAttribute** | [**CreateAttribute**](CreateAttribute.md)| Values to create an attribute | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **createContact** +> CreateModel createContact(createContact) + +Create a contact + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ContactsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ContactsApi apiInstance = new ContactsApi(); +CreateContact createContact = new CreateContact(); // CreateContact | Values to create a contact +try { + CreateModel result = apiInstance.createContact(createContact); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ContactsApi#createContact"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createContact** | [**CreateContact**](CreateContact.md)| Values to create a contact | + +### Return type + +[**CreateModel**](CreateModel.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **createFolder** +> CreateModel createFolder(createFolder) + +Create a folder + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ContactsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ContactsApi apiInstance = new ContactsApi(); +CreateUpdateFolder createFolder = new CreateUpdateFolder(); // CreateUpdateFolder | Name of the folder +try { + CreateModel result = apiInstance.createFolder(createFolder); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ContactsApi#createFolder"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createFolder** | [**CreateUpdateFolder**](CreateUpdateFolder.md)| Name of the folder | + +### Return type + +[**CreateModel**](CreateModel.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **createList** +> CreateModel createList(createList) + +Create a list + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ContactsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ContactsApi apiInstance = new ContactsApi(); +CreateList createList = new CreateList(); // CreateList | Values to create a list +try { + CreateModel result = apiInstance.createList(createList); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ContactsApi#createList"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createList** | [**CreateList**](CreateList.md)| Values to create a list | + +### Return type + +[**CreateModel**](CreateModel.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **deleteAttribute** +> deleteAttribute(attributeCategory, attributeName) + +Deletes an attribute + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ContactsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ContactsApi apiInstance = new ContactsApi(); +String attributeCategory = "attributeCategory_example"; // String | Category of the attribute +String attributeName = "attributeName_example"; // String | Name of the existing attribute +try { + apiInstance.deleteAttribute(attributeCategory, attributeName); +} catch (ApiException e) { + System.err.println("Exception when calling ContactsApi#deleteAttribute"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attributeCategory** | **String**| Category of the attribute | [enum: normal, transactional, category, calculated, global] + **attributeName** | **String**| Name of the existing attribute | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **deleteFolder** +> deleteFolder(folderId) + +Delete a folder (and all its lists) + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ContactsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ContactsApi apiInstance = new ContactsApi(); +Long folderId = 789L; // Long | Id of the folder +try { + apiInstance.deleteFolder(folderId); +} catch (ApiException e) { + System.err.println("Exception when calling ContactsApi#deleteFolder"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **folderId** | **Long**| Id of the folder | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **deleteList** +> deleteList(listId) + +Delete a list + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ContactsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ContactsApi apiInstance = new ContactsApi(); +Long listId = 789L; // Long | Id of the list +try { + apiInstance.deleteList(listId); +} catch (ApiException e) { + System.err.println("Exception when calling ContactsApi#deleteList"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **Long**| Id of the list | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getAttributes** +> GetAttributes getAttributes() + +Lists all attributes + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ContactsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ContactsApi apiInstance = new ContactsApi(); +try { + GetAttributes result = apiInstance.getAttributes(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ContactsApi#getAttributes"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**GetAttributes**](GetAttributes.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getContactInfo** +> GetExtendedContactDetails getContactInfo(email) + +Retrieves contact informations + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ContactsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ContactsApi apiInstance = new ContactsApi(); +String email = "email_example"; // String | Email (urlencoded) of the contact +try { + GetExtendedContactDetails result = apiInstance.getContactInfo(email); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ContactsApi#getContactInfo"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **String**| Email (urlencoded) of the contact | + +### Return type + +[**GetExtendedContactDetails**](GetExtendedContactDetails.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getContactStats** +> GetContactCampaignStats getContactStats(email) + +Get the campaigns statistics for a contact + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ContactsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ContactsApi apiInstance = new ContactsApi(); +String email = "email_example"; // String | Email address (urlencoded) of the contact +try { + GetContactCampaignStats result = apiInstance.getContactStats(email); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ContactsApi#getContactStats"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **String**| Email address (urlencoded) of the contact | + +### Return type + +[**GetContactCampaignStats**](GetContactCampaignStats.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getContacts** +> GetContacts getContacts(limit, offset, modifiedSince) + +Get all the contacts + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ContactsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ContactsApi apiInstance = new ContactsApi(); +Long limit = 50L; // Long | Number of documents per page +Long offset = 0L; // Long | Index of the first document of the page +OffsetDateTime modifiedSince = new OffsetDateTime(); // OffsetDateTime | Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. +try { + GetContacts result = apiInstance.getContacts(limit, offset, modifiedSince); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ContactsApi#getContacts"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **Long**| Number of documents per page | [optional] [default to 50] + **offset** | **Long**| Index of the first document of the page | [optional] [default to 0] + **modifiedSince** | **OffsetDateTime**| Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. | [optional] + +### Return type + +[**GetContacts**](GetContacts.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getContactsFromList** +> GetContacts getContactsFromList(listId, modifiedSince, limit, offset) + +Get the contacts in a list + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ContactsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ContactsApi apiInstance = new ContactsApi(); +Long listId = 789L; // Long | Id of the list +OffsetDateTime modifiedSince = new OffsetDateTime(); // OffsetDateTime | Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. +Long limit = 50L; // Long | Number of documents per page +Long offset = 0L; // Long | Index of the first document of the page +try { + GetContacts result = apiInstance.getContactsFromList(listId, modifiedSince, limit, offset); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ContactsApi#getContactsFromList"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **Long**| Id of the list | + **modifiedSince** | **OffsetDateTime**| Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. | [optional] + **limit** | **Long**| Number of documents per page | [optional] [default to 50] + **offset** | **Long**| Index of the first document of the page | [optional] [default to 0] + +### Return type + +[**GetContacts**](GetContacts.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getFolder** +> GetFolder getFolder(folderId) + +Returns folder details + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ContactsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ContactsApi apiInstance = new ContactsApi(); +Long folderId = 789L; // Long | id of the folder +try { + GetFolder result = apiInstance.getFolder(folderId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ContactsApi#getFolder"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **folderId** | **Long**| id of the folder | + +### Return type + +[**GetFolder**](GetFolder.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getFolderLists** +> GetFolderLists getFolderLists(folderId, limit, offset) + +Get the lists in a folder + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ContactsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ContactsApi apiInstance = new ContactsApi(); +Long folderId = 789L; // Long | Id of the folder +Long limit = 10L; // Long | Number of documents per page +Long offset = 0L; // Long | Index of the first document of the page +try { + GetFolderLists result = apiInstance.getFolderLists(folderId, limit, offset); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ContactsApi#getFolderLists"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **folderId** | **Long**| Id of the folder | + **limit** | **Long**| Number of documents per page | [optional] [default to 10] + **offset** | **Long**| Index of the first document of the page | [optional] [default to 0] + +### Return type + +[**GetFolderLists**](GetFolderLists.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getFolders** +> GetFolders getFolders(limit, offset) + +Get all the folders + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ContactsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ContactsApi apiInstance = new ContactsApi(); +Long limit = 10L; // Long | Number of documents per page +Long offset = 0L; // Long | Index of the first document of the page +try { + GetFolders result = apiInstance.getFolders(limit, offset); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ContactsApi#getFolders"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **Long**| Number of documents per page | [default to 10] + **offset** | **Long**| Index of the first document of the page | [default to 0] + +### Return type + +[**GetFolders**](GetFolders.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getList** +> GetExtendedList getList(listId) + +Get the details of a list + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ContactsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ContactsApi apiInstance = new ContactsApi(); +Long listId = 789L; // Long | Id of the list +try { + GetExtendedList result = apiInstance.getList(listId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ContactsApi#getList"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **Long**| Id of the list | + +### Return type + +[**GetExtendedList**](GetExtendedList.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getLists** +> GetLists getLists(limit, offset) + +Get all the lists + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ContactsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ContactsApi apiInstance = new ContactsApi(); +Long limit = 10L; // Long | Number of documents per page +Long offset = 0L; // Long | Index of the first document of the page +try { + GetLists result = apiInstance.getLists(limit, offset); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ContactsApi#getLists"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **Long**| Number of documents per page | [optional] [default to 10] + **offset** | **Long**| Index of the first document of the page | [optional] [default to 0] + +### Return type + +[**GetLists**](GetLists.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **importContacts** +> CreatedProcessId importContacts(requestContactImport) + +Import contacts + +It returns the background process ID which on completion calls the notify URL that you have set in the input. + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ContactsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ContactsApi apiInstance = new ContactsApi(); +RequestContactImport requestContactImport = new RequestContactImport(); // RequestContactImport | Values to import contacts in Sendinblue. To know more about the expected format, please have a look at ``https://help.sendinblue.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` +try { + CreatedProcessId result = apiInstance.importContacts(requestContactImport); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ContactsApi#importContacts"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requestContactImport** | [**RequestContactImport**](RequestContactImport.md)| Values to import contacts in Sendinblue. To know more about the expected format, please have a look at ``https://help.sendinblue.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` | + +### Return type + +[**CreatedProcessId**](CreatedProcessId.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **removeContactToList** +> PostContactInfo removeContactToList(listId, contactEmails) + +Remove existing contacts from a list + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ContactsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ContactsApi apiInstance = new ContactsApi(); +Long listId = 789L; // Long | Id of the list +AddRemoveContactToList contactEmails = new AddRemoveContactToList(); // AddRemoveContactToList | Emails adresses of the contact +try { + PostContactInfo result = apiInstance.removeContactToList(listId, contactEmails); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ContactsApi#removeContactToList"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **Long**| Id of the list | + **contactEmails** | [**AddRemoveContactToList**](AddRemoveContactToList.md)| Emails adresses of the contact | + +### Return type + +[**PostContactInfo**](PostContactInfo.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **requestContactExport** +> CreatedProcessId requestContactExport(requestContactExport) + +Export contacts + +It returns the background process ID which on completion calls the notify URL that you have set in the input. File will be available in csv. + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ContactsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ContactsApi apiInstance = new ContactsApi(); +RequestContactExport requestContactExport = new RequestContactExport(); // RequestContactExport | Values to request a contact export +try { + CreatedProcessId result = apiInstance.requestContactExport(requestContactExport); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ContactsApi#requestContactExport"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requestContactExport** | [**RequestContactExport**](RequestContactExport.md)| Values to request a contact export | + +### Return type + +[**CreatedProcessId**](CreatedProcessId.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **updateAttribute** +> updateAttribute(attributeCategory, attributeName, updateAttribute) + +Updates contact attribute + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ContactsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ContactsApi apiInstance = new ContactsApi(); +String attributeCategory = "attributeCategory_example"; // String | Category of the attribute +String attributeName = "attributeName_example"; // String | Name of the existing attribute +UpdateAttribute updateAttribute = new UpdateAttribute(); // UpdateAttribute | Values to update an attribute +try { + apiInstance.updateAttribute(attributeCategory, attributeName, updateAttribute); +} catch (ApiException e) { + System.err.println("Exception when calling ContactsApi#updateAttribute"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attributeCategory** | **String**| Category of the attribute | [enum: category, calculated, global] + **attributeName** | **String**| Name of the existing attribute | + **updateAttribute** | [**UpdateAttribute**](UpdateAttribute.md)| Values to update an attribute | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **updateContact** +> updateContact(email, updateContact) + +Updates a contact + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ContactsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ContactsApi apiInstance = new ContactsApi(); +String email = "email_example"; // String | Email (urlencoded) of the contact +UpdateContact updateContact = new UpdateContact(); // UpdateContact | Values to update a contact +try { + apiInstance.updateContact(email, updateContact); +} catch (ApiException e) { + System.err.println("Exception when calling ContactsApi#updateContact"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **String**| Email (urlencoded) of the contact | + **updateContact** | [**UpdateContact**](UpdateContact.md)| Values to update a contact | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **updateFolder** +> updateFolder(folderId, updateFolder) + +Update a contact folder + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ContactsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ContactsApi apiInstance = new ContactsApi(); +Long folderId = 789L; // Long | Id of the folder +CreateUpdateFolder updateFolder = new CreateUpdateFolder(); // CreateUpdateFolder | Name of the folder +try { + apiInstance.updateFolder(folderId, updateFolder); +} catch (ApiException e) { + System.err.println("Exception when calling ContactsApi#updateFolder"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **folderId** | **Long**| Id of the folder | + **updateFolder** | [**CreateUpdateFolder**](CreateUpdateFolder.md)| Name of the folder | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **updateList** +> updateList(listId, updateList) + +Update a list + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ContactsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ContactsApi apiInstance = new ContactsApi(); +Long listId = 789L; // Long | Id of the list +UpdateList updateList = new UpdateList(); // UpdateList | Values to update a list +try { + apiInstance.updateList(listId, updateList); +} catch (ApiException e) { + System.err.println("Exception when calling ContactsApi#updateList"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **Long**| Id of the list | + **updateList** | [**UpdateList**](UpdateList.md)| Values to update a list | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + diff --git a/docs/CreateAttribute.md b/docs/CreateAttribute.md new file mode 100644 index 0000000..3e7ed17 --- /dev/null +++ b/docs/CreateAttribute.md @@ -0,0 +1,23 @@ + +# CreateAttribute + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **String** | Value of the attribute. Use only if the attribute's category is calculated or global | [optional] +**enumeration** | [**List<CreateAttributeEnumeration>**](CreateAttributeEnumeration.md) | Values that the attribute can take. Use only if the attribute's category is category | [optional] +**type** | [**TypeEnum**](#TypeEnum) | Type of the attribute. Use only if the attribute's category is normal, category or transactional ( type 'id' only available if the category is 'transactional' attribute & type 'category' only available if the category is 'category' attribute ) | [optional] + + + +## Enum: TypeEnum +Name | Value +---- | ----- +TEXT | "text" +DATE | "date" +FLOAT | "float" +ID | "id" +CATEGORY | "category" + + + diff --git a/docs/CreateAttributeEnumeration.md b/docs/CreateAttributeEnumeration.md new file mode 100644 index 0000000..ab3b77e --- /dev/null +++ b/docs/CreateAttributeEnumeration.md @@ -0,0 +1,11 @@ + +# CreateAttributeEnumeration + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **Integer** | Id of the value | +**label** | **String** | Label of the value | + + + diff --git a/docs/CreateChild.md b/docs/CreateChild.md new file mode 100644 index 0000000..1c5778e --- /dev/null +++ b/docs/CreateChild.md @@ -0,0 +1,14 @@ + +# CreateChild + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | Email address to create the child account | +**firstName** | **String** | First name to use to create the child account | +**lastName** | **String** | Last name to use to create the child account | +**companyName** | **String** | Company name to use to create the child account | +**password** | **String** | Password for the child account to login | + + + diff --git a/docs/CreateContact.md b/docs/CreateContact.md new file mode 100644 index 0000000..3527a99 --- /dev/null +++ b/docs/CreateContact.md @@ -0,0 +1,16 @@ + +# CreateContact + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | Email address of the user. Mandatory if `attributes.sms` is not passed | [optional] +**attributes** | **Object** | Values of the attributes to fill. The attributes must exist in you contact database | [optional] +**emailBlacklisted** | **Boolean** | Blacklist the contact for emails (emailBlacklisted = true) | [optional] +**smsBlacklisted** | **Boolean** | Blacklist the contact for SMS (smsBlacklisted = true) | [optional] +**listIds** | **List<Long>** | Ids of the lists to add the contact to | [optional] +**updateEnabled** | **Boolean** | Facilitate to update existing contact in same request (updateEnabled = true) | [optional] +**smtpBlacklistSender** | **List<String>** | SMTP forbidden sender for contact. Use only for email Contact ( only available if updateEnabled = true ) | [optional] + + + diff --git a/docs/CreateEmailCampaign.md b/docs/CreateEmailCampaign.md new file mode 100644 index 0000000..5ed5c99 --- /dev/null +++ b/docs/CreateEmailCampaign.md @@ -0,0 +1,35 @@ + +# CreateEmailCampaign + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tag** | **String** | Tag of the campaign | [optional] +**sender** | [**CreateEmailCampaignSender**](CreateEmailCampaignSender.md) | | +**name** | **String** | Name of the campaign | +**htmlContent** | **String** | Mandatory if htmlUrl is empty. Body of the message (HTML) | [optional] +**htmlUrl** | **String** | Mandatory if htmlContent is empty. Url to the message (HTML) | [optional] +**scheduledAt** | [**OffsetDateTime**](OffsetDateTime.md) | Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. | [optional] +**subject** | **String** | Subject of the campaign | +**replyTo** | **String** | Email on which the campaign recipients will be able to reply to | [optional] +**toField** | **String** | To personalize the «To» Field, e.g. if you want to include the first name and last name of your recipient, use {FNAME} {LNAME}. These attributes must already exist in your contact database | [optional] +**recipients** | [**CreateEmailCampaignRecipients**](CreateEmailCampaignRecipients.md) | | [optional] +**attachmentUrl** | **String** | Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps | [optional] +**inlineImageActivation** | **Boolean** | Use true to embedded the images in your email. Final size of the email should be less than 4MB. Campaigns with embedded images can not be sent to more than 5000 contacts | [optional] +**mirrorActive** | **Boolean** | Use true to enable the mirror link | [optional] +**recurring** | **Boolean** | For trigger campagins use false to make sure a contact receives the same campaign only once | [optional] +**type** | [**TypeEnum**](#TypeEnum) | Type of the campaign | +**footer** | **String** | Footer of the email campaign | [optional] +**header** | **String** | Header of the email campaign | [optional] +**utmCampaign** | **String** | Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed | [optional] + + + +## Enum: TypeEnum +Name | Value +---- | ----- +CLASSIC | "classic" +TRIGGER | "trigger" + + + diff --git a/docs/CreateEmailCampaignRecipients.md b/docs/CreateEmailCampaignRecipients.md new file mode 100644 index 0000000..2fd8332 --- /dev/null +++ b/docs/CreateEmailCampaignRecipients.md @@ -0,0 +1,11 @@ + +# CreateEmailCampaignRecipients + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**exclusionListIds** | **List<Long>** | List ids to exclude from the campaign | [optional] +**listIds** | **List<Long>** | Mandatory if scheduledAt is not empty. List Ids to send the campaign to | [optional] + + + diff --git a/docs/CreateEmailCampaignSender.md b/docs/CreateEmailCampaignSender.md new file mode 100644 index 0000000..a432bba --- /dev/null +++ b/docs/CreateEmailCampaignSender.md @@ -0,0 +1,11 @@ + +# CreateEmailCampaignSender + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Sender Name | [optional] +**email** | **String** | Sender email | + + + diff --git a/docs/CreateList.md b/docs/CreateList.md new file mode 100644 index 0000000..ac39976 --- /dev/null +++ b/docs/CreateList.md @@ -0,0 +1,11 @@ + +# CreateList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Name of the list | +**folderId** | **Long** | Id of the folder in which to create the list | + + + diff --git a/docs/CreateModel.md b/docs/CreateModel.md new file mode 100644 index 0000000..808b7aa --- /dev/null +++ b/docs/CreateModel.md @@ -0,0 +1,10 @@ + +# CreateModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Long** | ID of the object created | + + + diff --git a/docs/CreateReseller.md b/docs/CreateReseller.md new file mode 100644 index 0000000..5aafba3 --- /dev/null +++ b/docs/CreateReseller.md @@ -0,0 +1,10 @@ + +# CreateReseller + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**authKey** | **String** | AuthKey of Reseller child created | + + + diff --git a/docs/CreateSender.md b/docs/CreateSender.md new file mode 100644 index 0000000..5f6f208 --- /dev/null +++ b/docs/CreateSender.md @@ -0,0 +1,12 @@ + +# CreateSender + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | From Name to use for the sender | +**email** | **String** | From Email to use for the sender | +**ips** | [**List<CreateSenderIps>**](CreateSenderIps.md) | Mandatory in case of dedicated IP, IPs to associate to the sender | [optional] + + + diff --git a/docs/CreateSenderIps.md b/docs/CreateSenderIps.md new file mode 100644 index 0000000..82c7d67 --- /dev/null +++ b/docs/CreateSenderIps.md @@ -0,0 +1,12 @@ + +# CreateSenderIps + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ip** | **String** | Dedicated IP available in your account | +**domain** | **String** | Domain of the IP | +**weight** | **Long** | Weight to apply to the IP. Sum of all IP weights must be 100. Should be passed for either ALL or NONE of the IPs. If it's not passed, the sending will be equally balanced on all IPs. | [optional] + + + diff --git a/docs/CreateSenderModel.md b/docs/CreateSenderModel.md new file mode 100644 index 0000000..f6a0a52 --- /dev/null +++ b/docs/CreateSenderModel.md @@ -0,0 +1,12 @@ + +# CreateSenderModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Long** | ID of the Sender created | +**spfError** | **Boolean** | Status of SPF configuration for the sender (true = SPF not well configured, false = SPF well configured) | [optional] +**dkimError** | **Boolean** | Status of DKIM configuration for the sender (true = DKIM not well configured, false = DKIM well configured) | [optional] + + + diff --git a/docs/CreateSmsCampaign.md b/docs/CreateSmsCampaign.md new file mode 100644 index 0000000..afd5dd9 --- /dev/null +++ b/docs/CreateSmsCampaign.md @@ -0,0 +1,14 @@ + +# CreateSmsCampaign + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Name of the campaign | +**sender** | **String** | Name of the sender. The number of characters is limited to 11 | +**content** | **String** | Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS | [optional] +**recipients** | [**CreateSmsCampaignRecipients**](CreateSmsCampaignRecipients.md) | | [optional] +**scheduledAt** | [**OffsetDateTime**](OffsetDateTime.md) | UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. | [optional] + + + diff --git a/docs/CreateSmsCampaignRecipients.md b/docs/CreateSmsCampaignRecipients.md new file mode 100644 index 0000000..5eae231 --- /dev/null +++ b/docs/CreateSmsCampaignRecipients.md @@ -0,0 +1,11 @@ + +# CreateSmsCampaignRecipients + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**listIds** | **List<Long>** | Lists Ids to send the campaign to. REQUIRED if scheduledAt is not empty | +**exclusionListIds** | **List<Long>** | List ids which have to be excluded from a campaign | + + + diff --git a/docs/CreateSmtpEmail.md b/docs/CreateSmtpEmail.md new file mode 100644 index 0000000..094c93c --- /dev/null +++ b/docs/CreateSmtpEmail.md @@ -0,0 +1,10 @@ + +# CreateSmtpEmail + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**messageId** | **String** | Message ID of the SMTP Email sent | + + + diff --git a/docs/CreateSmtpTemplate.md b/docs/CreateSmtpTemplate.md new file mode 100644 index 0000000..0c66462 --- /dev/null +++ b/docs/CreateSmtpTemplate.md @@ -0,0 +1,19 @@ + +# CreateSmtpTemplate + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tag** | **String** | Tag of the template | [optional] +**sender** | [**CreateSmtpTemplateSender**](CreateSmtpTemplateSender.md) | | +**templateName** | **String** | Name of the template | +**htmlContent** | **String** | Body of the message (HTML version). The field must have more than 10 characters. REQUIRED if htmlUrl is empty | [optional] +**htmlUrl** | **String** | Url which contents the body of the email message. REQUIRED if htmlContent is empty | [optional] +**subject** | **String** | Subject of the template | +**replyTo** | **String** | Email on which campaign recipients will be able to reply to | [optional] +**toField** | **String** | This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. To use the contact attributes here, these must already exist in SendinBlue account | [optional] +**attachmentUrl** | **String** | Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps | [optional] +**isActive** | **Boolean** | Status of template. isActive = true means template is active and isActive = false means template is inactive | [optional] + + + diff --git a/docs/CreateSmtpTemplateSender.md b/docs/CreateSmtpTemplateSender.md new file mode 100644 index 0000000..4f987ad --- /dev/null +++ b/docs/CreateSmtpTemplateSender.md @@ -0,0 +1,11 @@ + +# CreateSmtpTemplateSender + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Name of the sender. If not passed, will be set to default | [optional] +**email** | **String** | Email of the sender | + + + diff --git a/docs/CreateUpdateFolder.md b/docs/CreateUpdateFolder.md new file mode 100644 index 0000000..1152cc0 --- /dev/null +++ b/docs/CreateUpdateFolder.md @@ -0,0 +1,10 @@ + +# CreateUpdateFolder + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Name of the folder | [optional] + + + diff --git a/docs/CreateWebhook.md b/docs/CreateWebhook.md new file mode 100644 index 0000000..763721b --- /dev/null +++ b/docs/CreateWebhook.md @@ -0,0 +1,40 @@ + +# CreateWebhook + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **String** | URL of the webhook | +**description** | **String** | Description of the webhook | [optional] +**events** | [**List<EventsEnum>**](#List<EventsEnum>) | Events triggering the webhook. Possible values for Transactional type webhook – request, delivered, hardBounce, softBounce, blocked, spam, invalid, deferred, click, opened, uniqueOpened and unsubscribed and possible values for Marketing type webhook – spam, opened, click, hardBounce, softBounce, unsubscribed, listAddition & delivered | [optional] +**type** | [**TypeEnum**](#TypeEnum) | Type of the webhook | [optional] + + + +## Enum: List<EventsEnum> +Name | Value +---- | ----- +HARDBOUNCE | "hardBounce" +SOFTBOUNCE | "softBounce" +BLOCKED | "blocked" +SPAM | "spam" +DELIVERED | "delivered" +REQUEST | "request" +CLICK | "click" +INVALID | "invalid" +DEFERRED | "deferred" +OPENED | "opened" +UNIQUEOPENED | "uniqueOpened" +UNSUBSCRIBED | "unsubscribed" +LISTADDITION | "listAddition" + + + +## Enum: TypeEnum +Name | Value +---- | ----- +TRANSACTIONAL | "transactional" +MARKETING | "marketing" + + + diff --git a/docs/CreatedProcessId.md b/docs/CreatedProcessId.md new file mode 100644 index 0000000..75c694e --- /dev/null +++ b/docs/CreatedProcessId.md @@ -0,0 +1,10 @@ + +# CreatedProcessId + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**processId** | **Long** | Id of the process created | + + + diff --git a/docs/DeleteHardbounces.md b/docs/DeleteHardbounces.md new file mode 100644 index 0000000..4722917 --- /dev/null +++ b/docs/DeleteHardbounces.md @@ -0,0 +1,12 @@ + +# DeleteHardbounces + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**startDate** | **LocalDate** | Starting date (YYYY-MM-DD) of the period from which the hardbounces will be deleted. Must be lower than equal to endDate | [optional] +**endDate** | **LocalDate** | Ending date (YYYY-MM-DD) of the period from which the hardbounces will be deleted. Must be greater than equal to startDate | [optional] +**contactEmail** | **String** | Target a specific email address | [optional] + + + diff --git a/docs/EmailCampaignsApi.md b/docs/EmailCampaignsApi.md new file mode 100644 index 0000000..62d2fd0 --- /dev/null +++ b/docs/EmailCampaignsApi.md @@ -0,0 +1,560 @@ +# EmailCampaignsApi + +All URIs are relative to *https://api.sendinblue.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createEmailCampaign**](EmailCampaignsApi.md#createEmailCampaign) | **POST** /emailCampaigns | Create an email campaign +[**deleteEmailCampaign**](EmailCampaignsApi.md#deleteEmailCampaign) | **DELETE** /emailCampaigns/{campaignId} | Delete an email campaign +[**emailExportRecipients**](EmailCampaignsApi.md#emailExportRecipients) | **POST** /emailCampaigns/{campaignId}/exportRecipients | Export the recipients of a campaign +[**getEmailCampaign**](EmailCampaignsApi.md#getEmailCampaign) | **GET** /emailCampaigns/{campaignId} | Get campaign informations +[**getEmailCampaigns**](EmailCampaignsApi.md#getEmailCampaigns) | **GET** /emailCampaigns | Return all your created campaigns +[**sendEmailCampaignNow**](EmailCampaignsApi.md#sendEmailCampaignNow) | **POST** /emailCampaigns/{campaignId}/sendNow | Send an email campaign id of the campaign immediately +[**sendReport**](EmailCampaignsApi.md#sendReport) | **POST** /emailCampaigns/{campaignId}/sendReport | Send the report of a campaigns +[**sendTestEmail**](EmailCampaignsApi.md#sendTestEmail) | **POST** /emailCampaigns/{campaignId}/sendTest | Send an email campaign to your test list +[**updateCampaignStatus**](EmailCampaignsApi.md#updateCampaignStatus) | **PUT** /emailCampaigns/{campaignId}/status | Update a campaign status +[**updateEmailCampaign**](EmailCampaignsApi.md#updateEmailCampaign) | **PUT** /emailCampaigns/{campaignId} | Update a campaign + + + +# **createEmailCampaign** +> CreateModel createEmailCampaign(emailCampaigns) + +Create an email campaign + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.EmailCampaignsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +EmailCampaignsApi apiInstance = new EmailCampaignsApi(); +CreateEmailCampaign emailCampaigns = new CreateEmailCampaign(); // CreateEmailCampaign | Values to create a campaign +try { + CreateModel result = apiInstance.createEmailCampaign(emailCampaigns); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling EmailCampaignsApi#createEmailCampaign"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **emailCampaigns** | [**CreateEmailCampaign**](CreateEmailCampaign.md)| Values to create a campaign | + +### Return type + +[**CreateModel**](CreateModel.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **deleteEmailCampaign** +> deleteEmailCampaign(campaignId) + +Delete an email campaign + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.EmailCampaignsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +EmailCampaignsApi apiInstance = new EmailCampaignsApi(); +Long campaignId = 789L; // Long | id of the campaign +try { + apiInstance.deleteEmailCampaign(campaignId); +} catch (ApiException e) { + System.err.println("Exception when calling EmailCampaignsApi#deleteEmailCampaign"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **Long**| id of the campaign | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **emailExportRecipients** +> CreatedProcessId emailExportRecipients(campaignId, recipientExport) + +Export the recipients of a campaign + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.EmailCampaignsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +EmailCampaignsApi apiInstance = new EmailCampaignsApi(); +Long campaignId = 789L; // Long | Id of the campaign +EmailExportRecipients recipientExport = new EmailExportRecipients(); // EmailExportRecipients | Values to send for a recipient export request +try { + CreatedProcessId result = apiInstance.emailExportRecipients(campaignId, recipientExport); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling EmailCampaignsApi#emailExportRecipients"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **Long**| Id of the campaign | + **recipientExport** | [**EmailExportRecipients**](EmailExportRecipients.md)| Values to send for a recipient export request | [optional] + +### Return type + +[**CreatedProcessId**](CreatedProcessId.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getEmailCampaign** +> GetEmailCampaign getEmailCampaign(campaignId) + +Get campaign informations + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.EmailCampaignsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +EmailCampaignsApi apiInstance = new EmailCampaignsApi(); +Long campaignId = 789L; // Long | Id of the campaign +try { + GetEmailCampaign result = apiInstance.getEmailCampaign(campaignId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling EmailCampaignsApi#getEmailCampaign"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **Long**| Id of the campaign | + +### Return type + +[**GetEmailCampaign**](GetEmailCampaign.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getEmailCampaigns** +> GetEmailCampaigns getEmailCampaigns(type, status, limit, offset) + +Return all your created campaigns + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.EmailCampaignsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +EmailCampaignsApi apiInstance = new EmailCampaignsApi(); +String type = "type_example"; // String | Filter on the type of the campaigns +String status = "status_example"; // String | Filter on the status of the campaign +Long limit = 500L; // Long | Number of documents per page +Long offset = 0L; // Long | Index of the first document in the page +try { + GetEmailCampaigns result = apiInstance.getEmailCampaigns(type, status, limit, offset); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling EmailCampaignsApi#getEmailCampaigns"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **type** | **String**| Filter on the type of the campaigns | [optional] [enum: classic, trigger] + **status** | **String**| Filter on the status of the campaign | [optional] [enum: suspended, archive, sent, queued, draft, inProcess] + **limit** | **Long**| Number of documents per page | [optional] [default to 500] + **offset** | **Long**| Index of the first document in the page | [optional] [default to 0] + +### Return type + +[**GetEmailCampaigns**](GetEmailCampaigns.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **sendEmailCampaignNow** +> sendEmailCampaignNow(campaignId) + +Send an email campaign id of the campaign immediately + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.EmailCampaignsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +EmailCampaignsApi apiInstance = new EmailCampaignsApi(); +Long campaignId = 789L; // Long | Id of the campaign +try { + apiInstance.sendEmailCampaignNow(campaignId); +} catch (ApiException e) { + System.err.println("Exception when calling EmailCampaignsApi#sendEmailCampaignNow"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **Long**| Id of the campaign | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **sendReport** +> sendReport(campaignId, sendReport) + +Send the report of a campaigns + +A PDF will be sent to the specified email addresses + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.EmailCampaignsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +EmailCampaignsApi apiInstance = new EmailCampaignsApi(); +Long campaignId = 789L; // Long | Id of the campaign +SendReport sendReport = new SendReport(); // SendReport | Values for send a report +try { + apiInstance.sendReport(campaignId, sendReport); +} catch (ApiException e) { + System.err.println("Exception when calling EmailCampaignsApi#sendReport"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **Long**| Id of the campaign | + **sendReport** | [**SendReport**](SendReport.md)| Values for send a report | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **sendTestEmail** +> sendTestEmail(campaignId, emailTo) + +Send an email campaign to your test list + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.EmailCampaignsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +EmailCampaignsApi apiInstance = new EmailCampaignsApi(); +Long campaignId = 789L; // Long | Id of the campaign +SendTestEmail emailTo = new SendTestEmail(); // SendTestEmail | +try { + apiInstance.sendTestEmail(campaignId, emailTo); +} catch (ApiException e) { + System.err.println("Exception when calling EmailCampaignsApi#sendTestEmail"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **Long**| Id of the campaign | + **emailTo** | [**SendTestEmail**](SendTestEmail.md)| | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **updateCampaignStatus** +> updateCampaignStatus(campaignId, status) + +Update a campaign status + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.EmailCampaignsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +EmailCampaignsApi apiInstance = new EmailCampaignsApi(); +Long campaignId = 789L; // Long | Id of the campaign +UpdateCampaignStatus status = new UpdateCampaignStatus(); // UpdateCampaignStatus | Status of the campaign +try { + apiInstance.updateCampaignStatus(campaignId, status); +} catch (ApiException e) { + System.err.println("Exception when calling EmailCampaignsApi#updateCampaignStatus"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **Long**| Id of the campaign | + **status** | [**UpdateCampaignStatus**](UpdateCampaignStatus.md)| Status of the campaign | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **updateEmailCampaign** +> updateEmailCampaign(campaignId, emailCampaign) + +Update a campaign + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.EmailCampaignsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +EmailCampaignsApi apiInstance = new EmailCampaignsApi(); +Long campaignId = 789L; // Long | Id of the campaign +UpdateEmailCampaign emailCampaign = new UpdateEmailCampaign(); // UpdateEmailCampaign | Values to update a campaign +try { + apiInstance.updateEmailCampaign(campaignId, emailCampaign); +} catch (ApiException e) { + System.err.println("Exception when calling EmailCampaignsApi#updateEmailCampaign"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **Long**| Id of the campaign | + **emailCampaign** | [**UpdateEmailCampaign**](UpdateEmailCampaign.md)| Values to update a campaign | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + diff --git a/docs/EmailExportRecipients.md b/docs/EmailExportRecipients.md new file mode 100644 index 0000000..58e1047 --- /dev/null +++ b/docs/EmailExportRecipients.md @@ -0,0 +1,25 @@ + +# EmailExportRecipients + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**notifyURL** | **String** | Webhook called once the export process is finished | [optional] +**recipientsType** | [**RecipientsTypeEnum**](#RecipientsTypeEnum) | Type of recipients to export for a campaign | + + + +## Enum: RecipientsTypeEnum +Name | Value +---- | ----- +ALL | "all" +NONCLICKERS | "nonClickers" +NONOPENERS | "nonOpeners" +CLICKERS | "clickers" +OPENERS | "openers" +SOFTBOUNCES | "softBounces" +HARDBOUNCES | "hardBounces" +UNSUBSCRIBED | "unsubscribed" + + + diff --git a/docs/ErrorModel.md b/docs/ErrorModel.md new file mode 100644 index 0000000..b317434 --- /dev/null +++ b/docs/ErrorModel.md @@ -0,0 +1,32 @@ + +# ErrorModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | [**CodeEnum**](#CodeEnum) | Error code displayed in case of a failure | +**message** | **String** | Readable message associated to the failure | + + + +## Enum: CodeEnum +Name | Value +---- | ----- +INVALID_PARAMETER | "invalid_parameter" +MISSING_PARAMETER | "missing_parameter" +OUT_OF_RANGE | "out_of_range" +CAMPAIGN_PROCESSING | "campaign_processing" +CAMPAIGN_SENT | "campaign_sent" +DOCUMENT_NOT_FOUND | "document_not_found" +RESELLER_PERMISSION_DENIED | "reseller_permission_denied" +NOT_ENOUGH_CREDITS | "not_enough_credits" +PERMISSION_DENIED | "permission_denied" +DUPLICATE_PARAMETER | "duplicate_parameter" +DUPLICATE_REQUEST | "duplicate_request" +METHOD_NOT_ALLOWED | "method_not_allowed" +UNAUTHORIZED | "unauthorized" +ACCOUNT_UNDER_VALIDATION | "account_under_validation" +NOT_ACCEPTABLE | "not_acceptable" + + + diff --git a/docs/FoldersApi.md b/docs/FoldersApi.md new file mode 100644 index 0000000..4659744 --- /dev/null +++ b/docs/FoldersApi.md @@ -0,0 +1,338 @@ +# FoldersApi + +All URIs are relative to *https://api.sendinblue.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createFolder**](FoldersApi.md#createFolder) | **POST** /contacts/folders | Create a folder +[**deleteFolder**](FoldersApi.md#deleteFolder) | **DELETE** /contacts/folders/{folderId} | Delete a folder (and all its lists) +[**getFolder**](FoldersApi.md#getFolder) | **GET** /contacts/folders/{folderId} | Returns folder details +[**getFolderLists**](FoldersApi.md#getFolderLists) | **GET** /contacts/folders/{folderId}/lists | Get the lists in a folder +[**getFolders**](FoldersApi.md#getFolders) | **GET** /contacts/folders | Get all the folders +[**updateFolder**](FoldersApi.md#updateFolder) | **PUT** /contacts/folders/{folderId} | Update a contact folder + + + +# **createFolder** +> CreateModel createFolder(createFolder) + +Create a folder + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.FoldersApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +FoldersApi apiInstance = new FoldersApi(); +CreateUpdateFolder createFolder = new CreateUpdateFolder(); // CreateUpdateFolder | Name of the folder +try { + CreateModel result = apiInstance.createFolder(createFolder); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling FoldersApi#createFolder"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createFolder** | [**CreateUpdateFolder**](CreateUpdateFolder.md)| Name of the folder | + +### Return type + +[**CreateModel**](CreateModel.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **deleteFolder** +> deleteFolder(folderId) + +Delete a folder (and all its lists) + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.FoldersApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +FoldersApi apiInstance = new FoldersApi(); +Long folderId = 789L; // Long | Id of the folder +try { + apiInstance.deleteFolder(folderId); +} catch (ApiException e) { + System.err.println("Exception when calling FoldersApi#deleteFolder"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **folderId** | **Long**| Id of the folder | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getFolder** +> GetFolder getFolder(folderId) + +Returns folder details + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.FoldersApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +FoldersApi apiInstance = new FoldersApi(); +Long folderId = 789L; // Long | id of the folder +try { + GetFolder result = apiInstance.getFolder(folderId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling FoldersApi#getFolder"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **folderId** | **Long**| id of the folder | + +### Return type + +[**GetFolder**](GetFolder.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getFolderLists** +> GetFolderLists getFolderLists(folderId, limit, offset) + +Get the lists in a folder + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.FoldersApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +FoldersApi apiInstance = new FoldersApi(); +Long folderId = 789L; // Long | Id of the folder +Long limit = 10L; // Long | Number of documents per page +Long offset = 0L; // Long | Index of the first document of the page +try { + GetFolderLists result = apiInstance.getFolderLists(folderId, limit, offset); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling FoldersApi#getFolderLists"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **folderId** | **Long**| Id of the folder | + **limit** | **Long**| Number of documents per page | [optional] [default to 10] + **offset** | **Long**| Index of the first document of the page | [optional] [default to 0] + +### Return type + +[**GetFolderLists**](GetFolderLists.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getFolders** +> GetFolders getFolders(limit, offset) + +Get all the folders + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.FoldersApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +FoldersApi apiInstance = new FoldersApi(); +Long limit = 10L; // Long | Number of documents per page +Long offset = 0L; // Long | Index of the first document of the page +try { + GetFolders result = apiInstance.getFolders(limit, offset); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling FoldersApi#getFolders"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **Long**| Number of documents per page | [default to 10] + **offset** | **Long**| Index of the first document of the page | [default to 0] + +### Return type + +[**GetFolders**](GetFolders.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **updateFolder** +> updateFolder(folderId, updateFolder) + +Update a contact folder + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.FoldersApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +FoldersApi apiInstance = new FoldersApi(); +Long folderId = 789L; // Long | Id of the folder +CreateUpdateFolder updateFolder = new CreateUpdateFolder(); // CreateUpdateFolder | Name of the folder +try { + apiInstance.updateFolder(folderId, updateFolder); +} catch (ApiException e) { + System.err.println("Exception when calling FoldersApi#updateFolder"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **folderId** | **Long**| Id of the folder | + **updateFolder** | [**CreateUpdateFolder**](CreateUpdateFolder.md)| Name of the folder | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + diff --git a/docs/GetAccount.md b/docs/GetAccount.md new file mode 100644 index 0000000..eb56bf4 --- /dev/null +++ b/docs/GetAccount.md @@ -0,0 +1,17 @@ + +# GetAccount + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | Login Email | +**firstName** | **String** | First Name | +**lastName** | **String** | Last Name | +**companyName** | **String** | Name of the company | +**address** | [**GetExtendedClientAddress**](GetExtendedClientAddress.md) | | +**plan** | [**List<GetAccountPlan>**](GetAccountPlan.md) | Information about your plans and credits | +**relay** | [**GetAccountRelay**](GetAccountRelay.md) | | +**marketingAutomation** | [**GetAccountMarketingAutomation**](GetAccountMarketingAutomation.md) | | [optional] + + + diff --git a/docs/GetAccountMarketingAutomation.md b/docs/GetAccountMarketingAutomation.md new file mode 100644 index 0000000..0cbec9d --- /dev/null +++ b/docs/GetAccountMarketingAutomation.md @@ -0,0 +1,11 @@ + +# GetAccountMarketingAutomation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key** | **String** | Marketing Automation Tracker ID | [optional] +**enabled** | **Boolean** | Status of Marketing Automation Plateform activation for your account (true=enabled, false=disabled) | + + + diff --git a/docs/GetAccountPlan.md b/docs/GetAccountPlan.md new file mode 100644 index 0000000..fbc16ee --- /dev/null +++ b/docs/GetAccountPlan.md @@ -0,0 +1,34 @@ + +# GetAccountPlan + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**TypeEnum**](#TypeEnum) | Displays the plan type of the user | +**creditsType** | [**CreditsTypeEnum**](#CreditsTypeEnum) | This is the type of the credit, \"User Limit\" or \"Send Limit\" are two possible types of credit of a user. \"User Limit\" implies the total number of subscribers you can add to your account, and \"Send Limit\" implies the total number of emails you can send to the subscribers in your account. | +**credits** | **Float** | Remaining credits of the user. This can either be \"User Limit\" or \"Send Limit\" depending on the plan. | +**startDate** | **LocalDate** | Date of the period from which the plan will start (only available for \"subscription\", \"unlimited\" and \"reseller\" plan type) | [optional] +**endDate** | **LocalDate** | Date of the period from which the plan will end (only available for \"subscription\", \"unlimited\" and \"reseller\" plan type) | [optional] + + + +## Enum: TypeEnum +Name | Value +---- | ----- +PAYASYOUGO | "payAsYouGo" +UNLIMITED | "unlimited" +FREE | "free" +SUBSCRIPTION | "subscription" +SMS | "sms" +RESELLER | "reseller" + + + +## Enum: CreditsTypeEnum +Name | Value +---- | ----- +USERLIMIT | "userLimit" +SENDLIMIT | "sendLimit" + + + diff --git a/docs/GetAccountRelay.md b/docs/GetAccountRelay.md new file mode 100644 index 0000000..af0d040 --- /dev/null +++ b/docs/GetAccountRelay.md @@ -0,0 +1,11 @@ + +# GetAccountRelay + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **Boolean** | Status of your SMTP Account (true=Enabled, false=Disabled) | +**data** | [**GetAccountRelayData**](GetAccountRelayData.md) | | + + + diff --git a/docs/GetAccountRelayData.md b/docs/GetAccountRelayData.md new file mode 100644 index 0000000..8a7b406 --- /dev/null +++ b/docs/GetAccountRelayData.md @@ -0,0 +1,12 @@ + +# GetAccountRelayData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**userName** | **String** | Email to use as login on SMTP | +**relay** | **String** | URL of the SMTP Relay | +**port** | **Integer** | Port used for SMTP Relay | + + + diff --git a/docs/GetAggregatedReport.md b/docs/GetAggregatedReport.md new file mode 100644 index 0000000..04268f8 --- /dev/null +++ b/docs/GetAggregatedReport.md @@ -0,0 +1,21 @@ + +# GetAggregatedReport + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**range** | **String** | Time frame of the report | +**requests** | **Long** | Number of requests for the timeframe | +**delivered** | **Long** | Number of delivered emails for the timeframe | +**hardBounces** | **Long** | Number of hardbounces for the timeframe | +**softBounces** | **Long** | Number of softbounces for the timeframe | +**clicks** | **Long** | Number of clicks for the timeframe | +**uniqueClicks** | **Long** | Number of unique clicks for the timeframe | +**opens** | **Long** | Number of openings for the timeframe | +**uniqueOpens** | **Long** | Number of unique openings for the timeframe | +**spamReports** | **Long** | Number of complaint (spam report) for the timeframe | +**blocked** | **Long** | Number of blocked contact emails for the timeframe | +**invalid** | **Long** | Number of invalid emails for the timeframe | + + + diff --git a/docs/GetAttributes.md b/docs/GetAttributes.md new file mode 100644 index 0000000..512adf9 --- /dev/null +++ b/docs/GetAttributes.md @@ -0,0 +1,10 @@ + +# GetAttributes + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attributes** | [**List<GetAttributesAttributes>**](GetAttributesAttributes.md) | Listing of available contact attributes in your account | + + + diff --git a/docs/GetAttributesAttributes.md b/docs/GetAttributesAttributes.md new file mode 100644 index 0000000..e5fb3d8 --- /dev/null +++ b/docs/GetAttributesAttributes.md @@ -0,0 +1,35 @@ + +# GetAttributesAttributes + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Name of the attribute | +**category** | [**CategoryEnum**](#CategoryEnum) | Category of the attribute | +**type** | [**TypeEnum**](#TypeEnum) | Type of the attribute | [optional] +**enumeration** | [**List<GetAttributesEnumeration>**](GetAttributesEnumeration.md) | Parameter only available for \"category\" type attributes. | [optional] +**calculatedValue** | **String** | Calculated value formula | [optional] + + + +## Enum: CategoryEnum +Name | Value +---- | ----- +NORMAL | "normal" +TRANSACTIONAL | "transactional" +CATEGORY | "category" +CALCULATED | "calculated" +GLOBAL | "global" + + + +## Enum: TypeEnum +Name | Value +---- | ----- +TEXT | "text" +DATE | "date" +FLOAT | "float" +ID | "id" + + + diff --git a/docs/GetAttributesEnumeration.md b/docs/GetAttributesEnumeration.md new file mode 100644 index 0000000..6eb6dac --- /dev/null +++ b/docs/GetAttributesEnumeration.md @@ -0,0 +1,11 @@ + +# GetAttributesEnumeration + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **Long** | ID of Value of the \"category\" type attribute | +**label** | **String** | Label of the \"category\" type attribute | + + + diff --git a/docs/GetCampaignOverview.md b/docs/GetCampaignOverview.md new file mode 100644 index 0000000..99545de --- /dev/null +++ b/docs/GetCampaignOverview.md @@ -0,0 +1,35 @@ + +# GetCampaignOverview + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Long** | ID of the campaign | +**name** | **String** | Name of the campaign | +**subject** | **String** | Subject of the campaign | +**type** | [**TypeEnum**](#TypeEnum) | Type of campaign | +**status** | [**StatusEnum**](#StatusEnum) | Status of the campaign | +**scheduledAt** | [**OffsetDateTime**](OffsetDateTime.md) | UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) | [optional] + + + +## Enum: TypeEnum +Name | Value +---- | ----- +CLASSIC | "classic" +TRIGGER | "trigger" + + + +## Enum: StatusEnum +Name | Value +---- | ----- +DRAFT | "draft" +SENT | "sent" +ARCHIVE | "archive" +QUEUED | "queued" +SUSPENDED | "suspended" +IN_PROCESS | "in_process" + + + diff --git a/docs/GetCampaignRecipients.md b/docs/GetCampaignRecipients.md new file mode 100644 index 0000000..76d7f6d --- /dev/null +++ b/docs/GetCampaignRecipients.md @@ -0,0 +1,11 @@ + +# GetCampaignRecipients + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**lists** | **List<Long>** | | +**exclusionLists** | **List<Long>** | | + + + diff --git a/docs/GetCampaignStats.md b/docs/GetCampaignStats.md new file mode 100644 index 0000000..b4ec6a4 --- /dev/null +++ b/docs/GetCampaignStats.md @@ -0,0 +1,21 @@ + +# GetCampaignStats + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**listId** | **Long** | List Id of email campaign (only in case of get email campaign(s)) | [optional] +**uniqueClicks** | **Long** | Number of unique clicks for the campaign | +**clickers** | **Long** | Number of clicks for the campaign | +**complaints** | **Long** | Number of complaints (Spam reports) for the campaign | +**delivered** | **Long** | Number of delivered emails for the campaign | +**sent** | **Long** | Number of sent emails for the campaign | +**softBounces** | **Long** | Number of softbounce for the campaign | +**hardBounces** | **Long** | Number of harbounce for the campaign | +**uniqueViews** | **Long** | Number of unique openings for the campaign | +**unsubscriptions** | **Long** | Number of unsubscription for the campaign | +**viewed** | **Long** | Number of openings for the campaign | +**deferred** | **Long** | Number of deferred emails for the campaign | + + + diff --git a/docs/GetChildInfo.md b/docs/GetChildInfo.md new file mode 100644 index 0000000..566baf9 --- /dev/null +++ b/docs/GetChildInfo.md @@ -0,0 +1,18 @@ + +# GetChildInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | Login Email | +**firstName** | **String** | First Name | +**lastName** | **String** | Last Name | +**companyName** | **String** | Name of the company | +**credits** | [**GetChildInfoCredits**](GetChildInfoCredits.md) | | [optional] +**statistics** | [**GetChildInfoStatistics**](GetChildInfoStatistics.md) | | [optional] +**password** | **String** | The encrypted password of child account | +**ips** | **List<String>** | IP(s) associated to a child account user | [optional] +**apiKeys** | [**GetChildInfoApiKeys**](GetChildInfoApiKeys.md) | | [optional] + + + diff --git a/docs/GetChildInfoApiKeys.md b/docs/GetChildInfoApiKeys.md new file mode 100644 index 0000000..92c5d40 --- /dev/null +++ b/docs/GetChildInfoApiKeys.md @@ -0,0 +1,11 @@ + +# GetChildInfoApiKeys + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**v2** | [**List<GetChildInfoApiKeysV2>**](GetChildInfoApiKeysV2.md) | | +**v3** | [**List<GetChildInfoApiKeysV3>**](GetChildInfoApiKeysV3.md) | | [optional] + + + diff --git a/docs/GetChildInfoApiKeysV2.md b/docs/GetChildInfoApiKeysV2.md new file mode 100644 index 0000000..7972a01 --- /dev/null +++ b/docs/GetChildInfoApiKeysV2.md @@ -0,0 +1,11 @@ + +# GetChildInfoApiKeysV2 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Name of the key for version 2 | +**key** | **String** | API Key for version 2 | + + + diff --git a/docs/GetChildInfoApiKeysV3.md b/docs/GetChildInfoApiKeysV3.md new file mode 100644 index 0000000..ef1a5d9 --- /dev/null +++ b/docs/GetChildInfoApiKeysV3.md @@ -0,0 +1,11 @@ + +# GetChildInfoApiKeysV3 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Name of the key for version 3 | +**key** | **String** | API Key for version 3 | + + + diff --git a/docs/GetChildInfoCredits.md b/docs/GetChildInfoCredits.md new file mode 100644 index 0000000..93728b0 --- /dev/null +++ b/docs/GetChildInfoCredits.md @@ -0,0 +1,11 @@ + +# GetChildInfoCredits + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**emailCredits** | **Long** | Email credits available for your child | [optional] +**smsCredits** | **Long** | SMS credits available for your child | [optional] + + + diff --git a/docs/GetChildInfoStatistics.md b/docs/GetChildInfoStatistics.md new file mode 100644 index 0000000..e3d67e1 --- /dev/null +++ b/docs/GetChildInfoStatistics.md @@ -0,0 +1,12 @@ + +# GetChildInfoStatistics + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**previousMonthTotalSent** | **Long** | Overall emails sent for the previous month | [optional] +**currentMonthTotalSent** | **Long** | Overall emails sent for current month | [optional] +**totalSent** | **Long** | Overall emails sent for since the account exists | [optional] + + + diff --git a/docs/GetChildrenList.md b/docs/GetChildrenList.md new file mode 100644 index 0000000..86aeb16 --- /dev/null +++ b/docs/GetChildrenList.md @@ -0,0 +1,10 @@ + +# GetChildrenList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**children** | **List<Object>** | Your children's account information | [optional] + + + diff --git a/docs/GetClient.md b/docs/GetClient.md new file mode 100644 index 0000000..6bec196 --- /dev/null +++ b/docs/GetClient.md @@ -0,0 +1,13 @@ + +# GetClient + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | Login Email | +**firstName** | **String** | First Name | +**lastName** | **String** | Last Name | +**companyName** | **String** | Name of the company | + + + diff --git a/docs/GetContactCampaignStats.md b/docs/GetContactCampaignStats.md new file mode 100644 index 0000000..a657ea7 --- /dev/null +++ b/docs/GetContactCampaignStats.md @@ -0,0 +1,17 @@ + +# GetContactCampaignStats + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**messagesSent** | [**List<GetExtendedContactDetailsStatisticsMessagesSent>**](GetExtendedContactDetailsStatisticsMessagesSent.md) | | [optional] +**hardBounces** | [**List<GetExtendedContactDetailsStatisticsMessagesSent>**](GetExtendedContactDetailsStatisticsMessagesSent.md) | | [optional] +**softBounces** | [**List<GetExtendedContactDetailsStatisticsMessagesSent>**](GetExtendedContactDetailsStatisticsMessagesSent.md) | | [optional] +**complaints** | [**List<GetExtendedContactDetailsStatisticsMessagesSent>**](GetExtendedContactDetailsStatisticsMessagesSent.md) | | [optional] +**unsubscriptions** | [**GetContactCampaignStatsUnsubscriptions**](GetContactCampaignStatsUnsubscriptions.md) | | [optional] +**opened** | [**List<GetContactCampaignStatsOpened>**](GetContactCampaignStatsOpened.md) | | [optional] +**clicked** | [**List<GetContactCampaignStatsClicked>**](GetContactCampaignStatsClicked.md) | | [optional] +**transacAttributes** | [**List<GetContactCampaignStatsTransacAttributes>**](GetContactCampaignStatsTransacAttributes.md) | | [optional] + + + diff --git a/docs/GetContactCampaignStatsClicked.md b/docs/GetContactCampaignStatsClicked.md new file mode 100644 index 0000000..b2d4162 --- /dev/null +++ b/docs/GetContactCampaignStatsClicked.md @@ -0,0 +1,11 @@ + +# GetContactCampaignStatsClicked + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaignId** | **Long** | ID of the campaign which generated the event | +**links** | [**List<GetExtendedContactDetailsStatisticsLinks>**](GetExtendedContactDetailsStatisticsLinks.md) | | + + + diff --git a/docs/GetContactCampaignStatsOpened.md b/docs/GetContactCampaignStatsOpened.md new file mode 100644 index 0000000..57e2e3f --- /dev/null +++ b/docs/GetContactCampaignStatsOpened.md @@ -0,0 +1,13 @@ + +# GetContactCampaignStatsOpened + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaignId** | **Long** | ID of the campaign which generated the event | +**count** | **Long** | Number of openings of the campaign | +**eventTime** | [**OffsetDateTime**](OffsetDateTime.md) | UTC date-time of the event | +**ip** | **String** | IP from which the user has opened the campaign | + + + diff --git a/docs/GetContactCampaignStatsTransacAttributes.md b/docs/GetContactCampaignStatsTransacAttributes.md new file mode 100644 index 0000000..22dc08d --- /dev/null +++ b/docs/GetContactCampaignStatsTransacAttributes.md @@ -0,0 +1,12 @@ + +# GetContactCampaignStatsTransacAttributes + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**orderDate** | **LocalDate** | Date of the order | +**orderPrice** | **Float** | Price of the order | +**orderId** | **Long** | ID of the order | + + + diff --git a/docs/GetContactCampaignStatsUnsubscriptions.md b/docs/GetContactCampaignStatsUnsubscriptions.md new file mode 100644 index 0000000..fddf91d --- /dev/null +++ b/docs/GetContactCampaignStatsUnsubscriptions.md @@ -0,0 +1,11 @@ + +# GetContactCampaignStatsUnsubscriptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**userUnsubscription** | [**List<GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription>**](GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.md) | Contact has unsubscribed via the unsubscription link in the email | +**adminUnsubscription** | [**List<GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription>**](GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.md) | Contact has been unsubscribed from the administrator | + + + diff --git a/docs/GetContactDetails.md b/docs/GetContactDetails.md new file mode 100644 index 0000000..5c6cd7d --- /dev/null +++ b/docs/GetContactDetails.md @@ -0,0 +1,17 @@ + +# GetContactDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | Email address of the contact for which you requested the details | +**id** | **Long** | ID of the contact for which you requested the details | +**emailBlacklisted** | **Boolean** | Blacklist status for email campaigns (true=blacklisted, false=not blacklisted) | +**smsBlacklisted** | **Boolean** | Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted) | +**modifiedAt** | [**OffsetDateTime**](OffsetDateTime.md) | Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**listIds** | **List<Long>** | | +**listUnsubscribed** | **List<Long>** | | [optional] +**attributes** | **Map<String, String>** | | + + + diff --git a/docs/GetContacts.md b/docs/GetContacts.md new file mode 100644 index 0000000..35df8f2 --- /dev/null +++ b/docs/GetContacts.md @@ -0,0 +1,11 @@ + +# GetContacts + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**contacts** | **List<Object>** | | +**count** | **Long** | Number of contacts | + + + diff --git a/docs/GetEmailCampaign.md b/docs/GetEmailCampaign.md new file mode 100644 index 0000000..2854906 --- /dev/null +++ b/docs/GetEmailCampaign.md @@ -0,0 +1,49 @@ + +# GetEmailCampaign + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Long** | ID of the campaign | +**name** | **String** | Name of the campaign | +**subject** | **String** | Subject of the campaign | +**type** | [**TypeEnum**](#TypeEnum) | Type of campaign | +**status** | [**StatusEnum**](#StatusEnum) | Status of the campaign | +**scheduledAt** | [**OffsetDateTime**](OffsetDateTime.md) | UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) | [optional] +**testSent** | **Boolean** | Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) | +**header** | **String** | Header of the campaign | +**footer** | **String** | Footer of the campaign | +**sender** | [**GetExtendedCampaignOverviewSender**](GetExtendedCampaignOverviewSender.md) | | +**replyTo** | **String** | Email defined as the \"Reply to\" of the campaign | +**toField** | **String** | Customisation of the \"to\" field of the campaign | +**htmlContent** | **String** | HTML content of the campaign | +**shareLink** | **String** | Link to share the campaign on social medias | [optional] +**tag** | **String** | Tag of the campaign | +**createdAt** | [**OffsetDateTime**](OffsetDateTime.md) | Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**modifiedAt** | [**OffsetDateTime**](OffsetDateTime.md) | UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**inlineImageActivation** | **Boolean** | Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. | [optional] +**mirrorActive** | **Boolean** | Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign | [optional] +**recurring** | **Boolean** | FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times | [optional] + + + +## Enum: TypeEnum +Name | Value +---- | ----- +CLASSIC | "classic" +TRIGGER | "trigger" + + + +## Enum: StatusEnum +Name | Value +---- | ----- +DRAFT | "draft" +SENT | "sent" +ARCHIVE | "archive" +QUEUED | "queued" +SUSPENDED | "suspended" +IN_PROCESS | "in_process" + + + diff --git a/docs/GetEmailCampaigns.md b/docs/GetEmailCampaigns.md new file mode 100644 index 0000000..e71b3b1 --- /dev/null +++ b/docs/GetEmailCampaigns.md @@ -0,0 +1,11 @@ + +# GetEmailCampaigns + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaigns** | **List<Object>** | | [optional] +**count** | **Long** | Number of Email campaigns retrieved | + + + diff --git a/docs/GetEmailEventReport.md b/docs/GetEmailEventReport.md new file mode 100644 index 0000000..789e62c --- /dev/null +++ b/docs/GetEmailEventReport.md @@ -0,0 +1,10 @@ + +# GetEmailEventReport + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**events** | [**List<GetEmailEventReportEvents>**](GetEmailEventReportEvents.md) | | [optional] + + + diff --git a/docs/GetEmailEventReportEvents.md b/docs/GetEmailEventReportEvents.md new file mode 100644 index 0000000..e5711c7 --- /dev/null +++ b/docs/GetEmailEventReportEvents.md @@ -0,0 +1,36 @@ + +# GetEmailEventReportEvents + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | Email address which generates the event | +**date** | [**OffsetDateTime**](OffsetDateTime.md) | UTC date-time on which the event has been generated | +**subject** | **String** | Subject of the event | [optional] +**messageId** | **String** | Message ID which generated the event | +**event** | [**EventEnum**](#EventEnum) | Event which occurred | +**reason** | **String** | Reason of bounce (only available if the event is hardbounce or softbounce) | [optional] +**tag** | **String** | Tag of the email which generated the event | +**ip** | **String** | IP from which the user has opened the email or clicked on the link (only available if the event is opened or clicks) | [optional] +**link** | **String** | The link which is sent to the user (only available if the event is requests or opened or clicks) | [optional] +**from** | **String** | Sender email from which the emails are sent | + + + +## Enum: EventEnum +Name | Value +---- | ----- +BOUNCES | "bounces" +HARDBOUNCES | "hardBounces" +SOFTBOUNCES | "softBounces" +DELIVERED | "delivered" +SPAM | "spam" +REQUESTS | "requests" +OPENED | "opened" +CLICKS | "clicks" +INVALID | "invalid" +DEFERRED | "deferred" +BLOCKED | "blocked" + + + diff --git a/docs/GetExtendedCampaignOverview.md b/docs/GetExtendedCampaignOverview.md new file mode 100644 index 0000000..7b8a99b --- /dev/null +++ b/docs/GetExtendedCampaignOverview.md @@ -0,0 +1,49 @@ + +# GetExtendedCampaignOverview + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Long** | ID of the campaign | +**name** | **String** | Name of the campaign | +**subject** | **String** | Subject of the campaign | +**type** | [**TypeEnum**](#TypeEnum) | Type of campaign | +**status** | [**StatusEnum**](#StatusEnum) | Status of the campaign | +**scheduledAt** | [**OffsetDateTime**](OffsetDateTime.md) | UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) | [optional] +**testSent** | **Boolean** | Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) | +**header** | **String** | Header of the campaign | +**footer** | **String** | Footer of the campaign | +**sender** | [**GetExtendedCampaignOverviewSender**](GetExtendedCampaignOverviewSender.md) | | +**replyTo** | **String** | Email defined as the \"Reply to\" of the campaign | +**toField** | **String** | Customisation of the \"to\" field of the campaign | +**htmlContent** | **String** | HTML content of the campaign | +**shareLink** | **String** | Link to share the campaign on social medias | [optional] +**tag** | **String** | Tag of the campaign | +**createdAt** | [**OffsetDateTime**](OffsetDateTime.md) | Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**modifiedAt** | [**OffsetDateTime**](OffsetDateTime.md) | UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**inlineImageActivation** | **Boolean** | Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. | [optional] +**mirrorActive** | **Boolean** | Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign | [optional] +**recurring** | **Boolean** | FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times | [optional] + + + +## Enum: TypeEnum +Name | Value +---- | ----- +CLASSIC | "classic" +TRIGGER | "trigger" + + + +## Enum: StatusEnum +Name | Value +---- | ----- +DRAFT | "draft" +SENT | "sent" +ARCHIVE | "archive" +QUEUED | "queued" +SUSPENDED | "suspended" +IN_PROCESS | "in_process" + + + diff --git a/docs/GetExtendedCampaignOverviewSender.md b/docs/GetExtendedCampaignOverviewSender.md new file mode 100644 index 0000000..8d6e017 --- /dev/null +++ b/docs/GetExtendedCampaignOverviewSender.md @@ -0,0 +1,11 @@ + +# GetExtendedCampaignOverviewSender + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Sender name of the campaign | [optional] +**email** | **String** | Sender email of the campaign | [optional] + + + diff --git a/docs/GetExtendedCampaignStats.md b/docs/GetExtendedCampaignStats.md new file mode 100644 index 0000000..9a26351 --- /dev/null +++ b/docs/GetExtendedCampaignStats.md @@ -0,0 +1,14 @@ + +# GetExtendedCampaignStats + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaignStats** | **List<Object>** | | +**mirrorClick** | **Long** | Number of clicks on mirror link | +**remaining** | **Long** | Number of remaning emails to send | +**linksStats** | [**Map<String, GetExtendedCampaignStatsLinksStats>**](GetExtendedCampaignStatsLinksStats.md) | | +**statsByDomain** | [**GetStatsByDomain**](GetStatsByDomain.md) | | + + + diff --git a/docs/GetExtendedCampaignStatsLinksStats.md b/docs/GetExtendedCampaignStatsLinksStats.md new file mode 100644 index 0000000..adfc515 --- /dev/null +++ b/docs/GetExtendedCampaignStatsLinksStats.md @@ -0,0 +1,10 @@ + +# GetExtendedCampaignStatsLinksStats + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**nbClick** | **Long** | Number of clicks for the link | + + + diff --git a/docs/GetExtendedClient.md b/docs/GetExtendedClient.md new file mode 100644 index 0000000..b32b958 --- /dev/null +++ b/docs/GetExtendedClient.md @@ -0,0 +1,14 @@ + +# GetExtendedClient + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | Login Email | +**firstName** | **String** | First Name | +**lastName** | **String** | Last Name | +**companyName** | **String** | Name of the company | +**address** | [**GetExtendedClientAddress**](GetExtendedClientAddress.md) | | + + + diff --git a/docs/GetExtendedClientAddress.md b/docs/GetExtendedClientAddress.md new file mode 100644 index 0000000..3acfab8 --- /dev/null +++ b/docs/GetExtendedClientAddress.md @@ -0,0 +1,13 @@ + +# GetExtendedClientAddress + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**street** | **String** | Street information | +**city** | **String** | City information | +**zipCode** | **String** | Zip Code information | +**country** | **String** | Country information | + + + diff --git a/docs/GetExtendedContactDetails.md b/docs/GetExtendedContactDetails.md new file mode 100644 index 0000000..96c056e --- /dev/null +++ b/docs/GetExtendedContactDetails.md @@ -0,0 +1,18 @@ + +# GetExtendedContactDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | Email address of the contact for which you requested the details | +**id** | **Long** | ID of the contact for which you requested the details | +**emailBlacklisted** | **Boolean** | Blacklist status for email campaigns (true=blacklisted, false=not blacklisted) | +**smsBlacklisted** | **Boolean** | Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted) | +**modifiedAt** | [**OffsetDateTime**](OffsetDateTime.md) | Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**listIds** | **List<Long>** | | +**listUnsubscribed** | **List<Long>** | | [optional] +**attributes** | **Map<String, String>** | | +**statistics** | [**GetExtendedContactDetailsStatistics**](GetExtendedContactDetailsStatistics.md) | | + + + diff --git a/docs/GetExtendedContactDetailsStatistics.md b/docs/GetExtendedContactDetailsStatistics.md new file mode 100644 index 0000000..cb111c5 --- /dev/null +++ b/docs/GetExtendedContactDetailsStatistics.md @@ -0,0 +1,17 @@ + +# GetExtendedContactDetailsStatistics + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**messagesSent** | [**List<GetExtendedContactDetailsStatisticsMessagesSent>**](GetExtendedContactDetailsStatisticsMessagesSent.md) | Listing of the sent campaign for the contact | [optional] +**hardBounces** | [**List<GetExtendedContactDetailsStatisticsMessagesSent>**](GetExtendedContactDetailsStatisticsMessagesSent.md) | Listing of the hardbounes generated by the contact | [optional] +**softBounces** | [**List<GetExtendedContactDetailsStatisticsMessagesSent>**](GetExtendedContactDetailsStatisticsMessagesSent.md) | Listing of the softbounes generated by the contact | [optional] +**complaints** | [**List<GetExtendedContactDetailsStatisticsMessagesSent>**](GetExtendedContactDetailsStatisticsMessagesSent.md) | Listing of the complaints generated by the contact | [optional] +**unsubscriptions** | [**GetExtendedContactDetailsStatisticsUnsubscriptions**](GetExtendedContactDetailsStatisticsUnsubscriptions.md) | | [optional] +**opened** | [**List<GetExtendedContactDetailsStatisticsOpened>**](GetExtendedContactDetailsStatisticsOpened.md) | Listing of the openings generated by the contact | [optional] +**clicked** | [**List<GetExtendedContactDetailsStatisticsClicked>**](GetExtendedContactDetailsStatisticsClicked.md) | Listing of the clicks generated by the contact | [optional] +**transacAttributes** | **List<Object>** | Listing of the transactional attributes for the contact | [optional] + + + diff --git a/docs/GetExtendedContactDetailsStatisticsClicked.md b/docs/GetExtendedContactDetailsStatisticsClicked.md new file mode 100644 index 0000000..2757f5d --- /dev/null +++ b/docs/GetExtendedContactDetailsStatisticsClicked.md @@ -0,0 +1,11 @@ + +# GetExtendedContactDetailsStatisticsClicked + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaignId** | **Long** | ID of the campaign which generated the event | +**links** | [**List<GetExtendedContactDetailsStatisticsLinks>**](GetExtendedContactDetailsStatisticsLinks.md) | Listing of the clicked links for the campaign | + + + diff --git a/docs/GetExtendedContactDetailsStatisticsLinks.md b/docs/GetExtendedContactDetailsStatisticsLinks.md new file mode 100644 index 0000000..234d79a --- /dev/null +++ b/docs/GetExtendedContactDetailsStatisticsLinks.md @@ -0,0 +1,13 @@ + +# GetExtendedContactDetailsStatisticsLinks + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **Long** | Number of clicks on this link for the campaign | +**eventTime** | [**OffsetDateTime**](OffsetDateTime.md) | UTC date-time of the event | +**ip** | **String** | IP from which the user has clicked on the link | +**url** | **String** | URL of the clicked link | + + + diff --git a/docs/GetExtendedContactDetailsStatisticsMessagesSent.md b/docs/GetExtendedContactDetailsStatisticsMessagesSent.md new file mode 100644 index 0000000..d69b87e --- /dev/null +++ b/docs/GetExtendedContactDetailsStatisticsMessagesSent.md @@ -0,0 +1,11 @@ + +# GetExtendedContactDetailsStatisticsMessagesSent + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaignId** | **Long** | ID of the campaign which generated the event | +**eventTime** | [**OffsetDateTime**](OffsetDateTime.md) | UTC date-time of the event | + + + diff --git a/docs/GetExtendedContactDetailsStatisticsOpened.md b/docs/GetExtendedContactDetailsStatisticsOpened.md new file mode 100644 index 0000000..4404fba --- /dev/null +++ b/docs/GetExtendedContactDetailsStatisticsOpened.md @@ -0,0 +1,13 @@ + +# GetExtendedContactDetailsStatisticsOpened + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaignId** | **Long** | ID of the campaign which generated the event | +**count** | **Long** | Number of openings for the campaign | +**eventTime** | [**OffsetDateTime**](OffsetDateTime.md) | UTC date-time of the event | +**ip** | **String** | IP from which the user has opened the email | + + + diff --git a/docs/GetExtendedContactDetailsStatisticsUnsubscriptions.md b/docs/GetExtendedContactDetailsStatisticsUnsubscriptions.md new file mode 100644 index 0000000..9fa2864 --- /dev/null +++ b/docs/GetExtendedContactDetailsStatisticsUnsubscriptions.md @@ -0,0 +1,11 @@ + +# GetExtendedContactDetailsStatisticsUnsubscriptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**userUnsubscription** | [**List<GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription>**](GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.md) | Contact unsubscribe via unsubscription link in a campaign | +**adminUnsubscription** | [**List<GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription>**](GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.md) | Contact has been unsubscribed from the administrator | + + + diff --git a/docs/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.md b/docs/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.md new file mode 100644 index 0000000..680dded --- /dev/null +++ b/docs/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.md @@ -0,0 +1,11 @@ + +# GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**eventTime** | [**OffsetDateTime**](OffsetDateTime.md) | UTC date-time of the event | +**ip** | **String** | IP from which the user has been unsubscribed | + + + diff --git a/docs/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.md b/docs/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.md new file mode 100644 index 0000000..d0213a6 --- /dev/null +++ b/docs/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.md @@ -0,0 +1,12 @@ + +# GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaignId** | **Long** | ID of the campaign which generated the event | +**eventTime** | [**OffsetDateTime**](OffsetDateTime.md) | UTC date-time of the event | +**ip** | **String** | IP from which the user has unsubscribed | + + + diff --git a/docs/GetExtendedList.md b/docs/GetExtendedList.md new file mode 100644 index 0000000..0ba7f9f --- /dev/null +++ b/docs/GetExtendedList.md @@ -0,0 +1,17 @@ + +# GetExtendedList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Long** | ID of the list | +**name** | **String** | Name of the list | +**totalBlacklisted** | **Long** | Number of blacklisted contacts in the list | +**totalSubscribers** | **Long** | Number of contacts in the list | +**folderId** | **Long** | ID of the folder | +**createdAt** | [**OffsetDateTime**](OffsetDateTime.md) | Creation UTC date-time of the list (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**campaignStats** | [**List<GetExtendedListCampaignStats>**](GetExtendedListCampaignStats.md) | | [optional] +**dynamicList** | **Boolean** | Status telling if the list is dynamic or not (true=dynamic, false=not dynamic) | [optional] + + + diff --git a/docs/GetExtendedListCampaignStats.md b/docs/GetExtendedListCampaignStats.md new file mode 100644 index 0000000..1639b46 --- /dev/null +++ b/docs/GetExtendedListCampaignStats.md @@ -0,0 +1,11 @@ + +# GetExtendedListCampaignStats + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaignId** | **Long** | ID of the campaign | +**stats** | [**GetCampaignStats**](GetCampaignStats.md) | | + + + diff --git a/docs/GetFolder.md b/docs/GetFolder.md new file mode 100644 index 0000000..98e2096 --- /dev/null +++ b/docs/GetFolder.md @@ -0,0 +1,14 @@ + +# GetFolder + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Long** | ID of the folder | +**name** | **String** | Name of the folder | +**totalBlacklisted** | **Long** | Number of blacklisted contacts in the folder | +**totalSubscribers** | **Long** | Number of contacts in the folder | +**uniqueSubscribers** | **Long** | Number of unique contacts in the folder | + + + diff --git a/docs/GetFolderLists.md b/docs/GetFolderLists.md new file mode 100644 index 0000000..143c2bf --- /dev/null +++ b/docs/GetFolderLists.md @@ -0,0 +1,11 @@ + +# GetFolderLists + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**lists** | **List<Object>** | | +**count** | **Long** | Number of lists in the folder | + + + diff --git a/docs/GetFolders.md b/docs/GetFolders.md new file mode 100644 index 0000000..2e34c58 --- /dev/null +++ b/docs/GetFolders.md @@ -0,0 +1,11 @@ + +# GetFolders + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**folders** | **List<Object>** | | [optional] +**count** | **Long** | Number of folders available in your account | [optional] + + + diff --git a/docs/GetIp.md b/docs/GetIp.md new file mode 100644 index 0000000..a74f787 --- /dev/null +++ b/docs/GetIp.md @@ -0,0 +1,13 @@ + +# GetIp + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Long** | ID of the dedicated IP | +**ip** | **String** | Dedicated IP | +**active** | **Boolean** | Status of the IP (true=active, false=inactive) | +**domain** | **String** | Domain associated to the IP | + + + diff --git a/docs/GetIpFromSender.md b/docs/GetIpFromSender.md new file mode 100644 index 0000000..cdf3f94 --- /dev/null +++ b/docs/GetIpFromSender.md @@ -0,0 +1,13 @@ + +# GetIpFromSender + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Long** | ID of the dedicated IP | +**ip** | **String** | Dedicated IP | +**domain** | **String** | Domain associated to the IP | +**weight** | **Long** | Weight of the IP | + + + diff --git a/docs/GetIps.md b/docs/GetIps.md new file mode 100644 index 0000000..bbbf183 --- /dev/null +++ b/docs/GetIps.md @@ -0,0 +1,10 @@ + +# GetIps + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ips** | [**List<GetIp>**](GetIp.md) | Dedicated IP(s) available on your account | + + + diff --git a/docs/GetIpsFromSender.md b/docs/GetIpsFromSender.md new file mode 100644 index 0000000..7764839 --- /dev/null +++ b/docs/GetIpsFromSender.md @@ -0,0 +1,10 @@ + +# GetIpsFromSender + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ips** | [**List<GetIpFromSender>**](GetIpFromSender.md) | Dedicated IP(s) linked to a sender | + + + diff --git a/docs/GetList.md b/docs/GetList.md new file mode 100644 index 0000000..27aa4d5 --- /dev/null +++ b/docs/GetList.md @@ -0,0 +1,13 @@ + +# GetList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Long** | ID of the list | +**name** | **String** | Name of the list | +**totalBlacklisted** | **Long** | Number of blacklisted contacts in the list | +**totalSubscribers** | **Long** | Number of contacts in the list | + + + diff --git a/docs/GetLists.md b/docs/GetLists.md new file mode 100644 index 0000000..c805452 --- /dev/null +++ b/docs/GetLists.md @@ -0,0 +1,11 @@ + +# GetLists + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**lists** | **List<Object>** | Listing of all the lists available in your account | +**count** | **Long** | Number of lists in your account | + + + diff --git a/docs/GetProcess.md b/docs/GetProcess.md new file mode 100644 index 0000000..d05e7b7 --- /dev/null +++ b/docs/GetProcess.md @@ -0,0 +1,22 @@ + +# GetProcess + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Long** | Id of the process | +**status** | [**StatusEnum**](#StatusEnum) | Status of the process | +**name** | **String** | Process name | +**exportUrl** | **String** | URL on which send export the of contacts once the process is completed | [optional] + + + +## Enum: StatusEnum +Name | Value +---- | ----- +QUEUED | "queued" +IN_PROCESS | "in_process" +COMPLETED | "completed" + + + diff --git a/docs/GetProcesses.md b/docs/GetProcesses.md new file mode 100644 index 0000000..033c283 --- /dev/null +++ b/docs/GetProcesses.md @@ -0,0 +1,11 @@ + +# GetProcesses + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**processes** | [**List<GetProcess>**](GetProcess.md) | List of processes available on your account | [optional] +**count** | **Long** | Number of processes available on your account | + + + diff --git a/docs/GetReports.md b/docs/GetReports.md new file mode 100644 index 0000000..d89ec07 --- /dev/null +++ b/docs/GetReports.md @@ -0,0 +1,10 @@ + +# GetReports + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reports** | [**List<GetReportsReports>**](GetReportsReports.md) | | [optional] + + + diff --git a/docs/GetReportsReports.md b/docs/GetReportsReports.md new file mode 100644 index 0000000..5fdb0c3 --- /dev/null +++ b/docs/GetReportsReports.md @@ -0,0 +1,21 @@ + +# GetReportsReports + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**date** | **LocalDate** | Date of the statistics | +**requests** | **Long** | Number of requests for the date | +**delivered** | **Long** | Number of delivered emails for the date | +**hardBounces** | **Long** | Number of hardbounces for the date | +**softBounces** | **Long** | Number of softbounces for the date | +**clicks** | **Long** | Number of clicks for the date | +**uniqueClicks** | **Long** | Number of unique clicks for the date | +**opens** | **Long** | Number of openings for the date | +**uniqueOpens** | **Long** | Number of unique openings for the date | +**spamReports** | **Long** | Number of complaints (spam reports) for the date | +**blocked** | **Long** | Number of blocked emails for the date | +**invalid** | **Long** | Number of invalid emails for the date | + + + diff --git a/docs/GetSendersList.md b/docs/GetSendersList.md new file mode 100644 index 0000000..c7b3b3a --- /dev/null +++ b/docs/GetSendersList.md @@ -0,0 +1,10 @@ + +# GetSendersList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**senders** | [**List<GetSendersListSenders>**](GetSendersListSenders.md) | List of the senders available in your account | [optional] + + + diff --git a/docs/GetSendersListIps.md b/docs/GetSendersListIps.md new file mode 100644 index 0000000..33d2db3 --- /dev/null +++ b/docs/GetSendersListIps.md @@ -0,0 +1,12 @@ + +# GetSendersListIps + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ip** | **String** | Dedicated IP available in your account | +**domain** | **String** | Domain of the IP | +**weight** | **Long** | Weight of the IP for this sender | + + + diff --git a/docs/GetSendersListSenders.md b/docs/GetSendersListSenders.md new file mode 100644 index 0000000..2015569 --- /dev/null +++ b/docs/GetSendersListSenders.md @@ -0,0 +1,14 @@ + +# GetSendersListSenders + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Long** | Id of the sender | +**name** | **String** | From Name associated to the sender | +**email** | **String** | From Email associated to the sender | +**active** | **Boolean** | Status of sender (true=activated, false=deactivated) | +**ips** | [**List<GetSendersListIps>**](GetSendersListIps.md) | List of dedicated IP(s) available in the account. This data is displayed only for dedicated IPs | [optional] + + + diff --git a/docs/GetSmsCampaign.md b/docs/GetSmsCampaign.md new file mode 100644 index 0000000..e329101 --- /dev/null +++ b/docs/GetSmsCampaign.md @@ -0,0 +1,30 @@ + +# GetSmsCampaign + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Long** | ID of the SMS Campaign | +**name** | **String** | Name of the SMS Campaign | +**status** | [**StatusEnum**](#StatusEnum) | Status of the SMS Campaign | +**content** | **String** | Content of the SMS Campaign | +**scheduledAt** | [**OffsetDateTime**](OffsetDateTime.md) | UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format | +**testSent** | **Boolean** | Retrieved the status of test SMS sending. (true=Test SMS has been sent false=Test SMS has not been sent) | +**sender** | **String** | Sender of the SMS Campaign | +**createdAt** | [**OffsetDateTime**](OffsetDateTime.md) | Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**modifiedAt** | [**OffsetDateTime**](OffsetDateTime.md) | UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | + + + +## Enum: StatusEnum +Name | Value +---- | ----- +DRAFT | "draft" +SENT | "sent" +ARCHIVE | "archive" +QUEUED | "queued" +SUSPENDED | "suspended" +IN_PROCESS | "in_process" + + + diff --git a/docs/GetSmsCampaignOverview.md b/docs/GetSmsCampaignOverview.md new file mode 100644 index 0000000..a044db5 --- /dev/null +++ b/docs/GetSmsCampaignOverview.md @@ -0,0 +1,30 @@ + +# GetSmsCampaignOverview + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Long** | ID of the SMS Campaign | +**name** | **String** | Name of the SMS Campaign | +**status** | [**StatusEnum**](#StatusEnum) | Status of the SMS Campaign | +**content** | **String** | Content of the SMS Campaign | +**scheduledAt** | [**OffsetDateTime**](OffsetDateTime.md) | UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format | +**testSent** | **Boolean** | Retrieved the status of test SMS sending. (true=Test SMS has been sent false=Test SMS has not been sent) | +**sender** | **String** | Sender of the SMS Campaign | +**createdAt** | [**OffsetDateTime**](OffsetDateTime.md) | Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**modifiedAt** | [**OffsetDateTime**](OffsetDateTime.md) | UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | + + + +## Enum: StatusEnum +Name | Value +---- | ----- +DRAFT | "draft" +SENT | "sent" +ARCHIVE | "archive" +QUEUED | "queued" +SUSPENDED | "suspended" +IN_PROCESS | "in_process" + + + diff --git a/docs/GetSmsCampaignStats.md b/docs/GetSmsCampaignStats.md new file mode 100644 index 0000000..aa526c1 --- /dev/null +++ b/docs/GetSmsCampaignStats.md @@ -0,0 +1,16 @@ + +# GetSmsCampaignStats + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**delivered** | **Long** | Number of delivered SMS | +**sent** | **Long** | Number of sent SMS | +**processing** | **Long** | Number of processing SMS | +**softBounces** | **Long** | Number of softbounced SMS | +**hardBounces** | **Long** | Number of hardbounced SMS | +**unsubscriptions** | **Long** | Number of unsubscription SMS | +**answered** | **Long** | Number of replies to the SMS | + + + diff --git a/docs/GetSmsCampaigns.md b/docs/GetSmsCampaigns.md new file mode 100644 index 0000000..87e30cf --- /dev/null +++ b/docs/GetSmsCampaigns.md @@ -0,0 +1,11 @@ + +# GetSmsCampaigns + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaigns** | **List<Object>** | | [optional] +**count** | **Long** | Number of SMS campaigns retrieved | + + + diff --git a/docs/GetSmsEventReport.md b/docs/GetSmsEventReport.md new file mode 100644 index 0000000..343082e --- /dev/null +++ b/docs/GetSmsEventReport.md @@ -0,0 +1,10 @@ + +# GetSmsEventReport + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**events** | [**List<GetSmsEventReportEvents>**](GetSmsEventReportEvents.md) | | [optional] + + + diff --git a/docs/GetSmsEventReportEvents.md b/docs/GetSmsEventReportEvents.md new file mode 100644 index 0000000..f99be6c --- /dev/null +++ b/docs/GetSmsEventReportEvents.md @@ -0,0 +1,31 @@ + +# GetSmsEventReportEvents + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**phoneNumber** | **String** | Phone number which has generated the event | +**date** | **LocalDate** | Date on which the event has been generated | +**messageId** | **String** | Message ID which generated the event | +**event** | [**EventEnum**](#EventEnum) | Event which occurred | +**reason** | **String** | Reason of bounce (only available if the event is hardbounce or softbounce) | [optional] +**reply** | **String** | | [optional] +**tag** | **String** | Tag of the SMS which generated the event | [optional] + + + +## Enum: EventEnum +Name | Value +---- | ----- +BOUNCES | "bounces" +HARDBOUNCES | "hardBounces" +SOFTBOUNCES | "softBounces" +DELIVERED | "delivered" +SENT | "sent" +ACCEPTED | "accepted" +UNSUBSCRIPTION | "unsubscription" +REPLIES | "replies" +BLOCKED | "blocked" + + + diff --git a/docs/GetSmtpTemplateOverview.md b/docs/GetSmtpTemplateOverview.md new file mode 100644 index 0000000..414fc33 --- /dev/null +++ b/docs/GetSmtpTemplateOverview.md @@ -0,0 +1,21 @@ + +# GetSmtpTemplateOverview + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Long** | ID of the template | +**name** | **String** | Name of the template | +**subject** | **String** | Subject of the template | +**isActive** | **Boolean** | Status of template (true=active, false=inactive) | +**testSent** | **Boolean** | Status of test sending for the template (true=test email has been sent, false=test email has not been sent) | +**sender** | [**GetSmtpTemplateOverviewSender**](GetSmtpTemplateOverviewSender.md) | | +**replyTo** | **String** | Email defined as the \"Reply to\" for the template | +**toField** | **String** | Customisation of the \"to\" field for the template | +**tag** | **String** | Tag of the template | +**htmlContent** | **String** | HTML content of the template | +**createdAt** | [**OffsetDateTime**](OffsetDateTime.md) | Creation UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**modifiedAt** | [**OffsetDateTime**](OffsetDateTime.md) | Last modification UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ) | + + + diff --git a/docs/GetSmtpTemplateOverviewSender.md b/docs/GetSmtpTemplateOverviewSender.md new file mode 100644 index 0000000..82c364b --- /dev/null +++ b/docs/GetSmtpTemplateOverviewSender.md @@ -0,0 +1,11 @@ + +# GetSmtpTemplateOverviewSender + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | From email for the template | [optional] +**email** | **String** | From email for the template | [optional] + + + diff --git a/docs/GetSmtpTemplates.md b/docs/GetSmtpTemplates.md new file mode 100644 index 0000000..aca9567 --- /dev/null +++ b/docs/GetSmtpTemplates.md @@ -0,0 +1,11 @@ + +# GetSmtpTemplates + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **Long** | Count of smtp templates | [optional] +**templates** | [**List<GetSmtpTemplateOverview>**](GetSmtpTemplateOverview.md) | | [optional] + + + diff --git a/docs/GetStatsByDomain.md b/docs/GetStatsByDomain.md new file mode 100644 index 0000000..71e2248 --- /dev/null +++ b/docs/GetStatsByDomain.md @@ -0,0 +1,9 @@ + +# GetStatsByDomain + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + + diff --git a/docs/GetTransacAggregatedSmsReport.md b/docs/GetTransacAggregatedSmsReport.md new file mode 100644 index 0000000..619c57a --- /dev/null +++ b/docs/GetTransacAggregatedSmsReport.md @@ -0,0 +1,19 @@ + +# GetTransacAggregatedSmsReport + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**range** | **String** | Time frame of the report | +**requests** | **Long** | Number of requests for the timeframe | +**delivered** | **Long** | Number of delivered SMS for the timeframe | +**hardBounces** | **Long** | Number of hardbounces for the timeframe | +**softBounces** | **Long** | Number of softbounces for the timeframe | +**blocked** | **Long** | Number of blocked contact for the timeframe | +**unsubscribed** | **Long** | Number of unsubscription for the timeframe | +**replied** | **Long** | Number of answered SMS for the timeframe | +**accepted** | **Long** | Number of accepted for the timeframe | +**rejected** | **Long** | Number of rejected for the timeframe | + + + diff --git a/docs/GetTransacSmsReport.md b/docs/GetTransacSmsReport.md new file mode 100644 index 0000000..93525f0 --- /dev/null +++ b/docs/GetTransacSmsReport.md @@ -0,0 +1,10 @@ + +# GetTransacSmsReport + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reports** | [**List<GetTransacSmsReportReports>**](GetTransacSmsReportReports.md) | | [optional] + + + diff --git a/docs/GetTransacSmsReportReports.md b/docs/GetTransacSmsReportReports.md new file mode 100644 index 0000000..e9f6c6f --- /dev/null +++ b/docs/GetTransacSmsReportReports.md @@ -0,0 +1,19 @@ + +# GetTransacSmsReportReports + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**date** | **LocalDate** | Date for which statistics are retrieved | +**requests** | **Long** | Number of requests for the date | +**delivered** | **Long** | Number of delivered SMS for the date | +**hardBounces** | **Long** | Number of hardbounces for the date | +**softBounces** | **Long** | Number of softbounces for the date | +**blocked** | **Long** | Number of blocked contact for the date | +**unsubscribed** | **Long** | Number of unsubscription for the date | +**replied** | **Long** | Number of answered SMS for the date | +**accepted** | **Long** | Number of accepted for the date | +**rejected** | **Long** | Number of rejected for the date | + + + diff --git a/docs/GetWebhook.md b/docs/GetWebhook.md new file mode 100644 index 0000000..055e8dc --- /dev/null +++ b/docs/GetWebhook.md @@ -0,0 +1,24 @@ + +# GetWebhook + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **String** | URL of the webhook | +**id** | **Long** | ID of the webhook | +**description** | **String** | Description of the webhook | +**events** | **List<String>** | | +**type** | [**TypeEnum**](#TypeEnum) | Type of webhook (marketing or transac) | +**createdAt** | [**OffsetDateTime**](OffsetDateTime.md) | Creation UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**modifiedAt** | [**OffsetDateTime**](OffsetDateTime.md) | Last modification UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) | + + + +## Enum: TypeEnum +Name | Value +---- | ----- +MARKETING | "marketing" +TRANSAC | "transac" + + + diff --git a/docs/GetWebhooks.md b/docs/GetWebhooks.md new file mode 100644 index 0000000..57189f0 --- /dev/null +++ b/docs/GetWebhooks.md @@ -0,0 +1,10 @@ + +# GetWebhooks + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**webhooks** | **List<Object>** | | + + + diff --git a/docs/ListsApi.md b/docs/ListsApi.md new file mode 100644 index 0000000..f8f2d91 --- /dev/null +++ b/docs/ListsApi.md @@ -0,0 +1,510 @@ +# ListsApi + +All URIs are relative to *https://api.sendinblue.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addContactToList**](ListsApi.md#addContactToList) | **POST** /contacts/lists/{listId}/contacts/add | Add existing contacts to a list +[**createList**](ListsApi.md#createList) | **POST** /contacts/lists | Create a list +[**deleteList**](ListsApi.md#deleteList) | **DELETE** /contacts/lists/{listId} | Delete a list +[**getContactsFromList**](ListsApi.md#getContactsFromList) | **GET** /contacts/lists/{listId}/contacts | Get the contacts in a list +[**getFolderLists**](ListsApi.md#getFolderLists) | **GET** /contacts/folders/{folderId}/lists | Get the lists in a folder +[**getList**](ListsApi.md#getList) | **GET** /contacts/lists/{listId} | Get the details of a list +[**getLists**](ListsApi.md#getLists) | **GET** /contacts/lists | Get all the lists +[**removeContactToList**](ListsApi.md#removeContactToList) | **POST** /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list +[**updateList**](ListsApi.md#updateList) | **PUT** /contacts/lists/{listId} | Update a list + + + +# **addContactToList** +> PostContactInfo addContactToList(listId, contactEmails) + +Add existing contacts to a list + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ListsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ListsApi apiInstance = new ListsApi(); +Long listId = 789L; // Long | Id of the list +AddRemoveContactToList contactEmails = new AddRemoveContactToList(); // AddRemoveContactToList | Emails addresses of the contacts +try { + PostContactInfo result = apiInstance.addContactToList(listId, contactEmails); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ListsApi#addContactToList"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **Long**| Id of the list | + **contactEmails** | [**AddRemoveContactToList**](AddRemoveContactToList.md)| Emails addresses of the contacts | + +### Return type + +[**PostContactInfo**](PostContactInfo.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **createList** +> CreateModel createList(createList) + +Create a list + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ListsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ListsApi apiInstance = new ListsApi(); +CreateList createList = new CreateList(); // CreateList | Values to create a list +try { + CreateModel result = apiInstance.createList(createList); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ListsApi#createList"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createList** | [**CreateList**](CreateList.md)| Values to create a list | + +### Return type + +[**CreateModel**](CreateModel.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **deleteList** +> deleteList(listId) + +Delete a list + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ListsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ListsApi apiInstance = new ListsApi(); +Long listId = 789L; // Long | Id of the list +try { + apiInstance.deleteList(listId); +} catch (ApiException e) { + System.err.println("Exception when calling ListsApi#deleteList"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **Long**| Id of the list | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getContactsFromList** +> GetContacts getContactsFromList(listId, modifiedSince, limit, offset) + +Get the contacts in a list + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ListsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ListsApi apiInstance = new ListsApi(); +Long listId = 789L; // Long | Id of the list +OffsetDateTime modifiedSince = new OffsetDateTime(); // OffsetDateTime | Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. +Long limit = 50L; // Long | Number of documents per page +Long offset = 0L; // Long | Index of the first document of the page +try { + GetContacts result = apiInstance.getContactsFromList(listId, modifiedSince, limit, offset); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ListsApi#getContactsFromList"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **Long**| Id of the list | + **modifiedSince** | **OffsetDateTime**| Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. | [optional] + **limit** | **Long**| Number of documents per page | [optional] [default to 50] + **offset** | **Long**| Index of the first document of the page | [optional] [default to 0] + +### Return type + +[**GetContacts**](GetContacts.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getFolderLists** +> GetFolderLists getFolderLists(folderId, limit, offset) + +Get the lists in a folder + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ListsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ListsApi apiInstance = new ListsApi(); +Long folderId = 789L; // Long | Id of the folder +Long limit = 10L; // Long | Number of documents per page +Long offset = 0L; // Long | Index of the first document of the page +try { + GetFolderLists result = apiInstance.getFolderLists(folderId, limit, offset); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ListsApi#getFolderLists"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **folderId** | **Long**| Id of the folder | + **limit** | **Long**| Number of documents per page | [optional] [default to 10] + **offset** | **Long**| Index of the first document of the page | [optional] [default to 0] + +### Return type + +[**GetFolderLists**](GetFolderLists.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getList** +> GetExtendedList getList(listId) + +Get the details of a list + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ListsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ListsApi apiInstance = new ListsApi(); +Long listId = 789L; // Long | Id of the list +try { + GetExtendedList result = apiInstance.getList(listId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ListsApi#getList"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **Long**| Id of the list | + +### Return type + +[**GetExtendedList**](GetExtendedList.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getLists** +> GetLists getLists(limit, offset) + +Get all the lists + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ListsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ListsApi apiInstance = new ListsApi(); +Long limit = 10L; // Long | Number of documents per page +Long offset = 0L; // Long | Index of the first document of the page +try { + GetLists result = apiInstance.getLists(limit, offset); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ListsApi#getLists"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **Long**| Number of documents per page | [optional] [default to 10] + **offset** | **Long**| Index of the first document of the page | [optional] [default to 0] + +### Return type + +[**GetLists**](GetLists.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **removeContactToList** +> PostContactInfo removeContactToList(listId, contactEmails) + +Remove existing contacts from a list + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ListsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ListsApi apiInstance = new ListsApi(); +Long listId = 789L; // Long | Id of the list +AddRemoveContactToList contactEmails = new AddRemoveContactToList(); // AddRemoveContactToList | Emails adresses of the contact +try { + PostContactInfo result = apiInstance.removeContactToList(listId, contactEmails); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ListsApi#removeContactToList"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **Long**| Id of the list | + **contactEmails** | [**AddRemoveContactToList**](AddRemoveContactToList.md)| Emails adresses of the contact | + +### Return type + +[**PostContactInfo**](PostContactInfo.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **updateList** +> updateList(listId, updateList) + +Update a list + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ListsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ListsApi apiInstance = new ListsApi(); +Long listId = 789L; // Long | Id of the list +UpdateList updateList = new UpdateList(); // UpdateList | Values to update a list +try { + apiInstance.updateList(listId, updateList); +} catch (ApiException e) { + System.err.println("Exception when calling ListsApi#updateList"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **Long**| Id of the list | + **updateList** | [**UpdateList**](UpdateList.md)| Values to update a list | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + diff --git a/docs/ManageIp.md b/docs/ManageIp.md new file mode 100644 index 0000000..b79465d --- /dev/null +++ b/docs/ManageIp.md @@ -0,0 +1,10 @@ + +# ManageIp + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ip** | **String** | Dedicated ID | [optional] + + + diff --git a/docs/PostContactInfo.md b/docs/PostContactInfo.md new file mode 100644 index 0000000..8f70f5d --- /dev/null +++ b/docs/PostContactInfo.md @@ -0,0 +1,10 @@ + +# PostContactInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**contacts** | [**PostContactInfoContacts**](PostContactInfoContacts.md) | | + + + diff --git a/docs/PostContactInfoContacts.md b/docs/PostContactInfoContacts.md new file mode 100644 index 0000000..77900e8 --- /dev/null +++ b/docs/PostContactInfoContacts.md @@ -0,0 +1,11 @@ + +# PostContactInfoContacts + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **List<String>** | | +**failure** | **List<String>** | | [optional] + + + diff --git a/docs/PostSendFailed.md b/docs/PostSendFailed.md new file mode 100644 index 0000000..56523df --- /dev/null +++ b/docs/PostSendFailed.md @@ -0,0 +1,14 @@ + +# PostSendFailed + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **Long** | Response code | +**message** | **String** | Response message | +**unexistingEmails** | **List<String>** | | [optional] +**withoutListEmails** | **List<String>** | | [optional] +**blackListedEmails** | **List<String>** | | [optional] + + + diff --git a/docs/PostSendSmsTestFailed.md b/docs/PostSendSmsTestFailed.md new file mode 100644 index 0000000..0cbf9aa --- /dev/null +++ b/docs/PostSendSmsTestFailed.md @@ -0,0 +1,13 @@ + +# PostSendSmsTestFailed + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **Long** | Response code | +**message** | **String** | Response message | +**unexistingSms** | **List<String>** | | [optional] +**withoutListSms** | **List<String>** | | [optional] + + + diff --git a/docs/ProcessApi.md b/docs/ProcessApi.md new file mode 100644 index 0000000..55d9ebe --- /dev/null +++ b/docs/ProcessApi.md @@ -0,0 +1,118 @@ +# ProcessApi + +All URIs are relative to *https://api.sendinblue.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getProcess**](ProcessApi.md#getProcess) | **GET** /processes/{processId} | Return the informations for a process +[**getProcesses**](ProcessApi.md#getProcesses) | **GET** /processes | Return all the processes for your account + + + +# **getProcess** +> GetProcess getProcess(processId) + +Return the informations for a process + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ProcessApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ProcessApi apiInstance = new ProcessApi(); +Long processId = 789L; // Long | Id of the process +try { + GetProcess result = apiInstance.getProcess(processId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ProcessApi#getProcess"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **processId** | **Long**| Id of the process | + +### Return type + +[**GetProcess**](GetProcess.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getProcesses** +> GetProcesses getProcesses(limit, offset) + +Return all the processes for your account + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ProcessApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ProcessApi apiInstance = new ProcessApi(); +Long limit = 10L; // Long | Number limitation for the result returned +Long offset = 0L; // Long | Beginning point in the list to retrieve from. +try { + GetProcesses result = apiInstance.getProcesses(limit, offset); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ProcessApi#getProcesses"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **Long**| Number limitation for the result returned | [optional] [default to 10] + **offset** | **Long**| Beginning point in the list to retrieve from. | [optional] [default to 0] + +### Return type + +[**GetProcesses**](GetProcesses.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + diff --git a/docs/RemainingCreditModel.md b/docs/RemainingCreditModel.md new file mode 100644 index 0000000..ecf0478 --- /dev/null +++ b/docs/RemainingCreditModel.md @@ -0,0 +1,11 @@ + +# RemainingCreditModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**child** | [**RemainingCreditModelChild**](RemainingCreditModelChild.md) | | +**reseller** | [**RemainingCreditModelReseller**](RemainingCreditModelReseller.md) | | + + + diff --git a/docs/RemainingCreditModelChild.md b/docs/RemainingCreditModelChild.md new file mode 100644 index 0000000..0f05419 --- /dev/null +++ b/docs/RemainingCreditModelChild.md @@ -0,0 +1,11 @@ + +# RemainingCreditModelChild + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sms** | **Long** | SMS Credits remaining for child account | +**email** | **Long** | Email Credits remaining for child account | + + + diff --git a/docs/RemainingCreditModelReseller.md b/docs/RemainingCreditModelReseller.md new file mode 100644 index 0000000..09b8cb6 --- /dev/null +++ b/docs/RemainingCreditModelReseller.md @@ -0,0 +1,11 @@ + +# RemainingCreditModelReseller + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sms** | **Long** | SMS Credits remaining for reseller account | +**email** | **Long** | Email Credits remaining for reseller account | + + + diff --git a/docs/RemoveCredits.md b/docs/RemoveCredits.md new file mode 100644 index 0000000..c9c8011 --- /dev/null +++ b/docs/RemoveCredits.md @@ -0,0 +1,11 @@ + +# RemoveCredits + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sms** | **Long** | SMS credits to be removed from the child account | [optional] +**email** | **Long** | Email credits to be removed from the child account | [optional] + + + diff --git a/docs/RequestContactExport.md b/docs/RequestContactExport.md new file mode 100644 index 0000000..8071023 --- /dev/null +++ b/docs/RequestContactExport.md @@ -0,0 +1,12 @@ + +# RequestContactExport + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**exportAttributes** | **List<String>** | Name of attributes to export. These attributes must be in your contact database | [optional] +**contactFilter** | **Object** | Filter to apply to the export | +**notifyUrl** | **String** | Webhook that will be called once the export process is finished | [optional] + + + diff --git a/docs/RequestContactImport.md b/docs/RequestContactImport.md new file mode 100644 index 0000000..1c9ac1b --- /dev/null +++ b/docs/RequestContactImport.md @@ -0,0 +1,14 @@ + +# RequestContactImport + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fileUrl** | **String** | Mandatory if fileBody not defined. URL of the file to be imported (no local file). Possible file types: .txt, .csv | [optional] +**fileBody** | **String** | Mandatory if fileUrl is not defined. CSV content to be imported. Use semicolon to separate multiple attributes | [optional] +**listIds** | **List<Long>** | Manadatory if newList is not defined. Ids of the lists in which to add the contacts | [optional] +**notifyUrl** | **String** | URL that will be called once the export process is finished | [optional] +**newList** | [**RequestContactImportNewList**](RequestContactImportNewList.md) | | [optional] + + + diff --git a/docs/RequestContactImportNewList.md b/docs/RequestContactImportNewList.md new file mode 100644 index 0000000..3bc4fce --- /dev/null +++ b/docs/RequestContactImportNewList.md @@ -0,0 +1,11 @@ + +# RequestContactImportNewList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**listName** | **String** | List with listName will be created first and users will be imported in it (Mandatory if listIds is empty). | [optional] +**folderId** | **Long** | Folder id will be used with listName to make newly created list’s desired parent (Mandatory if listName is not empty). | [optional] + + + diff --git a/docs/RequestSmsRecipientExport.md b/docs/RequestSmsRecipientExport.md new file mode 100644 index 0000000..6481487 --- /dev/null +++ b/docs/RequestSmsRecipientExport.md @@ -0,0 +1,23 @@ + +# RequestSmsRecipientExport + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**notifyURL** | **String** | URL that will be called once the export process is finished | [optional] +**recipientsType** | [**RecipientsTypeEnum**](#RecipientsTypeEnum) | Filter the recipients based on how they interacted with the campaign | + + + +## Enum: RecipientsTypeEnum +Name | Value +---- | ----- +ALL | "all" +DELIVERED | "delivered" +ANSWERED | "answered" +SOFTBOUNCES | "softBounces" +HARDBOUNCES | "hardBounces" +UNSUBSCRIBED | "unsubscribed" + + + diff --git a/docs/ResellerApi.md b/docs/ResellerApi.md new file mode 100644 index 0000000..5490408 --- /dev/null +++ b/docs/ResellerApi.md @@ -0,0 +1,496 @@ +# ResellerApi + +All URIs are relative to *https://api.sendinblue.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addCredits**](ResellerApi.md#addCredits) | **POST** /reseller/children/{childAuthKey}/credits/add | Add Email and/or SMS credits to a specific child account +[**associateIpToChild**](ResellerApi.md#associateIpToChild) | **POST** /reseller/children/{childAuthKey}/ips/associate | Associate a dedicated IP to the child +[**createResellerChild**](ResellerApi.md#createResellerChild) | **POST** /reseller/children | Creates a reseller child +[**deleteResellerChild**](ResellerApi.md#deleteResellerChild) | **DELETE** /reseller/children/{childAuthKey} | Deletes a single reseller child based on the childAuthKey supplied +[**dissociateIpFromChild**](ResellerApi.md#dissociateIpFromChild) | **POST** /reseller/children/{childAuthKey}/ips/dissociate | Dissociate a dedicated IP to the child +[**getChildInfo**](ResellerApi.md#getChildInfo) | **GET** /reseller/children/{childAuthKey} | Gets the info about a specific child account +[**getResellerChilds**](ResellerApi.md#getResellerChilds) | **GET** /reseller/children | Gets the list of all reseller's children accounts +[**removeCredits**](ResellerApi.md#removeCredits) | **POST** /reseller/children/{childAuthKey}/credits/remove | Remove Email and/or SMS credits from a specific child account +[**updateResellerChild**](ResellerApi.md#updateResellerChild) | **PUT** /reseller/children/{childAuthKey} | Updates infos of reseller's child based on the childAuthKey supplied + + + +# **addCredits** +> RemainingCreditModel addCredits(childAuthKey, addCredits) + +Add Email and/or SMS credits to a specific child account + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ResellerApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ResellerApi apiInstance = new ResellerApi(); +String childAuthKey = "childAuthKey_example"; // String | auth key of reseller's child +AddCredits addCredits = new AddCredits(); // AddCredits | Values to post to add credit to a specific child account +try { + RemainingCreditModel result = apiInstance.addCredits(childAuthKey, addCredits); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ResellerApi#addCredits"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **childAuthKey** | **String**| auth key of reseller's child | + **addCredits** | [**AddCredits**](AddCredits.md)| Values to post to add credit to a specific child account | + +### Return type + +[**RemainingCreditModel**](RemainingCreditModel.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **associateIpToChild** +> associateIpToChild(childAuthKey, ip) + +Associate a dedicated IP to the child + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ResellerApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ResellerApi apiInstance = new ResellerApi(); +String childAuthKey = "childAuthKey_example"; // String | auth key of reseller's child +ManageIp ip = new ManageIp(); // ManageIp | IP to associate +try { + apiInstance.associateIpToChild(childAuthKey, ip); +} catch (ApiException e) { + System.err.println("Exception when calling ResellerApi#associateIpToChild"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **childAuthKey** | **String**| auth key of reseller's child | + **ip** | [**ManageIp**](ManageIp.md)| IP to associate | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **createResellerChild** +> CreateReseller createResellerChild(resellerChild) + +Creates a reseller child + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ResellerApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ResellerApi apiInstance = new ResellerApi(); +CreateChild resellerChild = new CreateChild(); // CreateChild | reseller child to add +try { + CreateReseller result = apiInstance.createResellerChild(resellerChild); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ResellerApi#createResellerChild"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **resellerChild** | [**CreateChild**](CreateChild.md)| reseller child to add | [optional] + +### Return type + +[**CreateReseller**](CreateReseller.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **deleteResellerChild** +> deleteResellerChild(childAuthKey) + +Deletes a single reseller child based on the childAuthKey supplied + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ResellerApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ResellerApi apiInstance = new ResellerApi(); +String childAuthKey = "childAuthKey_example"; // String | auth key of reseller's child +try { + apiInstance.deleteResellerChild(childAuthKey); +} catch (ApiException e) { + System.err.println("Exception when calling ResellerApi#deleteResellerChild"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **childAuthKey** | **String**| auth key of reseller's child | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **dissociateIpFromChild** +> dissociateIpFromChild(childAuthKey, ip) + +Dissociate a dedicated IP to the child + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ResellerApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ResellerApi apiInstance = new ResellerApi(); +String childAuthKey = "childAuthKey_example"; // String | auth key of reseller's child +ManageIp ip = new ManageIp(); // ManageIp | IP to dissociate +try { + apiInstance.dissociateIpFromChild(childAuthKey, ip); +} catch (ApiException e) { + System.err.println("Exception when calling ResellerApi#dissociateIpFromChild"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **childAuthKey** | **String**| auth key of reseller's child | + **ip** | [**ManageIp**](ManageIp.md)| IP to dissociate | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getChildInfo** +> GetChildInfo getChildInfo(childAuthKey) + +Gets the info about a specific child account + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ResellerApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ResellerApi apiInstance = new ResellerApi(); +String childAuthKey = "childAuthKey_example"; // String | auth key of reseller's child +try { + GetChildInfo result = apiInstance.getChildInfo(childAuthKey); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ResellerApi#getChildInfo"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **childAuthKey** | **String**| auth key of reseller's child | + +### Return type + +[**GetChildInfo**](GetChildInfo.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getResellerChilds** +> GetChildrenList getResellerChilds() + +Gets the list of all reseller's children accounts + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ResellerApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ResellerApi apiInstance = new ResellerApi(); +try { + GetChildrenList result = apiInstance.getResellerChilds(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ResellerApi#getResellerChilds"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**GetChildrenList**](GetChildrenList.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **removeCredits** +> RemainingCreditModel removeCredits(childAuthKey, removeCredits) + +Remove Email and/or SMS credits from a specific child account + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ResellerApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ResellerApi apiInstance = new ResellerApi(); +String childAuthKey = "childAuthKey_example"; // String | auth key of reseller's child +RemoveCredits removeCredits = new RemoveCredits(); // RemoveCredits | Values to post to remove email or SMS credits from a specific child account +try { + RemainingCreditModel result = apiInstance.removeCredits(childAuthKey, removeCredits); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ResellerApi#removeCredits"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **childAuthKey** | **String**| auth key of reseller's child | + **removeCredits** | [**RemoveCredits**](RemoveCredits.md)| Values to post to remove email or SMS credits from a specific child account | + +### Return type + +[**RemainingCreditModel**](RemainingCreditModel.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **updateResellerChild** +> updateResellerChild(childAuthKey, resellerChild) + +Updates infos of reseller's child based on the childAuthKey supplied + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.ResellerApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +ResellerApi apiInstance = new ResellerApi(); +String childAuthKey = "childAuthKey_example"; // String | auth key of reseller's child +UpdateChild resellerChild = new UpdateChild(); // UpdateChild | values to update in child profile +try { + apiInstance.updateResellerChild(childAuthKey, resellerChild); +} catch (ApiException e) { + System.err.println("Exception when calling ResellerApi#updateResellerChild"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **childAuthKey** | **String**| auth key of reseller's child | + **resellerChild** | [**UpdateChild**](UpdateChild.md)| values to update in child profile | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + diff --git a/docs/SendEmail.md b/docs/SendEmail.md new file mode 100644 index 0000000..bce3353 --- /dev/null +++ b/docs/SendEmail.md @@ -0,0 +1,17 @@ + +# SendEmail + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**emailTo** | **List<String>** | Email addresses of the recipients | +**emailBcc** | **List<String>** | Email addresses of the recipients in bcc | [optional] +**emailCc** | **List<String>** | Email addresses of the recipients in cc | [optional] +**replyTo** | **String** | Email on which campaign recipients will be able to reply to | [optional] +**attachmentUrl** | **String** | Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps | [optional] +**attachment** | [**List<SendEmailAttachment>**](SendEmailAttachment.md) | Pass the base64 content of the attachment. Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps | [optional] +**headers** | **Map<String, String>** | | [optional] +**attributes** | **Map<String, String>** | | [optional] + + + diff --git a/docs/SendEmailAttachment.md b/docs/SendEmailAttachment.md new file mode 100644 index 0000000..1a6fa6a --- /dev/null +++ b/docs/SendEmailAttachment.md @@ -0,0 +1,11 @@ + +# SendEmailAttachment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **byte[]** | Base64 encoded chunk data of the attachment generated on the fly | [optional] +**name** | **String** | Required for content. Name of the attachment | [optional] + + + diff --git a/docs/SendReport.md b/docs/SendReport.md new file mode 100644 index 0000000..9d0bec2 --- /dev/null +++ b/docs/SendReport.md @@ -0,0 +1,23 @@ + +# SendReport + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**language** | [**LanguageEnum**](#LanguageEnum) | Language of email content for campaign report sending. | [optional] +**email** | [**SendReportEmail**](SendReportEmail.md) | | + + + +## Enum: LanguageEnum +Name | Value +---- | ----- +FR | "fr" +ES | "es" +PT | "pt" +IT | "it" +DE | "de" +EN | "en" + + + diff --git a/docs/SendReportEmail.md b/docs/SendReportEmail.md new file mode 100644 index 0000000..1b18d48 --- /dev/null +++ b/docs/SendReportEmail.md @@ -0,0 +1,23 @@ + +# SendReportEmail + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**subject** | **String** | Subject of the email message | [optional] +**to** | **List<String>** | Email addresses of the recipients | [optional] +**contentType** | [**ContentTypeEnum**](#ContentTypeEnum) | Type of the message body | [optional] +**bcc** | **List<String>** | Email addresses of the recipients in bcc | [optional] +**cc** | **List<String>** | Email addresses of the recipients in cc | [optional] +**body** | **String** | Body of the email message | [optional] + + + +## Enum: ContentTypeEnum +Name | Value +---- | ----- +TEXT | "text" +HTML | "html" + + + diff --git a/docs/SendSms.md b/docs/SendSms.md new file mode 100644 index 0000000..1641b94 --- /dev/null +++ b/docs/SendSms.md @@ -0,0 +1,11 @@ + +# SendSms + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reference** | **String** | | +**messageId** | **Long** | | + + + diff --git a/docs/SendSmtpEmail.md b/docs/SendSmtpEmail.md new file mode 100644 index 0000000..a7352a2 --- /dev/null +++ b/docs/SendSmtpEmail.md @@ -0,0 +1,21 @@ + +# SendSmtpEmail + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sender** | [**SendSmtpEmailSender**](SendSmtpEmailSender.md) | | +**to** | [**List<SendSmtpEmailTo>**](SendSmtpEmailTo.md) | Email addresses and names of the recipients | +**bcc** | [**List<SendSmtpEmailBcc>**](SendSmtpEmailBcc.md) | Email addresses and names of the recipients in bcc | [optional] +**cc** | [**List<SendSmtpEmailCc>**](SendSmtpEmailCc.md) | Email addresses and names of the recipients in cc | [optional] +**htmlContent** | **String** | HTML body of the message ( Ignored if templateId is passed ) | +**textContent** | **String** | Plain Text body of the message ( Ignored if templateId is passed ) | [optional] +**subject** | **String** | Subject of the message | +**replyTo** | [**SendSmtpEmailReplyTo**](SendSmtpEmailReplyTo.md) | | [optional] +**attachment** | [**List<SendSmtpEmailAttachment>**](SendSmtpEmailAttachment.md) | Pass the absolute URL (no local file) or the base64 content of the attachment. Name can be used in both cases to define the attachment name. It is mandatory in case of content. Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps | [optional] +**headers** | **Map<String, String>** | | [optional] +**templateId** | **Long** | Id of the template | [optional] +**params** | **Map<String, String>** | | [optional] + + + diff --git a/docs/SendSmtpEmailAttachment.md b/docs/SendSmtpEmailAttachment.md new file mode 100644 index 0000000..c946cc7 --- /dev/null +++ b/docs/SendSmtpEmailAttachment.md @@ -0,0 +1,12 @@ + +# SendSmtpEmailAttachment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **String** | Absolute url of the attachment (no local file). | [optional] +**content** | **byte[]** | Base64 encoded chunk data of the attachment generated on the fly | [optional] +**name** | **String** | Required for content. Name of the attachment | [optional] + + + diff --git a/docs/SendSmtpEmailBcc.md b/docs/SendSmtpEmailBcc.md new file mode 100644 index 0000000..32a903f --- /dev/null +++ b/docs/SendSmtpEmailBcc.md @@ -0,0 +1,11 @@ + +# SendSmtpEmailBcc + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | Email address of the recipient in bcc | +**name** | **String** | Name of the recipient in bcc | [optional] + + + diff --git a/docs/SendSmtpEmailCc.md b/docs/SendSmtpEmailCc.md new file mode 100644 index 0000000..7b2636e --- /dev/null +++ b/docs/SendSmtpEmailCc.md @@ -0,0 +1,11 @@ + +# SendSmtpEmailCc + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | Email address of the recipient in cc | +**name** | **String** | Name of the recipient in cc | [optional] + + + diff --git a/docs/SendSmtpEmailReplyTo.md b/docs/SendSmtpEmailReplyTo.md new file mode 100644 index 0000000..2127eb0 --- /dev/null +++ b/docs/SendSmtpEmailReplyTo.md @@ -0,0 +1,11 @@ + +# SendSmtpEmailReplyTo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | Email address in reply to | +**name** | **String** | Name in reply to | [optional] + + + diff --git a/docs/SendSmtpEmailSender.md b/docs/SendSmtpEmailSender.md new file mode 100644 index 0000000..c2215fe --- /dev/null +++ b/docs/SendSmtpEmailSender.md @@ -0,0 +1,11 @@ + +# SendSmtpEmailSender + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Sender Name from which the emails are sent | [optional] +**email** | **String** | Sender Email from which the emails are sent | + + + diff --git a/docs/SendSmtpEmailTo.md b/docs/SendSmtpEmailTo.md new file mode 100644 index 0000000..b3405de --- /dev/null +++ b/docs/SendSmtpEmailTo.md @@ -0,0 +1,11 @@ + +# SendSmtpEmailTo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | Email address of the recipient | +**name** | **String** | Name of the recipient | [optional] + + + diff --git a/docs/SendTemplateEmail.md b/docs/SendTemplateEmail.md new file mode 100644 index 0000000..f737402 --- /dev/null +++ b/docs/SendTemplateEmail.md @@ -0,0 +1,10 @@ + +# SendTemplateEmail + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**messageId** | **String** | Message ID of the template Email sent | + + + diff --git a/docs/SendTestEmail.md b/docs/SendTestEmail.md new file mode 100644 index 0000000..992e722 --- /dev/null +++ b/docs/SendTestEmail.md @@ -0,0 +1,10 @@ + +# SendTestEmail + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**emailTo** | **List<String>** | If empty the test email will be sent to your entire test list. Use this field to send it to specific addresses in your list. | [optional] + + + diff --git a/docs/SendTestSms.md b/docs/SendTestSms.md new file mode 100644 index 0000000..00c42a6 --- /dev/null +++ b/docs/SendTestSms.md @@ -0,0 +1,10 @@ + +# SendTestSms + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**phoneNumbers** | **List<String>** | Mobile number with the country code to send test SMS. The mobile number defined here must belong to one of your contacts in SendinBlue account and must not be blacklisted | [optional] + + + diff --git a/docs/SendTransacSms.md b/docs/SendTransacSms.md new file mode 100644 index 0000000..e8faf93 --- /dev/null +++ b/docs/SendTransacSms.md @@ -0,0 +1,23 @@ + +# SendTransacSms + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sender** | **String** | Name of the sender. Only alphanumeric characters. No more than 11 characters | +**recipient** | **String** | Mobile number to send SMS with the country code | +**content** | **String** | Content of the message. If more than 160 characters long, multiple text messages will be sent | +**type** | [**TypeEnum**](#TypeEnum) | Type of the SMS | [optional] +**tag** | **String** | Tag of the message | [optional] +**webUrl** | **String** | Webhook to call for each event triggered by the message (delivered etc.) | [optional] + + + +## Enum: TypeEnum +Name | Value +---- | ----- +TRANSACTIONAL | "transactional" +MARKETING | "marketing" + + + diff --git a/docs/SendersApi.md b/docs/SendersApi.md new file mode 100644 index 0000000..ac3d076 --- /dev/null +++ b/docs/SendersApi.md @@ -0,0 +1,330 @@ +# SendersApi + +All URIs are relative to *https://api.sendinblue.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createSender**](SendersApi.md#createSender) | **POST** /senders | Create a new sender +[**deleteSender**](SendersApi.md#deleteSender) | **DELETE** /senders/{senderId} | Delete a sender +[**getIps**](SendersApi.md#getIps) | **GET** /senders/ips | Return all the dedicated IPs for your account +[**getIpsFromSender**](SendersApi.md#getIpsFromSender) | **GET** /senders/{senderId}/ips | Return all the dedicated IPs for a sender +[**getSenders**](SendersApi.md#getSenders) | **GET** /senders | Get the list of all your senders +[**updateSender**](SendersApi.md#updateSender) | **PUT** /senders/{senderId} | Update a sender + + + +# **createSender** +> CreateSenderModel createSender(sender) + +Create a new sender + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.SendersApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +SendersApi apiInstance = new SendersApi(); +CreateSender sender = new CreateSender(); // CreateSender | sender's name +try { + CreateSenderModel result = apiInstance.createSender(sender); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SendersApi#createSender"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sender** | [**CreateSender**](CreateSender.md)| sender's name | [optional] + +### Return type + +[**CreateSenderModel**](CreateSenderModel.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **deleteSender** +> deleteSender(senderId) + +Delete a sender + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.SendersApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +SendersApi apiInstance = new SendersApi(); +Long senderId = 789L; // Long | Id of the sender +try { + apiInstance.deleteSender(senderId); +} catch (ApiException e) { + System.err.println("Exception when calling SendersApi#deleteSender"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **senderId** | **Long**| Id of the sender | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getIps** +> GetIps getIps() + +Return all the dedicated IPs for your account + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.SendersApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +SendersApi apiInstance = new SendersApi(); +try { + GetIps result = apiInstance.getIps(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SendersApi#getIps"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**GetIps**](GetIps.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getIpsFromSender** +> GetIpsFromSender getIpsFromSender(senderId) + +Return all the dedicated IPs for a sender + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.SendersApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +SendersApi apiInstance = new SendersApi(); +Long senderId = 789L; // Long | Id of the sender +try { + GetIpsFromSender result = apiInstance.getIpsFromSender(senderId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SendersApi#getIpsFromSender"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **senderId** | **Long**| Id of the sender | + +### Return type + +[**GetIpsFromSender**](GetIpsFromSender.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getSenders** +> GetSendersList getSenders(ip, domain) + +Get the list of all your senders + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.SendersApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +SendersApi apiInstance = new SendersApi(); +String ip = "ip_example"; // String | Filter your senders for a specific ip (available for dedicated IP usage only) +String domain = "domain_example"; // String | Filter your senders for a specific domain +try { + GetSendersList result = apiInstance.getSenders(ip, domain); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SendersApi#getSenders"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ip** | **String**| Filter your senders for a specific ip (available for dedicated IP usage only) | [optional] + **domain** | **String**| Filter your senders for a specific domain | [optional] + +### Return type + +[**GetSendersList**](GetSendersList.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **updateSender** +> updateSender(senderId, sender) + +Update a sender + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.SendersApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +SendersApi apiInstance = new SendersApi(); +Long senderId = 789L; // Long | Id of the sender +UpdateSender sender = new UpdateSender(); // UpdateSender | sender's name +try { + apiInstance.updateSender(senderId, sender); +} catch (ApiException e) { + System.err.println("Exception when calling SendersApi#updateSender"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **senderId** | **Long**| Id of the sender | + **sender** | [**UpdateSender**](UpdateSender.md)| sender's name | [optional] + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + diff --git a/docs/SmsCampaignsApi.md b/docs/SmsCampaignsApi.md new file mode 100644 index 0000000..f053b61 --- /dev/null +++ b/docs/SmsCampaignsApi.md @@ -0,0 +1,562 @@ +# SmsCampaignsApi + +All URIs are relative to *https://api.sendinblue.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createSmsCampaign**](SmsCampaignsApi.md#createSmsCampaign) | **POST** /smsCampaigns | Creates an SMS campaign +[**deleteSmsCampaign**](SmsCampaignsApi.md#deleteSmsCampaign) | **DELETE** /smsCampaigns/{campaignId} | Delete the SMS campaign +[**getSmsCampaign**](SmsCampaignsApi.md#getSmsCampaign) | **GET** /smsCampaigns/{campaignId} | Get an SMS campaign +[**getSmsCampaigns**](SmsCampaignsApi.md#getSmsCampaigns) | **GET** /smsCampaigns | Returns the informations for all your created SMS campaigns +[**requestSmsRecipientExport**](SmsCampaignsApi.md#requestSmsRecipientExport) | **POST** /smsCampaigns/{campaignId}/exportRecipients | Exports the recipients of the specified campaign. +[**sendSmsCampaignNow**](SmsCampaignsApi.md#sendSmsCampaignNow) | **POST** /smsCampaigns/{campaignId}/sendNow | Send your SMS campaign immediately +[**sendSmsReport**](SmsCampaignsApi.md#sendSmsReport) | **POST** /smsCampaigns/{campaignId}/sendReport | Send report of SMS campaigns +[**sendTestSms**](SmsCampaignsApi.md#sendTestSms) | **POST** /smsCampaigns/{campaignId}/sendTest | Send an SMS +[**updateSmsCampaign**](SmsCampaignsApi.md#updateSmsCampaign) | **PUT** /smsCampaigns/{campaignId} | Updates an SMS campaign +[**updateSmsCampaignStatus**](SmsCampaignsApi.md#updateSmsCampaignStatus) | **PUT** /smsCampaigns/{campaignId}/status | Update the campaign status + + + +# **createSmsCampaign** +> CreateModel createSmsCampaign(createSmsCampaign) + +Creates an SMS campaign + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.SmsCampaignsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +SmsCampaignsApi apiInstance = new SmsCampaignsApi(); +CreateSmsCampaign createSmsCampaign = new CreateSmsCampaign(); // CreateSmsCampaign | Values to create an SMS Campaign +try { + CreateModel result = apiInstance.createSmsCampaign(createSmsCampaign); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SmsCampaignsApi#createSmsCampaign"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createSmsCampaign** | [**CreateSmsCampaign**](CreateSmsCampaign.md)| Values to create an SMS Campaign | + +### Return type + +[**CreateModel**](CreateModel.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **deleteSmsCampaign** +> deleteSmsCampaign(campaignId) + +Delete the SMS campaign + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.SmsCampaignsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +SmsCampaignsApi apiInstance = new SmsCampaignsApi(); +Long campaignId = 789L; // Long | id of the SMS campaign +try { + apiInstance.deleteSmsCampaign(campaignId); +} catch (ApiException e) { + System.err.println("Exception when calling SmsCampaignsApi#deleteSmsCampaign"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **Long**| id of the SMS campaign | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getSmsCampaign** +> GetSmsCampaign getSmsCampaign(campaignId, getSmsCampaign) + +Get an SMS campaign + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.SmsCampaignsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +SmsCampaignsApi apiInstance = new SmsCampaignsApi(); +Long campaignId = 789L; // Long | id of the SMS campaign +GetSmsCampaign getSmsCampaign = new GetSmsCampaign(); // GetSmsCampaign | Values to update an SMS Campaign +try { + GetSmsCampaign result = apiInstance.getSmsCampaign(campaignId, getSmsCampaign); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SmsCampaignsApi#getSmsCampaign"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **Long**| id of the SMS campaign | + **getSmsCampaign** | [**GetSmsCampaign**](GetSmsCampaign.md)| Values to update an SMS Campaign | + +### Return type + +[**GetSmsCampaign**](GetSmsCampaign.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getSmsCampaigns** +> GetSmsCampaigns getSmsCampaigns(status, limit, offset) + +Returns the informations for all your created SMS campaigns + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.SmsCampaignsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +SmsCampaignsApi apiInstance = new SmsCampaignsApi(); +String status = "status_example"; // String | Status of campaign. +Long limit = 500L; // Long | Number limitation for the result returned +Long offset = 0L; // Long | Beginning point in the list to retrieve from. +try { + GetSmsCampaigns result = apiInstance.getSmsCampaigns(status, limit, offset); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SmsCampaignsApi#getSmsCampaigns"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | **String**| Status of campaign. | [optional] [enum: suspended, archived, sent, queued, draft, inProcess] + **limit** | **Long**| Number limitation for the result returned | [optional] [default to 500] + **offset** | **Long**| Beginning point in the list to retrieve from. | [optional] [default to 0] + +### Return type + +[**GetSmsCampaigns**](GetSmsCampaigns.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **requestSmsRecipientExport** +> CreatedProcessId requestSmsRecipientExport(campaignId, recipientExport) + +Exports the recipients of the specified campaign. + +It returns the background process ID which on completion calls the notify URL that you have set in the input. + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.SmsCampaignsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +SmsCampaignsApi apiInstance = new SmsCampaignsApi(); +Long campaignId = 789L; // Long | id of the campaign +RequestSmsRecipientExport recipientExport = new RequestSmsRecipientExport(); // RequestSmsRecipientExport | Values to send for a recipient export request +try { + CreatedProcessId result = apiInstance.requestSmsRecipientExport(campaignId, recipientExport); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SmsCampaignsApi#requestSmsRecipientExport"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **Long**| id of the campaign | + **recipientExport** | [**RequestSmsRecipientExport**](RequestSmsRecipientExport.md)| Values to send for a recipient export request | [optional] + +### Return type + +[**CreatedProcessId**](CreatedProcessId.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **sendSmsCampaignNow** +> sendSmsCampaignNow(campaignId) + +Send your SMS campaign immediately + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.SmsCampaignsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +SmsCampaignsApi apiInstance = new SmsCampaignsApi(); +Long campaignId = 789L; // Long | id of the campaign +try { + apiInstance.sendSmsCampaignNow(campaignId); +} catch (ApiException e) { + System.err.println("Exception when calling SmsCampaignsApi#sendSmsCampaignNow"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **Long**| id of the campaign | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **sendSmsReport** +> sendSmsReport(campaignId, sendReport) + +Send report of SMS campaigns + +Send report of Sent and Archived campaign, to the specified email addresses, with respective data and a pdf attachment in detail. + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.SmsCampaignsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +SmsCampaignsApi apiInstance = new SmsCampaignsApi(); +Long campaignId = 789L; // Long | id of the campaign +SendReport sendReport = new SendReport(); // SendReport | Values for send a report +try { + apiInstance.sendSmsReport(campaignId, sendReport); +} catch (ApiException e) { + System.err.println("Exception when calling SmsCampaignsApi#sendSmsReport"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **Long**| id of the campaign | + **sendReport** | [**SendReport**](SendReport.md)| Values for send a report | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **sendTestSms** +> sendTestSms(campaignId, sendTestSms) + +Send an SMS + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.SmsCampaignsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +SmsCampaignsApi apiInstance = new SmsCampaignsApi(); +Long campaignId = 789L; // Long | Id of the SMS campaign +SendTestSms sendTestSms = new SendTestSms(); // SendTestSms | Mobile number to which send the test +try { + apiInstance.sendTestSms(campaignId, sendTestSms); +} catch (ApiException e) { + System.err.println("Exception when calling SmsCampaignsApi#sendTestSms"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **Long**| Id of the SMS campaign | + **sendTestSms** | [**SendTestSms**](SendTestSms.md)| Mobile number to which send the test | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **updateSmsCampaign** +> updateSmsCampaign(campaignId, updateSmsCampaign) + +Updates an SMS campaign + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.SmsCampaignsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +SmsCampaignsApi apiInstance = new SmsCampaignsApi(); +Long campaignId = 789L; // Long | id of the SMS campaign +UpdateSmsCampaign updateSmsCampaign = new UpdateSmsCampaign(); // UpdateSmsCampaign | Values to update an SMS Campaign +try { + apiInstance.updateSmsCampaign(campaignId, updateSmsCampaign); +} catch (ApiException e) { + System.err.println("Exception when calling SmsCampaignsApi#updateSmsCampaign"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **Long**| id of the SMS campaign | + **updateSmsCampaign** | [**UpdateSmsCampaign**](UpdateSmsCampaign.md)| Values to update an SMS Campaign | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **updateSmsCampaignStatus** +> updateSmsCampaignStatus(campaignId, status) + +Update the campaign status + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.SmsCampaignsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +SmsCampaignsApi apiInstance = new SmsCampaignsApi(); +Long campaignId = 789L; // Long | id of the campaign +UpdateCampaignStatus status = new UpdateCampaignStatus(); // UpdateCampaignStatus | Status of the campaign. +try { + apiInstance.updateSmsCampaignStatus(campaignId, status); +} catch (ApiException e) { + System.err.println("Exception when calling SmsCampaignsApi#updateSmsCampaignStatus"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **Long**| id of the campaign | + **status** | [**UpdateCampaignStatus**](UpdateCampaignStatus.md)| Status of the campaign. | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + diff --git a/docs/SmtpApi.md b/docs/SmtpApi.md new file mode 100644 index 0000000..f0e9538 --- /dev/null +++ b/docs/SmtpApi.md @@ -0,0 +1,698 @@ +# SmtpApi + +All URIs are relative to *https://api.sendinblue.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createSmtpTemplate**](SmtpApi.md#createSmtpTemplate) | **POST** /smtp/templates | Create an smtp template +[**deleteHardbounces**](SmtpApi.md#deleteHardbounces) | **POST** /smtp/deleteHardbounces | Delete hardbounces +[**deleteSmtpTemplate**](SmtpApi.md#deleteSmtpTemplate) | **DELETE** /smtp/templates/{templateId} | Delete an inactive smtp template +[**getAggregatedSmtpReport**](SmtpApi.md#getAggregatedSmtpReport) | **GET** /smtp/statistics/aggregatedReport | Get your SMTP activity aggregated over a period of time +[**getEmailEventReport**](SmtpApi.md#getEmailEventReport) | **GET** /smtp/statistics/events | Get all your SMTP activity (unaggregated events) +[**getSmtpReport**](SmtpApi.md#getSmtpReport) | **GET** /smtp/statistics/reports | Get your SMTP activity aggregated per day +[**getSmtpTemplate**](SmtpApi.md#getSmtpTemplate) | **GET** /smtp/templates/{templateId} | Returns the template informations +[**getSmtpTemplates**](SmtpApi.md#getSmtpTemplates) | **GET** /smtp/templates | Get the list of SMTP templates +[**sendTemplate**](SmtpApi.md#sendTemplate) | **POST** /smtp/templates/{templateId}/send | Send a template +[**sendTestTemplate**](SmtpApi.md#sendTestTemplate) | **POST** /smtp/templates/{templateId}/sendTest | Send a template to your test list +[**sendTransacEmail**](SmtpApi.md#sendTransacEmail) | **POST** /smtp/email | Send a transactional email +[**updateSmtpTemplate**](SmtpApi.md#updateSmtpTemplate) | **PUT** /smtp/templates/{templateId} | Updates an smtp templates + + + +# **createSmtpTemplate** +> CreateModel createSmtpTemplate(smtpTemplate) + +Create an smtp template + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.SmtpApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +SmtpApi apiInstance = new SmtpApi(); +CreateSmtpTemplate smtpTemplate = new CreateSmtpTemplate(); // CreateSmtpTemplate | values to update in smtp template +try { + CreateModel result = apiInstance.createSmtpTemplate(smtpTemplate); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SmtpApi#createSmtpTemplate"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **smtpTemplate** | [**CreateSmtpTemplate**](CreateSmtpTemplate.md)| values to update in smtp template | + +### Return type + +[**CreateModel**](CreateModel.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **deleteHardbounces** +> deleteHardbounces(deleteHardbounces) + +Delete hardbounces + +Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures) + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.SmtpApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +SmtpApi apiInstance = new SmtpApi(); +DeleteHardbounces deleteHardbounces = new DeleteHardbounces(); // DeleteHardbounces | values to delete hardbounces +try { + apiInstance.deleteHardbounces(deleteHardbounces); +} catch (ApiException e) { + System.err.println("Exception when calling SmtpApi#deleteHardbounces"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deleteHardbounces** | [**DeleteHardbounces**](DeleteHardbounces.md)| values to delete hardbounces | [optional] + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **deleteSmtpTemplate** +> deleteSmtpTemplate(templateId) + +Delete an inactive smtp template + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.SmtpApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +SmtpApi apiInstance = new SmtpApi(); +Long templateId = 789L; // Long | id of the template +try { + apiInstance.deleteSmtpTemplate(templateId); +} catch (ApiException e) { + System.err.println("Exception when calling SmtpApi#deleteSmtpTemplate"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **Long**| id of the template | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getAggregatedSmtpReport** +> GetAggregatedReport getAggregatedSmtpReport(startDate, endDate, days, tag) + +Get your SMTP activity aggregated over a period of time + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.SmtpApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +SmtpApi apiInstance = new SmtpApi(); +LocalDate startDate = new LocalDate(); // LocalDate | Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate +LocalDate endDate = new LocalDate(); // LocalDate | Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate +Integer days = 56; // Integer | Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' +String tag = "tag_example"; // String | Tag of the emails +try { + GetAggregatedReport result = apiInstance.getAggregatedSmtpReport(startDate, endDate, days, tag); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SmtpApi#getAggregatedSmtpReport"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **startDate** | **LocalDate**| Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate | [optional] + **endDate** | **LocalDate**| Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate | [optional] + **days** | **Integer**| Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' | [optional] + **tag** | **String**| Tag of the emails | [optional] + +### Return type + +[**GetAggregatedReport**](GetAggregatedReport.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getEmailEventReport** +> GetEmailEventReport getEmailEventReport(limit, offset, startDate, endDate, days, email, event, tags, messageId, templateId) + +Get all your SMTP activity (unaggregated events) + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.SmtpApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +SmtpApi apiInstance = new SmtpApi(); +Long limit = 50L; // Long | Number limitation for the result returned +Long offset = 0L; // Long | Beginning point in the list to retrieve from. +LocalDate startDate = new LocalDate(); // LocalDate | Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate +LocalDate endDate = new LocalDate(); // LocalDate | Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate +Integer days = 56; // Integer | Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' +String email = "email_example"; // String | Filter the report for a specific email addresses +String event = "event_example"; // String | Filter the report for a specific event type +String tags = "tags_example"; // String | Filter the report for tags (serialized and urlencoded array) +String messageId = "messageId_example"; // String | Filter on a specific message id +Long templateId = 789L; // Long | Filter on a specific template id +try { + GetEmailEventReport result = apiInstance.getEmailEventReport(limit, offset, startDate, endDate, days, email, event, tags, messageId, templateId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SmtpApi#getEmailEventReport"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **Long**| Number limitation for the result returned | [optional] [default to 50] + **offset** | **Long**| Beginning point in the list to retrieve from. | [optional] [default to 0] + **startDate** | **LocalDate**| Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate | [optional] + **endDate** | **LocalDate**| Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate | [optional] + **days** | **Integer**| Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' | [optional] + **email** | **String**| Filter the report for a specific email addresses | [optional] + **event** | **String**| Filter the report for a specific event type | [optional] [enum: bounces, hardBounces, softBounces, delivered, spam, requests, opened, clicks, invalid, deferred, blocked] + **tags** | **String**| Filter the report for tags (serialized and urlencoded array) | [optional] + **messageId** | **String**| Filter on a specific message id | [optional] + **templateId** | **Long**| Filter on a specific template id | [optional] + +### Return type + +[**GetEmailEventReport**](GetEmailEventReport.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getSmtpReport** +> GetReports getSmtpReport(limit, offset, startDate, endDate, days, tag) + +Get your SMTP activity aggregated per day + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.SmtpApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +SmtpApi apiInstance = new SmtpApi(); +Long limit = 50L; // Long | Number of documents returned per page +Long offset = 0L; // Long | Index of the first document on the page +LocalDate startDate = new LocalDate(); // LocalDate | Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) +LocalDate endDate = new LocalDate(); // LocalDate | Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) +Integer days = 56; // Integer | Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' +String tag = "tag_example"; // String | Tag of the emails +try { + GetReports result = apiInstance.getSmtpReport(limit, offset, startDate, endDate, days, tag); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SmtpApi#getSmtpReport"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **Long**| Number of documents returned per page | [optional] [default to 50] + **offset** | **Long**| Index of the first document on the page | [optional] [default to 0] + **startDate** | **LocalDate**| Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) | [optional] + **endDate** | **LocalDate**| Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) | [optional] + **days** | **Integer**| Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' | [optional] + **tag** | **String**| Tag of the emails | [optional] + +### Return type + +[**GetReports**](GetReports.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getSmtpTemplate** +> GetSmtpTemplateOverview getSmtpTemplate(templateId) + +Returns the template informations + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.SmtpApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +SmtpApi apiInstance = new SmtpApi(); +Long templateId = 789L; // Long | id of the template +try { + GetSmtpTemplateOverview result = apiInstance.getSmtpTemplate(templateId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SmtpApi#getSmtpTemplate"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **Long**| id of the template | + +### Return type + +[**GetSmtpTemplateOverview**](GetSmtpTemplateOverview.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getSmtpTemplates** +> GetSmtpTemplates getSmtpTemplates(templateStatus, limit, offset) + +Get the list of SMTP templates + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.SmtpApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +SmtpApi apiInstance = new SmtpApi(); +Boolean templateStatus = true; // Boolean | Filter on the status of the template. Active = true, inactive = false +Long limit = 50L; // Long | Number of documents returned per page +Long offset = 0L; // Long | Index of the first document in the page +try { + GetSmtpTemplates result = apiInstance.getSmtpTemplates(templateStatus, limit, offset); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SmtpApi#getSmtpTemplates"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateStatus** | **Boolean**| Filter on the status of the template. Active = true, inactive = false | [optional] + **limit** | **Long**| Number of documents returned per page | [optional] [default to 50] + **offset** | **Long**| Index of the first document in the page | [optional] [default to 0] + +### Return type + +[**GetSmtpTemplates**](GetSmtpTemplates.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **sendTemplate** +> SendTemplateEmail sendTemplate(templateId, sendEmail) + +Send a template + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.SmtpApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +SmtpApi apiInstance = new SmtpApi(); +Long templateId = 789L; // Long | Id of the template +SendEmail sendEmail = new SendEmail(); // SendEmail | +try { + SendTemplateEmail result = apiInstance.sendTemplate(templateId, sendEmail); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SmtpApi#sendTemplate"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **Long**| Id of the template | + **sendEmail** | [**SendEmail**](SendEmail.md)| | + +### Return type + +[**SendTemplateEmail**](SendTemplateEmail.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **sendTestTemplate** +> sendTestTemplate(templateId, sendTestEmail) + +Send a template to your test list + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.SmtpApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +SmtpApi apiInstance = new SmtpApi(); +Long templateId = 789L; // Long | Id of the template +SendTestEmail sendTestEmail = new SendTestEmail(); // SendTestEmail | +try { + apiInstance.sendTestTemplate(templateId, sendTestEmail); +} catch (ApiException e) { + System.err.println("Exception when calling SmtpApi#sendTestTemplate"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **Long**| Id of the template | + **sendTestEmail** | [**SendTestEmail**](SendTestEmail.md)| | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **sendTransacEmail** +> CreateSmtpEmail sendTransacEmail(sendSmtpEmail) + +Send a transactional email + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.SmtpApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +SmtpApi apiInstance = new SmtpApi(); +SendSmtpEmail sendSmtpEmail = new SendSmtpEmail(); // SendSmtpEmail | Values to send a transactional email +try { + CreateSmtpEmail result = apiInstance.sendTransacEmail(sendSmtpEmail); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SmtpApi#sendTransacEmail"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sendSmtpEmail** | [**SendSmtpEmail**](SendSmtpEmail.md)| Values to send a transactional email | + +### Return type + +[**CreateSmtpEmail**](CreateSmtpEmail.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **updateSmtpTemplate** +> updateSmtpTemplate(templateId, smtpTemplate) + +Updates an smtp templates + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.SmtpApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +SmtpApi apiInstance = new SmtpApi(); +Long templateId = 789L; // Long | id of the template +UpdateSmtpTemplate smtpTemplate = new UpdateSmtpTemplate(); // UpdateSmtpTemplate | values to update in smtp template +try { + apiInstance.updateSmtpTemplate(templateId, smtpTemplate); +} catch (ApiException e) { + System.err.println("Exception when calling SmtpApi#updateSmtpTemplate"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **Long**| id of the template | + **smtpTemplate** | [**UpdateSmtpTemplate**](UpdateSmtpTemplate.md)| values to update in smtp template | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + diff --git a/docs/TransactionalSmsApi.md b/docs/TransactionalSmsApi.md new file mode 100644 index 0000000..bd00671 --- /dev/null +++ b/docs/TransactionalSmsApi.md @@ -0,0 +1,250 @@ +# TransactionalSmsApi + +All URIs are relative to *https://api.sendinblue.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getSmsEvents**](TransactionalSmsApi.md#getSmsEvents) | **GET** /transactionalSMS/statistics/events | Get all the SMS activity (unaggregated events) +[**getTransacAggregatedSmsReport**](TransactionalSmsApi.md#getTransacAggregatedSmsReport) | **GET** /transactionalSMS/statistics/aggregatedReport | Get your SMS activity aggregated over a period of time +[**getTransacSmsReport**](TransactionalSmsApi.md#getTransacSmsReport) | **GET** /transactionalSMS/statistics/reports | Get your SMS activity aggregated per day +[**sendTransacSms**](TransactionalSmsApi.md#sendTransacSms) | **POST** /transactionalSMS/sms | Send the SMS campaign to the specified mobile number + + + +# **getSmsEvents** +> GetSmsEventReport getSmsEvents(limit, startDate, endDate, offset, days, phoneNumber, event, tags) + +Get all the SMS activity (unaggregated events) + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.TransactionalSmsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +TransactionalSmsApi apiInstance = new TransactionalSmsApi(); +Long limit = 50L; // Long | Number of documents per page +LocalDate startDate = new LocalDate(); // LocalDate | Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report +LocalDate endDate = new LocalDate(); // LocalDate | Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report +Long offset = 0L; // Long | Index of the first document of the page +Integer days = 56; // Integer | Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' +String phoneNumber = "phoneNumber_example"; // String | Filter the report for a specific phone number +String event = "event_example"; // String | Filter the report for specific events +String tags = "tags_example"; // String | Filter the report for specific tags passed as a serialized urlencoded array +try { + GetSmsEventReport result = apiInstance.getSmsEvents(limit, startDate, endDate, offset, days, phoneNumber, event, tags); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling TransactionalSmsApi#getSmsEvents"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **Long**| Number of documents per page | [optional] [default to 50] + **startDate** | **LocalDate**| Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report | [optional] + **endDate** | **LocalDate**| Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report | [optional] + **offset** | **Long**| Index of the first document of the page | [optional] [default to 0] + **days** | **Integer**| Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' | [optional] + **phoneNumber** | **String**| Filter the report for a specific phone number | [optional] + **event** | **String**| Filter the report for specific events | [optional] [enum: bounces, hardBounces, softBounces, delivered, sent, accepted, unsubscription, replies, blocked] + **tags** | **String**| Filter the report for specific tags passed as a serialized urlencoded array | [optional] + +### Return type + +[**GetSmsEventReport**](GetSmsEventReport.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getTransacAggregatedSmsReport** +> GetTransacAggregatedSmsReport getTransacAggregatedSmsReport(startDate, endDate, days, tag) + +Get your SMS activity aggregated over a period of time + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.TransactionalSmsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +TransactionalSmsApi apiInstance = new TransactionalSmsApi(); +LocalDate startDate = new LocalDate(); // LocalDate | Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report +LocalDate endDate = new LocalDate(); // LocalDate | Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report +Integer days = 56; // Integer | Number of days in the past including today (positive integer). Not compatible with startDate and endDate +String tag = "tag_example"; // String | Filter on a tag +try { + GetTransacAggregatedSmsReport result = apiInstance.getTransacAggregatedSmsReport(startDate, endDate, days, tag); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling TransactionalSmsApi#getTransacAggregatedSmsReport"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **startDate** | **LocalDate**| Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report | [optional] + **endDate** | **LocalDate**| Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report | [optional] + **days** | **Integer**| Number of days in the past including today (positive integer). Not compatible with startDate and endDate | [optional] + **tag** | **String**| Filter on a tag | [optional] + +### Return type + +[**GetTransacAggregatedSmsReport**](GetTransacAggregatedSmsReport.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getTransacSmsReport** +> GetTransacSmsReport getTransacSmsReport(startDate, endDate, days, tag) + +Get your SMS activity aggregated per day + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.TransactionalSmsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +TransactionalSmsApi apiInstance = new TransactionalSmsApi(); +LocalDate startDate = new LocalDate(); // LocalDate | Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report +LocalDate endDate = new LocalDate(); // LocalDate | Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report +Integer days = 56; // Integer | Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' +String tag = "tag_example"; // String | Filter on a tag +try { + GetTransacSmsReport result = apiInstance.getTransacSmsReport(startDate, endDate, days, tag); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling TransactionalSmsApi#getTransacSmsReport"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **startDate** | **LocalDate**| Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report | [optional] + **endDate** | **LocalDate**| Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report | [optional] + **days** | **Integer**| Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' | [optional] + **tag** | **String**| Filter on a tag | [optional] + +### Return type + +[**GetTransacSmsReport**](GetTransacSmsReport.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **sendTransacSms** +> SendSms sendTransacSms(sendTransacSms) + +Send the SMS campaign to the specified mobile number + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.TransactionalSmsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +TransactionalSmsApi apiInstance = new TransactionalSmsApi(); +SendTransacSms sendTransacSms = new SendTransacSms(); // SendTransacSms | Values to send a transactional SMS +try { + SendSms result = apiInstance.sendTransacSms(sendTransacSms); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling TransactionalSmsApi#sendTransacSms"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sendTransacSms** | [**SendTransacSms**](SendTransacSms.md)| Values to send a transactional SMS | + +### Return type + +[**SendSms**](SendSms.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + diff --git a/docs/UpdateAttribute.md b/docs/UpdateAttribute.md new file mode 100644 index 0000000..59b9592 --- /dev/null +++ b/docs/UpdateAttribute.md @@ -0,0 +1,11 @@ + +# UpdateAttribute + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **String** | Value of the attribute. Use only if the attribute's category is calculated or global | [optional] +**enumeration** | [**List<UpdateAttributeEnumeration>**](UpdateAttributeEnumeration.md) | Values that the attribute can take. Use only if the attribute's category is category | [optional] + + + diff --git a/docs/UpdateAttributeEnumeration.md b/docs/UpdateAttributeEnumeration.md new file mode 100644 index 0000000..cf7bf40 --- /dev/null +++ b/docs/UpdateAttributeEnumeration.md @@ -0,0 +1,11 @@ + +# UpdateAttributeEnumeration + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **Integer** | Id of the value | +**label** | **String** | Label of the value | + + + diff --git a/docs/UpdateCampaignStatus.md b/docs/UpdateCampaignStatus.md new file mode 100644 index 0000000..e1a5337 --- /dev/null +++ b/docs/UpdateCampaignStatus.md @@ -0,0 +1,24 @@ + +# UpdateCampaignStatus + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | [**StatusEnum**](#StatusEnum) | | [optional] + + + +## Enum: StatusEnum +Name | Value +---- | ----- +SUSPENDED | "suspended" +ARCHIVE | "archive" +DARCHIVE | "darchive" +SENT | "sent" +QUEUED | "queued" +REPLICATE | "replicate" +REPLICATETEMPLATE | "replicateTemplate" +DRAFT | "draft" + + + diff --git a/docs/UpdateChild.md b/docs/UpdateChild.md new file mode 100644 index 0000000..d4929d8 --- /dev/null +++ b/docs/UpdateChild.md @@ -0,0 +1,14 @@ + +# UpdateChild + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | New Email address to update the child account | [optional] +**firstName** | **String** | New First name to use to update the child account | [optional] +**lastName** | **String** | New Last name to use to update the child account | [optional] +**companyName** | **String** | New Company name to use to update the child account | [optional] +**password** | **String** | New password for the child account to login | [optional] + + + diff --git a/docs/UpdateContact.md b/docs/UpdateContact.md new file mode 100644 index 0000000..8bd341b --- /dev/null +++ b/docs/UpdateContact.md @@ -0,0 +1,15 @@ + +# UpdateContact + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attributes** | **Map<String, String>** | | [optional] +**emailBlacklisted** | **Boolean** | Blacklist the contact for emails (emailBlacklisted = true) | [optional] +**smsBlacklisted** | **Boolean** | Blacklist the contact for SMS (smsBlacklisted = true) | [optional] +**listIds** | **List<Long>** | Ids of the lists to add the contact to | [optional] +**unlinkListIds** | **List<Long>** | Ids of the lists to remove the contact from | [optional] +**smtpBlacklistSender** | **List<String>** | SMTP forbidden sender for contact. Use only for email Contact | [optional] + + + diff --git a/docs/UpdateEmailCampaign.md b/docs/UpdateEmailCampaign.md new file mode 100644 index 0000000..599e351 --- /dev/null +++ b/docs/UpdateEmailCampaign.md @@ -0,0 +1,26 @@ + +# UpdateEmailCampaign + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tag** | **String** | Tag of the campaign | [optional] +**sender** | [**UpdateEmailCampaignSender**](UpdateEmailCampaignSender.md) | | [optional] +**name** | **String** | Name of the campaign | [optional] +**htmlContent** | **String** | Body of the message (HTML version). REQUIRED if htmlUrl is empty | [optional] +**htmlUrl** | **String** | Url which contents the body of the email message. REQUIRED if htmlContent is empty | [optional] +**scheduledAt** | [**OffsetDateTime**](OffsetDateTime.md) | UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. | [optional] +**subject** | **String** | Subject of the campaign | [optional] +**replyTo** | **String** | Email on which campaign recipients will be able to reply to | [optional] +**toField** | **String** | This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. To use the contact attributes here, these must already exist in SendinBlue account | [optional] +**recipients** | [**UpdateEmailCampaignRecipients**](UpdateEmailCampaignRecipients.md) | | [optional] +**attachmentUrl** | **String** | Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps | [optional] +**inlineImageActivation** | **Boolean** | Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. You cannot send a campaign of more than 4MB with images embedded in the email. Campaigns with the images embedded in the email must be sent to less than 5000 contacts. | [optional] +**mirrorActive** | **Boolean** | Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign | [optional] +**recurring** | **Boolean** | FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times | [optional] +**footer** | **String** | Footer of the email campaign | [optional] +**header** | **String** | Header of the email campaign | [optional] +**utmCampaign** | **String** | Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed | [optional] + + + diff --git a/docs/UpdateEmailCampaignRecipients.md b/docs/UpdateEmailCampaignRecipients.md new file mode 100644 index 0000000..afc6425 --- /dev/null +++ b/docs/UpdateEmailCampaignRecipients.md @@ -0,0 +1,11 @@ + +# UpdateEmailCampaignRecipients + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**exclusionListIds** | **List<Long>** | List ids which have to be excluded from a campaign | [optional] +**listIds** | **List<Long>** | Lists Ids to send the campaign to. REQUIRED if already not present in campaign and scheduledAt is not empty | [optional] + + + diff --git a/docs/UpdateEmailCampaignSender.md b/docs/UpdateEmailCampaignSender.md new file mode 100644 index 0000000..cf7c091 --- /dev/null +++ b/docs/UpdateEmailCampaignSender.md @@ -0,0 +1,11 @@ + +# UpdateEmailCampaignSender + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Sender Name from which the campaign emails are sent | [optional] +**email** | **String** | Sender email from which the campaign emails are sent | [optional] + + + diff --git a/docs/UpdateList.md b/docs/UpdateList.md new file mode 100644 index 0000000..219ab13 --- /dev/null +++ b/docs/UpdateList.md @@ -0,0 +1,11 @@ + +# UpdateList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Name of the list. Only one parameter can be update at once | [optional] +**folderId** | **Long** | Id of the folder in which to move the list. Only one parameter can updated at once | [optional] + + + diff --git a/docs/UpdateSender.md b/docs/UpdateSender.md new file mode 100644 index 0000000..15f3e72 --- /dev/null +++ b/docs/UpdateSender.md @@ -0,0 +1,12 @@ + +# UpdateSender + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | From Name to update the sender | [optional] +**email** | **String** | From Email to update the sender | [optional] +**ips** | [**List<CreateSenderIps>**](CreateSenderIps.md) | Only in case of dedicated IP, IPs to associate to the sender. If passed, will replace all the existing IPs. | [optional] + + + diff --git a/docs/UpdateSmsCampaign.md b/docs/UpdateSmsCampaign.md new file mode 100644 index 0000000..a87ab66 --- /dev/null +++ b/docs/UpdateSmsCampaign.md @@ -0,0 +1,14 @@ + +# UpdateSmsCampaign + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Name of the campaign | [optional] +**sender** | **String** | Name of the sender. The number of characters is limited to 11 | [optional] +**content** | **String** | Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS | [optional] +**recipients** | [**CreateSmsCampaignRecipients**](CreateSmsCampaignRecipients.md) | | [optional] +**scheduledAt** | [**OffsetDateTime**](OffsetDateTime.md) | UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. | [optional] + + + diff --git a/docs/UpdateSmtpTemplate.md b/docs/UpdateSmtpTemplate.md new file mode 100644 index 0000000..40b651f --- /dev/null +++ b/docs/UpdateSmtpTemplate.md @@ -0,0 +1,19 @@ + +# UpdateSmtpTemplate + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tag** | **String** | Tag of the template | [optional] +**sender** | [**UpdateSmtpTemplateSender**](UpdateSmtpTemplateSender.md) | | [optional] +**templateName** | **String** | Name of the template | [optional] +**htmlContent** | **String** | Required if htmlUrl is empty. Body of the message (HTML must have more than 10 characters) | [optional] +**htmlUrl** | **String** | Required if htmlContent is empty. URL to the body of the email (HTML) | [optional] +**subject** | **String** | Subject of the email | [optional] +**replyTo** | **String** | Email on which campaign recipients will be able to reply to | [optional] +**toField** | **String** | To personalize the «To» Field, e.g. if you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These attributes must already exist in contacts database | [optional] +**attachmentUrl** | **String** | Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps | [optional] +**isActive** | **Boolean** | Status of the template. isActive = false means template is inactive, isActive = true means template is active | [optional] + + + diff --git a/docs/UpdateSmtpTemplateSender.md b/docs/UpdateSmtpTemplateSender.md new file mode 100644 index 0000000..9e3f40a --- /dev/null +++ b/docs/UpdateSmtpTemplateSender.md @@ -0,0 +1,11 @@ + +# UpdateSmtpTemplateSender + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Name of the sender | [optional] +**email** | **String** | Email of the sender | [optional] + + + diff --git a/docs/UpdateWebhook.md b/docs/UpdateWebhook.md new file mode 100644 index 0000000..b685572 --- /dev/null +++ b/docs/UpdateWebhook.md @@ -0,0 +1,31 @@ + +# UpdateWebhook + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **String** | URL of the webhook | [optional] +**description** | **String** | Description of the webhook | [optional] +**events** | [**List<EventsEnum>**](#List<EventsEnum>) | Events triggering the webhook. Possible values for Transactional type webhook – request, delivered, hardBounce, softBounce, blocked, spam, invalid, deferred, click, opened, uniqueOpened and unsubscribed and possible values for Marketing type webhook – spam, opened, click, hardBounce, softBounce, unsubscribed, listAddition and delivered | [optional] + + + +## Enum: List<EventsEnum> +Name | Value +---- | ----- +HARDBOUNCE | "hardBounce" +SOFTBOUNCE | "softBounce" +BLOCKED | "blocked" +SPAM | "spam" +DELIVERED | "delivered" +REQUEST | "request" +CLICK | "click" +INVALID | "invalid" +DEFERRED | "deferred" +OPENED | "opened" +UNIQUEOPENED | "uniqueOpened" +UNSUBSCRIBED | "unsubscribed" +LISTADDITION | "listAddition" + + + diff --git a/docs/WebhooksApi.md b/docs/WebhooksApi.md new file mode 100644 index 0000000..5c122ea --- /dev/null +++ b/docs/WebhooksApi.md @@ -0,0 +1,278 @@ +# WebhooksApi + +All URIs are relative to *https://api.sendinblue.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createWebhook**](WebhooksApi.md#createWebhook) | **POST** /webhooks | Create a webhook +[**deleteWebhook**](WebhooksApi.md#deleteWebhook) | **DELETE** /webhooks/{webhookId} | Delete a webhook +[**getWebhook**](WebhooksApi.md#getWebhook) | **GET** /webhooks/{webhookId} | Get a webhook details +[**getWebhooks**](WebhooksApi.md#getWebhooks) | **GET** /webhooks | Get all webhooks +[**updateWebhook**](WebhooksApi.md#updateWebhook) | **PUT** /webhooks/{webhookId} | Update a webhook + + + +# **createWebhook** +> CreateModel createWebhook(createWebhook) + +Create a webhook + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.WebhooksApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +WebhooksApi apiInstance = new WebhooksApi(); +CreateWebhook createWebhook = new CreateWebhook(); // CreateWebhook | Values to create a webhook +try { + CreateModel result = apiInstance.createWebhook(createWebhook); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling WebhooksApi#createWebhook"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createWebhook** | [**CreateWebhook**](CreateWebhook.md)| Values to create a webhook | + +### Return type + +[**CreateModel**](CreateModel.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **deleteWebhook** +> deleteWebhook(webhookId) + +Delete a webhook + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.WebhooksApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +WebhooksApi apiInstance = new WebhooksApi(); +Long webhookId = 789L; // Long | Id of the webhook +try { + apiInstance.deleteWebhook(webhookId); +} catch (ApiException e) { + System.err.println("Exception when calling WebhooksApi#deleteWebhook"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhookId** | **Long**| Id of the webhook | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getWebhook** +> GetWebhook getWebhook(webhookId) + +Get a webhook details + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.WebhooksApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +WebhooksApi apiInstance = new WebhooksApi(); +Long webhookId = 789L; // Long | Id of the webhook +try { + GetWebhook result = apiInstance.getWebhook(webhookId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling WebhooksApi#getWebhook"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhookId** | **Long**| Id of the webhook | + +### Return type + +[**GetWebhook**](GetWebhook.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **getWebhooks** +> GetWebhooks getWebhooks(type) + +Get all webhooks + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.WebhooksApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +WebhooksApi apiInstance = new WebhooksApi(); +String type = "transactional"; // String | Filter on webhook type +try { + GetWebhooks result = apiInstance.getWebhooks(type); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling WebhooksApi#getWebhooks"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **type** | **String**| Filter on webhook type | [optional] [default to transactional] [enum: marketing, transactional] + +### Return type + +[**GetWebhooks**](GetWebhooks.md) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **updateWebhook** +> updateWebhook(webhookId, updateWebhook) + +Update a webhook + +### Example +```java +// Import classes: +//import sendinblue.ApiClient; +//import sendinblue.ApiException; +//import sendinblue.Configuration; +//import sendinblue.auth.*; +//import sibApi.WebhooksApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: api-key +ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key"); +apiKey.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//apiKey.setApiKeyPrefix("Token"); + +WebhooksApi apiInstance = new WebhooksApi(); +Long webhookId = 789L; // Long | Id of the webhook +UpdateWebhook updateWebhook = new UpdateWebhook(); // UpdateWebhook | Values to update a webhook +try { + apiInstance.updateWebhook(webhookId, updateWebhook); +} catch (ApiException e) { + System.err.println("Exception when calling WebhooksApi#updateWebhook"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhookId** | **Long**| Id of the webhook | + **updateWebhook** | [**UpdateWebhook**](UpdateWebhook.md)| Values to update a webhook | + +### Return type + +null (empty response body) + +### Authorization + +[api-key](../README.md#api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + diff --git a/git_push.sh b/git_push.sh new file mode 100644 index 0000000..ae01b18 --- /dev/null +++ b/git_push.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..05644f0 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,2 @@ +# Uncomment to build for Android +#target = android \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..2c6137b87896c8f70315ae454e00a969ef5f6019 GIT binary patch literal 53639 zcmafaW0a=B^559DjdyI@wr$%scWm3Xy<^+Pj_sKpY&N+!|K#4>Bz;ajPk*RBjZ;RV75EK*;qpZCo(BB5~-#>pF^k0$_Qx&3rs}{XFZ)$uJU-ZpbB>L3?|knJ{J+ge{%=bI`#Yn9v&Fxx>fd=_|H)(FY-DO{ z_Wxu>{a02GXCp^PGw1(fh-I*;dGTM?mA^##pNEJ#c-Y%I7@3kW(VN&Bxw!bn$iWOU zB8BZ)vT4(}GX%q~h3EYwbR?$d6|xnvg_e@4>dl5l+%FtPbGqa`;Uk##t$#g&CK4GO zz%my0ZR1Fv@~b2_>T0cBP)ECz-Uc^nW9e+`W4!=mSJPopgoe3A(NMzBd0mR?$&3XA zRL1}bJ2Q%R#bWHrC`j_)tPKMEyHuGSpdJMhT(Ob(e9H+#=Skp%#jzj=BVvc(-RSWB z{_T`UcEeWD{z`!3-y;_N|Ljr4%f;2qPSM%n?_s%GnYsM!d3p)CxmudpyIPqTxjH!i z;}A+!>>N;pko++K5n~I7m4>yco2%Zc$59RohB(l%KcJc9s^nw^?2JGy>O4#x5+CZH zqU~7kA>WE)ngvsdfKhLUX0Lc3r+In0Uyn}LZhm?n){&LHNJws546du%pia=j zyH8CD{^Qx%kFe@kX*$B!DxLa(Y?BO32sm8%#_ynjU-m>PJbabL`~0Ai zeJm<6okftSJUd2!X(>}i#KAh-NR2!Kg%c2JD=G|T%@Q0JQzqKB)Qc4E-{ZF=#PGZg zior4-caRB-Jj;l}Xb_!)TjB`jC}})6z~3AsRE&t~CO&)g{dqM0iK;lvav8?kE1< zmCrHxDZe?&rEK7M4tG-i!`Zk-*IzSk0M0&Ul8+J>*UD(A^;bAFDcz>d&lzAlw}b## zjfu@)rAou-86EN%8_Nv;%bNUmy*<6sbgB9)ZCihdSh_VT2iGFv+T8p&Z&wO02nKtdx?eZh^=*<>SZHSn(Pv)bgn{ zb15>YnVnJ^PO025c~^uK&W1C1XTs1az44L~-9Z-fU3{VvA?T& zdpi&S`mZ|$tMuN{{i|O}fAx#*KkroHe;6z^7c*x`2Rk!a2L~HB$A4@(Rz*hvM+og( zJW+4;S-A$#+Gec-rn8}at+q5gRrNy^iU?Z4Gz_|qzS~sG_EV#m%-VW!jQ>f3jc-Vq zW;~>OqI1Th&*fx#`c^=|A4GGoDp+ZH!n0_fDo-ks3d&GlT=(qzr(?Qw`PHvo3PoU6YJE zu{35)=P`LRm@+=ziAI)7jktM6KHx*v&WHVBYp<~UtR3c?Wv_{a0(k&NF!o#+@|Y6Y z>{||-i0v8N2ntXRrVx~#Z1JMA3C2ki}OkJ4W`WjZIuLByNUEL2HqqKrbi{9a8` zk-w0I$a<6;W6&X<&EbIqul`;nvc+D~{g5al{0oOSp~ zhg;6nG1Bh-XyOBM63jb_z`7apSsta``K{!Q{}mZ!m4rTmWi^<*BN2dh#PLZ)oXIJY zl#I3@$+8Fvi)m<}lK_}7q~VN%BvT^{q~ayRA7mwHO;*r0ePSK*OFv_{`3m+96HKgt z=nD-=Pv90Ae1p)+SPLT&g(Fdqbcc(Vnk5SFyc|Tq08qS;FJ1K4rBmtns%Su=GZchE zR(^9W-y!{QfeVPBeHpaBA{TZpQ*(d$H-*GI)Y}>X2Lk&27aFkqXE7D?G_iGav2r&P zx3V=8GBGi8agj5!H?lDMr`1nYmvKZj!~0{GMPb!tM=VIJXbTk9q8JRoSPD*CH@4I+ zfG-6{Z=Yb->)MIUmXq-#;=lNCyF1G*W+tW6gdD||kQfW$J_@=Y9KmMD!(t#9-fPcJ z>%&KQC-`%E`{y^i!1u=rJP_hhGErM$GYE3Y@ZzzA2a-PC>yaoDziZT#l+y)tfyR}U z5Epq`ACY|VUVISHESM5$BpWC0FpDRK&qi?G-q%Rd8UwIq&`d(Mqa<@(fH!OfNIgFICEG?j_Gj7FS()kY^P(I!zbl`%HB z7Rx=q2vZFjy^XypORT$^NJv_`Vm7-gkJWYsN5xg>snt5%oG?w1K#l_UH<>4@d0G@3 z)r?|yba6;ksyc+5+8YZ?)NZ+ER!4fIzK>>cs^(;ib7M}asT&)+J=J@U^~ffJ>65V# zt_lyUp52t`vT&gcQ%a6Ca)p8u6v}3iJzf?zsx#e9t)-1OtqD$Mky&Lpz6_v?p0|y4 zI{Nq9z89OxQbsqX)UYj z(BGu`28f8C^e9R2jf0Turq;v+fPCWD*z8!8-Q-_s`ILgwo@mtnjpC_D$J zCz7-()9@8rQ{4qy<5;*%bvX3k$grUQ{Bt;B#w))A+7ih631uN?!_~?i^g+zO^lGK$>O1T1$6VdF~%FKR6~Px%M`ibJG*~uQ>o^r9qLo*`@^ry@KX^$LH0>NGPL%MG8|;8 z@_)h2uvB1M!qjGtZgy~7-O=GUa`&;xEFvC zwIt?+O;Fjwgn3aE%`_XfZEw5ayP+JS8x?I|V3ARbQ5@{JAl1E*5a{Ytc(UkoDKtD# zu)K4XIYno7h3)0~5&93}pMJMDr*mcYM|#(FXS@Pj)(2!cl$)R-GwwrpOW!zZ2|wN) zE|B38xr4_NBv|%_Lpnm$We<_~S{F1x42tph3PAS`0saF^PisF6EDtce+9y6jdITmu zqI-CLeTn2%I3t3z_=e=YGzUX6i5SEujY`j|=aqv#(Q=iWPkKhau@g|%#xVC2$6<{2 zAoimy5vLq6rvBo3rv&^VqtaKt_@Vx^gWN{f4^@i6H??!ra^_KC-ShWC(GBNt3o~T^ zudX<0v!;s$rIflR?~Tu4-D=%~E=glv+1|pg*ea30re-2K@8EqQ{8#WY4X-br_!qpq zL;PRCi^e~EClLpGb1MrsXCqfD2m615mt;EyR3W6XKU=4(A^gFCMMWgn#5o1~EYOH* zOlolGlD;B!j%lRFaoc)q_bOH-O!r}g1Bhlhy*dRoTf-bI%`A`kU)Q=HA9HgCKqq&A z2$_rtL-uIA7`PiJfw380j@M4Fff-?(Xe(aR`4>BZyDN2$2E7QQ1}95@X819fnA(}= za=5VF-%;l}aHSRHCfs(#Qf%dPue~fGpy7qPs*eLX2Aa0+@mPxnS4Wm8@kP7KEL)8s z@tNmawLHST-FS4h%20%lVvd zkXpxWa43E`zX{6-{2c+L9C`l(ZRG8`kO9g7t&hx?>j~5_C;y5u*Bvl79)Bq?@T7bN z=G2?QDa0J3VwCfZG0BjOFP>xz4jtv3LS>jz#1x~b9u1*n9>Y6?u8W?I^~;N{GC<1y} zc&Wz{L`kJUSt=oA=5ZHtNj3PSB%w5^=0(U7GC^zUgcdkujo>ruzyBurtTjKuNf1-+ zzn~oZFXCbR&xq&W{ar~T`@fNef5M$u^-C92HMBo=*``D8Q^ktX z(qT{_R=*EI?-R9nNUFNR#{(Qb;27bM14bjI`c#4RiinHbnS445Jy^%krK%kpE zFw%RVQd6kqsNbiBtH*#jiPu3(%}P7Vhs0G9&Dwb4E-hXO!|whZ!O$J-PU@j#;GrzN zwP9o=l~Nv}4OPvv5rVNoFN>Oj0TC%P>ykicmFOx*dyCs@7XBH|w1k2hb`|3|i^GEL zyg7PRl9eV ztQ1z)v~NwH$ebcMSKc-4D=?G^3sKVG47ZWldhR@SHCr}SwWuj5t!W$&HAA*Wo_9tM zw5vs`2clw`z@~R-#W8d4B8!rFtO}+-$-{6f_`O-^-EhGraqg%$D618&<9KG``D|Rb zQJ&TSE3cfgf8i}I^DLu+-z{{;QM>K3I9~3R9!0~=Y`A1=6`CF#XVH@MWO?3@xa6ev zdw08_9L=>3%)iXA(_CE@ipRQ{Tb+@mxoN^3ktgmt^mJ(u#=_Plt?5qMZOA3&I1&NU zOG+0XTsIkbhGsp(ApF2MphRG^)>vqagn!-%pRnppa%`-l@DLS0KUm8*e9jGT0F%0J z*-6E@Z*YyeZ{eP7DGmxQedo}^+w zM~>&E$5&SW6MxP##J56Eo@0P34XG})MLCuhMyDFf**?tziO?_Ad&Jhd z`jok^B{3ff*7cydrxYjdxX`14`S+34kW^$fxDmNn2%fsQ6+Zou0%U{3Y>L}UIbQbw z*E#{Von}~UEAL?vvihW)4?Kr-R?_?JSN?B?QzhUWj==1VNEieTMuTJ#-nl*c@qP+` zGk@aE0oAD5!9_fO=tDQAt9g0rKTr{Z0t~S#oy5?F3&aWm+igqKi| zK9W3KRS|1so|~dx%90o9+FVuN7)O@by^mL=IX_m^M87i&kT1^#9TCpI@diZ_p$uW3 zbA+-ER9vJ{ii?QIZF=cfZT3#vJEKC|BQhNd zGmxBDLEMnuc*AET~k8g-P-K+S~_(+GE9q6jyIMka(dr}(H% z$*z;JDnyI@6BQ7KGcrv03Hn(abJ_-vqS>5~m*;ZJmH$W`@csQ8ejiC8S#sYTB;AoF zXsd!kDTG#3FOo-iJJpd$C~@8}GQJ$b1A85MXp?1#dHWQu@j~i4L*LG40J}+V=&-(g zh~Hzk(l1$_y}PX}Ypluyiib0%vwSqPaJdy9EZ;?+;lFF8%Kb7cwPD17C}@N z2OF;}QCM4;CDx~d;XnunQAx5mQbL#);}H57I+uB9^v|cmZwuXGkoH-cAJ%nIjSO$E z{BpYdC9poyO5pvdL+ZPWFuK}c8WGEq-#I3myONq^BL%uG`RIoSBTEK9sAeU4UBh7f zzM$s|&NtAGN&>`lp5Ruc%qO^oL;VGnzo9A8{fQn@YoORA>qw;^n2pydq>;Ji9(sPH zLGsEeTIH?_6C3uyWoW(gkmM(RhFkiDuQPXmL7Oes(+4)YIHt+B@i`*%0KcgL&A#ua zAjb8l_tO^Ag!ai3f54t?@{aoW%&Hdst}dglRzQlS=M{O!=?l z*xY2vJ?+#!70RO8<&N^R4p+f=z z*&_e}QT%6-R5Wt66moGfvorp$yE|3=-2_(y`FnL0-7A?h%4NMZ#F#Rcb^}971t5ib zw<20w|C?HVv%|)Q)Pef8tGjwQ+!+<{>IVjr@&SRVO*PyC?Efnsq;Eq{r;U2)1+tgp z)@pZ}gJmzf{m=K@7YA_8X#XK+)F465h%z38{V-K8k%&_GF+g^s&9o6^B-&|MDFI)H zj1ofQL>W(MJLOu3xkkJZV@$}GEG~XBz~WvRjxhT0$jKKZKjuKi$rmR-al}Hb3xDL) z^xGG2?5+vUAo4I;$(JgeVQe9+e)vvJ={pO~05f|J={%dsSLVcF>@F9p4|nYK&hMua zWjNvRod}l~WmGo|LX2j#w$r$y?v^H?Gu(_?(WR_%D@1I@$yMTKqD=Ca2) zWBQmx#A$gMrHe^A8kxAgB}c2R5)14G6%HfpDf$(Di|p8ntcN;Hnk)DR1;toC9zo77 zcWb?&&3h65(bLAte%hstI9o%hZ*{y=8t$^!y2E~tz^XUY2N2NChy;EIBmf(Kl zfU~&jf*}p(r;#MP4x5dI>i`vjo`w?`9^5(vfFjmWp`Ch!2Ig}rkpS|T%g@2h-%V~R zg!*o7OZSU-%)M8D>F^|z+2F|!u1mOt?5^zG%;{^CrV^J?diz9AmF!UsO?Pl79DKvD zo-2==yjbcF5oJY!oF?g)BKmC8-v|iL6VT|Gj!Gk5yaXfhs&GeR)OkZ}=q{exBPv)& zV!QTQBMNs>QQ))>(rZOn0PK+-`|7vKvrjky3-Kmuf8uJ`x6&wsA5S(tMf=m;79Hzv za%lZ(OhM&ZUCHtM~FRd#Uk3Iy%oXe^)!Jci39D(a$51WER+%gIZYP)!}nDtDw_FgPL3e>1ilFN=M(j~V` zjOtRhOB8bX8}*FD0oy}+s@r4XQT;OFH__cEn-G#aYHpJDI4&Zo4y2>uJdbPYe zOMGMvbA6#(p00i1{t~^;RaHmgZtE@we39mFaO0r|CJ0zUk$|1Pp60Q&$A;dm>MfP# zkfdw?=^9;jsLEXsccMOi<+0-z|NZb(#wwkcO)nVxJxkF3g(OvW4`m36ytfPx5e-ujFXf($)cVOn|qt9LL zNr!InmcuVkxEg8=_;E)+`>n2Y0eAIDrklnE=T9Pyct>^4h$VDDy>}JiA=W9JE79<6 zv%hpzeJC)TGX|(gP!MGWRhJV}!fa1mcvY%jC^(tbG3QIcQnTy&8UpPPvIekWM!R?R zKQanRv+YZn%s4bqv1LBgQ1PWcEa;-MVeCk`$^FLYR~v%9b-@&M%giqnFHV;5P5_et z@R`%W>@G<6GYa=JZ)JsNMN?47)5Y3@RY`EVOPzxj;z6bn#jZv|D?Fn#$b}F!a}D9{ ztB_roYj%34c-@~ehWM_z;B{G5;udhY`rBH0|+u#!&KLdnw z;!A%tG{%Ua;}OW$BG`B#^8#K$1wX2K$m`OwL-6;hmh{aiuyTz;U|EKES= z9UsxUpT^ZZyWk0;GO;Fe=hC`kPSL&1GWS7kGX0>+votm@V-lg&OR>0*!Iay>_|5OT zF0w~t01mupvy4&HYKnrG?sOsip%=<>nK}Bxth~}g)?=Ax94l_=mC{M@`bqiKtV5vf zIP!>8I;zHdxsaVt9K?{lXCc$%kKfIwh&WM__JhsA?o$!dzxP znoRU4ZdzeN3-W{6h~QQSos{-!W@sIMaM z4o?97?W5*cL~5%q+T@>q%L{Yvw(a2l&68hI0Ra*H=ZjU!-o@3(*7hIKo?I7$gfB(Vlr!62-_R-+T;I0eiE^><*1_t|scfB{r9+a%UxP~CBr zl1!X^l01w8o(|2da~Mca)>Mn}&rF!PhsP_RIU~7)B~VwKIruwlUIlOI5-yd4ci^m{ zBT(H*GvKNt=l7a~GUco)C*2t~7>2t?;V{gJm=WNtIhm4x%KY>Rm(EC^w3uA{0^_>p zM;Na<+I<&KwZOUKM-b0y6;HRov=GeEi&CqEG9^F_GR*0RSM3ukm2c2s{)0<%{+g78 zOyKO%^P(-(U09FO!75Pg@xA{p+1$*cD!3=CgW4NO*p}&H8&K`(HL&$TH2N-bf%?JL zVEWs;@_UDD7IoM&P^(k-U?Gs*sk=bLm+f1p$ggYKeR_7W>Zz|Dl{{o*iYiB1LHq`? ztT)b^6Pgk!Kn~ozynV`O(hsUI52|g{0{cwdQ+=&@$|!y8{pvUC_a5zCemee6?E{;P zVE9;@3w92Nu9m_|x24gtm23{ST8Bp;;iJlhaiH2DVcnYqot`tv>!xiUJXFEIMMP(ZV!_onqyQtB_&x}j9 z?LXw;&z%kyYjyP8CQ6X);-QW^?P1w}&HgM}irG~pOJ()IwwaDp!i2$|_{Ggvw$-%K zp=8N>0Fv-n%W6{A8g-tu7{73N#KzURZl;sb^L*d%leKXp2Ai(ZvO96T#6*!73GqCU z&U-NB*0p@?f;m~1MUN}mfdpBS5Q-dbhZ$$OWW=?t8bT+R5^vMUy$q$xY}ABi60bb_ z9;fj~2T2Ogtg8EDNr4j96{@+9bRP#Li7YDK1Jh8|Mo%NON|bYXi~D(W8oiC2SSE#p z=yQ0EP*}Z)$K$v?MJp8s=xroI@gSp&y!De;aik!U7?>3!sup&HY{6!eElc+?ZW*|3 zjJ;Nx>Kn@)3WP`{R821FpY6p1)yeJPi6yfq=EffesCZjO$#c;p!sc8{$>M-i#@fCt zw?GQV4MTSvDH(NlD2S*g-YnxCDp*%|z9^+|HQ(#XI0Pa8-Io=pz8C&Lp?23Y5JopL z!z_O3s+AY&`HT%KO}EB73{oTar{hg)6J7*KI;_Gy%V%-oO3t+vcyZ?;&%L z3t4A%Ltf=2+f8qITmoRfolL;I__Q8Z&K9*+_f#Sue$2C;xTS@%Z*z-lOAF-+gj1C$ zKEpt`_qg;q^41dggeNsJv#n=5i+6Wyf?4P_a=>s9n(ET_K|*zvh633Mv3Xm3OE!n` zFk^y65tStyk4aamG*+=5V^UePR2e0Fbt7g$({L1SjOel~1^9SmP2zGJ)RZX(>6u4^ zQ78wF_qtS~6b+t&mKM=w&Dt=k(oWMA^e&V#&Y5dFDc>oUn+OU0guB~h3};G1;X=v+ zs_8IR_~Y}&zD^=|P;U_xMA{Ekj+lHN@_n-4)_cHNj0gY4(Lx1*NJ^z9vO>+2_lm4N zo5^}vL2G%7EiPINrH-qX77{y2c*#;|bSa~fRN2)v=)>U@;YF}9H0XR@(+=C+kT5_1 zy?ZhA&_&mTY7O~ad|LX+%+F{GTgE0K8OKaC2@NlC1{j4Co8;2vcUbGpA}+hBiDGCS zl~yxngtG}PI$M*JZYOi{Ta<*0f{3dzV0R}yIV7V>M$aX=TNPo|kS;!!LP3-kbKWj` zR;R%bSf%+AA#LMkG$-o88&k4bF-uIO1_OrXb%uFp((Pkvl@nVyI&^-r5p}XQh`9wL zKWA0SMJ9X|rBICxLwhS6gCTVUGjH&)@nofEcSJ-t4LTj&#NETb#Z;1xu(_?NV@3WH z;c(@t$2zlY@$o5Gy1&pvja&AM`YXr3aFK|wc+u?%JGHLRM$J2vKN~}5@!jdKBlA>;10A(*-o2>n_hIQ7&>E>TKcQoWhx7um zx+JKx)mAsP3Kg{Prb(Z7b};vw&>Tl_WN)E^Ew#Ro{-Otsclp%Ud%bb`8?%r>kLpjh z@2<($JO9+%V+To>{K?m76vT>8qAxhypYw;Yl^JH@v9^QeU01$3lyvRt^C#(Kr#1&2 ziOa@LG9p6O=jO6YCVm-d1OB+_c858dtHm>!h6DUQ zj?dKJvwa2OUJ@qv4!>l1I?bS$Rj zdUU&mofGqgLqZ2jGREYM>;ubg@~XE>T~B)9tM*t-GmFJLO%^tMWh-iWD9tiYqN>eZ zuCTF%GahsUr#3r3I5D*SaA75=3lfE!SpchB~1Xk>a7Ik!R%vTAqhO z#H?Q}PPN8~@>ZQ^rAm^I=*z>a(M4Hxj+BKrRjJcRr42J@DkVoLhUeVWjEI~+)UCRs zja$08$Ff@s9!r47##j1A5^B6br{<%L5uW&8t%_te(t@c|4Fane;UzM{jKhXfC zQa|k^)d*t}!<)K)(nnDxQh+Q?e@YftzoGIIG?V?~$cDY_;kPF>N}C9u7YcZzjzc7t zx3Xi|M5m@PioC>dCO$ia&r=5ZLdGE8PXlgab`D}>z`dy(+;Q%tz^^s*@5D)gll+QL z6@O3@K6&zrhitg~{t*EQ>-YN zy&k{89XF*^mdeRJp{#;EAFi_U<7}|>dl^*QFg**9wzlA#N9!`Qnc68+XRbO-Za=t zy@wz`mi0MmgE?4b>L$q&!%B!6MC7JjyG#Qvwj{d8)bdF`hA`LWSv+lBIs(3~hKSQ^0Se!@QOt;z5`!;Wjy1l8w=(|6%GPeK)b)2&Ula zoJ#7UYiJf>EDwi%YFd4u5wo;2_gb`)QdsyTm-zIX954I&vLMw&_@qLHd?I~=2X}%1 zcd?XuDYM)(2^~9!3z)1@hrW`%-TcpKB1^;IEbz=d0hv4+jtH;wX~%=2q7YW^C67Fk zyxhyP=Au*oC7n_O>l)aQgISa=B$Be8x3eCv5vzC%fSCn|h2H#0`+P1D*PPuPJ!7Hs z{6WlvyS?!zF-KfiP31)E&xYs<)C03BT)N6YQYR*Be?;bPp>h?%RAeQ7@N?;|sEoQ% z4FbO`m}Ae_S79!jErpzDJ)d`-!A8BZ+ASx>I%lITl;$st<;keU6oXJgVi?CJUCotEY>)blbj&;Qh zN*IKSe7UpxWPOCl1!d0I*VjT?k6n3opl8el=lonT&1Xt8T{(7rpV(?%jE~nEAx_mK z2x=-+Sl-h<%IAsBz1ciQ_jr9+nX57O=bO_%VtCzheWyA}*Sw!kN-S9_+tM}G?KEqqx1H036ELVw3Ja0!*Kr-Qo>)t*?aj2$x;CajQ@t`vbVbNp1Oczu@ zIKB+{5l$S;n(ny4#$RSd#g$@+V+qpAU&pBORg2o@QMHYLxS;zGOPnTA`lURgS{%VA zujqnT8gx7vw18%wg2)A>Kn|F{yCToqC2%)srDX&HV#^`^CyAG4XBxu7QNb(Ngc)kN zPoAhkoqR;4KUlU%%|t2D8CYQ2tS2|N#4ya9zsd~cIR=9X1m~a zq1vs3Y@UjgzTk#$YOubL*)YvaAO`Tw+x8GwYPEqbiAH~JNB?Q@9k{nAuAbv)M=kKn zMgOOeEKdf8OTO|`sVCnx_UqR>pFDlXMXG*KdhoM9NRiwYgkFg7%1%0B2UWn_9{BBW zi(Ynp7L|1~Djhg=G&K=N`~Bgoz}Bu0TR6WsI&MC@&)~>7%@S4zHRZxEpO(sp7d)R- zTm)))1Z^NHOYIU?+b2HZL0u1k>{4VGqQJAQ(V6y6+O+>ftKzA`v~wyV{?_@hx>Wy# zE(L|zidSHTux00of7+wJ4YHnk%)G~x)Cq^7ADk{S-wSpBiR2u~n=gpqG~f=6Uc7^N zxd$7)6Cro%?=xyF>PL6z&$ik^I_QIRx<=gRAS8P$G0YnY@PvBt$7&%M`ao@XGWvuE zi5mkN_5kYHJCgC;f_Ho&!s%CF7`#|B`tbUp4>88a8m$kE_O+i@pmEOT*_r0PhCjRvYxN*d5+w5 z<+S)w+1pvfxU6u{0}0sknRj8t^$uf?FCLg<%7SQ-gR~Y6u|f!Abx5U{*KyZ8o(S{G znhQx#Zs_b8jEk`5jd9CUYo>05&e69Ys&-x_*|!PoX$msbdBEGgPSpIl93~>ndH;t5 z?g>S+H^$HtoWcj4>WYo*Gu;Y#8LcoaP!HO?SFS&F9TkZnX`WBhh2jea0Vy%vVx~36 z-!7X*!Tw{Zdsl3qOsK&lf!nnI(lud){Cp$j$@cKrIh@#?+cEyC*m$8tnZIbhG~Zb8 z95)0Fa=3ddJQjW)9W+G{80kq`gZT`XNM=8eTkr^fzdU%d5p>J}v#h&h$)O+oYYaiC z7~hr4Q0PtTg(Xne6E%E@0lhv-CW^o0@EI3>0ZbxAwd2Q zkaU2c{THdFUnut_q0l+0DpJ5KMWNTa^i@v%r`~}fxdmmVFzq6{%vbv?MJ+Q86h6qf zKiGz6Vrb>!7)}8~9}bEy^#HSP)Z^_vqKg2tAfO^GWSN3hV4YzUz)N3m`%I&UEux{a z>>tz9rJBg(&!@S9o5=M@E&|@v2N+w+??UBa3)CDVmgO9(CkCr+a1(#edYE( z7=AAYEV$R1hHyNrAbMnG^0>@S_nLgY&p9vv_XH7|y*X)!GnkY0Fc_(e)0~)Y5B0?S zO)wZqg+nr7PiYMe}!Rb@(l zV=3>ZI(0z_siWqdi(P_*0k&+_l5k``E8WC(s`@v6N3tCfOjJkZ3E2+js++(KEL|!7 z6JZg>9o=$0`A#$_E(Rn7Q78lD1>F}$MhL@|()$cYY`aSA3FK&;&tk3-Fn$m?|G11= z8+AqH86^TNcY64-<)aD>Edj$nbSh>V#yTIi)@m1b2n%j-NCQ51$9C^L6pt|!FCI>S z>LoMC0n<0)p?dWQRLwQC%6wI02x4wAos$QHQ-;4>dBqO9*-d+<429tbfq7d4!Bz~A zw@R_I;~C=vgM@4fK?a|@=Zkm=3H1<#sg`7IM7zB#6JKC*lUC)sA&P)nfwMko15q^^TlLnl5fY75&oPQ4IH{}dT3fc% z!h+Ty;cx9$M$}mW~k$k(($-MeP_DwDJ zXi|*ZdNa$(kiU?}x0*G^XK!i{P4vJzF|aR+T{)yA8LBH!cMjJGpt~YNM$%jK0HK@r z-Au8gN>$8)y;2q-NU&vH`htwS%|ypsMWjg@&jytzR(I|Tx_0(w74iE~aGx%A^s*&- zk#_zHpF8|67{l$Xc;OU^XI`QB5XTUxen~bSmAL6J;tvJSkCU0gM3d#(oWW$IfQXE{ zn3IEWgD|FFf_r2i$iY`bA~B0m zA9y069nq|>2M~U#o)a3V_J?v!I5Y|FZVrj|IbzwDCPTFEP<}#;MDK$4+z+?k5&t!TFS*)Iw)D3Ij}!|C2=Jft4F4=K74tMRar>_~W~mxphIne& zf8?4b?Aez>?UUN5sA$RU7H7n!cG5_tRB*;uY!|bNRwr&)wbrjfH#P{MU;qH>B0Lf_ zQL)-~p>v4Hz#@zh+}jWS`$15LyVn_6_U0`+_<*bI*WTCO+c&>4pO0TIhypN%y(kYy zbpG4O13DpqpSk|q=%UyN5QY2pTAgF@?ck2}gbs*@_?{L>=p77^(s)ltdP1s4hTvR# zbVEL-oMb~j$4?)op8XBJM1hEtuOdwkMwxzOf!Oc63_}v2ZyCOX3D-l+QxJ?adyrSiIJ$W&@WV>oH&K3-1w<073L3DpnPP)xVQVzJG{i)57QSd0e;Nk z4Nk0qcUDTVj@R-&%Z>&u6)a5x3E!|b;-$@ezGJ?J9L zJ#_Lt*u#&vpp2IxBL7fA$a~aJ*1&wKioHc#eC(TR9Q<>9ymdbA?RFnaPsa)iPg7Z; zid$y8`qji`WmJ5nDcKSVb}G$9yOPDUv?h1UiI_S=v%J8%S<83{;qMd0({c8>lc=7V zv$okC+*w{557!ohpAUMyBHhKLAwzs&D11ENhrvr_OtsnS!U{B+CmDH-C=+po+uSqt z+WVVXl8fKe5iCZoP;>}4OVen6_|uw8*ff-r;)O2W+6p7BPT7sT<|Qv=6lgV#3`Ch${(-Wy#6NA$YanDSFV_3aa=PAn%l@^l(XxVdh!TyFFE&->QRkk@GKyy( zC3N%PhyJf^y9iSI;o|)q9U-;Akk>;M>C8E6=3T!vc?1( zyKE(2vV5X_-HDSB2>a6LR9MvCfda}}+bZ>X z+S(fTl)S})HZM`YM`uzRw>!i~X71Kb^FnwAlOM;!g_+l~ri;+f44XrdZb4Lj% zLnTNWm+yi8c7CSidV%@Y+C$j{{Yom*(15277jE z9jJKoT4E%31A+HcljnWqvFsatET*zaYtpHAWtF|1s_}q8!<94D>pAzlt1KT6*zLQF z+QCva$ffV8NM}D4kPEFY+viR{G!wCcp_=a#|l?MwO^f4^EqV7OCWWFn3rmjW=&X+g|Pp(!m2b#9mg zf|*G(z#%g%U^ET)RCAU^ki|7_Do17Ada$cv$~( zHG#hw*H+aJSX`fwUs+fCgF0bc3Yz3eQqR@qIogSt10 znM-VrdE@vOy!0O4tT{+7Ds-+4yp}DT-60aRoqOe@?ZqeW1xR{Vf(S+~+JYGJ&R1-*anVaMt_zSKsob;XbReSb02#(OZ z#D3Aev@!944qL=76Ns-<0PJ;dXn&sw6vB9Wte1{(ah0OPDEDY9J!WVsm`axr_=>uc zQRIf|m;>km2Ivs`a<#Kq@8qn&IeDumS6!2y$8=YgK;QNDcTU}8B zepl6erp@*v{>?ixmx1RS_1rkQC<(hHfN%u_tsNcRo^O<2n71wFlb-^F2vLUoIfB|Hjxm#aY&*+um7eR@%00 zR;6vT(zb2ewr$(CwbHgKRf#X(?%wBgzk8qWw=d@1x>$40h?wIUG2;Jxys__b)vnPF z{VWvLyXGjG4LRo}MH@AP-GOti6rPu^F04vaIukReB|8<7&5cebX<)Zk(VysCOLBuL zW9pEvRa--4vwT?k6P??+#lGMUYE;EsaU~=i_|j!1qCVS_UjMVhKT%CuovR;6*~rP0)s5eX zxVhGZv+qtpZ{_FDf9p{m`ravh=h>mPMVR7J-U@%MaAOU2eY@`s-M3Oi>oRtT?Y&9o({nn~qU4FaEq|l^qnkXer)Cf0IZw;GaBt)}EIen=1lqeg zAHD~nbloktsjFh&*2iYVZ=l1yo%{RK#rgTg8a2WRS8>kl03$CS(p3}E-18`!UpyOg zcH=`UYwn0b@K1`E&aQ%*riO|F-hq;S;kE7UwYd~Ox(u)>VyaE7DA6h_V3_kW2vAR} zBZi_RC*l3!t;JPD;<*z1FiZt;=KK-xuZ`j>?c5oxC^E2R=d`f68!-X=Xw2ONC@;@V zu|Svg4StiAD$#wGarWU~exyzzchb#8=V6F<6*nAca@x}!zXN}k1t78xaOX1yloahl zC4{Ifib;g}#xqD)@Jej<+wsP+JlAn)&WO=qSu>9eKRnm6IOjwOiU=bzd;3R{^cl5* zc9kR~Gd9x`Q$_G^uwc4T9JQhvz3~XG+XpwCgz98Z>Pez=J{DD)((r(!ICFKrmR-;} zL^`7lPsSmZT?p&QpVY&Ps~!n($zaAM8X@%z!}!>;B|CbIl!Y={$prE7WS)cgB{?+| zFnW-KRB-9zM5!L+t{e~B$5lu-N8Yvbu<+|l;OcJH_P;}LdB~2?zAK67?L8YvX})BM zW1=g!&!aNylEkx#95zN~R=D=_+g^bvi(`m0Cxv2EiSJ>&ruObdT4&wfCLa2Vm*a{H z8w@~1h9cs&FqyLbv7}{R)aH=Bo80E3&u_CAxNMrTy_$&cgxR10Gj9c7F~{hm#j+lj z#){r0Qz?MaCV}f2TyRvb=Eh|GNa8M(rqpMPVxnYugYHqe!G`M@x(;>F%H46LGM_cU z{*0k6-F!7r3;j{KOaDxrV16WUIiFAfcx?^t*}ca4B8!-d?R|$UxwV8tyHdKL zhx;7%0Zn#qtx;S)REtEP-meAlV8*1qGFbRJ*eeX&+hsiLF*g9%r0Zl`L^Kn`4I)ul z32#3pg6Mu$LEI@hssUb?T$di_z zHgaB3zw;*0Lnzo$a~T_cFT&y%rdb*kR`|6opI#Pbq~F%t%*KnyUNu|G?-I#~C=i#L zEfu}ckXK+#bWo11e+-E$oobK=nX!q;YZhp}LSm6&Qe-w0XCN{-KL}l?AOUNppM-)A zyTRT@xvO=k&Zj|3XKebEPKZrJDrta?GFKYrlpnSt zA8VzCoU+3vT$%E;kH)pzIV7ZD6MIRB#w`0dViS6g^&rI_mEQjP!m=f>u=Hd04PU^cb>f|JhZ19Vl zkx66rj+G-*9z{b6?PBfYnZ4m6(y*&kN`VB?SiqFiJ#@hegDUqAh4f!+AXW*NgLQGs z>XrzVFqg&m>FT^*5DAgmMCMuFkN4y*!rK^eevG!HFvs7nC672ACBBu5h(+#G@{0J- zPLsJ{ohQEr2N|PmEHw9 znQ`qe-xyv93I;Ym=WnoVU8dau&S^(*Wp=}PSGw;&DtaKz-);y)zjD|@-RT`*6nowj z7B%)h3>Lro-}5THC@BLymuL&3~kh8M}ZrZGtYKAmrT^cym$^O!$eeK$q5X2JF1w5a}4Z6yJ<=8&J?(m6U?;+ z{+*B;P@yGffMz;OSfm7NDhkGR5|7&~FNvel8Yj{F!DWnHG>%?ReZ$1w5I$Bt_u|4v z-ow>!SF!pCGrD&K8=-<;Gp@oB<@9C&%>vPHrp4sQEJj2FdedjC=0FqD>EG?NCf=KQKVd^stDZP7KNCAP-uEO*!?vgwvdp&Dm3h5Cldn!cIOL@u>1!HSfK+~kn-9Ekr|MWNApAJCJ5&5#izmjm z$CI|Boo@;O?Z(Bo9ejP>bbH|jRKn7W3y0L1!O6v$RUtt;%5R#**`+39c$JuO`SMU+ zbzu$7Eu`JQ+ri_ap{w(R_juHcw0X8~e$48TzBX%Yd+HkSSYt2){)+rYm48G^^G#W* zFiC0%tJs0q3%fX_Mt8A=!ODeM?}KLDt@ot6_%aAdLgJ7jCqh_1O`#DT`IGhP2LIMhF* z=l?}r%Tl#)!CpcItYE2!^N8bo`z9X(%0NK9Dgg^cA|rsz?aR+dD6=;#tvNhT5W}1; zFG@_F2cO&7Pdp1;lJ8?TYlI(VI8nbx_FIGRX^Z(d zyWyJi58uPgr>8w$ugIGhX1kr*po@^F>fntO1j&ocjyK za8Z*GGvQt+q~@R@Y=LdQt&v=8-&4WOU^_-YOuT9Fx-H7c;7%(nzWD(B%>dgQ^ zU6~0sR24(ANJ?U>HZ#m8%EmD1X{uL{igUzdbi+JN=G9t`kZMGk!iLCQQiVMhOP&(*~gU(d+&V4$(z=>4zqh(GX+9C&;~g2 z9K2$`gyTRJpG_)fYq=9sG^1I{*I=s%0NX^}8!mJVc?y$OYM^n!x(2jw$$;}n&dh%D;St+FA;eW=+28j#G^YLi@Gdk*H#r-#6u?7sF7#_pv?WS^K7feY1F^;!;$rgU%J zS$lZ(hmo$F>zg$V^`25cS|=QKO1Qj((VZ;&RB*9tS;OXa7 zy(n<$4O;q>q5{{H>n}1-PoFt;=5Ap+$K8LoiaJV7w8Gb%y5icLxGD~6=6hgYQv`ZI z2Opn57nS-1{bJUr(syi^;dv+XcX8?rQRLbhfk1py8M(gkz{TH#=lTd;K=dr!mwk2s z#XnC){9$x)tjD0cUQ90|hE2BkJ9+_tIVobRGD6OQ-uKJ#4fQy!4P;tSC6Az)q?c>E zXt(59YUKD?U}Ssn(3hs&fD$i3I*L_Et-%lx%HDe%#|)*q+ZM-v%Ds3u1LPpPKe-q} zc!9Rt)FvptekA2s+NXxF7I;sH1CNPpN@RT+-*|6h*ZWL{jgu9vth{q)u=E<7D(F06 zN~UUfzhsK)`=W%Z-vr#IIVwmdb(q7k+FX-lciYO%NE!xl25SV53Hwdql-3>8y5X1U zWa3_Qfp2Z;jVX+N+1?`(dx-EJL)%oQsI0G3S=ad&v{dzNal~flHvq(0HjY!v;oE>n z4gQSa2FdJI52Weu$+lED4VYSW;D`5Zn`C#@7Hxa1Ls*#TLBjje(%NYFF+4uOc~dK! zlnyxE4NWVz0c8yx`=sP2t)fHW(PPKZPp{SCwT-on2sEM9tyGO4AW7|R;Iw5|n1KpV zR^S>`h}rxcNv2u+7H6rCvMLMV3p*H#WcN}}t0@Us{w}{20i<-v> zyos+Ev_>@CA**@JrZ6Jzm=pWd6ys`c!7-@jf<~3;!|A_`221MFp-IPg28ABf6kj-Y#eaRcQ!t!|0SRtkQK^pz;YiTC@@lJ4MDpI(++=}nTC zRb4Ak&K16t*d-P(s5zPs+vbqk1u>e5Y&a!;cO(x;E4A4}_Cgp_VoIFwhA z-o^7)=BRYu)zLT8>-5os4@Ss8R&I^?#p?bY1H-c;$NNdXK%RNCJHh)2LhC?B9yL2y z(P-1t9f~NV0_bQ{4zF|-e^9LG9qqevchug76wtFn95+@{PtD)XESnR2u}QuG0jYoh z0df4#&dz_FStgOPG0?LVGW&{znCUzHU%*b1f~F+)7aefg7_j76Vb|2WuG#1oYH_~4 zrzy#g1WMQ#gof`)Ar((3)4m3mARX~3(Ij=>-BC zR@&7dF70|)q>tI$wIr?&;>+!pE`i6CkomA1zEb&JOkmg9!>#z-nB{%!&T@S-2@Q)9 z)ekri>9QUuaHM{bWu&pZ+3|z@e2YjVG^?8F$0qad4oO9UI|R~2)ujGKZiX)9P2;pk z-kPg%FQ23x*$PhgM_1uIBbuz3YC z#9Rz(hzqTU{b28?PeO)PZWzB~VXM5)*}eUt_|uff_A8M4v&@iY{kshk{7dHX1vgHs zC%vd9vD^c;%!7NNz=JX9Q{?$~G@6h!`N>72MR*!Q{xE7IV*?trmw>3qWCP*?>qb01 zqe|3!Y0nv7sp|Md9c z4J5EJA%TD-;emh%|L2kLpA^g>)i56v6HIU8h7M+KSWYw~HHz3`ILj*{==jD(l33>r zmOdINZ8^Jo?ll^~q@{^5l#*3f`ETncJmo?iRLz*=W=o3MJ!K^xjVcw*H}p63#p4XX z1)|C%{Y&)IpRIk5oMVsUi6oyKAFy8MH$@|Zpjr^lxlMX3O{0AZTjc{gso{KRuo30V zUJxq2K=_CwV*Qx_D!hJCBTuQ}5oMNrWUBNVaa8zyMg5lrXgv8Zw@rm5NAcFplYa>P zmUNB>EB|r?#Z!Gq^`(HZl__UJ*K5 z=>`{UTlt0;Y+LmP1Wb19IWK(SIWDrqh=+K81c`t@BCS|2#@K0u5eEwQ7CG92=Axx4 zQ?CPaVE5!XY`2r!Ce@m(tRtB=&+c>a09WzP-Ys!~i;V0hEq}PU8n1a;bVbJ17rYW1 zjz|KkLZoO7-S6oQp_ocIzS43P@CJJxQ$k;$!fS3*V)m|VtBIEgCtU@W`AG9VMU_d znB-Zs3I)I(Wg=xj)Wcx03h}U3i5{D@*udPLg?Jx7dp&KEIwJiW=eh}Ps#FxbsS?F}7z<;<5RP6-UAD+_An$s3y-JAC zh{JlAX3e^CDJl1gJDbH`e=hD88ER_6+Mw8CwK&^|$BnzA|AvDV`#xF^z9b6iWb)0@ z+gir=oSUaVcJi%1k+9!pd`(3|h~4}!NM7NHPNV6rI(W4~Ie5 zl@(Xg2`OSq|HJRUg3qgr-c!}9@W?pEJXKtxP7f(aE2Es33gRSu#~XiCIpV-J;JLM{(@qK2wEvsi@6-9(cyXX!6YS0n7;TK0Ldf*JGmlvrF0 zGQ+Z509rmWa)O}r`z2W3!6u{^ZQrY`KR#VlTRmllG2v$R!7%B~IU@XnNi!E1qM$J8 z%{XFU4vy_*M0tKjDY3E*7N!d%&vnx5qr#=!IKWZfoRo8j=7ji1{xW?g^)A|7 zaaA5Rg6rwCF?y33Kz-90z!ze`@5N916S)(fHPa>{F`UEF8N5PTNjbo)PF5W_YLB*# z?o`qxQTIzokhSdBa1QGmn9b;O#g}y_4d*j*j`cx^bk(=%QwiFxlAhFSNhO0$g|ue> zDh=p|hUow5Knbclx8V;+^H6N_GHwOi!S>Qxv&}FeG-?F7bbOWud`NCE6Tv-~ud&PS6 z;F*l>WT4zvv39&RTmCZQLE67$bwxRykz(UkGzx}(C23?iLR}S-43{WT80c$J*Q`XT zVy-3mu&#j}wp^p0G%NAiIVP2_PN{*!R%t7*IJBVvWVD#wxNRyF9aXsIAl)YpxfQr$d%Rt20U@UE}@w?|8^FMT%k36 zcGi_Mw+vMvA@#}0SfIiy0KEKwQ|`iR++|PF2;LtiH7ea($I{z z32QPp-FlEQ**K_A@OC943z`Qy7wC~&v z*a`z;(`5(e#M|qb4bkN6sWR_|(7W~8<)GnX)cJAt``gu8gqP(AheO-SjJMYlQsGs0 z!;RBZwy>bfw)!(Abmna(pwAh^-;&+#$vChUEXs5QOQi8TZfgQHK$tspm+rc%ee0gy zjTq5y20IJ`i{ogd8l?~8Sbt^R_6Fx*!n6~Jl#rIt@w@qu2eHeyEKhrzqLtEPdFrzy z9*I^6dIZ z)8Gdw1V^@xGue9trS?=(#e5(O#tCJv9fRvP=`a{mnOTboq<-W$-ES7)!Xhi*#}R#6 zS&7hR(QeUetr=$Pt6uV%N&}tC;(iKI>U!y$j6RW&%@8W|29wXe@~{QlQ0OjzS;_>q z(B!=A71r|@CmR7eWdu9n0;OJ zP@VOOo#T+N$s{`3m`3Li+HA4owg&>YqCwsA5|E$b;J&v#6RbT$D!x$Yaflo92wU?A zvgD8g(aY`g7}Y2^2i31ocm&k9Km`NQipEsjU>MuRzD35*Jk7^Q(O;M32!gt1cEB@- zBOHd@@Qo{fQ^7o{FiNdS)_vTiP8toqZ`iNi^1-4(hp+s751}Tf34b z_UYQ1q0~*jIp9pRIpI8ue}$|~uu0#p>-y8t{yEwB(8yAjMXrJ{`{rp7*-wlh8&bso zHV`LnAF7Bw+w}Wm9ii3U@lEvcc-i$0&h+eUmlQuREzg!ao)ZjwThhqIKA})}akyX7 zcbuIw9K}9aUZ;hvAxk~rqpk?bYMWr-@b-pMTR8))ggQa$kBv=IinobKCR0?S&g*+Al2J`VR7he{}0Pu zae7LYa!OoTOk8?ma)M@Ta%NxQacV~KMw&)}fkmF7wvmagnTbWo))`Kofr)`-pNe99 zMnam7vRRs5LTXHWNqTzhfQo90dTdg<=@9teXaX2tyziuRI?UOxKZ5fmd%yNGf%Kis zEDdSxjSP&;Y#smYU$Dk>Sr0J42D)@hAo|7QaAGz(Qp*{d%{I-#UsBYP2*yY8d0&$4 zI^(l62Q-y4>!>S{ zn;iO%>={D42;(0h@P{>EZnIzpFV|^F%-OJADQz(1GpUqqg#t!*i zcK}eD_qV$RmK}-y_}f$Xy7B+hY~f4s{iCD7zq%C|SepGu`+>h6TI}dUGS3%oOYsZ0 z#rWTU&aeMhM%=(r(8kK@3rr|wW^MFE;dK5&^Z!>`JV{CWi^Gq?3jz~C-5hFFwLJ@e zSm3z9mnI+vIcF+RjyOL!VuZP3rJDjPSm4vYolnm)H;BIz!?dLyE0^5(pm)5*>2clW zaI^*Z;p6iGZW~Gr0(Eh+%8Jkz{S9{}=}Ewi6W0wF3|BbVb?CR2x>4xST?woP;Mz8L zDfs+0L9ga3jcM)zCC=`-ah9#oulxt9bZq9zH*fJK$bhT=%(2bPMY~}cPfTyE{_4p+ zc}3pPX`B04z+T>XwRQ4$(`U~037JrmN`)3F8vu_OcBE}M&B;1Vd%|I|1tni?f_b&$ z5wpdJ6F*oif)r=IzB$ytT72GuZi$y>H0p_#amQcJLZ^4KZySOUrRyXy3A2(i=$zB9 znZnGFLC34k?N@s@`)u8aZN({9Hfe}|^@Xk(TmCqNBR*Bter>opM!SGiDU8ShK6FNp zvod~z>Tj!GOXB^#R>6}_D@j67f5cNc#P;yMV}`S*A_OmXk_BIq3I$C}3M~aPU)agY zWC+0JA-)}O@e4XTtjzen&g=J0GIVNjG`_gS6ErXj3cGxeDN*4xEk0PNzfzO@6gb&N zB$S-WV-@efQWs%UX$AVjFN5M@8U>+?Mcqg?@=Z-R`~n~;mQGVJT_vBL|3^fHxZ?#T zE(Sd`8%2WHG)TcNaCHmv_Id%D+K}H3s&c`bxKs(_ScZzyCTpvU zHv~yhtKF9G{s+GC*7>_D@F+qEq@YmXiKTV(j#X7^?WpvIg!Yxi6uBAhh7<91{8vFL zfT?Y~vwmE;(WOL!V5Ag&#@U$mP~T=*#_ ze#QynX>tO#4IJqSj^UB>8ubSEn>Nk!Z?jZE01CJCYuY`1S3 zf%2eyXaWoAQUw)KYO;wi<&+R3_7E%h(7F?xq!8l>!^3Jqj_tNPrG= z+y2S-0j;(AilOo;>SCQu#;Cn?y4Eu za`??!yHz)qFH1Z(3KMqgn+B$&t+5s0zY|}<1kB^Q8FEAumh;^;Yr~amTx1K2%2JUk z@7uIE&0DVch|1R=ro5rjr)w!iU{_09PqfhnGqhAN^$^oz#wVNdTRQ!8^nF};4);Jz#=dTBTMMW7icnZ$dK1E0UEgP4&DNk9MFoKOhtAkVUR`d_vc!x zc|1mY&%{PBxepp^JPHmFDBQ8t@DD-3!C)-ZhGJt)?{)^0MvC%RzI;4}>XoOUF;6~j z{S20Ra%PaiGvM$pFbH;N6)b1J(N;{+Gp^^Qk34JAuPKH}Ap}fen!WlC5vrQ0$pnyq z5poi8VG>>PnGw2^-CY3XdG3<;|0xU}#WBPqn{mO=z0RwL=MXn3=;oA(1C@V^6F;ogwB4EBUpltu=)(MC@To2kSPbL zDdGz|C<@`&!MmQ*e>H>2Qkwa~K%;yZw;SnM<=qwNHu-Dh$r(}-d}T}u!=UOAkzvEOiZ6>{)t$$# zlAmjO$1)&1Zh^zdh8uhmZ>OBA1T4%s9Jex_y4|ifY_=XoX6UzpP;MuC5su(6%;)NI z4d#4aW<*)L6o7w?MY2+jRx6-3S4i zC(~)A`|)5(s?)pBvTfYjwvr@Z-Dx-F7uq}z#WJB6&}0TIi6sGXFWOxD!As%cUg)_A zI)sRCf-5kPBU|rVm0A{!s=W2){AJwvShr6Tsvbg|NrXi!7zoMde_n>-+XFX0fiQy~ zjRp|;6~pR()0a>ETtC7mZD|i$Emj!r-gq!yhAFdV1uR*M<4O?t83N1JRT~8Cy8Vha z+STlcw&CoCJt$k^#ar+~DBmvtC5tr{(>|W6wHq*NSE!^#8*rs>!oYj%fl9~Nu*d4t zdk!|mGJehKW8xJE5ZOcHRfp4plI+l1Pct;rK={=P`YH8&1hNW*YE)4yF2@wa7JFaL zLHJH6ZWc1j|nQ55Znh#>tV`!~N7lY_05Cq%|8I-yN}yf@EzDG zBL z(b0sjh+ui^*s(rg)=l8fU<%cPfba<7y?>}j3R83$2KHzWbVF*`!x^V8JY`D0itC?ZSTYH|w3lUD#$5G$@!v(Lphex2O1;%>w;Qh$t7YF3EjFuySPC$>~%EspW}@Ctn1Bghd5*HVJ=tZK~8oMiZ@9IxfFLSk~>p9cT9gOSPLyP!^bOah`U-6{}C_ zmyhS7S_-tYDm|9C6(Wu2Qe=*g5@{**z@#Ekz3Y{o7fw!^4z$yi z&=a^zmtOpsRO0lFr&c=khr)cL2v9LFKXRDdE}tWlOgpR%}oWHCeJ4;(9U_HeJYl! zwz$p|t6?#eCju@0{IF0gbk>So3C{Ror~JTpuOW!G@^?lBVrf zf?%rDK2E3x=xGC)J_lEk{(ESh-Uw*#k-n4l42f3oC3BJX0-2NMZo?P)-6y1v+?|+< zfFHX8(bw;H@;6K!?=!B#eZrkowcdn7)roPT=WM@MK?>T-cUa$oQdYp&3YRdWu~rhA z@rZKmqj8Ftz-*@`&iH|) zC(H;QiqYx4{Mz@rm`qs~*Ue~4EHM^J7i{QnL~t)O)tnwIQC;23p}TBoc=9rcuS!cQ zQgl)_F@t9{c)ESLtAcg1AbCXqVS%i1ZZRiy$*?Bu=r2ad13e|ZeWV=3pSL>YAk>X& zQZAY4kJD`CYrK-nNti&;uJ*e{cRILOFk@z?B@fNO(exjUhf!b=yuC`@(RS#ko1HA+ zOwsym7?F)}ufcD5&IV+qr+i7Mo3)6M2oI)*3?@-%ah^0rL#0PIn}XmOTP9Xsg5C;t zqkFe6yT##_ZG5KuhVQY)89LfWOeXpXVNWX2PmiRqq<$C!<^WlyO~Q=pk${$DsWY-7 zZ->4<+c@KPgKzKosGPF+&Q*>L>WaN6_FC~SP~3gH7bvg6>QgPzp`&QTpf3W>HjxDxj!y zZb`O;&XZzI2YJ4!^Mq5~Vz7lLv`StN|TSP@jdF}@9;ql?u*#Q+_E}~hak(3B%AQNq)t7PKgAWTYp>EJz^VIj67KcZ3^vvZ7{b;; zcOOArcAw2$T+$UwIib|pt3i#NAuP#3?Z@Oaz?Mt(H&u7HZu!03kV7`t5IRcf7hwck zf{Ujp*YsH;dvcW0q|=o$;z#Cg52;n5t1phY44To!sQ99h`iVzXd+v(L%?A$Ks|Ne; z7fby7IVUXqN8gzsnL-s?uIv>=Qh!qAxoe{fRaI&EcSGCTdggq-Qq?DU%SBOummO5cRa9NW}V>A0IH#pxch)!$2p8=^-XYjsB%$S$U5nI zlJEMBb!BZ_O4@87cEYUBH7}Y_MF$+(~gdf-!7)D-D)+O{*18TC{HGZFF+`%IPcmK{O{YxR> zSfJHSeQCChuPUAWe_x~gy*f!!wvt_tL-Dp=nUm+juu;4L6N1IIG4dsVMat#T^p7p1n*Tx2a!YaivBTqLsSJAF=kJej?@QWf)Y-8Ks>WkC456{B#hW-ML zI+f23(}F=MeSdbWQ>R98TOzv#Haw}ua+17H=P5|~#BDmoEPkzl#lBTvCoyj`XU|IS zHn?dXbq>rqUW8^kQN01zL~6!Vxn4!$Pu|F&#XbiF{{>T z)&khW&2Y?d8^jC|phWKQ4!CM9b66+l*HTdPm+)M|e5yT)I32Q~2ENVJ*ZH;JF^Y907{XNHLoQ+85J~!w@3h_5d04o=~|1 zCBAvjnXMn`S#qMkPZE}9#RX`%al{`J=oFKk(aJYT&Ss`4iBrXa_pQ=3lS1IUFA|Rr zgnh;c8nkGH)|*yyoUZ?tE1XKwkF$n6`sdkf^7)(wZ52xtm86N>o&&jG_@#ue(B`xPM|8oGz94>*kl17-|d^y0`D=&hScq6gGQ%Z6|LU zG@<~h-R{xW)y7k1x7XFw!TWW~HPC^bCO_;xG#A4he?=xkLjS=~U!uR+q>vqJxCN~J z+I}|P5RTv*qRT{k2N^Kz8OX*mz$hYR!aYq-f5bN4R4=omUVP19L|)EZq?O0#B9 z<3G&oAZ`UeIqZWlujz8UNNSK#{=_c`*(&TwlIr3ZpC0sfS5Jy?;t+&wb1g4Q91rRNiEt1|L zisgH;)V()S&(TSB|1yAxZLH%BY`nnhUw_6sz~zdKCCc!ZV*Ws6`U4u|CBpv4pYIX1 z5*)5C*N#D}gj<@pdZxtw!`5aFVQ^Jj?1W z+EsBx6>WV`%wnP@Fp{XlqFkbHf%LfCgIi_|w?uPPjHAgOF+lDnAb+WEB+i_53PFmu zj!=umx@ez9mVxC&jA_RtKRfQG>Cz`A77S2SpOt7%Rt*}fG|yO+2t7CMuK$^}D#i}k zZmO9yUwK6%!LbRsULVnxUxfxso5KFES=!WCm>y&YSR@0CS|iON0v59pkQ7dVA{j*+ zmcRtD@lxXuFq@#$DKKSal#ApSJLw58m_NIJ?z;eD3Z8u*-#}EaK zyG~L>-7laE`Y}{g#FPs9YA-wT4>X>xRNtTHp8_rhvWA|eJH(!o-G~C&tvHB9$UEJI{ngD>QjBz=wl~x-j1MB z4)L_#jZSvaQkbmVbN)4{#^r&ZmfhhV%?tet3`xJ;#jI}DsS94qc&s)#2kXv5pkt;K zaY6emqzF1JWMxI(7h}mk*MQ5C8WLAol60!DPj|u0jMrLTkU7G?ud**S@bYx-vp$+r zMVXWc4H}2=yF+YML9!k~LT(|<#By?F2bS~weMi9dD@DA&k#0e&MM1YT!qoQDeNLwB zA;{KvwSzP?-K(>@_b@4vTkIX7xwj}ckrusCw!k=#;Krt6;}3q4d*)?c{>I|C2I^4p zR(o48TqHbw?4Z`c`>?P{`cT;FpJoFW1wJ3IVO#5Q`wsB>o>zsRDDATmct`aaYQbTL zJVlHeok9_?w83#Z*J(_BMs-;N;mNeq{;f3S zSy{i5hNY5s`c#)~KhQZ{0_hNmrMD2b7CLC2+x#EmLcNa8V1Q=jz@e~VV)Yq!Z|$nv$TEG3j6K4opW+mH z3~z?*H$qobb652kQ}ZHFHUVj$%JAwS-Ie=Vh&Iivx3hjMCZ1k)4dRjdhxRb17P;Gz zZCsB4J=l1S8`O|(g!8c$aOMaYeUoCJj&n#kbDxe(^GQ)E)$Rq+i-wbPKeaQvL!`Y- zcL=QOLcWBdDq_`HLow9P5BG2EMY$v;w9cR$C{ zMv)5zrmYv!uzHFAxDI>aftAp&ad>GYoPt!d;A*$s)^6E5l5ct#&O7A0p^8J1ceXa) znIq{NgKbbOSC`6E_af2bCoI(gD@(krDr^mDVw>cRz3zJ^&9kbuf6)J@Cd#zbnko5m zdyD^j^!9J7`oH!u{~wlOl7jYM(OcdI^#*5Y>BjUumq_g&tx<#_pkzQL3{!g?50d=#eCov*uIw$N*glXJe1F{FuUF_wCElS)Z2X= z8&w0?WkCX%HfL)#n-m1tiLy!jDMqH$LikJF=#lu@k5%&vN zOEmQQ^n*t^76E;JhHPzQqbY0+m8GQ9;~dJLLZ@*sqVX0ui5yz%8Hyn87vqUisY_0- zDtUu5haWdOvDBOX9Y;=s;7ul^_xLxfU(?k(HStRfk0Ab!pY(scal?Nz{Qu?etFHNA ztD=60Y>dte)hUle1IUyYIFgMxgGpvx%Odv4q;WPV?Zj<0pph+zWMfSd=SIUcB_#7^ zgNlm4(v!WIBm4?kpvZnCvp?TXW7~Azs3LT8Gh<0Ew=&W*e+4X_xQ{(e+UCESTaWwz zd1ly>%|#A|W%fgeL_3gAwxjeb?Wi3rAR3U#9Rie*)dfz7YxUK;ex+a4F>@qyQAL0^ zZncndzG56R$F&?R4SOX>&%UDdBid6 zIn=GRfcto+s-%gMB)Wx7!_Z+SS)f3IG!&s%P2eNfHI6~E*=>e`^RpvJQY?T95IOKL zeX-_BCdRE#f06_QAoDyMH;#IIBnT#PWSOtks+PCo`04X-brsea32I~@X(Bwl*Q`$c z{Al@04k=Mmd0}}ts=u%dCO;qn-;qh>Hr7bB6!NOVxy@Yi#GK2vusj7iU9757HTqN~ zNMoKeZY}o)nA*{CqTTPKnWi*JgZFZj&EjD$V;O9zqHV#tB#r5Ur$V3To8iP-bO*Gl_d%qc2$SoU`Hu-6*hWbuWzAn(83_jZ%>P{PY3XVV!q$~ALE^GC( zdIGgR(HnV8Rn*P^7b8#AzONo*U_W}{Ne!=#*qNJIRZzapu_fOkvki(|8NDg>&D=OZ zL3G)1WS*8CFh`-sb*#8*hIN7WDjw6<$D&T|B>JPi`K!*5DF(O*^A+r*Jfnt))c8|M zQKtgEytAqpy@~XZGnVYMJmZSG0U~uvP?i*?DhgDOSYtx6s%6u*vL$SW87`&xJ9cmDLrPHI@G7Pb*cizPGf|!5th41a2ijel>Xfk3i?7Bd*{|)@>|ZBi zH6gO9a2Yd&_ZeKmNQC^e&S$cl!3D2oBCX)C;Ve{0qc|4+*fwK!x{=QYtb#3QD1|Yi z%r?t<$-Mjbli1fF(C?V&w#;Gq3-**PgsGPPsXN(0fb?pIDc{s6b<9{t%6D*47A9ZHlc4rEGU<}u;tiom3^lA-&)1i=j z|I#)cctK)AH-b2*a3Wm%Gt*;#GWjNF6q0q^Evid`6G2yhMg_4TaMUK&x*D*5+KtlF#!)86A7pn~&yvD-Rh%`@(o!Wc#9t=t;(9_y*(MWS;4cPU&cJcE+h} z6fZHrjH@7{6~n40#qgL(yA-oVrt;Kcu=fV1WQ0QY`_I8lVds$PYR7KDvhsTbkC8q6 zct`{-n;z2!($SBZ?;(ZMu1sY(VY)KJ@%p)!LEBL+M{ck-$kHEx=3N+%$#msc!LKD> z?(7`Owu6Iuf-Nb|5wFxCm}U)Du@JO|nHV?%8lk(y3x-=F_d}u8>#AU~iWtSD6|VuV&YM=#_v-HDjZ4mS|L2%K2K}Mhz zVb)f#Q>%4Du>|ea6cbNYrpi<6A!rSmbeh7+xGZ{-TPG);DG9qg=>9!44ScDdh49-_ z;|KUp*RQ-So$jyV%Ss5FnJa^|LYAl%8niBhd%(W!x$Rpq@pcp6(XF^fHFRF2KQP>$ zo@`Qi&QlkFxp%0@2)7RlN4+NzCWo{?_x}5$E?kh!!UM3Vg9R+=xPLWty|S}5Gt_qg z+-v~8k*0?Bf0^Q+IZS56Ny~Q$pap&c2NUt&f7P9P+zEz*>bOO!5J8(uhIJ#%lgMNl z3;y^@Yht z_Dko1D=J@nc@`zIXz6dWsr`Kdt!m8`gGlx59A(t5ZjDVmrsjl#0wT@It~$j=uGRM! z@XJK@Q})NA_sQpEZkNduP-h{cP|l+Qqwr{g--LeHY2&||4dJFD34ZCj7@+4ZH4}La zjfr1gHXr8j#ppOa+gkiuHYf$a+VGA${f!~LtdO!~|X+>{b zY8=`^(0d9`z1f!nNzD`;4&65cNlg)@h5m5oOj&gG%mslXlc+jou#n#`d_l6}hwB+CG5k*Sr36Yrz zP2B)Pq#G?*Iwb)FJiXU@lTvTrdR&WRpV8sUz(Sx3C%f;BHSLY@I$!TqSg!%IetroG zD$gu&K<>-imH@Bh&}f!zwO-`w8Dt>MMZ>8V@{X1g?!2BS0S;GtXTW(%@{L=6uC*fB znj>TvA9Cj80~Hn`A5GSVpyqA$*6rlEa`u=Z!{-DRtCo0{jnK|3KxpDEi3&^DwWNg4 z%|~wf=EtEq^ku$fbX{@*EYr&TP@j@?OyLdVKVk*&H23K=xzmgV8p0Y|jK+@cNaPE1 zovLSR73MssgV04G7S-h7L}ID!!8|-X7U6-7?t~caWg)yk6*s=m)9us~kZ7pC6I1+@ zd&wXWPx{8Z>47wN=yJJ;BgQ&`z)H7hxm}Jq_9GiAq)9R- z7(@1=H+oqdJ(YFEq(LiJW=s}h(Yx~}5%_cQ&3xV0VUT%{sXE!% zVMqItDE@pLL%E2I2<48s8InBVbnt|shpL|$wrvbdWe!LJMr$c+e86OWy77OJ6k_2&3KMqL9=QFd2QUVwwR8X*sgj}5OpiFWK zkiv)DX__mAlH9kRszqfgqLLvBrDbP&mL;Amd=_UXSF4&!?$+*0ZswW?9oH!-BQgjS z*IQf1yzUikvx`UPXLZi2UvHaGMOee-cPA0C5fni_Q zcj2Hhbit;RZ5t^!?2;o_*D4W$VcsfIc+m?Z?b!Uv2;-s&XYSCUiczc2-b0I0g-hNj z@xi1}g6j<*=Dr7UMa-%w&YN`cBbWT>BQ~p;QyS!^#eQ>q9dy!?Nrh+?bfo*_kEe;nyR%9=3OTAD90?RT8#Bk}X#Pkr(TqBF2&!V=` z^iWLr%Yk96POnG@bEb?cv#Uk)5}bP0=~;%g>Sm{t#hoNp#yeFj7UxuD?en)EXw2%= zTS`>YY)#O023TqIXj@8o2KAM29NQM4QH=;sYP$pcqtRoxg?ZK@CWy{=P7(uI7%TOp; zP-^!0wmMVv-f2E>6tEj7ZTG#-KaZMuUUgl1|nl&p%3Dc8tZ4 zW{0iAY38oin5YwiQlKRrH8RP-h95fX$>v!l2*6R~)3vTQ7V(gjstAxGVc>U<8Jwb) zPTqZIfoIV>X`vA2EuAW0Ghj||3;hwn0w`nHnL~5Xr-xuSDNmuyhoZWBBa|hf3)-7$ z6nhe93c?Vv(WT4=mKowy$9Fu8Y)h5yEW6z&zzB7;Yf(a|ei#jb>!ayFWo?MkgWxQK z47{-ws_k4#8xv#$x229MEUK#x*X1k=2QLLnaWhYREFj!ta9&)3I+w+wuB-hQ0SFLZ zlvuP9c*O0k+Bm_8bPyfY2o>Ts&0yRSIg4c@Rv71IVHGS{L3?%!54(HvY;tru5FCHC z9_ER%i7@?-Tq&gCLBVg_3g3?9Gu6P$T^70*)YqUQTN$IHtc4g5UG7WN_J&c!4-lZ& z0a=#~p%2D>Wvx?z(9bP0Z<&FgpEnI^CYsg{+)}t}Teb>kj&)7NNmPz4Zv@MJA2cA4 zE{uQ3IbdMxWrxK|%90Rdmx)yBJ3FI$YLuF4DF~35POQtBilKK{44PuvYIHjt?~mW& zzNwc$LazTnX6dO-hE|>Wu0KO)5xDdvCq>WTfkeI85j!LDvSNHy0&TTnCpr_Y@_=eYt;}dhqY5=4^QRl&pzt9Bed!EmviR=h>B6ynC7MGc`x^9c*)$$|imA)E z9KmcfaDlPY6j0i|;UW8=8oO5$aRyZaYTM*qBd?3;u=u(KdjqYJ_fLd`tRoym(-gX) zqoT2Ua$jR%Ibg0>jte$VWiyOhLaYcnGe^pQ(V0O%I}YnENL$+J%d>ulP(v~JZtnH_wYk$}A_OsQn5BbzOkG2(!baa2N({4d%BrLdzn_qpUhmGmod2kf3s)xrh|=VU=smdZ ze#hs3hAI5A(;4e45x>FbZjXU=hACbM{;p^HFvP31DFz6_lHCVuZC63Xv9`wzN@Y6rcuoPF<~3V<@&m2~m3D5&4GW7GA+XXs{sPo!wDK z85d-&4Og)(j6Q8x3f?Ooxm7VJf?Nw>3_s3fV9y_1xSDfCy31yBhkr2LI_&)xUpcLxXfuNl6z9z^w)MF}E8U)#3YWS4&8 z{-CVR?>0{F?ccm>oP#mMTY-&w90y~vwccFmV3Wd60@~aufc|xzwLI_AA^-goYhcMf z>+D@$bjnFLRX|X?6oMyaW_}(z!Ys&@5~HmlWUY|}!wJnBP8YPsWvf1%(iPjQZ2#s7 zd=-ANqy%pCwL5&H8Tzs{Ux(<1et1ny> z?C%$W*FgAI%!nl0a{QuH&7L*cr$DOVP-67{8fQkKPfPD$L+Lv zSnj#tSMG<%-tcmKzH8dSPFO)VC^+Dw0|si;bY^#=`Ilum3dEF5!JrA9J z^7-aQuXu7vwaQBlnT>)~G|scmodeOzMFBpiJ_`6WePZh+=vMX276uFz4Vd%}>sndc z95j(>Uq_*mC-r*$6iUb)5mCYRy8>n-Y?K==}9iFFRN zB_u(i5p)JpS@Is*ArpnM&nOOwsI6t6IAmTNaVm+)*gWI?2fN{+=&1n$oGYcUGS!0y znn-1azfTgI zyHQk7RQGW=l@WF&jO?B1KXJa9;4BdKcfcpq35}=O+x=GE;TGw}Ub3M+AbPW8_LG;zZ%{IenPEAQ0yCE`_ z5medk+}GQkcA+x*kGZgwAC&01r6-zspCxwld`4~iEZGot%8<4p%sS7d>FR_YB` z1Ifjyuvj`fc|U|FGJ>_SBP*e_IMD*V%9fftjgs&{b6*4#VT3Vun6n`CvL$#d*2ygL z)7eoDSMZ1NGifW#;&EW?%%%0BG5R6&cx8T(iz?c$ah{_eCRo%Dp%dN0c9w$xeo))f z!{R2?4ug`a98BH;1&H}cNC!iP7dTNKFKcpxcOl6#wP-SCOy% z!JYwOsHXEGr4S3cKrNjJ=%MF4T z@!bVaWe=0&6`nIQ;)FZc{l;u(ho}|4c%t0S8wEmM$g~?uCNTxxtk^R4o;IIHXg4Nb zZhIyY?230y#03^WP!{XWxKemhpfBjbwIDOpx8d|`8Pt~dI`s(SzLBSax8yVhRmu9{ zw$*00x8`h$)GaBWP=7&dA{3Isa5b890UcZ}9{lKpxjTOUjiBd@0mQR5q$sBg0u@Iy zwll8RkI|Pv!)|-}!4Q;*3w)M>CtQ|YfuY*dE7B89}m%)-8C#3~yUl6@M z@$xCS^_0V!62E%u6hMI}Baijc^H8CqqH=??%n$8DrN(@_lxx_H?j+3I+s>0uS4W-> zq0;-tBt+ZUCJDUZPCC#K`72}xS)J822;Tq5LaYD!CkRo6su~3oN zg&ag$fC3ZxSR5uvsAWN7eFh2^)f87O^;9TTDscs|OpfUC5ghp1K49VjDrt>4fKO=L zLxxhlumLD^ZNtMYZExK9PV1gvZsMjXa&<%d^2M4I|F-IW|5xsB0rGy*D60s$dYsg6 zMdyH$$qnp@ADG-=TiGN!GTMc$NnfrNngX>@GClAFT;EKG&5U1Bb*)IV83-ppR>OmP z;mE%>wS^m>hiH7_YYVSpTmR5U_95QXcNL(22X&|AmEtABFNSh^r+yF3YBOQc4!O80 zW_5fFeqSWTBALo%V#({BIC-%Lq^vp1z-V;gLfX5Rua>+TgW*Re+49!T|9sLVQu&ivPtDwn<# zB=%%^7~>Vd1WyRru7m;?SybRpuTdTkp!CqN?qy2_^y(`WSe9uYa9qE|o zcGg`Ff;qg;-$@F&9QY~YAiHAU+kZCb9ucTo{Gb6k#xmH@V2*O=2$V9hv3N!FG!${7 zTp-rnDN>xcgi;~=_Mxb*sFFSwD6?;CdR1Cbi8F3{DehvaW-t1+1l`nx@J2Uuss#I} z7YEQopO?lmS-vrY<18fFZQj;RUYHV1%R8M@0Tkd>SU5a}8CH-r{t1(N7NT#$sq)^w zmVCLx`_@z>k8uq?b|oJ{kgpSC_o3O$%4V2RH#rTN1lnS2uTuJCihJod=< zbK*bD&;BL?vnWrN{SD(*)sBR6Em-F63?LK}2oSl&aN^HYHdZan2q(BF z)D7uS5-tMDl2IECM|7gx%2> zc};Ho`i;kR%Dy)GUpF~6W1Ki*Wd%6#FMi5xBe)PX;SaussO4z3-v?U!u2?q%8AwgJaANO0!?)r6)*$^idCj}7^=gi;C5G{41QB@Q*c8MR zn@7|~dhs0<3%J0Tf=dI8%-XKKYj#sRI^D}q0b6V;M(o(HwO9@8wBzAG+cAYdGz_#F+444xshfBlAac=NZ;*fOTY9TtZ05z^pR5AEUigsEZVK|3P%EN69l9T#rt ztMj^w%zcjN9ADJ>WP_UYuZX&jZR@ji&u>=*IXGQau?w2zE-No+$nTgu_GgZsa&$M# zZYvI)dh>Bd=#L)dh+N*aEL{^5`qD^U_KpbEKUE%6$K7WS@R1G!nIcLmnv5J+Ack3a z2%04+f%{()h=i%kj`tsqCkKKoh%KE`ZGs_5p$zYHg~mcPi@d*l{hE-c6mFY*IgBX* zL6~^BD26Gh26+p)EPJ2IL;Sue$6HLwX#VB^s1h4Q+Hww|5(zlpA&M+;`=Svm=S+;v zJkHERRBWx#%q|GpK%F+Rc$V1Q(oO+`kKp_?Haa3}B9gaq1r)nI#4!25hPe^VDlLJ6 z5!=XtON&dC5`5o5js^}ccFq*%Q{E2ZcqcfHG;3~hzIV1Smr2JnUrzA}qvJS0pHByD zCj6^D|3`QKV-Mkn7l`7C+;{KiDa87OI_;q(s#HJaMS4T(P0Ely98^+ZR5*wy_!G56 z3+J?z-u?HtV2|%ah$ea4I0FGlLpsR$NLzoiQt?zYqY;)WuKzk zX&zj^7gwX#;?y|AsCmpgmqu;LL}sQV%xExYp;~&@;1uwbc*ZH@^yP4QVY8iniz)@m z`NT(X?G-$aA(h8Yb5{k|ODM1t4fD*k+EhMk&aPsfdgTiZ`crm;aE@iffH$0xl)xzk zP;cf1mo~EIT*L1pFr>c)6bMypnY#=C1chd$F z%xSI__^fdrclZD!Ywh;nrQKS)Gv4n`Ga?-lrHjRFhZVaU8$}1Fr&DC&0+5EHg+pD* z&pKO@6Taone5>3KFT+$B7Il<7`8grSj`|R;58(C6d48Z%;pV6 zj;G<~o22D(mZ@K0+17Z31aLV+Ib~<-!z5SSzQzTB0}{rh&2duz%ly zaG}^#dJ9k$#eoF^;`w!0|1(z1zu5!@L z@tL*vL%QefR>d1{NE>i|3C`dpl0@?KUi{TkiN6mGNRUDey67%i8-Y4@?C?4BK3S) zfr7HErec}l`_~GWBpfXk`;cTxqhQ@?lDsP1%O4g~b66sRNmD#`1VWS0+t5BO78E2& zICkZ`iPxc*m11BQxRt7dE1Ik0(P7<}s}!ezaiQ@+*Mlw==xGFmqi$4i>jy2&9mUsA z*j>?_P%uwoz{pMh_#KrelvNTR1Opo6mb0SRdK0M!Onk`Fp z=ys4!Z0vaFCTK~5b`EdIQS#2A*Qxqp3-@B7aA|=0WBE1wz(P~(nkuXl$tH%v&|#9R zeLm0olbua(?JgZv2G?R6yz3gVQMwP#Y?)mq-k6@gOK|{k8!R#T#dqf~3JgcyYV_!1 zp9v$!CMgIg^wGUhsG`m7QN0#1VZJ^W5m6TdZ-x>ULth(W{8-URkIild7h~&lW-x6# zkamVW=Fm$^>gUSsTS%jcc8$w;GJ85Mm6ERkFl=0h8YO#a*X7vZdhL(NZ^$yXf-l)ch{DbY`+M4q6{fN>WVq;uQz|Q)ZP2YT2wh+vZ+$wOqNyK`2r(RlH>uebaK2avbVcg z{@;W^5h;qUc)ExRI?u}9`&={vL4h#9%kfVg8oSDKpXrtx)=Dkv95RS`c6_Ya%CPQC zTS5MSS`B|Ys|SBOr^kwpi#7i^XAT5X7Z2tT*1m^K5{>uKVM+tlmjz}bI(8LGIh*ms zsMRF~)Z zhf64Z9SiFjJH1?Ww#3?_{~Ehqr&!d1@{PteLg{| z77qv)uM`QvK+3m{7!R~TPcnJ&7Vd@$JSpSW?&Q|)()t24_zF+GMe1DJe9u=JL((pz z4@A;xoiw;3?LGCEciG5$Z{N|`rA>OUUZZTmgJoTfSjMXtou~^{@2Gdt3#}aVPkp&$ z;<#mYqWv~IR4PWq6R@TK>G(xHnxscc2G>Kz zna3IzOUIMP6YyJPT55w=uM}j6{e%$j8MAVCg2K`y>GEQHGW+Q1C~P&o&OS8KcHC@N z=WVu!LBgQ8k675M3KmokUnj4A2`EwxIHITBFM{dT(;41?F>3Zo@~au76RvQJs*KoS z&L@-VLeWtdWPLNQgrr$_l(4LdjNv_DW?{dFzQj%)S2oXPWW_8#V2>5y%Hx-?Of->d(WT$~az&0U;asF!k=o??sn0dY zP~Sai?n7|WSX9ty2<<9(n`Ys=AX@RNRjzxYcMjsFZ?*klo(9`Xy0pz%+dO3^(+0== zbA1P2Ogj6>A;Xc#xtnp7B~iZ?OK=h>aDmEqi5QqA&V7UYaQwbvoMw%fid2k?v=$&W zU9LC1N7!8#Q-WfmkA|V1){F$W1nSN@5^O7TnxTnpys|30Y$U>gDEnU0u7`$EzCUgxKF=SKK zc(M!e{m6AkXWHEu3NF(2SA@7<23J^(Jg^;%h5KGp(c)gN$N7PNs6sUOs-M(%hY-0? z|B;LE-P5z_yS}s1J{j;76a!AP{;PNwe>?_)&boGne>lMWCEi7uGGMK$fW+GXaJzP@ zLeKG9htxxEMuTA+D1<>_B7;wzX8q{haH4_P(6W0v8!dhg{dEgbRwR;)&j-;kT{BT* zGF5alYiw*J#lFCK_w@1W)i+2V*HX%u9(Z`}>My23@3YcyD46nzA%%NuA6 z$lONl=$>A5cNf{XGkwN zKJmz+b(iE7?Za|mYx@aj!F+AgUP^!_!U^+IR_LR7^Wd6_?3V!V5M8Vknv-+Y*0=VB z3RDkWb~q(Xg>VWlaH=;l$s&6kowW8sh+In-9=`2&@$jt{s5oin8d<4-abf1&S1-yY z4Xll-Q5$CpVd1vYSL)4;BBv`+o2Uw73krO-6KUK|T~D`hx1+))!2)*!D_zF}$3nUF z@+Bco^6H5c!eU*o;#dsv6N7QlCIKiGMYk#s&zjCk;|@N&6P?8zHiT>2<9Z~6OW+dy z1;en?LH?maVakQZ=w<717oPTVD5{odQy#~CajBt5Rs?}0C1?oiNK3OWSt#y7$R%ayCbDQ7oAH<-&`Wp2>)fn@T+)hdW? zvE+)d2_$+7ALBDazH-i|WSMsT%KI8p;uxa*y6SzABt(4(r{>`#y^}+@uNBzb65Cdz zz%0=Yndh4^T4e5FymIOP2e;OLU$IhxNx)$Py!MR08zX)l`2XVJ z^~^~xQbAU_TL8%u;DbF~QB3)XgcU}tLY7)W0SyEOdbQ!8*+P<|dL`kJ9q|#!JE2iF z2P|F)Gcm)p=B!P3ckkv1x081a-vK`zC7nzWwj4fZ4YttY{*0j83 z`PT;>OuT#X3hZf2Y|#0OO*KdOdF<`w8GXTMqD!jidZDjP_B-7vFClC@%wCpeyiVBR z-jHXmyT>GNns9^GS}Ruz7(N+Gs|YythV2@4+Vsb`i=eGpP)ZXpdFz-;FN8{;cCt`v zc+QT8%U1bDX*pG@Uj@NNt;c*Ds=wF$3*_JHS9k(r_YmL_=>d2n_*Y@vV3A``LM;>6=Nn|z zre+N07A%UrbNF+fy2fh#6N|1jjqmfH-t*^9**oh)QB;1kEqHS}+ypo@-}EWd{rd6h z%$flx&-P89`bb8uk&YOaJsvhT3Wg!wx(1MRS$J~<4L!=WM+XbG8e#Rw9dqM9!@ z+#_6QHns5>W898fQL8nHugDl&2EBr0Q&x_YDt@cktT5=HQP5iCd`p4gHB$_A!2NZi zfd&6%=r+PKcF zcD>}A2!}ZrljP{g7lSURAIQNm87b5}hmrWXJFAsVr&+soJYUbIW<3f`8Rn&64AN|n zSdEEN^c|s2!F}}qI+8?SVwkqY15P7FqL;E!ycf$J%{gv!1HO@T*!_;91hNgu4&Yv_ zLVv=T^B%)U-s|Imj%(pjRp^!<7P~u*P@4{oI(<@|8!tD9aMICh#2eS4$eGG3v%|!D z3A9hb5HtqpqehMMa#N!Ts_sj&kZ`-;{^vSa$2KvUzQTu(^Rn+6Ub!urJ5;1XyfGF+ zPk&ug5Jz{R?Xt?FQ>0Rd;JiS)`RxM2aDHoU{Tt$KM~`fJ4=u@MHp~=H1h{{0>(l^Z z)`#oM8@Fg94%5>@ozPzIKn4u?Z9^Kdq zb>z6+;*Il{_Z$%8;%)VaMOgBcyqA`}UcP78_o$yfdftM9!cK-_c98twa zHqXs$;lCQr75r$Jq!!*D1TBMN$&{KKiwJy76aO*8aAD0)##01^2jiQZ=S6PyL9z`dPCX(PcIvRFR%Q%oq&J*9@-?yiy6KV#!b`ri50d zRQ+HHJA+XuO_7QOd(_ieE+CfY<*sY!`#?Q6B zy5398or>DtM&>Pt;fqQzX%#y7TO~D@!Q8N`jsznSaHVV@QII_GY`mUV{igy`NP(A}J%X}?5&&wsZWPQiBz zc?)>svRp9m2Q!__B)myK^VmyYTJ!dL1hE0?7sFX%XPzI+HQT~=qMN2?g-TJ)yv&^o zP-?RkV&wTaPG0K7dqAKQ@lbwGb9HunYmN}@dk%i*Y6CgtG26<8lS=_zY90qI7DfB}ire6El{#mc z;nEwoLQ&~Dc`v!lIOL$!8Cqc^q1h(sj5ncZeba?%Dy69??%`Jp?ZZZ>TN*R4Ep}sI zw{?js2HG>`K26%gY%2}$aMg~J`MfG&2;w$5vc%2GLM?tmm92FD7>Lt&#@luqnUb7n zMTH2f?x*aH%6_dW3+wKB{N5x-bY8Q7_w;nlC+dFhl!&BN&Ff1*S?}lyRicHzJ65=f zO#y?AA+n$PMh7kEH#NpfC>Lnwc{{Z)Vlk`VfVXgIAuJw^YU76nsxsw4)XG69SOl3M zXsToc7Sjz)_Km2o@OS4l8Pk|X#8Bcodlqp{eX(rt5%t!Csf6D|iO(IUR*jxn8u2KO zQ2ElC42(){N+?>x3X&7oo+mgooiaS zIvzb95Qu_Akw-&VCsEKR{6ZwE1sQ^Dq&q8pmb6%CggTRbctH9@U2Nq8LLNW}pd=Wl z)2ye3h=#^9CL^`Tj0Z|w$>T;#V)NRoh|No=l@&1z-e+UkRuibQ&9wG2&Ky}hRs@pk z&{u^6Votln-4}O_cY$AM;?jnlE9nfz_he1h*m+5^E44Gg@Gffy)%TbyGEpeMe`{2) z5*7nD8Bstj#>{{T1EU_vd5^`35WIP5gh(GPDeFoGC)=FJWY{fZomyNDEx}y7*y@Q+ zE!*X`kfss8HWb@hx{mGnzB$zNE*{{roGJ) z74vfpFx-*xmyL|>aP{5|H_RRB2nK&RUyU)Q5Nyxk0h)N4isUHfG~i4EXs`76b>R{p zaTE$B^0yjYa0Dz4T!#L-BNMU4i_Hbr=KTo*#^mn;q#H-@)7~#Sw!WzJVyR2QRWHPVe)!r_j!+mZ)-gCwne;e2sekE2s#u zBB@|AlL)>RmIfI%!jyQ9yJ=36Y=kjt3Ss$!7>SBfYIXZ3iz10mkjP@voHl-|)^tIh z#IY2OH0SyP1y$O`Gex+}Lv)?dR?e$O)x$1IK~cET zQ>(H{FhP9X=x~9~8;=t1n2V;CyWI65+}B__iGq-W+!Er~oYCPvy%Po`*xl&OqhjBD zAY4Ky{Ib^XLF8{~54CQ6@9!S7KA#DyA;cCC4>(OU)A_lDLI*%?VKI zVF7!a^&(NWCGBf}7T177CBQTaEqJ;4=I>8sWt6@0_tP^XfDa+y^Fs#!aMb<(TLYk) zx#~9>06Tw+{0|I*1`1Fvhk^oP1X%b0y#E*V9xyumxR8KO1iyck6;%?Xmy{C&9Mu1N zvW7l2DgnShC<8udfX|;-p6~a!#s5ntD<~%^CaS3PLRRdr2;|R*0khqY3km3(U>e}N zwVm0c5a{ypIj35H*oP5cau-UI%12Jj*Mk^K9u z))ybJ{`#KRAIyIO{HY7|XQcJ#IqF>voJ9l7^EQBze{cRjuUcPVz+e9f@cF6^u)cF~ z6?Akk0mQyF)&CjT`8ng>v6_7`fMyBsA^DRIaIf`s2IS#4jFNwr;g6Th=XhX6ZYx@V zyea@v)Bg=m7ho&?4W782u7QQ2G9diCgteuijJ377qs{N3@iw)WdI2E!fL{82L-^0D z))&xce+LbS`D@{54>(sQW@=$5sIPBmZ!fEBrEC1B(!%q+kHG7QeUG4h2e9Y;J?{hn zQPbb#UG)!X4uGk{$kf;o5I!3aO8)nGSMbC)-2qeyHX!eee`XwTul2o0`YrVH_LKmK zMOgf|jOV*DHmd+K4g{#3?<2;aSFJBS#&6MOtd0L`EsWV6g`ordOsoK9{(da#&#TtA z6CeWen_Bpr?A`B+&$(K^f(v-Wjsc?p(Vu{Td#x`v;OB2J0fzz|bS*4?kG9e&6WRl) z%y)o+>F@1i2j~~SK@+mJcK9y4VI!++Y6Y;l{uJAI-UTFP8_1>rZA1zv>UYV6Kd)L} zU(Vk`|L6juE{6J!{}(;|Icfk-UP(0oRS1Ae^Cu+WUhA7G{9DvN9*Q5>-!uLDig>QM z`zLg*ZvsF><~J4bqgwyl@bg^b@F$)FU_k#3-rt)3zbPI*uZ`#Wc|TdaRDa9z&m+!r z*_@wnvv2-y^87IX|8@fXYyQ4(ZatU1`3Y$J_P>kZJV*JS>iZ-4{rWB&^T+jl9<$W_ zTPeSXuz8;Nxrof4$!mSne@*(7j@&*7g7gZzZ2H25WNe}Vn+a>?{-Z~R_w z&m}m1qM{o93)FuQ46!nEyV!!gHSIhx~u?BuD(h^XuU8ua5jb=X`!t`zNPZ^#A7k{c!c% zr}ii2dCvdF{Edh0^GrW?VEjq2llLzO{yIwiz68(R$9@tF6#hc+=PdDW48PAy^4#6y zCy{UIFGRm|*MEB4o^PT5L=LX_1^L&`^au3sH`JdO;`!F)Pb#&ybLsOPyPvR& zHU9+rW5D=_{k!J{cy8DK$wbij3)A!WhriU_|0vLNTk}tv^QK>D{sQ}>K!4o+VeETu zbo_}g(fTj&|GNqDd3`;%qx>XV1sDeYcrynq2!C%?c_j@FcnkclF2e+b1PDE++xh+1 F{{tUq7iIte literal 0 HcmV?d00001 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..b7a3647 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Tue May 17 23:08:05 CST 2016 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-bin.zip diff --git a/gradlew b/gradlew new file mode 100644 index 0000000..9d82f78 --- /dev/null +++ b/gradlew @@ -0,0 +1,160 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..5f19212 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..ff2d143 --- /dev/null +++ b/pom.xml @@ -0,0 +1,258 @@ + + 4.0.0 + com.sendinblue + sib-api-v3-sdk + jar + sib-api-v3-sdk + 1.0.0 + https://github.com/sendinblue/APIv3-java-library + SendinBlue's API v3 Java Library + + scm:git@github.com:sendinblue/APIv3-java-library.git + scm:git:git@github.com:sendinblue/APIv3-java-library.git + https://github.com/sendinblue/APIv3-java-library + + + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + + + sendinblue + https://oss.sonatype.org/content/repositories/snapshots + + + sendinblue + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + + + + + SendinBlue + developers@sendinblue.com + SendinBlue + https://www.sendinblue.com/ + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M1 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.12 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + pertest + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + jar + test-jar + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.10 + + + add_sources + generate-sources + + add-source + + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.4 + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + + + + + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + + + + + + + + + io.swagger + swagger-annotations + ${swagger-core-version} + + + com.squareup.okhttp + okhttp + ${okhttp-version} + + + com.squareup.okhttp + logging-interceptor + ${okhttp-version} + + + com.google.code.gson + gson + ${gson-version} + + + io.gsonfire + gson-fire + ${gson-fire-version} + + + org.threeten + threetenbp + ${threetenbp-version} + + + + junit + junit + ${junit-version} + test + + + org.apache.commons + commons-lang3 + 3.0 + + + + 1.7 + ${java.version} + ${java.version} + 1.8.0 + 1.5.15 + 2.7.5 + 2.8.1 + 1.3.5 + 1.0.0 + 4.12 + UTF-8 + + diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..dc1773c --- /dev/null +++ b/settings.gradle @@ -0,0 +1 @@ +rootProject.name = "sib-api-v3-sdk" \ No newline at end of file diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml new file mode 100644 index 0000000..15d49b7 --- /dev/null +++ b/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + + diff --git a/src/main/java/sendinblue/ApiCallback.java b/src/main/java/sendinblue/ApiCallback.java new file mode 100644 index 0000000..e0e11ca --- /dev/null +++ b/src/main/java/sendinblue/ApiCallback.java @@ -0,0 +1,62 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sendinblue; + +import java.io.IOException; + +import java.util.Map; +import java.util.List; + +/** + * Callback for asynchronous API call. + * + * @param The return type + */ +public interface ApiCallback { + /** + * This is called when the API call fails. + * + * @param e The exception causing the failure + * @param statusCode Status code of the response if available, otherwise it would be 0 + * @param responseHeaders Headers of the response if available, otherwise it would be null + */ + void onFailure(ApiException e, int statusCode, Map> responseHeaders); + + /** + * This is called when the API call succeeded. + * + * @param result The result deserialized from response + * @param statusCode Status code of the response + * @param responseHeaders Headers of the response + */ + void onSuccess(T result, int statusCode, Map> responseHeaders); + + /** + * This is called when the API upload processing. + * + * @param bytesWritten bytes Written + * @param contentLength content length of request body + * @param done write end + */ + void onUploadProgress(long bytesWritten, long contentLength, boolean done); + + /** + * This is called when the API downlond processing. + * + * @param bytesRead bytes Read + * @param contentLength content lenngth of the response + * @param done Read end + */ + void onDownloadProgress(long bytesRead, long contentLength, boolean done); +} diff --git a/src/main/java/sendinblue/ApiClient.java b/src/main/java/sendinblue/ApiClient.java new file mode 100644 index 0000000..e9eb2df --- /dev/null +++ b/src/main/java/sendinblue/ApiClient.java @@ -0,0 +1,1206 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sendinblue; + +import com.squareup.okhttp.*; +import com.squareup.okhttp.internal.http.HttpMethod; +import com.squareup.okhttp.logging.HttpLoggingInterceptor; +import com.squareup.okhttp.logging.HttpLoggingInterceptor.Level; +import okio.BufferedSink; +import okio.Okio; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +import org.threeten.bp.format.DateTimeFormatter; + +import javax.net.ssl.*; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.UnsupportedEncodingException; +import java.lang.reflect.Type; +import java.net.URLConnection; +import java.net.URLEncoder; +import java.security.GeneralSecurityException; +import java.security.KeyStore; +import java.security.SecureRandom; +import java.security.cert.Certificate; +import java.security.cert.CertificateException; +import java.security.cert.CertificateFactory; +import java.security.cert.X509Certificate; +import java.text.DateFormat; +import java.util.*; +import java.util.Map.Entry; +import java.util.concurrent.TimeUnit; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import sendinblue.auth.Authentication; +import sendinblue.auth.HttpBasicAuth; +import sendinblue.auth.ApiKeyAuth; +import sendinblue.auth.OAuth; + +public class ApiClient { + + private String basePath = "https://api.sendinblue.com/v3"; + private boolean debugging = false; + private Map defaultHeaderMap = new HashMap(); + private String tempFolderPath = null; + + private Map authentications; + + private DateFormat dateFormat; + private DateFormat datetimeFormat; + private boolean lenientDatetimeFormat; + private int dateLength; + + private InputStream sslCaCert; + private boolean verifyingSsl; + private KeyManager[] keyManagers; + + private OkHttpClient httpClient; + private JSON json; + + private HttpLoggingInterceptor loggingInterceptor; + + /* + * Constructor for ApiClient + */ + public ApiClient() { + httpClient = new OkHttpClient(); + + + verifyingSsl = true; + + json = new JSON(); + + // Set default User-Agent. + setUserAgent("Swagger-Codegen/1.0.0/java"); + + // Setup authentications (key: authentication name, value: authentication). + authentications = new HashMap(); + authentications.put("api-key", new ApiKeyAuth("header", "api-key")); + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + } + + /** + * Get base path + * + * @return Baes path + */ + public String getBasePath() { + return basePath; + } + + /** + * Set base path + * + * @param basePath Base path of the URL (e.g https://api.sendinblue.com/v3 + * @return An instance of OkHttpClient + */ + public ApiClient setBasePath(String basePath) { + this.basePath = basePath; + return this; + } + + /** + * Get HTTP client + * + * @return An instance of OkHttpClient + */ + public OkHttpClient getHttpClient() { + return httpClient; + } + + /** + * Set HTTP client + * + * @param httpClient An instance of OkHttpClient + * @return Api Client + */ + public ApiClient setHttpClient(OkHttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /** + * Get JSON + * + * @return JSON object + */ + public JSON getJSON() { + return json; + } + + /** + * Set JSON + * + * @param json JSON object + * @return Api client + */ + public ApiClient setJSON(JSON json) { + this.json = json; + return this; + } + + /** + * True if isVerifyingSsl flag is on + * + * @return True if isVerifySsl flag is on + */ + public boolean isVerifyingSsl() { + return verifyingSsl; + } + + /** + * Configure whether to verify certificate and hostname when making https requests. + * Default to true. + * NOTE: Do NOT set to false in production code, otherwise you would face multiple types of cryptographic attacks. + * + * @param verifyingSsl True to verify TLS/SSL connection + * @return ApiClient + */ + public ApiClient setVerifyingSsl(boolean verifyingSsl) { + this.verifyingSsl = verifyingSsl; + applySslSettings(); + return this; + } + + /** + * Get SSL CA cert. + * + * @return Input stream to the SSL CA cert + */ + public InputStream getSslCaCert() { + return sslCaCert; + } + + /** + * Configure the CA certificate to be trusted when making https requests. + * Use null to reset to default. + * + * @param sslCaCert input stream for SSL CA cert + * @return ApiClient + */ + public ApiClient setSslCaCert(InputStream sslCaCert) { + this.sslCaCert = sslCaCert; + applySslSettings(); + return this; + } + + public KeyManager[] getKeyManagers() { + return keyManagers; + } + + /** + * Configure client keys to use for authorization in an SSL session. + * Use null to reset to default. + * + * @param managers The KeyManagers to use + * @return ApiClient + */ + public ApiClient setKeyManagers(KeyManager[] managers) { + this.keyManagers = managers; + applySslSettings(); + return this; + } + + public DateFormat getDateFormat() { + return dateFormat; + } + + public ApiClient setDateFormat(DateFormat dateFormat) { + this.json.setDateFormat(dateFormat); + return this; + } + + public ApiClient setSqlDateFormat(DateFormat dateFormat) { + this.json.setSqlDateFormat(dateFormat); + return this; + } + + public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { + this.json.setOffsetDateTimeFormat(dateFormat); + return this; + } + + public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { + this.json.setLocalDateFormat(dateFormat); + return this; + } + + public ApiClient setLenientOnJson(boolean lenientOnJson) { + this.json.setLenientOnJson(lenientOnJson); + return this; + } + + /** + * Get authentications (key: authentication name, value: authentication). + * + * @return Map of authentication objects + */ + public Map getAuthentications() { + return authentications; + } + + /** + * Get authentication for the given name. + * + * @param authName The authentication name + * @return The authentication, null if not found + */ + public Authentication getAuthentication(String authName) { + return authentications.get(authName); + } + + /** + * Helper method to set username for the first HTTP basic authentication. + * + * @param username Username + */ + public void setUsername(String username) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setUsername(username); + return; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set password for the first HTTP basic authentication. + * + * @param password Password + */ + public void setPassword(String password) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setPassword(password); + return; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set API key value for the first API key authentication. + * + * @param apiKey API key + */ + public void setApiKey(String apiKey) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKey(apiKey); + return; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to set API key prefix for the first API key authentication. + * + * @param apiKeyPrefix API key prefix + */ + public void setApiKeyPrefix(String apiKeyPrefix) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix); + return; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to set access token for the first OAuth2 authentication. + * + * @param accessToken Access token + */ + public void setAccessToken(String accessToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).setAccessToken(accessToken); + return; + } + } + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + /** + * Set the User-Agent header's value (by adding to the default header map). + * + * @param userAgent HTTP request's user agent + * @return ApiClient + */ + public ApiClient setUserAgent(String userAgent) { + addDefaultHeader("User-Agent", userAgent); + return this; + } + + /** + * Add a default header. + * + * @param key The header's key + * @param value The header's value + * @return ApiClient + */ + public ApiClient addDefaultHeader(String key, String value) { + defaultHeaderMap.put(key, value); + return this; + } + + /** + * Check that whether debugging is enabled for this API client. + * + * @return True if debugging is enabled, false otherwise. + */ + public boolean isDebugging() { + return debugging; + } + + /** + * Enable/disable debugging for this API client. + * + * @param debugging To enable (true) or disable (false) debugging + * @return ApiClient + */ + public ApiClient setDebugging(boolean debugging) { + if (debugging != this.debugging) { + if (debugging) { + loggingInterceptor = new HttpLoggingInterceptor(); + loggingInterceptor.setLevel(Level.BODY); + httpClient.interceptors().add(loggingInterceptor); + } else { + httpClient.interceptors().remove(loggingInterceptor); + loggingInterceptor = null; + } + } + this.debugging = debugging; + return this; + } + + /** + * The path of temporary folder used to store downloaded files from endpoints + * with file response. The default value is null, i.e. using + * the system's default tempopary folder. + * + * @see createTempFile + * @return Temporary folder path + */ + public String getTempFolderPath() { + return tempFolderPath; + } + + /** + * Set the temporary folder path (for downloading files) + * + * @param tempFolderPath Temporary folder path + * @return ApiClient + */ + public ApiClient setTempFolderPath(String tempFolderPath) { + this.tempFolderPath = tempFolderPath; + return this; + } + + /** + * Get connection timeout (in milliseconds). + * + * @return Timeout in milliseconds + */ + public int getConnectTimeout() { + return httpClient.getConnectTimeout(); + } + + /** + * Sets the connect timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link Integer#MAX_VALUE}. + * + * @param connectionTimeout connection timeout in milliseconds + * @return Api client + */ + public ApiClient setConnectTimeout(int connectionTimeout) { + httpClient.setConnectTimeout(connectionTimeout, TimeUnit.MILLISECONDS); + return this; + } + + /** + * Get read timeout (in milliseconds). + * + * @return Timeout in milliseconds + */ + public int getReadTimeout() { + return httpClient.getReadTimeout(); + } + + /** + * Sets the read timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link Integer#MAX_VALUE}. + * + * @param readTimeout read timeout in milliseconds + * @return Api client + */ + public ApiClient setReadTimeout(int readTimeout) { + httpClient.setReadTimeout(readTimeout, TimeUnit.MILLISECONDS); + return this; + } + + /** + * Get write timeout (in milliseconds). + * + * @return Timeout in milliseconds + */ + public int getWriteTimeout() { + return httpClient.getWriteTimeout(); + } + + /** + * Sets the write timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link Integer#MAX_VALUE}. + * + * @param writeTimeout connection timeout in milliseconds + * @return Api client + */ + public ApiClient setWriteTimeout(int writeTimeout) { + httpClient.setWriteTimeout(writeTimeout, TimeUnit.MILLISECONDS); + return this; + } + + /** + * Format the given parameter object into string. + * + * @param param Parameter + * @return String representation of the parameter + */ + public String parameterToString(Object param) { + if (param == null) { + return ""; + } else if (param instanceof Date || param instanceof OffsetDateTime || param instanceof LocalDate) { + //Serialize to json string and remove the " enclosing characters + String jsonStr = json.serialize(param); + return jsonStr.substring(1, jsonStr.length() - 1); + } else if (param instanceof Collection) { + StringBuilder b = new StringBuilder(); + for (Object o : (Collection)param) { + if (b.length() > 0) { + b.append(","); + } + b.append(String.valueOf(o)); + } + return b.toString(); + } else { + return String.valueOf(param); + } + } + + /** + * Formats the specified query parameter to a list containing a single {@code Pair} object. + * + * Note that {@code value} must not be a collection. + * + * @param name The name of the parameter. + * @param value The value of the parameter. + * @return A list containing a single {@code Pair} object. + */ + public List parameterToPair(String name, Object value) { + List params = new ArrayList(); + + // preconditions + if (name == null || name.isEmpty() || value == null || value instanceof Collection) return params; + + params.add(new Pair(name, parameterToString(value))); + return params; + } + + /** + * Formats the specified collection query parameters to a list of {@code Pair} objects. + * + * Note that the values of each of the returned Pair objects are percent-encoded. + * + * @param collectionFormat The collection format of the parameter. + * @param name The name of the parameter. + * @param value The value of the parameter. + * @return A list of {@code Pair} objects. + */ + public List parameterToPairs(String collectionFormat, String name, Collection value) { + List params = new ArrayList(); + + // preconditions + if (name == null || name.isEmpty() || value == null || value.isEmpty()) { + return params; + } + + // create the params based on the collection format + if ("multi".equals(collectionFormat)) { + for (Object item : value) { + params.add(new Pair(name, escapeString(parameterToString(item)))); + } + return params; + } + + // collectionFormat is assumed to be "csv" by default + String delimiter = ","; + + // escape all delimiters except commas, which are URI reserved + // characters + if ("ssv".equals(collectionFormat)) { + delimiter = escapeString(" "); + } else if ("tsv".equals(collectionFormat)) { + delimiter = escapeString("\t"); + } else if ("pipes".equals(collectionFormat)) { + delimiter = escapeString("|"); + } + + StringBuilder sb = new StringBuilder() ; + for (Object item : value) { + sb.append(delimiter); + sb.append(escapeString(parameterToString(item))); + } + + params.add(new Pair(name, sb.substring(delimiter.length()))); + + return params; + } + + /** + * Sanitize filename by removing path. + * e.g. ../../sun.gif becomes sun.gif + * + * @param filename The filename to be sanitized + * @return The sanitized filename + */ + public String sanitizeFilename(String filename) { + return filename.replaceAll(".*[/\\\\]", ""); + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * "* / *" is also default to JSON + * @param mime MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public boolean isJsonMime(String mime) { + String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"; + return mime != null && (mime.matches(jsonMime) || mime.equals("*/*")); + } + + /** + * Select the Accept header's value from the given accepts array: + * if JSON exists in the given array, use it; + * otherwise use all of them (joining into a string) + * + * @param accepts The accepts array to select from + * @return The Accept header to use. If the given array is empty, + * null will be returned (not to set the Accept header explicitly). + */ + public String selectHeaderAccept(String[] accepts) { + if (accepts.length == 0) { + return null; + } + for (String accept : accepts) { + if (isJsonMime(accept)) { + return accept; + } + } + return StringUtil.join(accepts, ","); + } + + /** + * Select the Content-Type header's value from the given array: + * if JSON exists in the given array, use it; + * otherwise use the first one of the array. + * + * @param contentTypes The Content-Type array to select from + * @return The Content-Type header to use. If the given array is empty, + * or matches "any", JSON will be used. + */ + public String selectHeaderContentType(String[] contentTypes) { + if (contentTypes.length == 0 || contentTypes[0].equals("*/*")) { + return "application/json"; + } + for (String contentType : contentTypes) { + if (isJsonMime(contentType)) { + return contentType; + } + } + return contentTypes[0]; + } + + /** + * Escape the given string to be used as URL query value. + * + * @param str String to be escaped + * @return Escaped string + */ + public String escapeString(String str) { + try { + return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20"); + } catch (UnsupportedEncodingException e) { + return str; + } + } + + /** + * Deserialize response body to Java object, according to the return type and + * the Content-Type response header. + * + * @param Type + * @param response HTTP response + * @param returnType The type of the Java object + * @return The deserialized Java object + * @throws ApiException If fail to deserialize response body, i.e. cannot read response body + * or the Content-Type of the response is not supported. + */ + @SuppressWarnings("unchecked") + public T deserialize(Response response, Type returnType) throws ApiException { + if (response == null || returnType == null) { + return null; + } + + if ("byte[]".equals(returnType.toString())) { + // Handle binary response (byte array). + try { + return (T) response.body().bytes(); + } catch (IOException e) { + throw new ApiException(e); + } + } else if (returnType.equals(File.class)) { + // Handle file downloading. + return (T) downloadFileFromResponse(response); + } + + String respBody; + try { + if (response.body() != null) + respBody = response.body().string(); + else + respBody = null; + } catch (IOException e) { + throw new ApiException(e); + } + + if (respBody == null || "".equals(respBody)) { + return null; + } + + String contentType = response.headers().get("Content-Type"); + if (contentType == null) { + // ensuring a default content type + contentType = "application/json"; + } + if (isJsonMime(contentType)) { + return json.deserialize(respBody, returnType); + } else if (returnType.equals(String.class)) { + // Expecting string, return the raw response body. + return (T) respBody; + } else { + throw new ApiException( + "Content type \"" + contentType + "\" is not supported for type: " + returnType, + response.code(), + response.headers().toMultimap(), + respBody); + } + } + + /** + * Serialize the given Java object into request body according to the object's + * class and the request Content-Type. + * + * @param obj The Java object + * @param contentType The request Content-Type + * @return The serialized request body + * @throws ApiException If fail to serialize the given object + */ + public RequestBody serialize(Object obj, String contentType) throws ApiException { + if (obj instanceof byte[]) { + // Binary (byte array) body parameter support. + return RequestBody.create(MediaType.parse(contentType), (byte[]) obj); + } else if (obj instanceof File) { + // File body parameter support. + return RequestBody.create(MediaType.parse(contentType), (File) obj); + } else if (isJsonMime(contentType)) { + String content; + if (obj != null) { + content = json.serialize(obj); + } else { + content = null; + } + return RequestBody.create(MediaType.parse(contentType), content); + } else { + throw new ApiException("Content type \"" + contentType + "\" is not supported"); + } + } + + /** + * Download file from the given response. + * + * @param response An instance of the Response object + * @throws ApiException If fail to read file content from response and write to disk + * @return Downloaded file + */ + public File downloadFileFromResponse(Response response) throws ApiException { + try { + File file = prepareDownloadFile(response); + BufferedSink sink = Okio.buffer(Okio.sink(file)); + sink.writeAll(response.body().source()); + sink.close(); + return file; + } catch (IOException e) { + throw new ApiException(e); + } + } + + /** + * Prepare file for download + * + * @param response An instance of the Response object + * @throws IOException If fail to prepare file for download + * @return Prepared file for the download + */ + public File prepareDownloadFile(Response response) throws IOException { + String filename = null; + String contentDisposition = response.header("Content-Disposition"); + if (contentDisposition != null && !"".equals(contentDisposition)) { + // Get filename from the Content-Disposition header. + Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); + Matcher matcher = pattern.matcher(contentDisposition); + if (matcher.find()) { + filename = sanitizeFilename(matcher.group(1)); + } + } + + String prefix = null; + String suffix = null; + if (filename == null) { + prefix = "download-"; + suffix = ""; + } else { + int pos = filename.lastIndexOf("."); + if (pos == -1) { + prefix = filename + "-"; + } else { + prefix = filename.substring(0, pos) + "-"; + suffix = filename.substring(pos); + } + // File.createTempFile requires the prefix to be at least three characters long + if (prefix.length() < 3) + prefix = "download-"; + } + + if (tempFolderPath == null) + return File.createTempFile(prefix, suffix); + else + return File.createTempFile(prefix, suffix, new File(tempFolderPath)); + } + + /** + * {@link #execute(Call, Type)} + * + * @param Type + * @param call An instance of the Call object + * @throws ApiException If fail to execute the call + * @return ApiResponse<T> + */ + public ApiResponse execute(Call call) throws ApiException { + return execute(call, null); + } + + /** + * Execute HTTP call and deserialize the HTTP response body into the given return type. + * + * @param returnType The return type used to deserialize HTTP response body + * @param The return type corresponding to (same with) returnType + * @param call Call + * @return ApiResponse object containing response status, headers and + * data, which is a Java object deserialized from response body and would be null + * when returnType is null. + * @throws ApiException If fail to execute the call + */ + public ApiResponse execute(Call call, Type returnType) throws ApiException { + try { + Response response = call.execute(); + T data = handleResponse(response, returnType); + return new ApiResponse(response.code(), response.headers().toMultimap(), data); + } catch (IOException e) { + throw new ApiException(e); + } + } + + /** + * {@link #executeAsync(Call, Type, ApiCallback)} + * + * @param Type + * @param call An instance of the Call object + * @param callback ApiCallback<T> + */ + public void executeAsync(Call call, ApiCallback callback) { + executeAsync(call, null, callback); + } + + /** + * Execute HTTP call asynchronously. + * + * @see #execute(Call, Type) + * @param Type + * @param call The callback to be executed when the API call finishes + * @param returnType Return type + * @param callback ApiCallback + */ + @SuppressWarnings("unchecked") + public void executeAsync(Call call, final Type returnType, final ApiCallback callback) { + call.enqueue(new Callback() { + @Override + public void onFailure(Request request, IOException e) { + callback.onFailure(new ApiException(e), 0, null); + } + + @Override + public void onResponse(Response response) throws IOException { + T result; + try { + result = (T) handleResponse(response, returnType); + } catch (ApiException e) { + callback.onFailure(e, response.code(), response.headers().toMultimap()); + return; + } + callback.onSuccess(result, response.code(), response.headers().toMultimap()); + } + }); + } + + /** + * Handle the given response, return the deserialized object when the response is successful. + * + * @param Type + * @param response Response + * @param returnType Return type + * @throws ApiException If the response has a unsuccessful status code or + * fail to deserialize the response body + * @return Type + */ + public T handleResponse(Response response, Type returnType) throws ApiException { + if (response.isSuccessful()) { + if (returnType == null || response.code() == 204) { + // returning null if the returnType is not defined, + // or the status code is 204 (No Content) + if (response.body() != null) { + try { + response.body().close(); + } catch (IOException e) { + throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap()); + } + } + return null; + } else { + return deserialize(response, returnType); + } + } else { + String respBody = null; + if (response.body() != null) { + try { + respBody = response.body().string(); + } catch (IOException e) { + throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap()); + } + } + throw new ApiException(response.message(), response.code(), response.headers().toMultimap(), respBody); + } + } + + /** + * Build HTTP call with the given options. + * + * @param path The sub-path of the HTTP URL + * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" + * @param queryParams The query parameters + * @param collectionQueryParams The collection query parameters + * @param body The request body object + * @param headerParams The header parameters + * @param formParams The form parameters + * @param authNames The authentications to apply + * @param progressRequestListener Progress request listener + * @return The HTTP call + * @throws ApiException If fail to serialize the request body object + */ + public Call buildCall(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map formParams, String[] authNames, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Request request = buildRequest(path, method, queryParams, collectionQueryParams, body, headerParams, formParams, authNames, progressRequestListener); + + return httpClient.newCall(request); + } + + /** + * Build an HTTP request with the given options. + * + * @param path The sub-path of the HTTP URL + * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" + * @param queryParams The query parameters + * @param collectionQueryParams The collection query parameters + * @param body The request body object + * @param headerParams The header parameters + * @param formParams The form parameters + * @param authNames The authentications to apply + * @param progressRequestListener Progress request listener + * @return The HTTP request + * @throws ApiException If fail to serialize the request body object + */ + public Request buildRequest(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map formParams, String[] authNames, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + updateParamsForAuth(authNames, queryParams, headerParams); + + final String url = buildUrl(path, queryParams, collectionQueryParams); + final Request.Builder reqBuilder = new Request.Builder().url(url); + processHeaderParams(headerParams, reqBuilder); + + String contentType = (String) headerParams.get("Content-Type"); + // ensuring a default content type + if (contentType == null) { + contentType = "application/json"; + } + + RequestBody reqBody; + if (!HttpMethod.permitsRequestBody(method)) { + reqBody = null; + } else if ("application/x-www-form-urlencoded".equals(contentType)) { + reqBody = buildRequestBodyFormEncoding(formParams); + } else if ("multipart/form-data".equals(contentType)) { + reqBody = buildRequestBodyMultipart(formParams); + } else if (body == null) { + if ("DELETE".equals(method)) { + // allow calling DELETE without sending a request body + reqBody = null; + } else { + // use an empty request body (for POST, PUT and PATCH) + reqBody = RequestBody.create(MediaType.parse(contentType), ""); + } + } else { + reqBody = serialize(body, contentType); + } + + Request request = null; + + if(progressRequestListener != null && reqBody != null) { + ProgressRequestBody progressRequestBody = new ProgressRequestBody(reqBody, progressRequestListener); + request = reqBuilder.method(method, progressRequestBody).build(); + } else { + request = reqBuilder.method(method, reqBody).build(); + } + + return request; + } + + /** + * Build full URL by concatenating base path, the given sub path and query parameters. + * + * @param path The sub path + * @param queryParams The query parameters + * @param collectionQueryParams The collection query parameters + * @return The full URL + */ + public String buildUrl(String path, List queryParams, List collectionQueryParams) { + final StringBuilder url = new StringBuilder(); + url.append(basePath).append(path); + + if (queryParams != null && !queryParams.isEmpty()) { + // support (constant) query string in `path`, e.g. "/posts?draft=1" + String prefix = path.contains("?") ? "&" : "?"; + for (Pair param : queryParams) { + if (param.getValue() != null) { + if (prefix != null) { + url.append(prefix); + prefix = null; + } else { + url.append("&"); + } + String value = parameterToString(param.getValue()); + url.append(escapeString(param.getName())).append("=").append(escapeString(value)); + } + } + } + + if (collectionQueryParams != null && !collectionQueryParams.isEmpty()) { + String prefix = url.toString().contains("?") ? "&" : "?"; + for (Pair param : collectionQueryParams) { + if (param.getValue() != null) { + if (prefix != null) { + url.append(prefix); + prefix = null; + } else { + url.append("&"); + } + String value = parameterToString(param.getValue()); + // collection query parameter value already escaped as part of parameterToPairs + url.append(escapeString(param.getName())).append("=").append(value); + } + } + } + + return url.toString(); + } + + /** + * Set header parameters to the request builder, including default headers. + * + * @param headerParams Header parameters in the ofrm of Map + * @param reqBuilder Reqeust.Builder + */ + public void processHeaderParams(Map headerParams, Request.Builder reqBuilder) { + for (Entry param : headerParams.entrySet()) { + reqBuilder.header(param.getKey(), parameterToString(param.getValue())); + } + for (Entry header : defaultHeaderMap.entrySet()) { + if (!headerParams.containsKey(header.getKey())) { + reqBuilder.header(header.getKey(), parameterToString(header.getValue())); + } + } + } + + /** + * Update query and header parameters based on authentication settings. + * + * @param authNames The authentications to apply + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + */ + public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams) { + for (String authName : authNames) { + Authentication auth = authentications.get(authName); + if (auth == null) throw new RuntimeException("Authentication undefined: " + authName); + auth.applyToParams(queryParams, headerParams); + } + } + + /** + * Build a form-encoding request body with the given form parameters. + * + * @param formParams Form parameters in the form of Map + * @return RequestBody + */ + public RequestBody buildRequestBodyFormEncoding(Map formParams) { + FormEncodingBuilder formBuilder = new FormEncodingBuilder(); + for (Entry param : formParams.entrySet()) { + formBuilder.add(param.getKey(), parameterToString(param.getValue())); + } + return formBuilder.build(); + } + + /** + * Build a multipart (file uploading) request body with the given form parameters, + * which could contain text fields and file fields. + * + * @param formParams Form parameters in the form of Map + * @return RequestBody + */ + public RequestBody buildRequestBodyMultipart(Map formParams) { + MultipartBuilder mpBuilder = new MultipartBuilder().type(MultipartBuilder.FORM); + for (Entry param : formParams.entrySet()) { + if (param.getValue() instanceof File) { + File file = (File) param.getValue(); + Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\"; filename=\"" + file.getName() + "\""); + MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file)); + mpBuilder.addPart(partHeaders, RequestBody.create(mediaType, file)); + } else { + Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\""); + mpBuilder.addPart(partHeaders, RequestBody.create(null, parameterToString(param.getValue()))); + } + } + return mpBuilder.build(); + } + + /** + * Guess Content-Type header from the given file (defaults to "application/octet-stream"). + * + * @param file The given file + * @return The guessed Content-Type + */ + public String guessContentTypeFromFile(File file) { + String contentType = URLConnection.guessContentTypeFromName(file.getName()); + if (contentType == null) { + return "application/octet-stream"; + } else { + return contentType; + } + } + + /** + * Apply SSL related settings to httpClient according to the current values of + * verifyingSsl and sslCaCert. + */ + private void applySslSettings() { + try { + TrustManager[] trustManagers = null; + HostnameVerifier hostnameVerifier = null; + if (!verifyingSsl) { + TrustManager trustAll = new X509TrustManager() { + @Override + public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {} + @Override + public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {} + @Override + public X509Certificate[] getAcceptedIssuers() { return null; } + }; + SSLContext sslContext = SSLContext.getInstance("TLS"); + trustManagers = new TrustManager[]{ trustAll }; + hostnameVerifier = new HostnameVerifier() { + @Override + public boolean verify(String hostname, SSLSession session) { return true; } + }; + } else if (sslCaCert != null) { + char[] password = null; // Any password will work. + CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509"); + Collection certificates = certificateFactory.generateCertificates(sslCaCert); + if (certificates.isEmpty()) { + throw new IllegalArgumentException("expected non-empty set of trusted certificates"); + } + KeyStore caKeyStore = newEmptyKeyStore(password); + int index = 0; + for (Certificate certificate : certificates) { + String certificateAlias = "ca" + Integer.toString(index++); + caKeyStore.setCertificateEntry(certificateAlias, certificate); + } + TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); + trustManagerFactory.init(caKeyStore); + trustManagers = trustManagerFactory.getTrustManagers(); + } + + if (keyManagers != null || trustManagers != null) { + SSLContext sslContext = SSLContext.getInstance("TLS"); + sslContext.init(keyManagers, trustManagers, new SecureRandom()); + httpClient.setSslSocketFactory(sslContext.getSocketFactory()); + } else { + httpClient.setSslSocketFactory(null); + } + httpClient.setHostnameVerifier(hostnameVerifier); + } catch (GeneralSecurityException e) { + throw new RuntimeException(e); + } + } + + private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException { + try { + KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); + keyStore.load(null, password); + return keyStore; + } catch (IOException e) { + throw new AssertionError(e); + } + } +} diff --git a/src/main/java/sendinblue/ApiException.java b/src/main/java/sendinblue/ApiException.java new file mode 100644 index 0000000..11bb5f2 --- /dev/null +++ b/src/main/java/sendinblue/ApiException.java @@ -0,0 +1,91 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sendinblue; + +import java.util.Map; +import java.util.List; + +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class ApiException extends Exception { + private int code = 0; + private Map> responseHeaders = null; + private String responseBody = null; + + public ApiException() {} + + public ApiException(Throwable throwable) { + super(throwable); + } + + public ApiException(String message) { + super(message); + } + + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) { + super(message, throwable); + this.code = code; + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + public ApiException(String message, int code, Map> responseHeaders, String responseBody) { + this(message, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) { + this(message, throwable, code, responseHeaders, null); + } + + public ApiException(int code, Map> responseHeaders, String responseBody) { + this((String) null, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(int code, String message) { + super(message); + this.code = code; + } + + public ApiException(int code, String message, Map> responseHeaders, String responseBody) { + this(code, message); + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + /** + * Get the HTTP status code. + * + * @return HTTP status code + */ + public int getCode() { + return code; + } + + /** + * Get the HTTP response headers. + * + * @return A map of list of string + */ + public Map> getResponseHeaders() { + return responseHeaders; + } + + /** + * Get the HTTP response body. + * + * @return Response body in the form of string + */ + public String getResponseBody() { + return responseBody; + } +} diff --git a/src/main/java/sendinblue/ApiResponse.java b/src/main/java/sendinblue/ApiResponse.java new file mode 100644 index 0000000..70db3a1 --- /dev/null +++ b/src/main/java/sendinblue/ApiResponse.java @@ -0,0 +1,59 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sendinblue; + +import java.util.List; +import java.util.Map; + +/** + * API response returned by API call. + * + * @param The type of data that is deserialized from response body + */ +public class ApiResponse { + final private int statusCode; + final private Map> headers; + final private T data; + + /** + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + */ + public ApiResponse(int statusCode, Map> headers) { + this(statusCode, headers, null); + } + + /** + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + * @param data The object deserialized from response bod + */ + public ApiResponse(int statusCode, Map> headers, T data) { + this.statusCode = statusCode; + this.headers = headers; + this.data = data; + } + + public int getStatusCode() { + return statusCode; + } + + public Map> getHeaders() { + return headers; + } + + public T getData() { + return data; + } +} diff --git a/src/main/java/sendinblue/Configuration.java b/src/main/java/sendinblue/Configuration.java new file mode 100644 index 0000000..17a388c --- /dev/null +++ b/src/main/java/sendinblue/Configuration.java @@ -0,0 +1,39 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sendinblue; + +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class Configuration { + private static ApiClient defaultApiClient = new ApiClient(); + + /** + * Get the default API client, which would be used when creating API + * instances without providing an API client. + * + * @return Default API client + */ + public static ApiClient getDefaultApiClient() { + return defaultApiClient; + } + + /** + * Set the default API client, which would be used when creating API + * instances without providing an API client. + * + * @param apiClient API client + */ + public static void setDefaultApiClient(ApiClient apiClient) { + defaultApiClient = apiClient; + } +} diff --git a/src/main/java/sendinblue/GzipRequestInterceptor.java b/src/main/java/sendinblue/GzipRequestInterceptor.java new file mode 100644 index 0000000..05a6293 --- /dev/null +++ b/src/main/java/sendinblue/GzipRequestInterceptor.java @@ -0,0 +1,81 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sendinblue; + +import com.squareup.okhttp.*; +import okio.Buffer; +import okio.BufferedSink; +import okio.GzipSink; +import okio.Okio; + +import java.io.IOException; + +/** + * Encodes request bodies using gzip. + * + * Taken from https://github.com/square/okhttp/issues/350 + */ +class GzipRequestInterceptor implements Interceptor { + @Override public Response intercept(Chain chain) throws IOException { + Request originalRequest = chain.request(); + if (originalRequest.body() == null || originalRequest.header("Content-Encoding") != null) { + return chain.proceed(originalRequest); + } + + Request compressedRequest = originalRequest.newBuilder() + .header("Content-Encoding", "gzip") + .method(originalRequest.method(), forceContentLength(gzip(originalRequest.body()))) + .build(); + return chain.proceed(compressedRequest); + } + + private RequestBody forceContentLength(final RequestBody requestBody) throws IOException { + final Buffer buffer = new Buffer(); + requestBody.writeTo(buffer); + return new RequestBody() { + @Override + public MediaType contentType() { + return requestBody.contentType(); + } + + @Override + public long contentLength() { + return buffer.size(); + } + + @Override + public void writeTo(BufferedSink sink) throws IOException { + sink.write(buffer.snapshot()); + } + }; + } + + private RequestBody gzip(final RequestBody body) { + return new RequestBody() { + @Override public MediaType contentType() { + return body.contentType(); + } + + @Override public long contentLength() { + return -1; // We don't know the compressed length in advance! + } + + @Override public void writeTo(BufferedSink sink) throws IOException { + BufferedSink gzipSink = Okio.buffer(new GzipSink(sink)); + body.writeTo(gzipSink); + gzipSink.close(); + } + }; + } +} \ No newline at end of file diff --git a/src/main/java/sendinblue/JSON.java b/src/main/java/sendinblue/JSON.java new file mode 100644 index 0000000..f9aefa7 --- /dev/null +++ b/src/main/java/sendinblue/JSON.java @@ -0,0 +1,362 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sendinblue; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.internal.bind.util.ISO8601Utils; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonElement; +import io.gsonfire.GsonFireBuilder; +import io.gsonfire.TypeSelector; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +import org.threeten.bp.format.DateTimeFormatter; + +import sibModel.*; + +import java.io.IOException; +import java.io.StringReader; +import java.lang.reflect.Type; +import java.text.DateFormat; +import java.text.ParseException; +import java.text.ParsePosition; +import java.util.Date; +import java.util.Map; +import java.util.HashMap; + +public class JSON { + private Gson gson; + private boolean isLenientOnJson = false; + private DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); + private SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); + private OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); + private LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); + + public static GsonBuilder createGson() { + GsonFireBuilder fireBuilder = new GsonFireBuilder() + ; + return fireBuilder.createGsonBuilder(); + } + + private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) { + JsonElement element = readElement.getAsJsonObject().get(discriminatorField); + if(null == element) { + throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">"); + } + return element.getAsString(); + } + + private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) { + Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue.toUpperCase()); + if(null == clazz) { + throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">"); + } + return clazz; + } + + public JSON() { + gson = createGson() + .registerTypeAdapter(Date.class, dateTypeAdapter) + .registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter) + .registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter) + .registerTypeAdapter(LocalDate.class, localDateTypeAdapter) + .create(); + } + + /** + * Get Gson. + * + * @return Gson + */ + public Gson getGson() { + return gson; + } + + /** + * Set Gson. + * + * @param gson Gson + * @return JSON + */ + public JSON setGson(Gson gson) { + this.gson = gson; + return this; + } + + public JSON setLenientOnJson(boolean lenientOnJson) { + isLenientOnJson = lenientOnJson; + return this; + } + + /** + * Serialize the given Java object into JSON string. + * + * @param obj Object + * @return String representation of the JSON + */ + public String serialize(Object obj) { + return gson.toJson(obj); + } + + /** + * Deserialize the given JSON string to Java object. + * + * @param Type + * @param body The JSON string + * @param returnType The type to deserialize into + * @return The deserialized Java object + */ + @SuppressWarnings("unchecked") + public T deserialize(String body, Type returnType) { + try { + if (isLenientOnJson) { + JsonReader jsonReader = new JsonReader(new StringReader(body)); + // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) + jsonReader.setLenient(true); + return gson.fromJson(jsonReader, returnType); + } else { + return gson.fromJson(body, returnType); + } + } catch (JsonParseException e) { + // Fallback processing when failed to parse JSON form response body: + // return the response body string directly for the String return type; + if (returnType.equals(String.class)) + return (T) body; + else throw (e); + } + } + + /** + * Gson TypeAdapter for JSR310 OffsetDateTime type + */ + public static class OffsetDateTimeTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; + + public OffsetDateTimeTypeAdapter() { + this(DateTimeFormatter.ISO_OFFSET_DATE_TIME); + } + + public OffsetDateTimeTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } + + @Override + public void write(JsonWriter out, OffsetDateTime date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.format(date)); + } + } + + @Override + public OffsetDateTime read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + if (date.endsWith("+0000")) { + date = date.substring(0, date.length()-5) + "Z"; + } + return OffsetDateTime.parse(date, formatter); + } + } + } + + /** + * Gson TypeAdapter for JSR310 LocalDate type + */ + public class LocalDateTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; + + public LocalDateTypeAdapter() { + this(DateTimeFormatter.ISO_LOCAL_DATE); + } + + public LocalDateTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } + + @Override + public void write(JsonWriter out, LocalDate date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.format(date)); + } + } + + @Override + public LocalDate read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + return LocalDate.parse(date, formatter); + } + } + } + + public JSON setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { + offsetDateTimeTypeAdapter.setFormat(dateFormat); + return this; + } + + public JSON setLocalDateFormat(DateTimeFormatter dateFormat) { + localDateTypeAdapter.setFormat(dateFormat); + return this; + } + + /** + * Gson TypeAdapter for java.sql.Date type + * If the dateFormat is null, a simple "yyyy-MM-dd" format will be used + * (more efficient than SimpleDateFormat). + */ + public static class SqlDateTypeAdapter extends TypeAdapter { + + private DateFormat dateFormat; + + public SqlDateTypeAdapter() { + } + + public SqlDateTypeAdapter(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + public void setFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + @Override + public void write(JsonWriter out, java.sql.Date date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + String value; + if (dateFormat != null) { + value = dateFormat.format(date); + } else { + value = date.toString(); + } + out.value(value); + } + } + + @Override + public java.sql.Date read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + try { + if (dateFormat != null) { + return new java.sql.Date(dateFormat.parse(date).getTime()); + } + return new java.sql.Date(ISO8601Utils.parse(date, new ParsePosition(0)).getTime()); + } catch (ParseException e) { + throw new JsonParseException(e); + } + } + } + } + + /** + * Gson TypeAdapter for java.util.Date type + * If the dateFormat is null, ISO8601Utils will be used. + */ + public static class DateTypeAdapter extends TypeAdapter { + + private DateFormat dateFormat; + + public DateTypeAdapter() { + } + + public DateTypeAdapter(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + public void setFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + @Override + public void write(JsonWriter out, Date date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + String value; + if (dateFormat != null) { + value = dateFormat.format(date); + } else { + value = ISO8601Utils.format(date, true); + } + out.value(value); + } + } + + @Override + public Date read(JsonReader in) throws IOException { + try { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + try { + if (dateFormat != null) { + return dateFormat.parse(date); + } + return ISO8601Utils.parse(date, new ParsePosition(0)); + } catch (ParseException e) { + throw new JsonParseException(e); + } + } + } catch (IllegalArgumentException e) { + throw new JsonParseException(e); + } + } + } + + public JSON setDateFormat(DateFormat dateFormat) { + dateTypeAdapter.setFormat(dateFormat); + return this; + } + + public JSON setSqlDateFormat(DateFormat dateFormat) { + sqlDateTypeAdapter.setFormat(dateFormat); + return this; + } + +} diff --git a/src/main/java/sendinblue/Pair.java b/src/main/java/sendinblue/Pair.java new file mode 100644 index 0000000..16cc9c9 --- /dev/null +++ b/src/main/java/sendinblue/Pair.java @@ -0,0 +1,52 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sendinblue; + +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class Pair { + private String name = ""; + private String value = ""; + + public Pair (String name, String value) { + setName(name); + setValue(value); + } + + private void setName(String name) { + if (!isValidString(name)) return; + + this.name = name; + } + + private void setValue(String value) { + if (!isValidString(value)) return; + + this.value = value; + } + + public String getName() { + return this.name; + } + + public String getValue() { + return this.value; + } + + private boolean isValidString(String arg) { + if (arg == null) return false; + if (arg.trim().isEmpty()) return false; + + return true; + } +} diff --git a/src/main/java/sendinblue/ProgressRequestBody.java b/src/main/java/sendinblue/ProgressRequestBody.java new file mode 100644 index 0000000..c9521e1 --- /dev/null +++ b/src/main/java/sendinblue/ProgressRequestBody.java @@ -0,0 +1,77 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sendinblue; + +import com.squareup.okhttp.MediaType; +import com.squareup.okhttp.RequestBody; + +import java.io.IOException; + +import okio.Buffer; +import okio.BufferedSink; +import okio.ForwardingSink; +import okio.Okio; +import okio.Sink; + +public class ProgressRequestBody extends RequestBody { + + public interface ProgressRequestListener { + void onRequestProgress(long bytesWritten, long contentLength, boolean done); + } + + private final RequestBody requestBody; + + private final ProgressRequestListener progressListener; + + public ProgressRequestBody(RequestBody requestBody, ProgressRequestListener progressListener) { + this.requestBody = requestBody; + this.progressListener = progressListener; + } + + @Override + public MediaType contentType() { + return requestBody.contentType(); + } + + @Override + public long contentLength() throws IOException { + return requestBody.contentLength(); + } + + @Override + public void writeTo(BufferedSink sink) throws IOException { + BufferedSink bufferedSink = Okio.buffer(sink(sink)); + requestBody.writeTo(bufferedSink); + bufferedSink.flush(); + } + + private Sink sink(Sink sink) { + return new ForwardingSink(sink) { + + long bytesWritten = 0L; + long contentLength = 0L; + + @Override + public void write(Buffer source, long byteCount) throws IOException { + super.write(source, byteCount); + if (contentLength == 0) { + contentLength = contentLength(); + } + + bytesWritten += byteCount; + progressListener.onRequestProgress(bytesWritten, contentLength, bytesWritten == contentLength); + } + }; + } +} diff --git a/src/main/java/sendinblue/ProgressResponseBody.java b/src/main/java/sendinblue/ProgressResponseBody.java new file mode 100644 index 0000000..a35cea6 --- /dev/null +++ b/src/main/java/sendinblue/ProgressResponseBody.java @@ -0,0 +1,76 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sendinblue; + +import com.squareup.okhttp.MediaType; +import com.squareup.okhttp.ResponseBody; + +import java.io.IOException; + +import okio.Buffer; +import okio.BufferedSource; +import okio.ForwardingSource; +import okio.Okio; +import okio.Source; + +public class ProgressResponseBody extends ResponseBody { + + public interface ProgressListener { + void update(long bytesRead, long contentLength, boolean done); + } + + private final ResponseBody responseBody; + private final ProgressListener progressListener; + private BufferedSource bufferedSource; + + public ProgressResponseBody(ResponseBody responseBody, ProgressListener progressListener) { + this.responseBody = responseBody; + this.progressListener = progressListener; + } + + @Override + public MediaType contentType() { + return responseBody.contentType(); + } + + @Override + public long contentLength() throws IOException { + return responseBody.contentLength(); + } + + @Override + public BufferedSource source() throws IOException { + if (bufferedSource == null) { + bufferedSource = Okio.buffer(source(responseBody.source())); + } + return bufferedSource; + } + + private Source source(Source source) { + return new ForwardingSource(source) { + long totalBytesRead = 0L; + + @Override + public long read(Buffer sink, long byteCount) throws IOException { + long bytesRead = super.read(sink, byteCount); + // read() returns the number of bytes read, or -1 if this source is exhausted. + totalBytesRead += bytesRead != -1 ? bytesRead : 0; + progressListener.update(totalBytesRead, responseBody.contentLength(), bytesRead == -1); + return bytesRead; + } + }; + } +} + + diff --git a/src/main/java/sendinblue/StringUtil.java b/src/main/java/sendinblue/StringUtil.java new file mode 100644 index 0000000..12a0247 --- /dev/null +++ b/src/main/java/sendinblue/StringUtil.java @@ -0,0 +1,55 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sendinblue; + +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class StringUtil { + /** + * Check if the given array contains the given value (with case-insensitive comparison). + * + * @param array The array + * @param value The value to search + * @return true if the array contains the value + */ + public static boolean containsIgnoreCase(String[] array, String value) { + for (String str : array) { + if (value == null && str == null) return true; + if (value != null && value.equalsIgnoreCase(str)) return true; + } + return false; + } + + /** + * Join an array of strings with the given separator. + *

+ * Note: This might be replaced by utility method from commons-lang or guava someday + * if one of those libraries is added as dependency. + *

+ * + * @param array The array of strings + * @param separator The separator + * @return the resulting string + */ + public static String join(String[] array, String separator) { + int len = array.length; + if (len == 0) return ""; + + StringBuilder out = new StringBuilder(); + out.append(array[0]); + for (int i = 1; i < len; i++) { + out.append(separator).append(array[i]); + } + return out.toString(); + } +} diff --git a/src/main/java/sendinblue/auth/ApiKeyAuth.java b/src/main/java/sendinblue/auth/ApiKeyAuth.java new file mode 100644 index 0000000..43814a5 --- /dev/null +++ b/src/main/java/sendinblue/auth/ApiKeyAuth.java @@ -0,0 +1,75 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sendinblue.auth; + +import sendinblue.Pair; + +import java.util.Map; +import java.util.List; + +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class ApiKeyAuth implements Authentication { + private final String location; + private final String paramName; + + private String apiKey; + private String apiKeyPrefix; + + public ApiKeyAuth(String location, String paramName) { + this.location = location; + this.paramName = paramName; + } + + public String getLocation() { + return location; + } + + public String getParamName() { + return paramName; + } + + public String getApiKey() { + return apiKey; + } + + public void setApiKey(String apiKey) { + this.apiKey = apiKey; + } + + public String getApiKeyPrefix() { + return apiKeyPrefix; + } + + public void setApiKeyPrefix(String apiKeyPrefix) { + this.apiKeyPrefix = apiKeyPrefix; + } + + @Override + public void applyToParams(List queryParams, Map headerParams) { + if (apiKey == null) { + return; + } + String value; + if (apiKeyPrefix != null) { + value = apiKeyPrefix + " " + apiKey; + } else { + value = apiKey; + } + if ("query".equals(location)) { + queryParams.add(new Pair(paramName, value)); + } else if ("header".equals(location)) { + headerParams.put(paramName, value); + } + } +} diff --git a/src/main/java/sendinblue/auth/Authentication.java b/src/main/java/sendinblue/auth/Authentication.java new file mode 100644 index 0000000..2b793f4 --- /dev/null +++ b/src/main/java/sendinblue/auth/Authentication.java @@ -0,0 +1,29 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sendinblue.auth; + +import sendinblue.Pair; + +import java.util.Map; +import java.util.List; + +public interface Authentication { + /** + * Apply authentication settings to header and query params. + * + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + */ + void applyToParams(List queryParams, Map headerParams); +} diff --git a/src/main/java/sendinblue/auth/HttpBasicAuth.java b/src/main/java/sendinblue/auth/HttpBasicAuth.java new file mode 100644 index 0000000..17b59a0 --- /dev/null +++ b/src/main/java/sendinblue/auth/HttpBasicAuth.java @@ -0,0 +1,54 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sendinblue.auth; + +import sendinblue.Pair; + +import com.squareup.okhttp.Credentials; + +import java.util.Map; +import java.util.List; + +import java.io.UnsupportedEncodingException; + +public class HttpBasicAuth implements Authentication { + private String username; + private String password; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + @Override + public void applyToParams(List queryParams, Map headerParams) { + if (username == null && password == null) { + return; + } + headerParams.put("Authorization", Credentials.basic( + username == null ? "" : username, + password == null ? "" : password)); + } +} diff --git a/src/main/java/sendinblue/auth/OAuth.java b/src/main/java/sendinblue/auth/OAuth.java new file mode 100644 index 0000000..2f70969 --- /dev/null +++ b/src/main/java/sendinblue/auth/OAuth.java @@ -0,0 +1,39 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sendinblue.auth; + +import sendinblue.Pair; + +import java.util.Map; +import java.util.List; + +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class OAuth implements Authentication { + private String accessToken; + + public String getAccessToken() { + return accessToken; + } + + public void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } + + @Override + public void applyToParams(List queryParams, Map headerParams) { + if (accessToken != null) { + headerParams.put("Authorization", "Bearer " + accessToken); + } + } +} diff --git a/src/main/java/sendinblue/auth/OAuthFlow.java b/src/main/java/sendinblue/auth/OAuthFlow.java new file mode 100644 index 0000000..cb8a56b --- /dev/null +++ b/src/main/java/sendinblue/auth/OAuthFlow.java @@ -0,0 +1,18 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sendinblue.auth; + +public enum OAuthFlow { + accessCode, implicit, password, application +} diff --git a/src/main/java/sibApi/AccountApi.java b/src/main/java/sibApi/AccountApi.java new file mode 100644 index 0000000..4e6ce3d --- /dev/null +++ b/src/main/java/sibApi/AccountApi.java @@ -0,0 +1,170 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibApi; + +import sendinblue.ApiCallback; +import sendinblue.ApiClient; +import sendinblue.ApiException; +import sendinblue.ApiResponse; +import sendinblue.Configuration; +import sendinblue.Pair; +import sendinblue.ProgressRequestBody; +import sendinblue.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import sibModel.GetAccount; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class AccountApi { + private ApiClient apiClient; + + public AccountApi() { + this(Configuration.getDefaultApiClient()); + } + + public AccountApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Build call for getAccount + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getAccountCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/account"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getAccountValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = getAccountCall(progressListener, progressRequestListener); + return call; + + } + + /** + * Get your account informations, plans and credits details + * + * @return GetAccount + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetAccount getAccount() throws ApiException { + ApiResponse resp = getAccountWithHttpInfo(); + return resp.getData(); + } + + /** + * Get your account informations, plans and credits details + * + * @return ApiResponse<GetAccount> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getAccountWithHttpInfo() throws ApiException { + com.squareup.okhttp.Call call = getAccountValidateBeforeCall(null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get your account informations, plans and credits details (asynchronously) + * + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getAccountAsync(final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getAccountValidateBeforeCall(progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } +} diff --git a/src/main/java/sibApi/AttributesApi.java b/src/main/java/sibApi/AttributesApi.java new file mode 100644 index 0000000..ab4a86e --- /dev/null +++ b/src/main/java/sibApi/AttributesApi.java @@ -0,0 +1,578 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibApi; + +import sendinblue.ApiCallback; +import sendinblue.ApiClient; +import sendinblue.ApiException; +import sendinblue.ApiResponse; +import sendinblue.Configuration; +import sendinblue.Pair; +import sendinblue.ProgressRequestBody; +import sendinblue.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import sibModel.CreateAttribute; +import sibModel.ErrorModel; +import sibModel.GetAttributes; +import sibModel.UpdateAttribute; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class AttributesApi { + private ApiClient apiClient; + + public AttributesApi() { + this(Configuration.getDefaultApiClient()); + } + + public AttributesApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Build call for createAttribute + * @param attributeCategory Category of the attribute (required) + * @param attributeName Name of the attribute (required) + * @param createAttribute Values to create an attribute (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call createAttributeCall(String attributeCategory, String attributeName, CreateAttribute createAttribute, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = createAttribute; + + // create path and map variables + String localVarPath = "/contacts/attributes/{attributeCategory}/{attributeName}" + .replaceAll("\\{" + "attributeCategory" + "\\}", apiClient.escapeString(attributeCategory.toString())) + .replaceAll("\\{" + "attributeName" + "\\}", apiClient.escapeString(attributeName.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call createAttributeValidateBeforeCall(String attributeCategory, String attributeName, CreateAttribute createAttribute, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'attributeCategory' is set + if (attributeCategory == null) { + throw new ApiException("Missing the required parameter 'attributeCategory' when calling createAttribute(Async)"); + } + + // verify the required parameter 'attributeName' is set + if (attributeName == null) { + throw new ApiException("Missing the required parameter 'attributeName' when calling createAttribute(Async)"); + } + + // verify the required parameter 'createAttribute' is set + if (createAttribute == null) { + throw new ApiException("Missing the required parameter 'createAttribute' when calling createAttribute(Async)"); + } + + + com.squareup.okhttp.Call call = createAttributeCall(attributeCategory, attributeName, createAttribute, progressListener, progressRequestListener); + return call; + + } + + /** + * Creates contact attribute + * + * @param attributeCategory Category of the attribute (required) + * @param attributeName Name of the attribute (required) + * @param createAttribute Values to create an attribute (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void createAttribute(String attributeCategory, String attributeName, CreateAttribute createAttribute) throws ApiException { + createAttributeWithHttpInfo(attributeCategory, attributeName, createAttribute); + } + + /** + * Creates contact attribute + * + * @param attributeCategory Category of the attribute (required) + * @param attributeName Name of the attribute (required) + * @param createAttribute Values to create an attribute (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse createAttributeWithHttpInfo(String attributeCategory, String attributeName, CreateAttribute createAttribute) throws ApiException { + com.squareup.okhttp.Call call = createAttributeValidateBeforeCall(attributeCategory, attributeName, createAttribute, null, null); + return apiClient.execute(call); + } + + /** + * Creates contact attribute (asynchronously) + * + * @param attributeCategory Category of the attribute (required) + * @param attributeName Name of the attribute (required) + * @param createAttribute Values to create an attribute (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call createAttributeAsync(String attributeCategory, String attributeName, CreateAttribute createAttribute, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = createAttributeValidateBeforeCall(attributeCategory, attributeName, createAttribute, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for deleteAttribute + * @param attributeCategory Category of the attribute (required) + * @param attributeName Name of the existing attribute (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call deleteAttributeCall(String attributeCategory, String attributeName, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/contacts/attributes/{attributeCategory}/{attributeName}" + .replaceAll("\\{" + "attributeCategory" + "\\}", apiClient.escapeString(attributeCategory.toString())) + .replaceAll("\\{" + "attributeName" + "\\}", apiClient.escapeString(attributeName.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call deleteAttributeValidateBeforeCall(String attributeCategory, String attributeName, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'attributeCategory' is set + if (attributeCategory == null) { + throw new ApiException("Missing the required parameter 'attributeCategory' when calling deleteAttribute(Async)"); + } + + // verify the required parameter 'attributeName' is set + if (attributeName == null) { + throw new ApiException("Missing the required parameter 'attributeName' when calling deleteAttribute(Async)"); + } + + + com.squareup.okhttp.Call call = deleteAttributeCall(attributeCategory, attributeName, progressListener, progressRequestListener); + return call; + + } + + /** + * Deletes an attribute + * + * @param attributeCategory Category of the attribute (required) + * @param attributeName Name of the existing attribute (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void deleteAttribute(String attributeCategory, String attributeName) throws ApiException { + deleteAttributeWithHttpInfo(attributeCategory, attributeName); + } + + /** + * Deletes an attribute + * + * @param attributeCategory Category of the attribute (required) + * @param attributeName Name of the existing attribute (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse deleteAttributeWithHttpInfo(String attributeCategory, String attributeName) throws ApiException { + com.squareup.okhttp.Call call = deleteAttributeValidateBeforeCall(attributeCategory, attributeName, null, null); + return apiClient.execute(call); + } + + /** + * Deletes an attribute (asynchronously) + * + * @param attributeCategory Category of the attribute (required) + * @param attributeName Name of the existing attribute (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call deleteAttributeAsync(String attributeCategory, String attributeName, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = deleteAttributeValidateBeforeCall(attributeCategory, attributeName, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for getAttributes + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getAttributesCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/contacts/attributes"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getAttributesValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = getAttributesCall(progressListener, progressRequestListener); + return call; + + } + + /** + * Lists all attributes + * + * @return GetAttributes + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetAttributes getAttributes() throws ApiException { + ApiResponse resp = getAttributesWithHttpInfo(); + return resp.getData(); + } + + /** + * Lists all attributes + * + * @return ApiResponse<GetAttributes> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getAttributesWithHttpInfo() throws ApiException { + com.squareup.okhttp.Call call = getAttributesValidateBeforeCall(null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Lists all attributes (asynchronously) + * + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getAttributesAsync(final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getAttributesValidateBeforeCall(progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for updateAttribute + * @param attributeCategory Category of the attribute (required) + * @param attributeName Name of the existing attribute (required) + * @param updateAttribute Values to update an attribute (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call updateAttributeCall(String attributeCategory, String attributeName, UpdateAttribute updateAttribute, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = updateAttribute; + + // create path and map variables + String localVarPath = "/contacts/attributes/{attributeCategory}/{attributeName}" + .replaceAll("\\{" + "attributeCategory" + "\\}", apiClient.escapeString(attributeCategory.toString())) + .replaceAll("\\{" + "attributeName" + "\\}", apiClient.escapeString(attributeName.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call updateAttributeValidateBeforeCall(String attributeCategory, String attributeName, UpdateAttribute updateAttribute, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'attributeCategory' is set + if (attributeCategory == null) { + throw new ApiException("Missing the required parameter 'attributeCategory' when calling updateAttribute(Async)"); + } + + // verify the required parameter 'attributeName' is set + if (attributeName == null) { + throw new ApiException("Missing the required parameter 'attributeName' when calling updateAttribute(Async)"); + } + + // verify the required parameter 'updateAttribute' is set + if (updateAttribute == null) { + throw new ApiException("Missing the required parameter 'updateAttribute' when calling updateAttribute(Async)"); + } + + + com.squareup.okhttp.Call call = updateAttributeCall(attributeCategory, attributeName, updateAttribute, progressListener, progressRequestListener); + return call; + + } + + /** + * Updates contact attribute + * + * @param attributeCategory Category of the attribute (required) + * @param attributeName Name of the existing attribute (required) + * @param updateAttribute Values to update an attribute (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void updateAttribute(String attributeCategory, String attributeName, UpdateAttribute updateAttribute) throws ApiException { + updateAttributeWithHttpInfo(attributeCategory, attributeName, updateAttribute); + } + + /** + * Updates contact attribute + * + * @param attributeCategory Category of the attribute (required) + * @param attributeName Name of the existing attribute (required) + * @param updateAttribute Values to update an attribute (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse updateAttributeWithHttpInfo(String attributeCategory, String attributeName, UpdateAttribute updateAttribute) throws ApiException { + com.squareup.okhttp.Call call = updateAttributeValidateBeforeCall(attributeCategory, attributeName, updateAttribute, null, null); + return apiClient.execute(call); + } + + /** + * Updates contact attribute (asynchronously) + * + * @param attributeCategory Category of the attribute (required) + * @param attributeName Name of the existing attribute (required) + * @param updateAttribute Values to update an attribute (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call updateAttributeAsync(String attributeCategory, String attributeName, UpdateAttribute updateAttribute, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = updateAttributeValidateBeforeCall(attributeCategory, attributeName, updateAttribute, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } +} diff --git a/src/main/java/sibApi/ContactsApi.java b/src/main/java/sibApi/ContactsApi.java new file mode 100644 index 0000000..5495430 --- /dev/null +++ b/src/main/java/sibApi/ContactsApi.java @@ -0,0 +1,3253 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibApi; + +import sendinblue.ApiCallback; +import sendinblue.ApiClient; +import sendinblue.ApiException; +import sendinblue.ApiResponse; +import sendinblue.Configuration; +import sendinblue.Pair; +import sendinblue.ProgressRequestBody; +import sendinblue.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import sibModel.AddRemoveContactToList; +import sibModel.CreateAttribute; +import sibModel.CreateContact; +import sibModel.CreateList; +import sibModel.CreateModel; +import sibModel.CreateUpdateFolder; +import sibModel.CreatedProcessId; +import sibModel.ErrorModel; +import sibModel.GetAttributes; +import sibModel.GetContactCampaignStats; +import sibModel.GetContacts; +import sibModel.GetExtendedContactDetails; +import sibModel.GetExtendedList; +import sibModel.GetFolder; +import sibModel.GetFolderLists; +import sibModel.GetFolders; +import sibModel.GetLists; +import org.threeten.bp.OffsetDateTime; +import sibModel.PostContactInfo; +import sibModel.RequestContactExport; +import sibModel.RequestContactImport; +import sibModel.UpdateAttribute; +import sibModel.UpdateContact; +import sibModel.UpdateList; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class ContactsApi { + private ApiClient apiClient; + + public ContactsApi() { + this(Configuration.getDefaultApiClient()); + } + + public ContactsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Build call for addContactToList + * @param listId Id of the list (required) + * @param contactEmails Emails addresses of the contacts (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call addContactToListCall(Long listId, AddRemoveContactToList contactEmails, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = contactEmails; + + // create path and map variables + String localVarPath = "/contacts/lists/{listId}/contacts/add" + .replaceAll("\\{" + "listId" + "\\}", apiClient.escapeString(listId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call addContactToListValidateBeforeCall(Long listId, AddRemoveContactToList contactEmails, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'listId' is set + if (listId == null) { + throw new ApiException("Missing the required parameter 'listId' when calling addContactToList(Async)"); + } + + // verify the required parameter 'contactEmails' is set + if (contactEmails == null) { + throw new ApiException("Missing the required parameter 'contactEmails' when calling addContactToList(Async)"); + } + + + com.squareup.okhttp.Call call = addContactToListCall(listId, contactEmails, progressListener, progressRequestListener); + return call; + + } + + /** + * Add existing contacts to a list + * + * @param listId Id of the list (required) + * @param contactEmails Emails addresses of the contacts (required) + * @return PostContactInfo + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public PostContactInfo addContactToList(Long listId, AddRemoveContactToList contactEmails) throws ApiException { + ApiResponse resp = addContactToListWithHttpInfo(listId, contactEmails); + return resp.getData(); + } + + /** + * Add existing contacts to a list + * + * @param listId Id of the list (required) + * @param contactEmails Emails addresses of the contacts (required) + * @return ApiResponse<PostContactInfo> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse addContactToListWithHttpInfo(Long listId, AddRemoveContactToList contactEmails) throws ApiException { + com.squareup.okhttp.Call call = addContactToListValidateBeforeCall(listId, contactEmails, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Add existing contacts to a list (asynchronously) + * + * @param listId Id of the list (required) + * @param contactEmails Emails addresses of the contacts (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call addContactToListAsync(Long listId, AddRemoveContactToList contactEmails, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = addContactToListValidateBeforeCall(listId, contactEmails, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for createAttribute + * @param attributeCategory Category of the attribute (required) + * @param attributeName Name of the attribute (required) + * @param createAttribute Values to create an attribute (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call createAttributeCall(String attributeCategory, String attributeName, CreateAttribute createAttribute, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = createAttribute; + + // create path and map variables + String localVarPath = "/contacts/attributes/{attributeCategory}/{attributeName}" + .replaceAll("\\{" + "attributeCategory" + "\\}", apiClient.escapeString(attributeCategory.toString())) + .replaceAll("\\{" + "attributeName" + "\\}", apiClient.escapeString(attributeName.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call createAttributeValidateBeforeCall(String attributeCategory, String attributeName, CreateAttribute createAttribute, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'attributeCategory' is set + if (attributeCategory == null) { + throw new ApiException("Missing the required parameter 'attributeCategory' when calling createAttribute(Async)"); + } + + // verify the required parameter 'attributeName' is set + if (attributeName == null) { + throw new ApiException("Missing the required parameter 'attributeName' when calling createAttribute(Async)"); + } + + // verify the required parameter 'createAttribute' is set + if (createAttribute == null) { + throw new ApiException("Missing the required parameter 'createAttribute' when calling createAttribute(Async)"); + } + + + com.squareup.okhttp.Call call = createAttributeCall(attributeCategory, attributeName, createAttribute, progressListener, progressRequestListener); + return call; + + } + + /** + * Creates contact attribute + * + * @param attributeCategory Category of the attribute (required) + * @param attributeName Name of the attribute (required) + * @param createAttribute Values to create an attribute (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void createAttribute(String attributeCategory, String attributeName, CreateAttribute createAttribute) throws ApiException { + createAttributeWithHttpInfo(attributeCategory, attributeName, createAttribute); + } + + /** + * Creates contact attribute + * + * @param attributeCategory Category of the attribute (required) + * @param attributeName Name of the attribute (required) + * @param createAttribute Values to create an attribute (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse createAttributeWithHttpInfo(String attributeCategory, String attributeName, CreateAttribute createAttribute) throws ApiException { + com.squareup.okhttp.Call call = createAttributeValidateBeforeCall(attributeCategory, attributeName, createAttribute, null, null); + return apiClient.execute(call); + } + + /** + * Creates contact attribute (asynchronously) + * + * @param attributeCategory Category of the attribute (required) + * @param attributeName Name of the attribute (required) + * @param createAttribute Values to create an attribute (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call createAttributeAsync(String attributeCategory, String attributeName, CreateAttribute createAttribute, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = createAttributeValidateBeforeCall(attributeCategory, attributeName, createAttribute, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for createContact + * @param createContact Values to create a contact (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call createContactCall(CreateContact createContact, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = createContact; + + // create path and map variables + String localVarPath = "/contacts"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call createContactValidateBeforeCall(CreateContact createContact, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'createContact' is set + if (createContact == null) { + throw new ApiException("Missing the required parameter 'createContact' when calling createContact(Async)"); + } + + + com.squareup.okhttp.Call call = createContactCall(createContact, progressListener, progressRequestListener); + return call; + + } + + /** + * Create a contact + * + * @param createContact Values to create a contact (required) + * @return CreateModel + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public CreateModel createContact(CreateContact createContact) throws ApiException { + ApiResponse resp = createContactWithHttpInfo(createContact); + return resp.getData(); + } + + /** + * Create a contact + * + * @param createContact Values to create a contact (required) + * @return ApiResponse<CreateModel> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse createContactWithHttpInfo(CreateContact createContact) throws ApiException { + com.squareup.okhttp.Call call = createContactValidateBeforeCall(createContact, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Create a contact (asynchronously) + * + * @param createContact Values to create a contact (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call createContactAsync(CreateContact createContact, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = createContactValidateBeforeCall(createContact, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for createFolder + * @param createFolder Name of the folder (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call createFolderCall(CreateUpdateFolder createFolder, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = createFolder; + + // create path and map variables + String localVarPath = "/contacts/folders"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call createFolderValidateBeforeCall(CreateUpdateFolder createFolder, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'createFolder' is set + if (createFolder == null) { + throw new ApiException("Missing the required parameter 'createFolder' when calling createFolder(Async)"); + } + + + com.squareup.okhttp.Call call = createFolderCall(createFolder, progressListener, progressRequestListener); + return call; + + } + + /** + * Create a folder + * + * @param createFolder Name of the folder (required) + * @return CreateModel + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public CreateModel createFolder(CreateUpdateFolder createFolder) throws ApiException { + ApiResponse resp = createFolderWithHttpInfo(createFolder); + return resp.getData(); + } + + /** + * Create a folder + * + * @param createFolder Name of the folder (required) + * @return ApiResponse<CreateModel> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse createFolderWithHttpInfo(CreateUpdateFolder createFolder) throws ApiException { + com.squareup.okhttp.Call call = createFolderValidateBeforeCall(createFolder, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Create a folder (asynchronously) + * + * @param createFolder Name of the folder (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call createFolderAsync(CreateUpdateFolder createFolder, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = createFolderValidateBeforeCall(createFolder, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for createList + * @param createList Values to create a list (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call createListCall(CreateList createList, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = createList; + + // create path and map variables + String localVarPath = "/contacts/lists"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call createListValidateBeforeCall(CreateList createList, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'createList' is set + if (createList == null) { + throw new ApiException("Missing the required parameter 'createList' when calling createList(Async)"); + } + + + com.squareup.okhttp.Call call = createListCall(createList, progressListener, progressRequestListener); + return call; + + } + + /** + * Create a list + * + * @param createList Values to create a list (required) + * @return CreateModel + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public CreateModel createList(CreateList createList) throws ApiException { + ApiResponse resp = createListWithHttpInfo(createList); + return resp.getData(); + } + + /** + * Create a list + * + * @param createList Values to create a list (required) + * @return ApiResponse<CreateModel> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse createListWithHttpInfo(CreateList createList) throws ApiException { + com.squareup.okhttp.Call call = createListValidateBeforeCall(createList, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Create a list (asynchronously) + * + * @param createList Values to create a list (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call createListAsync(CreateList createList, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = createListValidateBeforeCall(createList, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for deleteAttribute + * @param attributeCategory Category of the attribute (required) + * @param attributeName Name of the existing attribute (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call deleteAttributeCall(String attributeCategory, String attributeName, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/contacts/attributes/{attributeCategory}/{attributeName}" + .replaceAll("\\{" + "attributeCategory" + "\\}", apiClient.escapeString(attributeCategory.toString())) + .replaceAll("\\{" + "attributeName" + "\\}", apiClient.escapeString(attributeName.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call deleteAttributeValidateBeforeCall(String attributeCategory, String attributeName, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'attributeCategory' is set + if (attributeCategory == null) { + throw new ApiException("Missing the required parameter 'attributeCategory' when calling deleteAttribute(Async)"); + } + + // verify the required parameter 'attributeName' is set + if (attributeName == null) { + throw new ApiException("Missing the required parameter 'attributeName' when calling deleteAttribute(Async)"); + } + + + com.squareup.okhttp.Call call = deleteAttributeCall(attributeCategory, attributeName, progressListener, progressRequestListener); + return call; + + } + + /** + * Deletes an attribute + * + * @param attributeCategory Category of the attribute (required) + * @param attributeName Name of the existing attribute (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void deleteAttribute(String attributeCategory, String attributeName) throws ApiException { + deleteAttributeWithHttpInfo(attributeCategory, attributeName); + } + + /** + * Deletes an attribute + * + * @param attributeCategory Category of the attribute (required) + * @param attributeName Name of the existing attribute (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse deleteAttributeWithHttpInfo(String attributeCategory, String attributeName) throws ApiException { + com.squareup.okhttp.Call call = deleteAttributeValidateBeforeCall(attributeCategory, attributeName, null, null); + return apiClient.execute(call); + } + + /** + * Deletes an attribute (asynchronously) + * + * @param attributeCategory Category of the attribute (required) + * @param attributeName Name of the existing attribute (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call deleteAttributeAsync(String attributeCategory, String attributeName, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = deleteAttributeValidateBeforeCall(attributeCategory, attributeName, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for deleteFolder + * @param folderId Id of the folder (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call deleteFolderCall(Long folderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/contacts/folders/{folderId}" + .replaceAll("\\{" + "folderId" + "\\}", apiClient.escapeString(folderId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call deleteFolderValidateBeforeCall(Long folderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'folderId' is set + if (folderId == null) { + throw new ApiException("Missing the required parameter 'folderId' when calling deleteFolder(Async)"); + } + + + com.squareup.okhttp.Call call = deleteFolderCall(folderId, progressListener, progressRequestListener); + return call; + + } + + /** + * Delete a folder (and all its lists) + * + * @param folderId Id of the folder (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void deleteFolder(Long folderId) throws ApiException { + deleteFolderWithHttpInfo(folderId); + } + + /** + * Delete a folder (and all its lists) + * + * @param folderId Id of the folder (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse deleteFolderWithHttpInfo(Long folderId) throws ApiException { + com.squareup.okhttp.Call call = deleteFolderValidateBeforeCall(folderId, null, null); + return apiClient.execute(call); + } + + /** + * Delete a folder (and all its lists) (asynchronously) + * + * @param folderId Id of the folder (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call deleteFolderAsync(Long folderId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = deleteFolderValidateBeforeCall(folderId, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for deleteList + * @param listId Id of the list (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call deleteListCall(Long listId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/contacts/lists/{listId}" + .replaceAll("\\{" + "listId" + "\\}", apiClient.escapeString(listId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call deleteListValidateBeforeCall(Long listId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'listId' is set + if (listId == null) { + throw new ApiException("Missing the required parameter 'listId' when calling deleteList(Async)"); + } + + + com.squareup.okhttp.Call call = deleteListCall(listId, progressListener, progressRequestListener); + return call; + + } + + /** + * Delete a list + * + * @param listId Id of the list (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void deleteList(Long listId) throws ApiException { + deleteListWithHttpInfo(listId); + } + + /** + * Delete a list + * + * @param listId Id of the list (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse deleteListWithHttpInfo(Long listId) throws ApiException { + com.squareup.okhttp.Call call = deleteListValidateBeforeCall(listId, null, null); + return apiClient.execute(call); + } + + /** + * Delete a list (asynchronously) + * + * @param listId Id of the list (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call deleteListAsync(Long listId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = deleteListValidateBeforeCall(listId, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for getAttributes + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getAttributesCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/contacts/attributes"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getAttributesValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = getAttributesCall(progressListener, progressRequestListener); + return call; + + } + + /** + * Lists all attributes + * + * @return GetAttributes + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetAttributes getAttributes() throws ApiException { + ApiResponse resp = getAttributesWithHttpInfo(); + return resp.getData(); + } + + /** + * Lists all attributes + * + * @return ApiResponse<GetAttributes> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getAttributesWithHttpInfo() throws ApiException { + com.squareup.okhttp.Call call = getAttributesValidateBeforeCall(null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Lists all attributes (asynchronously) + * + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getAttributesAsync(final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getAttributesValidateBeforeCall(progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for getContactInfo + * @param email Email (urlencoded) of the contact (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getContactInfoCall(String email, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/contacts/{email}" + .replaceAll("\\{" + "email" + "\\}", apiClient.escapeString(email.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getContactInfoValidateBeforeCall(String email, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'email' is set + if (email == null) { + throw new ApiException("Missing the required parameter 'email' when calling getContactInfo(Async)"); + } + + + com.squareup.okhttp.Call call = getContactInfoCall(email, progressListener, progressRequestListener); + return call; + + } + + /** + * Retrieves contact informations + * + * @param email Email (urlencoded) of the contact (required) + * @return GetExtendedContactDetails + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetExtendedContactDetails getContactInfo(String email) throws ApiException { + ApiResponse resp = getContactInfoWithHttpInfo(email); + return resp.getData(); + } + + /** + * Retrieves contact informations + * + * @param email Email (urlencoded) of the contact (required) + * @return ApiResponse<GetExtendedContactDetails> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getContactInfoWithHttpInfo(String email) throws ApiException { + com.squareup.okhttp.Call call = getContactInfoValidateBeforeCall(email, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Retrieves contact informations (asynchronously) + * + * @param email Email (urlencoded) of the contact (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getContactInfoAsync(String email, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getContactInfoValidateBeforeCall(email, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for getContactStats + * @param email Email address (urlencoded) of the contact (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getContactStatsCall(String email, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/contacts/{email}/campaignStats" + .replaceAll("\\{" + "email" + "\\}", apiClient.escapeString(email.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getContactStatsValidateBeforeCall(String email, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'email' is set + if (email == null) { + throw new ApiException("Missing the required parameter 'email' when calling getContactStats(Async)"); + } + + + com.squareup.okhttp.Call call = getContactStatsCall(email, progressListener, progressRequestListener); + return call; + + } + + /** + * Get the campaigns statistics for a contact + * + * @param email Email address (urlencoded) of the contact (required) + * @return GetContactCampaignStats + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetContactCampaignStats getContactStats(String email) throws ApiException { + ApiResponse resp = getContactStatsWithHttpInfo(email); + return resp.getData(); + } + + /** + * Get the campaigns statistics for a contact + * + * @param email Email address (urlencoded) of the contact (required) + * @return ApiResponse<GetContactCampaignStats> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getContactStatsWithHttpInfo(String email) throws ApiException { + com.squareup.okhttp.Call call = getContactStatsValidateBeforeCall(email, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get the campaigns statistics for a contact (asynchronously) + * + * @param email Email address (urlencoded) of the contact (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getContactStatsAsync(String email, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getContactStatsValidateBeforeCall(email, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for getContacts + * @param limit Number of documents per page (optional, default to 50) + * @param offset Index of the first document of the page (optional, default to 0) + * @param modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getContactsCall(Long limit, Long offset, OffsetDateTime modifiedSince, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/contacts"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (limit != null) + localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit)); + if (offset != null) + localVarQueryParams.addAll(apiClient.parameterToPair("offset", offset)); + if (modifiedSince != null) + localVarQueryParams.addAll(apiClient.parameterToPair("modifiedSince", modifiedSince)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getContactsValidateBeforeCall(Long limit, Long offset, OffsetDateTime modifiedSince, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = getContactsCall(limit, offset, modifiedSince, progressListener, progressRequestListener); + return call; + + } + + /** + * Get all the contacts + * + * @param limit Number of documents per page (optional, default to 50) + * @param offset Index of the first document of the page (optional, default to 0) + * @param modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @return GetContacts + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetContacts getContacts(Long limit, Long offset, OffsetDateTime modifiedSince) throws ApiException { + ApiResponse resp = getContactsWithHttpInfo(limit, offset, modifiedSince); + return resp.getData(); + } + + /** + * Get all the contacts + * + * @param limit Number of documents per page (optional, default to 50) + * @param offset Index of the first document of the page (optional, default to 0) + * @param modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @return ApiResponse<GetContacts> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getContactsWithHttpInfo(Long limit, Long offset, OffsetDateTime modifiedSince) throws ApiException { + com.squareup.okhttp.Call call = getContactsValidateBeforeCall(limit, offset, modifiedSince, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get all the contacts (asynchronously) + * + * @param limit Number of documents per page (optional, default to 50) + * @param offset Index of the first document of the page (optional, default to 0) + * @param modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getContactsAsync(Long limit, Long offset, OffsetDateTime modifiedSince, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getContactsValidateBeforeCall(limit, offset, modifiedSince, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for getContactsFromList + * @param listId Id of the list (required) + * @param modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param limit Number of documents per page (optional, default to 50) + * @param offset Index of the first document of the page (optional, default to 0) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getContactsFromListCall(Long listId, OffsetDateTime modifiedSince, Long limit, Long offset, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/contacts/lists/{listId}/contacts" + .replaceAll("\\{" + "listId" + "\\}", apiClient.escapeString(listId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (modifiedSince != null) + localVarQueryParams.addAll(apiClient.parameterToPair("modifiedSince", modifiedSince)); + if (limit != null) + localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit)); + if (offset != null) + localVarQueryParams.addAll(apiClient.parameterToPair("offset", offset)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getContactsFromListValidateBeforeCall(Long listId, OffsetDateTime modifiedSince, Long limit, Long offset, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'listId' is set + if (listId == null) { + throw new ApiException("Missing the required parameter 'listId' when calling getContactsFromList(Async)"); + } + + + com.squareup.okhttp.Call call = getContactsFromListCall(listId, modifiedSince, limit, offset, progressListener, progressRequestListener); + return call; + + } + + /** + * Get the contacts in a list + * + * @param listId Id of the list (required) + * @param modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param limit Number of documents per page (optional, default to 50) + * @param offset Index of the first document of the page (optional, default to 0) + * @return GetContacts + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetContacts getContactsFromList(Long listId, OffsetDateTime modifiedSince, Long limit, Long offset) throws ApiException { + ApiResponse resp = getContactsFromListWithHttpInfo(listId, modifiedSince, limit, offset); + return resp.getData(); + } + + /** + * Get the contacts in a list + * + * @param listId Id of the list (required) + * @param modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param limit Number of documents per page (optional, default to 50) + * @param offset Index of the first document of the page (optional, default to 0) + * @return ApiResponse<GetContacts> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getContactsFromListWithHttpInfo(Long listId, OffsetDateTime modifiedSince, Long limit, Long offset) throws ApiException { + com.squareup.okhttp.Call call = getContactsFromListValidateBeforeCall(listId, modifiedSince, limit, offset, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get the contacts in a list (asynchronously) + * + * @param listId Id of the list (required) + * @param modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param limit Number of documents per page (optional, default to 50) + * @param offset Index of the first document of the page (optional, default to 0) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getContactsFromListAsync(Long listId, OffsetDateTime modifiedSince, Long limit, Long offset, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getContactsFromListValidateBeforeCall(listId, modifiedSince, limit, offset, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for getFolder + * @param folderId id of the folder (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getFolderCall(Long folderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/contacts/folders/{folderId}" + .replaceAll("\\{" + "folderId" + "\\}", apiClient.escapeString(folderId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getFolderValidateBeforeCall(Long folderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'folderId' is set + if (folderId == null) { + throw new ApiException("Missing the required parameter 'folderId' when calling getFolder(Async)"); + } + + + com.squareup.okhttp.Call call = getFolderCall(folderId, progressListener, progressRequestListener); + return call; + + } + + /** + * Returns folder details + * + * @param folderId id of the folder (required) + * @return GetFolder + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetFolder getFolder(Long folderId) throws ApiException { + ApiResponse resp = getFolderWithHttpInfo(folderId); + return resp.getData(); + } + + /** + * Returns folder details + * + * @param folderId id of the folder (required) + * @return ApiResponse<GetFolder> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getFolderWithHttpInfo(Long folderId) throws ApiException { + com.squareup.okhttp.Call call = getFolderValidateBeforeCall(folderId, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Returns folder details (asynchronously) + * + * @param folderId id of the folder (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getFolderAsync(Long folderId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getFolderValidateBeforeCall(folderId, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for getFolderLists + * @param folderId Id of the folder (required) + * @param limit Number of documents per page (optional, default to 10) + * @param offset Index of the first document of the page (optional, default to 0) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getFolderListsCall(Long folderId, Long limit, Long offset, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/contacts/folders/{folderId}/lists" + .replaceAll("\\{" + "folderId" + "\\}", apiClient.escapeString(folderId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (limit != null) + localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit)); + if (offset != null) + localVarQueryParams.addAll(apiClient.parameterToPair("offset", offset)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getFolderListsValidateBeforeCall(Long folderId, Long limit, Long offset, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'folderId' is set + if (folderId == null) { + throw new ApiException("Missing the required parameter 'folderId' when calling getFolderLists(Async)"); + } + + + com.squareup.okhttp.Call call = getFolderListsCall(folderId, limit, offset, progressListener, progressRequestListener); + return call; + + } + + /** + * Get the lists in a folder + * + * @param folderId Id of the folder (required) + * @param limit Number of documents per page (optional, default to 10) + * @param offset Index of the first document of the page (optional, default to 0) + * @return GetFolderLists + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetFolderLists getFolderLists(Long folderId, Long limit, Long offset) throws ApiException { + ApiResponse resp = getFolderListsWithHttpInfo(folderId, limit, offset); + return resp.getData(); + } + + /** + * Get the lists in a folder + * + * @param folderId Id of the folder (required) + * @param limit Number of documents per page (optional, default to 10) + * @param offset Index of the first document of the page (optional, default to 0) + * @return ApiResponse<GetFolderLists> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getFolderListsWithHttpInfo(Long folderId, Long limit, Long offset) throws ApiException { + com.squareup.okhttp.Call call = getFolderListsValidateBeforeCall(folderId, limit, offset, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get the lists in a folder (asynchronously) + * + * @param folderId Id of the folder (required) + * @param limit Number of documents per page (optional, default to 10) + * @param offset Index of the first document of the page (optional, default to 0) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getFolderListsAsync(Long folderId, Long limit, Long offset, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getFolderListsValidateBeforeCall(folderId, limit, offset, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for getFolders + * @param limit Number of documents per page (required) + * @param offset Index of the first document of the page (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getFoldersCall(Long limit, Long offset, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/contacts/folders"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (limit != null) + localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit)); + if (offset != null) + localVarQueryParams.addAll(apiClient.parameterToPair("offset", offset)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getFoldersValidateBeforeCall(Long limit, Long offset, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'limit' is set + if (limit == null) { + throw new ApiException("Missing the required parameter 'limit' when calling getFolders(Async)"); + } + + // verify the required parameter 'offset' is set + if (offset == null) { + throw new ApiException("Missing the required parameter 'offset' when calling getFolders(Async)"); + } + + + com.squareup.okhttp.Call call = getFoldersCall(limit, offset, progressListener, progressRequestListener); + return call; + + } + + /** + * Get all the folders + * + * @param limit Number of documents per page (required) + * @param offset Index of the first document of the page (required) + * @return GetFolders + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetFolders getFolders(Long limit, Long offset) throws ApiException { + ApiResponse resp = getFoldersWithHttpInfo(limit, offset); + return resp.getData(); + } + + /** + * Get all the folders + * + * @param limit Number of documents per page (required) + * @param offset Index of the first document of the page (required) + * @return ApiResponse<GetFolders> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getFoldersWithHttpInfo(Long limit, Long offset) throws ApiException { + com.squareup.okhttp.Call call = getFoldersValidateBeforeCall(limit, offset, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get all the folders (asynchronously) + * + * @param limit Number of documents per page (required) + * @param offset Index of the first document of the page (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getFoldersAsync(Long limit, Long offset, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getFoldersValidateBeforeCall(limit, offset, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for getList + * @param listId Id of the list (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getListCall(Long listId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/contacts/lists/{listId}" + .replaceAll("\\{" + "listId" + "\\}", apiClient.escapeString(listId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getListValidateBeforeCall(Long listId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'listId' is set + if (listId == null) { + throw new ApiException("Missing the required parameter 'listId' when calling getList(Async)"); + } + + + com.squareup.okhttp.Call call = getListCall(listId, progressListener, progressRequestListener); + return call; + + } + + /** + * Get the details of a list + * + * @param listId Id of the list (required) + * @return GetExtendedList + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetExtendedList getList(Long listId) throws ApiException { + ApiResponse resp = getListWithHttpInfo(listId); + return resp.getData(); + } + + /** + * Get the details of a list + * + * @param listId Id of the list (required) + * @return ApiResponse<GetExtendedList> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getListWithHttpInfo(Long listId) throws ApiException { + com.squareup.okhttp.Call call = getListValidateBeforeCall(listId, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get the details of a list (asynchronously) + * + * @param listId Id of the list (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getListAsync(Long listId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getListValidateBeforeCall(listId, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for getLists + * @param limit Number of documents per page (optional, default to 10) + * @param offset Index of the first document of the page (optional, default to 0) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getListsCall(Long limit, Long offset, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/contacts/lists"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (limit != null) + localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit)); + if (offset != null) + localVarQueryParams.addAll(apiClient.parameterToPair("offset", offset)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getListsValidateBeforeCall(Long limit, Long offset, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = getListsCall(limit, offset, progressListener, progressRequestListener); + return call; + + } + + /** + * Get all the lists + * + * @param limit Number of documents per page (optional, default to 10) + * @param offset Index of the first document of the page (optional, default to 0) + * @return GetLists + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetLists getLists(Long limit, Long offset) throws ApiException { + ApiResponse resp = getListsWithHttpInfo(limit, offset); + return resp.getData(); + } + + /** + * Get all the lists + * + * @param limit Number of documents per page (optional, default to 10) + * @param offset Index of the first document of the page (optional, default to 0) + * @return ApiResponse<GetLists> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getListsWithHttpInfo(Long limit, Long offset) throws ApiException { + com.squareup.okhttp.Call call = getListsValidateBeforeCall(limit, offset, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get all the lists (asynchronously) + * + * @param limit Number of documents per page (optional, default to 10) + * @param offset Index of the first document of the page (optional, default to 0) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getListsAsync(Long limit, Long offset, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getListsValidateBeforeCall(limit, offset, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for importContacts + * @param requestContactImport Values to import contacts in Sendinblue. To know more about the expected format, please have a look at ``https://help.sendinblue.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call importContactsCall(RequestContactImport requestContactImport, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = requestContactImport; + + // create path and map variables + String localVarPath = "/contacts/import"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call importContactsValidateBeforeCall(RequestContactImport requestContactImport, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'requestContactImport' is set + if (requestContactImport == null) { + throw new ApiException("Missing the required parameter 'requestContactImport' when calling importContacts(Async)"); + } + + + com.squareup.okhttp.Call call = importContactsCall(requestContactImport, progressListener, progressRequestListener); + return call; + + } + + /** + * Import contacts + * It returns the background process ID which on completion calls the notify URL that you have set in the input. + * @param requestContactImport Values to import contacts in Sendinblue. To know more about the expected format, please have a look at ``https://help.sendinblue.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` (required) + * @return CreatedProcessId + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public CreatedProcessId importContacts(RequestContactImport requestContactImport) throws ApiException { + ApiResponse resp = importContactsWithHttpInfo(requestContactImport); + return resp.getData(); + } + + /** + * Import contacts + * It returns the background process ID which on completion calls the notify URL that you have set in the input. + * @param requestContactImport Values to import contacts in Sendinblue. To know more about the expected format, please have a look at ``https://help.sendinblue.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` (required) + * @return ApiResponse<CreatedProcessId> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse importContactsWithHttpInfo(RequestContactImport requestContactImport) throws ApiException { + com.squareup.okhttp.Call call = importContactsValidateBeforeCall(requestContactImport, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Import contacts (asynchronously) + * It returns the background process ID which on completion calls the notify URL that you have set in the input. + * @param requestContactImport Values to import contacts in Sendinblue. To know more about the expected format, please have a look at ``https://help.sendinblue.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call importContactsAsync(RequestContactImport requestContactImport, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = importContactsValidateBeforeCall(requestContactImport, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for removeContactToList + * @param listId Id of the list (required) + * @param contactEmails Emails adresses of the contact (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call removeContactToListCall(Long listId, AddRemoveContactToList contactEmails, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = contactEmails; + + // create path and map variables + String localVarPath = "/contacts/lists/{listId}/contacts/remove" + .replaceAll("\\{" + "listId" + "\\}", apiClient.escapeString(listId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call removeContactToListValidateBeforeCall(Long listId, AddRemoveContactToList contactEmails, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'listId' is set + if (listId == null) { + throw new ApiException("Missing the required parameter 'listId' when calling removeContactToList(Async)"); + } + + // verify the required parameter 'contactEmails' is set + if (contactEmails == null) { + throw new ApiException("Missing the required parameter 'contactEmails' when calling removeContactToList(Async)"); + } + + + com.squareup.okhttp.Call call = removeContactToListCall(listId, contactEmails, progressListener, progressRequestListener); + return call; + + } + + /** + * Remove existing contacts from a list + * + * @param listId Id of the list (required) + * @param contactEmails Emails adresses of the contact (required) + * @return PostContactInfo + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public PostContactInfo removeContactToList(Long listId, AddRemoveContactToList contactEmails) throws ApiException { + ApiResponse resp = removeContactToListWithHttpInfo(listId, contactEmails); + return resp.getData(); + } + + /** + * Remove existing contacts from a list + * + * @param listId Id of the list (required) + * @param contactEmails Emails adresses of the contact (required) + * @return ApiResponse<PostContactInfo> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse removeContactToListWithHttpInfo(Long listId, AddRemoveContactToList contactEmails) throws ApiException { + com.squareup.okhttp.Call call = removeContactToListValidateBeforeCall(listId, contactEmails, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Remove existing contacts from a list (asynchronously) + * + * @param listId Id of the list (required) + * @param contactEmails Emails adresses of the contact (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call removeContactToListAsync(Long listId, AddRemoveContactToList contactEmails, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = removeContactToListValidateBeforeCall(listId, contactEmails, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for requestContactExport + * @param requestContactExport Values to request a contact export (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call requestContactExportCall(RequestContactExport requestContactExport, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = requestContactExport; + + // create path and map variables + String localVarPath = "/contacts/export"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call requestContactExportValidateBeforeCall(RequestContactExport requestContactExport, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'requestContactExport' is set + if (requestContactExport == null) { + throw new ApiException("Missing the required parameter 'requestContactExport' when calling requestContactExport(Async)"); + } + + + com.squareup.okhttp.Call call = requestContactExportCall(requestContactExport, progressListener, progressRequestListener); + return call; + + } + + /** + * Export contacts + * It returns the background process ID which on completion calls the notify URL that you have set in the input. File will be available in csv. + * @param requestContactExport Values to request a contact export (required) + * @return CreatedProcessId + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public CreatedProcessId requestContactExport(RequestContactExport requestContactExport) throws ApiException { + ApiResponse resp = requestContactExportWithHttpInfo(requestContactExport); + return resp.getData(); + } + + /** + * Export contacts + * It returns the background process ID which on completion calls the notify URL that you have set in the input. File will be available in csv. + * @param requestContactExport Values to request a contact export (required) + * @return ApiResponse<CreatedProcessId> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse requestContactExportWithHttpInfo(RequestContactExport requestContactExport) throws ApiException { + com.squareup.okhttp.Call call = requestContactExportValidateBeforeCall(requestContactExport, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Export contacts (asynchronously) + * It returns the background process ID which on completion calls the notify URL that you have set in the input. File will be available in csv. + * @param requestContactExport Values to request a contact export (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call requestContactExportAsync(RequestContactExport requestContactExport, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = requestContactExportValidateBeforeCall(requestContactExport, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for updateAttribute + * @param attributeCategory Category of the attribute (required) + * @param attributeName Name of the existing attribute (required) + * @param updateAttribute Values to update an attribute (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call updateAttributeCall(String attributeCategory, String attributeName, UpdateAttribute updateAttribute, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = updateAttribute; + + // create path and map variables + String localVarPath = "/contacts/attributes/{attributeCategory}/{attributeName}" + .replaceAll("\\{" + "attributeCategory" + "\\}", apiClient.escapeString(attributeCategory.toString())) + .replaceAll("\\{" + "attributeName" + "\\}", apiClient.escapeString(attributeName.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call updateAttributeValidateBeforeCall(String attributeCategory, String attributeName, UpdateAttribute updateAttribute, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'attributeCategory' is set + if (attributeCategory == null) { + throw new ApiException("Missing the required parameter 'attributeCategory' when calling updateAttribute(Async)"); + } + + // verify the required parameter 'attributeName' is set + if (attributeName == null) { + throw new ApiException("Missing the required parameter 'attributeName' when calling updateAttribute(Async)"); + } + + // verify the required parameter 'updateAttribute' is set + if (updateAttribute == null) { + throw new ApiException("Missing the required parameter 'updateAttribute' when calling updateAttribute(Async)"); + } + + + com.squareup.okhttp.Call call = updateAttributeCall(attributeCategory, attributeName, updateAttribute, progressListener, progressRequestListener); + return call; + + } + + /** + * Updates contact attribute + * + * @param attributeCategory Category of the attribute (required) + * @param attributeName Name of the existing attribute (required) + * @param updateAttribute Values to update an attribute (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void updateAttribute(String attributeCategory, String attributeName, UpdateAttribute updateAttribute) throws ApiException { + updateAttributeWithHttpInfo(attributeCategory, attributeName, updateAttribute); + } + + /** + * Updates contact attribute + * + * @param attributeCategory Category of the attribute (required) + * @param attributeName Name of the existing attribute (required) + * @param updateAttribute Values to update an attribute (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse updateAttributeWithHttpInfo(String attributeCategory, String attributeName, UpdateAttribute updateAttribute) throws ApiException { + com.squareup.okhttp.Call call = updateAttributeValidateBeforeCall(attributeCategory, attributeName, updateAttribute, null, null); + return apiClient.execute(call); + } + + /** + * Updates contact attribute (asynchronously) + * + * @param attributeCategory Category of the attribute (required) + * @param attributeName Name of the existing attribute (required) + * @param updateAttribute Values to update an attribute (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call updateAttributeAsync(String attributeCategory, String attributeName, UpdateAttribute updateAttribute, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = updateAttributeValidateBeforeCall(attributeCategory, attributeName, updateAttribute, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for updateContact + * @param email Email (urlencoded) of the contact (required) + * @param updateContact Values to update a contact (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call updateContactCall(String email, UpdateContact updateContact, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = updateContact; + + // create path and map variables + String localVarPath = "/contacts/{email}" + .replaceAll("\\{" + "email" + "\\}", apiClient.escapeString(email.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call updateContactValidateBeforeCall(String email, UpdateContact updateContact, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'email' is set + if (email == null) { + throw new ApiException("Missing the required parameter 'email' when calling updateContact(Async)"); + } + + // verify the required parameter 'updateContact' is set + if (updateContact == null) { + throw new ApiException("Missing the required parameter 'updateContact' when calling updateContact(Async)"); + } + + + com.squareup.okhttp.Call call = updateContactCall(email, updateContact, progressListener, progressRequestListener); + return call; + + } + + /** + * Updates a contact + * + * @param email Email (urlencoded) of the contact (required) + * @param updateContact Values to update a contact (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void updateContact(String email, UpdateContact updateContact) throws ApiException { + updateContactWithHttpInfo(email, updateContact); + } + + /** + * Updates a contact + * + * @param email Email (urlencoded) of the contact (required) + * @param updateContact Values to update a contact (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse updateContactWithHttpInfo(String email, UpdateContact updateContact) throws ApiException { + com.squareup.okhttp.Call call = updateContactValidateBeforeCall(email, updateContact, null, null); + return apiClient.execute(call); + } + + /** + * Updates a contact (asynchronously) + * + * @param email Email (urlencoded) of the contact (required) + * @param updateContact Values to update a contact (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call updateContactAsync(String email, UpdateContact updateContact, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = updateContactValidateBeforeCall(email, updateContact, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for updateFolder + * @param folderId Id of the folder (required) + * @param updateFolder Name of the folder (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call updateFolderCall(Long folderId, CreateUpdateFolder updateFolder, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = updateFolder; + + // create path and map variables + String localVarPath = "/contacts/folders/{folderId}" + .replaceAll("\\{" + "folderId" + "\\}", apiClient.escapeString(folderId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call updateFolderValidateBeforeCall(Long folderId, CreateUpdateFolder updateFolder, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'folderId' is set + if (folderId == null) { + throw new ApiException("Missing the required parameter 'folderId' when calling updateFolder(Async)"); + } + + // verify the required parameter 'updateFolder' is set + if (updateFolder == null) { + throw new ApiException("Missing the required parameter 'updateFolder' when calling updateFolder(Async)"); + } + + + com.squareup.okhttp.Call call = updateFolderCall(folderId, updateFolder, progressListener, progressRequestListener); + return call; + + } + + /** + * Update a contact folder + * + * @param folderId Id of the folder (required) + * @param updateFolder Name of the folder (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void updateFolder(Long folderId, CreateUpdateFolder updateFolder) throws ApiException { + updateFolderWithHttpInfo(folderId, updateFolder); + } + + /** + * Update a contact folder + * + * @param folderId Id of the folder (required) + * @param updateFolder Name of the folder (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse updateFolderWithHttpInfo(Long folderId, CreateUpdateFolder updateFolder) throws ApiException { + com.squareup.okhttp.Call call = updateFolderValidateBeforeCall(folderId, updateFolder, null, null); + return apiClient.execute(call); + } + + /** + * Update a contact folder (asynchronously) + * + * @param folderId Id of the folder (required) + * @param updateFolder Name of the folder (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call updateFolderAsync(Long folderId, CreateUpdateFolder updateFolder, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = updateFolderValidateBeforeCall(folderId, updateFolder, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for updateList + * @param listId Id of the list (required) + * @param updateList Values to update a list (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call updateListCall(Long listId, UpdateList updateList, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = updateList; + + // create path and map variables + String localVarPath = "/contacts/lists/{listId}" + .replaceAll("\\{" + "listId" + "\\}", apiClient.escapeString(listId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call updateListValidateBeforeCall(Long listId, UpdateList updateList, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'listId' is set + if (listId == null) { + throw new ApiException("Missing the required parameter 'listId' when calling updateList(Async)"); + } + + // verify the required parameter 'updateList' is set + if (updateList == null) { + throw new ApiException("Missing the required parameter 'updateList' when calling updateList(Async)"); + } + + + com.squareup.okhttp.Call call = updateListCall(listId, updateList, progressListener, progressRequestListener); + return call; + + } + + /** + * Update a list + * + * @param listId Id of the list (required) + * @param updateList Values to update a list (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void updateList(Long listId, UpdateList updateList) throws ApiException { + updateListWithHttpInfo(listId, updateList); + } + + /** + * Update a list + * + * @param listId Id of the list (required) + * @param updateList Values to update a list (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse updateListWithHttpInfo(Long listId, UpdateList updateList) throws ApiException { + com.squareup.okhttp.Call call = updateListValidateBeforeCall(listId, updateList, null, null); + return apiClient.execute(call); + } + + /** + * Update a list (asynchronously) + * + * @param listId Id of the list (required) + * @param updateList Values to update a list (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call updateListAsync(Long listId, UpdateList updateList, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = updateListValidateBeforeCall(listId, updateList, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } +} diff --git a/src/main/java/sibApi/EmailCampaignsApi.java b/src/main/java/sibApi/EmailCampaignsApi.java new file mode 100644 index 0000000..2ee8801 --- /dev/null +++ b/src/main/java/sibApi/EmailCampaignsApi.java @@ -0,0 +1,1327 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibApi; + +import sendinblue.ApiCallback; +import sendinblue.ApiClient; +import sendinblue.ApiException; +import sendinblue.ApiResponse; +import sendinblue.Configuration; +import sendinblue.Pair; +import sendinblue.ProgressRequestBody; +import sendinblue.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import sibModel.CreateEmailCampaign; +import sibModel.CreateModel; +import sibModel.CreatedProcessId; +import sibModel.EmailExportRecipients; +import sibModel.ErrorModel; +import sibModel.GetEmailCampaign; +import sibModel.GetEmailCampaigns; +import sibModel.PostSendFailed; +import sibModel.SendReport; +import sibModel.SendTestEmail; +import sibModel.UpdateCampaignStatus; +import sibModel.UpdateEmailCampaign; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class EmailCampaignsApi { + private ApiClient apiClient; + + public EmailCampaignsApi() { + this(Configuration.getDefaultApiClient()); + } + + public EmailCampaignsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Build call for createEmailCampaign + * @param emailCampaigns Values to create a campaign (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call createEmailCampaignCall(CreateEmailCampaign emailCampaigns, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = emailCampaigns; + + // create path and map variables + String localVarPath = "/emailCampaigns"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call createEmailCampaignValidateBeforeCall(CreateEmailCampaign emailCampaigns, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'emailCampaigns' is set + if (emailCampaigns == null) { + throw new ApiException("Missing the required parameter 'emailCampaigns' when calling createEmailCampaign(Async)"); + } + + + com.squareup.okhttp.Call call = createEmailCampaignCall(emailCampaigns, progressListener, progressRequestListener); + return call; + + } + + /** + * Create an email campaign + * + * @param emailCampaigns Values to create a campaign (required) + * @return CreateModel + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public CreateModel createEmailCampaign(CreateEmailCampaign emailCampaigns) throws ApiException { + ApiResponse resp = createEmailCampaignWithHttpInfo(emailCampaigns); + return resp.getData(); + } + + /** + * Create an email campaign + * + * @param emailCampaigns Values to create a campaign (required) + * @return ApiResponse<CreateModel> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse createEmailCampaignWithHttpInfo(CreateEmailCampaign emailCampaigns) throws ApiException { + com.squareup.okhttp.Call call = createEmailCampaignValidateBeforeCall(emailCampaigns, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Create an email campaign (asynchronously) + * + * @param emailCampaigns Values to create a campaign (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call createEmailCampaignAsync(CreateEmailCampaign emailCampaigns, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = createEmailCampaignValidateBeforeCall(emailCampaigns, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for deleteEmailCampaign + * @param campaignId id of the campaign (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call deleteEmailCampaignCall(Long campaignId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/emailCampaigns/{campaignId}" + .replaceAll("\\{" + "campaignId" + "\\}", apiClient.escapeString(campaignId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call deleteEmailCampaignValidateBeforeCall(Long campaignId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'campaignId' is set + if (campaignId == null) { + throw new ApiException("Missing the required parameter 'campaignId' when calling deleteEmailCampaign(Async)"); + } + + + com.squareup.okhttp.Call call = deleteEmailCampaignCall(campaignId, progressListener, progressRequestListener); + return call; + + } + + /** + * Delete an email campaign + * + * @param campaignId id of the campaign (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void deleteEmailCampaign(Long campaignId) throws ApiException { + deleteEmailCampaignWithHttpInfo(campaignId); + } + + /** + * Delete an email campaign + * + * @param campaignId id of the campaign (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse deleteEmailCampaignWithHttpInfo(Long campaignId) throws ApiException { + com.squareup.okhttp.Call call = deleteEmailCampaignValidateBeforeCall(campaignId, null, null); + return apiClient.execute(call); + } + + /** + * Delete an email campaign (asynchronously) + * + * @param campaignId id of the campaign (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call deleteEmailCampaignAsync(Long campaignId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = deleteEmailCampaignValidateBeforeCall(campaignId, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for emailExportRecipients + * @param campaignId Id of the campaign (required) + * @param recipientExport Values to send for a recipient export request (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call emailExportRecipientsCall(Long campaignId, EmailExportRecipients recipientExport, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = recipientExport; + + // create path and map variables + String localVarPath = "/emailCampaigns/{campaignId}/exportRecipients" + .replaceAll("\\{" + "campaignId" + "\\}", apiClient.escapeString(campaignId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call emailExportRecipientsValidateBeforeCall(Long campaignId, EmailExportRecipients recipientExport, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'campaignId' is set + if (campaignId == null) { + throw new ApiException("Missing the required parameter 'campaignId' when calling emailExportRecipients(Async)"); + } + + + com.squareup.okhttp.Call call = emailExportRecipientsCall(campaignId, recipientExport, progressListener, progressRequestListener); + return call; + + } + + /** + * Export the recipients of a campaign + * + * @param campaignId Id of the campaign (required) + * @param recipientExport Values to send for a recipient export request (optional) + * @return CreatedProcessId + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public CreatedProcessId emailExportRecipients(Long campaignId, EmailExportRecipients recipientExport) throws ApiException { + ApiResponse resp = emailExportRecipientsWithHttpInfo(campaignId, recipientExport); + return resp.getData(); + } + + /** + * Export the recipients of a campaign + * + * @param campaignId Id of the campaign (required) + * @param recipientExport Values to send for a recipient export request (optional) + * @return ApiResponse<CreatedProcessId> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse emailExportRecipientsWithHttpInfo(Long campaignId, EmailExportRecipients recipientExport) throws ApiException { + com.squareup.okhttp.Call call = emailExportRecipientsValidateBeforeCall(campaignId, recipientExport, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Export the recipients of a campaign (asynchronously) + * + * @param campaignId Id of the campaign (required) + * @param recipientExport Values to send for a recipient export request (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call emailExportRecipientsAsync(Long campaignId, EmailExportRecipients recipientExport, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = emailExportRecipientsValidateBeforeCall(campaignId, recipientExport, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for getEmailCampaign + * @param campaignId Id of the campaign (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getEmailCampaignCall(Long campaignId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/emailCampaigns/{campaignId}" + .replaceAll("\\{" + "campaignId" + "\\}", apiClient.escapeString(campaignId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getEmailCampaignValidateBeforeCall(Long campaignId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'campaignId' is set + if (campaignId == null) { + throw new ApiException("Missing the required parameter 'campaignId' when calling getEmailCampaign(Async)"); + } + + + com.squareup.okhttp.Call call = getEmailCampaignCall(campaignId, progressListener, progressRequestListener); + return call; + + } + + /** + * Get campaign informations + * + * @param campaignId Id of the campaign (required) + * @return GetEmailCampaign + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetEmailCampaign getEmailCampaign(Long campaignId) throws ApiException { + ApiResponse resp = getEmailCampaignWithHttpInfo(campaignId); + return resp.getData(); + } + + /** + * Get campaign informations + * + * @param campaignId Id of the campaign (required) + * @return ApiResponse<GetEmailCampaign> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getEmailCampaignWithHttpInfo(Long campaignId) throws ApiException { + com.squareup.okhttp.Call call = getEmailCampaignValidateBeforeCall(campaignId, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get campaign informations (asynchronously) + * + * @param campaignId Id of the campaign (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getEmailCampaignAsync(Long campaignId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getEmailCampaignValidateBeforeCall(campaignId, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for getEmailCampaigns + * @param type Filter on the type of the campaigns (optional) + * @param status Filter on the status of the campaign (optional) + * @param limit Number of documents per page (optional, default to 500) + * @param offset Index of the first document in the page (optional, default to 0) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getEmailCampaignsCall(String type, String status, Long limit, Long offset, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/emailCampaigns"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (type != null) + localVarQueryParams.addAll(apiClient.parameterToPair("type", type)); + if (status != null) + localVarQueryParams.addAll(apiClient.parameterToPair("status", status)); + if (limit != null) + localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit)); + if (offset != null) + localVarQueryParams.addAll(apiClient.parameterToPair("offset", offset)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getEmailCampaignsValidateBeforeCall(String type, String status, Long limit, Long offset, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = getEmailCampaignsCall(type, status, limit, offset, progressListener, progressRequestListener); + return call; + + } + + /** + * Return all your created campaigns + * + * @param type Filter on the type of the campaigns (optional) + * @param status Filter on the status of the campaign (optional) + * @param limit Number of documents per page (optional, default to 500) + * @param offset Index of the first document in the page (optional, default to 0) + * @return GetEmailCampaigns + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetEmailCampaigns getEmailCampaigns(String type, String status, Long limit, Long offset) throws ApiException { + ApiResponse resp = getEmailCampaignsWithHttpInfo(type, status, limit, offset); + return resp.getData(); + } + + /** + * Return all your created campaigns + * + * @param type Filter on the type of the campaigns (optional) + * @param status Filter on the status of the campaign (optional) + * @param limit Number of documents per page (optional, default to 500) + * @param offset Index of the first document in the page (optional, default to 0) + * @return ApiResponse<GetEmailCampaigns> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getEmailCampaignsWithHttpInfo(String type, String status, Long limit, Long offset) throws ApiException { + com.squareup.okhttp.Call call = getEmailCampaignsValidateBeforeCall(type, status, limit, offset, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Return all your created campaigns (asynchronously) + * + * @param type Filter on the type of the campaigns (optional) + * @param status Filter on the status of the campaign (optional) + * @param limit Number of documents per page (optional, default to 500) + * @param offset Index of the first document in the page (optional, default to 0) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getEmailCampaignsAsync(String type, String status, Long limit, Long offset, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getEmailCampaignsValidateBeforeCall(type, status, limit, offset, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for sendEmailCampaignNow + * @param campaignId Id of the campaign (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call sendEmailCampaignNowCall(Long campaignId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/emailCampaigns/{campaignId}/sendNow" + .replaceAll("\\{" + "campaignId" + "\\}", apiClient.escapeString(campaignId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call sendEmailCampaignNowValidateBeforeCall(Long campaignId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'campaignId' is set + if (campaignId == null) { + throw new ApiException("Missing the required parameter 'campaignId' when calling sendEmailCampaignNow(Async)"); + } + + + com.squareup.okhttp.Call call = sendEmailCampaignNowCall(campaignId, progressListener, progressRequestListener); + return call; + + } + + /** + * Send an email campaign id of the campaign immediately + * + * @param campaignId Id of the campaign (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void sendEmailCampaignNow(Long campaignId) throws ApiException { + sendEmailCampaignNowWithHttpInfo(campaignId); + } + + /** + * Send an email campaign id of the campaign immediately + * + * @param campaignId Id of the campaign (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse sendEmailCampaignNowWithHttpInfo(Long campaignId) throws ApiException { + com.squareup.okhttp.Call call = sendEmailCampaignNowValidateBeforeCall(campaignId, null, null); + return apiClient.execute(call); + } + + /** + * Send an email campaign id of the campaign immediately (asynchronously) + * + * @param campaignId Id of the campaign (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call sendEmailCampaignNowAsync(Long campaignId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = sendEmailCampaignNowValidateBeforeCall(campaignId, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for sendReport + * @param campaignId Id of the campaign (required) + * @param sendReport Values for send a report (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call sendReportCall(Long campaignId, SendReport sendReport, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = sendReport; + + // create path and map variables + String localVarPath = "/emailCampaigns/{campaignId}/sendReport" + .replaceAll("\\{" + "campaignId" + "\\}", apiClient.escapeString(campaignId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call sendReportValidateBeforeCall(Long campaignId, SendReport sendReport, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'campaignId' is set + if (campaignId == null) { + throw new ApiException("Missing the required parameter 'campaignId' when calling sendReport(Async)"); + } + + // verify the required parameter 'sendReport' is set + if (sendReport == null) { + throw new ApiException("Missing the required parameter 'sendReport' when calling sendReport(Async)"); + } + + + com.squareup.okhttp.Call call = sendReportCall(campaignId, sendReport, progressListener, progressRequestListener); + return call; + + } + + /** + * Send the report of a campaigns + * A PDF will be sent to the specified email addresses + * @param campaignId Id of the campaign (required) + * @param sendReport Values for send a report (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void sendReport(Long campaignId, SendReport sendReport) throws ApiException { + sendReportWithHttpInfo(campaignId, sendReport); + } + + /** + * Send the report of a campaigns + * A PDF will be sent to the specified email addresses + * @param campaignId Id of the campaign (required) + * @param sendReport Values for send a report (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse sendReportWithHttpInfo(Long campaignId, SendReport sendReport) throws ApiException { + com.squareup.okhttp.Call call = sendReportValidateBeforeCall(campaignId, sendReport, null, null); + return apiClient.execute(call); + } + + /** + * Send the report of a campaigns (asynchronously) + * A PDF will be sent to the specified email addresses + * @param campaignId Id of the campaign (required) + * @param sendReport Values for send a report (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call sendReportAsync(Long campaignId, SendReport sendReport, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = sendReportValidateBeforeCall(campaignId, sendReport, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for sendTestEmail + * @param campaignId Id of the campaign (required) + * @param emailTo (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call sendTestEmailCall(Long campaignId, SendTestEmail emailTo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = emailTo; + + // create path and map variables + String localVarPath = "/emailCampaigns/{campaignId}/sendTest" + .replaceAll("\\{" + "campaignId" + "\\}", apiClient.escapeString(campaignId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call sendTestEmailValidateBeforeCall(Long campaignId, SendTestEmail emailTo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'campaignId' is set + if (campaignId == null) { + throw new ApiException("Missing the required parameter 'campaignId' when calling sendTestEmail(Async)"); + } + + // verify the required parameter 'emailTo' is set + if (emailTo == null) { + throw new ApiException("Missing the required parameter 'emailTo' when calling sendTestEmail(Async)"); + } + + + com.squareup.okhttp.Call call = sendTestEmailCall(campaignId, emailTo, progressListener, progressRequestListener); + return call; + + } + + /** + * Send an email campaign to your test list + * + * @param campaignId Id of the campaign (required) + * @param emailTo (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void sendTestEmail(Long campaignId, SendTestEmail emailTo) throws ApiException { + sendTestEmailWithHttpInfo(campaignId, emailTo); + } + + /** + * Send an email campaign to your test list + * + * @param campaignId Id of the campaign (required) + * @param emailTo (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse sendTestEmailWithHttpInfo(Long campaignId, SendTestEmail emailTo) throws ApiException { + com.squareup.okhttp.Call call = sendTestEmailValidateBeforeCall(campaignId, emailTo, null, null); + return apiClient.execute(call); + } + + /** + * Send an email campaign to your test list (asynchronously) + * + * @param campaignId Id of the campaign (required) + * @param emailTo (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call sendTestEmailAsync(Long campaignId, SendTestEmail emailTo, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = sendTestEmailValidateBeforeCall(campaignId, emailTo, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for updateCampaignStatus + * @param campaignId Id of the campaign (required) + * @param status Status of the campaign (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call updateCampaignStatusCall(Long campaignId, UpdateCampaignStatus status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = status; + + // create path and map variables + String localVarPath = "/emailCampaigns/{campaignId}/status" + .replaceAll("\\{" + "campaignId" + "\\}", apiClient.escapeString(campaignId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call updateCampaignStatusValidateBeforeCall(Long campaignId, UpdateCampaignStatus status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'campaignId' is set + if (campaignId == null) { + throw new ApiException("Missing the required parameter 'campaignId' when calling updateCampaignStatus(Async)"); + } + + // verify the required parameter 'status' is set + if (status == null) { + throw new ApiException("Missing the required parameter 'status' when calling updateCampaignStatus(Async)"); + } + + + com.squareup.okhttp.Call call = updateCampaignStatusCall(campaignId, status, progressListener, progressRequestListener); + return call; + + } + + /** + * Update a campaign status + * + * @param campaignId Id of the campaign (required) + * @param status Status of the campaign (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void updateCampaignStatus(Long campaignId, UpdateCampaignStatus status) throws ApiException { + updateCampaignStatusWithHttpInfo(campaignId, status); + } + + /** + * Update a campaign status + * + * @param campaignId Id of the campaign (required) + * @param status Status of the campaign (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse updateCampaignStatusWithHttpInfo(Long campaignId, UpdateCampaignStatus status) throws ApiException { + com.squareup.okhttp.Call call = updateCampaignStatusValidateBeforeCall(campaignId, status, null, null); + return apiClient.execute(call); + } + + /** + * Update a campaign status (asynchronously) + * + * @param campaignId Id of the campaign (required) + * @param status Status of the campaign (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call updateCampaignStatusAsync(Long campaignId, UpdateCampaignStatus status, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = updateCampaignStatusValidateBeforeCall(campaignId, status, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for updateEmailCampaign + * @param campaignId Id of the campaign (required) + * @param emailCampaign Values to update a campaign (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call updateEmailCampaignCall(Long campaignId, UpdateEmailCampaign emailCampaign, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = emailCampaign; + + // create path and map variables + String localVarPath = "/emailCampaigns/{campaignId}" + .replaceAll("\\{" + "campaignId" + "\\}", apiClient.escapeString(campaignId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call updateEmailCampaignValidateBeforeCall(Long campaignId, UpdateEmailCampaign emailCampaign, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'campaignId' is set + if (campaignId == null) { + throw new ApiException("Missing the required parameter 'campaignId' when calling updateEmailCampaign(Async)"); + } + + // verify the required parameter 'emailCampaign' is set + if (emailCampaign == null) { + throw new ApiException("Missing the required parameter 'emailCampaign' when calling updateEmailCampaign(Async)"); + } + + + com.squareup.okhttp.Call call = updateEmailCampaignCall(campaignId, emailCampaign, progressListener, progressRequestListener); + return call; + + } + + /** + * Update a campaign + * + * @param campaignId Id of the campaign (required) + * @param emailCampaign Values to update a campaign (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void updateEmailCampaign(Long campaignId, UpdateEmailCampaign emailCampaign) throws ApiException { + updateEmailCampaignWithHttpInfo(campaignId, emailCampaign); + } + + /** + * Update a campaign + * + * @param campaignId Id of the campaign (required) + * @param emailCampaign Values to update a campaign (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse updateEmailCampaignWithHttpInfo(Long campaignId, UpdateEmailCampaign emailCampaign) throws ApiException { + com.squareup.okhttp.Call call = updateEmailCampaignValidateBeforeCall(campaignId, emailCampaign, null, null); + return apiClient.execute(call); + } + + /** + * Update a campaign (asynchronously) + * + * @param campaignId Id of the campaign (required) + * @param emailCampaign Values to update a campaign (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call updateEmailCampaignAsync(Long campaignId, UpdateEmailCampaign emailCampaign, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = updateEmailCampaignValidateBeforeCall(campaignId, emailCampaign, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } +} diff --git a/src/main/java/sibApi/FoldersApi.java b/src/main/java/sibApi/FoldersApi.java new file mode 100644 index 0000000..53feaa4 --- /dev/null +++ b/src/main/java/sibApi/FoldersApi.java @@ -0,0 +1,824 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibApi; + +import sendinblue.ApiCallback; +import sendinblue.ApiClient; +import sendinblue.ApiException; +import sendinblue.ApiResponse; +import sendinblue.Configuration; +import sendinblue.Pair; +import sendinblue.ProgressRequestBody; +import sendinblue.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import sibModel.CreateModel; +import sibModel.CreateUpdateFolder; +import sibModel.ErrorModel; +import sibModel.GetFolder; +import sibModel.GetFolderLists; +import sibModel.GetFolders; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class FoldersApi { + private ApiClient apiClient; + + public FoldersApi() { + this(Configuration.getDefaultApiClient()); + } + + public FoldersApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Build call for createFolder + * @param createFolder Name of the folder (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call createFolderCall(CreateUpdateFolder createFolder, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = createFolder; + + // create path and map variables + String localVarPath = "/contacts/folders"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call createFolderValidateBeforeCall(CreateUpdateFolder createFolder, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'createFolder' is set + if (createFolder == null) { + throw new ApiException("Missing the required parameter 'createFolder' when calling createFolder(Async)"); + } + + + com.squareup.okhttp.Call call = createFolderCall(createFolder, progressListener, progressRequestListener); + return call; + + } + + /** + * Create a folder + * + * @param createFolder Name of the folder (required) + * @return CreateModel + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public CreateModel createFolder(CreateUpdateFolder createFolder) throws ApiException { + ApiResponse resp = createFolderWithHttpInfo(createFolder); + return resp.getData(); + } + + /** + * Create a folder + * + * @param createFolder Name of the folder (required) + * @return ApiResponse<CreateModel> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse createFolderWithHttpInfo(CreateUpdateFolder createFolder) throws ApiException { + com.squareup.okhttp.Call call = createFolderValidateBeforeCall(createFolder, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Create a folder (asynchronously) + * + * @param createFolder Name of the folder (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call createFolderAsync(CreateUpdateFolder createFolder, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = createFolderValidateBeforeCall(createFolder, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for deleteFolder + * @param folderId Id of the folder (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call deleteFolderCall(Long folderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/contacts/folders/{folderId}" + .replaceAll("\\{" + "folderId" + "\\}", apiClient.escapeString(folderId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call deleteFolderValidateBeforeCall(Long folderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'folderId' is set + if (folderId == null) { + throw new ApiException("Missing the required parameter 'folderId' when calling deleteFolder(Async)"); + } + + + com.squareup.okhttp.Call call = deleteFolderCall(folderId, progressListener, progressRequestListener); + return call; + + } + + /** + * Delete a folder (and all its lists) + * + * @param folderId Id of the folder (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void deleteFolder(Long folderId) throws ApiException { + deleteFolderWithHttpInfo(folderId); + } + + /** + * Delete a folder (and all its lists) + * + * @param folderId Id of the folder (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse deleteFolderWithHttpInfo(Long folderId) throws ApiException { + com.squareup.okhttp.Call call = deleteFolderValidateBeforeCall(folderId, null, null); + return apiClient.execute(call); + } + + /** + * Delete a folder (and all its lists) (asynchronously) + * + * @param folderId Id of the folder (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call deleteFolderAsync(Long folderId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = deleteFolderValidateBeforeCall(folderId, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for getFolder + * @param folderId id of the folder (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getFolderCall(Long folderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/contacts/folders/{folderId}" + .replaceAll("\\{" + "folderId" + "\\}", apiClient.escapeString(folderId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getFolderValidateBeforeCall(Long folderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'folderId' is set + if (folderId == null) { + throw new ApiException("Missing the required parameter 'folderId' when calling getFolder(Async)"); + } + + + com.squareup.okhttp.Call call = getFolderCall(folderId, progressListener, progressRequestListener); + return call; + + } + + /** + * Returns folder details + * + * @param folderId id of the folder (required) + * @return GetFolder + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetFolder getFolder(Long folderId) throws ApiException { + ApiResponse resp = getFolderWithHttpInfo(folderId); + return resp.getData(); + } + + /** + * Returns folder details + * + * @param folderId id of the folder (required) + * @return ApiResponse<GetFolder> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getFolderWithHttpInfo(Long folderId) throws ApiException { + com.squareup.okhttp.Call call = getFolderValidateBeforeCall(folderId, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Returns folder details (asynchronously) + * + * @param folderId id of the folder (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getFolderAsync(Long folderId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getFolderValidateBeforeCall(folderId, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for getFolderLists + * @param folderId Id of the folder (required) + * @param limit Number of documents per page (optional, default to 10) + * @param offset Index of the first document of the page (optional, default to 0) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getFolderListsCall(Long folderId, Long limit, Long offset, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/contacts/folders/{folderId}/lists" + .replaceAll("\\{" + "folderId" + "\\}", apiClient.escapeString(folderId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (limit != null) + localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit)); + if (offset != null) + localVarQueryParams.addAll(apiClient.parameterToPair("offset", offset)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getFolderListsValidateBeforeCall(Long folderId, Long limit, Long offset, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'folderId' is set + if (folderId == null) { + throw new ApiException("Missing the required parameter 'folderId' when calling getFolderLists(Async)"); + } + + + com.squareup.okhttp.Call call = getFolderListsCall(folderId, limit, offset, progressListener, progressRequestListener); + return call; + + } + + /** + * Get the lists in a folder + * + * @param folderId Id of the folder (required) + * @param limit Number of documents per page (optional, default to 10) + * @param offset Index of the first document of the page (optional, default to 0) + * @return GetFolderLists + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetFolderLists getFolderLists(Long folderId, Long limit, Long offset) throws ApiException { + ApiResponse resp = getFolderListsWithHttpInfo(folderId, limit, offset); + return resp.getData(); + } + + /** + * Get the lists in a folder + * + * @param folderId Id of the folder (required) + * @param limit Number of documents per page (optional, default to 10) + * @param offset Index of the first document of the page (optional, default to 0) + * @return ApiResponse<GetFolderLists> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getFolderListsWithHttpInfo(Long folderId, Long limit, Long offset) throws ApiException { + com.squareup.okhttp.Call call = getFolderListsValidateBeforeCall(folderId, limit, offset, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get the lists in a folder (asynchronously) + * + * @param folderId Id of the folder (required) + * @param limit Number of documents per page (optional, default to 10) + * @param offset Index of the first document of the page (optional, default to 0) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getFolderListsAsync(Long folderId, Long limit, Long offset, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getFolderListsValidateBeforeCall(folderId, limit, offset, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for getFolders + * @param limit Number of documents per page (required) + * @param offset Index of the first document of the page (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getFoldersCall(Long limit, Long offset, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/contacts/folders"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (limit != null) + localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit)); + if (offset != null) + localVarQueryParams.addAll(apiClient.parameterToPair("offset", offset)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getFoldersValidateBeforeCall(Long limit, Long offset, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'limit' is set + if (limit == null) { + throw new ApiException("Missing the required parameter 'limit' when calling getFolders(Async)"); + } + + // verify the required parameter 'offset' is set + if (offset == null) { + throw new ApiException("Missing the required parameter 'offset' when calling getFolders(Async)"); + } + + + com.squareup.okhttp.Call call = getFoldersCall(limit, offset, progressListener, progressRequestListener); + return call; + + } + + /** + * Get all the folders + * + * @param limit Number of documents per page (required) + * @param offset Index of the first document of the page (required) + * @return GetFolders + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetFolders getFolders(Long limit, Long offset) throws ApiException { + ApiResponse resp = getFoldersWithHttpInfo(limit, offset); + return resp.getData(); + } + + /** + * Get all the folders + * + * @param limit Number of documents per page (required) + * @param offset Index of the first document of the page (required) + * @return ApiResponse<GetFolders> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getFoldersWithHttpInfo(Long limit, Long offset) throws ApiException { + com.squareup.okhttp.Call call = getFoldersValidateBeforeCall(limit, offset, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get all the folders (asynchronously) + * + * @param limit Number of documents per page (required) + * @param offset Index of the first document of the page (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getFoldersAsync(Long limit, Long offset, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getFoldersValidateBeforeCall(limit, offset, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for updateFolder + * @param folderId Id of the folder (required) + * @param updateFolder Name of the folder (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call updateFolderCall(Long folderId, CreateUpdateFolder updateFolder, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = updateFolder; + + // create path and map variables + String localVarPath = "/contacts/folders/{folderId}" + .replaceAll("\\{" + "folderId" + "\\}", apiClient.escapeString(folderId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call updateFolderValidateBeforeCall(Long folderId, CreateUpdateFolder updateFolder, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'folderId' is set + if (folderId == null) { + throw new ApiException("Missing the required parameter 'folderId' when calling updateFolder(Async)"); + } + + // verify the required parameter 'updateFolder' is set + if (updateFolder == null) { + throw new ApiException("Missing the required parameter 'updateFolder' when calling updateFolder(Async)"); + } + + + com.squareup.okhttp.Call call = updateFolderCall(folderId, updateFolder, progressListener, progressRequestListener); + return call; + + } + + /** + * Update a contact folder + * + * @param folderId Id of the folder (required) + * @param updateFolder Name of the folder (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void updateFolder(Long folderId, CreateUpdateFolder updateFolder) throws ApiException { + updateFolderWithHttpInfo(folderId, updateFolder); + } + + /** + * Update a contact folder + * + * @param folderId Id of the folder (required) + * @param updateFolder Name of the folder (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse updateFolderWithHttpInfo(Long folderId, CreateUpdateFolder updateFolder) throws ApiException { + com.squareup.okhttp.Call call = updateFolderValidateBeforeCall(folderId, updateFolder, null, null); + return apiClient.execute(call); + } + + /** + * Update a contact folder (asynchronously) + * + * @param folderId Id of the folder (required) + * @param updateFolder Name of the folder (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call updateFolderAsync(Long folderId, CreateUpdateFolder updateFolder, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = updateFolderValidateBeforeCall(folderId, updateFolder, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } +} diff --git a/src/main/java/sibApi/ListsApi.java b/src/main/java/sibApi/ListsApi.java new file mode 100644 index 0000000..ce54075 --- /dev/null +++ b/src/main/java/sibApi/ListsApi.java @@ -0,0 +1,1224 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibApi; + +import sendinblue.ApiCallback; +import sendinblue.ApiClient; +import sendinblue.ApiException; +import sendinblue.ApiResponse; +import sendinblue.Configuration; +import sendinblue.Pair; +import sendinblue.ProgressRequestBody; +import sendinblue.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import sibModel.AddRemoveContactToList; +import sibModel.CreateList; +import sibModel.CreateModel; +import sibModel.ErrorModel; +import sibModel.GetContacts; +import sibModel.GetExtendedList; +import sibModel.GetFolderLists; +import sibModel.GetLists; +import org.threeten.bp.OffsetDateTime; +import sibModel.PostContactInfo; +import sibModel.UpdateList; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class ListsApi { + private ApiClient apiClient; + + public ListsApi() { + this(Configuration.getDefaultApiClient()); + } + + public ListsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Build call for addContactToList + * @param listId Id of the list (required) + * @param contactEmails Emails addresses of the contacts (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call addContactToListCall(Long listId, AddRemoveContactToList contactEmails, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = contactEmails; + + // create path and map variables + String localVarPath = "/contacts/lists/{listId}/contacts/add" + .replaceAll("\\{" + "listId" + "\\}", apiClient.escapeString(listId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call addContactToListValidateBeforeCall(Long listId, AddRemoveContactToList contactEmails, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'listId' is set + if (listId == null) { + throw new ApiException("Missing the required parameter 'listId' when calling addContactToList(Async)"); + } + + // verify the required parameter 'contactEmails' is set + if (contactEmails == null) { + throw new ApiException("Missing the required parameter 'contactEmails' when calling addContactToList(Async)"); + } + + + com.squareup.okhttp.Call call = addContactToListCall(listId, contactEmails, progressListener, progressRequestListener); + return call; + + } + + /** + * Add existing contacts to a list + * + * @param listId Id of the list (required) + * @param contactEmails Emails addresses of the contacts (required) + * @return PostContactInfo + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public PostContactInfo addContactToList(Long listId, AddRemoveContactToList contactEmails) throws ApiException { + ApiResponse resp = addContactToListWithHttpInfo(listId, contactEmails); + return resp.getData(); + } + + /** + * Add existing contacts to a list + * + * @param listId Id of the list (required) + * @param contactEmails Emails addresses of the contacts (required) + * @return ApiResponse<PostContactInfo> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse addContactToListWithHttpInfo(Long listId, AddRemoveContactToList contactEmails) throws ApiException { + com.squareup.okhttp.Call call = addContactToListValidateBeforeCall(listId, contactEmails, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Add existing contacts to a list (asynchronously) + * + * @param listId Id of the list (required) + * @param contactEmails Emails addresses of the contacts (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call addContactToListAsync(Long listId, AddRemoveContactToList contactEmails, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = addContactToListValidateBeforeCall(listId, contactEmails, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for createList + * @param createList Values to create a list (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call createListCall(CreateList createList, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = createList; + + // create path and map variables + String localVarPath = "/contacts/lists"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call createListValidateBeforeCall(CreateList createList, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'createList' is set + if (createList == null) { + throw new ApiException("Missing the required parameter 'createList' when calling createList(Async)"); + } + + + com.squareup.okhttp.Call call = createListCall(createList, progressListener, progressRequestListener); + return call; + + } + + /** + * Create a list + * + * @param createList Values to create a list (required) + * @return CreateModel + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public CreateModel createList(CreateList createList) throws ApiException { + ApiResponse resp = createListWithHttpInfo(createList); + return resp.getData(); + } + + /** + * Create a list + * + * @param createList Values to create a list (required) + * @return ApiResponse<CreateModel> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse createListWithHttpInfo(CreateList createList) throws ApiException { + com.squareup.okhttp.Call call = createListValidateBeforeCall(createList, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Create a list (asynchronously) + * + * @param createList Values to create a list (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call createListAsync(CreateList createList, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = createListValidateBeforeCall(createList, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for deleteList + * @param listId Id of the list (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call deleteListCall(Long listId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/contacts/lists/{listId}" + .replaceAll("\\{" + "listId" + "\\}", apiClient.escapeString(listId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call deleteListValidateBeforeCall(Long listId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'listId' is set + if (listId == null) { + throw new ApiException("Missing the required parameter 'listId' when calling deleteList(Async)"); + } + + + com.squareup.okhttp.Call call = deleteListCall(listId, progressListener, progressRequestListener); + return call; + + } + + /** + * Delete a list + * + * @param listId Id of the list (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void deleteList(Long listId) throws ApiException { + deleteListWithHttpInfo(listId); + } + + /** + * Delete a list + * + * @param listId Id of the list (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse deleteListWithHttpInfo(Long listId) throws ApiException { + com.squareup.okhttp.Call call = deleteListValidateBeforeCall(listId, null, null); + return apiClient.execute(call); + } + + /** + * Delete a list (asynchronously) + * + * @param listId Id of the list (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call deleteListAsync(Long listId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = deleteListValidateBeforeCall(listId, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for getContactsFromList + * @param listId Id of the list (required) + * @param modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param limit Number of documents per page (optional, default to 50) + * @param offset Index of the first document of the page (optional, default to 0) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getContactsFromListCall(Long listId, OffsetDateTime modifiedSince, Long limit, Long offset, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/contacts/lists/{listId}/contacts" + .replaceAll("\\{" + "listId" + "\\}", apiClient.escapeString(listId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (modifiedSince != null) + localVarQueryParams.addAll(apiClient.parameterToPair("modifiedSince", modifiedSince)); + if (limit != null) + localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit)); + if (offset != null) + localVarQueryParams.addAll(apiClient.parameterToPair("offset", offset)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getContactsFromListValidateBeforeCall(Long listId, OffsetDateTime modifiedSince, Long limit, Long offset, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'listId' is set + if (listId == null) { + throw new ApiException("Missing the required parameter 'listId' when calling getContactsFromList(Async)"); + } + + + com.squareup.okhttp.Call call = getContactsFromListCall(listId, modifiedSince, limit, offset, progressListener, progressRequestListener); + return call; + + } + + /** + * Get the contacts in a list + * + * @param listId Id of the list (required) + * @param modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param limit Number of documents per page (optional, default to 50) + * @param offset Index of the first document of the page (optional, default to 0) + * @return GetContacts + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetContacts getContactsFromList(Long listId, OffsetDateTime modifiedSince, Long limit, Long offset) throws ApiException { + ApiResponse resp = getContactsFromListWithHttpInfo(listId, modifiedSince, limit, offset); + return resp.getData(); + } + + /** + * Get the contacts in a list + * + * @param listId Id of the list (required) + * @param modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param limit Number of documents per page (optional, default to 50) + * @param offset Index of the first document of the page (optional, default to 0) + * @return ApiResponse<GetContacts> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getContactsFromListWithHttpInfo(Long listId, OffsetDateTime modifiedSince, Long limit, Long offset) throws ApiException { + com.squareup.okhttp.Call call = getContactsFromListValidateBeforeCall(listId, modifiedSince, limit, offset, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get the contacts in a list (asynchronously) + * + * @param listId Id of the list (required) + * @param modifiedSince Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional) + * @param limit Number of documents per page (optional, default to 50) + * @param offset Index of the first document of the page (optional, default to 0) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getContactsFromListAsync(Long listId, OffsetDateTime modifiedSince, Long limit, Long offset, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getContactsFromListValidateBeforeCall(listId, modifiedSince, limit, offset, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for getFolderLists + * @param folderId Id of the folder (required) + * @param limit Number of documents per page (optional, default to 10) + * @param offset Index of the first document of the page (optional, default to 0) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getFolderListsCall(Long folderId, Long limit, Long offset, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/contacts/folders/{folderId}/lists" + .replaceAll("\\{" + "folderId" + "\\}", apiClient.escapeString(folderId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (limit != null) + localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit)); + if (offset != null) + localVarQueryParams.addAll(apiClient.parameterToPair("offset", offset)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getFolderListsValidateBeforeCall(Long folderId, Long limit, Long offset, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'folderId' is set + if (folderId == null) { + throw new ApiException("Missing the required parameter 'folderId' when calling getFolderLists(Async)"); + } + + + com.squareup.okhttp.Call call = getFolderListsCall(folderId, limit, offset, progressListener, progressRequestListener); + return call; + + } + + /** + * Get the lists in a folder + * + * @param folderId Id of the folder (required) + * @param limit Number of documents per page (optional, default to 10) + * @param offset Index of the first document of the page (optional, default to 0) + * @return GetFolderLists + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetFolderLists getFolderLists(Long folderId, Long limit, Long offset) throws ApiException { + ApiResponse resp = getFolderListsWithHttpInfo(folderId, limit, offset); + return resp.getData(); + } + + /** + * Get the lists in a folder + * + * @param folderId Id of the folder (required) + * @param limit Number of documents per page (optional, default to 10) + * @param offset Index of the first document of the page (optional, default to 0) + * @return ApiResponse<GetFolderLists> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getFolderListsWithHttpInfo(Long folderId, Long limit, Long offset) throws ApiException { + com.squareup.okhttp.Call call = getFolderListsValidateBeforeCall(folderId, limit, offset, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get the lists in a folder (asynchronously) + * + * @param folderId Id of the folder (required) + * @param limit Number of documents per page (optional, default to 10) + * @param offset Index of the first document of the page (optional, default to 0) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getFolderListsAsync(Long folderId, Long limit, Long offset, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getFolderListsValidateBeforeCall(folderId, limit, offset, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for getList + * @param listId Id of the list (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getListCall(Long listId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/contacts/lists/{listId}" + .replaceAll("\\{" + "listId" + "\\}", apiClient.escapeString(listId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getListValidateBeforeCall(Long listId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'listId' is set + if (listId == null) { + throw new ApiException("Missing the required parameter 'listId' when calling getList(Async)"); + } + + + com.squareup.okhttp.Call call = getListCall(listId, progressListener, progressRequestListener); + return call; + + } + + /** + * Get the details of a list + * + * @param listId Id of the list (required) + * @return GetExtendedList + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetExtendedList getList(Long listId) throws ApiException { + ApiResponse resp = getListWithHttpInfo(listId); + return resp.getData(); + } + + /** + * Get the details of a list + * + * @param listId Id of the list (required) + * @return ApiResponse<GetExtendedList> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getListWithHttpInfo(Long listId) throws ApiException { + com.squareup.okhttp.Call call = getListValidateBeforeCall(listId, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get the details of a list (asynchronously) + * + * @param listId Id of the list (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getListAsync(Long listId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getListValidateBeforeCall(listId, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for getLists + * @param limit Number of documents per page (optional, default to 10) + * @param offset Index of the first document of the page (optional, default to 0) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getListsCall(Long limit, Long offset, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/contacts/lists"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (limit != null) + localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit)); + if (offset != null) + localVarQueryParams.addAll(apiClient.parameterToPair("offset", offset)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getListsValidateBeforeCall(Long limit, Long offset, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = getListsCall(limit, offset, progressListener, progressRequestListener); + return call; + + } + + /** + * Get all the lists + * + * @param limit Number of documents per page (optional, default to 10) + * @param offset Index of the first document of the page (optional, default to 0) + * @return GetLists + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetLists getLists(Long limit, Long offset) throws ApiException { + ApiResponse resp = getListsWithHttpInfo(limit, offset); + return resp.getData(); + } + + /** + * Get all the lists + * + * @param limit Number of documents per page (optional, default to 10) + * @param offset Index of the first document of the page (optional, default to 0) + * @return ApiResponse<GetLists> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getListsWithHttpInfo(Long limit, Long offset) throws ApiException { + com.squareup.okhttp.Call call = getListsValidateBeforeCall(limit, offset, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get all the lists (asynchronously) + * + * @param limit Number of documents per page (optional, default to 10) + * @param offset Index of the first document of the page (optional, default to 0) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getListsAsync(Long limit, Long offset, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getListsValidateBeforeCall(limit, offset, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for removeContactToList + * @param listId Id of the list (required) + * @param contactEmails Emails adresses of the contact (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call removeContactToListCall(Long listId, AddRemoveContactToList contactEmails, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = contactEmails; + + // create path and map variables + String localVarPath = "/contacts/lists/{listId}/contacts/remove" + .replaceAll("\\{" + "listId" + "\\}", apiClient.escapeString(listId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call removeContactToListValidateBeforeCall(Long listId, AddRemoveContactToList contactEmails, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'listId' is set + if (listId == null) { + throw new ApiException("Missing the required parameter 'listId' when calling removeContactToList(Async)"); + } + + // verify the required parameter 'contactEmails' is set + if (contactEmails == null) { + throw new ApiException("Missing the required parameter 'contactEmails' when calling removeContactToList(Async)"); + } + + + com.squareup.okhttp.Call call = removeContactToListCall(listId, contactEmails, progressListener, progressRequestListener); + return call; + + } + + /** + * Remove existing contacts from a list + * + * @param listId Id of the list (required) + * @param contactEmails Emails adresses of the contact (required) + * @return PostContactInfo + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public PostContactInfo removeContactToList(Long listId, AddRemoveContactToList contactEmails) throws ApiException { + ApiResponse resp = removeContactToListWithHttpInfo(listId, contactEmails); + return resp.getData(); + } + + /** + * Remove existing contacts from a list + * + * @param listId Id of the list (required) + * @param contactEmails Emails adresses of the contact (required) + * @return ApiResponse<PostContactInfo> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse removeContactToListWithHttpInfo(Long listId, AddRemoveContactToList contactEmails) throws ApiException { + com.squareup.okhttp.Call call = removeContactToListValidateBeforeCall(listId, contactEmails, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Remove existing contacts from a list (asynchronously) + * + * @param listId Id of the list (required) + * @param contactEmails Emails adresses of the contact (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call removeContactToListAsync(Long listId, AddRemoveContactToList contactEmails, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = removeContactToListValidateBeforeCall(listId, contactEmails, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for updateList + * @param listId Id of the list (required) + * @param updateList Values to update a list (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call updateListCall(Long listId, UpdateList updateList, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = updateList; + + // create path and map variables + String localVarPath = "/contacts/lists/{listId}" + .replaceAll("\\{" + "listId" + "\\}", apiClient.escapeString(listId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call updateListValidateBeforeCall(Long listId, UpdateList updateList, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'listId' is set + if (listId == null) { + throw new ApiException("Missing the required parameter 'listId' when calling updateList(Async)"); + } + + // verify the required parameter 'updateList' is set + if (updateList == null) { + throw new ApiException("Missing the required parameter 'updateList' when calling updateList(Async)"); + } + + + com.squareup.okhttp.Call call = updateListCall(listId, updateList, progressListener, progressRequestListener); + return call; + + } + + /** + * Update a list + * + * @param listId Id of the list (required) + * @param updateList Values to update a list (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void updateList(Long listId, UpdateList updateList) throws ApiException { + updateListWithHttpInfo(listId, updateList); + } + + /** + * Update a list + * + * @param listId Id of the list (required) + * @param updateList Values to update a list (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse updateListWithHttpInfo(Long listId, UpdateList updateList) throws ApiException { + com.squareup.okhttp.Call call = updateListValidateBeforeCall(listId, updateList, null, null); + return apiClient.execute(call); + } + + /** + * Update a list (asynchronously) + * + * @param listId Id of the list (required) + * @param updateList Values to update a list (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call updateListAsync(Long listId, UpdateList updateList, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = updateListValidateBeforeCall(listId, updateList, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } +} diff --git a/src/main/java/sibApi/ProcessApi.java b/src/main/java/sibApi/ProcessApi.java new file mode 100644 index 0000000..116bd2d --- /dev/null +++ b/src/main/java/sibApi/ProcessApi.java @@ -0,0 +1,307 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibApi; + +import sendinblue.ApiCallback; +import sendinblue.ApiClient; +import sendinblue.ApiException; +import sendinblue.ApiResponse; +import sendinblue.Configuration; +import sendinblue.Pair; +import sendinblue.ProgressRequestBody; +import sendinblue.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import sibModel.ErrorModel; +import sibModel.GetProcess; +import sibModel.GetProcesses; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class ProcessApi { + private ApiClient apiClient; + + public ProcessApi() { + this(Configuration.getDefaultApiClient()); + } + + public ProcessApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Build call for getProcess + * @param processId Id of the process (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getProcessCall(Long processId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/processes/{processId}" + .replaceAll("\\{" + "processId" + "\\}", apiClient.escapeString(processId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getProcessValidateBeforeCall(Long processId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'processId' is set + if (processId == null) { + throw new ApiException("Missing the required parameter 'processId' when calling getProcess(Async)"); + } + + + com.squareup.okhttp.Call call = getProcessCall(processId, progressListener, progressRequestListener); + return call; + + } + + /** + * Return the informations for a process + * + * @param processId Id of the process (required) + * @return GetProcess + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetProcess getProcess(Long processId) throws ApiException { + ApiResponse resp = getProcessWithHttpInfo(processId); + return resp.getData(); + } + + /** + * Return the informations for a process + * + * @param processId Id of the process (required) + * @return ApiResponse<GetProcess> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getProcessWithHttpInfo(Long processId) throws ApiException { + com.squareup.okhttp.Call call = getProcessValidateBeforeCall(processId, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Return the informations for a process (asynchronously) + * + * @param processId Id of the process (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getProcessAsync(Long processId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getProcessValidateBeforeCall(processId, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for getProcesses + * @param limit Number limitation for the result returned (optional, default to 10) + * @param offset Beginning point in the list to retrieve from. (optional, default to 0) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getProcessesCall(Long limit, Long offset, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/processes"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (limit != null) + localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit)); + if (offset != null) + localVarQueryParams.addAll(apiClient.parameterToPair("offset", offset)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getProcessesValidateBeforeCall(Long limit, Long offset, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = getProcessesCall(limit, offset, progressListener, progressRequestListener); + return call; + + } + + /** + * Return all the processes for your account + * + * @param limit Number limitation for the result returned (optional, default to 10) + * @param offset Beginning point in the list to retrieve from. (optional, default to 0) + * @return GetProcesses + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetProcesses getProcesses(Long limit, Long offset) throws ApiException { + ApiResponse resp = getProcessesWithHttpInfo(limit, offset); + return resp.getData(); + } + + /** + * Return all the processes for your account + * + * @param limit Number limitation for the result returned (optional, default to 10) + * @param offset Beginning point in the list to retrieve from. (optional, default to 0) + * @return ApiResponse<GetProcesses> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getProcessesWithHttpInfo(Long limit, Long offset) throws ApiException { + com.squareup.okhttp.Call call = getProcessesValidateBeforeCall(limit, offset, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Return all the processes for your account (asynchronously) + * + * @param limit Number limitation for the result returned (optional, default to 10) + * @param offset Beginning point in the list to retrieve from. (optional, default to 0) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getProcessesAsync(Long limit, Long offset, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getProcessesValidateBeforeCall(limit, offset, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } +} diff --git a/src/main/java/sibApi/ResellerApi.java b/src/main/java/sibApi/ResellerApi.java new file mode 100644 index 0000000..8d2e2b4 --- /dev/null +++ b/src/main/java/sibApi/ResellerApi.java @@ -0,0 +1,1186 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibApi; + +import sendinblue.ApiCallback; +import sendinblue.ApiClient; +import sendinblue.ApiException; +import sendinblue.ApiResponse; +import sendinblue.Configuration; +import sendinblue.Pair; +import sendinblue.ProgressRequestBody; +import sendinblue.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import sibModel.AddCredits; +import sibModel.CreateChild; +import sibModel.CreateReseller; +import sibModel.ErrorModel; +import sibModel.GetChildInfo; +import sibModel.GetChildrenList; +import sibModel.ManageIp; +import sibModel.RemainingCreditModel; +import sibModel.RemoveCredits; +import sibModel.UpdateChild; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class ResellerApi { + private ApiClient apiClient; + + public ResellerApi() { + this(Configuration.getDefaultApiClient()); + } + + public ResellerApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Build call for addCredits + * @param childAuthKey auth key of reseller's child (required) + * @param addCredits Values to post to add credit to a specific child account (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call addCreditsCall(String childAuthKey, AddCredits addCredits, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = addCredits; + + // create path and map variables + String localVarPath = "/reseller/children/{childAuthKey}/credits/add" + .replaceAll("\\{" + "childAuthKey" + "\\}", apiClient.escapeString(childAuthKey.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call addCreditsValidateBeforeCall(String childAuthKey, AddCredits addCredits, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'childAuthKey' is set + if (childAuthKey == null) { + throw new ApiException("Missing the required parameter 'childAuthKey' when calling addCredits(Async)"); + } + + // verify the required parameter 'addCredits' is set + if (addCredits == null) { + throw new ApiException("Missing the required parameter 'addCredits' when calling addCredits(Async)"); + } + + + com.squareup.okhttp.Call call = addCreditsCall(childAuthKey, addCredits, progressListener, progressRequestListener); + return call; + + } + + /** + * Add Email and/or SMS credits to a specific child account + * + * @param childAuthKey auth key of reseller's child (required) + * @param addCredits Values to post to add credit to a specific child account (required) + * @return RemainingCreditModel + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public RemainingCreditModel addCredits(String childAuthKey, AddCredits addCredits) throws ApiException { + ApiResponse resp = addCreditsWithHttpInfo(childAuthKey, addCredits); + return resp.getData(); + } + + /** + * Add Email and/or SMS credits to a specific child account + * + * @param childAuthKey auth key of reseller's child (required) + * @param addCredits Values to post to add credit to a specific child account (required) + * @return ApiResponse<RemainingCreditModel> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse addCreditsWithHttpInfo(String childAuthKey, AddCredits addCredits) throws ApiException { + com.squareup.okhttp.Call call = addCreditsValidateBeforeCall(childAuthKey, addCredits, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Add Email and/or SMS credits to a specific child account (asynchronously) + * + * @param childAuthKey auth key of reseller's child (required) + * @param addCredits Values to post to add credit to a specific child account (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call addCreditsAsync(String childAuthKey, AddCredits addCredits, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = addCreditsValidateBeforeCall(childAuthKey, addCredits, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for associateIpToChild + * @param childAuthKey auth key of reseller's child (required) + * @param ip IP to associate (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call associateIpToChildCall(String childAuthKey, ManageIp ip, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = ip; + + // create path and map variables + String localVarPath = "/reseller/children/{childAuthKey}/ips/associate" + .replaceAll("\\{" + "childAuthKey" + "\\}", apiClient.escapeString(childAuthKey.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call associateIpToChildValidateBeforeCall(String childAuthKey, ManageIp ip, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'childAuthKey' is set + if (childAuthKey == null) { + throw new ApiException("Missing the required parameter 'childAuthKey' when calling associateIpToChild(Async)"); + } + + // verify the required parameter 'ip' is set + if (ip == null) { + throw new ApiException("Missing the required parameter 'ip' when calling associateIpToChild(Async)"); + } + + + com.squareup.okhttp.Call call = associateIpToChildCall(childAuthKey, ip, progressListener, progressRequestListener); + return call; + + } + + /** + * Associate a dedicated IP to the child + * + * @param childAuthKey auth key of reseller's child (required) + * @param ip IP to associate (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void associateIpToChild(String childAuthKey, ManageIp ip) throws ApiException { + associateIpToChildWithHttpInfo(childAuthKey, ip); + } + + /** + * Associate a dedicated IP to the child + * + * @param childAuthKey auth key of reseller's child (required) + * @param ip IP to associate (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse associateIpToChildWithHttpInfo(String childAuthKey, ManageIp ip) throws ApiException { + com.squareup.okhttp.Call call = associateIpToChildValidateBeforeCall(childAuthKey, ip, null, null); + return apiClient.execute(call); + } + + /** + * Associate a dedicated IP to the child (asynchronously) + * + * @param childAuthKey auth key of reseller's child (required) + * @param ip IP to associate (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call associateIpToChildAsync(String childAuthKey, ManageIp ip, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = associateIpToChildValidateBeforeCall(childAuthKey, ip, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for createResellerChild + * @param resellerChild reseller child to add (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call createResellerChildCall(CreateChild resellerChild, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = resellerChild; + + // create path and map variables + String localVarPath = "/reseller/children"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call createResellerChildValidateBeforeCall(CreateChild resellerChild, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = createResellerChildCall(resellerChild, progressListener, progressRequestListener); + return call; + + } + + /** + * Creates a reseller child + * + * @param resellerChild reseller child to add (optional) + * @return CreateReseller + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public CreateReseller createResellerChild(CreateChild resellerChild) throws ApiException { + ApiResponse resp = createResellerChildWithHttpInfo(resellerChild); + return resp.getData(); + } + + /** + * Creates a reseller child + * + * @param resellerChild reseller child to add (optional) + * @return ApiResponse<CreateReseller> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse createResellerChildWithHttpInfo(CreateChild resellerChild) throws ApiException { + com.squareup.okhttp.Call call = createResellerChildValidateBeforeCall(resellerChild, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Creates a reseller child (asynchronously) + * + * @param resellerChild reseller child to add (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call createResellerChildAsync(CreateChild resellerChild, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = createResellerChildValidateBeforeCall(resellerChild, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for deleteResellerChild + * @param childAuthKey auth key of reseller's child (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call deleteResellerChildCall(String childAuthKey, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/reseller/children/{childAuthKey}" + .replaceAll("\\{" + "childAuthKey" + "\\}", apiClient.escapeString(childAuthKey.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call deleteResellerChildValidateBeforeCall(String childAuthKey, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'childAuthKey' is set + if (childAuthKey == null) { + throw new ApiException("Missing the required parameter 'childAuthKey' when calling deleteResellerChild(Async)"); + } + + + com.squareup.okhttp.Call call = deleteResellerChildCall(childAuthKey, progressListener, progressRequestListener); + return call; + + } + + /** + * Deletes a single reseller child based on the childAuthKey supplied + * + * @param childAuthKey auth key of reseller's child (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void deleteResellerChild(String childAuthKey) throws ApiException { + deleteResellerChildWithHttpInfo(childAuthKey); + } + + /** + * Deletes a single reseller child based on the childAuthKey supplied + * + * @param childAuthKey auth key of reseller's child (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse deleteResellerChildWithHttpInfo(String childAuthKey) throws ApiException { + com.squareup.okhttp.Call call = deleteResellerChildValidateBeforeCall(childAuthKey, null, null); + return apiClient.execute(call); + } + + /** + * Deletes a single reseller child based on the childAuthKey supplied (asynchronously) + * + * @param childAuthKey auth key of reseller's child (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call deleteResellerChildAsync(String childAuthKey, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = deleteResellerChildValidateBeforeCall(childAuthKey, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for dissociateIpFromChild + * @param childAuthKey auth key of reseller's child (required) + * @param ip IP to dissociate (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call dissociateIpFromChildCall(String childAuthKey, ManageIp ip, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = ip; + + // create path and map variables + String localVarPath = "/reseller/children/{childAuthKey}/ips/dissociate" + .replaceAll("\\{" + "childAuthKey" + "\\}", apiClient.escapeString(childAuthKey.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call dissociateIpFromChildValidateBeforeCall(String childAuthKey, ManageIp ip, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'childAuthKey' is set + if (childAuthKey == null) { + throw new ApiException("Missing the required parameter 'childAuthKey' when calling dissociateIpFromChild(Async)"); + } + + // verify the required parameter 'ip' is set + if (ip == null) { + throw new ApiException("Missing the required parameter 'ip' when calling dissociateIpFromChild(Async)"); + } + + + com.squareup.okhttp.Call call = dissociateIpFromChildCall(childAuthKey, ip, progressListener, progressRequestListener); + return call; + + } + + /** + * Dissociate a dedicated IP to the child + * + * @param childAuthKey auth key of reseller's child (required) + * @param ip IP to dissociate (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void dissociateIpFromChild(String childAuthKey, ManageIp ip) throws ApiException { + dissociateIpFromChildWithHttpInfo(childAuthKey, ip); + } + + /** + * Dissociate a dedicated IP to the child + * + * @param childAuthKey auth key of reseller's child (required) + * @param ip IP to dissociate (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse dissociateIpFromChildWithHttpInfo(String childAuthKey, ManageIp ip) throws ApiException { + com.squareup.okhttp.Call call = dissociateIpFromChildValidateBeforeCall(childAuthKey, ip, null, null); + return apiClient.execute(call); + } + + /** + * Dissociate a dedicated IP to the child (asynchronously) + * + * @param childAuthKey auth key of reseller's child (required) + * @param ip IP to dissociate (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call dissociateIpFromChildAsync(String childAuthKey, ManageIp ip, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = dissociateIpFromChildValidateBeforeCall(childAuthKey, ip, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for getChildInfo + * @param childAuthKey auth key of reseller's child (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getChildInfoCall(String childAuthKey, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/reseller/children/{childAuthKey}" + .replaceAll("\\{" + "childAuthKey" + "\\}", apiClient.escapeString(childAuthKey.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getChildInfoValidateBeforeCall(String childAuthKey, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'childAuthKey' is set + if (childAuthKey == null) { + throw new ApiException("Missing the required parameter 'childAuthKey' when calling getChildInfo(Async)"); + } + + + com.squareup.okhttp.Call call = getChildInfoCall(childAuthKey, progressListener, progressRequestListener); + return call; + + } + + /** + * Gets the info about a specific child account + * + * @param childAuthKey auth key of reseller's child (required) + * @return GetChildInfo + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetChildInfo getChildInfo(String childAuthKey) throws ApiException { + ApiResponse resp = getChildInfoWithHttpInfo(childAuthKey); + return resp.getData(); + } + + /** + * Gets the info about a specific child account + * + * @param childAuthKey auth key of reseller's child (required) + * @return ApiResponse<GetChildInfo> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getChildInfoWithHttpInfo(String childAuthKey) throws ApiException { + com.squareup.okhttp.Call call = getChildInfoValidateBeforeCall(childAuthKey, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Gets the info about a specific child account (asynchronously) + * + * @param childAuthKey auth key of reseller's child (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getChildInfoAsync(String childAuthKey, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getChildInfoValidateBeforeCall(childAuthKey, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for getResellerChilds + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getResellerChildsCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/reseller/children"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getResellerChildsValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = getResellerChildsCall(progressListener, progressRequestListener); + return call; + + } + + /** + * Gets the list of all reseller's children accounts + * + * @return GetChildrenList + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetChildrenList getResellerChilds() throws ApiException { + ApiResponse resp = getResellerChildsWithHttpInfo(); + return resp.getData(); + } + + /** + * Gets the list of all reseller's children accounts + * + * @return ApiResponse<GetChildrenList> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getResellerChildsWithHttpInfo() throws ApiException { + com.squareup.okhttp.Call call = getResellerChildsValidateBeforeCall(null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Gets the list of all reseller's children accounts (asynchronously) + * + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getResellerChildsAsync(final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getResellerChildsValidateBeforeCall(progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for removeCredits + * @param childAuthKey auth key of reseller's child (required) + * @param removeCredits Values to post to remove email or SMS credits from a specific child account (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call removeCreditsCall(String childAuthKey, RemoveCredits removeCredits, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = removeCredits; + + // create path and map variables + String localVarPath = "/reseller/children/{childAuthKey}/credits/remove" + .replaceAll("\\{" + "childAuthKey" + "\\}", apiClient.escapeString(childAuthKey.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call removeCreditsValidateBeforeCall(String childAuthKey, RemoveCredits removeCredits, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'childAuthKey' is set + if (childAuthKey == null) { + throw new ApiException("Missing the required parameter 'childAuthKey' when calling removeCredits(Async)"); + } + + // verify the required parameter 'removeCredits' is set + if (removeCredits == null) { + throw new ApiException("Missing the required parameter 'removeCredits' when calling removeCredits(Async)"); + } + + + com.squareup.okhttp.Call call = removeCreditsCall(childAuthKey, removeCredits, progressListener, progressRequestListener); + return call; + + } + + /** + * Remove Email and/or SMS credits from a specific child account + * + * @param childAuthKey auth key of reseller's child (required) + * @param removeCredits Values to post to remove email or SMS credits from a specific child account (required) + * @return RemainingCreditModel + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public RemainingCreditModel removeCredits(String childAuthKey, RemoveCredits removeCredits) throws ApiException { + ApiResponse resp = removeCreditsWithHttpInfo(childAuthKey, removeCredits); + return resp.getData(); + } + + /** + * Remove Email and/or SMS credits from a specific child account + * + * @param childAuthKey auth key of reseller's child (required) + * @param removeCredits Values to post to remove email or SMS credits from a specific child account (required) + * @return ApiResponse<RemainingCreditModel> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse removeCreditsWithHttpInfo(String childAuthKey, RemoveCredits removeCredits) throws ApiException { + com.squareup.okhttp.Call call = removeCreditsValidateBeforeCall(childAuthKey, removeCredits, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Remove Email and/or SMS credits from a specific child account (asynchronously) + * + * @param childAuthKey auth key of reseller's child (required) + * @param removeCredits Values to post to remove email or SMS credits from a specific child account (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call removeCreditsAsync(String childAuthKey, RemoveCredits removeCredits, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = removeCreditsValidateBeforeCall(childAuthKey, removeCredits, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for updateResellerChild + * @param childAuthKey auth key of reseller's child (required) + * @param resellerChild values to update in child profile (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call updateResellerChildCall(String childAuthKey, UpdateChild resellerChild, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = resellerChild; + + // create path and map variables + String localVarPath = "/reseller/children/{childAuthKey}" + .replaceAll("\\{" + "childAuthKey" + "\\}", apiClient.escapeString(childAuthKey.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call updateResellerChildValidateBeforeCall(String childAuthKey, UpdateChild resellerChild, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'childAuthKey' is set + if (childAuthKey == null) { + throw new ApiException("Missing the required parameter 'childAuthKey' when calling updateResellerChild(Async)"); + } + + // verify the required parameter 'resellerChild' is set + if (resellerChild == null) { + throw new ApiException("Missing the required parameter 'resellerChild' when calling updateResellerChild(Async)"); + } + + + com.squareup.okhttp.Call call = updateResellerChildCall(childAuthKey, resellerChild, progressListener, progressRequestListener); + return call; + + } + + /** + * Updates infos of reseller's child based on the childAuthKey supplied + * + * @param childAuthKey auth key of reseller's child (required) + * @param resellerChild values to update in child profile (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void updateResellerChild(String childAuthKey, UpdateChild resellerChild) throws ApiException { + updateResellerChildWithHttpInfo(childAuthKey, resellerChild); + } + + /** + * Updates infos of reseller's child based on the childAuthKey supplied + * + * @param childAuthKey auth key of reseller's child (required) + * @param resellerChild values to update in child profile (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse updateResellerChildWithHttpInfo(String childAuthKey, UpdateChild resellerChild) throws ApiException { + com.squareup.okhttp.Call call = updateResellerChildValidateBeforeCall(childAuthKey, resellerChild, null, null); + return apiClient.execute(call); + } + + /** + * Updates infos of reseller's child based on the childAuthKey supplied (asynchronously) + * + * @param childAuthKey auth key of reseller's child (required) + * @param resellerChild values to update in child profile (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call updateResellerChildAsync(String childAuthKey, UpdateChild resellerChild, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = updateResellerChildValidateBeforeCall(childAuthKey, resellerChild, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } +} diff --git a/src/main/java/sibApi/SendersApi.java b/src/main/java/sibApi/SendersApi.java new file mode 100644 index 0000000..75dfcc5 --- /dev/null +++ b/src/main/java/sibApi/SendersApi.java @@ -0,0 +1,783 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibApi; + +import sendinblue.ApiCallback; +import sendinblue.ApiClient; +import sendinblue.ApiException; +import sendinblue.ApiResponse; +import sendinblue.Configuration; +import sendinblue.Pair; +import sendinblue.ProgressRequestBody; +import sendinblue.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import sibModel.CreateSender; +import sibModel.CreateSenderModel; +import sibModel.ErrorModel; +import sibModel.GetIps; +import sibModel.GetIpsFromSender; +import sibModel.GetSendersList; +import sibModel.UpdateSender; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class SendersApi { + private ApiClient apiClient; + + public SendersApi() { + this(Configuration.getDefaultApiClient()); + } + + public SendersApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Build call for createSender + * @param sender sender's name (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call createSenderCall(CreateSender sender, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = sender; + + // create path and map variables + String localVarPath = "/senders"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call createSenderValidateBeforeCall(CreateSender sender, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = createSenderCall(sender, progressListener, progressRequestListener); + return call; + + } + + /** + * Create a new sender + * + * @param sender sender's name (optional) + * @return CreateSenderModel + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public CreateSenderModel createSender(CreateSender sender) throws ApiException { + ApiResponse resp = createSenderWithHttpInfo(sender); + return resp.getData(); + } + + /** + * Create a new sender + * + * @param sender sender's name (optional) + * @return ApiResponse<CreateSenderModel> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse createSenderWithHttpInfo(CreateSender sender) throws ApiException { + com.squareup.okhttp.Call call = createSenderValidateBeforeCall(sender, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Create a new sender (asynchronously) + * + * @param sender sender's name (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call createSenderAsync(CreateSender sender, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = createSenderValidateBeforeCall(sender, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for deleteSender + * @param senderId Id of the sender (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call deleteSenderCall(Long senderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/senders/{senderId}" + .replaceAll("\\{" + "senderId" + "\\}", apiClient.escapeString(senderId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call deleteSenderValidateBeforeCall(Long senderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'senderId' is set + if (senderId == null) { + throw new ApiException("Missing the required parameter 'senderId' when calling deleteSender(Async)"); + } + + + com.squareup.okhttp.Call call = deleteSenderCall(senderId, progressListener, progressRequestListener); + return call; + + } + + /** + * Delete a sender + * + * @param senderId Id of the sender (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void deleteSender(Long senderId) throws ApiException { + deleteSenderWithHttpInfo(senderId); + } + + /** + * Delete a sender + * + * @param senderId Id of the sender (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse deleteSenderWithHttpInfo(Long senderId) throws ApiException { + com.squareup.okhttp.Call call = deleteSenderValidateBeforeCall(senderId, null, null); + return apiClient.execute(call); + } + + /** + * Delete a sender (asynchronously) + * + * @param senderId Id of the sender (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call deleteSenderAsync(Long senderId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = deleteSenderValidateBeforeCall(senderId, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for getIps + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getIpsCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/senders/ips"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getIpsValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = getIpsCall(progressListener, progressRequestListener); + return call; + + } + + /** + * Return all the dedicated IPs for your account + * + * @return GetIps + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetIps getIps() throws ApiException { + ApiResponse resp = getIpsWithHttpInfo(); + return resp.getData(); + } + + /** + * Return all the dedicated IPs for your account + * + * @return ApiResponse<GetIps> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getIpsWithHttpInfo() throws ApiException { + com.squareup.okhttp.Call call = getIpsValidateBeforeCall(null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Return all the dedicated IPs for your account (asynchronously) + * + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getIpsAsync(final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getIpsValidateBeforeCall(progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for getIpsFromSender + * @param senderId Id of the sender (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getIpsFromSenderCall(Long senderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/senders/{senderId}/ips" + .replaceAll("\\{" + "senderId" + "\\}", apiClient.escapeString(senderId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getIpsFromSenderValidateBeforeCall(Long senderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'senderId' is set + if (senderId == null) { + throw new ApiException("Missing the required parameter 'senderId' when calling getIpsFromSender(Async)"); + } + + + com.squareup.okhttp.Call call = getIpsFromSenderCall(senderId, progressListener, progressRequestListener); + return call; + + } + + /** + * Return all the dedicated IPs for a sender + * + * @param senderId Id of the sender (required) + * @return GetIpsFromSender + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetIpsFromSender getIpsFromSender(Long senderId) throws ApiException { + ApiResponse resp = getIpsFromSenderWithHttpInfo(senderId); + return resp.getData(); + } + + /** + * Return all the dedicated IPs for a sender + * + * @param senderId Id of the sender (required) + * @return ApiResponse<GetIpsFromSender> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getIpsFromSenderWithHttpInfo(Long senderId) throws ApiException { + com.squareup.okhttp.Call call = getIpsFromSenderValidateBeforeCall(senderId, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Return all the dedicated IPs for a sender (asynchronously) + * + * @param senderId Id of the sender (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getIpsFromSenderAsync(Long senderId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getIpsFromSenderValidateBeforeCall(senderId, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for getSenders + * @param ip Filter your senders for a specific ip (available for dedicated IP usage only) (optional) + * @param domain Filter your senders for a specific domain (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getSendersCall(String ip, String domain, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/senders"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (ip != null) + localVarQueryParams.addAll(apiClient.parameterToPair("ip", ip)); + if (domain != null) + localVarQueryParams.addAll(apiClient.parameterToPair("domain", domain)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getSendersValidateBeforeCall(String ip, String domain, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = getSendersCall(ip, domain, progressListener, progressRequestListener); + return call; + + } + + /** + * Get the list of all your senders + * + * @param ip Filter your senders for a specific ip (available for dedicated IP usage only) (optional) + * @param domain Filter your senders for a specific domain (optional) + * @return GetSendersList + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetSendersList getSenders(String ip, String domain) throws ApiException { + ApiResponse resp = getSendersWithHttpInfo(ip, domain); + return resp.getData(); + } + + /** + * Get the list of all your senders + * + * @param ip Filter your senders for a specific ip (available for dedicated IP usage only) (optional) + * @param domain Filter your senders for a specific domain (optional) + * @return ApiResponse<GetSendersList> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getSendersWithHttpInfo(String ip, String domain) throws ApiException { + com.squareup.okhttp.Call call = getSendersValidateBeforeCall(ip, domain, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get the list of all your senders (asynchronously) + * + * @param ip Filter your senders for a specific ip (available for dedicated IP usage only) (optional) + * @param domain Filter your senders for a specific domain (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getSendersAsync(String ip, String domain, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getSendersValidateBeforeCall(ip, domain, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for updateSender + * @param senderId Id of the sender (required) + * @param sender sender's name (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call updateSenderCall(Long senderId, UpdateSender sender, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = sender; + + // create path and map variables + String localVarPath = "/senders/{senderId}" + .replaceAll("\\{" + "senderId" + "\\}", apiClient.escapeString(senderId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call updateSenderValidateBeforeCall(Long senderId, UpdateSender sender, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'senderId' is set + if (senderId == null) { + throw new ApiException("Missing the required parameter 'senderId' when calling updateSender(Async)"); + } + + + com.squareup.okhttp.Call call = updateSenderCall(senderId, sender, progressListener, progressRequestListener); + return call; + + } + + /** + * Update a sender + * + * @param senderId Id of the sender (required) + * @param sender sender's name (optional) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void updateSender(Long senderId, UpdateSender sender) throws ApiException { + updateSenderWithHttpInfo(senderId, sender); + } + + /** + * Update a sender + * + * @param senderId Id of the sender (required) + * @param sender sender's name (optional) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse updateSenderWithHttpInfo(Long senderId, UpdateSender sender) throws ApiException { + com.squareup.okhttp.Call call = updateSenderValidateBeforeCall(senderId, sender, null, null); + return apiClient.execute(call); + } + + /** + * Update a sender (asynchronously) + * + * @param senderId Id of the sender (required) + * @param sender sender's name (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call updateSenderAsync(Long senderId, UpdateSender sender, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = updateSenderValidateBeforeCall(senderId, sender, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } +} diff --git a/src/main/java/sibApi/SmsCampaignsApi.java b/src/main/java/sibApi/SmsCampaignsApi.java new file mode 100644 index 0000000..46d1cdc --- /dev/null +++ b/src/main/java/sibApi/SmsCampaignsApi.java @@ -0,0 +1,1330 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibApi; + +import sendinblue.ApiCallback; +import sendinblue.ApiClient; +import sendinblue.ApiException; +import sendinblue.ApiResponse; +import sendinblue.Configuration; +import sendinblue.Pair; +import sendinblue.ProgressRequestBody; +import sendinblue.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import sibModel.CreateModel; +import sibModel.CreateSmsCampaign; +import sibModel.CreatedProcessId; +import sibModel.ErrorModel; +import sibModel.GetSmsCampaign; +import sibModel.GetSmsCampaigns; +import sibModel.PostSendSmsTestFailed; +import sibModel.RequestSmsRecipientExport; +import sibModel.SendReport; +import sibModel.SendTestSms; +import sibModel.UpdateCampaignStatus; +import sibModel.UpdateSmsCampaign; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class SmsCampaignsApi { + private ApiClient apiClient; + + public SmsCampaignsApi() { + this(Configuration.getDefaultApiClient()); + } + + public SmsCampaignsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Build call for createSmsCampaign + * @param createSmsCampaign Values to create an SMS Campaign (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call createSmsCampaignCall(CreateSmsCampaign createSmsCampaign, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = createSmsCampaign; + + // create path and map variables + String localVarPath = "/smsCampaigns"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call createSmsCampaignValidateBeforeCall(CreateSmsCampaign createSmsCampaign, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'createSmsCampaign' is set + if (createSmsCampaign == null) { + throw new ApiException("Missing the required parameter 'createSmsCampaign' when calling createSmsCampaign(Async)"); + } + + + com.squareup.okhttp.Call call = createSmsCampaignCall(createSmsCampaign, progressListener, progressRequestListener); + return call; + + } + + /** + * Creates an SMS campaign + * + * @param createSmsCampaign Values to create an SMS Campaign (required) + * @return CreateModel + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public CreateModel createSmsCampaign(CreateSmsCampaign createSmsCampaign) throws ApiException { + ApiResponse resp = createSmsCampaignWithHttpInfo(createSmsCampaign); + return resp.getData(); + } + + /** + * Creates an SMS campaign + * + * @param createSmsCampaign Values to create an SMS Campaign (required) + * @return ApiResponse<CreateModel> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse createSmsCampaignWithHttpInfo(CreateSmsCampaign createSmsCampaign) throws ApiException { + com.squareup.okhttp.Call call = createSmsCampaignValidateBeforeCall(createSmsCampaign, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Creates an SMS campaign (asynchronously) + * + * @param createSmsCampaign Values to create an SMS Campaign (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call createSmsCampaignAsync(CreateSmsCampaign createSmsCampaign, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = createSmsCampaignValidateBeforeCall(createSmsCampaign, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for deleteSmsCampaign + * @param campaignId id of the SMS campaign (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call deleteSmsCampaignCall(Long campaignId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/smsCampaigns/{campaignId}" + .replaceAll("\\{" + "campaignId" + "\\}", apiClient.escapeString(campaignId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call deleteSmsCampaignValidateBeforeCall(Long campaignId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'campaignId' is set + if (campaignId == null) { + throw new ApiException("Missing the required parameter 'campaignId' when calling deleteSmsCampaign(Async)"); + } + + + com.squareup.okhttp.Call call = deleteSmsCampaignCall(campaignId, progressListener, progressRequestListener); + return call; + + } + + /** + * Delete the SMS campaign + * + * @param campaignId id of the SMS campaign (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void deleteSmsCampaign(Long campaignId) throws ApiException { + deleteSmsCampaignWithHttpInfo(campaignId); + } + + /** + * Delete the SMS campaign + * + * @param campaignId id of the SMS campaign (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse deleteSmsCampaignWithHttpInfo(Long campaignId) throws ApiException { + com.squareup.okhttp.Call call = deleteSmsCampaignValidateBeforeCall(campaignId, null, null); + return apiClient.execute(call); + } + + /** + * Delete the SMS campaign (asynchronously) + * + * @param campaignId id of the SMS campaign (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call deleteSmsCampaignAsync(Long campaignId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = deleteSmsCampaignValidateBeforeCall(campaignId, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for getSmsCampaign + * @param campaignId id of the SMS campaign (required) + * @param getSmsCampaign Values to update an SMS Campaign (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getSmsCampaignCall(Long campaignId, GetSmsCampaign getSmsCampaign, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = getSmsCampaign; + + // create path and map variables + String localVarPath = "/smsCampaigns/{campaignId}" + .replaceAll("\\{" + "campaignId" + "\\}", apiClient.escapeString(campaignId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getSmsCampaignValidateBeforeCall(Long campaignId, GetSmsCampaign getSmsCampaign, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'campaignId' is set + if (campaignId == null) { + throw new ApiException("Missing the required parameter 'campaignId' when calling getSmsCampaign(Async)"); + } + + // verify the required parameter 'getSmsCampaign' is set + if (getSmsCampaign == null) { + throw new ApiException("Missing the required parameter 'getSmsCampaign' when calling getSmsCampaign(Async)"); + } + + + com.squareup.okhttp.Call call = getSmsCampaignCall(campaignId, getSmsCampaign, progressListener, progressRequestListener); + return call; + + } + + /** + * Get an SMS campaign + * + * @param campaignId id of the SMS campaign (required) + * @param getSmsCampaign Values to update an SMS Campaign (required) + * @return GetSmsCampaign + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetSmsCampaign getSmsCampaign(Long campaignId, GetSmsCampaign getSmsCampaign) throws ApiException { + ApiResponse resp = getSmsCampaignWithHttpInfo(campaignId, getSmsCampaign); + return resp.getData(); + } + + /** + * Get an SMS campaign + * + * @param campaignId id of the SMS campaign (required) + * @param getSmsCampaign Values to update an SMS Campaign (required) + * @return ApiResponse<GetSmsCampaign> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getSmsCampaignWithHttpInfo(Long campaignId, GetSmsCampaign getSmsCampaign) throws ApiException { + com.squareup.okhttp.Call call = getSmsCampaignValidateBeforeCall(campaignId, getSmsCampaign, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get an SMS campaign (asynchronously) + * + * @param campaignId id of the SMS campaign (required) + * @param getSmsCampaign Values to update an SMS Campaign (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getSmsCampaignAsync(Long campaignId, GetSmsCampaign getSmsCampaign, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getSmsCampaignValidateBeforeCall(campaignId, getSmsCampaign, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for getSmsCampaigns + * @param status Status of campaign. (optional) + * @param limit Number limitation for the result returned (optional, default to 500) + * @param offset Beginning point in the list to retrieve from. (optional, default to 0) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getSmsCampaignsCall(String status, Long limit, Long offset, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/smsCampaigns"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (status != null) + localVarQueryParams.addAll(apiClient.parameterToPair("status", status)); + if (limit != null) + localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit)); + if (offset != null) + localVarQueryParams.addAll(apiClient.parameterToPair("offset", offset)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getSmsCampaignsValidateBeforeCall(String status, Long limit, Long offset, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = getSmsCampaignsCall(status, limit, offset, progressListener, progressRequestListener); + return call; + + } + + /** + * Returns the informations for all your created SMS campaigns + * + * @param status Status of campaign. (optional) + * @param limit Number limitation for the result returned (optional, default to 500) + * @param offset Beginning point in the list to retrieve from. (optional, default to 0) + * @return GetSmsCampaigns + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetSmsCampaigns getSmsCampaigns(String status, Long limit, Long offset) throws ApiException { + ApiResponse resp = getSmsCampaignsWithHttpInfo(status, limit, offset); + return resp.getData(); + } + + /** + * Returns the informations for all your created SMS campaigns + * + * @param status Status of campaign. (optional) + * @param limit Number limitation for the result returned (optional, default to 500) + * @param offset Beginning point in the list to retrieve from. (optional, default to 0) + * @return ApiResponse<GetSmsCampaigns> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getSmsCampaignsWithHttpInfo(String status, Long limit, Long offset) throws ApiException { + com.squareup.okhttp.Call call = getSmsCampaignsValidateBeforeCall(status, limit, offset, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Returns the informations for all your created SMS campaigns (asynchronously) + * + * @param status Status of campaign. (optional) + * @param limit Number limitation for the result returned (optional, default to 500) + * @param offset Beginning point in the list to retrieve from. (optional, default to 0) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getSmsCampaignsAsync(String status, Long limit, Long offset, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getSmsCampaignsValidateBeforeCall(status, limit, offset, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for requestSmsRecipientExport + * @param campaignId id of the campaign (required) + * @param recipientExport Values to send for a recipient export request (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call requestSmsRecipientExportCall(Long campaignId, RequestSmsRecipientExport recipientExport, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = recipientExport; + + // create path and map variables + String localVarPath = "/smsCampaigns/{campaignId}/exportRecipients" + .replaceAll("\\{" + "campaignId" + "\\}", apiClient.escapeString(campaignId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call requestSmsRecipientExportValidateBeforeCall(Long campaignId, RequestSmsRecipientExport recipientExport, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'campaignId' is set + if (campaignId == null) { + throw new ApiException("Missing the required parameter 'campaignId' when calling requestSmsRecipientExport(Async)"); + } + + + com.squareup.okhttp.Call call = requestSmsRecipientExportCall(campaignId, recipientExport, progressListener, progressRequestListener); + return call; + + } + + /** + * Exports the recipients of the specified campaign. + * It returns the background process ID which on completion calls the notify URL that you have set in the input. + * @param campaignId id of the campaign (required) + * @param recipientExport Values to send for a recipient export request (optional) + * @return CreatedProcessId + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public CreatedProcessId requestSmsRecipientExport(Long campaignId, RequestSmsRecipientExport recipientExport) throws ApiException { + ApiResponse resp = requestSmsRecipientExportWithHttpInfo(campaignId, recipientExport); + return resp.getData(); + } + + /** + * Exports the recipients of the specified campaign. + * It returns the background process ID which on completion calls the notify URL that you have set in the input. + * @param campaignId id of the campaign (required) + * @param recipientExport Values to send for a recipient export request (optional) + * @return ApiResponse<CreatedProcessId> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse requestSmsRecipientExportWithHttpInfo(Long campaignId, RequestSmsRecipientExport recipientExport) throws ApiException { + com.squareup.okhttp.Call call = requestSmsRecipientExportValidateBeforeCall(campaignId, recipientExport, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Exports the recipients of the specified campaign. (asynchronously) + * It returns the background process ID which on completion calls the notify URL that you have set in the input. + * @param campaignId id of the campaign (required) + * @param recipientExport Values to send for a recipient export request (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call requestSmsRecipientExportAsync(Long campaignId, RequestSmsRecipientExport recipientExport, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = requestSmsRecipientExportValidateBeforeCall(campaignId, recipientExport, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for sendSmsCampaignNow + * @param campaignId id of the campaign (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call sendSmsCampaignNowCall(Long campaignId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/smsCampaigns/{campaignId}/sendNow" + .replaceAll("\\{" + "campaignId" + "\\}", apiClient.escapeString(campaignId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call sendSmsCampaignNowValidateBeforeCall(Long campaignId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'campaignId' is set + if (campaignId == null) { + throw new ApiException("Missing the required parameter 'campaignId' when calling sendSmsCampaignNow(Async)"); + } + + + com.squareup.okhttp.Call call = sendSmsCampaignNowCall(campaignId, progressListener, progressRequestListener); + return call; + + } + + /** + * Send your SMS campaign immediately + * + * @param campaignId id of the campaign (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void sendSmsCampaignNow(Long campaignId) throws ApiException { + sendSmsCampaignNowWithHttpInfo(campaignId); + } + + /** + * Send your SMS campaign immediately + * + * @param campaignId id of the campaign (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse sendSmsCampaignNowWithHttpInfo(Long campaignId) throws ApiException { + com.squareup.okhttp.Call call = sendSmsCampaignNowValidateBeforeCall(campaignId, null, null); + return apiClient.execute(call); + } + + /** + * Send your SMS campaign immediately (asynchronously) + * + * @param campaignId id of the campaign (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call sendSmsCampaignNowAsync(Long campaignId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = sendSmsCampaignNowValidateBeforeCall(campaignId, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for sendSmsReport + * @param campaignId id of the campaign (required) + * @param sendReport Values for send a report (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call sendSmsReportCall(Long campaignId, SendReport sendReport, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = sendReport; + + // create path and map variables + String localVarPath = "/smsCampaigns/{campaignId}/sendReport" + .replaceAll("\\{" + "campaignId" + "\\}", apiClient.escapeString(campaignId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call sendSmsReportValidateBeforeCall(Long campaignId, SendReport sendReport, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'campaignId' is set + if (campaignId == null) { + throw new ApiException("Missing the required parameter 'campaignId' when calling sendSmsReport(Async)"); + } + + // verify the required parameter 'sendReport' is set + if (sendReport == null) { + throw new ApiException("Missing the required parameter 'sendReport' when calling sendSmsReport(Async)"); + } + + + com.squareup.okhttp.Call call = sendSmsReportCall(campaignId, sendReport, progressListener, progressRequestListener); + return call; + + } + + /** + * Send report of SMS campaigns + * Send report of Sent and Archived campaign, to the specified email addresses, with respective data and a pdf attachment in detail. + * @param campaignId id of the campaign (required) + * @param sendReport Values for send a report (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void sendSmsReport(Long campaignId, SendReport sendReport) throws ApiException { + sendSmsReportWithHttpInfo(campaignId, sendReport); + } + + /** + * Send report of SMS campaigns + * Send report of Sent and Archived campaign, to the specified email addresses, with respective data and a pdf attachment in detail. + * @param campaignId id of the campaign (required) + * @param sendReport Values for send a report (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse sendSmsReportWithHttpInfo(Long campaignId, SendReport sendReport) throws ApiException { + com.squareup.okhttp.Call call = sendSmsReportValidateBeforeCall(campaignId, sendReport, null, null); + return apiClient.execute(call); + } + + /** + * Send report of SMS campaigns (asynchronously) + * Send report of Sent and Archived campaign, to the specified email addresses, with respective data and a pdf attachment in detail. + * @param campaignId id of the campaign (required) + * @param sendReport Values for send a report (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call sendSmsReportAsync(Long campaignId, SendReport sendReport, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = sendSmsReportValidateBeforeCall(campaignId, sendReport, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for sendTestSms + * @param campaignId Id of the SMS campaign (required) + * @param sendTestSms Mobile number to which send the test (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call sendTestSmsCall(Long campaignId, SendTestSms sendTestSms, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = sendTestSms; + + // create path and map variables + String localVarPath = "/smsCampaigns/{campaignId}/sendTest" + .replaceAll("\\{" + "campaignId" + "\\}", apiClient.escapeString(campaignId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call sendTestSmsValidateBeforeCall(Long campaignId, SendTestSms sendTestSms, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'campaignId' is set + if (campaignId == null) { + throw new ApiException("Missing the required parameter 'campaignId' when calling sendTestSms(Async)"); + } + + // verify the required parameter 'sendTestSms' is set + if (sendTestSms == null) { + throw new ApiException("Missing the required parameter 'sendTestSms' when calling sendTestSms(Async)"); + } + + + com.squareup.okhttp.Call call = sendTestSmsCall(campaignId, sendTestSms, progressListener, progressRequestListener); + return call; + + } + + /** + * Send an SMS + * + * @param campaignId Id of the SMS campaign (required) + * @param sendTestSms Mobile number to which send the test (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void sendTestSms(Long campaignId, SendTestSms sendTestSms) throws ApiException { + sendTestSmsWithHttpInfo(campaignId, sendTestSms); + } + + /** + * Send an SMS + * + * @param campaignId Id of the SMS campaign (required) + * @param sendTestSms Mobile number to which send the test (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse sendTestSmsWithHttpInfo(Long campaignId, SendTestSms sendTestSms) throws ApiException { + com.squareup.okhttp.Call call = sendTestSmsValidateBeforeCall(campaignId, sendTestSms, null, null); + return apiClient.execute(call); + } + + /** + * Send an SMS (asynchronously) + * + * @param campaignId Id of the SMS campaign (required) + * @param sendTestSms Mobile number to which send the test (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call sendTestSmsAsync(Long campaignId, SendTestSms sendTestSms, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = sendTestSmsValidateBeforeCall(campaignId, sendTestSms, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for updateSmsCampaign + * @param campaignId id of the SMS campaign (required) + * @param updateSmsCampaign Values to update an SMS Campaign (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call updateSmsCampaignCall(Long campaignId, UpdateSmsCampaign updateSmsCampaign, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = updateSmsCampaign; + + // create path and map variables + String localVarPath = "/smsCampaigns/{campaignId}" + .replaceAll("\\{" + "campaignId" + "\\}", apiClient.escapeString(campaignId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call updateSmsCampaignValidateBeforeCall(Long campaignId, UpdateSmsCampaign updateSmsCampaign, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'campaignId' is set + if (campaignId == null) { + throw new ApiException("Missing the required parameter 'campaignId' when calling updateSmsCampaign(Async)"); + } + + // verify the required parameter 'updateSmsCampaign' is set + if (updateSmsCampaign == null) { + throw new ApiException("Missing the required parameter 'updateSmsCampaign' when calling updateSmsCampaign(Async)"); + } + + + com.squareup.okhttp.Call call = updateSmsCampaignCall(campaignId, updateSmsCampaign, progressListener, progressRequestListener); + return call; + + } + + /** + * Updates an SMS campaign + * + * @param campaignId id of the SMS campaign (required) + * @param updateSmsCampaign Values to update an SMS Campaign (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void updateSmsCampaign(Long campaignId, UpdateSmsCampaign updateSmsCampaign) throws ApiException { + updateSmsCampaignWithHttpInfo(campaignId, updateSmsCampaign); + } + + /** + * Updates an SMS campaign + * + * @param campaignId id of the SMS campaign (required) + * @param updateSmsCampaign Values to update an SMS Campaign (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse updateSmsCampaignWithHttpInfo(Long campaignId, UpdateSmsCampaign updateSmsCampaign) throws ApiException { + com.squareup.okhttp.Call call = updateSmsCampaignValidateBeforeCall(campaignId, updateSmsCampaign, null, null); + return apiClient.execute(call); + } + + /** + * Updates an SMS campaign (asynchronously) + * + * @param campaignId id of the SMS campaign (required) + * @param updateSmsCampaign Values to update an SMS Campaign (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call updateSmsCampaignAsync(Long campaignId, UpdateSmsCampaign updateSmsCampaign, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = updateSmsCampaignValidateBeforeCall(campaignId, updateSmsCampaign, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for updateSmsCampaignStatus + * @param campaignId id of the campaign (required) + * @param status Status of the campaign. (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call updateSmsCampaignStatusCall(Long campaignId, UpdateCampaignStatus status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = status; + + // create path and map variables + String localVarPath = "/smsCampaigns/{campaignId}/status" + .replaceAll("\\{" + "campaignId" + "\\}", apiClient.escapeString(campaignId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call updateSmsCampaignStatusValidateBeforeCall(Long campaignId, UpdateCampaignStatus status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'campaignId' is set + if (campaignId == null) { + throw new ApiException("Missing the required parameter 'campaignId' when calling updateSmsCampaignStatus(Async)"); + } + + // verify the required parameter 'status' is set + if (status == null) { + throw new ApiException("Missing the required parameter 'status' when calling updateSmsCampaignStatus(Async)"); + } + + + com.squareup.okhttp.Call call = updateSmsCampaignStatusCall(campaignId, status, progressListener, progressRequestListener); + return call; + + } + + /** + * Update the campaign status + * + * @param campaignId id of the campaign (required) + * @param status Status of the campaign. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void updateSmsCampaignStatus(Long campaignId, UpdateCampaignStatus status) throws ApiException { + updateSmsCampaignStatusWithHttpInfo(campaignId, status); + } + + /** + * Update the campaign status + * + * @param campaignId id of the campaign (required) + * @param status Status of the campaign. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse updateSmsCampaignStatusWithHttpInfo(Long campaignId, UpdateCampaignStatus status) throws ApiException { + com.squareup.okhttp.Call call = updateSmsCampaignStatusValidateBeforeCall(campaignId, status, null, null); + return apiClient.execute(call); + } + + /** + * Update the campaign status (asynchronously) + * + * @param campaignId id of the campaign (required) + * @param status Status of the campaign. (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call updateSmsCampaignStatusAsync(Long campaignId, UpdateCampaignStatus status, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = updateSmsCampaignStatusValidateBeforeCall(campaignId, status, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } +} diff --git a/src/main/java/sibApi/SmtpApi.java b/src/main/java/sibApi/SmtpApi.java new file mode 100644 index 0000000..441b69b --- /dev/null +++ b/src/main/java/sibApi/SmtpApi.java @@ -0,0 +1,1650 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibApi; + +import sendinblue.ApiCallback; +import sendinblue.ApiClient; +import sendinblue.ApiException; +import sendinblue.ApiResponse; +import sendinblue.Configuration; +import sendinblue.Pair; +import sendinblue.ProgressRequestBody; +import sendinblue.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import sibModel.CreateModel; +import sibModel.CreateSmtpEmail; +import sibModel.CreateSmtpTemplate; +import sibModel.DeleteHardbounces; +import sibModel.ErrorModel; +import sibModel.GetAggregatedReport; +import sibModel.GetEmailEventReport; +import sibModel.GetReports; +import sibModel.GetSmtpTemplateOverview; +import sibModel.GetSmtpTemplates; +import org.threeten.bp.LocalDate; +import sibModel.PostSendFailed; +import sibModel.SendEmail; +import sibModel.SendSmtpEmail; +import sibModel.SendTemplateEmail; +import sibModel.SendTestEmail; +import sibModel.UpdateSmtpTemplate; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class SmtpApi { + private ApiClient apiClient; + + public SmtpApi() { + this(Configuration.getDefaultApiClient()); + } + + public SmtpApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Build call for createSmtpTemplate + * @param smtpTemplate values to update in smtp template (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call createSmtpTemplateCall(CreateSmtpTemplate smtpTemplate, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = smtpTemplate; + + // create path and map variables + String localVarPath = "/smtp/templates"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call createSmtpTemplateValidateBeforeCall(CreateSmtpTemplate smtpTemplate, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'smtpTemplate' is set + if (smtpTemplate == null) { + throw new ApiException("Missing the required parameter 'smtpTemplate' when calling createSmtpTemplate(Async)"); + } + + + com.squareup.okhttp.Call call = createSmtpTemplateCall(smtpTemplate, progressListener, progressRequestListener); + return call; + + } + + /** + * Create an smtp template + * + * @param smtpTemplate values to update in smtp template (required) + * @return CreateModel + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public CreateModel createSmtpTemplate(CreateSmtpTemplate smtpTemplate) throws ApiException { + ApiResponse resp = createSmtpTemplateWithHttpInfo(smtpTemplate); + return resp.getData(); + } + + /** + * Create an smtp template + * + * @param smtpTemplate values to update in smtp template (required) + * @return ApiResponse<CreateModel> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse createSmtpTemplateWithHttpInfo(CreateSmtpTemplate smtpTemplate) throws ApiException { + com.squareup.okhttp.Call call = createSmtpTemplateValidateBeforeCall(smtpTemplate, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Create an smtp template (asynchronously) + * + * @param smtpTemplate values to update in smtp template (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call createSmtpTemplateAsync(CreateSmtpTemplate smtpTemplate, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = createSmtpTemplateValidateBeforeCall(smtpTemplate, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for deleteHardbounces + * @param deleteHardbounces values to delete hardbounces (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call deleteHardbouncesCall(DeleteHardbounces deleteHardbounces, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = deleteHardbounces; + + // create path and map variables + String localVarPath = "/smtp/deleteHardbounces"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call deleteHardbouncesValidateBeforeCall(DeleteHardbounces deleteHardbounces, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = deleteHardbouncesCall(deleteHardbounces, progressListener, progressRequestListener); + return call; + + } + + /** + * Delete hardbounces + * Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures) + * @param deleteHardbounces values to delete hardbounces (optional) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void deleteHardbounces(DeleteHardbounces deleteHardbounces) throws ApiException { + deleteHardbouncesWithHttpInfo(deleteHardbounces); + } + + /** + * Delete hardbounces + * Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures) + * @param deleteHardbounces values to delete hardbounces (optional) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse deleteHardbouncesWithHttpInfo(DeleteHardbounces deleteHardbounces) throws ApiException { + com.squareup.okhttp.Call call = deleteHardbouncesValidateBeforeCall(deleteHardbounces, null, null); + return apiClient.execute(call); + } + + /** + * Delete hardbounces (asynchronously) + * Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures) + * @param deleteHardbounces values to delete hardbounces (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call deleteHardbouncesAsync(DeleteHardbounces deleteHardbounces, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = deleteHardbouncesValidateBeforeCall(deleteHardbounces, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for deleteSmtpTemplate + * @param templateId id of the template (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call deleteSmtpTemplateCall(Long templateId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/smtp/templates/{templateId}" + .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call deleteSmtpTemplateValidateBeforeCall(Long templateId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'templateId' is set + if (templateId == null) { + throw new ApiException("Missing the required parameter 'templateId' when calling deleteSmtpTemplate(Async)"); + } + + + com.squareup.okhttp.Call call = deleteSmtpTemplateCall(templateId, progressListener, progressRequestListener); + return call; + + } + + /** + * Delete an inactive smtp template + * + * @param templateId id of the template (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void deleteSmtpTemplate(Long templateId) throws ApiException { + deleteSmtpTemplateWithHttpInfo(templateId); + } + + /** + * Delete an inactive smtp template + * + * @param templateId id of the template (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse deleteSmtpTemplateWithHttpInfo(Long templateId) throws ApiException { + com.squareup.okhttp.Call call = deleteSmtpTemplateValidateBeforeCall(templateId, null, null); + return apiClient.execute(call); + } + + /** + * Delete an inactive smtp template (asynchronously) + * + * @param templateId id of the template (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call deleteSmtpTemplateAsync(Long templateId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = deleteSmtpTemplateValidateBeforeCall(templateId, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for getAggregatedSmtpReport + * @param startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param tag Tag of the emails (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getAggregatedSmtpReportCall(LocalDate startDate, LocalDate endDate, Integer days, String tag, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/smtp/statistics/aggregatedReport"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (startDate != null) + localVarQueryParams.addAll(apiClient.parameterToPair("startDate", startDate)); + if (endDate != null) + localVarQueryParams.addAll(apiClient.parameterToPair("endDate", endDate)); + if (days != null) + localVarQueryParams.addAll(apiClient.parameterToPair("days", days)); + if (tag != null) + localVarQueryParams.addAll(apiClient.parameterToPair("tag", tag)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getAggregatedSmtpReportValidateBeforeCall(LocalDate startDate, LocalDate endDate, Integer days, String tag, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = getAggregatedSmtpReportCall(startDate, endDate, days, tag, progressListener, progressRequestListener); + return call; + + } + + /** + * Get your SMTP activity aggregated over a period of time + * + * @param startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param tag Tag of the emails (optional) + * @return GetAggregatedReport + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetAggregatedReport getAggregatedSmtpReport(LocalDate startDate, LocalDate endDate, Integer days, String tag) throws ApiException { + ApiResponse resp = getAggregatedSmtpReportWithHttpInfo(startDate, endDate, days, tag); + return resp.getData(); + } + + /** + * Get your SMTP activity aggregated over a period of time + * + * @param startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param tag Tag of the emails (optional) + * @return ApiResponse<GetAggregatedReport> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getAggregatedSmtpReportWithHttpInfo(LocalDate startDate, LocalDate endDate, Integer days, String tag) throws ApiException { + com.squareup.okhttp.Call call = getAggregatedSmtpReportValidateBeforeCall(startDate, endDate, days, tag, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get your SMTP activity aggregated over a period of time (asynchronously) + * + * @param startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param tag Tag of the emails (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getAggregatedSmtpReportAsync(LocalDate startDate, LocalDate endDate, Integer days, String tag, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getAggregatedSmtpReportValidateBeforeCall(startDate, endDate, days, tag, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for getEmailEventReport + * @param limit Number limitation for the result returned (optional, default to 50) + * @param offset Beginning point in the list to retrieve from. (optional, default to 0) + * @param startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param email Filter the report for a specific email addresses (optional) + * @param event Filter the report for a specific event type (optional) + * @param tags Filter the report for tags (serialized and urlencoded array) (optional) + * @param messageId Filter on a specific message id (optional) + * @param templateId Filter on a specific template id (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getEmailEventReportCall(Long limit, Long offset, LocalDate startDate, LocalDate endDate, Integer days, String email, String event, String tags, String messageId, Long templateId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/smtp/statistics/events"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (limit != null) + localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit)); + if (offset != null) + localVarQueryParams.addAll(apiClient.parameterToPair("offset", offset)); + if (startDate != null) + localVarQueryParams.addAll(apiClient.parameterToPair("startDate", startDate)); + if (endDate != null) + localVarQueryParams.addAll(apiClient.parameterToPair("endDate", endDate)); + if (days != null) + localVarQueryParams.addAll(apiClient.parameterToPair("days", days)); + if (email != null) + localVarQueryParams.addAll(apiClient.parameterToPair("email", email)); + if (event != null) + localVarQueryParams.addAll(apiClient.parameterToPair("event", event)); + if (tags != null) + localVarQueryParams.addAll(apiClient.parameterToPair("tags", tags)); + if (messageId != null) + localVarQueryParams.addAll(apiClient.parameterToPair("messageId", messageId)); + if (templateId != null) + localVarQueryParams.addAll(apiClient.parameterToPair("templateId", templateId)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getEmailEventReportValidateBeforeCall(Long limit, Long offset, LocalDate startDate, LocalDate endDate, Integer days, String email, String event, String tags, String messageId, Long templateId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = getEmailEventReportCall(limit, offset, startDate, endDate, days, email, event, tags, messageId, templateId, progressListener, progressRequestListener); + return call; + + } + + /** + * Get all your SMTP activity (unaggregated events) + * + * @param limit Number limitation for the result returned (optional, default to 50) + * @param offset Beginning point in the list to retrieve from. (optional, default to 0) + * @param startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param email Filter the report for a specific email addresses (optional) + * @param event Filter the report for a specific event type (optional) + * @param tags Filter the report for tags (serialized and urlencoded array) (optional) + * @param messageId Filter on a specific message id (optional) + * @param templateId Filter on a specific template id (optional) + * @return GetEmailEventReport + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetEmailEventReport getEmailEventReport(Long limit, Long offset, LocalDate startDate, LocalDate endDate, Integer days, String email, String event, String tags, String messageId, Long templateId) throws ApiException { + ApiResponse resp = getEmailEventReportWithHttpInfo(limit, offset, startDate, endDate, days, email, event, tags, messageId, templateId); + return resp.getData(); + } + + /** + * Get all your SMTP activity (unaggregated events) + * + * @param limit Number limitation for the result returned (optional, default to 50) + * @param offset Beginning point in the list to retrieve from. (optional, default to 0) + * @param startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param email Filter the report for a specific email addresses (optional) + * @param event Filter the report for a specific event type (optional) + * @param tags Filter the report for tags (serialized and urlencoded array) (optional) + * @param messageId Filter on a specific message id (optional) + * @param templateId Filter on a specific template id (optional) + * @return ApiResponse<GetEmailEventReport> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getEmailEventReportWithHttpInfo(Long limit, Long offset, LocalDate startDate, LocalDate endDate, Integer days, String email, String event, String tags, String messageId, Long templateId) throws ApiException { + com.squareup.okhttp.Call call = getEmailEventReportValidateBeforeCall(limit, offset, startDate, endDate, days, email, event, tags, messageId, templateId, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get all your SMTP activity (unaggregated events) (asynchronously) + * + * @param limit Number limitation for the result returned (optional, default to 50) + * @param offset Beginning point in the list to retrieve from. (optional, default to 0) + * @param startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + * @param endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + * @param days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param email Filter the report for a specific email addresses (optional) + * @param event Filter the report for a specific event type (optional) + * @param tags Filter the report for tags (serialized and urlencoded array) (optional) + * @param messageId Filter on a specific message id (optional) + * @param templateId Filter on a specific template id (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getEmailEventReportAsync(Long limit, Long offset, LocalDate startDate, LocalDate endDate, Integer days, String email, String event, String tags, String messageId, Long templateId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getEmailEventReportValidateBeforeCall(limit, offset, startDate, endDate, days, email, event, tags, messageId, templateId, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for getSmtpReport + * @param limit Number of documents returned per page (optional, default to 50) + * @param offset Index of the first document on the page (optional, default to 0) + * @param startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) (optional) + * @param endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) (optional) + * @param days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param tag Tag of the emails (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getSmtpReportCall(Long limit, Long offset, LocalDate startDate, LocalDate endDate, Integer days, String tag, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/smtp/statistics/reports"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (limit != null) + localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit)); + if (offset != null) + localVarQueryParams.addAll(apiClient.parameterToPair("offset", offset)); + if (startDate != null) + localVarQueryParams.addAll(apiClient.parameterToPair("startDate", startDate)); + if (endDate != null) + localVarQueryParams.addAll(apiClient.parameterToPair("endDate", endDate)); + if (days != null) + localVarQueryParams.addAll(apiClient.parameterToPair("days", days)); + if (tag != null) + localVarQueryParams.addAll(apiClient.parameterToPair("tag", tag)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getSmtpReportValidateBeforeCall(Long limit, Long offset, LocalDate startDate, LocalDate endDate, Integer days, String tag, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = getSmtpReportCall(limit, offset, startDate, endDate, days, tag, progressListener, progressRequestListener); + return call; + + } + + /** + * Get your SMTP activity aggregated per day + * + * @param limit Number of documents returned per page (optional, default to 50) + * @param offset Index of the first document on the page (optional, default to 0) + * @param startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) (optional) + * @param endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) (optional) + * @param days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param tag Tag of the emails (optional) + * @return GetReports + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetReports getSmtpReport(Long limit, Long offset, LocalDate startDate, LocalDate endDate, Integer days, String tag) throws ApiException { + ApiResponse resp = getSmtpReportWithHttpInfo(limit, offset, startDate, endDate, days, tag); + return resp.getData(); + } + + /** + * Get your SMTP activity aggregated per day + * + * @param limit Number of documents returned per page (optional, default to 50) + * @param offset Index of the first document on the page (optional, default to 0) + * @param startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) (optional) + * @param endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) (optional) + * @param days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param tag Tag of the emails (optional) + * @return ApiResponse<GetReports> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getSmtpReportWithHttpInfo(Long limit, Long offset, LocalDate startDate, LocalDate endDate, Integer days, String tag) throws ApiException { + com.squareup.okhttp.Call call = getSmtpReportValidateBeforeCall(limit, offset, startDate, endDate, days, tag, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get your SMTP activity aggregated per day (asynchronously) + * + * @param limit Number of documents returned per page (optional, default to 50) + * @param offset Index of the first document on the page (optional, default to 0) + * @param startDate Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) (optional) + * @param endDate Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) (optional) + * @param days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param tag Tag of the emails (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getSmtpReportAsync(Long limit, Long offset, LocalDate startDate, LocalDate endDate, Integer days, String tag, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getSmtpReportValidateBeforeCall(limit, offset, startDate, endDate, days, tag, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for getSmtpTemplate + * @param templateId id of the template (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getSmtpTemplateCall(Long templateId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/smtp/templates/{templateId}" + .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getSmtpTemplateValidateBeforeCall(Long templateId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'templateId' is set + if (templateId == null) { + throw new ApiException("Missing the required parameter 'templateId' when calling getSmtpTemplate(Async)"); + } + + + com.squareup.okhttp.Call call = getSmtpTemplateCall(templateId, progressListener, progressRequestListener); + return call; + + } + + /** + * Returns the template informations + * + * @param templateId id of the template (required) + * @return GetSmtpTemplateOverview + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetSmtpTemplateOverview getSmtpTemplate(Long templateId) throws ApiException { + ApiResponse resp = getSmtpTemplateWithHttpInfo(templateId); + return resp.getData(); + } + + /** + * Returns the template informations + * + * @param templateId id of the template (required) + * @return ApiResponse<GetSmtpTemplateOverview> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getSmtpTemplateWithHttpInfo(Long templateId) throws ApiException { + com.squareup.okhttp.Call call = getSmtpTemplateValidateBeforeCall(templateId, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Returns the template informations (asynchronously) + * + * @param templateId id of the template (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getSmtpTemplateAsync(Long templateId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getSmtpTemplateValidateBeforeCall(templateId, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for getSmtpTemplates + * @param templateStatus Filter on the status of the template. Active = true, inactive = false (optional) + * @param limit Number of documents returned per page (optional, default to 50) + * @param offset Index of the first document in the page (optional, default to 0) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getSmtpTemplatesCall(Boolean templateStatus, Long limit, Long offset, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/smtp/templates"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (templateStatus != null) + localVarQueryParams.addAll(apiClient.parameterToPair("templateStatus", templateStatus)); + if (limit != null) + localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit)); + if (offset != null) + localVarQueryParams.addAll(apiClient.parameterToPair("offset", offset)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getSmtpTemplatesValidateBeforeCall(Boolean templateStatus, Long limit, Long offset, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = getSmtpTemplatesCall(templateStatus, limit, offset, progressListener, progressRequestListener); + return call; + + } + + /** + * Get the list of SMTP templates + * + * @param templateStatus Filter on the status of the template. Active = true, inactive = false (optional) + * @param limit Number of documents returned per page (optional, default to 50) + * @param offset Index of the first document in the page (optional, default to 0) + * @return GetSmtpTemplates + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetSmtpTemplates getSmtpTemplates(Boolean templateStatus, Long limit, Long offset) throws ApiException { + ApiResponse resp = getSmtpTemplatesWithHttpInfo(templateStatus, limit, offset); + return resp.getData(); + } + + /** + * Get the list of SMTP templates + * + * @param templateStatus Filter on the status of the template. Active = true, inactive = false (optional) + * @param limit Number of documents returned per page (optional, default to 50) + * @param offset Index of the first document in the page (optional, default to 0) + * @return ApiResponse<GetSmtpTemplates> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getSmtpTemplatesWithHttpInfo(Boolean templateStatus, Long limit, Long offset) throws ApiException { + com.squareup.okhttp.Call call = getSmtpTemplatesValidateBeforeCall(templateStatus, limit, offset, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get the list of SMTP templates (asynchronously) + * + * @param templateStatus Filter on the status of the template. Active = true, inactive = false (optional) + * @param limit Number of documents returned per page (optional, default to 50) + * @param offset Index of the first document in the page (optional, default to 0) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getSmtpTemplatesAsync(Boolean templateStatus, Long limit, Long offset, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getSmtpTemplatesValidateBeforeCall(templateStatus, limit, offset, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for sendTemplate + * @param templateId Id of the template (required) + * @param sendEmail (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call sendTemplateCall(Long templateId, SendEmail sendEmail, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = sendEmail; + + // create path and map variables + String localVarPath = "/smtp/templates/{templateId}/send" + .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call sendTemplateValidateBeforeCall(Long templateId, SendEmail sendEmail, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'templateId' is set + if (templateId == null) { + throw new ApiException("Missing the required parameter 'templateId' when calling sendTemplate(Async)"); + } + + // verify the required parameter 'sendEmail' is set + if (sendEmail == null) { + throw new ApiException("Missing the required parameter 'sendEmail' when calling sendTemplate(Async)"); + } + + + com.squareup.okhttp.Call call = sendTemplateCall(templateId, sendEmail, progressListener, progressRequestListener); + return call; + + } + + /** + * Send a template + * + * @param templateId Id of the template (required) + * @param sendEmail (required) + * @return SendTemplateEmail + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public SendTemplateEmail sendTemplate(Long templateId, SendEmail sendEmail) throws ApiException { + ApiResponse resp = sendTemplateWithHttpInfo(templateId, sendEmail); + return resp.getData(); + } + + /** + * Send a template + * + * @param templateId Id of the template (required) + * @param sendEmail (required) + * @return ApiResponse<SendTemplateEmail> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse sendTemplateWithHttpInfo(Long templateId, SendEmail sendEmail) throws ApiException { + com.squareup.okhttp.Call call = sendTemplateValidateBeforeCall(templateId, sendEmail, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Send a template (asynchronously) + * + * @param templateId Id of the template (required) + * @param sendEmail (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call sendTemplateAsync(Long templateId, SendEmail sendEmail, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = sendTemplateValidateBeforeCall(templateId, sendEmail, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for sendTestTemplate + * @param templateId Id of the template (required) + * @param sendTestEmail (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call sendTestTemplateCall(Long templateId, SendTestEmail sendTestEmail, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = sendTestEmail; + + // create path and map variables + String localVarPath = "/smtp/templates/{templateId}/sendTest" + .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call sendTestTemplateValidateBeforeCall(Long templateId, SendTestEmail sendTestEmail, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'templateId' is set + if (templateId == null) { + throw new ApiException("Missing the required parameter 'templateId' when calling sendTestTemplate(Async)"); + } + + // verify the required parameter 'sendTestEmail' is set + if (sendTestEmail == null) { + throw new ApiException("Missing the required parameter 'sendTestEmail' when calling sendTestTemplate(Async)"); + } + + + com.squareup.okhttp.Call call = sendTestTemplateCall(templateId, sendTestEmail, progressListener, progressRequestListener); + return call; + + } + + /** + * Send a template to your test list + * + * @param templateId Id of the template (required) + * @param sendTestEmail (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void sendTestTemplate(Long templateId, SendTestEmail sendTestEmail) throws ApiException { + sendTestTemplateWithHttpInfo(templateId, sendTestEmail); + } + + /** + * Send a template to your test list + * + * @param templateId Id of the template (required) + * @param sendTestEmail (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse sendTestTemplateWithHttpInfo(Long templateId, SendTestEmail sendTestEmail) throws ApiException { + com.squareup.okhttp.Call call = sendTestTemplateValidateBeforeCall(templateId, sendTestEmail, null, null); + return apiClient.execute(call); + } + + /** + * Send a template to your test list (asynchronously) + * + * @param templateId Id of the template (required) + * @param sendTestEmail (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call sendTestTemplateAsync(Long templateId, SendTestEmail sendTestEmail, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = sendTestTemplateValidateBeforeCall(templateId, sendTestEmail, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for sendTransacEmail + * @param sendSmtpEmail Values to send a transactional email (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call sendTransacEmailCall(SendSmtpEmail sendSmtpEmail, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = sendSmtpEmail; + + // create path and map variables + String localVarPath = "/smtp/email"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call sendTransacEmailValidateBeforeCall(SendSmtpEmail sendSmtpEmail, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'sendSmtpEmail' is set + if (sendSmtpEmail == null) { + throw new ApiException("Missing the required parameter 'sendSmtpEmail' when calling sendTransacEmail(Async)"); + } + + + com.squareup.okhttp.Call call = sendTransacEmailCall(sendSmtpEmail, progressListener, progressRequestListener); + return call; + + } + + /** + * Send a transactional email + * + * @param sendSmtpEmail Values to send a transactional email (required) + * @return CreateSmtpEmail + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public CreateSmtpEmail sendTransacEmail(SendSmtpEmail sendSmtpEmail) throws ApiException { + ApiResponse resp = sendTransacEmailWithHttpInfo(sendSmtpEmail); + return resp.getData(); + } + + /** + * Send a transactional email + * + * @param sendSmtpEmail Values to send a transactional email (required) + * @return ApiResponse<CreateSmtpEmail> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse sendTransacEmailWithHttpInfo(SendSmtpEmail sendSmtpEmail) throws ApiException { + com.squareup.okhttp.Call call = sendTransacEmailValidateBeforeCall(sendSmtpEmail, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Send a transactional email (asynchronously) + * + * @param sendSmtpEmail Values to send a transactional email (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call sendTransacEmailAsync(SendSmtpEmail sendSmtpEmail, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = sendTransacEmailValidateBeforeCall(sendSmtpEmail, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for updateSmtpTemplate + * @param templateId id of the template (required) + * @param smtpTemplate values to update in smtp template (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call updateSmtpTemplateCall(Long templateId, UpdateSmtpTemplate smtpTemplate, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = smtpTemplate; + + // create path and map variables + String localVarPath = "/smtp/templates/{templateId}" + .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call updateSmtpTemplateValidateBeforeCall(Long templateId, UpdateSmtpTemplate smtpTemplate, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'templateId' is set + if (templateId == null) { + throw new ApiException("Missing the required parameter 'templateId' when calling updateSmtpTemplate(Async)"); + } + + // verify the required parameter 'smtpTemplate' is set + if (smtpTemplate == null) { + throw new ApiException("Missing the required parameter 'smtpTemplate' when calling updateSmtpTemplate(Async)"); + } + + + com.squareup.okhttp.Call call = updateSmtpTemplateCall(templateId, smtpTemplate, progressListener, progressRequestListener); + return call; + + } + + /** + * Updates an smtp templates + * + * @param templateId id of the template (required) + * @param smtpTemplate values to update in smtp template (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void updateSmtpTemplate(Long templateId, UpdateSmtpTemplate smtpTemplate) throws ApiException { + updateSmtpTemplateWithHttpInfo(templateId, smtpTemplate); + } + + /** + * Updates an smtp templates + * + * @param templateId id of the template (required) + * @param smtpTemplate values to update in smtp template (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse updateSmtpTemplateWithHttpInfo(Long templateId, UpdateSmtpTemplate smtpTemplate) throws ApiException { + com.squareup.okhttp.Call call = updateSmtpTemplateValidateBeforeCall(templateId, smtpTemplate, null, null); + return apiClient.execute(call); + } + + /** + * Updates an smtp templates (asynchronously) + * + * @param templateId id of the template (required) + * @param smtpTemplate values to update in smtp template (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call updateSmtpTemplateAsync(Long templateId, UpdateSmtpTemplate smtpTemplate, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = updateSmtpTemplateValidateBeforeCall(templateId, smtpTemplate, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } +} diff --git a/src/main/java/sibApi/TransactionalSmsApi.java b/src/main/java/sibApi/TransactionalSmsApi.java new file mode 100644 index 0000000..0290e21 --- /dev/null +++ b/src/main/java/sibApi/TransactionalSmsApi.java @@ -0,0 +1,620 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibApi; + +import sendinblue.ApiCallback; +import sendinblue.ApiClient; +import sendinblue.ApiException; +import sendinblue.ApiResponse; +import sendinblue.Configuration; +import sendinblue.Pair; +import sendinblue.ProgressRequestBody; +import sendinblue.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import sibModel.ErrorModel; +import sibModel.GetSmsEventReport; +import sibModel.GetTransacAggregatedSmsReport; +import sibModel.GetTransacSmsReport; +import org.threeten.bp.LocalDate; +import sibModel.SendSms; +import sibModel.SendTransacSms; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class TransactionalSmsApi { + private ApiClient apiClient; + + public TransactionalSmsApi() { + this(Configuration.getDefaultApiClient()); + } + + public TransactionalSmsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Build call for getSmsEvents + * @param limit Number of documents per page (optional, default to 50) + * @param startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param offset Index of the first document of the page (optional, default to 0) + * @param days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param phoneNumber Filter the report for a specific phone number (optional) + * @param event Filter the report for specific events (optional) + * @param tags Filter the report for specific tags passed as a serialized urlencoded array (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getSmsEventsCall(Long limit, LocalDate startDate, LocalDate endDate, Long offset, Integer days, String phoneNumber, String event, String tags, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/transactionalSMS/statistics/events"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (limit != null) + localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit)); + if (startDate != null) + localVarQueryParams.addAll(apiClient.parameterToPair("startDate", startDate)); + if (endDate != null) + localVarQueryParams.addAll(apiClient.parameterToPair("endDate", endDate)); + if (offset != null) + localVarQueryParams.addAll(apiClient.parameterToPair("offset", offset)); + if (days != null) + localVarQueryParams.addAll(apiClient.parameterToPair("days", days)); + if (phoneNumber != null) + localVarQueryParams.addAll(apiClient.parameterToPair("phoneNumber", phoneNumber)); + if (event != null) + localVarQueryParams.addAll(apiClient.parameterToPair("event", event)); + if (tags != null) + localVarQueryParams.addAll(apiClient.parameterToPair("tags", tags)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getSmsEventsValidateBeforeCall(Long limit, LocalDate startDate, LocalDate endDate, Long offset, Integer days, String phoneNumber, String event, String tags, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = getSmsEventsCall(limit, startDate, endDate, offset, days, phoneNumber, event, tags, progressListener, progressRequestListener); + return call; + + } + + /** + * Get all the SMS activity (unaggregated events) + * + * @param limit Number of documents per page (optional, default to 50) + * @param startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param offset Index of the first document of the page (optional, default to 0) + * @param days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param phoneNumber Filter the report for a specific phone number (optional) + * @param event Filter the report for specific events (optional) + * @param tags Filter the report for specific tags passed as a serialized urlencoded array (optional) + * @return GetSmsEventReport + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetSmsEventReport getSmsEvents(Long limit, LocalDate startDate, LocalDate endDate, Long offset, Integer days, String phoneNumber, String event, String tags) throws ApiException { + ApiResponse resp = getSmsEventsWithHttpInfo(limit, startDate, endDate, offset, days, phoneNumber, event, tags); + return resp.getData(); + } + + /** + * Get all the SMS activity (unaggregated events) + * + * @param limit Number of documents per page (optional, default to 50) + * @param startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param offset Index of the first document of the page (optional, default to 0) + * @param days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param phoneNumber Filter the report for a specific phone number (optional) + * @param event Filter the report for specific events (optional) + * @param tags Filter the report for specific tags passed as a serialized urlencoded array (optional) + * @return ApiResponse<GetSmsEventReport> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getSmsEventsWithHttpInfo(Long limit, LocalDate startDate, LocalDate endDate, Long offset, Integer days, String phoneNumber, String event, String tags) throws ApiException { + com.squareup.okhttp.Call call = getSmsEventsValidateBeforeCall(limit, startDate, endDate, offset, days, phoneNumber, event, tags, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get all the SMS activity (unaggregated events) (asynchronously) + * + * @param limit Number of documents per page (optional, default to 50) + * @param startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param offset Index of the first document of the page (optional, default to 0) + * @param days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param phoneNumber Filter the report for a specific phone number (optional) + * @param event Filter the report for specific events (optional) + * @param tags Filter the report for specific tags passed as a serialized urlencoded array (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getSmsEventsAsync(Long limit, LocalDate startDate, LocalDate endDate, Long offset, Integer days, String phoneNumber, String event, String tags, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getSmsEventsValidateBeforeCall(limit, startDate, endDate, offset, days, phoneNumber, event, tags, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for getTransacAggregatedSmsReport + * @param startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param days Number of days in the past including today (positive integer). Not compatible with startDate and endDate (optional) + * @param tag Filter on a tag (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getTransacAggregatedSmsReportCall(LocalDate startDate, LocalDate endDate, Integer days, String tag, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/transactionalSMS/statistics/aggregatedReport"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (startDate != null) + localVarQueryParams.addAll(apiClient.parameterToPair("startDate", startDate)); + if (endDate != null) + localVarQueryParams.addAll(apiClient.parameterToPair("endDate", endDate)); + if (days != null) + localVarQueryParams.addAll(apiClient.parameterToPair("days", days)); + if (tag != null) + localVarQueryParams.addAll(apiClient.parameterToPair("tag", tag)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getTransacAggregatedSmsReportValidateBeforeCall(LocalDate startDate, LocalDate endDate, Integer days, String tag, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = getTransacAggregatedSmsReportCall(startDate, endDate, days, tag, progressListener, progressRequestListener); + return call; + + } + + /** + * Get your SMS activity aggregated over a period of time + * + * @param startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param days Number of days in the past including today (positive integer). Not compatible with startDate and endDate (optional) + * @param tag Filter on a tag (optional) + * @return GetTransacAggregatedSmsReport + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetTransacAggregatedSmsReport getTransacAggregatedSmsReport(LocalDate startDate, LocalDate endDate, Integer days, String tag) throws ApiException { + ApiResponse resp = getTransacAggregatedSmsReportWithHttpInfo(startDate, endDate, days, tag); + return resp.getData(); + } + + /** + * Get your SMS activity aggregated over a period of time + * + * @param startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param days Number of days in the past including today (positive integer). Not compatible with startDate and endDate (optional) + * @param tag Filter on a tag (optional) + * @return ApiResponse<GetTransacAggregatedSmsReport> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getTransacAggregatedSmsReportWithHttpInfo(LocalDate startDate, LocalDate endDate, Integer days, String tag) throws ApiException { + com.squareup.okhttp.Call call = getTransacAggregatedSmsReportValidateBeforeCall(startDate, endDate, days, tag, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get your SMS activity aggregated over a period of time (asynchronously) + * + * @param startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param days Number of days in the past including today (positive integer). Not compatible with startDate and endDate (optional) + * @param tag Filter on a tag (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getTransacAggregatedSmsReportAsync(LocalDate startDate, LocalDate endDate, Integer days, String tag, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getTransacAggregatedSmsReportValidateBeforeCall(startDate, endDate, days, tag, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for getTransacSmsReport + * @param startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param tag Filter on a tag (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getTransacSmsReportCall(LocalDate startDate, LocalDate endDate, Integer days, String tag, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/transactionalSMS/statistics/reports"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (startDate != null) + localVarQueryParams.addAll(apiClient.parameterToPair("startDate", startDate)); + if (endDate != null) + localVarQueryParams.addAll(apiClient.parameterToPair("endDate", endDate)); + if (days != null) + localVarQueryParams.addAll(apiClient.parameterToPair("days", days)); + if (tag != null) + localVarQueryParams.addAll(apiClient.parameterToPair("tag", tag)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getTransacSmsReportValidateBeforeCall(LocalDate startDate, LocalDate endDate, Integer days, String tag, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = getTransacSmsReportCall(startDate, endDate, days, tag, progressListener, progressRequestListener); + return call; + + } + + /** + * Get your SMS activity aggregated per day + * + * @param startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param tag Filter on a tag (optional) + * @return GetTransacSmsReport + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetTransacSmsReport getTransacSmsReport(LocalDate startDate, LocalDate endDate, Integer days, String tag) throws ApiException { + ApiResponse resp = getTransacSmsReportWithHttpInfo(startDate, endDate, days, tag); + return resp.getData(); + } + + /** + * Get your SMS activity aggregated per day + * + * @param startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param tag Filter on a tag (optional) + * @return ApiResponse<GetTransacSmsReport> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getTransacSmsReportWithHttpInfo(LocalDate startDate, LocalDate endDate, Integer days, String tag) throws ApiException { + com.squareup.okhttp.Call call = getTransacSmsReportValidateBeforeCall(startDate, endDate, days, tag, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get your SMS activity aggregated per day (asynchronously) + * + * @param startDate Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + * @param endDate Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + * @param days Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + * @param tag Filter on a tag (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getTransacSmsReportAsync(LocalDate startDate, LocalDate endDate, Integer days, String tag, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getTransacSmsReportValidateBeforeCall(startDate, endDate, days, tag, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for sendTransacSms + * @param sendTransacSms Values to send a transactional SMS (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call sendTransacSmsCall(SendTransacSms sendTransacSms, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = sendTransacSms; + + // create path and map variables + String localVarPath = "/transactionalSMS/sms"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call sendTransacSmsValidateBeforeCall(SendTransacSms sendTransacSms, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'sendTransacSms' is set + if (sendTransacSms == null) { + throw new ApiException("Missing the required parameter 'sendTransacSms' when calling sendTransacSms(Async)"); + } + + + com.squareup.okhttp.Call call = sendTransacSmsCall(sendTransacSms, progressListener, progressRequestListener); + return call; + + } + + /** + * Send the SMS campaign to the specified mobile number + * + * @param sendTransacSms Values to send a transactional SMS (required) + * @return SendSms + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public SendSms sendTransacSms(SendTransacSms sendTransacSms) throws ApiException { + ApiResponse resp = sendTransacSmsWithHttpInfo(sendTransacSms); + return resp.getData(); + } + + /** + * Send the SMS campaign to the specified mobile number + * + * @param sendTransacSms Values to send a transactional SMS (required) + * @return ApiResponse<SendSms> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse sendTransacSmsWithHttpInfo(SendTransacSms sendTransacSms) throws ApiException { + com.squareup.okhttp.Call call = sendTransacSmsValidateBeforeCall(sendTransacSms, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Send the SMS campaign to the specified mobile number (asynchronously) + * + * @param sendTransacSms Values to send a transactional SMS (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call sendTransacSmsAsync(SendTransacSms sendTransacSms, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = sendTransacSmsValidateBeforeCall(sendTransacSms, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } +} diff --git a/src/main/java/sibApi/WebhooksApi.java b/src/main/java/sibApi/WebhooksApi.java new file mode 100644 index 0000000..35bba27 --- /dev/null +++ b/src/main/java/sibApi/WebhooksApi.java @@ -0,0 +1,673 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibApi; + +import sendinblue.ApiCallback; +import sendinblue.ApiClient; +import sendinblue.ApiException; +import sendinblue.ApiResponse; +import sendinblue.Configuration; +import sendinblue.Pair; +import sendinblue.ProgressRequestBody; +import sendinblue.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import sibModel.CreateModel; +import sibModel.CreateWebhook; +import sibModel.ErrorModel; +import sibModel.GetWebhook; +import sibModel.GetWebhooks; +import sibModel.UpdateWebhook; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class WebhooksApi { + private ApiClient apiClient; + + public WebhooksApi() { + this(Configuration.getDefaultApiClient()); + } + + public WebhooksApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Build call for createWebhook + * @param createWebhook Values to create a webhook (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call createWebhookCall(CreateWebhook createWebhook, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = createWebhook; + + // create path and map variables + String localVarPath = "/webhooks"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call createWebhookValidateBeforeCall(CreateWebhook createWebhook, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'createWebhook' is set + if (createWebhook == null) { + throw new ApiException("Missing the required parameter 'createWebhook' when calling createWebhook(Async)"); + } + + + com.squareup.okhttp.Call call = createWebhookCall(createWebhook, progressListener, progressRequestListener); + return call; + + } + + /** + * Create a webhook + * + * @param createWebhook Values to create a webhook (required) + * @return CreateModel + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public CreateModel createWebhook(CreateWebhook createWebhook) throws ApiException { + ApiResponse resp = createWebhookWithHttpInfo(createWebhook); + return resp.getData(); + } + + /** + * Create a webhook + * + * @param createWebhook Values to create a webhook (required) + * @return ApiResponse<CreateModel> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse createWebhookWithHttpInfo(CreateWebhook createWebhook) throws ApiException { + com.squareup.okhttp.Call call = createWebhookValidateBeforeCall(createWebhook, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Create a webhook (asynchronously) + * + * @param createWebhook Values to create a webhook (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call createWebhookAsync(CreateWebhook createWebhook, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = createWebhookValidateBeforeCall(createWebhook, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for deleteWebhook + * @param webhookId Id of the webhook (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call deleteWebhookCall(Long webhookId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/webhooks/{webhookId}" + .replaceAll("\\{" + "webhookId" + "\\}", apiClient.escapeString(webhookId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call deleteWebhookValidateBeforeCall(Long webhookId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'webhookId' is set + if (webhookId == null) { + throw new ApiException("Missing the required parameter 'webhookId' when calling deleteWebhook(Async)"); + } + + + com.squareup.okhttp.Call call = deleteWebhookCall(webhookId, progressListener, progressRequestListener); + return call; + + } + + /** + * Delete a webhook + * + * @param webhookId Id of the webhook (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void deleteWebhook(Long webhookId) throws ApiException { + deleteWebhookWithHttpInfo(webhookId); + } + + /** + * Delete a webhook + * + * @param webhookId Id of the webhook (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse deleteWebhookWithHttpInfo(Long webhookId) throws ApiException { + com.squareup.okhttp.Call call = deleteWebhookValidateBeforeCall(webhookId, null, null); + return apiClient.execute(call); + } + + /** + * Delete a webhook (asynchronously) + * + * @param webhookId Id of the webhook (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call deleteWebhookAsync(Long webhookId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = deleteWebhookValidateBeforeCall(webhookId, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for getWebhook + * @param webhookId Id of the webhook (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getWebhookCall(Long webhookId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/webhooks/{webhookId}" + .replaceAll("\\{" + "webhookId" + "\\}", apiClient.escapeString(webhookId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getWebhookValidateBeforeCall(Long webhookId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'webhookId' is set + if (webhookId == null) { + throw new ApiException("Missing the required parameter 'webhookId' when calling getWebhook(Async)"); + } + + + com.squareup.okhttp.Call call = getWebhookCall(webhookId, progressListener, progressRequestListener); + return call; + + } + + /** + * Get a webhook details + * + * @param webhookId Id of the webhook (required) + * @return GetWebhook + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetWebhook getWebhook(Long webhookId) throws ApiException { + ApiResponse resp = getWebhookWithHttpInfo(webhookId); + return resp.getData(); + } + + /** + * Get a webhook details + * + * @param webhookId Id of the webhook (required) + * @return ApiResponse<GetWebhook> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getWebhookWithHttpInfo(Long webhookId) throws ApiException { + com.squareup.okhttp.Call call = getWebhookValidateBeforeCall(webhookId, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get a webhook details (asynchronously) + * + * @param webhookId Id of the webhook (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getWebhookAsync(Long webhookId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getWebhookValidateBeforeCall(webhookId, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for getWebhooks + * @param type Filter on webhook type (optional, default to transactional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getWebhooksCall(String type, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/webhooks"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (type != null) + localVarQueryParams.addAll(apiClient.parameterToPair("type", type)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getWebhooksValidateBeforeCall(String type, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = getWebhooksCall(type, progressListener, progressRequestListener); + return call; + + } + + /** + * Get all webhooks + * + * @param type Filter on webhook type (optional, default to transactional) + * @return GetWebhooks + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GetWebhooks getWebhooks(String type) throws ApiException { + ApiResponse resp = getWebhooksWithHttpInfo(type); + return resp.getData(); + } + + /** + * Get all webhooks + * + * @param type Filter on webhook type (optional, default to transactional) + * @return ApiResponse<GetWebhooks> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getWebhooksWithHttpInfo(String type) throws ApiException { + com.squareup.okhttp.Call call = getWebhooksValidateBeforeCall(type, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get all webhooks (asynchronously) + * + * @param type Filter on webhook type (optional, default to transactional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getWebhooksAsync(String type, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getWebhooksValidateBeforeCall(type, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for updateWebhook + * @param webhookId Id of the webhook (required) + * @param updateWebhook Values to update a webhook (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call updateWebhookCall(Long webhookId, UpdateWebhook updateWebhook, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = updateWebhook; + + // create path and map variables + String localVarPath = "/webhooks/{webhookId}" + .replaceAll("\\{" + "webhookId" + "\\}", apiClient.escapeString(webhookId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "api-key" }; + return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call updateWebhookValidateBeforeCall(Long webhookId, UpdateWebhook updateWebhook, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'webhookId' is set + if (webhookId == null) { + throw new ApiException("Missing the required parameter 'webhookId' when calling updateWebhook(Async)"); + } + + // verify the required parameter 'updateWebhook' is set + if (updateWebhook == null) { + throw new ApiException("Missing the required parameter 'updateWebhook' when calling updateWebhook(Async)"); + } + + + com.squareup.okhttp.Call call = updateWebhookCall(webhookId, updateWebhook, progressListener, progressRequestListener); + return call; + + } + + /** + * Update a webhook + * + * @param webhookId Id of the webhook (required) + * @param updateWebhook Values to update a webhook (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void updateWebhook(Long webhookId, UpdateWebhook updateWebhook) throws ApiException { + updateWebhookWithHttpInfo(webhookId, updateWebhook); + } + + /** + * Update a webhook + * + * @param webhookId Id of the webhook (required) + * @param updateWebhook Values to update a webhook (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse updateWebhookWithHttpInfo(Long webhookId, UpdateWebhook updateWebhook) throws ApiException { + com.squareup.okhttp.Call call = updateWebhookValidateBeforeCall(webhookId, updateWebhook, null, null); + return apiClient.execute(call); + } + + /** + * Update a webhook (asynchronously) + * + * @param webhookId Id of the webhook (required) + * @param updateWebhook Values to update a webhook (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call updateWebhookAsync(Long webhookId, UpdateWebhook updateWebhook, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = updateWebhookValidateBeforeCall(webhookId, updateWebhook, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } +} diff --git a/src/main/java/sibModel/AddCredits.java b/src/main/java/sibModel/AddCredits.java new file mode 100644 index 0000000..4fda603 --- /dev/null +++ b/src/main/java/sibModel/AddCredits.java @@ -0,0 +1,116 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * AddCredits + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class AddCredits { + @SerializedName("sms") + private Long sms = null; + + @SerializedName("email") + private Long email = null; + + public AddCredits sms(Long sms) { + this.sms = sms; + return this; + } + + /** + * SMS credits to be added to the child account + * @return sms + **/ + @ApiModelProperty(example = "450", value = "SMS credits to be added to the child account") + public Long getSms() { + return sms; + } + + public void setSms(Long sms) { + this.sms = sms; + } + + public AddCredits email(Long email) { + this.email = email; + return this; + } + + /** + * Email credits to be added to the child account + * @return email + **/ + @ApiModelProperty(example = "1200", value = "Email credits to be added to the child account") + public Long getEmail() { + return email; + } + + public void setEmail(Long email) { + this.email = email; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddCredits addCredits = (AddCredits) o; + return ObjectUtils.equals(this.sms, addCredits.sms) && + ObjectUtils.equals(this.email, addCredits.email); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(sms, email); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AddCredits {\n"); + + sb.append(" sms: ").append(toIndentedString(sms)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/AddRemoveContactToList.java b/src/main/java/sibModel/AddRemoveContactToList.java new file mode 100644 index 0000000..2562b59 --- /dev/null +++ b/src/main/java/sibModel/AddRemoveContactToList.java @@ -0,0 +1,103 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * AddRemoveContactToList + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class AddRemoveContactToList { + @SerializedName("emails") + private List emails = null; + + public AddRemoveContactToList emails(List emails) { + this.emails = emails; + return this; + } + + public AddRemoveContactToList addEmailsItem(String emailsItem) { + if (this.emails == null) { + this.emails = new ArrayList(); + } + this.emails.add(emailsItem); + return this; + } + + /** + * Emails to add or remove from a list + * @return emails + **/ + @ApiModelProperty(value = "Emails to add or remove from a list") + public List getEmails() { + return emails; + } + + public void setEmails(List emails) { + this.emails = emails; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddRemoveContactToList addRemoveContactToList = (AddRemoveContactToList) o; + return ObjectUtils.equals(this.emails, addRemoveContactToList.emails); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(emails); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AddRemoveContactToList {\n"); + + sb.append(" emails: ").append(toIndentedString(emails)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/CreateAttribute.java b/src/main/java/sibModel/CreateAttribute.java new file mode 100644 index 0000000..3eb7e53 --- /dev/null +++ b/src/main/java/sibModel/CreateAttribute.java @@ -0,0 +1,203 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import sibModel.CreateAttributeEnumeration; + +/** + * CreateAttribute + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class CreateAttribute { + @SerializedName("value") + private String value = null; + + @SerializedName("enumeration") + private List enumeration = null; + + /** + * Type of the attribute. Use only if the attribute's category is normal, category or transactional ( type 'id' only available if the category is 'transactional' attribute & type 'category' only available if the category is 'category' attribute ) + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + TEXT("text"), + + DATE("date"), + + FLOAT("float"), + + ID("id"), + + CATEGORY("category"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String text) { + for (TypeEnum b : TypeEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("type") + private TypeEnum type = null; + + public CreateAttribute value(String value) { + this.value = value; + return this; + } + + /** + * Value of the attribute. Use only if the attribute's category is calculated or global + * @return value + **/ + @ApiModelProperty(example = "COUNT[BLACKLISTED,BLACKLISTED,<,NOW()]", value = "Value of the attribute. Use only if the attribute's category is calculated or global") + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public CreateAttribute enumeration(List enumeration) { + this.enumeration = enumeration; + return this; + } + + public CreateAttribute addEnumerationItem(CreateAttributeEnumeration enumerationItem) { + if (this.enumeration == null) { + this.enumeration = new ArrayList(); + } + this.enumeration.add(enumerationItem); + return this; + } + + /** + * Values that the attribute can take. Use only if the attribute's category is category + * @return enumeration + **/ + @ApiModelProperty(value = "Values that the attribute can take. Use only if the attribute's category is category") + public List getEnumeration() { + return enumeration; + } + + public void setEnumeration(List enumeration) { + this.enumeration = enumeration; + } + + public CreateAttribute type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of the attribute. Use only if the attribute's category is normal, category or transactional ( type 'id' only available if the category is 'transactional' attribute & type 'category' only available if the category is 'category' attribute ) + * @return type + **/ + @ApiModelProperty(example = "text", value = "Type of the attribute. Use only if the attribute's category is normal, category or transactional ( type 'id' only available if the category is 'transactional' attribute & type 'category' only available if the category is 'category' attribute )") + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAttribute createAttribute = (CreateAttribute) o; + return ObjectUtils.equals(this.value, createAttribute.value) && + ObjectUtils.equals(this.enumeration, createAttribute.enumeration) && + ObjectUtils.equals(this.type, createAttribute.type); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(value, enumeration, type); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAttribute {\n"); + + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" enumeration: ").append(toIndentedString(enumeration)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/CreateAttributeEnumeration.java b/src/main/java/sibModel/CreateAttributeEnumeration.java new file mode 100644 index 0000000..592f1d4 --- /dev/null +++ b/src/main/java/sibModel/CreateAttributeEnumeration.java @@ -0,0 +1,116 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * CreateAttributeEnumeration + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class CreateAttributeEnumeration { + @SerializedName("value") + private Integer value = null; + + @SerializedName("label") + private String label = null; + + public CreateAttributeEnumeration value(Integer value) { + this.value = value; + return this; + } + + /** + * Id of the value + * @return value + **/ + @ApiModelProperty(example = "1", required = true, value = "Id of the value") + public Integer getValue() { + return value; + } + + public void setValue(Integer value) { + this.value = value; + } + + public CreateAttributeEnumeration label(String label) { + this.label = label; + return this; + } + + /** + * Label of the value + * @return label + **/ + @ApiModelProperty(example = "Women", required = true, value = "Label of the value") + public String getLabel() { + return label; + } + + public void setLabel(String label) { + this.label = label; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAttributeEnumeration createAttributeEnumeration = (CreateAttributeEnumeration) o; + return ObjectUtils.equals(this.value, createAttributeEnumeration.value) && + ObjectUtils.equals(this.label, createAttributeEnumeration.label); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(value, label); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAttributeEnumeration {\n"); + + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" label: ").append(toIndentedString(label)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/CreateChild.java b/src/main/java/sibModel/CreateChild.java new file mode 100644 index 0000000..4712963 --- /dev/null +++ b/src/main/java/sibModel/CreateChild.java @@ -0,0 +1,185 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * CreateChild + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class CreateChild { + @SerializedName("email") + private String email = null; + + @SerializedName("firstName") + private String firstName = null; + + @SerializedName("lastName") + private String lastName = null; + + @SerializedName("companyName") + private String companyName = null; + + @SerializedName("password") + private String password = null; + + public CreateChild email(String email) { + this.email = email; + return this; + } + + /** + * Email address to create the child account + * @return email + **/ + @ApiModelProperty(example = "josh.cruise@example.com", required = true, value = "Email address to create the child account") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public CreateChild firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * First name to use to create the child account + * @return firstName + **/ + @ApiModelProperty(example = "Josh", required = true, value = "First name to use to create the child account") + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public CreateChild lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Last name to use to create the child account + * @return lastName + **/ + @ApiModelProperty(example = "Cruise", required = true, value = "Last name to use to create the child account") + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public CreateChild companyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * Company name to use to create the child account + * @return companyName + **/ + @ApiModelProperty(example = "Your Company", required = true, value = "Company name to use to create the child account") + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + public CreateChild password(String password) { + this.password = password; + return this; + } + + /** + * Password for the child account to login + * @return password + **/ + @ApiModelProperty(example = "Pa55w0rd65", required = true, value = "Password for the child account to login") + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateChild createChild = (CreateChild) o; + return ObjectUtils.equals(this.email, createChild.email) && + ObjectUtils.equals(this.firstName, createChild.firstName) && + ObjectUtils.equals(this.lastName, createChild.lastName) && + ObjectUtils.equals(this.companyName, createChild.companyName) && + ObjectUtils.equals(this.password, createChild.password); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(email, firstName, lastName, companyName, password); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateChild {\n"); + + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/CreateContact.java b/src/main/java/sibModel/CreateContact.java new file mode 100644 index 0000000..adc7a5e --- /dev/null +++ b/src/main/java/sibModel/CreateContact.java @@ -0,0 +1,249 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * CreateContact + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class CreateContact { + @SerializedName("email") + private String email = null; + + @SerializedName("attributes") + private Object attributes = null; + + @SerializedName("emailBlacklisted") + private Boolean emailBlacklisted = null; + + @SerializedName("smsBlacklisted") + private Boolean smsBlacklisted = null; + + @SerializedName("listIds") + private List listIds = null; + + @SerializedName("updateEnabled") + private Boolean updateEnabled = false; + + @SerializedName("smtpBlacklistSender") + private List smtpBlacklistSender = null; + + public CreateContact email(String email) { + this.email = email; + return this; + } + + /** + * Email address of the user. Mandatory if `attributes.sms` is not passed + * @return email + **/ + @ApiModelProperty(example = "elly@example.com", value = "Email address of the user. Mandatory if `attributes.sms` is not passed") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public CreateContact attributes(Object attributes) { + this.attributes = attributes; + return this; + } + + /** + * Values of the attributes to fill. The attributes must exist in you contact database + * @return attributes + **/ + @ApiModelProperty(example = "\"FNAME:Elly, LNAME:Roger\"", value = "Values of the attributes to fill. The attributes must exist in you contact database") + public Object getAttributes() { + return attributes; + } + + public void setAttributes(Object attributes) { + this.attributes = attributes; + } + + public CreateContact emailBlacklisted(Boolean emailBlacklisted) { + this.emailBlacklisted = emailBlacklisted; + return this; + } + + /** + * Blacklist the contact for emails (emailBlacklisted = true) + * @return emailBlacklisted + **/ + @ApiModelProperty(example = "false", value = "Blacklist the contact for emails (emailBlacklisted = true)") + public Boolean isEmailBlacklisted() { + return emailBlacklisted; + } + + public void setEmailBlacklisted(Boolean emailBlacklisted) { + this.emailBlacklisted = emailBlacklisted; + } + + public CreateContact smsBlacklisted(Boolean smsBlacklisted) { + this.smsBlacklisted = smsBlacklisted; + return this; + } + + /** + * Blacklist the contact for SMS (smsBlacklisted = true) + * @return smsBlacklisted + **/ + @ApiModelProperty(example = "false", value = "Blacklist the contact for SMS (smsBlacklisted = true)") + public Boolean isSmsBlacklisted() { + return smsBlacklisted; + } + + public void setSmsBlacklisted(Boolean smsBlacklisted) { + this.smsBlacklisted = smsBlacklisted; + } + + public CreateContact listIds(List listIds) { + this.listIds = listIds; + return this; + } + + public CreateContact addListIdsItem(Long listIdsItem) { + if (this.listIds == null) { + this.listIds = new ArrayList(); + } + this.listIds.add(listIdsItem); + return this; + } + + /** + * Ids of the lists to add the contact to + * @return listIds + **/ + @ApiModelProperty(value = "Ids of the lists to add the contact to") + public List getListIds() { + return listIds; + } + + public void setListIds(List listIds) { + this.listIds = listIds; + } + + public CreateContact updateEnabled(Boolean updateEnabled) { + this.updateEnabled = updateEnabled; + return this; + } + + /** + * Facilitate to update existing contact in same request (updateEnabled = true) + * @return updateEnabled + **/ + @ApiModelProperty(example = "false", value = "Facilitate to update existing contact in same request (updateEnabled = true)") + public Boolean isUpdateEnabled() { + return updateEnabled; + } + + public void setUpdateEnabled(Boolean updateEnabled) { + this.updateEnabled = updateEnabled; + } + + public CreateContact smtpBlacklistSender(List smtpBlacklistSender) { + this.smtpBlacklistSender = smtpBlacklistSender; + return this; + } + + public CreateContact addSmtpBlacklistSenderItem(String smtpBlacklistSenderItem) { + if (this.smtpBlacklistSender == null) { + this.smtpBlacklistSender = new ArrayList(); + } + this.smtpBlacklistSender.add(smtpBlacklistSenderItem); + return this; + } + + /** + * SMTP forbidden sender for contact. Use only for email Contact ( only available if updateEnabled = true ) + * @return smtpBlacklistSender + **/ + @ApiModelProperty(value = "SMTP forbidden sender for contact. Use only for email Contact ( only available if updateEnabled = true )") + public List getSmtpBlacklistSender() { + return smtpBlacklistSender; + } + + public void setSmtpBlacklistSender(List smtpBlacklistSender) { + this.smtpBlacklistSender = smtpBlacklistSender; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateContact createContact = (CreateContact) o; + return ObjectUtils.equals(this.email, createContact.email) && + ObjectUtils.equals(this.attributes, createContact.attributes) && + ObjectUtils.equals(this.emailBlacklisted, createContact.emailBlacklisted) && + ObjectUtils.equals(this.smsBlacklisted, createContact.smsBlacklisted) && + ObjectUtils.equals(this.listIds, createContact.listIds) && + ObjectUtils.equals(this.updateEnabled, createContact.updateEnabled) && + ObjectUtils.equals(this.smtpBlacklistSender, createContact.smtpBlacklistSender); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(email, attributes, emailBlacklisted, smsBlacklisted, listIds, updateEnabled, smtpBlacklistSender); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateContact {\n"); + + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" emailBlacklisted: ").append(toIndentedString(emailBlacklisted)).append("\n"); + sb.append(" smsBlacklisted: ").append(toIndentedString(smsBlacklisted)).append("\n"); + sb.append(" listIds: ").append(toIndentedString(listIds)).append("\n"); + sb.append(" updateEnabled: ").append(toIndentedString(updateEnabled)).append("\n"); + sb.append(" smtpBlacklistSender: ").append(toIndentedString(smtpBlacklistSender)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/CreateEmailCampaign.java b/src/main/java/sibModel/CreateEmailCampaign.java new file mode 100644 index 0000000..e5975cb --- /dev/null +++ b/src/main/java/sibModel/CreateEmailCampaign.java @@ -0,0 +1,534 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.threeten.bp.OffsetDateTime; +import sibModel.CreateEmailCampaignRecipients; +import sibModel.CreateEmailCampaignSender; + +/** + * CreateEmailCampaign + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class CreateEmailCampaign { + @SerializedName("tag") + private String tag = null; + + @SerializedName("sender") + private CreateEmailCampaignSender sender = null; + + @SerializedName("name") + private String name = null; + + @SerializedName("htmlContent") + private String htmlContent = null; + + @SerializedName("htmlUrl") + private String htmlUrl = null; + + @SerializedName("scheduledAt") + private OffsetDateTime scheduledAt = null; + + @SerializedName("subject") + private String subject = null; + + @SerializedName("replyTo") + private String replyTo = null; + + @SerializedName("toField") + private String toField = null; + + @SerializedName("recipients") + private CreateEmailCampaignRecipients recipients = null; + + @SerializedName("attachmentUrl") + private String attachmentUrl = null; + + @SerializedName("inlineImageActivation") + private Boolean inlineImageActivation = false; + + @SerializedName("mirrorActive") + private Boolean mirrorActive = null; + + @SerializedName("recurring") + private Boolean recurring = false; + + /** + * Type of the campaign + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + CLASSIC("classic"), + + TRIGGER("trigger"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String text) { + for (TypeEnum b : TypeEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("type") + private TypeEnum type = null; + + @SerializedName("footer") + private String footer = null; + + @SerializedName("header") + private String header = null; + + @SerializedName("utmCampaign") + private String utmCampaign = null; + + public CreateEmailCampaign tag(String tag) { + this.tag = tag; + return this; + } + + /** + * Tag of the campaign + * @return tag + **/ + @ApiModelProperty(example = "Newsletter", value = "Tag of the campaign") + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + public CreateEmailCampaign sender(CreateEmailCampaignSender sender) { + this.sender = sender; + return this; + } + + /** + * Get sender + * @return sender + **/ + @ApiModelProperty(required = true, value = "") + public CreateEmailCampaignSender getSender() { + return sender; + } + + public void setSender(CreateEmailCampaignSender sender) { + this.sender = sender; + } + + public CreateEmailCampaign name(String name) { + this.name = name; + return this; + } + + /** + * Name of the campaign + * @return name + **/ + @ApiModelProperty(example = "Newsletter - May 2017", required = true, value = "Name of the campaign") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public CreateEmailCampaign htmlContent(String htmlContent) { + this.htmlContent = htmlContent; + return this; + } + + /** + * Mandatory if htmlUrl is empty. Body of the message (HTML) + * @return htmlContent + **/ + @ApiModelProperty(example = "Spring is here, discover my new collection", value = "Mandatory if htmlUrl is empty. Body of the message (HTML)") + public String getHtmlContent() { + return htmlContent; + } + + public void setHtmlContent(String htmlContent) { + this.htmlContent = htmlContent; + } + + public CreateEmailCampaign htmlUrl(String htmlUrl) { + this.htmlUrl = htmlUrl; + return this; + } + + /** + * Mandatory if htmlContent is empty. Url to the message (HTML) + * @return htmlUrl + **/ + @ApiModelProperty(example = "https://html.domain.com", value = "Mandatory if htmlContent is empty. Url to the message (HTML)") + public String getHtmlUrl() { + return htmlUrl; + } + + public void setHtmlUrl(String htmlUrl) { + this.htmlUrl = htmlUrl; + } + + public CreateEmailCampaign scheduledAt(OffsetDateTime scheduledAt) { + this.scheduledAt = scheduledAt; + return this; + } + + /** + * Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. + * @return scheduledAt + **/ + @ApiModelProperty(example = "2017-06-01T12:30:00+02:00", value = "Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result.") + public OffsetDateTime getScheduledAt() { + return scheduledAt; + } + + public void setScheduledAt(OffsetDateTime scheduledAt) { + this.scheduledAt = scheduledAt; + } + + public CreateEmailCampaign subject(String subject) { + this.subject = subject; + return this; + } + + /** + * Subject of the campaign + * @return subject + **/ + @ApiModelProperty(example = "Discover the New Collection !", required = true, value = "Subject of the campaign") + public String getSubject() { + return subject; + } + + public void setSubject(String subject) { + this.subject = subject; + } + + public CreateEmailCampaign replyTo(String replyTo) { + this.replyTo = replyTo; + return this; + } + + /** + * Email on which the campaign recipients will be able to reply to + * @return replyTo + **/ + @ApiModelProperty(example = "support@myshop.com", value = "Email on which the campaign recipients will be able to reply to") + public String getReplyTo() { + return replyTo; + } + + public void setReplyTo(String replyTo) { + this.replyTo = replyTo; + } + + public CreateEmailCampaign toField(String toField) { + this.toField = toField; + return this; + } + + /** + * To personalize the «To» Field, e.g. if you want to include the first name and last name of your recipient, use {FNAME} {LNAME}. These attributes must already exist in your contact database + * @return toField + **/ + @ApiModelProperty(example = "{FNAME} {LNAME}", value = "To personalize the «To» Field, e.g. if you want to include the first name and last name of your recipient, use {FNAME} {LNAME}. These attributes must already exist in your contact database") + public String getToField() { + return toField; + } + + public void setToField(String toField) { + this.toField = toField; + } + + public CreateEmailCampaign recipients(CreateEmailCampaignRecipients recipients) { + this.recipients = recipients; + return this; + } + + /** + * Get recipients + * @return recipients + **/ + @ApiModelProperty(value = "") + public CreateEmailCampaignRecipients getRecipients() { + return recipients; + } + + public void setRecipients(CreateEmailCampaignRecipients recipients) { + this.recipients = recipients; + } + + public CreateEmailCampaign attachmentUrl(String attachmentUrl) { + this.attachmentUrl = attachmentUrl; + return this; + } + + /** + * Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps + * @return attachmentUrl + **/ + @ApiModelProperty(example = "https://attachment.domain.com", value = "Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps") + public String getAttachmentUrl() { + return attachmentUrl; + } + + public void setAttachmentUrl(String attachmentUrl) { + this.attachmentUrl = attachmentUrl; + } + + public CreateEmailCampaign inlineImageActivation(Boolean inlineImageActivation) { + this.inlineImageActivation = inlineImageActivation; + return this; + } + + /** + * Use true to embedded the images in your email. Final size of the email should be less than 4MB. Campaigns with embedded images can not be sent to more than 5000 contacts + * @return inlineImageActivation + **/ + @ApiModelProperty(example = "true", value = "Use true to embedded the images in your email. Final size of the email should be less than 4MB. Campaigns with embedded images can not be sent to more than 5000 contacts") + public Boolean isInlineImageActivation() { + return inlineImageActivation; + } + + public void setInlineImageActivation(Boolean inlineImageActivation) { + this.inlineImageActivation = inlineImageActivation; + } + + public CreateEmailCampaign mirrorActive(Boolean mirrorActive) { + this.mirrorActive = mirrorActive; + return this; + } + + /** + * Use true to enable the mirror link + * @return mirrorActive + **/ + @ApiModelProperty(example = "true", value = "Use true to enable the mirror link") + public Boolean isMirrorActive() { + return mirrorActive; + } + + public void setMirrorActive(Boolean mirrorActive) { + this.mirrorActive = mirrorActive; + } + + public CreateEmailCampaign recurring(Boolean recurring) { + this.recurring = recurring; + return this; + } + + /** + * For trigger campagins use false to make sure a contact receives the same campaign only once + * @return recurring + **/ + @ApiModelProperty(example = "false", value = "For trigger campagins use false to make sure a contact receives the same campaign only once") + public Boolean isRecurring() { + return recurring; + } + + public void setRecurring(Boolean recurring) { + this.recurring = recurring; + } + + public CreateEmailCampaign type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of the campaign + * @return type + **/ + @ApiModelProperty(example = "classic", required = true, value = "Type of the campaign") + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + public CreateEmailCampaign footer(String footer) { + this.footer = footer; + return this; + } + + /** + * Footer of the email campaign + * @return footer + **/ + @ApiModelProperty(example = "[DEFAULT_FOOTER]", value = "Footer of the email campaign") + public String getFooter() { + return footer; + } + + public void setFooter(String footer) { + this.footer = footer; + } + + public CreateEmailCampaign header(String header) { + this.header = header; + return this; + } + + /** + * Header of the email campaign + * @return header + **/ + @ApiModelProperty(example = "[DEFAULT_HEADER]", value = "Header of the email campaign") + public String getHeader() { + return header; + } + + public void setHeader(String header) { + this.header = header; + } + + public CreateEmailCampaign utmCampaign(String utmCampaign) { + this.utmCampaign = utmCampaign; + return this; + } + + /** + * Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed + * @return utmCampaign + **/ + @ApiModelProperty(example = "NL_05_2017", value = "Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed") + public String getUtmCampaign() { + return utmCampaign; + } + + public void setUtmCampaign(String utmCampaign) { + this.utmCampaign = utmCampaign; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateEmailCampaign createEmailCampaign = (CreateEmailCampaign) o; + return ObjectUtils.equals(this.tag, createEmailCampaign.tag) && + ObjectUtils.equals(this.sender, createEmailCampaign.sender) && + ObjectUtils.equals(this.name, createEmailCampaign.name) && + ObjectUtils.equals(this.htmlContent, createEmailCampaign.htmlContent) && + ObjectUtils.equals(this.htmlUrl, createEmailCampaign.htmlUrl) && + ObjectUtils.equals(this.scheduledAt, createEmailCampaign.scheduledAt) && + ObjectUtils.equals(this.subject, createEmailCampaign.subject) && + ObjectUtils.equals(this.replyTo, createEmailCampaign.replyTo) && + ObjectUtils.equals(this.toField, createEmailCampaign.toField) && + ObjectUtils.equals(this.recipients, createEmailCampaign.recipients) && + ObjectUtils.equals(this.attachmentUrl, createEmailCampaign.attachmentUrl) && + ObjectUtils.equals(this.inlineImageActivation, createEmailCampaign.inlineImageActivation) && + ObjectUtils.equals(this.mirrorActive, createEmailCampaign.mirrorActive) && + ObjectUtils.equals(this.recurring, createEmailCampaign.recurring) && + ObjectUtils.equals(this.type, createEmailCampaign.type) && + ObjectUtils.equals(this.footer, createEmailCampaign.footer) && + ObjectUtils.equals(this.header, createEmailCampaign.header) && + ObjectUtils.equals(this.utmCampaign, createEmailCampaign.utmCampaign); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(tag, sender, name, htmlContent, htmlUrl, scheduledAt, subject, replyTo, toField, recipients, attachmentUrl, inlineImageActivation, mirrorActive, recurring, type, footer, header, utmCampaign); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateEmailCampaign {\n"); + + sb.append(" tag: ").append(toIndentedString(tag)).append("\n"); + sb.append(" sender: ").append(toIndentedString(sender)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" htmlContent: ").append(toIndentedString(htmlContent)).append("\n"); + sb.append(" htmlUrl: ").append(toIndentedString(htmlUrl)).append("\n"); + sb.append(" scheduledAt: ").append(toIndentedString(scheduledAt)).append("\n"); + sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); + sb.append(" replyTo: ").append(toIndentedString(replyTo)).append("\n"); + sb.append(" toField: ").append(toIndentedString(toField)).append("\n"); + sb.append(" recipients: ").append(toIndentedString(recipients)).append("\n"); + sb.append(" attachmentUrl: ").append(toIndentedString(attachmentUrl)).append("\n"); + sb.append(" inlineImageActivation: ").append(toIndentedString(inlineImageActivation)).append("\n"); + sb.append(" mirrorActive: ").append(toIndentedString(mirrorActive)).append("\n"); + sb.append(" recurring: ").append(toIndentedString(recurring)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" footer: ").append(toIndentedString(footer)).append("\n"); + sb.append(" header: ").append(toIndentedString(header)).append("\n"); + sb.append(" utmCampaign: ").append(toIndentedString(utmCampaign)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/CreateEmailCampaignRecipients.java b/src/main/java/sibModel/CreateEmailCampaignRecipients.java new file mode 100644 index 0000000..508ba2d --- /dev/null +++ b/src/main/java/sibModel/CreateEmailCampaignRecipients.java @@ -0,0 +1,134 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * CreateEmailCampaignRecipients + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class CreateEmailCampaignRecipients { + @SerializedName("exclusionListIds") + private List exclusionListIds = null; + + @SerializedName("listIds") + private List listIds = null; + + public CreateEmailCampaignRecipients exclusionListIds(List exclusionListIds) { + this.exclusionListIds = exclusionListIds; + return this; + } + + public CreateEmailCampaignRecipients addExclusionListIdsItem(Long exclusionListIdsItem) { + if (this.exclusionListIds == null) { + this.exclusionListIds = new ArrayList(); + } + this.exclusionListIds.add(exclusionListIdsItem); + return this; + } + + /** + * List ids to exclude from the campaign + * @return exclusionListIds + **/ + @ApiModelProperty(value = "List ids to exclude from the campaign") + public List getExclusionListIds() { + return exclusionListIds; + } + + public void setExclusionListIds(List exclusionListIds) { + this.exclusionListIds = exclusionListIds; + } + + public CreateEmailCampaignRecipients listIds(List listIds) { + this.listIds = listIds; + return this; + } + + public CreateEmailCampaignRecipients addListIdsItem(Long listIdsItem) { + if (this.listIds == null) { + this.listIds = new ArrayList(); + } + this.listIds.add(listIdsItem); + return this; + } + + /** + * Mandatory if scheduledAt is not empty. List Ids to send the campaign to + * @return listIds + **/ + @ApiModelProperty(value = "Mandatory if scheduledAt is not empty. List Ids to send the campaign to") + public List getListIds() { + return listIds; + } + + public void setListIds(List listIds) { + this.listIds = listIds; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateEmailCampaignRecipients createEmailCampaignRecipients = (CreateEmailCampaignRecipients) o; + return ObjectUtils.equals(this.exclusionListIds, createEmailCampaignRecipients.exclusionListIds) && + ObjectUtils.equals(this.listIds, createEmailCampaignRecipients.listIds); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(exclusionListIds, listIds); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateEmailCampaignRecipients {\n"); + + sb.append(" exclusionListIds: ").append(toIndentedString(exclusionListIds)).append("\n"); + sb.append(" listIds: ").append(toIndentedString(listIds)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/CreateEmailCampaignSender.java b/src/main/java/sibModel/CreateEmailCampaignSender.java new file mode 100644 index 0000000..50553ea --- /dev/null +++ b/src/main/java/sibModel/CreateEmailCampaignSender.java @@ -0,0 +1,116 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * CreateEmailCampaignSender + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class CreateEmailCampaignSender { + @SerializedName("name") + private String name = null; + + @SerializedName("email") + private String email = null; + + public CreateEmailCampaignSender name(String name) { + this.name = name; + return this; + } + + /** + * Sender Name + * @return name + **/ + @ApiModelProperty(example = "Mary from MyShop", value = "Sender Name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public CreateEmailCampaignSender email(String email) { + this.email = email; + return this; + } + + /** + * Sender email + * @return email + **/ + @ApiModelProperty(example = "newsletter@myshop.com", required = true, value = "Sender email") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateEmailCampaignSender createEmailCampaignSender = (CreateEmailCampaignSender) o; + return ObjectUtils.equals(this.name, createEmailCampaignSender.name) && + ObjectUtils.equals(this.email, createEmailCampaignSender.email); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(name, email); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateEmailCampaignSender {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/CreateList.java b/src/main/java/sibModel/CreateList.java new file mode 100644 index 0000000..166a64c --- /dev/null +++ b/src/main/java/sibModel/CreateList.java @@ -0,0 +1,116 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * CreateList + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class CreateList { + @SerializedName("name") + private String name = null; + + @SerializedName("folderId") + private Long folderId = null; + + public CreateList name(String name) { + this.name = name; + return this; + } + + /** + * Name of the list + * @return name + **/ + @ApiModelProperty(example = "Magento Customer - ES", required = true, value = "Name of the list") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public CreateList folderId(Long folderId) { + this.folderId = folderId; + return this; + } + + /** + * Id of the folder in which to create the list + * @return folderId + **/ + @ApiModelProperty(example = "2", required = true, value = "Id of the folder in which to create the list") + public Long getFolderId() { + return folderId; + } + + public void setFolderId(Long folderId) { + this.folderId = folderId; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateList createList = (CreateList) o; + return ObjectUtils.equals(this.name, createList.name) && + ObjectUtils.equals(this.folderId, createList.folderId); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(name, folderId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateList {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" folderId: ").append(toIndentedString(folderId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/CreateModel.java b/src/main/java/sibModel/CreateModel.java new file mode 100644 index 0000000..7728204 --- /dev/null +++ b/src/main/java/sibModel/CreateModel.java @@ -0,0 +1,93 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * CreateModel + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class CreateModel { + @SerializedName("id") + private Long id = null; + + public CreateModel id(Long id) { + this.id = id; + return this; + } + + /** + * ID of the object created + * @return id + **/ + @ApiModelProperty(example = "122", required = true, value = "ID of the object created") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateModel createModel = (CreateModel) o; + return ObjectUtils.equals(this.id, createModel.id); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(id); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateModel {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/CreateReseller.java b/src/main/java/sibModel/CreateReseller.java new file mode 100644 index 0000000..2925668 --- /dev/null +++ b/src/main/java/sibModel/CreateReseller.java @@ -0,0 +1,93 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * CreateReseller + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class CreateReseller { + @SerializedName("authKey") + private String authKey = null; + + public CreateReseller authKey(String authKey) { + this.authKey = authKey; + return this; + } + + /** + * AuthKey of Reseller child created + * @return authKey + **/ + @ApiModelProperty(example = "xkeysib-21881axxxxxcc92e04-mIrexxxx7z", required = true, value = "AuthKey of Reseller child created") + public String getAuthKey() { + return authKey; + } + + public void setAuthKey(String authKey) { + this.authKey = authKey; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateReseller createReseller = (CreateReseller) o; + return ObjectUtils.equals(this.authKey, createReseller.authKey); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(authKey); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateReseller {\n"); + + sb.append(" authKey: ").append(toIndentedString(authKey)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/CreateSender.java b/src/main/java/sibModel/CreateSender.java new file mode 100644 index 0000000..f7542f0 --- /dev/null +++ b/src/main/java/sibModel/CreateSender.java @@ -0,0 +1,150 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import sibModel.CreateSenderIps; + +/** + * CreateSender + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class CreateSender { + @SerializedName("name") + private String name = null; + + @SerializedName("email") + private String email = null; + + @SerializedName("ips") + private List ips = null; + + public CreateSender name(String name) { + this.name = name; + return this; + } + + /** + * From Name to use for the sender + * @return name + **/ + @ApiModelProperty(example = "Newsletter", required = true, value = "From Name to use for the sender") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public CreateSender email(String email) { + this.email = email; + return this; + } + + /** + * From Email to use for the sender + * @return email + **/ + @ApiModelProperty(example = "newsletter@mycompany.com", required = true, value = "From Email to use for the sender") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public CreateSender ips(List ips) { + this.ips = ips; + return this; + } + + public CreateSender addIpsItem(CreateSenderIps ipsItem) { + if (this.ips == null) { + this.ips = new ArrayList(); + } + this.ips.add(ipsItem); + return this; + } + + /** + * Mandatory in case of dedicated IP, IPs to associate to the sender + * @return ips + **/ + @ApiModelProperty(value = "Mandatory in case of dedicated IP, IPs to associate to the sender") + public List getIps() { + return ips; + } + + public void setIps(List ips) { + this.ips = ips; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateSender createSender = (CreateSender) o; + return ObjectUtils.equals(this.name, createSender.name) && + ObjectUtils.equals(this.email, createSender.email) && + ObjectUtils.equals(this.ips, createSender.ips); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(name, email, ips); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateSender {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" ips: ").append(toIndentedString(ips)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/CreateSenderIps.java b/src/main/java/sibModel/CreateSenderIps.java new file mode 100644 index 0000000..1adc8b5 --- /dev/null +++ b/src/main/java/sibModel/CreateSenderIps.java @@ -0,0 +1,141 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * CreateSenderIps + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class CreateSenderIps { + @SerializedName("ip") + private String ip = null; + + @SerializedName("domain") + private String domain = null; + + @SerializedName("weight") + private Long weight = null; + + public CreateSenderIps ip(String ip) { + this.ip = ip; + return this; + } + + /** + * Dedicated IP available in your account + * @return ip + **/ + @ApiModelProperty(example = "123.98.689.7", required = true, value = "Dedicated IP available in your account") + public String getIp() { + return ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + public CreateSenderIps domain(String domain) { + this.domain = domain; + return this; + } + + /** + * Domain of the IP + * @return domain + **/ + @ApiModelProperty(example = "mycompany.com", required = true, value = "Domain of the IP") + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public CreateSenderIps weight(Long weight) { + this.weight = weight; + return this; + } + + /** + * Weight to apply to the IP. Sum of all IP weights must be 100. Should be passed for either ALL or NONE of the IPs. If it's not passed, the sending will be equally balanced on all IPs. + * minimum: 1 + * maximum: 100 + * @return weight + **/ + @ApiModelProperty(example = "50", value = "Weight to apply to the IP. Sum of all IP weights must be 100. Should be passed for either ALL or NONE of the IPs. If it's not passed, the sending will be equally balanced on all IPs.") + public Long getWeight() { + return weight; + } + + public void setWeight(Long weight) { + this.weight = weight; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateSenderIps createSenderIps = (CreateSenderIps) o; + return ObjectUtils.equals(this.ip, createSenderIps.ip) && + ObjectUtils.equals(this.domain, createSenderIps.domain) && + ObjectUtils.equals(this.weight, createSenderIps.weight); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(ip, domain, weight); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateSenderIps {\n"); + + sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); + sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); + sb.append(" weight: ").append(toIndentedString(weight)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/CreateSenderModel.java b/src/main/java/sibModel/CreateSenderModel.java new file mode 100644 index 0000000..d69909d --- /dev/null +++ b/src/main/java/sibModel/CreateSenderModel.java @@ -0,0 +1,139 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * CreateSenderModel + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class CreateSenderModel { + @SerializedName("id") + private Long id = null; + + @SerializedName("spfError") + private Boolean spfError = null; + + @SerializedName("dkimError") + private Boolean dkimError = null; + + public CreateSenderModel id(Long id) { + this.id = id; + return this; + } + + /** + * ID of the Sender created + * @return id + **/ + @ApiModelProperty(example = "5", required = true, value = "ID of the Sender created") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public CreateSenderModel spfError(Boolean spfError) { + this.spfError = spfError; + return this; + } + + /** + * Status of SPF configuration for the sender (true = SPF not well configured, false = SPF well configured) + * @return spfError + **/ + @ApiModelProperty(example = "true", value = "Status of SPF configuration for the sender (true = SPF not well configured, false = SPF well configured)") + public Boolean isSpfError() { + return spfError; + } + + public void setSpfError(Boolean spfError) { + this.spfError = spfError; + } + + public CreateSenderModel dkimError(Boolean dkimError) { + this.dkimError = dkimError; + return this; + } + + /** + * Status of DKIM configuration for the sender (true = DKIM not well configured, false = DKIM well configured) + * @return dkimError + **/ + @ApiModelProperty(example = "false", value = "Status of DKIM configuration for the sender (true = DKIM not well configured, false = DKIM well configured)") + public Boolean isDkimError() { + return dkimError; + } + + public void setDkimError(Boolean dkimError) { + this.dkimError = dkimError; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateSenderModel createSenderModel = (CreateSenderModel) o; + return ObjectUtils.equals(this.id, createSenderModel.id) && + ObjectUtils.equals(this.spfError, createSenderModel.spfError) && + ObjectUtils.equals(this.dkimError, createSenderModel.dkimError); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(id, spfError, dkimError); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateSenderModel {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" spfError: ").append(toIndentedString(spfError)).append("\n"); + sb.append(" dkimError: ").append(toIndentedString(dkimError)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/CreateSmsCampaign.java b/src/main/java/sibModel/CreateSmsCampaign.java new file mode 100644 index 0000000..89cdce9 --- /dev/null +++ b/src/main/java/sibModel/CreateSmsCampaign.java @@ -0,0 +1,187 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.threeten.bp.OffsetDateTime; +import sibModel.CreateSmsCampaignRecipients; + +/** + * CreateSmsCampaign + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class CreateSmsCampaign { + @SerializedName("name") + private String name = null; + + @SerializedName("sender") + private String sender = null; + + @SerializedName("content") + private String content = null; + + @SerializedName("recipients") + private CreateSmsCampaignRecipients recipients = null; + + @SerializedName("scheduledAt") + private OffsetDateTime scheduledAt = null; + + public CreateSmsCampaign name(String name) { + this.name = name; + return this; + } + + /** + * Name of the campaign + * @return name + **/ + @ApiModelProperty(example = "Spring Promo Code", required = true, value = "Name of the campaign") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public CreateSmsCampaign sender(String sender) { + this.sender = sender; + return this; + } + + /** + * Name of the sender. The number of characters is limited to 11 + * @return sender + **/ + @ApiModelProperty(example = "MyShop", required = true, value = "Name of the sender. The number of characters is limited to 11") + public String getSender() { + return sender; + } + + public void setSender(String sender) { + this.sender = sender; + } + + public CreateSmsCampaign content(String content) { + this.content = content; + return this; + } + + /** + * Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS + * @return content + **/ + @ApiModelProperty(example = "Get a discount by visiting our NY store and saying : Happy Spring !", value = "Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS") + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public CreateSmsCampaign recipients(CreateSmsCampaignRecipients recipients) { + this.recipients = recipients; + return this; + } + + /** + * Get recipients + * @return recipients + **/ + @ApiModelProperty(value = "") + public CreateSmsCampaignRecipients getRecipients() { + return recipients; + } + + public void setRecipients(CreateSmsCampaignRecipients recipients) { + this.recipients = recipients; + } + + public CreateSmsCampaign scheduledAt(OffsetDateTime scheduledAt) { + this.scheduledAt = scheduledAt; + return this; + } + + /** + * UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. + * @return scheduledAt + **/ + @ApiModelProperty(example = "2017-05-05T12:30:00+02:00", value = "UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result.") + public OffsetDateTime getScheduledAt() { + return scheduledAt; + } + + public void setScheduledAt(OffsetDateTime scheduledAt) { + this.scheduledAt = scheduledAt; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateSmsCampaign createSmsCampaign = (CreateSmsCampaign) o; + return ObjectUtils.equals(this.name, createSmsCampaign.name) && + ObjectUtils.equals(this.sender, createSmsCampaign.sender) && + ObjectUtils.equals(this.content, createSmsCampaign.content) && + ObjectUtils.equals(this.recipients, createSmsCampaign.recipients) && + ObjectUtils.equals(this.scheduledAt, createSmsCampaign.scheduledAt); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(name, sender, content, recipients, scheduledAt); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateSmsCampaign {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" sender: ").append(toIndentedString(sender)).append("\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" recipients: ").append(toIndentedString(recipients)).append("\n"); + sb.append(" scheduledAt: ").append(toIndentedString(scheduledAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/CreateSmsCampaignRecipients.java b/src/main/java/sibModel/CreateSmsCampaignRecipients.java new file mode 100644 index 0000000..f261678 --- /dev/null +++ b/src/main/java/sibModel/CreateSmsCampaignRecipients.java @@ -0,0 +1,128 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * CreateSmsCampaignRecipients + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class CreateSmsCampaignRecipients { + @SerializedName("listIds") + private List listIds = new ArrayList(); + + @SerializedName("exclusionListIds") + private List exclusionListIds = new ArrayList(); + + public CreateSmsCampaignRecipients listIds(List listIds) { + this.listIds = listIds; + return this; + } + + public CreateSmsCampaignRecipients addListIdsItem(Long listIdsItem) { + this.listIds.add(listIdsItem); + return this; + } + + /** + * Lists Ids to send the campaign to. REQUIRED if scheduledAt is not empty + * @return listIds + **/ + @ApiModelProperty(required = true, value = "Lists Ids to send the campaign to. REQUIRED if scheduledAt is not empty") + public List getListIds() { + return listIds; + } + + public void setListIds(List listIds) { + this.listIds = listIds; + } + + public CreateSmsCampaignRecipients exclusionListIds(List exclusionListIds) { + this.exclusionListIds = exclusionListIds; + return this; + } + + public CreateSmsCampaignRecipients addExclusionListIdsItem(Long exclusionListIdsItem) { + this.exclusionListIds.add(exclusionListIdsItem); + return this; + } + + /** + * List ids which have to be excluded from a campaign + * @return exclusionListIds + **/ + @ApiModelProperty(required = true, value = "List ids which have to be excluded from a campaign") + public List getExclusionListIds() { + return exclusionListIds; + } + + public void setExclusionListIds(List exclusionListIds) { + this.exclusionListIds = exclusionListIds; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateSmsCampaignRecipients createSmsCampaignRecipients = (CreateSmsCampaignRecipients) o; + return ObjectUtils.equals(this.listIds, createSmsCampaignRecipients.listIds) && + ObjectUtils.equals(this.exclusionListIds, createSmsCampaignRecipients.exclusionListIds); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(listIds, exclusionListIds); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateSmsCampaignRecipients {\n"); + + sb.append(" listIds: ").append(toIndentedString(listIds)).append("\n"); + sb.append(" exclusionListIds: ").append(toIndentedString(exclusionListIds)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/CreateSmtpEmail.java b/src/main/java/sibModel/CreateSmtpEmail.java new file mode 100644 index 0000000..21c661d --- /dev/null +++ b/src/main/java/sibModel/CreateSmtpEmail.java @@ -0,0 +1,93 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * CreateSmtpEmail + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class CreateSmtpEmail { + @SerializedName("messageId") + private String messageId = null; + + public CreateSmtpEmail messageId(String messageId) { + this.messageId = messageId; + return this; + } + + /** + * Message ID of the SMTP Email sent + * @return messageId + **/ + @ApiModelProperty(example = "<201798300811.5787683@relay.domain.com>", required = true, value = "Message ID of the SMTP Email sent") + public String getMessageId() { + return messageId; + } + + public void setMessageId(String messageId) { + this.messageId = messageId; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateSmtpEmail createSmtpEmail = (CreateSmtpEmail) o; + return ObjectUtils.equals(this.messageId, createSmtpEmail.messageId); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(messageId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateSmtpEmail {\n"); + + sb.append(" messageId: ").append(toIndentedString(messageId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/CreateSmtpTemplate.java b/src/main/java/sibModel/CreateSmtpTemplate.java new file mode 100644 index 0000000..def47e8 --- /dev/null +++ b/src/main/java/sibModel/CreateSmtpTemplate.java @@ -0,0 +1,301 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import sibModel.CreateSmtpTemplateSender; + +/** + * CreateSmtpTemplate + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class CreateSmtpTemplate { + @SerializedName("tag") + private String tag = null; + + @SerializedName("sender") + private CreateSmtpTemplateSender sender = null; + + @SerializedName("templateName") + private String templateName = null; + + @SerializedName("htmlContent") + private String htmlContent = null; + + @SerializedName("htmlUrl") + private String htmlUrl = null; + + @SerializedName("subject") + private String subject = null; + + @SerializedName("replyTo") + private String replyTo = null; + + @SerializedName("toField") + private String toField = null; + + @SerializedName("attachmentUrl") + private String attachmentUrl = null; + + @SerializedName("isActive") + private Boolean isActive = null; + + public CreateSmtpTemplate tag(String tag) { + this.tag = tag; + return this; + } + + /** + * Tag of the template + * @return tag + **/ + @ApiModelProperty(example = "OrderConfirmation", value = "Tag of the template") + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + public CreateSmtpTemplate sender(CreateSmtpTemplateSender sender) { + this.sender = sender; + return this; + } + + /** + * Get sender + * @return sender + **/ + @ApiModelProperty(required = true, value = "") + public CreateSmtpTemplateSender getSender() { + return sender; + } + + public void setSender(CreateSmtpTemplateSender sender) { + this.sender = sender; + } + + public CreateSmtpTemplate templateName(String templateName) { + this.templateName = templateName; + return this; + } + + /** + * Name of the template + * @return templateName + **/ + @ApiModelProperty(example = "Order Confirmation - EN", required = true, value = "Name of the template") + public String getTemplateName() { + return templateName; + } + + public void setTemplateName(String templateName) { + this.templateName = templateName; + } + + public CreateSmtpTemplate htmlContent(String htmlContent) { + this.htmlContent = htmlContent; + return this; + } + + /** + * Body of the message (HTML version). The field must have more than 10 characters. REQUIRED if htmlUrl is empty + * @return htmlContent + **/ + @ApiModelProperty(example = "The order n°xxxxx has been confirmed. Thanks for your purchase", value = "Body of the message (HTML version). The field must have more than 10 characters. REQUIRED if htmlUrl is empty") + public String getHtmlContent() { + return htmlContent; + } + + public void setHtmlContent(String htmlContent) { + this.htmlContent = htmlContent; + } + + public CreateSmtpTemplate htmlUrl(String htmlUrl) { + this.htmlUrl = htmlUrl; + return this; + } + + /** + * Url which contents the body of the email message. REQUIRED if htmlContent is empty + * @return htmlUrl + **/ + @ApiModelProperty(example = "https://html.domain.com", value = "Url which contents the body of the email message. REQUIRED if htmlContent is empty") + public String getHtmlUrl() { + return htmlUrl; + } + + public void setHtmlUrl(String htmlUrl) { + this.htmlUrl = htmlUrl; + } + + public CreateSmtpTemplate subject(String subject) { + this.subject = subject; + return this; + } + + /** + * Subject of the template + * @return subject + **/ + @ApiModelProperty(example = "Thanks for your purchase !", required = true, value = "Subject of the template") + public String getSubject() { + return subject; + } + + public void setSubject(String subject) { + this.subject = subject; + } + + public CreateSmtpTemplate replyTo(String replyTo) { + this.replyTo = replyTo; + return this; + } + + /** + * Email on which campaign recipients will be able to reply to + * @return replyTo + **/ + @ApiModelProperty(example = "support@myshop.com", value = "Email on which campaign recipients will be able to reply to") + public String getReplyTo() { + return replyTo; + } + + public void setReplyTo(String replyTo) { + this.replyTo = replyTo; + } + + public CreateSmtpTemplate toField(String toField) { + this.toField = toField; + return this; + } + + /** + * This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. To use the contact attributes here, these must already exist in SendinBlue account + * @return toField + **/ + @ApiModelProperty(example = "{FNAME} {LNAME}", value = "This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. To use the contact attributes here, these must already exist in SendinBlue account") + public String getToField() { + return toField; + } + + public void setToField(String toField) { + this.toField = toField; + } + + public CreateSmtpTemplate attachmentUrl(String attachmentUrl) { + this.attachmentUrl = attachmentUrl; + return this; + } + + /** + * Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps + * @return attachmentUrl + **/ + @ApiModelProperty(example = "https://attachment.domain.com", value = "Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps") + public String getAttachmentUrl() { + return attachmentUrl; + } + + public void setAttachmentUrl(String attachmentUrl) { + this.attachmentUrl = attachmentUrl; + } + + public CreateSmtpTemplate isActive(Boolean isActive) { + this.isActive = isActive; + return this; + } + + /** + * Status of template. isActive = true means template is active and isActive = false means template is inactive + * @return isActive + **/ + @ApiModelProperty(example = "true", value = "Status of template. isActive = true means template is active and isActive = false means template is inactive") + public Boolean isIsActive() { + return isActive; + } + + public void setIsActive(Boolean isActive) { + this.isActive = isActive; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateSmtpTemplate createSmtpTemplate = (CreateSmtpTemplate) o; + return ObjectUtils.equals(this.tag, createSmtpTemplate.tag) && + ObjectUtils.equals(this.sender, createSmtpTemplate.sender) && + ObjectUtils.equals(this.templateName, createSmtpTemplate.templateName) && + ObjectUtils.equals(this.htmlContent, createSmtpTemplate.htmlContent) && + ObjectUtils.equals(this.htmlUrl, createSmtpTemplate.htmlUrl) && + ObjectUtils.equals(this.subject, createSmtpTemplate.subject) && + ObjectUtils.equals(this.replyTo, createSmtpTemplate.replyTo) && + ObjectUtils.equals(this.toField, createSmtpTemplate.toField) && + ObjectUtils.equals(this.attachmentUrl, createSmtpTemplate.attachmentUrl) && + ObjectUtils.equals(this.isActive, createSmtpTemplate.isActive); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(tag, sender, templateName, htmlContent, htmlUrl, subject, replyTo, toField, attachmentUrl, isActive); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateSmtpTemplate {\n"); + + sb.append(" tag: ").append(toIndentedString(tag)).append("\n"); + sb.append(" sender: ").append(toIndentedString(sender)).append("\n"); + sb.append(" templateName: ").append(toIndentedString(templateName)).append("\n"); + sb.append(" htmlContent: ").append(toIndentedString(htmlContent)).append("\n"); + sb.append(" htmlUrl: ").append(toIndentedString(htmlUrl)).append("\n"); + sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); + sb.append(" replyTo: ").append(toIndentedString(replyTo)).append("\n"); + sb.append(" toField: ").append(toIndentedString(toField)).append("\n"); + sb.append(" attachmentUrl: ").append(toIndentedString(attachmentUrl)).append("\n"); + sb.append(" isActive: ").append(toIndentedString(isActive)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/CreateSmtpTemplateSender.java b/src/main/java/sibModel/CreateSmtpTemplateSender.java new file mode 100644 index 0000000..fe3216b --- /dev/null +++ b/src/main/java/sibModel/CreateSmtpTemplateSender.java @@ -0,0 +1,116 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * CreateSmtpTemplateSender + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class CreateSmtpTemplateSender { + @SerializedName("name") + private String name = null; + + @SerializedName("email") + private String email = null; + + public CreateSmtpTemplateSender name(String name) { + this.name = name; + return this; + } + + /** + * Name of the sender. If not passed, will be set to default + * @return name + **/ + @ApiModelProperty(example = "Mary from MyShop", value = "Name of the sender. If not passed, will be set to default") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public CreateSmtpTemplateSender email(String email) { + this.email = email; + return this; + } + + /** + * Email of the sender + * @return email + **/ + @ApiModelProperty(example = "contact@myshop.com", required = true, value = "Email of the sender") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateSmtpTemplateSender createSmtpTemplateSender = (CreateSmtpTemplateSender) o; + return ObjectUtils.equals(this.name, createSmtpTemplateSender.name) && + ObjectUtils.equals(this.email, createSmtpTemplateSender.email); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(name, email); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateSmtpTemplateSender {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/CreateUpdateFolder.java b/src/main/java/sibModel/CreateUpdateFolder.java new file mode 100644 index 0000000..96fd4cc --- /dev/null +++ b/src/main/java/sibModel/CreateUpdateFolder.java @@ -0,0 +1,93 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * CreateUpdateFolder + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class CreateUpdateFolder { + @SerializedName("name") + private String name = null; + + public CreateUpdateFolder name(String name) { + this.name = name; + return this; + } + + /** + * Name of the folder + * @return name + **/ + @ApiModelProperty(example = "Wordpress Contacts", value = "Name of the folder") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateUpdateFolder createUpdateFolder = (CreateUpdateFolder) o; + return ObjectUtils.equals(this.name, createUpdateFolder.name); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateUpdateFolder {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/CreateWebhook.java b/src/main/java/sibModel/CreateWebhook.java new file mode 100644 index 0000000..1477292 --- /dev/null +++ b/src/main/java/sibModel/CreateWebhook.java @@ -0,0 +1,288 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * CreateWebhook + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class CreateWebhook { + @SerializedName("url") + private String url = null; + + @SerializedName("description") + private String description = null; + + /** + * Gets or Sets events + */ + @JsonAdapter(EventsEnum.Adapter.class) + public enum EventsEnum { + HARDBOUNCE("hardBounce"), + + SOFTBOUNCE("softBounce"), + + BLOCKED("blocked"), + + SPAM("spam"), + + DELIVERED("delivered"), + + REQUEST("request"), + + CLICK("click"), + + INVALID("invalid"), + + DEFERRED("deferred"), + + OPENED("opened"), + + UNIQUEOPENED("uniqueOpened"), + + UNSUBSCRIBED("unsubscribed"), + + LISTADDITION("listAddition"); + + private String value; + + EventsEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static EventsEnum fromValue(String text) { + for (EventsEnum b : EventsEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final EventsEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public EventsEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return EventsEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("events") + private List events = null; + + /** + * Type of the webhook + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + TRANSACTIONAL("transactional"), + + MARKETING("marketing"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String text) { + for (TypeEnum b : TypeEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("type") + private TypeEnum type = TypeEnum.TRANSACTIONAL; + + public CreateWebhook url(String url) { + this.url = url; + return this; + } + + /** + * URL of the webhook + * @return url + **/ + @ApiModelProperty(example = "http://requestb.in/173lyyx1", required = true, value = "URL of the webhook") + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public CreateWebhook description(String description) { + this.description = description; + return this; + } + + /** + * Description of the webhook + * @return description + **/ + @ApiModelProperty(example = "Webhook triggered on unsubscription", value = "Description of the webhook") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public CreateWebhook events(List events) { + this.events = events; + return this; + } + + public CreateWebhook addEventsItem(EventsEnum eventsItem) { + if (this.events == null) { + this.events = new ArrayList(); + } + this.events.add(eventsItem); + return this; + } + + /** + * Events triggering the webhook. Possible values for Transactional type webhook – request, delivered, hardBounce, softBounce, blocked, spam, invalid, deferred, click, opened, uniqueOpened and unsubscribed and possible values for Marketing type webhook – spam, opened, click, hardBounce, softBounce, unsubscribed, listAddition & delivered + * @return events + **/ + @ApiModelProperty(value = "Events triggering the webhook. Possible values for Transactional type webhook – request, delivered, hardBounce, softBounce, blocked, spam, invalid, deferred, click, opened, uniqueOpened and unsubscribed and possible values for Marketing type webhook – spam, opened, click, hardBounce, softBounce, unsubscribed, listAddition & delivered") + public List getEvents() { + return events; + } + + public void setEvents(List events) { + this.events = events; + } + + public CreateWebhook type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of the webhook + * @return type + **/ + @ApiModelProperty(example = "marketing", value = "Type of the webhook") + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateWebhook createWebhook = (CreateWebhook) o; + return ObjectUtils.equals(this.url, createWebhook.url) && + ObjectUtils.equals(this.description, createWebhook.description) && + ObjectUtils.equals(this.events, createWebhook.events) && + ObjectUtils.equals(this.type, createWebhook.type); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(url, description, events, type); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateWebhook {\n"); + + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" events: ").append(toIndentedString(events)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/CreatedProcessId.java b/src/main/java/sibModel/CreatedProcessId.java new file mode 100644 index 0000000..b45242f --- /dev/null +++ b/src/main/java/sibModel/CreatedProcessId.java @@ -0,0 +1,93 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * CreatedProcessId + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class CreatedProcessId { + @SerializedName("processId") + private Long processId = null; + + public CreatedProcessId processId(Long processId) { + this.processId = processId; + return this; + } + + /** + * Id of the process created + * @return processId + **/ + @ApiModelProperty(example = "78", required = true, value = "Id of the process created") + public Long getProcessId() { + return processId; + } + + public void setProcessId(Long processId) { + this.processId = processId; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreatedProcessId createdProcessId = (CreatedProcessId) o; + return ObjectUtils.equals(this.processId, createdProcessId.processId); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(processId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreatedProcessId {\n"); + + sb.append(" processId: ").append(toIndentedString(processId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/DeleteHardbounces.java b/src/main/java/sibModel/DeleteHardbounces.java new file mode 100644 index 0000000..2dcb2ef --- /dev/null +++ b/src/main/java/sibModel/DeleteHardbounces.java @@ -0,0 +1,140 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.threeten.bp.LocalDate; + +/** + * DeleteHardbounces + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class DeleteHardbounces { + @SerializedName("startDate") + private LocalDate startDate = null; + + @SerializedName("endDate") + private LocalDate endDate = null; + + @SerializedName("contactEmail") + private String contactEmail = null; + + public DeleteHardbounces startDate(LocalDate startDate) { + this.startDate = startDate; + return this; + } + + /** + * Starting date (YYYY-MM-DD) of the period from which the hardbounces will be deleted. Must be lower than equal to endDate + * @return startDate + **/ + @ApiModelProperty(example = "2016-12-31", value = "Starting date (YYYY-MM-DD) of the period from which the hardbounces will be deleted. Must be lower than equal to endDate") + public LocalDate getStartDate() { + return startDate; + } + + public void setStartDate(LocalDate startDate) { + this.startDate = startDate; + } + + public DeleteHardbounces endDate(LocalDate endDate) { + this.endDate = endDate; + return this; + } + + /** + * Ending date (YYYY-MM-DD) of the period from which the hardbounces will be deleted. Must be greater than equal to startDate + * @return endDate + **/ + @ApiModelProperty(example = "2017-01-31", value = "Ending date (YYYY-MM-DD) of the period from which the hardbounces will be deleted. Must be greater than equal to startDate") + public LocalDate getEndDate() { + return endDate; + } + + public void setEndDate(LocalDate endDate) { + this.endDate = endDate; + } + + public DeleteHardbounces contactEmail(String contactEmail) { + this.contactEmail = contactEmail; + return this; + } + + /** + * Target a specific email address + * @return contactEmail + **/ + @ApiModelProperty(example = "alex76@example.com", value = "Target a specific email address") + public String getContactEmail() { + return contactEmail; + } + + public void setContactEmail(String contactEmail) { + this.contactEmail = contactEmail; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteHardbounces deleteHardbounces = (DeleteHardbounces) o; + return ObjectUtils.equals(this.startDate, deleteHardbounces.startDate) && + ObjectUtils.equals(this.endDate, deleteHardbounces.endDate) && + ObjectUtils.equals(this.contactEmail, deleteHardbounces.contactEmail); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(startDate, endDate, contactEmail); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteHardbounces {\n"); + + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); + sb.append(" contactEmail: ").append(toIndentedString(contactEmail)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/EmailExportRecipients.java b/src/main/java/sibModel/EmailExportRecipients.java new file mode 100644 index 0000000..6d6b2bc --- /dev/null +++ b/src/main/java/sibModel/EmailExportRecipients.java @@ -0,0 +1,175 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * EmailExportRecipients + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class EmailExportRecipients { + @SerializedName("notifyURL") + private String notifyURL = null; + + /** + * Type of recipients to export for a campaign + */ + @JsonAdapter(RecipientsTypeEnum.Adapter.class) + public enum RecipientsTypeEnum { + ALL("all"), + + NONCLICKERS("nonClickers"), + + NONOPENERS("nonOpeners"), + + CLICKERS("clickers"), + + OPENERS("openers"), + + SOFTBOUNCES("softBounces"), + + HARDBOUNCES("hardBounces"), + + UNSUBSCRIBED("unsubscribed"); + + private String value; + + RecipientsTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static RecipientsTypeEnum fromValue(String text) { + for (RecipientsTypeEnum b : RecipientsTypeEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final RecipientsTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public RecipientsTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return RecipientsTypeEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("recipientsType") + private RecipientsTypeEnum recipientsType = null; + + public EmailExportRecipients notifyURL(String notifyURL) { + this.notifyURL = notifyURL; + return this; + } + + /** + * Webhook called once the export process is finished + * @return notifyURL + **/ + @ApiModelProperty(example = "http://requestb.in/173lyyx1", value = "Webhook called once the export process is finished") + public String getNotifyURL() { + return notifyURL; + } + + public void setNotifyURL(String notifyURL) { + this.notifyURL = notifyURL; + } + + public EmailExportRecipients recipientsType(RecipientsTypeEnum recipientsType) { + this.recipientsType = recipientsType; + return this; + } + + /** + * Type of recipients to export for a campaign + * @return recipientsType + **/ + @ApiModelProperty(example = "openers", required = true, value = "Type of recipients to export for a campaign") + public RecipientsTypeEnum getRecipientsType() { + return recipientsType; + } + + public void setRecipientsType(RecipientsTypeEnum recipientsType) { + this.recipientsType = recipientsType; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EmailExportRecipients emailExportRecipients = (EmailExportRecipients) o; + return ObjectUtils.equals(this.notifyURL, emailExportRecipients.notifyURL) && + ObjectUtils.equals(this.recipientsType, emailExportRecipients.recipientsType); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(notifyURL, recipientsType); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EmailExportRecipients {\n"); + + sb.append(" notifyURL: ").append(toIndentedString(notifyURL)).append("\n"); + sb.append(" recipientsType: ").append(toIndentedString(recipientsType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/ErrorModel.java b/src/main/java/sibModel/ErrorModel.java new file mode 100644 index 0000000..8a9b45d --- /dev/null +++ b/src/main/java/sibModel/ErrorModel.java @@ -0,0 +1,189 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * ErrorModel + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class ErrorModel { + /** + * Error code displayed in case of a failure + */ + @JsonAdapter(CodeEnum.Adapter.class) + public enum CodeEnum { + INVALID_PARAMETER("invalid_parameter"), + + MISSING_PARAMETER("missing_parameter"), + + OUT_OF_RANGE("out_of_range"), + + CAMPAIGN_PROCESSING("campaign_processing"), + + CAMPAIGN_SENT("campaign_sent"), + + DOCUMENT_NOT_FOUND("document_not_found"), + + RESELLER_PERMISSION_DENIED("reseller_permission_denied"), + + NOT_ENOUGH_CREDITS("not_enough_credits"), + + PERMISSION_DENIED("permission_denied"), + + DUPLICATE_PARAMETER("duplicate_parameter"), + + DUPLICATE_REQUEST("duplicate_request"), + + METHOD_NOT_ALLOWED("method_not_allowed"), + + UNAUTHORIZED("unauthorized"), + + ACCOUNT_UNDER_VALIDATION("account_under_validation"), + + NOT_ACCEPTABLE("not_acceptable"); + + private String value; + + CodeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static CodeEnum fromValue(String text) { + for (CodeEnum b : CodeEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final CodeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public CodeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return CodeEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("code") + private CodeEnum code = null; + + @SerializedName("message") + private String message = null; + + public ErrorModel code(CodeEnum code) { + this.code = code; + return this; + } + + /** + * Error code displayed in case of a failure + * @return code + **/ + @ApiModelProperty(example = "method_not_allowed", required = true, value = "Error code displayed in case of a failure") + public CodeEnum getCode() { + return code; + } + + public void setCode(CodeEnum code) { + this.code = code; + } + + public ErrorModel message(String message) { + this.message = message; + return this; + } + + /** + * Readable message associated to the failure + * @return message + **/ + @ApiModelProperty(example = "POST Method is not allowed on this path", required = true, value = "Readable message associated to the failure") + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ErrorModel errorModel = (ErrorModel) o; + return ObjectUtils.equals(this.code, errorModel.code) && + ObjectUtils.equals(this.message, errorModel.message); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(code, message); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ErrorModel {\n"); + + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetAccount.java b/src/main/java/sibModel/GetAccount.java new file mode 100644 index 0000000..3483ae9 --- /dev/null +++ b/src/main/java/sibModel/GetAccount.java @@ -0,0 +1,266 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import sibModel.GetAccountMarketingAutomation; +import sibModel.GetAccountPlan; +import sibModel.GetAccountRelay; +import sibModel.GetExtendedClient; +import sibModel.GetExtendedClientAddress; + +/** + * GetAccount + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetAccount { + @SerializedName("email") + private String email = null; + + @SerializedName("firstName") + private String firstName = null; + + @SerializedName("lastName") + private String lastName = null; + + @SerializedName("companyName") + private String companyName = null; + + @SerializedName("address") + private GetExtendedClientAddress address = null; + + @SerializedName("plan") + private List plan = new ArrayList(); + + @SerializedName("relay") + private GetAccountRelay relay = null; + + @SerializedName("marketingAutomation") + private GetAccountMarketingAutomation marketingAutomation = null; + + public GetAccount email(String email) { + this.email = email; + return this; + } + + /** + * Login Email + * @return email + **/ + @ApiModelProperty(example = "john.smith@example.com", required = true, value = "Login Email") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public GetAccount firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * First Name + * @return firstName + **/ + @ApiModelProperty(example = "John", required = true, value = "First Name") + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public GetAccount lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Last Name + * @return lastName + **/ + @ApiModelProperty(example = "Smith", required = true, value = "Last Name") + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public GetAccount companyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * Name of the company + * @return companyName + **/ + @ApiModelProperty(example = "MyCompany", required = true, value = "Name of the company") + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + public GetAccount address(GetExtendedClientAddress address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @ApiModelProperty(required = true, value = "") + public GetExtendedClientAddress getAddress() { + return address; + } + + public void setAddress(GetExtendedClientAddress address) { + this.address = address; + } + + public GetAccount plan(List plan) { + this.plan = plan; + return this; + } + + public GetAccount addPlanItem(GetAccountPlan planItem) { + this.plan.add(planItem); + return this; + } + + /** + * Information about your plans and credits + * @return plan + **/ + @ApiModelProperty(required = true, value = "Information about your plans and credits") + public List getPlan() { + return plan; + } + + public void setPlan(List plan) { + this.plan = plan; + } + + public GetAccount relay(GetAccountRelay relay) { + this.relay = relay; + return this; + } + + /** + * Get relay + * @return relay + **/ + @ApiModelProperty(required = true, value = "") + public GetAccountRelay getRelay() { + return relay; + } + + public void setRelay(GetAccountRelay relay) { + this.relay = relay; + } + + public GetAccount marketingAutomation(GetAccountMarketingAutomation marketingAutomation) { + this.marketingAutomation = marketingAutomation; + return this; + } + + /** + * Get marketingAutomation + * @return marketingAutomation + **/ + @ApiModelProperty(value = "") + public GetAccountMarketingAutomation getMarketingAutomation() { + return marketingAutomation; + } + + public void setMarketingAutomation(GetAccountMarketingAutomation marketingAutomation) { + this.marketingAutomation = marketingAutomation; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAccount getAccount = (GetAccount) o; + return ObjectUtils.equals(this.email, getAccount.email) && + ObjectUtils.equals(this.firstName, getAccount.firstName) && + ObjectUtils.equals(this.lastName, getAccount.lastName) && + ObjectUtils.equals(this.companyName, getAccount.companyName) && + ObjectUtils.equals(this.address, getAccount.address) && + ObjectUtils.equals(this.plan, getAccount.plan) && + ObjectUtils.equals(this.relay, getAccount.relay) && + ObjectUtils.equals(this.marketingAutomation, getAccount.marketingAutomation); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(email, firstName, lastName, companyName, address, plan, relay, marketingAutomation); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetAccount {\n"); + + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" plan: ").append(toIndentedString(plan)).append("\n"); + sb.append(" relay: ").append(toIndentedString(relay)).append("\n"); + sb.append(" marketingAutomation: ").append(toIndentedString(marketingAutomation)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetAccountMarketingAutomation.java b/src/main/java/sibModel/GetAccountMarketingAutomation.java new file mode 100644 index 0000000..0ef47b4 --- /dev/null +++ b/src/main/java/sibModel/GetAccountMarketingAutomation.java @@ -0,0 +1,116 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * GetAccountMarketingAutomation + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetAccountMarketingAutomation { + @SerializedName("key") + private String key = null; + + @SerializedName("enabled") + private Boolean enabled = null; + + public GetAccountMarketingAutomation key(String key) { + this.key = key; + return this; + } + + /** + * Marketing Automation Tracker ID + * @return key + **/ + @ApiModelProperty(example = "iso05aopqych87ysy0jymf", value = "Marketing Automation Tracker ID") + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public GetAccountMarketingAutomation enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Status of Marketing Automation Plateform activation for your account (true=enabled, false=disabled) + * @return enabled + **/ + @ApiModelProperty(example = "false", required = true, value = "Status of Marketing Automation Plateform activation for your account (true=enabled, false=disabled)") + public Boolean isEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAccountMarketingAutomation getAccountMarketingAutomation = (GetAccountMarketingAutomation) o; + return ObjectUtils.equals(this.key, getAccountMarketingAutomation.key) && + ObjectUtils.equals(this.enabled, getAccountMarketingAutomation.enabled); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(key, enabled); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetAccountMarketingAutomation {\n"); + + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetAccountPlan.java b/src/main/java/sibModel/GetAccountPlan.java new file mode 100644 index 0000000..1cd7cc3 --- /dev/null +++ b/src/main/java/sibModel/GetAccountPlan.java @@ -0,0 +1,288 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.threeten.bp.LocalDate; + +/** + * GetAccountPlan + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetAccountPlan { + /** + * Displays the plan type of the user + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + PAYASYOUGO("payAsYouGo"), + + UNLIMITED("unlimited"), + + FREE("free"), + + SUBSCRIPTION("subscription"), + + SMS("sms"), + + RESELLER("reseller"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String text) { + for (TypeEnum b : TypeEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("type") + private TypeEnum type = null; + + /** + * This is the type of the credit, \"User Limit\" or \"Send Limit\" are two possible types of credit of a user. \"User Limit\" implies the total number of subscribers you can add to your account, and \"Send Limit\" implies the total number of emails you can send to the subscribers in your account. + */ + @JsonAdapter(CreditsTypeEnum.Adapter.class) + public enum CreditsTypeEnum { + USERLIMIT("userLimit"), + + SENDLIMIT("sendLimit"); + + private String value; + + CreditsTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static CreditsTypeEnum fromValue(String text) { + for (CreditsTypeEnum b : CreditsTypeEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final CreditsTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public CreditsTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return CreditsTypeEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("creditsType") + private CreditsTypeEnum creditsType = null; + + @SerializedName("credits") + private Float credits = null; + + @SerializedName("startDate") + private LocalDate startDate = null; + + @SerializedName("endDate") + private LocalDate endDate = null; + + public GetAccountPlan type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Displays the plan type of the user + * @return type + **/ + @ApiModelProperty(example = "subscription", required = true, value = "Displays the plan type of the user") + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + public GetAccountPlan creditsType(CreditsTypeEnum creditsType) { + this.creditsType = creditsType; + return this; + } + + /** + * This is the type of the credit, \"User Limit\" or \"Send Limit\" are two possible types of credit of a user. \"User Limit\" implies the total number of subscribers you can add to your account, and \"Send Limit\" implies the total number of emails you can send to the subscribers in your account. + * @return creditsType + **/ + @ApiModelProperty(example = "sendLimit", required = true, value = "This is the type of the credit, \"User Limit\" or \"Send Limit\" are two possible types of credit of a user. \"User Limit\" implies the total number of subscribers you can add to your account, and \"Send Limit\" implies the total number of emails you can send to the subscribers in your account.") + public CreditsTypeEnum getCreditsType() { + return creditsType; + } + + public void setCreditsType(CreditsTypeEnum creditsType) { + this.creditsType = creditsType; + } + + public GetAccountPlan credits(Float credits) { + this.credits = credits; + return this; + } + + /** + * Remaining credits of the user. This can either be \"User Limit\" or \"Send Limit\" depending on the plan. + * @return credits + **/ + @ApiModelProperty(example = "8755.0", required = true, value = "Remaining credits of the user. This can either be \"User Limit\" or \"Send Limit\" depending on the plan.") + public Float getCredits() { + return credits; + } + + public void setCredits(Float credits) { + this.credits = credits; + } + + public GetAccountPlan startDate(LocalDate startDate) { + this.startDate = startDate; + return this; + } + + /** + * Date of the period from which the plan will start (only available for \"subscription\", \"unlimited\" and \"reseller\" plan type) + * @return startDate + **/ + @ApiModelProperty(example = "2016-12-31", value = "Date of the period from which the plan will start (only available for \"subscription\", \"unlimited\" and \"reseller\" plan type)") + public LocalDate getStartDate() { + return startDate; + } + + public void setStartDate(LocalDate startDate) { + this.startDate = startDate; + } + + public GetAccountPlan endDate(LocalDate endDate) { + this.endDate = endDate; + return this; + } + + /** + * Date of the period from which the plan will end (only available for \"subscription\", \"unlimited\" and \"reseller\" plan type) + * @return endDate + **/ + @ApiModelProperty(example = "2017-01-31", value = "Date of the period from which the plan will end (only available for \"subscription\", \"unlimited\" and \"reseller\" plan type)") + public LocalDate getEndDate() { + return endDate; + } + + public void setEndDate(LocalDate endDate) { + this.endDate = endDate; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAccountPlan getAccountPlan = (GetAccountPlan) o; + return ObjectUtils.equals(this.type, getAccountPlan.type) && + ObjectUtils.equals(this.creditsType, getAccountPlan.creditsType) && + ObjectUtils.equals(this.credits, getAccountPlan.credits) && + ObjectUtils.equals(this.startDate, getAccountPlan.startDate) && + ObjectUtils.equals(this.endDate, getAccountPlan.endDate); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(type, creditsType, credits, startDate, endDate); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetAccountPlan {\n"); + + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" creditsType: ").append(toIndentedString(creditsType)).append("\n"); + sb.append(" credits: ").append(toIndentedString(credits)).append("\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetAccountRelay.java b/src/main/java/sibModel/GetAccountRelay.java new file mode 100644 index 0000000..2e7a25c --- /dev/null +++ b/src/main/java/sibModel/GetAccountRelay.java @@ -0,0 +1,118 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import sibModel.GetAccountRelayData; + +/** + * Information about your SMTP account + */ +@ApiModel(description = "Information about your SMTP account") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetAccountRelay { + @SerializedName("enabled") + private Boolean enabled = null; + + @SerializedName("data") + private GetAccountRelayData data = null; + + public GetAccountRelay enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Status of your SMTP Account (true=Enabled, false=Disabled) + * @return enabled + **/ + @ApiModelProperty(example = "true", required = true, value = "Status of your SMTP Account (true=Enabled, false=Disabled)") + public Boolean isEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public GetAccountRelay data(GetAccountRelayData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @ApiModelProperty(required = true, value = "") + public GetAccountRelayData getData() { + return data; + } + + public void setData(GetAccountRelayData data) { + this.data = data; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAccountRelay getAccountRelay = (GetAccountRelay) o; + return ObjectUtils.equals(this.enabled, getAccountRelay.enabled) && + ObjectUtils.equals(this.data, getAccountRelay.data); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(enabled, data); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetAccountRelay {\n"); + + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetAccountRelayData.java b/src/main/java/sibModel/GetAccountRelayData.java new file mode 100644 index 0000000..f32c4e9 --- /dev/null +++ b/src/main/java/sibModel/GetAccountRelayData.java @@ -0,0 +1,140 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Data regarding the SMTP account + */ +@ApiModel(description = "Data regarding the SMTP account") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetAccountRelayData { + @SerializedName("userName") + private String userName = null; + + @SerializedName("relay") + private String relay = null; + + @SerializedName("port") + private Integer port = null; + + public GetAccountRelayData userName(String userName) { + this.userName = userName; + return this; + } + + /** + * Email to use as login on SMTP + * @return userName + **/ + @ApiModelProperty(example = "john.smith@example.com", required = true, value = "Email to use as login on SMTP") + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public GetAccountRelayData relay(String relay) { + this.relay = relay; + return this; + } + + /** + * URL of the SMTP Relay + * @return relay + **/ + @ApiModelProperty(example = "relay.domain.com", required = true, value = "URL of the SMTP Relay") + public String getRelay() { + return relay; + } + + public void setRelay(String relay) { + this.relay = relay; + } + + public GetAccountRelayData port(Integer port) { + this.port = port; + return this; + } + + /** + * Port used for SMTP Relay + * @return port + **/ + @ApiModelProperty(example = "125", required = true, value = "Port used for SMTP Relay") + public Integer getPort() { + return port; + } + + public void setPort(Integer port) { + this.port = port; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAccountRelayData getAccountRelayData = (GetAccountRelayData) o; + return ObjectUtils.equals(this.userName, getAccountRelayData.userName) && + ObjectUtils.equals(this.relay, getAccountRelayData.relay) && + ObjectUtils.equals(this.port, getAccountRelayData.port); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(userName, relay, port); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetAccountRelayData {\n"); + + sb.append(" userName: ").append(toIndentedString(userName)).append("\n"); + sb.append(" relay: ").append(toIndentedString(relay)).append("\n"); + sb.append(" port: ").append(toIndentedString(port)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetAggregatedReport.java b/src/main/java/sibModel/GetAggregatedReport.java new file mode 100644 index 0000000..3064f62 --- /dev/null +++ b/src/main/java/sibModel/GetAggregatedReport.java @@ -0,0 +1,346 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * GetAggregatedReport + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetAggregatedReport { + @SerializedName("range") + private String range = null; + + @SerializedName("requests") + private Long requests = null; + + @SerializedName("delivered") + private Long delivered = null; + + @SerializedName("hardBounces") + private Long hardBounces = null; + + @SerializedName("softBounces") + private Long softBounces = null; + + @SerializedName("clicks") + private Long clicks = null; + + @SerializedName("uniqueClicks") + private Long uniqueClicks = null; + + @SerializedName("opens") + private Long opens = null; + + @SerializedName("uniqueOpens") + private Long uniqueOpens = null; + + @SerializedName("spamReports") + private Long spamReports = null; + + @SerializedName("blocked") + private Long blocked = null; + + @SerializedName("invalid") + private Long invalid = null; + + public GetAggregatedReport range(String range) { + this.range = range; + return this; + } + + /** + * Time frame of the report + * @return range + **/ + @ApiModelProperty(example = "2016-09-08|2017-04-06", required = true, value = "Time frame of the report") + public String getRange() { + return range; + } + + public void setRange(String range) { + this.range = range; + } + + public GetAggregatedReport requests(Long requests) { + this.requests = requests; + return this; + } + + /** + * Number of requests for the timeframe + * @return requests + **/ + @ApiModelProperty(example = "263", required = true, value = "Number of requests for the timeframe") + public Long getRequests() { + return requests; + } + + public void setRequests(Long requests) { + this.requests = requests; + } + + public GetAggregatedReport delivered(Long delivered) { + this.delivered = delivered; + return this; + } + + /** + * Number of delivered emails for the timeframe + * @return delivered + **/ + @ApiModelProperty(example = "249", required = true, value = "Number of delivered emails for the timeframe") + public Long getDelivered() { + return delivered; + } + + public void setDelivered(Long delivered) { + this.delivered = delivered; + } + + public GetAggregatedReport hardBounces(Long hardBounces) { + this.hardBounces = hardBounces; + return this; + } + + /** + * Number of hardbounces for the timeframe + * @return hardBounces + **/ + @ApiModelProperty(example = "1", required = true, value = "Number of hardbounces for the timeframe") + public Long getHardBounces() { + return hardBounces; + } + + public void setHardBounces(Long hardBounces) { + this.hardBounces = hardBounces; + } + + public GetAggregatedReport softBounces(Long softBounces) { + this.softBounces = softBounces; + return this; + } + + /** + * Number of softbounces for the timeframe + * @return softBounces + **/ + @ApiModelProperty(example = "4", required = true, value = "Number of softbounces for the timeframe") + public Long getSoftBounces() { + return softBounces; + } + + public void setSoftBounces(Long softBounces) { + this.softBounces = softBounces; + } + + public GetAggregatedReport clicks(Long clicks) { + this.clicks = clicks; + return this; + } + + /** + * Number of clicks for the timeframe + * @return clicks + **/ + @ApiModelProperty(example = "12", required = true, value = "Number of clicks for the timeframe") + public Long getClicks() { + return clicks; + } + + public void setClicks(Long clicks) { + this.clicks = clicks; + } + + public GetAggregatedReport uniqueClicks(Long uniqueClicks) { + this.uniqueClicks = uniqueClicks; + return this; + } + + /** + * Number of unique clicks for the timeframe + * @return uniqueClicks + **/ + @ApiModelProperty(example = "8", required = true, value = "Number of unique clicks for the timeframe") + public Long getUniqueClicks() { + return uniqueClicks; + } + + public void setUniqueClicks(Long uniqueClicks) { + this.uniqueClicks = uniqueClicks; + } + + public GetAggregatedReport opens(Long opens) { + this.opens = opens; + return this; + } + + /** + * Number of openings for the timeframe + * @return opens + **/ + @ApiModelProperty(example = "47", required = true, value = "Number of openings for the timeframe") + public Long getOpens() { + return opens; + } + + public void setOpens(Long opens) { + this.opens = opens; + } + + public GetAggregatedReport uniqueOpens(Long uniqueOpens) { + this.uniqueOpens = uniqueOpens; + return this; + } + + /** + * Number of unique openings for the timeframe + * @return uniqueOpens + **/ + @ApiModelProperty(example = "37", required = true, value = "Number of unique openings for the timeframe") + public Long getUniqueOpens() { + return uniqueOpens; + } + + public void setUniqueOpens(Long uniqueOpens) { + this.uniqueOpens = uniqueOpens; + } + + public GetAggregatedReport spamReports(Long spamReports) { + this.spamReports = spamReports; + return this; + } + + /** + * Number of complaint (spam report) for the timeframe + * @return spamReports + **/ + @ApiModelProperty(example = "0", required = true, value = "Number of complaint (spam report) for the timeframe") + public Long getSpamReports() { + return spamReports; + } + + public void setSpamReports(Long spamReports) { + this.spamReports = spamReports; + } + + public GetAggregatedReport blocked(Long blocked) { + this.blocked = blocked; + return this; + } + + /** + * Number of blocked contact emails for the timeframe + * @return blocked + **/ + @ApiModelProperty(example = "2", required = true, value = "Number of blocked contact emails for the timeframe") + public Long getBlocked() { + return blocked; + } + + public void setBlocked(Long blocked) { + this.blocked = blocked; + } + + public GetAggregatedReport invalid(Long invalid) { + this.invalid = invalid; + return this; + } + + /** + * Number of invalid emails for the timeframe + * @return invalid + **/ + @ApiModelProperty(example = "0", required = true, value = "Number of invalid emails for the timeframe") + public Long getInvalid() { + return invalid; + } + + public void setInvalid(Long invalid) { + this.invalid = invalid; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAggregatedReport getAggregatedReport = (GetAggregatedReport) o; + return ObjectUtils.equals(this.range, getAggregatedReport.range) && + ObjectUtils.equals(this.requests, getAggregatedReport.requests) && + ObjectUtils.equals(this.delivered, getAggregatedReport.delivered) && + ObjectUtils.equals(this.hardBounces, getAggregatedReport.hardBounces) && + ObjectUtils.equals(this.softBounces, getAggregatedReport.softBounces) && + ObjectUtils.equals(this.clicks, getAggregatedReport.clicks) && + ObjectUtils.equals(this.uniqueClicks, getAggregatedReport.uniqueClicks) && + ObjectUtils.equals(this.opens, getAggregatedReport.opens) && + ObjectUtils.equals(this.uniqueOpens, getAggregatedReport.uniqueOpens) && + ObjectUtils.equals(this.spamReports, getAggregatedReport.spamReports) && + ObjectUtils.equals(this.blocked, getAggregatedReport.blocked) && + ObjectUtils.equals(this.invalid, getAggregatedReport.invalid); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(range, requests, delivered, hardBounces, softBounces, clicks, uniqueClicks, opens, uniqueOpens, spamReports, blocked, invalid); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetAggregatedReport {\n"); + + sb.append(" range: ").append(toIndentedString(range)).append("\n"); + sb.append(" requests: ").append(toIndentedString(requests)).append("\n"); + sb.append(" delivered: ").append(toIndentedString(delivered)).append("\n"); + sb.append(" hardBounces: ").append(toIndentedString(hardBounces)).append("\n"); + sb.append(" softBounces: ").append(toIndentedString(softBounces)).append("\n"); + sb.append(" clicks: ").append(toIndentedString(clicks)).append("\n"); + sb.append(" uniqueClicks: ").append(toIndentedString(uniqueClicks)).append("\n"); + sb.append(" opens: ").append(toIndentedString(opens)).append("\n"); + sb.append(" uniqueOpens: ").append(toIndentedString(uniqueOpens)).append("\n"); + sb.append(" spamReports: ").append(toIndentedString(spamReports)).append("\n"); + sb.append(" blocked: ").append(toIndentedString(blocked)).append("\n"); + sb.append(" invalid: ").append(toIndentedString(invalid)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetAttributes.java b/src/main/java/sibModel/GetAttributes.java new file mode 100644 index 0000000..426c68a --- /dev/null +++ b/src/main/java/sibModel/GetAttributes.java @@ -0,0 +1,101 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import sibModel.GetAttributesAttributes; + +/** + * GetAttributes + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetAttributes { + @SerializedName("attributes") + private List attributes = new ArrayList(); + + public GetAttributes attributes(List attributes) { + this.attributes = attributes; + return this; + } + + public GetAttributes addAttributesItem(GetAttributesAttributes attributesItem) { + this.attributes.add(attributesItem); + return this; + } + + /** + * Listing of available contact attributes in your account + * @return attributes + **/ + @ApiModelProperty(required = true, value = "Listing of available contact attributes in your account") + public List getAttributes() { + return attributes; + } + + public void setAttributes(List attributes) { + this.attributes = attributes; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAttributes getAttributes = (GetAttributes) o; + return ObjectUtils.equals(this.attributes, getAttributes.attributes); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(attributes); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetAttributes {\n"); + + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetAttributesAttributes.java b/src/main/java/sibModel/GetAttributesAttributes.java new file mode 100644 index 0000000..238cd0a --- /dev/null +++ b/src/main/java/sibModel/GetAttributesAttributes.java @@ -0,0 +1,300 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import sibModel.GetAttributesEnumeration; + +/** + * GetAttributesAttributes + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetAttributesAttributes { + @SerializedName("name") + private String name = null; + + /** + * Category of the attribute + */ + @JsonAdapter(CategoryEnum.Adapter.class) + public enum CategoryEnum { + NORMAL("normal"), + + TRANSACTIONAL("transactional"), + + CATEGORY("category"), + + CALCULATED("calculated"), + + GLOBAL("global"); + + private String value; + + CategoryEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static CategoryEnum fromValue(String text) { + for (CategoryEnum b : CategoryEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final CategoryEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public CategoryEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return CategoryEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("category") + private CategoryEnum category = null; + + /** + * Type of the attribute + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + TEXT("text"), + + DATE("date"), + + FLOAT("float"), + + ID("id"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String text) { + for (TypeEnum b : TypeEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("type") + private TypeEnum type = null; + + @SerializedName("enumeration") + private List enumeration = null; + + @SerializedName("calculatedValue") + private String calculatedValue = null; + + public GetAttributesAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Name of the attribute + * @return name + **/ + @ApiModelProperty(example = "LASTNAME", required = true, value = "Name of the attribute") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public GetAttributesAttributes category(CategoryEnum category) { + this.category = category; + return this; + } + + /** + * Category of the attribute + * @return category + **/ + @ApiModelProperty(example = "category", required = true, value = "Category of the attribute") + public CategoryEnum getCategory() { + return category; + } + + public void setCategory(CategoryEnum category) { + this.category = category; + } + + public GetAttributesAttributes type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of the attribute + * @return type + **/ + @ApiModelProperty(example = "text", value = "Type of the attribute") + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + public GetAttributesAttributes enumeration(List enumeration) { + this.enumeration = enumeration; + return this; + } + + public GetAttributesAttributes addEnumerationItem(GetAttributesEnumeration enumerationItem) { + if (this.enumeration == null) { + this.enumeration = new ArrayList(); + } + this.enumeration.add(enumerationItem); + return this; + } + + /** + * Parameter only available for \"category\" type attributes. + * @return enumeration + **/ + @ApiModelProperty(value = "Parameter only available for \"category\" type attributes.") + public List getEnumeration() { + return enumeration; + } + + public void setEnumeration(List enumeration) { + this.enumeration = enumeration; + } + + public GetAttributesAttributes calculatedValue(String calculatedValue) { + this.calculatedValue = calculatedValue; + return this; + } + + /** + * Calculated value formula + * @return calculatedValue + **/ + @ApiModelProperty(example = "COUNT[ORDER_ID,ORDER_DATE,==,NOW(-1)]", value = "Calculated value formula") + public String getCalculatedValue() { + return calculatedValue; + } + + public void setCalculatedValue(String calculatedValue) { + this.calculatedValue = calculatedValue; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAttributesAttributes getAttributesAttributes = (GetAttributesAttributes) o; + return ObjectUtils.equals(this.name, getAttributesAttributes.name) && + ObjectUtils.equals(this.category, getAttributesAttributes.category) && + ObjectUtils.equals(this.type, getAttributesAttributes.type) && + ObjectUtils.equals(this.enumeration, getAttributesAttributes.enumeration) && + ObjectUtils.equals(this.calculatedValue, getAttributesAttributes.calculatedValue); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(name, category, type, enumeration, calculatedValue); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetAttributesAttributes {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" enumeration: ").append(toIndentedString(enumeration)).append("\n"); + sb.append(" calculatedValue: ").append(toIndentedString(calculatedValue)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetAttributesEnumeration.java b/src/main/java/sibModel/GetAttributesEnumeration.java new file mode 100644 index 0000000..c269c2d --- /dev/null +++ b/src/main/java/sibModel/GetAttributesEnumeration.java @@ -0,0 +1,116 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * GetAttributesEnumeration + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetAttributesEnumeration { + @SerializedName("value") + private Long value = null; + + @SerializedName("label") + private String label = null; + + public GetAttributesEnumeration value(Long value) { + this.value = value; + return this; + } + + /** + * ID of Value of the \"category\" type attribute + * @return value + **/ + @ApiModelProperty(example = "1", required = true, value = "ID of Value of the \"category\" type attribute") + public Long getValue() { + return value; + } + + public void setValue(Long value) { + this.value = value; + } + + public GetAttributesEnumeration label(String label) { + this.label = label; + return this; + } + + /** + * Label of the \"category\" type attribute + * @return label + **/ + @ApiModelProperty(example = "Women", required = true, value = "Label of the \"category\" type attribute") + public String getLabel() { + return label; + } + + public void setLabel(String label) { + this.label = label; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAttributesEnumeration getAttributesEnumeration = (GetAttributesEnumeration) o; + return ObjectUtils.equals(this.value, getAttributesEnumeration.value) && + ObjectUtils.equals(this.label, getAttributesEnumeration.label); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(value, label); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetAttributesEnumeration {\n"); + + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" label: ").append(toIndentedString(label)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetCampaignOverview.java b/src/main/java/sibModel/GetCampaignOverview.java new file mode 100644 index 0000000..c35fe48 --- /dev/null +++ b/src/main/java/sibModel/GetCampaignOverview.java @@ -0,0 +1,311 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.threeten.bp.OffsetDateTime; + +/** + * GetCampaignOverview + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetCampaignOverview { + @SerializedName("id") + private Long id = null; + + @SerializedName("name") + private String name = null; + + @SerializedName("subject") + private String subject = null; + + /** + * Type of campaign + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + CLASSIC("classic"), + + TRIGGER("trigger"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String text) { + for (TypeEnum b : TypeEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("type") + private TypeEnum type = null; + + /** + * Status of the campaign + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + DRAFT("draft"), + + SENT("sent"), + + ARCHIVE("archive"), + + QUEUED("queued"), + + SUSPENDED("suspended"), + + IN_PROCESS("in_process"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String text) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("status") + private StatusEnum status = null; + + @SerializedName("scheduledAt") + private OffsetDateTime scheduledAt = null; + + public GetCampaignOverview id(Long id) { + this.id = id; + return this; + } + + /** + * ID of the campaign + * @return id + **/ + @ApiModelProperty(example = "12", required = true, value = "ID of the campaign") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public GetCampaignOverview name(String name) { + this.name = name; + return this; + } + + /** + * Name of the campaign + * @return name + **/ + @ApiModelProperty(example = "EN - Sales Summer 2017", required = true, value = "Name of the campaign") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public GetCampaignOverview subject(String subject) { + this.subject = subject; + return this; + } + + /** + * Subject of the campaign + * @return subject + **/ + @ApiModelProperty(example = "20% OFF for 2017 Summer Sales", required = true, value = "Subject of the campaign") + public String getSubject() { + return subject; + } + + public void setSubject(String subject) { + this.subject = subject; + } + + public GetCampaignOverview type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of campaign + * @return type + **/ + @ApiModelProperty(example = "classic", required = true, value = "Type of campaign") + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + public GetCampaignOverview status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Status of the campaign + * @return status + **/ + @ApiModelProperty(example = "sent", required = true, value = "Status of the campaign") + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + public GetCampaignOverview scheduledAt(OffsetDateTime scheduledAt) { + this.scheduledAt = scheduledAt; + return this; + } + + /** + * UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @return scheduledAt + **/ + @ApiModelProperty(example = "2017-06-01T12:30:00Z", value = "UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ)") + public OffsetDateTime getScheduledAt() { + return scheduledAt; + } + + public void setScheduledAt(OffsetDateTime scheduledAt) { + this.scheduledAt = scheduledAt; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCampaignOverview getCampaignOverview = (GetCampaignOverview) o; + return ObjectUtils.equals(this.id, getCampaignOverview.id) && + ObjectUtils.equals(this.name, getCampaignOverview.name) && + ObjectUtils.equals(this.subject, getCampaignOverview.subject) && + ObjectUtils.equals(this.type, getCampaignOverview.type) && + ObjectUtils.equals(this.status, getCampaignOverview.status) && + ObjectUtils.equals(this.scheduledAt, getCampaignOverview.scheduledAt); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(id, name, subject, type, status, scheduledAt); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetCampaignOverview {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" scheduledAt: ").append(toIndentedString(scheduledAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetCampaignRecipients.java b/src/main/java/sibModel/GetCampaignRecipients.java new file mode 100644 index 0000000..5a6037f --- /dev/null +++ b/src/main/java/sibModel/GetCampaignRecipients.java @@ -0,0 +1,128 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * GetCampaignRecipients + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetCampaignRecipients { + @SerializedName("lists") + private List lists = new ArrayList(); + + @SerializedName("exclusionLists") + private List exclusionLists = new ArrayList(); + + public GetCampaignRecipients lists(List lists) { + this.lists = lists; + return this; + } + + public GetCampaignRecipients addListsItem(Long listsItem) { + this.lists.add(listsItem); + return this; + } + + /** + * Get lists + * @return lists + **/ + @ApiModelProperty(required = true, value = "") + public List getLists() { + return lists; + } + + public void setLists(List lists) { + this.lists = lists; + } + + public GetCampaignRecipients exclusionLists(List exclusionLists) { + this.exclusionLists = exclusionLists; + return this; + } + + public GetCampaignRecipients addExclusionListsItem(Long exclusionListsItem) { + this.exclusionLists.add(exclusionListsItem); + return this; + } + + /** + * Get exclusionLists + * @return exclusionLists + **/ + @ApiModelProperty(required = true, value = "") + public List getExclusionLists() { + return exclusionLists; + } + + public void setExclusionLists(List exclusionLists) { + this.exclusionLists = exclusionLists; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCampaignRecipients getCampaignRecipients = (GetCampaignRecipients) o; + return ObjectUtils.equals(this.lists, getCampaignRecipients.lists) && + ObjectUtils.equals(this.exclusionLists, getCampaignRecipients.exclusionLists); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(lists, exclusionLists); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetCampaignRecipients {\n"); + + sb.append(" lists: ").append(toIndentedString(lists)).append("\n"); + sb.append(" exclusionLists: ").append(toIndentedString(exclusionLists)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetCampaignStats.java b/src/main/java/sibModel/GetCampaignStats.java new file mode 100644 index 0000000..c273cff --- /dev/null +++ b/src/main/java/sibModel/GetCampaignStats.java @@ -0,0 +1,346 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * GetCampaignStats + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetCampaignStats { + @SerializedName("listId") + private Long listId = null; + + @SerializedName("uniqueClicks") + private Long uniqueClicks = null; + + @SerializedName("clickers") + private Long clickers = null; + + @SerializedName("complaints") + private Long complaints = null; + + @SerializedName("delivered") + private Long delivered = null; + + @SerializedName("sent") + private Long sent = null; + + @SerializedName("softBounces") + private Long softBounces = null; + + @SerializedName("hardBounces") + private Long hardBounces = null; + + @SerializedName("uniqueViews") + private Long uniqueViews = null; + + @SerializedName("unsubscriptions") + private Long unsubscriptions = null; + + @SerializedName("viewed") + private Long viewed = null; + + @SerializedName("deferred") + private Long deferred = null; + + public GetCampaignStats listId(Long listId) { + this.listId = listId; + return this; + } + + /** + * List Id of email campaign (only in case of get email campaign(s)) + * @return listId + **/ + @ApiModelProperty(example = "2", value = "List Id of email campaign (only in case of get email campaign(s))") + public Long getListId() { + return listId; + } + + public void setListId(Long listId) { + this.listId = listId; + } + + public GetCampaignStats uniqueClicks(Long uniqueClicks) { + this.uniqueClicks = uniqueClicks; + return this; + } + + /** + * Number of unique clicks for the campaign + * @return uniqueClicks + **/ + @ApiModelProperty(example = "2300", required = true, value = "Number of unique clicks for the campaign") + public Long getUniqueClicks() { + return uniqueClicks; + } + + public void setUniqueClicks(Long uniqueClicks) { + this.uniqueClicks = uniqueClicks; + } + + public GetCampaignStats clickers(Long clickers) { + this.clickers = clickers; + return this; + } + + /** + * Number of clicks for the campaign + * @return clickers + **/ + @ApiModelProperty(example = "2665", required = true, value = "Number of clicks for the campaign") + public Long getClickers() { + return clickers; + } + + public void setClickers(Long clickers) { + this.clickers = clickers; + } + + public GetCampaignStats complaints(Long complaints) { + this.complaints = complaints; + return this; + } + + /** + * Number of complaints (Spam reports) for the campaign + * @return complaints + **/ + @ApiModelProperty(example = "1", required = true, value = "Number of complaints (Spam reports) for the campaign") + public Long getComplaints() { + return complaints; + } + + public void setComplaints(Long complaints) { + this.complaints = complaints; + } + + public GetCampaignStats delivered(Long delivered) { + this.delivered = delivered; + return this; + } + + /** + * Number of delivered emails for the campaign + * @return delivered + **/ + @ApiModelProperty(example = "19765", required = true, value = "Number of delivered emails for the campaign") + public Long getDelivered() { + return delivered; + } + + public void setDelivered(Long delivered) { + this.delivered = delivered; + } + + public GetCampaignStats sent(Long sent) { + this.sent = sent; + return this; + } + + /** + * Number of sent emails for the campaign + * @return sent + **/ + @ApiModelProperty(example = "19887", required = true, value = "Number of sent emails for the campaign") + public Long getSent() { + return sent; + } + + public void setSent(Long sent) { + this.sent = sent; + } + + public GetCampaignStats softBounces(Long softBounces) { + this.softBounces = softBounces; + return this; + } + + /** + * Number of softbounce for the campaign + * @return softBounces + **/ + @ApiModelProperty(example = "100", required = true, value = "Number of softbounce for the campaign") + public Long getSoftBounces() { + return softBounces; + } + + public void setSoftBounces(Long softBounces) { + this.softBounces = softBounces; + } + + public GetCampaignStats hardBounces(Long hardBounces) { + this.hardBounces = hardBounces; + return this; + } + + /** + * Number of harbounce for the campaign + * @return hardBounces + **/ + @ApiModelProperty(example = "87", required = true, value = "Number of harbounce for the campaign") + public Long getHardBounces() { + return hardBounces; + } + + public void setHardBounces(Long hardBounces) { + this.hardBounces = hardBounces; + } + + public GetCampaignStats uniqueViews(Long uniqueViews) { + this.uniqueViews = uniqueViews; + return this; + } + + /** + * Number of unique openings for the campaign + * @return uniqueViews + **/ + @ApiModelProperty(example = "7779", required = true, value = "Number of unique openings for the campaign") + public Long getUniqueViews() { + return uniqueViews; + } + + public void setUniqueViews(Long uniqueViews) { + this.uniqueViews = uniqueViews; + } + + public GetCampaignStats unsubscriptions(Long unsubscriptions) { + this.unsubscriptions = unsubscriptions; + return this; + } + + /** + * Number of unsubscription for the campaign + * @return unsubscriptions + **/ + @ApiModelProperty(example = "2", required = true, value = "Number of unsubscription for the campaign") + public Long getUnsubscriptions() { + return unsubscriptions; + } + + public void setUnsubscriptions(Long unsubscriptions) { + this.unsubscriptions = unsubscriptions; + } + + public GetCampaignStats viewed(Long viewed) { + this.viewed = viewed; + return this; + } + + /** + * Number of openings for the campaign + * @return viewed + **/ + @ApiModelProperty(example = "8999", required = true, value = "Number of openings for the campaign") + public Long getViewed() { + return viewed; + } + + public void setViewed(Long viewed) { + this.viewed = viewed; + } + + public GetCampaignStats deferred(Long deferred) { + this.deferred = deferred; + return this; + } + + /** + * Number of deferred emails for the campaign + * @return deferred + **/ + @ApiModelProperty(example = "30", required = true, value = "Number of deferred emails for the campaign") + public Long getDeferred() { + return deferred; + } + + public void setDeferred(Long deferred) { + this.deferred = deferred; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCampaignStats getCampaignStats = (GetCampaignStats) o; + return ObjectUtils.equals(this.listId, getCampaignStats.listId) && + ObjectUtils.equals(this.uniqueClicks, getCampaignStats.uniqueClicks) && + ObjectUtils.equals(this.clickers, getCampaignStats.clickers) && + ObjectUtils.equals(this.complaints, getCampaignStats.complaints) && + ObjectUtils.equals(this.delivered, getCampaignStats.delivered) && + ObjectUtils.equals(this.sent, getCampaignStats.sent) && + ObjectUtils.equals(this.softBounces, getCampaignStats.softBounces) && + ObjectUtils.equals(this.hardBounces, getCampaignStats.hardBounces) && + ObjectUtils.equals(this.uniqueViews, getCampaignStats.uniqueViews) && + ObjectUtils.equals(this.unsubscriptions, getCampaignStats.unsubscriptions) && + ObjectUtils.equals(this.viewed, getCampaignStats.viewed) && + ObjectUtils.equals(this.deferred, getCampaignStats.deferred); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(listId, uniqueClicks, clickers, complaints, delivered, sent, softBounces, hardBounces, uniqueViews, unsubscriptions, viewed, deferred); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetCampaignStats {\n"); + + sb.append(" listId: ").append(toIndentedString(listId)).append("\n"); + sb.append(" uniqueClicks: ").append(toIndentedString(uniqueClicks)).append("\n"); + sb.append(" clickers: ").append(toIndentedString(clickers)).append("\n"); + sb.append(" complaints: ").append(toIndentedString(complaints)).append("\n"); + sb.append(" delivered: ").append(toIndentedString(delivered)).append("\n"); + sb.append(" sent: ").append(toIndentedString(sent)).append("\n"); + sb.append(" softBounces: ").append(toIndentedString(softBounces)).append("\n"); + sb.append(" hardBounces: ").append(toIndentedString(hardBounces)).append("\n"); + sb.append(" uniqueViews: ").append(toIndentedString(uniqueViews)).append("\n"); + sb.append(" unsubscriptions: ").append(toIndentedString(unsubscriptions)).append("\n"); + sb.append(" viewed: ").append(toIndentedString(viewed)).append("\n"); + sb.append(" deferred: ").append(toIndentedString(deferred)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetChildInfo.java b/src/main/java/sibModel/GetChildInfo.java new file mode 100644 index 0000000..6884b2d --- /dev/null +++ b/src/main/java/sibModel/GetChildInfo.java @@ -0,0 +1,291 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import sibModel.GetChildInfoApiKeys; +import sibModel.GetChildInfoCredits; +import sibModel.GetChildInfoStatistics; +import sibModel.GetClient; + +/** + * GetChildInfo + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetChildInfo { + @SerializedName("email") + private String email = null; + + @SerializedName("firstName") + private String firstName = null; + + @SerializedName("lastName") + private String lastName = null; + + @SerializedName("companyName") + private String companyName = null; + + @SerializedName("credits") + private GetChildInfoCredits credits = null; + + @SerializedName("statistics") + private GetChildInfoStatistics statistics = null; + + @SerializedName("password") + private String password = null; + + @SerializedName("ips") + private List ips = null; + + @SerializedName("apiKeys") + private GetChildInfoApiKeys apiKeys = null; + + public GetChildInfo email(String email) { + this.email = email; + return this; + } + + /** + * Login Email + * @return email + **/ + @ApiModelProperty(example = "john.smith@example.com", required = true, value = "Login Email") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public GetChildInfo firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * First Name + * @return firstName + **/ + @ApiModelProperty(example = "John", required = true, value = "First Name") + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public GetChildInfo lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Last Name + * @return lastName + **/ + @ApiModelProperty(example = "Smith", required = true, value = "Last Name") + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public GetChildInfo companyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * Name of the company + * @return companyName + **/ + @ApiModelProperty(example = "MyCompany", required = true, value = "Name of the company") + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + public GetChildInfo credits(GetChildInfoCredits credits) { + this.credits = credits; + return this; + } + + /** + * Get credits + * @return credits + **/ + @ApiModelProperty(value = "") + public GetChildInfoCredits getCredits() { + return credits; + } + + public void setCredits(GetChildInfoCredits credits) { + this.credits = credits; + } + + public GetChildInfo statistics(GetChildInfoStatistics statistics) { + this.statistics = statistics; + return this; + } + + /** + * Get statistics + * @return statistics + **/ + @ApiModelProperty(value = "") + public GetChildInfoStatistics getStatistics() { + return statistics; + } + + public void setStatistics(GetChildInfoStatistics statistics) { + this.statistics = statistics; + } + + public GetChildInfo password(String password) { + this.password = password; + return this; + } + + /** + * The encrypted password of child account + * @return password + **/ + @ApiModelProperty(example = "abC01De2fGHI3jkL", required = true, value = "The encrypted password of child account") + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public GetChildInfo ips(List ips) { + this.ips = ips; + return this; + } + + public GetChildInfo addIpsItem(String ipsItem) { + if (this.ips == null) { + this.ips = new ArrayList(); + } + this.ips.add(ipsItem); + return this; + } + + /** + * IP(s) associated to a child account user + * @return ips + **/ + @ApiModelProperty(value = "IP(s) associated to a child account user") + public List getIps() { + return ips; + } + + public void setIps(List ips) { + this.ips = ips; + } + + public GetChildInfo apiKeys(GetChildInfoApiKeys apiKeys) { + this.apiKeys = apiKeys; + return this; + } + + /** + * Get apiKeys + * @return apiKeys + **/ + @ApiModelProperty(value = "") + public GetChildInfoApiKeys getApiKeys() { + return apiKeys; + } + + public void setApiKeys(GetChildInfoApiKeys apiKeys) { + this.apiKeys = apiKeys; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetChildInfo getChildInfo = (GetChildInfo) o; + return ObjectUtils.equals(this.email, getChildInfo.email) && + ObjectUtils.equals(this.firstName, getChildInfo.firstName) && + ObjectUtils.equals(this.lastName, getChildInfo.lastName) && + ObjectUtils.equals(this.companyName, getChildInfo.companyName) && + ObjectUtils.equals(this.credits, getChildInfo.credits) && + ObjectUtils.equals(this.statistics, getChildInfo.statistics) && + ObjectUtils.equals(this.password, getChildInfo.password) && + ObjectUtils.equals(this.ips, getChildInfo.ips) && + ObjectUtils.equals(this.apiKeys, getChildInfo.apiKeys); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(email, firstName, lastName, companyName, credits, statistics, password, ips, apiKeys); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetChildInfo {\n"); + + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); + sb.append(" credits: ").append(toIndentedString(credits)).append("\n"); + sb.append(" statistics: ").append(toIndentedString(statistics)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" ips: ").append(toIndentedString(ips)).append("\n"); + sb.append(" apiKeys: ").append(toIndentedString(apiKeys)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetChildInfoApiKeys.java b/src/main/java/sibModel/GetChildInfoApiKeys.java new file mode 100644 index 0000000..577342c --- /dev/null +++ b/src/main/java/sibModel/GetChildInfoApiKeys.java @@ -0,0 +1,134 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import sibModel.GetChildInfoApiKeysV2; +import sibModel.GetChildInfoApiKeysV3; + +/** + * API Keys associated to child account + */ +@ApiModel(description = "API Keys associated to child account") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetChildInfoApiKeys { + @SerializedName("v2") + private List v2 = new ArrayList(); + + @SerializedName("v3") + private List v3 = null; + + public GetChildInfoApiKeys v2(List v2) { + this.v2 = v2; + return this; + } + + public GetChildInfoApiKeys addV2Item(GetChildInfoApiKeysV2 v2Item) { + this.v2.add(v2Item); + return this; + } + + /** + * Get v2 + * @return v2 + **/ + @ApiModelProperty(required = true, value = "") + public List getV2() { + return v2; + } + + public void setV2(List v2) { + this.v2 = v2; + } + + public GetChildInfoApiKeys v3(List v3) { + this.v3 = v3; + return this; + } + + public GetChildInfoApiKeys addV3Item(GetChildInfoApiKeysV3 v3Item) { + if (this.v3 == null) { + this.v3 = new ArrayList(); + } + this.v3.add(v3Item); + return this; + } + + /** + * Get v3 + * @return v3 + **/ + @ApiModelProperty(value = "") + public List getV3() { + return v3; + } + + public void setV3(List v3) { + this.v3 = v3; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetChildInfoApiKeys getChildInfoApiKeys = (GetChildInfoApiKeys) o; + return ObjectUtils.equals(this.v2, getChildInfoApiKeys.v2) && + ObjectUtils.equals(this.v3, getChildInfoApiKeys.v3); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(v2, v3); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetChildInfoApiKeys {\n"); + + sb.append(" v2: ").append(toIndentedString(v2)).append("\n"); + sb.append(" v3: ").append(toIndentedString(v3)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetChildInfoApiKeysV2.java b/src/main/java/sibModel/GetChildInfoApiKeysV2.java new file mode 100644 index 0000000..5662b1a --- /dev/null +++ b/src/main/java/sibModel/GetChildInfoApiKeysV2.java @@ -0,0 +1,116 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * GetChildInfoApiKeysV2 + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetChildInfoApiKeysV2 { + @SerializedName("name") + private String name = null; + + @SerializedName("key") + private String key = null; + + public GetChildInfoApiKeysV2 name(String name) { + this.name = name; + return this; + } + + /** + * Name of the key for version 2 + * @return name + **/ + @ApiModelProperty(example = "N˚2", required = true, value = "Name of the key for version 2") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public GetChildInfoApiKeysV2 key(String key) { + this.key = key; + return this; + } + + /** + * API Key for version 2 + * @return key + **/ + @ApiModelProperty(example = "nOpxxxxxy7z", required = true, value = "API Key for version 2") + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetChildInfoApiKeysV2 getChildInfoApiKeysV2 = (GetChildInfoApiKeysV2) o; + return ObjectUtils.equals(this.name, getChildInfoApiKeysV2.name) && + ObjectUtils.equals(this.key, getChildInfoApiKeysV2.key); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(name, key); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetChildInfoApiKeysV2 {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetChildInfoApiKeysV3.java b/src/main/java/sibModel/GetChildInfoApiKeysV3.java new file mode 100644 index 0000000..7580310 --- /dev/null +++ b/src/main/java/sibModel/GetChildInfoApiKeysV3.java @@ -0,0 +1,116 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * GetChildInfoApiKeysV3 + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetChildInfoApiKeysV3 { + @SerializedName("name") + private String name = null; + + @SerializedName("key") + private String key = null; + + public GetChildInfoApiKeysV3 name(String name) { + this.name = name; + return this; + } + + /** + * Name of the key for version 3 + * @return name + **/ + @ApiModelProperty(example = "N˚3", required = true, value = "Name of the key for version 3") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public GetChildInfoApiKeysV3 key(String key) { + this.key = key; + return this; + } + + /** + * API Key for version 3 + * @return key + **/ + @ApiModelProperty(example = "xkeysib-21881axxxxxcc92e04-mIrexxxx7z", required = true, value = "API Key for version 3") + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetChildInfoApiKeysV3 getChildInfoApiKeysV3 = (GetChildInfoApiKeysV3) o; + return ObjectUtils.equals(this.name, getChildInfoApiKeysV3.name) && + ObjectUtils.equals(this.key, getChildInfoApiKeysV3.key); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(name, key); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetChildInfoApiKeysV3 {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetChildInfoCredits.java b/src/main/java/sibModel/GetChildInfoCredits.java new file mode 100644 index 0000000..fa26da6 --- /dev/null +++ b/src/main/java/sibModel/GetChildInfoCredits.java @@ -0,0 +1,117 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Credits available for your child + */ +@ApiModel(description = "Credits available for your child") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetChildInfoCredits { + @SerializedName("emailCredits") + private Long emailCredits = null; + + @SerializedName("smsCredits") + private Long smsCredits = null; + + public GetChildInfoCredits emailCredits(Long emailCredits) { + this.emailCredits = emailCredits; + return this; + } + + /** + * Email credits available for your child + * @return emailCredits + **/ + @ApiModelProperty(example = "98555", value = "Email credits available for your child") + public Long getEmailCredits() { + return emailCredits; + } + + public void setEmailCredits(Long emailCredits) { + this.emailCredits = emailCredits; + } + + public GetChildInfoCredits smsCredits(Long smsCredits) { + this.smsCredits = smsCredits; + return this; + } + + /** + * SMS credits available for your child + * @return smsCredits + **/ + @ApiModelProperty(example = "87556", value = "SMS credits available for your child") + public Long getSmsCredits() { + return smsCredits; + } + + public void setSmsCredits(Long smsCredits) { + this.smsCredits = smsCredits; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetChildInfoCredits getChildInfoCredits = (GetChildInfoCredits) o; + return ObjectUtils.equals(this.emailCredits, getChildInfoCredits.emailCredits) && + ObjectUtils.equals(this.smsCredits, getChildInfoCredits.smsCredits); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(emailCredits, smsCredits); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetChildInfoCredits {\n"); + + sb.append(" emailCredits: ").append(toIndentedString(emailCredits)).append("\n"); + sb.append(" smsCredits: ").append(toIndentedString(smsCredits)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetChildInfoStatistics.java b/src/main/java/sibModel/GetChildInfoStatistics.java new file mode 100644 index 0000000..e0393f2 --- /dev/null +++ b/src/main/java/sibModel/GetChildInfoStatistics.java @@ -0,0 +1,140 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Statistics about your child account activity + */ +@ApiModel(description = "Statistics about your child account activity") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetChildInfoStatistics { + @SerializedName("previousMonthTotalSent") + private Long previousMonthTotalSent = null; + + @SerializedName("currentMonthTotalSent") + private Long currentMonthTotalSent = null; + + @SerializedName("totalSent") + private Long totalSent = null; + + public GetChildInfoStatistics previousMonthTotalSent(Long previousMonthTotalSent) { + this.previousMonthTotalSent = previousMonthTotalSent; + return this; + } + + /** + * Overall emails sent for the previous month + * @return previousMonthTotalSent + **/ + @ApiModelProperty(example = "7654", value = "Overall emails sent for the previous month") + public Long getPreviousMonthTotalSent() { + return previousMonthTotalSent; + } + + public void setPreviousMonthTotalSent(Long previousMonthTotalSent) { + this.previousMonthTotalSent = previousMonthTotalSent; + } + + public GetChildInfoStatistics currentMonthTotalSent(Long currentMonthTotalSent) { + this.currentMonthTotalSent = currentMonthTotalSent; + return this; + } + + /** + * Overall emails sent for current month + * @return currentMonthTotalSent + **/ + @ApiModelProperty(example = "4566", value = "Overall emails sent for current month") + public Long getCurrentMonthTotalSent() { + return currentMonthTotalSent; + } + + public void setCurrentMonthTotalSent(Long currentMonthTotalSent) { + this.currentMonthTotalSent = currentMonthTotalSent; + } + + public GetChildInfoStatistics totalSent(Long totalSent) { + this.totalSent = totalSent; + return this; + } + + /** + * Overall emails sent for since the account exists + * @return totalSent + **/ + @ApiModelProperty(example = "987554", value = "Overall emails sent for since the account exists") + public Long getTotalSent() { + return totalSent; + } + + public void setTotalSent(Long totalSent) { + this.totalSent = totalSent; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetChildInfoStatistics getChildInfoStatistics = (GetChildInfoStatistics) o; + return ObjectUtils.equals(this.previousMonthTotalSent, getChildInfoStatistics.previousMonthTotalSent) && + ObjectUtils.equals(this.currentMonthTotalSent, getChildInfoStatistics.currentMonthTotalSent) && + ObjectUtils.equals(this.totalSent, getChildInfoStatistics.totalSent); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(previousMonthTotalSent, currentMonthTotalSent, totalSent); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetChildInfoStatistics {\n"); + + sb.append(" previousMonthTotalSent: ").append(toIndentedString(previousMonthTotalSent)).append("\n"); + sb.append(" currentMonthTotalSent: ").append(toIndentedString(currentMonthTotalSent)).append("\n"); + sb.append(" totalSent: ").append(toIndentedString(totalSent)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetChildrenList.java b/src/main/java/sibModel/GetChildrenList.java new file mode 100644 index 0000000..e086143 --- /dev/null +++ b/src/main/java/sibModel/GetChildrenList.java @@ -0,0 +1,103 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * GetChildrenList + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetChildrenList { + @SerializedName("children") + private List children = null; + + public GetChildrenList children(List children) { + this.children = children; + return this; + } + + public GetChildrenList addChildrenItem(Object childrenItem) { + if (this.children == null) { + this.children = new ArrayList(); + } + this.children.add(childrenItem); + return this; + } + + /** + * Your children's account information + * @return children + **/ + @ApiModelProperty(value = "Your children's account information") + public List getChildren() { + return children; + } + + public void setChildren(List children) { + this.children = children; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetChildrenList getChildrenList = (GetChildrenList) o; + return ObjectUtils.equals(this.children, getChildrenList.children); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(children); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetChildrenList {\n"); + + sb.append(" children: ").append(toIndentedString(children)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetClient.java b/src/main/java/sibModel/GetClient.java new file mode 100644 index 0000000..fab2c57 --- /dev/null +++ b/src/main/java/sibModel/GetClient.java @@ -0,0 +1,162 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * GetClient + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetClient { + @SerializedName("email") + private String email = null; + + @SerializedName("firstName") + private String firstName = null; + + @SerializedName("lastName") + private String lastName = null; + + @SerializedName("companyName") + private String companyName = null; + + public GetClient email(String email) { + this.email = email; + return this; + } + + /** + * Login Email + * @return email + **/ + @ApiModelProperty(example = "john.smith@example.com", required = true, value = "Login Email") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public GetClient firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * First Name + * @return firstName + **/ + @ApiModelProperty(example = "John", required = true, value = "First Name") + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public GetClient lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Last Name + * @return lastName + **/ + @ApiModelProperty(example = "Smith", required = true, value = "Last Name") + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public GetClient companyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * Name of the company + * @return companyName + **/ + @ApiModelProperty(example = "MyCompany", required = true, value = "Name of the company") + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetClient getClient = (GetClient) o; + return ObjectUtils.equals(this.email, getClient.email) && + ObjectUtils.equals(this.firstName, getClient.firstName) && + ObjectUtils.equals(this.lastName, getClient.lastName) && + ObjectUtils.equals(this.companyName, getClient.companyName); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(email, firstName, lastName, companyName); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetClient {\n"); + + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetContactCampaignStats.java b/src/main/java/sibModel/GetContactCampaignStats.java new file mode 100644 index 0000000..3218d39 --- /dev/null +++ b/src/main/java/sibModel/GetContactCampaignStats.java @@ -0,0 +1,318 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import sibModel.GetContactCampaignStatsClicked; +import sibModel.GetContactCampaignStatsOpened; +import sibModel.GetContactCampaignStatsTransacAttributes; +import sibModel.GetContactCampaignStatsUnsubscriptions; +import sibModel.GetExtendedContactDetailsStatisticsMessagesSent; + +/** + * Campaign Statistics for the contact + */ +@ApiModel(description = "Campaign Statistics for the contact") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetContactCampaignStats { + @SerializedName("messagesSent") + private List messagesSent = null; + + @SerializedName("hardBounces") + private List hardBounces = null; + + @SerializedName("softBounces") + private List softBounces = null; + + @SerializedName("complaints") + private List complaints = null; + + @SerializedName("unsubscriptions") + private GetContactCampaignStatsUnsubscriptions unsubscriptions = null; + + @SerializedName("opened") + private List opened = null; + + @SerializedName("clicked") + private List clicked = null; + + @SerializedName("transacAttributes") + private List transacAttributes = null; + + public GetContactCampaignStats messagesSent(List messagesSent) { + this.messagesSent = messagesSent; + return this; + } + + public GetContactCampaignStats addMessagesSentItem(GetExtendedContactDetailsStatisticsMessagesSent messagesSentItem) { + if (this.messagesSent == null) { + this.messagesSent = new ArrayList(); + } + this.messagesSent.add(messagesSentItem); + return this; + } + + /** + * Get messagesSent + * @return messagesSent + **/ + @ApiModelProperty(value = "") + public List getMessagesSent() { + return messagesSent; + } + + public void setMessagesSent(List messagesSent) { + this.messagesSent = messagesSent; + } + + public GetContactCampaignStats hardBounces(List hardBounces) { + this.hardBounces = hardBounces; + return this; + } + + public GetContactCampaignStats addHardBouncesItem(GetExtendedContactDetailsStatisticsMessagesSent hardBouncesItem) { + if (this.hardBounces == null) { + this.hardBounces = new ArrayList(); + } + this.hardBounces.add(hardBouncesItem); + return this; + } + + /** + * Get hardBounces + * @return hardBounces + **/ + @ApiModelProperty(value = "") + public List getHardBounces() { + return hardBounces; + } + + public void setHardBounces(List hardBounces) { + this.hardBounces = hardBounces; + } + + public GetContactCampaignStats softBounces(List softBounces) { + this.softBounces = softBounces; + return this; + } + + public GetContactCampaignStats addSoftBouncesItem(GetExtendedContactDetailsStatisticsMessagesSent softBouncesItem) { + if (this.softBounces == null) { + this.softBounces = new ArrayList(); + } + this.softBounces.add(softBouncesItem); + return this; + } + + /** + * Get softBounces + * @return softBounces + **/ + @ApiModelProperty(value = "") + public List getSoftBounces() { + return softBounces; + } + + public void setSoftBounces(List softBounces) { + this.softBounces = softBounces; + } + + public GetContactCampaignStats complaints(List complaints) { + this.complaints = complaints; + return this; + } + + public GetContactCampaignStats addComplaintsItem(GetExtendedContactDetailsStatisticsMessagesSent complaintsItem) { + if (this.complaints == null) { + this.complaints = new ArrayList(); + } + this.complaints.add(complaintsItem); + return this; + } + + /** + * Get complaints + * @return complaints + **/ + @ApiModelProperty(value = "") + public List getComplaints() { + return complaints; + } + + public void setComplaints(List complaints) { + this.complaints = complaints; + } + + public GetContactCampaignStats unsubscriptions(GetContactCampaignStatsUnsubscriptions unsubscriptions) { + this.unsubscriptions = unsubscriptions; + return this; + } + + /** + * Get unsubscriptions + * @return unsubscriptions + **/ + @ApiModelProperty(value = "") + public GetContactCampaignStatsUnsubscriptions getUnsubscriptions() { + return unsubscriptions; + } + + public void setUnsubscriptions(GetContactCampaignStatsUnsubscriptions unsubscriptions) { + this.unsubscriptions = unsubscriptions; + } + + public GetContactCampaignStats opened(List opened) { + this.opened = opened; + return this; + } + + public GetContactCampaignStats addOpenedItem(GetContactCampaignStatsOpened openedItem) { + if (this.opened == null) { + this.opened = new ArrayList(); + } + this.opened.add(openedItem); + return this; + } + + /** + * Get opened + * @return opened + **/ + @ApiModelProperty(value = "") + public List getOpened() { + return opened; + } + + public void setOpened(List opened) { + this.opened = opened; + } + + public GetContactCampaignStats clicked(List clicked) { + this.clicked = clicked; + return this; + } + + public GetContactCampaignStats addClickedItem(GetContactCampaignStatsClicked clickedItem) { + if (this.clicked == null) { + this.clicked = new ArrayList(); + } + this.clicked.add(clickedItem); + return this; + } + + /** + * Get clicked + * @return clicked + **/ + @ApiModelProperty(value = "") + public List getClicked() { + return clicked; + } + + public void setClicked(List clicked) { + this.clicked = clicked; + } + + public GetContactCampaignStats transacAttributes(List transacAttributes) { + this.transacAttributes = transacAttributes; + return this; + } + + public GetContactCampaignStats addTransacAttributesItem(GetContactCampaignStatsTransacAttributes transacAttributesItem) { + if (this.transacAttributes == null) { + this.transacAttributes = new ArrayList(); + } + this.transacAttributes.add(transacAttributesItem); + return this; + } + + /** + * Get transacAttributes + * @return transacAttributes + **/ + @ApiModelProperty(value = "") + public List getTransacAttributes() { + return transacAttributes; + } + + public void setTransacAttributes(List transacAttributes) { + this.transacAttributes = transacAttributes; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetContactCampaignStats getContactCampaignStats = (GetContactCampaignStats) o; + return ObjectUtils.equals(this.messagesSent, getContactCampaignStats.messagesSent) && + ObjectUtils.equals(this.hardBounces, getContactCampaignStats.hardBounces) && + ObjectUtils.equals(this.softBounces, getContactCampaignStats.softBounces) && + ObjectUtils.equals(this.complaints, getContactCampaignStats.complaints) && + ObjectUtils.equals(this.unsubscriptions, getContactCampaignStats.unsubscriptions) && + ObjectUtils.equals(this.opened, getContactCampaignStats.opened) && + ObjectUtils.equals(this.clicked, getContactCampaignStats.clicked) && + ObjectUtils.equals(this.transacAttributes, getContactCampaignStats.transacAttributes); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(messagesSent, hardBounces, softBounces, complaints, unsubscriptions, opened, clicked, transacAttributes); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetContactCampaignStats {\n"); + + sb.append(" messagesSent: ").append(toIndentedString(messagesSent)).append("\n"); + sb.append(" hardBounces: ").append(toIndentedString(hardBounces)).append("\n"); + sb.append(" softBounces: ").append(toIndentedString(softBounces)).append("\n"); + sb.append(" complaints: ").append(toIndentedString(complaints)).append("\n"); + sb.append(" unsubscriptions: ").append(toIndentedString(unsubscriptions)).append("\n"); + sb.append(" opened: ").append(toIndentedString(opened)).append("\n"); + sb.append(" clicked: ").append(toIndentedString(clicked)).append("\n"); + sb.append(" transacAttributes: ").append(toIndentedString(transacAttributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetContactCampaignStatsClicked.java b/src/main/java/sibModel/GetContactCampaignStatsClicked.java new file mode 100644 index 0000000..38435c0 --- /dev/null +++ b/src/main/java/sibModel/GetContactCampaignStatsClicked.java @@ -0,0 +1,124 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import sibModel.GetExtendedContactDetailsStatisticsLinks; + +/** + * GetContactCampaignStatsClicked + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetContactCampaignStatsClicked { + @SerializedName("campaignId") + private Long campaignId = null; + + @SerializedName("links") + private List links = new ArrayList(); + + public GetContactCampaignStatsClicked campaignId(Long campaignId) { + this.campaignId = campaignId; + return this; + } + + /** + * ID of the campaign which generated the event + * @return campaignId + **/ + @ApiModelProperty(example = "3", required = true, value = "ID of the campaign which generated the event") + public Long getCampaignId() { + return campaignId; + } + + public void setCampaignId(Long campaignId) { + this.campaignId = campaignId; + } + + public GetContactCampaignStatsClicked links(List links) { + this.links = links; + return this; + } + + public GetContactCampaignStatsClicked addLinksItem(GetExtendedContactDetailsStatisticsLinks linksItem) { + this.links.add(linksItem); + return this; + } + + /** + * Get links + * @return links + **/ + @ApiModelProperty(required = true, value = "") + public List getLinks() { + return links; + } + + public void setLinks(List links) { + this.links = links; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetContactCampaignStatsClicked getContactCampaignStatsClicked = (GetContactCampaignStatsClicked) o; + return ObjectUtils.equals(this.campaignId, getContactCampaignStatsClicked.campaignId) && + ObjectUtils.equals(this.links, getContactCampaignStatsClicked.links); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(campaignId, links); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetContactCampaignStatsClicked {\n"); + + sb.append(" campaignId: ").append(toIndentedString(campaignId)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetContactCampaignStatsOpened.java b/src/main/java/sibModel/GetContactCampaignStatsOpened.java new file mode 100644 index 0000000..807a8f8 --- /dev/null +++ b/src/main/java/sibModel/GetContactCampaignStatsOpened.java @@ -0,0 +1,163 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.threeten.bp.OffsetDateTime; + +/** + * GetContactCampaignStatsOpened + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetContactCampaignStatsOpened { + @SerializedName("campaignId") + private Long campaignId = null; + + @SerializedName("count") + private Long count = null; + + @SerializedName("eventTime") + private OffsetDateTime eventTime = null; + + @SerializedName("ip") + private String ip = null; + + public GetContactCampaignStatsOpened campaignId(Long campaignId) { + this.campaignId = campaignId; + return this; + } + + /** + * ID of the campaign which generated the event + * @return campaignId + **/ + @ApiModelProperty(example = "3", required = true, value = "ID of the campaign which generated the event") + public Long getCampaignId() { + return campaignId; + } + + public void setCampaignId(Long campaignId) { + this.campaignId = campaignId; + } + + public GetContactCampaignStatsOpened count(Long count) { + this.count = count; + return this; + } + + /** + * Number of openings of the campaign + * @return count + **/ + @ApiModelProperty(example = "3", required = true, value = "Number of openings of the campaign") + public Long getCount() { + return count; + } + + public void setCount(Long count) { + this.count = count; + } + + public GetContactCampaignStatsOpened eventTime(OffsetDateTime eventTime) { + this.eventTime = eventTime; + return this; + } + + /** + * UTC date-time of the event + * @return eventTime + **/ + @ApiModelProperty(example = "2017-03-12T20:15:13Z", required = true, value = "UTC date-time of the event") + public OffsetDateTime getEventTime() { + return eventTime; + } + + public void setEventTime(OffsetDateTime eventTime) { + this.eventTime = eventTime; + } + + public GetContactCampaignStatsOpened ip(String ip) { + this.ip = ip; + return this; + } + + /** + * IP from which the user has opened the campaign + * @return ip + **/ + @ApiModelProperty(example = "165.87.3.15", required = true, value = "IP from which the user has opened the campaign") + public String getIp() { + return ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetContactCampaignStatsOpened getContactCampaignStatsOpened = (GetContactCampaignStatsOpened) o; + return ObjectUtils.equals(this.campaignId, getContactCampaignStatsOpened.campaignId) && + ObjectUtils.equals(this.count, getContactCampaignStatsOpened.count) && + ObjectUtils.equals(this.eventTime, getContactCampaignStatsOpened.eventTime) && + ObjectUtils.equals(this.ip, getContactCampaignStatsOpened.ip); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(campaignId, count, eventTime, ip); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetContactCampaignStatsOpened {\n"); + + sb.append(" campaignId: ").append(toIndentedString(campaignId)).append("\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" eventTime: ").append(toIndentedString(eventTime)).append("\n"); + sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetContactCampaignStatsTransacAttributes.java b/src/main/java/sibModel/GetContactCampaignStatsTransacAttributes.java new file mode 100644 index 0000000..4124a70 --- /dev/null +++ b/src/main/java/sibModel/GetContactCampaignStatsTransacAttributes.java @@ -0,0 +1,140 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.threeten.bp.LocalDate; + +/** + * GetContactCampaignStatsTransacAttributes + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetContactCampaignStatsTransacAttributes { + @SerializedName("orderDate") + private LocalDate orderDate = null; + + @SerializedName("orderPrice") + private Float orderPrice = null; + + @SerializedName("orderId") + private Long orderId = null; + + public GetContactCampaignStatsTransacAttributes orderDate(LocalDate orderDate) { + this.orderDate = orderDate; + return this; + } + + /** + * Date of the order + * @return orderDate + **/ + @ApiModelProperty(example = "2017-03-12", required = true, value = "Date of the order") + public LocalDate getOrderDate() { + return orderDate; + } + + public void setOrderDate(LocalDate orderDate) { + this.orderDate = orderDate; + } + + public GetContactCampaignStatsTransacAttributes orderPrice(Float orderPrice) { + this.orderPrice = orderPrice; + return this; + } + + /** + * Price of the order + * @return orderPrice + **/ + @ApiModelProperty(example = "24.99", required = true, value = "Price of the order") + public Float getOrderPrice() { + return orderPrice; + } + + public void setOrderPrice(Float orderPrice) { + this.orderPrice = orderPrice; + } + + public GetContactCampaignStatsTransacAttributes orderId(Long orderId) { + this.orderId = orderId; + return this; + } + + /** + * ID of the order + * @return orderId + **/ + @ApiModelProperty(example = "248", required = true, value = "ID of the order") + public Long getOrderId() { + return orderId; + } + + public void setOrderId(Long orderId) { + this.orderId = orderId; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetContactCampaignStatsTransacAttributes getContactCampaignStatsTransacAttributes = (GetContactCampaignStatsTransacAttributes) o; + return ObjectUtils.equals(this.orderDate, getContactCampaignStatsTransacAttributes.orderDate) && + ObjectUtils.equals(this.orderPrice, getContactCampaignStatsTransacAttributes.orderPrice) && + ObjectUtils.equals(this.orderId, getContactCampaignStatsTransacAttributes.orderId); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(orderDate, orderPrice, orderId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetContactCampaignStatsTransacAttributes {\n"); + + sb.append(" orderDate: ").append(toIndentedString(orderDate)).append("\n"); + sb.append(" orderPrice: ").append(toIndentedString(orderPrice)).append("\n"); + sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetContactCampaignStatsUnsubscriptions.java b/src/main/java/sibModel/GetContactCampaignStatsUnsubscriptions.java new file mode 100644 index 0000000..f20c7dd --- /dev/null +++ b/src/main/java/sibModel/GetContactCampaignStatsUnsubscriptions.java @@ -0,0 +1,130 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import sibModel.GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription; +import sibModel.GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription; + +/** + * GetContactCampaignStatsUnsubscriptions + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetContactCampaignStatsUnsubscriptions { + @SerializedName("userUnsubscription") + private List userUnsubscription = new ArrayList(); + + @SerializedName("adminUnsubscription") + private List adminUnsubscription = new ArrayList(); + + public GetContactCampaignStatsUnsubscriptions userUnsubscription(List userUnsubscription) { + this.userUnsubscription = userUnsubscription; + return this; + } + + public GetContactCampaignStatsUnsubscriptions addUserUnsubscriptionItem(GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription userUnsubscriptionItem) { + this.userUnsubscription.add(userUnsubscriptionItem); + return this; + } + + /** + * Contact has unsubscribed via the unsubscription link in the email + * @return userUnsubscription + **/ + @ApiModelProperty(required = true, value = "Contact has unsubscribed via the unsubscription link in the email") + public List getUserUnsubscription() { + return userUnsubscription; + } + + public void setUserUnsubscription(List userUnsubscription) { + this.userUnsubscription = userUnsubscription; + } + + public GetContactCampaignStatsUnsubscriptions adminUnsubscription(List adminUnsubscription) { + this.adminUnsubscription = adminUnsubscription; + return this; + } + + public GetContactCampaignStatsUnsubscriptions addAdminUnsubscriptionItem(GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription adminUnsubscriptionItem) { + this.adminUnsubscription.add(adminUnsubscriptionItem); + return this; + } + + /** + * Contact has been unsubscribed from the administrator + * @return adminUnsubscription + **/ + @ApiModelProperty(required = true, value = "Contact has been unsubscribed from the administrator") + public List getAdminUnsubscription() { + return adminUnsubscription; + } + + public void setAdminUnsubscription(List adminUnsubscription) { + this.adminUnsubscription = adminUnsubscription; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetContactCampaignStatsUnsubscriptions getContactCampaignStatsUnsubscriptions = (GetContactCampaignStatsUnsubscriptions) o; + return ObjectUtils.equals(this.userUnsubscription, getContactCampaignStatsUnsubscriptions.userUnsubscription) && + ObjectUtils.equals(this.adminUnsubscription, getContactCampaignStatsUnsubscriptions.adminUnsubscription); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(userUnsubscription, adminUnsubscription); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetContactCampaignStatsUnsubscriptions {\n"); + + sb.append(" userUnsubscription: ").append(toIndentedString(userUnsubscription)).append("\n"); + sb.append(" adminUnsubscription: ").append(toIndentedString(adminUnsubscription)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetContactDetails.java b/src/main/java/sibModel/GetContactDetails.java new file mode 100644 index 0000000..3ee86cb --- /dev/null +++ b/src/main/java/sibModel/GetContactDetails.java @@ -0,0 +1,277 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.threeten.bp.OffsetDateTime; + +/** + * GetContactDetails + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetContactDetails { + @SerializedName("email") + private String email = null; + + @SerializedName("id") + private Long id = null; + + @SerializedName("emailBlacklisted") + private Boolean emailBlacklisted = null; + + @SerializedName("smsBlacklisted") + private Boolean smsBlacklisted = null; + + @SerializedName("modifiedAt") + private OffsetDateTime modifiedAt = null; + + @SerializedName("listIds") + private List listIds = new ArrayList(); + + @SerializedName("listUnsubscribed") + private List listUnsubscribed = null; + + @SerializedName("attributes") + private Map attributes = new HashMap(); + + public GetContactDetails email(String email) { + this.email = email; + return this; + } + + /** + * Email address of the contact for which you requested the details + * @return email + **/ + @ApiModelProperty(example = "john.smith@example.com", required = true, value = "Email address of the contact for which you requested the details") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public GetContactDetails id(Long id) { + this.id = id; + return this; + } + + /** + * ID of the contact for which you requested the details + * @return id + **/ + @ApiModelProperty(example = "32", required = true, value = "ID of the contact for which you requested the details") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public GetContactDetails emailBlacklisted(Boolean emailBlacklisted) { + this.emailBlacklisted = emailBlacklisted; + return this; + } + + /** + * Blacklist status for email campaigns (true=blacklisted, false=not blacklisted) + * @return emailBlacklisted + **/ + @ApiModelProperty(example = "false", required = true, value = "Blacklist status for email campaigns (true=blacklisted, false=not blacklisted)") + public Boolean isEmailBlacklisted() { + return emailBlacklisted; + } + + public void setEmailBlacklisted(Boolean emailBlacklisted) { + this.emailBlacklisted = emailBlacklisted; + } + + public GetContactDetails smsBlacklisted(Boolean smsBlacklisted) { + this.smsBlacklisted = smsBlacklisted; + return this; + } + + /** + * Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted) + * @return smsBlacklisted + **/ + @ApiModelProperty(example = "true", required = true, value = "Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted)") + public Boolean isSmsBlacklisted() { + return smsBlacklisted; + } + + public void setSmsBlacklisted(Boolean smsBlacklisted) { + this.smsBlacklisted = smsBlacklisted; + } + + public GetContactDetails modifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + return this; + } + + /** + * Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @return modifiedAt + **/ + @ApiModelProperty(example = "2017-05-12T12:30:00Z", required = true, value = "Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ)") + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } + + public void setModifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + } + + public GetContactDetails listIds(List listIds) { + this.listIds = listIds; + return this; + } + + public GetContactDetails addListIdsItem(Long listIdsItem) { + this.listIds.add(listIdsItem); + return this; + } + + /** + * Get listIds + * @return listIds + **/ + @ApiModelProperty(required = true, value = "") + public List getListIds() { + return listIds; + } + + public void setListIds(List listIds) { + this.listIds = listIds; + } + + public GetContactDetails listUnsubscribed(List listUnsubscribed) { + this.listUnsubscribed = listUnsubscribed; + return this; + } + + public GetContactDetails addListUnsubscribedItem(Long listUnsubscribedItem) { + if (this.listUnsubscribed == null) { + this.listUnsubscribed = new ArrayList(); + } + this.listUnsubscribed.add(listUnsubscribedItem); + return this; + } + + /** + * Get listUnsubscribed + * @return listUnsubscribed + **/ + @ApiModelProperty(value = "") + public List getListUnsubscribed() { + return listUnsubscribed; + } + + public void setListUnsubscribed(List listUnsubscribed) { + this.listUnsubscribed = listUnsubscribed; + } + + public GetContactDetails attributes(Map attributes) { + this.attributes = attributes; + return this; + } + + public GetContactDetails putAttributesItem(String key, String attributesItem) { + this.attributes.put(key, attributesItem); + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @ApiModelProperty(required = true, value = "") + public Map getAttributes() { + return attributes; + } + + public void setAttributes(Map attributes) { + this.attributes = attributes; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetContactDetails getContactDetails = (GetContactDetails) o; + return ObjectUtils.equals(this.email, getContactDetails.email) && + ObjectUtils.equals(this.id, getContactDetails.id) && + ObjectUtils.equals(this.emailBlacklisted, getContactDetails.emailBlacklisted) && + ObjectUtils.equals(this.smsBlacklisted, getContactDetails.smsBlacklisted) && + ObjectUtils.equals(this.modifiedAt, getContactDetails.modifiedAt) && + ObjectUtils.equals(this.listIds, getContactDetails.listIds) && + ObjectUtils.equals(this.listUnsubscribed, getContactDetails.listUnsubscribed) && + ObjectUtils.equals(this.attributes, getContactDetails.attributes); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(email, id, emailBlacklisted, smsBlacklisted, modifiedAt, listIds, listUnsubscribed, attributes); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetContactDetails {\n"); + + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" emailBlacklisted: ").append(toIndentedString(emailBlacklisted)).append("\n"); + sb.append(" smsBlacklisted: ").append(toIndentedString(smsBlacklisted)).append("\n"); + sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); + sb.append(" listIds: ").append(toIndentedString(listIds)).append("\n"); + sb.append(" listUnsubscribed: ").append(toIndentedString(listUnsubscribed)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetContacts.java b/src/main/java/sibModel/GetContacts.java new file mode 100644 index 0000000..8b0e69b --- /dev/null +++ b/src/main/java/sibModel/GetContacts.java @@ -0,0 +1,123 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * GetContacts + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetContacts { + @SerializedName("contacts") + private List contacts = new ArrayList(); + + @SerializedName("count") + private Long count = null; + + public GetContacts contacts(List contacts) { + this.contacts = contacts; + return this; + } + + public GetContacts addContactsItem(Object contactsItem) { + this.contacts.add(contactsItem); + return this; + } + + /** + * Get contacts + * @return contacts + **/ + @ApiModelProperty(required = true, value = "") + public List getContacts() { + return contacts; + } + + public void setContacts(List contacts) { + this.contacts = contacts; + } + + public GetContacts count(Long count) { + this.count = count; + return this; + } + + /** + * Number of contacts + * @return count + **/ + @ApiModelProperty(example = "17655", required = true, value = "Number of contacts") + public Long getCount() { + return count; + } + + public void setCount(Long count) { + this.count = count; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetContacts getContacts = (GetContacts) o; + return ObjectUtils.equals(this.contacts, getContacts.contacts) && + ObjectUtils.equals(this.count, getContacts.count); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(contacts, count); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetContacts {\n"); + + sb.append(" contacts: ").append(toIndentedString(contacts)).append("\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetEmailCampaign.java b/src/main/java/sibModel/GetEmailCampaign.java new file mode 100644 index 0000000..bc6073f --- /dev/null +++ b/src/main/java/sibModel/GetEmailCampaign.java @@ -0,0 +1,635 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.threeten.bp.OffsetDateTime; +import sibModel.GetExtendedCampaignOverview; +import sibModel.GetExtendedCampaignOverviewSender; + +/** + * GetEmailCampaign + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetEmailCampaign { + @SerializedName("id") + private Long id = null; + + @SerializedName("name") + private String name = null; + + @SerializedName("subject") + private String subject = null; + + /** + * Type of campaign + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + CLASSIC("classic"), + + TRIGGER("trigger"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String text) { + for (TypeEnum b : TypeEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("type") + private TypeEnum type = null; + + /** + * Status of the campaign + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + DRAFT("draft"), + + SENT("sent"), + + ARCHIVE("archive"), + + QUEUED("queued"), + + SUSPENDED("suspended"), + + IN_PROCESS("in_process"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String text) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("status") + private StatusEnum status = null; + + @SerializedName("scheduledAt") + private OffsetDateTime scheduledAt = null; + + @SerializedName("testSent") + private Boolean testSent = null; + + @SerializedName("header") + private String header = null; + + @SerializedName("footer") + private String footer = null; + + @SerializedName("sender") + private GetExtendedCampaignOverviewSender sender = null; + + @SerializedName("replyTo") + private String replyTo = null; + + @SerializedName("toField") + private String toField = null; + + @SerializedName("htmlContent") + private String htmlContent = null; + + @SerializedName("shareLink") + private String shareLink = null; + + @SerializedName("tag") + private String tag = null; + + @SerializedName("createdAt") + private OffsetDateTime createdAt = null; + + @SerializedName("modifiedAt") + private OffsetDateTime modifiedAt = null; + + @SerializedName("inlineImageActivation") + private Boolean inlineImageActivation = null; + + @SerializedName("mirrorActive") + private Boolean mirrorActive = null; + + @SerializedName("recurring") + private Boolean recurring = null; + + public GetEmailCampaign id(Long id) { + this.id = id; + return this; + } + + /** + * ID of the campaign + * @return id + **/ + @ApiModelProperty(example = "12", required = true, value = "ID of the campaign") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public GetEmailCampaign name(String name) { + this.name = name; + return this; + } + + /** + * Name of the campaign + * @return name + **/ + @ApiModelProperty(example = "EN - Sales Summer 2017", required = true, value = "Name of the campaign") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public GetEmailCampaign subject(String subject) { + this.subject = subject; + return this; + } + + /** + * Subject of the campaign + * @return subject + **/ + @ApiModelProperty(example = "20% OFF for 2017 Summer Sales", required = true, value = "Subject of the campaign") + public String getSubject() { + return subject; + } + + public void setSubject(String subject) { + this.subject = subject; + } + + public GetEmailCampaign type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of campaign + * @return type + **/ + @ApiModelProperty(example = "classic", required = true, value = "Type of campaign") + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + public GetEmailCampaign status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Status of the campaign + * @return status + **/ + @ApiModelProperty(example = "sent", required = true, value = "Status of the campaign") + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + public GetEmailCampaign scheduledAt(OffsetDateTime scheduledAt) { + this.scheduledAt = scheduledAt; + return this; + } + + /** + * UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @return scheduledAt + **/ + @ApiModelProperty(example = "2017-06-01T12:30:00Z", value = "UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ)") + public OffsetDateTime getScheduledAt() { + return scheduledAt; + } + + public void setScheduledAt(OffsetDateTime scheduledAt) { + this.scheduledAt = scheduledAt; + } + + public GetEmailCampaign testSent(Boolean testSent) { + this.testSent = testSent; + return this; + } + + /** + * Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) + * @return testSent + **/ + @ApiModelProperty(example = "true", required = true, value = "Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent)") + public Boolean isTestSent() { + return testSent; + } + + public void setTestSent(Boolean testSent) { + this.testSent = testSent; + } + + public GetEmailCampaign header(String header) { + this.header = header; + return this; + } + + /** + * Header of the campaign + * @return header + **/ + @ApiModelProperty(example = "[DEFAULT_HEADER]", required = true, value = "Header of the campaign") + public String getHeader() { + return header; + } + + public void setHeader(String header) { + this.header = header; + } + + public GetEmailCampaign footer(String footer) { + this.footer = footer; + return this; + } + + /** + * Footer of the campaign + * @return footer + **/ + @ApiModelProperty(example = "[DEFAULT_FOOTER]", required = true, value = "Footer of the campaign") + public String getFooter() { + return footer; + } + + public void setFooter(String footer) { + this.footer = footer; + } + + public GetEmailCampaign sender(GetExtendedCampaignOverviewSender sender) { + this.sender = sender; + return this; + } + + /** + * Get sender + * @return sender + **/ + @ApiModelProperty(required = true, value = "") + public GetExtendedCampaignOverviewSender getSender() { + return sender; + } + + public void setSender(GetExtendedCampaignOverviewSender sender) { + this.sender = sender; + } + + public GetEmailCampaign replyTo(String replyTo) { + this.replyTo = replyTo; + return this; + } + + /** + * Email defined as the \"Reply to\" of the campaign + * @return replyTo + **/ + @ApiModelProperty(example = "replyto@domain.com", required = true, value = "Email defined as the \"Reply to\" of the campaign") + public String getReplyTo() { + return replyTo; + } + + public void setReplyTo(String replyTo) { + this.replyTo = replyTo; + } + + public GetEmailCampaign toField(String toField) { + this.toField = toField; + return this; + } + + /** + * Customisation of the \"to\" field of the campaign + * @return toField + **/ + @ApiModelProperty(example = "{FNAME} {LNAME}", required = true, value = "Customisation of the \"to\" field of the campaign") + public String getToField() { + return toField; + } + + public void setToField(String toField) { + this.toField = toField; + } + + public GetEmailCampaign htmlContent(String htmlContent) { + this.htmlContent = htmlContent; + return this; + } + + /** + * HTML content of the campaign + * @return htmlContent + **/ + @ApiModelProperty(example = "This is my HTML Content", required = true, value = "HTML content of the campaign") + public String getHtmlContent() { + return htmlContent; + } + + public void setHtmlContent(String htmlContent) { + this.htmlContent = htmlContent; + } + + public GetEmailCampaign shareLink(String shareLink) { + this.shareLink = shareLink; + return this; + } + + /** + * Link to share the campaign on social medias + * @return shareLink + **/ + @ApiModelProperty(example = "http://dhh.sendinblue.com/fhsgccc.html?t=9865448900", value = "Link to share the campaign on social medias") + public String getShareLink() { + return shareLink; + } + + public void setShareLink(String shareLink) { + this.shareLink = shareLink; + } + + public GetEmailCampaign tag(String tag) { + this.tag = tag; + return this; + } + + /** + * Tag of the campaign + * @return tag + **/ + @ApiModelProperty(example = "Newsletter", required = true, value = "Tag of the campaign") + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + public GetEmailCampaign createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @return createdAt + **/ + @ApiModelProperty(example = "2017-05-01T12:30:00Z", required = true, value = "Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public GetEmailCampaign modifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + return this; + } + + /** + * UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @return modifiedAt + **/ + @ApiModelProperty(example = "2017-05-01T12:30:00Z", required = true, value = "UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)") + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } + + public void setModifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + } + + public GetEmailCampaign inlineImageActivation(Boolean inlineImageActivation) { + this.inlineImageActivation = inlineImageActivation; + return this; + } + + /** + * Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. + * @return inlineImageActivation + **/ + @ApiModelProperty(example = "true", value = "Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email.") + public Boolean isInlineImageActivation() { + return inlineImageActivation; + } + + public void setInlineImageActivation(Boolean inlineImageActivation) { + this.inlineImageActivation = inlineImageActivation; + } + + public GetEmailCampaign mirrorActive(Boolean mirrorActive) { + this.mirrorActive = mirrorActive; + return this; + } + + /** + * Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign + * @return mirrorActive + **/ + @ApiModelProperty(example = "true", value = "Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign") + public Boolean isMirrorActive() { + return mirrorActive; + } + + public void setMirrorActive(Boolean mirrorActive) { + this.mirrorActive = mirrorActive; + } + + public GetEmailCampaign recurring(Boolean recurring) { + this.recurring = recurring; + return this; + } + + /** + * FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times + * @return recurring + **/ + @ApiModelProperty(example = "true", value = "FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times") + public Boolean isRecurring() { + return recurring; + } + + public void setRecurring(Boolean recurring) { + this.recurring = recurring; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetEmailCampaign getEmailCampaign = (GetEmailCampaign) o; + return ObjectUtils.equals(this.id, getEmailCampaign.id) && + ObjectUtils.equals(this.name, getEmailCampaign.name) && + ObjectUtils.equals(this.subject, getEmailCampaign.subject) && + ObjectUtils.equals(this.type, getEmailCampaign.type) && + ObjectUtils.equals(this.status, getEmailCampaign.status) && + ObjectUtils.equals(this.scheduledAt, getEmailCampaign.scheduledAt) && + ObjectUtils.equals(this.testSent, getEmailCampaign.testSent) && + ObjectUtils.equals(this.header, getEmailCampaign.header) && + ObjectUtils.equals(this.footer, getEmailCampaign.footer) && + ObjectUtils.equals(this.sender, getEmailCampaign.sender) && + ObjectUtils.equals(this.replyTo, getEmailCampaign.replyTo) && + ObjectUtils.equals(this.toField, getEmailCampaign.toField) && + ObjectUtils.equals(this.htmlContent, getEmailCampaign.htmlContent) && + ObjectUtils.equals(this.shareLink, getEmailCampaign.shareLink) && + ObjectUtils.equals(this.tag, getEmailCampaign.tag) && + ObjectUtils.equals(this.createdAt, getEmailCampaign.createdAt) && + ObjectUtils.equals(this.modifiedAt, getEmailCampaign.modifiedAt) && + ObjectUtils.equals(this.inlineImageActivation, getEmailCampaign.inlineImageActivation) && + ObjectUtils.equals(this.mirrorActive, getEmailCampaign.mirrorActive) && + ObjectUtils.equals(this.recurring, getEmailCampaign.recurring); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(id, name, subject, type, status, scheduledAt, testSent, header, footer, sender, replyTo, toField, htmlContent, shareLink, tag, createdAt, modifiedAt, inlineImageActivation, mirrorActive, recurring); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetEmailCampaign {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" scheduledAt: ").append(toIndentedString(scheduledAt)).append("\n"); + sb.append(" testSent: ").append(toIndentedString(testSent)).append("\n"); + sb.append(" header: ").append(toIndentedString(header)).append("\n"); + sb.append(" footer: ").append(toIndentedString(footer)).append("\n"); + sb.append(" sender: ").append(toIndentedString(sender)).append("\n"); + sb.append(" replyTo: ").append(toIndentedString(replyTo)).append("\n"); + sb.append(" toField: ").append(toIndentedString(toField)).append("\n"); + sb.append(" htmlContent: ").append(toIndentedString(htmlContent)).append("\n"); + sb.append(" shareLink: ").append(toIndentedString(shareLink)).append("\n"); + sb.append(" tag: ").append(toIndentedString(tag)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); + sb.append(" inlineImageActivation: ").append(toIndentedString(inlineImageActivation)).append("\n"); + sb.append(" mirrorActive: ").append(toIndentedString(mirrorActive)).append("\n"); + sb.append(" recurring: ").append(toIndentedString(recurring)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetEmailCampaigns.java b/src/main/java/sibModel/GetEmailCampaigns.java new file mode 100644 index 0000000..25ef070 --- /dev/null +++ b/src/main/java/sibModel/GetEmailCampaigns.java @@ -0,0 +1,126 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * GetEmailCampaigns + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetEmailCampaigns { + @SerializedName("campaigns") + private List campaigns = null; + + @SerializedName("count") + private Long count = null; + + public GetEmailCampaigns campaigns(List campaigns) { + this.campaigns = campaigns; + return this; + } + + public GetEmailCampaigns addCampaignsItem(Object campaignsItem) { + if (this.campaigns == null) { + this.campaigns = new ArrayList(); + } + this.campaigns.add(campaignsItem); + return this; + } + + /** + * Get campaigns + * @return campaigns + **/ + @ApiModelProperty(value = "") + public List getCampaigns() { + return campaigns; + } + + public void setCampaigns(List campaigns) { + this.campaigns = campaigns; + } + + public GetEmailCampaigns count(Long count) { + this.count = count; + return this; + } + + /** + * Number of Email campaigns retrieved + * @return count + **/ + @ApiModelProperty(example = "24", required = true, value = "Number of Email campaigns retrieved") + public Long getCount() { + return count; + } + + public void setCount(Long count) { + this.count = count; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetEmailCampaigns getEmailCampaigns = (GetEmailCampaigns) o; + return ObjectUtils.equals(this.campaigns, getEmailCampaigns.campaigns) && + ObjectUtils.equals(this.count, getEmailCampaigns.count); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(campaigns, count); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetEmailCampaigns {\n"); + + sb.append(" campaigns: ").append(toIndentedString(campaigns)).append("\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetEmailEventReport.java b/src/main/java/sibModel/GetEmailEventReport.java new file mode 100644 index 0000000..79049df --- /dev/null +++ b/src/main/java/sibModel/GetEmailEventReport.java @@ -0,0 +1,104 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import sibModel.GetEmailEventReportEvents; + +/** + * GetEmailEventReport + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetEmailEventReport { + @SerializedName("events") + private List events = null; + + public GetEmailEventReport events(List events) { + this.events = events; + return this; + } + + public GetEmailEventReport addEventsItem(GetEmailEventReportEvents eventsItem) { + if (this.events == null) { + this.events = new ArrayList(); + } + this.events.add(eventsItem); + return this; + } + + /** + * Get events + * @return events + **/ + @ApiModelProperty(value = "") + public List getEvents() { + return events; + } + + public void setEvents(List events) { + this.events = events; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetEmailEventReport getEmailEventReport = (GetEmailEventReport) o; + return ObjectUtils.equals(this.events, getEmailEventReport.events); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(events); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetEmailEventReport {\n"); + + sb.append(" events: ").append(toIndentedString(events)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetEmailEventReportEvents.java b/src/main/java/sibModel/GetEmailEventReportEvents.java new file mode 100644 index 0000000..69e6d4c --- /dev/null +++ b/src/main/java/sibModel/GetEmailEventReportEvents.java @@ -0,0 +1,366 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.threeten.bp.OffsetDateTime; + +/** + * GetEmailEventReportEvents + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetEmailEventReportEvents { + @SerializedName("email") + private String email = null; + + @SerializedName("date") + private OffsetDateTime date = null; + + @SerializedName("subject") + private String subject = null; + + @SerializedName("messageId") + private String messageId = null; + + /** + * Event which occurred + */ + @JsonAdapter(EventEnum.Adapter.class) + public enum EventEnum { + BOUNCES("bounces"), + + HARDBOUNCES("hardBounces"), + + SOFTBOUNCES("softBounces"), + + DELIVERED("delivered"), + + SPAM("spam"), + + REQUESTS("requests"), + + OPENED("opened"), + + CLICKS("clicks"), + + INVALID("invalid"), + + DEFERRED("deferred"), + + BLOCKED("blocked"); + + private String value; + + EventEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static EventEnum fromValue(String text) { + for (EventEnum b : EventEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final EventEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public EventEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return EventEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("event") + private EventEnum event = null; + + @SerializedName("reason") + private String reason = null; + + @SerializedName("tag") + private String tag = null; + + @SerializedName("ip") + private String ip = null; + + @SerializedName("link") + private String link = null; + + @SerializedName("from") + private String from = null; + + public GetEmailEventReportEvents email(String email) { + this.email = email; + return this; + } + + /** + * Email address which generates the event + * @return email + **/ + @ApiModelProperty(example = "john.smith@example.com", required = true, value = "Email address which generates the event") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public GetEmailEventReportEvents date(OffsetDateTime date) { + this.date = date; + return this; + } + + /** + * UTC date-time on which the event has been generated + * @return date + **/ + @ApiModelProperty(example = "2017-03-12T12:30:00Z", required = true, value = "UTC date-time on which the event has been generated") + public OffsetDateTime getDate() { + return date; + } + + public void setDate(OffsetDateTime date) { + this.date = date; + } + + public GetEmailEventReportEvents subject(String subject) { + this.subject = subject; + return this; + } + + /** + * Subject of the event + * @return subject + **/ + @ApiModelProperty(example = "Sib client test", value = "Subject of the event") + public String getSubject() { + return subject; + } + + public void setSubject(String subject) { + this.subject = subject; + } + + public GetEmailEventReportEvents messageId(String messageId) { + this.messageId = messageId; + return this; + } + + /** + * Message ID which generated the event + * @return messageId + **/ + @ApiModelProperty(example = "<201798300811.5787683@relay.domain.com>", required = true, value = "Message ID which generated the event") + public String getMessageId() { + return messageId; + } + + public void setMessageId(String messageId) { + this.messageId = messageId; + } + + public GetEmailEventReportEvents event(EventEnum event) { + this.event = event; + return this; + } + + /** + * Event which occurred + * @return event + **/ + @ApiModelProperty(example = "delivered", required = true, value = "Event which occurred") + public EventEnum getEvent() { + return event; + } + + public void setEvent(EventEnum event) { + this.event = event; + } + + public GetEmailEventReportEvents reason(String reason) { + this.reason = reason; + return this; + } + + /** + * Reason of bounce (only available if the event is hardbounce or softbounce) + * @return reason + **/ + @ApiModelProperty(example = "Error connection timeout", value = "Reason of bounce (only available if the event is hardbounce or softbounce)") + public String getReason() { + return reason; + } + + public void setReason(String reason) { + this.reason = reason; + } + + public GetEmailEventReportEvents tag(String tag) { + this.tag = tag; + return this; + } + + /** + * Tag of the email which generated the event + * @return tag + **/ + @ApiModelProperty(example = "OrderConfirmation", required = true, value = "Tag of the email which generated the event") + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + public GetEmailEventReportEvents ip(String ip) { + this.ip = ip; + return this; + } + + /** + * IP from which the user has opened the email or clicked on the link (only available if the event is opened or clicks) + * @return ip + **/ + @ApiModelProperty(example = "165.87.3.15", value = "IP from which the user has opened the email or clicked on the link (only available if the event is opened or clicks)") + public String getIp() { + return ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + public GetEmailEventReportEvents link(String link) { + this.link = link; + return this; + } + + /** + * The link which is sent to the user (only available if the event is requests or opened or clicks) + * @return link + **/ + @ApiModelProperty(example = "https://www.someexamplelink.com", value = "The link which is sent to the user (only available if the event is requests or opened or clicks)") + public String getLink() { + return link; + } + + public void setLink(String link) { + this.link = link; + } + + public GetEmailEventReportEvents from(String from) { + this.from = from; + return this; + } + + /** + * Sender email from which the emails are sent + * @return from + **/ + @ApiModelProperty(example = "john@example.com", required = true, value = "Sender email from which the emails are sent") + public String getFrom() { + return from; + } + + public void setFrom(String from) { + this.from = from; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetEmailEventReportEvents getEmailEventReportEvents = (GetEmailEventReportEvents) o; + return ObjectUtils.equals(this.email, getEmailEventReportEvents.email) && + ObjectUtils.equals(this.date, getEmailEventReportEvents.date) && + ObjectUtils.equals(this.subject, getEmailEventReportEvents.subject) && + ObjectUtils.equals(this.messageId, getEmailEventReportEvents.messageId) && + ObjectUtils.equals(this.event, getEmailEventReportEvents.event) && + ObjectUtils.equals(this.reason, getEmailEventReportEvents.reason) && + ObjectUtils.equals(this.tag, getEmailEventReportEvents.tag) && + ObjectUtils.equals(this.ip, getEmailEventReportEvents.ip) && + ObjectUtils.equals(this.link, getEmailEventReportEvents.link) && + ObjectUtils.equals(this.from, getEmailEventReportEvents.from); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(email, date, subject, messageId, event, reason, tag, ip, link, from); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetEmailEventReportEvents {\n"); + + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); + sb.append(" messageId: ").append(toIndentedString(messageId)).append("\n"); + sb.append(" event: ").append(toIndentedString(event)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" tag: ").append(toIndentedString(tag)).append("\n"); + sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); + sb.append(" link: ").append(toIndentedString(link)).append("\n"); + sb.append(" from: ").append(toIndentedString(from)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetExtendedCampaignOverview.java b/src/main/java/sibModel/GetExtendedCampaignOverview.java new file mode 100644 index 0000000..1a9478b --- /dev/null +++ b/src/main/java/sibModel/GetExtendedCampaignOverview.java @@ -0,0 +1,635 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.threeten.bp.OffsetDateTime; +import sibModel.GetCampaignOverview; +import sibModel.GetExtendedCampaignOverviewSender; + +/** + * GetExtendedCampaignOverview + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetExtendedCampaignOverview { + @SerializedName("id") + private Long id = null; + + @SerializedName("name") + private String name = null; + + @SerializedName("subject") + private String subject = null; + + /** + * Type of campaign + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + CLASSIC("classic"), + + TRIGGER("trigger"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String text) { + for (TypeEnum b : TypeEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("type") + private TypeEnum type = null; + + /** + * Status of the campaign + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + DRAFT("draft"), + + SENT("sent"), + + ARCHIVE("archive"), + + QUEUED("queued"), + + SUSPENDED("suspended"), + + IN_PROCESS("in_process"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String text) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("status") + private StatusEnum status = null; + + @SerializedName("scheduledAt") + private OffsetDateTime scheduledAt = null; + + @SerializedName("testSent") + private Boolean testSent = null; + + @SerializedName("header") + private String header = null; + + @SerializedName("footer") + private String footer = null; + + @SerializedName("sender") + private GetExtendedCampaignOverviewSender sender = null; + + @SerializedName("replyTo") + private String replyTo = null; + + @SerializedName("toField") + private String toField = null; + + @SerializedName("htmlContent") + private String htmlContent = null; + + @SerializedName("shareLink") + private String shareLink = null; + + @SerializedName("tag") + private String tag = null; + + @SerializedName("createdAt") + private OffsetDateTime createdAt = null; + + @SerializedName("modifiedAt") + private OffsetDateTime modifiedAt = null; + + @SerializedName("inlineImageActivation") + private Boolean inlineImageActivation = null; + + @SerializedName("mirrorActive") + private Boolean mirrorActive = null; + + @SerializedName("recurring") + private Boolean recurring = null; + + public GetExtendedCampaignOverview id(Long id) { + this.id = id; + return this; + } + + /** + * ID of the campaign + * @return id + **/ + @ApiModelProperty(example = "12", required = true, value = "ID of the campaign") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public GetExtendedCampaignOverview name(String name) { + this.name = name; + return this; + } + + /** + * Name of the campaign + * @return name + **/ + @ApiModelProperty(example = "EN - Sales Summer 2017", required = true, value = "Name of the campaign") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public GetExtendedCampaignOverview subject(String subject) { + this.subject = subject; + return this; + } + + /** + * Subject of the campaign + * @return subject + **/ + @ApiModelProperty(example = "20% OFF for 2017 Summer Sales", required = true, value = "Subject of the campaign") + public String getSubject() { + return subject; + } + + public void setSubject(String subject) { + this.subject = subject; + } + + public GetExtendedCampaignOverview type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of campaign + * @return type + **/ + @ApiModelProperty(example = "classic", required = true, value = "Type of campaign") + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + public GetExtendedCampaignOverview status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Status of the campaign + * @return status + **/ + @ApiModelProperty(example = "sent", required = true, value = "Status of the campaign") + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + public GetExtendedCampaignOverview scheduledAt(OffsetDateTime scheduledAt) { + this.scheduledAt = scheduledAt; + return this; + } + + /** + * UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @return scheduledAt + **/ + @ApiModelProperty(example = "2017-06-01T12:30:00Z", value = "UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ)") + public OffsetDateTime getScheduledAt() { + return scheduledAt; + } + + public void setScheduledAt(OffsetDateTime scheduledAt) { + this.scheduledAt = scheduledAt; + } + + public GetExtendedCampaignOverview testSent(Boolean testSent) { + this.testSent = testSent; + return this; + } + + /** + * Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) + * @return testSent + **/ + @ApiModelProperty(example = "true", required = true, value = "Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent)") + public Boolean isTestSent() { + return testSent; + } + + public void setTestSent(Boolean testSent) { + this.testSent = testSent; + } + + public GetExtendedCampaignOverview header(String header) { + this.header = header; + return this; + } + + /** + * Header of the campaign + * @return header + **/ + @ApiModelProperty(example = "[DEFAULT_HEADER]", required = true, value = "Header of the campaign") + public String getHeader() { + return header; + } + + public void setHeader(String header) { + this.header = header; + } + + public GetExtendedCampaignOverview footer(String footer) { + this.footer = footer; + return this; + } + + /** + * Footer of the campaign + * @return footer + **/ + @ApiModelProperty(example = "[DEFAULT_FOOTER]", required = true, value = "Footer of the campaign") + public String getFooter() { + return footer; + } + + public void setFooter(String footer) { + this.footer = footer; + } + + public GetExtendedCampaignOverview sender(GetExtendedCampaignOverviewSender sender) { + this.sender = sender; + return this; + } + + /** + * Get sender + * @return sender + **/ + @ApiModelProperty(required = true, value = "") + public GetExtendedCampaignOverviewSender getSender() { + return sender; + } + + public void setSender(GetExtendedCampaignOverviewSender sender) { + this.sender = sender; + } + + public GetExtendedCampaignOverview replyTo(String replyTo) { + this.replyTo = replyTo; + return this; + } + + /** + * Email defined as the \"Reply to\" of the campaign + * @return replyTo + **/ + @ApiModelProperty(example = "replyto@domain.com", required = true, value = "Email defined as the \"Reply to\" of the campaign") + public String getReplyTo() { + return replyTo; + } + + public void setReplyTo(String replyTo) { + this.replyTo = replyTo; + } + + public GetExtendedCampaignOverview toField(String toField) { + this.toField = toField; + return this; + } + + /** + * Customisation of the \"to\" field of the campaign + * @return toField + **/ + @ApiModelProperty(example = "{FNAME} {LNAME}", required = true, value = "Customisation of the \"to\" field of the campaign") + public String getToField() { + return toField; + } + + public void setToField(String toField) { + this.toField = toField; + } + + public GetExtendedCampaignOverview htmlContent(String htmlContent) { + this.htmlContent = htmlContent; + return this; + } + + /** + * HTML content of the campaign + * @return htmlContent + **/ + @ApiModelProperty(example = "This is my HTML Content", required = true, value = "HTML content of the campaign") + public String getHtmlContent() { + return htmlContent; + } + + public void setHtmlContent(String htmlContent) { + this.htmlContent = htmlContent; + } + + public GetExtendedCampaignOverview shareLink(String shareLink) { + this.shareLink = shareLink; + return this; + } + + /** + * Link to share the campaign on social medias + * @return shareLink + **/ + @ApiModelProperty(example = "http://dhh.sendinblue.com/fhsgccc.html?t=9865448900", value = "Link to share the campaign on social medias") + public String getShareLink() { + return shareLink; + } + + public void setShareLink(String shareLink) { + this.shareLink = shareLink; + } + + public GetExtendedCampaignOverview tag(String tag) { + this.tag = tag; + return this; + } + + /** + * Tag of the campaign + * @return tag + **/ + @ApiModelProperty(example = "Newsletter", required = true, value = "Tag of the campaign") + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + public GetExtendedCampaignOverview createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @return createdAt + **/ + @ApiModelProperty(example = "2017-05-01T12:30:00Z", required = true, value = "Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public GetExtendedCampaignOverview modifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + return this; + } + + /** + * UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @return modifiedAt + **/ + @ApiModelProperty(example = "2017-05-01T12:30:00Z", required = true, value = "UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)") + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } + + public void setModifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + } + + public GetExtendedCampaignOverview inlineImageActivation(Boolean inlineImageActivation) { + this.inlineImageActivation = inlineImageActivation; + return this; + } + + /** + * Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. + * @return inlineImageActivation + **/ + @ApiModelProperty(example = "true", value = "Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email.") + public Boolean isInlineImageActivation() { + return inlineImageActivation; + } + + public void setInlineImageActivation(Boolean inlineImageActivation) { + this.inlineImageActivation = inlineImageActivation; + } + + public GetExtendedCampaignOverview mirrorActive(Boolean mirrorActive) { + this.mirrorActive = mirrorActive; + return this; + } + + /** + * Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign + * @return mirrorActive + **/ + @ApiModelProperty(example = "true", value = "Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign") + public Boolean isMirrorActive() { + return mirrorActive; + } + + public void setMirrorActive(Boolean mirrorActive) { + this.mirrorActive = mirrorActive; + } + + public GetExtendedCampaignOverview recurring(Boolean recurring) { + this.recurring = recurring; + return this; + } + + /** + * FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times + * @return recurring + **/ + @ApiModelProperty(example = "true", value = "FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times") + public Boolean isRecurring() { + return recurring; + } + + public void setRecurring(Boolean recurring) { + this.recurring = recurring; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetExtendedCampaignOverview getExtendedCampaignOverview = (GetExtendedCampaignOverview) o; + return ObjectUtils.equals(this.id, getExtendedCampaignOverview.id) && + ObjectUtils.equals(this.name, getExtendedCampaignOverview.name) && + ObjectUtils.equals(this.subject, getExtendedCampaignOverview.subject) && + ObjectUtils.equals(this.type, getExtendedCampaignOverview.type) && + ObjectUtils.equals(this.status, getExtendedCampaignOverview.status) && + ObjectUtils.equals(this.scheduledAt, getExtendedCampaignOverview.scheduledAt) && + ObjectUtils.equals(this.testSent, getExtendedCampaignOverview.testSent) && + ObjectUtils.equals(this.header, getExtendedCampaignOverview.header) && + ObjectUtils.equals(this.footer, getExtendedCampaignOverview.footer) && + ObjectUtils.equals(this.sender, getExtendedCampaignOverview.sender) && + ObjectUtils.equals(this.replyTo, getExtendedCampaignOverview.replyTo) && + ObjectUtils.equals(this.toField, getExtendedCampaignOverview.toField) && + ObjectUtils.equals(this.htmlContent, getExtendedCampaignOverview.htmlContent) && + ObjectUtils.equals(this.shareLink, getExtendedCampaignOverview.shareLink) && + ObjectUtils.equals(this.tag, getExtendedCampaignOverview.tag) && + ObjectUtils.equals(this.createdAt, getExtendedCampaignOverview.createdAt) && + ObjectUtils.equals(this.modifiedAt, getExtendedCampaignOverview.modifiedAt) && + ObjectUtils.equals(this.inlineImageActivation, getExtendedCampaignOverview.inlineImageActivation) && + ObjectUtils.equals(this.mirrorActive, getExtendedCampaignOverview.mirrorActive) && + ObjectUtils.equals(this.recurring, getExtendedCampaignOverview.recurring); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(id, name, subject, type, status, scheduledAt, testSent, header, footer, sender, replyTo, toField, htmlContent, shareLink, tag, createdAt, modifiedAt, inlineImageActivation, mirrorActive, recurring); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetExtendedCampaignOverview {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" scheduledAt: ").append(toIndentedString(scheduledAt)).append("\n"); + sb.append(" testSent: ").append(toIndentedString(testSent)).append("\n"); + sb.append(" header: ").append(toIndentedString(header)).append("\n"); + sb.append(" footer: ").append(toIndentedString(footer)).append("\n"); + sb.append(" sender: ").append(toIndentedString(sender)).append("\n"); + sb.append(" replyTo: ").append(toIndentedString(replyTo)).append("\n"); + sb.append(" toField: ").append(toIndentedString(toField)).append("\n"); + sb.append(" htmlContent: ").append(toIndentedString(htmlContent)).append("\n"); + sb.append(" shareLink: ").append(toIndentedString(shareLink)).append("\n"); + sb.append(" tag: ").append(toIndentedString(tag)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); + sb.append(" inlineImageActivation: ").append(toIndentedString(inlineImageActivation)).append("\n"); + sb.append(" mirrorActive: ").append(toIndentedString(mirrorActive)).append("\n"); + sb.append(" recurring: ").append(toIndentedString(recurring)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetExtendedCampaignOverviewSender.java b/src/main/java/sibModel/GetExtendedCampaignOverviewSender.java new file mode 100644 index 0000000..17f1017 --- /dev/null +++ b/src/main/java/sibModel/GetExtendedCampaignOverviewSender.java @@ -0,0 +1,116 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * GetExtendedCampaignOverviewSender + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetExtendedCampaignOverviewSender { + @SerializedName("name") + private String name = null; + + @SerializedName("email") + private String email = null; + + public GetExtendedCampaignOverviewSender name(String name) { + this.name = name; + return this; + } + + /** + * Sender name of the campaign + * @return name + **/ + @ApiModelProperty(example = "Marketing", value = "Sender name of the campaign") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public GetExtendedCampaignOverviewSender email(String email) { + this.email = email; + return this; + } + + /** + * Sender email of the campaign + * @return email + **/ + @ApiModelProperty(example = "marketing@mycompany.com", value = "Sender email of the campaign") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetExtendedCampaignOverviewSender getExtendedCampaignOverviewSender = (GetExtendedCampaignOverviewSender) o; + return ObjectUtils.equals(this.name, getExtendedCampaignOverviewSender.name) && + ObjectUtils.equals(this.email, getExtendedCampaignOverviewSender.email); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(name, email); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetExtendedCampaignOverviewSender {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetExtendedCampaignStats.java b/src/main/java/sibModel/GetExtendedCampaignStats.java new file mode 100644 index 0000000..79a8377 --- /dev/null +++ b/src/main/java/sibModel/GetExtendedCampaignStats.java @@ -0,0 +1,201 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import sibModel.GetExtendedCampaignStatsLinksStats; +import sibModel.GetStatsByDomain; + +/** + * GetExtendedCampaignStats + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetExtendedCampaignStats { + @SerializedName("campaignStats") + private List campaignStats = new ArrayList(); + + @SerializedName("mirrorClick") + private Long mirrorClick = null; + + @SerializedName("remaining") + private Long remaining = null; + + @SerializedName("linksStats") + private Map linksStats = new HashMap(); + + @SerializedName("statsByDomain") + private GetStatsByDomain statsByDomain = null; + + public GetExtendedCampaignStats campaignStats(List campaignStats) { + this.campaignStats = campaignStats; + return this; + } + + public GetExtendedCampaignStats addCampaignStatsItem(Object campaignStatsItem) { + this.campaignStats.add(campaignStatsItem); + return this; + } + + /** + * Get campaignStats + * @return campaignStats + **/ + @ApiModelProperty(required = true, value = "") + public List getCampaignStats() { + return campaignStats; + } + + public void setCampaignStats(List campaignStats) { + this.campaignStats = campaignStats; + } + + public GetExtendedCampaignStats mirrorClick(Long mirrorClick) { + this.mirrorClick = mirrorClick; + return this; + } + + /** + * Number of clicks on mirror link + * @return mirrorClick + **/ + @ApiModelProperty(example = "120", required = true, value = "Number of clicks on mirror link") + public Long getMirrorClick() { + return mirrorClick; + } + + public void setMirrorClick(Long mirrorClick) { + this.mirrorClick = mirrorClick; + } + + public GetExtendedCampaignStats remaining(Long remaining) { + this.remaining = remaining; + return this; + } + + /** + * Number of remaning emails to send + * @return remaining + **/ + @ApiModelProperty(example = "1000", required = true, value = "Number of remaning emails to send") + public Long getRemaining() { + return remaining; + } + + public void setRemaining(Long remaining) { + this.remaining = remaining; + } + + public GetExtendedCampaignStats linksStats(Map linksStats) { + this.linksStats = linksStats; + return this; + } + + public GetExtendedCampaignStats putLinksStatsItem(String key, GetExtendedCampaignStatsLinksStats linksStatsItem) { + this.linksStats.put(key, linksStatsItem); + return this; + } + + /** + * Get linksStats + * @return linksStats + **/ + @ApiModelProperty(required = true, value = "") + public Map getLinksStats() { + return linksStats; + } + + public void setLinksStats(Map linksStats) { + this.linksStats = linksStats; + } + + public GetExtendedCampaignStats statsByDomain(GetStatsByDomain statsByDomain) { + this.statsByDomain = statsByDomain; + return this; + } + + /** + * Get statsByDomain + * @return statsByDomain + **/ + @ApiModelProperty(required = true, value = "") + public GetStatsByDomain getStatsByDomain() { + return statsByDomain; + } + + public void setStatsByDomain(GetStatsByDomain statsByDomain) { + this.statsByDomain = statsByDomain; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetExtendedCampaignStats getExtendedCampaignStats = (GetExtendedCampaignStats) o; + return ObjectUtils.equals(this.campaignStats, getExtendedCampaignStats.campaignStats) && + ObjectUtils.equals(this.mirrorClick, getExtendedCampaignStats.mirrorClick) && + ObjectUtils.equals(this.remaining, getExtendedCampaignStats.remaining) && + ObjectUtils.equals(this.linksStats, getExtendedCampaignStats.linksStats) && + ObjectUtils.equals(this.statsByDomain, getExtendedCampaignStats.statsByDomain); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(campaignStats, mirrorClick, remaining, linksStats, statsByDomain); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetExtendedCampaignStats {\n"); + + sb.append(" campaignStats: ").append(toIndentedString(campaignStats)).append("\n"); + sb.append(" mirrorClick: ").append(toIndentedString(mirrorClick)).append("\n"); + sb.append(" remaining: ").append(toIndentedString(remaining)).append("\n"); + sb.append(" linksStats: ").append(toIndentedString(linksStats)).append("\n"); + sb.append(" statsByDomain: ").append(toIndentedString(statsByDomain)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetExtendedCampaignStatsLinksStats.java b/src/main/java/sibModel/GetExtendedCampaignStatsLinksStats.java new file mode 100644 index 0000000..18502f3 --- /dev/null +++ b/src/main/java/sibModel/GetExtendedCampaignStatsLinksStats.java @@ -0,0 +1,94 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Statistics about the clicked links + */ +@ApiModel(description = "Statistics about the clicked links") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetExtendedCampaignStatsLinksStats { + @SerializedName("nbClick") + private Long nbClick = null; + + public GetExtendedCampaignStatsLinksStats nbClick(Long nbClick) { + this.nbClick = nbClick; + return this; + } + + /** + * Number of clicks for the link + * @return nbClick + **/ + @ApiModelProperty(example = "80", required = true, value = "Number of clicks for the link") + public Long getNbClick() { + return nbClick; + } + + public void setNbClick(Long nbClick) { + this.nbClick = nbClick; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetExtendedCampaignStatsLinksStats getExtendedCampaignStatsLinksStats = (GetExtendedCampaignStatsLinksStats) o; + return ObjectUtils.equals(this.nbClick, getExtendedCampaignStatsLinksStats.nbClick); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(nbClick); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetExtendedCampaignStatsLinksStats {\n"); + + sb.append(" nbClick: ").append(toIndentedString(nbClick)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetExtendedClient.java b/src/main/java/sibModel/GetExtendedClient.java new file mode 100644 index 0000000..ffab665 --- /dev/null +++ b/src/main/java/sibModel/GetExtendedClient.java @@ -0,0 +1,187 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import sibModel.GetClient; +import sibModel.GetExtendedClientAddress; + +/** + * GetExtendedClient + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetExtendedClient { + @SerializedName("email") + private String email = null; + + @SerializedName("firstName") + private String firstName = null; + + @SerializedName("lastName") + private String lastName = null; + + @SerializedName("companyName") + private String companyName = null; + + @SerializedName("address") + private GetExtendedClientAddress address = null; + + public GetExtendedClient email(String email) { + this.email = email; + return this; + } + + /** + * Login Email + * @return email + **/ + @ApiModelProperty(example = "john.smith@example.com", required = true, value = "Login Email") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public GetExtendedClient firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * First Name + * @return firstName + **/ + @ApiModelProperty(example = "John", required = true, value = "First Name") + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public GetExtendedClient lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Last Name + * @return lastName + **/ + @ApiModelProperty(example = "Smith", required = true, value = "Last Name") + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public GetExtendedClient companyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * Name of the company + * @return companyName + **/ + @ApiModelProperty(example = "MyCompany", required = true, value = "Name of the company") + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + public GetExtendedClient address(GetExtendedClientAddress address) { + this.address = address; + return this; + } + + /** + * Get address + * @return address + **/ + @ApiModelProperty(required = true, value = "") + public GetExtendedClientAddress getAddress() { + return address; + } + + public void setAddress(GetExtendedClientAddress address) { + this.address = address; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetExtendedClient getExtendedClient = (GetExtendedClient) o; + return ObjectUtils.equals(this.email, getExtendedClient.email) && + ObjectUtils.equals(this.firstName, getExtendedClient.firstName) && + ObjectUtils.equals(this.lastName, getExtendedClient.lastName) && + ObjectUtils.equals(this.companyName, getExtendedClient.companyName) && + ObjectUtils.equals(this.address, getExtendedClient.address); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(email, firstName, lastName, companyName, address); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetExtendedClient {\n"); + + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetExtendedClientAddress.java b/src/main/java/sibModel/GetExtendedClientAddress.java new file mode 100644 index 0000000..3657b1f --- /dev/null +++ b/src/main/java/sibModel/GetExtendedClientAddress.java @@ -0,0 +1,163 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Address informations + */ +@ApiModel(description = "Address informations") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetExtendedClientAddress { + @SerializedName("street") + private String street = null; + + @SerializedName("city") + private String city = null; + + @SerializedName("zipCode") + private String zipCode = null; + + @SerializedName("country") + private String country = null; + + public GetExtendedClientAddress street(String street) { + this.street = street; + return this; + } + + /** + * Street information + * @return street + **/ + @ApiModelProperty(example = "47 Harbour Street", required = true, value = "Street information") + public String getStreet() { + return street; + } + + public void setStreet(String street) { + this.street = street; + } + + public GetExtendedClientAddress city(String city) { + this.city = city; + return this; + } + + /** + * City information + * @return city + **/ + @ApiModelProperty(example = "New-York", required = true, value = "City information") + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + public GetExtendedClientAddress zipCode(String zipCode) { + this.zipCode = zipCode; + return this; + } + + /** + * Zip Code information + * @return zipCode + **/ + @ApiModelProperty(example = "9867", required = true, value = "Zip Code information") + public String getZipCode() { + return zipCode; + } + + public void setZipCode(String zipCode) { + this.zipCode = zipCode; + } + + public GetExtendedClientAddress country(String country) { + this.country = country; + return this; + } + + /** + * Country information + * @return country + **/ + @ApiModelProperty(example = "United States of America", required = true, value = "Country information") + public String getCountry() { + return country; + } + + public void setCountry(String country) { + this.country = country; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetExtendedClientAddress getExtendedClientAddress = (GetExtendedClientAddress) o; + return ObjectUtils.equals(this.street, getExtendedClientAddress.street) && + ObjectUtils.equals(this.city, getExtendedClientAddress.city) && + ObjectUtils.equals(this.zipCode, getExtendedClientAddress.zipCode) && + ObjectUtils.equals(this.country, getExtendedClientAddress.country); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(street, city, zipCode, country); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetExtendedClientAddress {\n"); + + sb.append(" street: ").append(toIndentedString(street)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" zipCode: ").append(toIndentedString(zipCode)).append("\n"); + sb.append(" country: ").append(toIndentedString(country)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetExtendedContactDetails.java b/src/main/java/sibModel/GetExtendedContactDetails.java new file mode 100644 index 0000000..11745bc --- /dev/null +++ b/src/main/java/sibModel/GetExtendedContactDetails.java @@ -0,0 +1,302 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.threeten.bp.OffsetDateTime; +import sibModel.GetContactDetails; +import sibModel.GetExtendedContactDetailsStatistics; + +/** + * GetExtendedContactDetails + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetExtendedContactDetails { + @SerializedName("email") + private String email = null; + + @SerializedName("id") + private Long id = null; + + @SerializedName("emailBlacklisted") + private Boolean emailBlacklisted = null; + + @SerializedName("smsBlacklisted") + private Boolean smsBlacklisted = null; + + @SerializedName("modifiedAt") + private OffsetDateTime modifiedAt = null; + + @SerializedName("listIds") + private List listIds = new ArrayList(); + + @SerializedName("listUnsubscribed") + private List listUnsubscribed = null; + + @SerializedName("attributes") + private Map attributes = new HashMap(); + + @SerializedName("statistics") + private GetExtendedContactDetailsStatistics statistics = null; + + public GetExtendedContactDetails email(String email) { + this.email = email; + return this; + } + + /** + * Email address of the contact for which you requested the details + * @return email + **/ + @ApiModelProperty(example = "john.smith@example.com", required = true, value = "Email address of the contact for which you requested the details") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public GetExtendedContactDetails id(Long id) { + this.id = id; + return this; + } + + /** + * ID of the contact for which you requested the details + * @return id + **/ + @ApiModelProperty(example = "32", required = true, value = "ID of the contact for which you requested the details") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public GetExtendedContactDetails emailBlacklisted(Boolean emailBlacklisted) { + this.emailBlacklisted = emailBlacklisted; + return this; + } + + /** + * Blacklist status for email campaigns (true=blacklisted, false=not blacklisted) + * @return emailBlacklisted + **/ + @ApiModelProperty(example = "false", required = true, value = "Blacklist status for email campaigns (true=blacklisted, false=not blacklisted)") + public Boolean isEmailBlacklisted() { + return emailBlacklisted; + } + + public void setEmailBlacklisted(Boolean emailBlacklisted) { + this.emailBlacklisted = emailBlacklisted; + } + + public GetExtendedContactDetails smsBlacklisted(Boolean smsBlacklisted) { + this.smsBlacklisted = smsBlacklisted; + return this; + } + + /** + * Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted) + * @return smsBlacklisted + **/ + @ApiModelProperty(example = "true", required = true, value = "Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted)") + public Boolean isSmsBlacklisted() { + return smsBlacklisted; + } + + public void setSmsBlacklisted(Boolean smsBlacklisted) { + this.smsBlacklisted = smsBlacklisted; + } + + public GetExtendedContactDetails modifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + return this; + } + + /** + * Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @return modifiedAt + **/ + @ApiModelProperty(example = "2017-05-12T12:30:00Z", required = true, value = "Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ)") + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } + + public void setModifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + } + + public GetExtendedContactDetails listIds(List listIds) { + this.listIds = listIds; + return this; + } + + public GetExtendedContactDetails addListIdsItem(Long listIdsItem) { + this.listIds.add(listIdsItem); + return this; + } + + /** + * Get listIds + * @return listIds + **/ + @ApiModelProperty(required = true, value = "") + public List getListIds() { + return listIds; + } + + public void setListIds(List listIds) { + this.listIds = listIds; + } + + public GetExtendedContactDetails listUnsubscribed(List listUnsubscribed) { + this.listUnsubscribed = listUnsubscribed; + return this; + } + + public GetExtendedContactDetails addListUnsubscribedItem(Long listUnsubscribedItem) { + if (this.listUnsubscribed == null) { + this.listUnsubscribed = new ArrayList(); + } + this.listUnsubscribed.add(listUnsubscribedItem); + return this; + } + + /** + * Get listUnsubscribed + * @return listUnsubscribed + **/ + @ApiModelProperty(value = "") + public List getListUnsubscribed() { + return listUnsubscribed; + } + + public void setListUnsubscribed(List listUnsubscribed) { + this.listUnsubscribed = listUnsubscribed; + } + + public GetExtendedContactDetails attributes(Map attributes) { + this.attributes = attributes; + return this; + } + + public GetExtendedContactDetails putAttributesItem(String key, String attributesItem) { + this.attributes.put(key, attributesItem); + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @ApiModelProperty(required = true, value = "") + public Map getAttributes() { + return attributes; + } + + public void setAttributes(Map attributes) { + this.attributes = attributes; + } + + public GetExtendedContactDetails statistics(GetExtendedContactDetailsStatistics statistics) { + this.statistics = statistics; + return this; + } + + /** + * Get statistics + * @return statistics + **/ + @ApiModelProperty(required = true, value = "") + public GetExtendedContactDetailsStatistics getStatistics() { + return statistics; + } + + public void setStatistics(GetExtendedContactDetailsStatistics statistics) { + this.statistics = statistics; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetExtendedContactDetails getExtendedContactDetails = (GetExtendedContactDetails) o; + return ObjectUtils.equals(this.email, getExtendedContactDetails.email) && + ObjectUtils.equals(this.id, getExtendedContactDetails.id) && + ObjectUtils.equals(this.emailBlacklisted, getExtendedContactDetails.emailBlacklisted) && + ObjectUtils.equals(this.smsBlacklisted, getExtendedContactDetails.smsBlacklisted) && + ObjectUtils.equals(this.modifiedAt, getExtendedContactDetails.modifiedAt) && + ObjectUtils.equals(this.listIds, getExtendedContactDetails.listIds) && + ObjectUtils.equals(this.listUnsubscribed, getExtendedContactDetails.listUnsubscribed) && + ObjectUtils.equals(this.attributes, getExtendedContactDetails.attributes) && + ObjectUtils.equals(this.statistics, getExtendedContactDetails.statistics); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(email, id, emailBlacklisted, smsBlacklisted, modifiedAt, listIds, listUnsubscribed, attributes, statistics); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetExtendedContactDetails {\n"); + + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" emailBlacklisted: ").append(toIndentedString(emailBlacklisted)).append("\n"); + sb.append(" smsBlacklisted: ").append(toIndentedString(smsBlacklisted)).append("\n"); + sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); + sb.append(" listIds: ").append(toIndentedString(listIds)).append("\n"); + sb.append(" listUnsubscribed: ").append(toIndentedString(listUnsubscribed)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" statistics: ").append(toIndentedString(statistics)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetExtendedContactDetailsStatistics.java b/src/main/java/sibModel/GetExtendedContactDetailsStatistics.java new file mode 100644 index 0000000..dc54f22 --- /dev/null +++ b/src/main/java/sibModel/GetExtendedContactDetailsStatistics.java @@ -0,0 +1,317 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import sibModel.GetExtendedContactDetailsStatisticsClicked; +import sibModel.GetExtendedContactDetailsStatisticsMessagesSent; +import sibModel.GetExtendedContactDetailsStatisticsOpened; +import sibModel.GetExtendedContactDetailsStatisticsUnsubscriptions; + +/** + * Campaign statistics of the contact + */ +@ApiModel(description = "Campaign statistics of the contact") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetExtendedContactDetailsStatistics { + @SerializedName("messagesSent") + private List messagesSent = null; + + @SerializedName("hardBounces") + private List hardBounces = null; + + @SerializedName("softBounces") + private List softBounces = null; + + @SerializedName("complaints") + private List complaints = null; + + @SerializedName("unsubscriptions") + private GetExtendedContactDetailsStatisticsUnsubscriptions unsubscriptions = null; + + @SerializedName("opened") + private List opened = null; + + @SerializedName("clicked") + private List clicked = null; + + @SerializedName("transacAttributes") + private List transacAttributes = null; + + public GetExtendedContactDetailsStatistics messagesSent(List messagesSent) { + this.messagesSent = messagesSent; + return this; + } + + public GetExtendedContactDetailsStatistics addMessagesSentItem(GetExtendedContactDetailsStatisticsMessagesSent messagesSentItem) { + if (this.messagesSent == null) { + this.messagesSent = new ArrayList(); + } + this.messagesSent.add(messagesSentItem); + return this; + } + + /** + * Listing of the sent campaign for the contact + * @return messagesSent + **/ + @ApiModelProperty(value = "Listing of the sent campaign for the contact") + public List getMessagesSent() { + return messagesSent; + } + + public void setMessagesSent(List messagesSent) { + this.messagesSent = messagesSent; + } + + public GetExtendedContactDetailsStatistics hardBounces(List hardBounces) { + this.hardBounces = hardBounces; + return this; + } + + public GetExtendedContactDetailsStatistics addHardBouncesItem(GetExtendedContactDetailsStatisticsMessagesSent hardBouncesItem) { + if (this.hardBounces == null) { + this.hardBounces = new ArrayList(); + } + this.hardBounces.add(hardBouncesItem); + return this; + } + + /** + * Listing of the hardbounes generated by the contact + * @return hardBounces + **/ + @ApiModelProperty(value = "Listing of the hardbounes generated by the contact") + public List getHardBounces() { + return hardBounces; + } + + public void setHardBounces(List hardBounces) { + this.hardBounces = hardBounces; + } + + public GetExtendedContactDetailsStatistics softBounces(List softBounces) { + this.softBounces = softBounces; + return this; + } + + public GetExtendedContactDetailsStatistics addSoftBouncesItem(GetExtendedContactDetailsStatisticsMessagesSent softBouncesItem) { + if (this.softBounces == null) { + this.softBounces = new ArrayList(); + } + this.softBounces.add(softBouncesItem); + return this; + } + + /** + * Listing of the softbounes generated by the contact + * @return softBounces + **/ + @ApiModelProperty(value = "Listing of the softbounes generated by the contact") + public List getSoftBounces() { + return softBounces; + } + + public void setSoftBounces(List softBounces) { + this.softBounces = softBounces; + } + + public GetExtendedContactDetailsStatistics complaints(List complaints) { + this.complaints = complaints; + return this; + } + + public GetExtendedContactDetailsStatistics addComplaintsItem(GetExtendedContactDetailsStatisticsMessagesSent complaintsItem) { + if (this.complaints == null) { + this.complaints = new ArrayList(); + } + this.complaints.add(complaintsItem); + return this; + } + + /** + * Listing of the complaints generated by the contact + * @return complaints + **/ + @ApiModelProperty(value = "Listing of the complaints generated by the contact") + public List getComplaints() { + return complaints; + } + + public void setComplaints(List complaints) { + this.complaints = complaints; + } + + public GetExtendedContactDetailsStatistics unsubscriptions(GetExtendedContactDetailsStatisticsUnsubscriptions unsubscriptions) { + this.unsubscriptions = unsubscriptions; + return this; + } + + /** + * Get unsubscriptions + * @return unsubscriptions + **/ + @ApiModelProperty(value = "") + public GetExtendedContactDetailsStatisticsUnsubscriptions getUnsubscriptions() { + return unsubscriptions; + } + + public void setUnsubscriptions(GetExtendedContactDetailsStatisticsUnsubscriptions unsubscriptions) { + this.unsubscriptions = unsubscriptions; + } + + public GetExtendedContactDetailsStatistics opened(List opened) { + this.opened = opened; + return this; + } + + public GetExtendedContactDetailsStatistics addOpenedItem(GetExtendedContactDetailsStatisticsOpened openedItem) { + if (this.opened == null) { + this.opened = new ArrayList(); + } + this.opened.add(openedItem); + return this; + } + + /** + * Listing of the openings generated by the contact + * @return opened + **/ + @ApiModelProperty(value = "Listing of the openings generated by the contact") + public List getOpened() { + return opened; + } + + public void setOpened(List opened) { + this.opened = opened; + } + + public GetExtendedContactDetailsStatistics clicked(List clicked) { + this.clicked = clicked; + return this; + } + + public GetExtendedContactDetailsStatistics addClickedItem(GetExtendedContactDetailsStatisticsClicked clickedItem) { + if (this.clicked == null) { + this.clicked = new ArrayList(); + } + this.clicked.add(clickedItem); + return this; + } + + /** + * Listing of the clicks generated by the contact + * @return clicked + **/ + @ApiModelProperty(value = "Listing of the clicks generated by the contact") + public List getClicked() { + return clicked; + } + + public void setClicked(List clicked) { + this.clicked = clicked; + } + + public GetExtendedContactDetailsStatistics transacAttributes(List transacAttributes) { + this.transacAttributes = transacAttributes; + return this; + } + + public GetExtendedContactDetailsStatistics addTransacAttributesItem(Object transacAttributesItem) { + if (this.transacAttributes == null) { + this.transacAttributes = new ArrayList(); + } + this.transacAttributes.add(transacAttributesItem); + return this; + } + + /** + * Listing of the transactional attributes for the contact + * @return transacAttributes + **/ + @ApiModelProperty(value = "Listing of the transactional attributes for the contact") + public List getTransacAttributes() { + return transacAttributes; + } + + public void setTransacAttributes(List transacAttributes) { + this.transacAttributes = transacAttributes; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetExtendedContactDetailsStatistics getExtendedContactDetailsStatistics = (GetExtendedContactDetailsStatistics) o; + return ObjectUtils.equals(this.messagesSent, getExtendedContactDetailsStatistics.messagesSent) && + ObjectUtils.equals(this.hardBounces, getExtendedContactDetailsStatistics.hardBounces) && + ObjectUtils.equals(this.softBounces, getExtendedContactDetailsStatistics.softBounces) && + ObjectUtils.equals(this.complaints, getExtendedContactDetailsStatistics.complaints) && + ObjectUtils.equals(this.unsubscriptions, getExtendedContactDetailsStatistics.unsubscriptions) && + ObjectUtils.equals(this.opened, getExtendedContactDetailsStatistics.opened) && + ObjectUtils.equals(this.clicked, getExtendedContactDetailsStatistics.clicked) && + ObjectUtils.equals(this.transacAttributes, getExtendedContactDetailsStatistics.transacAttributes); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(messagesSent, hardBounces, softBounces, complaints, unsubscriptions, opened, clicked, transacAttributes); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetExtendedContactDetailsStatistics {\n"); + + sb.append(" messagesSent: ").append(toIndentedString(messagesSent)).append("\n"); + sb.append(" hardBounces: ").append(toIndentedString(hardBounces)).append("\n"); + sb.append(" softBounces: ").append(toIndentedString(softBounces)).append("\n"); + sb.append(" complaints: ").append(toIndentedString(complaints)).append("\n"); + sb.append(" unsubscriptions: ").append(toIndentedString(unsubscriptions)).append("\n"); + sb.append(" opened: ").append(toIndentedString(opened)).append("\n"); + sb.append(" clicked: ").append(toIndentedString(clicked)).append("\n"); + sb.append(" transacAttributes: ").append(toIndentedString(transacAttributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetExtendedContactDetailsStatisticsClicked.java b/src/main/java/sibModel/GetExtendedContactDetailsStatisticsClicked.java new file mode 100644 index 0000000..ebac3c2 --- /dev/null +++ b/src/main/java/sibModel/GetExtendedContactDetailsStatisticsClicked.java @@ -0,0 +1,124 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import sibModel.GetExtendedContactDetailsStatisticsLinks; + +/** + * GetExtendedContactDetailsStatisticsClicked + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetExtendedContactDetailsStatisticsClicked { + @SerializedName("campaignId") + private Long campaignId = null; + + @SerializedName("links") + private List links = new ArrayList(); + + public GetExtendedContactDetailsStatisticsClicked campaignId(Long campaignId) { + this.campaignId = campaignId; + return this; + } + + /** + * ID of the campaign which generated the event + * @return campaignId + **/ + @ApiModelProperty(example = "3", required = true, value = "ID of the campaign which generated the event") + public Long getCampaignId() { + return campaignId; + } + + public void setCampaignId(Long campaignId) { + this.campaignId = campaignId; + } + + public GetExtendedContactDetailsStatisticsClicked links(List links) { + this.links = links; + return this; + } + + public GetExtendedContactDetailsStatisticsClicked addLinksItem(GetExtendedContactDetailsStatisticsLinks linksItem) { + this.links.add(linksItem); + return this; + } + + /** + * Listing of the clicked links for the campaign + * @return links + **/ + @ApiModelProperty(required = true, value = "Listing of the clicked links for the campaign") + public List getLinks() { + return links; + } + + public void setLinks(List links) { + this.links = links; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetExtendedContactDetailsStatisticsClicked getExtendedContactDetailsStatisticsClicked = (GetExtendedContactDetailsStatisticsClicked) o; + return ObjectUtils.equals(this.campaignId, getExtendedContactDetailsStatisticsClicked.campaignId) && + ObjectUtils.equals(this.links, getExtendedContactDetailsStatisticsClicked.links); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(campaignId, links); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetExtendedContactDetailsStatisticsClicked {\n"); + + sb.append(" campaignId: ").append(toIndentedString(campaignId)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetExtendedContactDetailsStatisticsLinks.java b/src/main/java/sibModel/GetExtendedContactDetailsStatisticsLinks.java new file mode 100644 index 0000000..a6bf789 --- /dev/null +++ b/src/main/java/sibModel/GetExtendedContactDetailsStatisticsLinks.java @@ -0,0 +1,163 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.threeten.bp.OffsetDateTime; + +/** + * GetExtendedContactDetailsStatisticsLinks + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetExtendedContactDetailsStatisticsLinks { + @SerializedName("count") + private Long count = null; + + @SerializedName("eventTime") + private OffsetDateTime eventTime = null; + + @SerializedName("ip") + private String ip = null; + + @SerializedName("url") + private String url = null; + + public GetExtendedContactDetailsStatisticsLinks count(Long count) { + this.count = count; + return this; + } + + /** + * Number of clicks on this link for the campaign + * @return count + **/ + @ApiModelProperty(example = "1", required = true, value = "Number of clicks on this link for the campaign") + public Long getCount() { + return count; + } + + public void setCount(Long count) { + this.count = count; + } + + public GetExtendedContactDetailsStatisticsLinks eventTime(OffsetDateTime eventTime) { + this.eventTime = eventTime; + return this; + } + + /** + * UTC date-time of the event + * @return eventTime + **/ + @ApiModelProperty(example = "2017-03-12T20:15:13Z", required = true, value = "UTC date-time of the event") + public OffsetDateTime getEventTime() { + return eventTime; + } + + public void setEventTime(OffsetDateTime eventTime) { + this.eventTime = eventTime; + } + + public GetExtendedContactDetailsStatisticsLinks ip(String ip) { + this.ip = ip; + return this; + } + + /** + * IP from which the user has clicked on the link + * @return ip + **/ + @ApiModelProperty(example = "165.87.3.15", required = true, value = "IP from which the user has clicked on the link") + public String getIp() { + return ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + public GetExtendedContactDetailsStatisticsLinks url(String url) { + this.url = url; + return this; + } + + /** + * URL of the clicked link + * @return url + **/ + @ApiModelProperty(example = "www.myshop.com", required = true, value = "URL of the clicked link") + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetExtendedContactDetailsStatisticsLinks getExtendedContactDetailsStatisticsLinks = (GetExtendedContactDetailsStatisticsLinks) o; + return ObjectUtils.equals(this.count, getExtendedContactDetailsStatisticsLinks.count) && + ObjectUtils.equals(this.eventTime, getExtendedContactDetailsStatisticsLinks.eventTime) && + ObjectUtils.equals(this.ip, getExtendedContactDetailsStatisticsLinks.ip) && + ObjectUtils.equals(this.url, getExtendedContactDetailsStatisticsLinks.url); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(count, eventTime, ip, url); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetExtendedContactDetailsStatisticsLinks {\n"); + + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" eventTime: ").append(toIndentedString(eventTime)).append("\n"); + sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetExtendedContactDetailsStatisticsMessagesSent.java b/src/main/java/sibModel/GetExtendedContactDetailsStatisticsMessagesSent.java new file mode 100644 index 0000000..2a5513b --- /dev/null +++ b/src/main/java/sibModel/GetExtendedContactDetailsStatisticsMessagesSent.java @@ -0,0 +1,117 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.threeten.bp.OffsetDateTime; + +/** + * GetExtendedContactDetailsStatisticsMessagesSent + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetExtendedContactDetailsStatisticsMessagesSent { + @SerializedName("campaignId") + private Long campaignId = null; + + @SerializedName("eventTime") + private OffsetDateTime eventTime = null; + + public GetExtendedContactDetailsStatisticsMessagesSent campaignId(Long campaignId) { + this.campaignId = campaignId; + return this; + } + + /** + * ID of the campaign which generated the event + * @return campaignId + **/ + @ApiModelProperty(example = "3", required = true, value = "ID of the campaign which generated the event") + public Long getCampaignId() { + return campaignId; + } + + public void setCampaignId(Long campaignId) { + this.campaignId = campaignId; + } + + public GetExtendedContactDetailsStatisticsMessagesSent eventTime(OffsetDateTime eventTime) { + this.eventTime = eventTime; + return this; + } + + /** + * UTC date-time of the event + * @return eventTime + **/ + @ApiModelProperty(example = "2017-03-12T20:15:13Z", required = true, value = "UTC date-time of the event") + public OffsetDateTime getEventTime() { + return eventTime; + } + + public void setEventTime(OffsetDateTime eventTime) { + this.eventTime = eventTime; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetExtendedContactDetailsStatisticsMessagesSent getExtendedContactDetailsStatisticsMessagesSent = (GetExtendedContactDetailsStatisticsMessagesSent) o; + return ObjectUtils.equals(this.campaignId, getExtendedContactDetailsStatisticsMessagesSent.campaignId) && + ObjectUtils.equals(this.eventTime, getExtendedContactDetailsStatisticsMessagesSent.eventTime); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(campaignId, eventTime); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetExtendedContactDetailsStatisticsMessagesSent {\n"); + + sb.append(" campaignId: ").append(toIndentedString(campaignId)).append("\n"); + sb.append(" eventTime: ").append(toIndentedString(eventTime)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetExtendedContactDetailsStatisticsOpened.java b/src/main/java/sibModel/GetExtendedContactDetailsStatisticsOpened.java new file mode 100644 index 0000000..9152740 --- /dev/null +++ b/src/main/java/sibModel/GetExtendedContactDetailsStatisticsOpened.java @@ -0,0 +1,163 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.threeten.bp.OffsetDateTime; + +/** + * GetExtendedContactDetailsStatisticsOpened + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetExtendedContactDetailsStatisticsOpened { + @SerializedName("campaignId") + private Long campaignId = null; + + @SerializedName("count") + private Long count = null; + + @SerializedName("eventTime") + private OffsetDateTime eventTime = null; + + @SerializedName("ip") + private String ip = null; + + public GetExtendedContactDetailsStatisticsOpened campaignId(Long campaignId) { + this.campaignId = campaignId; + return this; + } + + /** + * ID of the campaign which generated the event + * @return campaignId + **/ + @ApiModelProperty(example = "3", required = true, value = "ID of the campaign which generated the event") + public Long getCampaignId() { + return campaignId; + } + + public void setCampaignId(Long campaignId) { + this.campaignId = campaignId; + } + + public GetExtendedContactDetailsStatisticsOpened count(Long count) { + this.count = count; + return this; + } + + /** + * Number of openings for the campaign + * @return count + **/ + @ApiModelProperty(example = "1", required = true, value = "Number of openings for the campaign") + public Long getCount() { + return count; + } + + public void setCount(Long count) { + this.count = count; + } + + public GetExtendedContactDetailsStatisticsOpened eventTime(OffsetDateTime eventTime) { + this.eventTime = eventTime; + return this; + } + + /** + * UTC date-time of the event + * @return eventTime + **/ + @ApiModelProperty(example = "2017-03-12T20:15:13Z", required = true, value = "UTC date-time of the event") + public OffsetDateTime getEventTime() { + return eventTime; + } + + public void setEventTime(OffsetDateTime eventTime) { + this.eventTime = eventTime; + } + + public GetExtendedContactDetailsStatisticsOpened ip(String ip) { + this.ip = ip; + return this; + } + + /** + * IP from which the user has opened the email + * @return ip + **/ + @ApiModelProperty(example = "165.87.3.15", required = true, value = "IP from which the user has opened the email") + public String getIp() { + return ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetExtendedContactDetailsStatisticsOpened getExtendedContactDetailsStatisticsOpened = (GetExtendedContactDetailsStatisticsOpened) o; + return ObjectUtils.equals(this.campaignId, getExtendedContactDetailsStatisticsOpened.campaignId) && + ObjectUtils.equals(this.count, getExtendedContactDetailsStatisticsOpened.count) && + ObjectUtils.equals(this.eventTime, getExtendedContactDetailsStatisticsOpened.eventTime) && + ObjectUtils.equals(this.ip, getExtendedContactDetailsStatisticsOpened.ip); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(campaignId, count, eventTime, ip); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetExtendedContactDetailsStatisticsOpened {\n"); + + sb.append(" campaignId: ").append(toIndentedString(campaignId)).append("\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" eventTime: ").append(toIndentedString(eventTime)).append("\n"); + sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetExtendedContactDetailsStatisticsUnsubscriptions.java b/src/main/java/sibModel/GetExtendedContactDetailsStatisticsUnsubscriptions.java new file mode 100644 index 0000000..1ce6a13 --- /dev/null +++ b/src/main/java/sibModel/GetExtendedContactDetailsStatisticsUnsubscriptions.java @@ -0,0 +1,131 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import sibModel.GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription; +import sibModel.GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription; + +/** + * Listing of the unsubscription for the contact + */ +@ApiModel(description = "Listing of the unsubscription for the contact") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetExtendedContactDetailsStatisticsUnsubscriptions { + @SerializedName("userUnsubscription") + private List userUnsubscription = new ArrayList(); + + @SerializedName("adminUnsubscription") + private List adminUnsubscription = new ArrayList(); + + public GetExtendedContactDetailsStatisticsUnsubscriptions userUnsubscription(List userUnsubscription) { + this.userUnsubscription = userUnsubscription; + return this; + } + + public GetExtendedContactDetailsStatisticsUnsubscriptions addUserUnsubscriptionItem(GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription userUnsubscriptionItem) { + this.userUnsubscription.add(userUnsubscriptionItem); + return this; + } + + /** + * Contact unsubscribe via unsubscription link in a campaign + * @return userUnsubscription + **/ + @ApiModelProperty(required = true, value = "Contact unsubscribe via unsubscription link in a campaign") + public List getUserUnsubscription() { + return userUnsubscription; + } + + public void setUserUnsubscription(List userUnsubscription) { + this.userUnsubscription = userUnsubscription; + } + + public GetExtendedContactDetailsStatisticsUnsubscriptions adminUnsubscription(List adminUnsubscription) { + this.adminUnsubscription = adminUnsubscription; + return this; + } + + public GetExtendedContactDetailsStatisticsUnsubscriptions addAdminUnsubscriptionItem(GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription adminUnsubscriptionItem) { + this.adminUnsubscription.add(adminUnsubscriptionItem); + return this; + } + + /** + * Contact has been unsubscribed from the administrator + * @return adminUnsubscription + **/ + @ApiModelProperty(required = true, value = "Contact has been unsubscribed from the administrator") + public List getAdminUnsubscription() { + return adminUnsubscription; + } + + public void setAdminUnsubscription(List adminUnsubscription) { + this.adminUnsubscription = adminUnsubscription; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetExtendedContactDetailsStatisticsUnsubscriptions getExtendedContactDetailsStatisticsUnsubscriptions = (GetExtendedContactDetailsStatisticsUnsubscriptions) o; + return ObjectUtils.equals(this.userUnsubscription, getExtendedContactDetailsStatisticsUnsubscriptions.userUnsubscription) && + ObjectUtils.equals(this.adminUnsubscription, getExtendedContactDetailsStatisticsUnsubscriptions.adminUnsubscription); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(userUnsubscription, adminUnsubscription); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetExtendedContactDetailsStatisticsUnsubscriptions {\n"); + + sb.append(" userUnsubscription: ").append(toIndentedString(userUnsubscription)).append("\n"); + sb.append(" adminUnsubscription: ").append(toIndentedString(adminUnsubscription)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.java b/src/main/java/sibModel/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.java new file mode 100644 index 0000000..e38d437 --- /dev/null +++ b/src/main/java/sibModel/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.java @@ -0,0 +1,117 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.threeten.bp.OffsetDateTime; + +/** + * GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription { + @SerializedName("eventTime") + private OffsetDateTime eventTime = null; + + @SerializedName("ip") + private String ip = null; + + public GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription eventTime(OffsetDateTime eventTime) { + this.eventTime = eventTime; + return this; + } + + /** + * UTC date-time of the event + * @return eventTime + **/ + @ApiModelProperty(example = "2017-03-12T20:15:13Z", required = true, value = "UTC date-time of the event") + public OffsetDateTime getEventTime() { + return eventTime; + } + + public void setEventTime(OffsetDateTime eventTime) { + this.eventTime = eventTime; + } + + public GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription ip(String ip) { + this.ip = ip; + return this; + } + + /** + * IP from which the user has been unsubscribed + * @return ip + **/ + @ApiModelProperty(example = "165.87.3.15", required = true, value = "IP from which the user has been unsubscribed") + public String getIp() { + return ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription getExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription = (GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription) o; + return ObjectUtils.equals(this.eventTime, getExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.eventTime) && + ObjectUtils.equals(this.ip, getExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.ip); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(eventTime, ip); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription {\n"); + + sb.append(" eventTime: ").append(toIndentedString(eventTime)).append("\n"); + sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.java b/src/main/java/sibModel/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.java new file mode 100644 index 0000000..f7e2463 --- /dev/null +++ b/src/main/java/sibModel/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.java @@ -0,0 +1,140 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.threeten.bp.OffsetDateTime; + +/** + * GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription { + @SerializedName("campaignId") + private Long campaignId = null; + + @SerializedName("eventTime") + private OffsetDateTime eventTime = null; + + @SerializedName("ip") + private String ip = null; + + public GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription campaignId(Long campaignId) { + this.campaignId = campaignId; + return this; + } + + /** + * ID of the campaign which generated the event + * @return campaignId + **/ + @ApiModelProperty(example = "3", required = true, value = "ID of the campaign which generated the event") + public Long getCampaignId() { + return campaignId; + } + + public void setCampaignId(Long campaignId) { + this.campaignId = campaignId; + } + + public GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription eventTime(OffsetDateTime eventTime) { + this.eventTime = eventTime; + return this; + } + + /** + * UTC date-time of the event + * @return eventTime + **/ + @ApiModelProperty(example = "2017-03-12T20:15:13Z", required = true, value = "UTC date-time of the event") + public OffsetDateTime getEventTime() { + return eventTime; + } + + public void setEventTime(OffsetDateTime eventTime) { + this.eventTime = eventTime; + } + + public GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription ip(String ip) { + this.ip = ip; + return this; + } + + /** + * IP from which the user has unsubscribed + * @return ip + **/ + @ApiModelProperty(example = "165.87.3.15", required = true, value = "IP from which the user has unsubscribed") + public String getIp() { + return ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription getExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription = (GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription) o; + return ObjectUtils.equals(this.campaignId, getExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.campaignId) && + ObjectUtils.equals(this.eventTime, getExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.eventTime) && + ObjectUtils.equals(this.ip, getExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.ip); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(campaignId, eventTime, ip); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription {\n"); + + sb.append(" campaignId: ").append(toIndentedString(campaignId)).append("\n"); + sb.append(" eventTime: ").append(toIndentedString(eventTime)).append("\n"); + sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetExtendedList.java b/src/main/java/sibModel/GetExtendedList.java new file mode 100644 index 0000000..e4d9256 --- /dev/null +++ b/src/main/java/sibModel/GetExtendedList.java @@ -0,0 +1,267 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.threeten.bp.OffsetDateTime; +import sibModel.GetExtendedListCampaignStats; +import sibModel.GetList; + +/** + * GetExtendedList + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetExtendedList { + @SerializedName("id") + private Long id = null; + + @SerializedName("name") + private String name = null; + + @SerializedName("totalBlacklisted") + private Long totalBlacklisted = null; + + @SerializedName("totalSubscribers") + private Long totalSubscribers = null; + + @SerializedName("folderId") + private Long folderId = null; + + @SerializedName("createdAt") + private OffsetDateTime createdAt = null; + + @SerializedName("campaignStats") + private List campaignStats = null; + + @SerializedName("dynamicList") + private Boolean dynamicList = null; + + public GetExtendedList id(Long id) { + this.id = id; + return this; + } + + /** + * ID of the list + * @return id + **/ + @ApiModelProperty(example = "23", required = true, value = "ID of the list") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public GetExtendedList name(String name) { + this.name = name; + return this; + } + + /** + * Name of the list + * @return name + **/ + @ApiModelProperty(example = "Magento Customers - EN", required = true, value = "Name of the list") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public GetExtendedList totalBlacklisted(Long totalBlacklisted) { + this.totalBlacklisted = totalBlacklisted; + return this; + } + + /** + * Number of blacklisted contacts in the list + * @return totalBlacklisted + **/ + @ApiModelProperty(example = "13", required = true, value = "Number of blacklisted contacts in the list") + public Long getTotalBlacklisted() { + return totalBlacklisted; + } + + public void setTotalBlacklisted(Long totalBlacklisted) { + this.totalBlacklisted = totalBlacklisted; + } + + public GetExtendedList totalSubscribers(Long totalSubscribers) { + this.totalSubscribers = totalSubscribers; + return this; + } + + /** + * Number of contacts in the list + * @return totalSubscribers + **/ + @ApiModelProperty(example = "1776", required = true, value = "Number of contacts in the list") + public Long getTotalSubscribers() { + return totalSubscribers; + } + + public void setTotalSubscribers(Long totalSubscribers) { + this.totalSubscribers = totalSubscribers; + } + + public GetExtendedList folderId(Long folderId) { + this.folderId = folderId; + return this; + } + + /** + * ID of the folder + * @return folderId + **/ + @ApiModelProperty(example = "2", required = true, value = "ID of the folder") + public Long getFolderId() { + return folderId; + } + + public void setFolderId(Long folderId) { + this.folderId = folderId; + } + + public GetExtendedList createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Creation UTC date-time of the list (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @return createdAt + **/ + @ApiModelProperty(example = "2017-03-13T17:05:09Z", required = true, value = "Creation UTC date-time of the list (YYYY-MM-DDTHH:mm:ss.SSSZ)") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public GetExtendedList campaignStats(List campaignStats) { + this.campaignStats = campaignStats; + return this; + } + + public GetExtendedList addCampaignStatsItem(GetExtendedListCampaignStats campaignStatsItem) { + if (this.campaignStats == null) { + this.campaignStats = new ArrayList(); + } + this.campaignStats.add(campaignStatsItem); + return this; + } + + /** + * Get campaignStats + * @return campaignStats + **/ + @ApiModelProperty(value = "") + public List getCampaignStats() { + return campaignStats; + } + + public void setCampaignStats(List campaignStats) { + this.campaignStats = campaignStats; + } + + public GetExtendedList dynamicList(Boolean dynamicList) { + this.dynamicList = dynamicList; + return this; + } + + /** + * Status telling if the list is dynamic or not (true=dynamic, false=not dynamic) + * @return dynamicList + **/ + @ApiModelProperty(example = "false", value = "Status telling if the list is dynamic or not (true=dynamic, false=not dynamic)") + public Boolean isDynamicList() { + return dynamicList; + } + + public void setDynamicList(Boolean dynamicList) { + this.dynamicList = dynamicList; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetExtendedList getExtendedList = (GetExtendedList) o; + return ObjectUtils.equals(this.id, getExtendedList.id) && + ObjectUtils.equals(this.name, getExtendedList.name) && + ObjectUtils.equals(this.totalBlacklisted, getExtendedList.totalBlacklisted) && + ObjectUtils.equals(this.totalSubscribers, getExtendedList.totalSubscribers) && + ObjectUtils.equals(this.folderId, getExtendedList.folderId) && + ObjectUtils.equals(this.createdAt, getExtendedList.createdAt) && + ObjectUtils.equals(this.campaignStats, getExtendedList.campaignStats) && + ObjectUtils.equals(this.dynamicList, getExtendedList.dynamicList); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(id, name, totalBlacklisted, totalSubscribers, folderId, createdAt, campaignStats, dynamicList); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetExtendedList {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" totalBlacklisted: ").append(toIndentedString(totalBlacklisted)).append("\n"); + sb.append(" totalSubscribers: ").append(toIndentedString(totalSubscribers)).append("\n"); + sb.append(" folderId: ").append(toIndentedString(folderId)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" campaignStats: ").append(toIndentedString(campaignStats)).append("\n"); + sb.append(" dynamicList: ").append(toIndentedString(dynamicList)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetExtendedListCampaignStats.java b/src/main/java/sibModel/GetExtendedListCampaignStats.java new file mode 100644 index 0000000..308ed81 --- /dev/null +++ b/src/main/java/sibModel/GetExtendedListCampaignStats.java @@ -0,0 +1,117 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import sibModel.GetCampaignStats; + +/** + * GetExtendedListCampaignStats + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetExtendedListCampaignStats { + @SerializedName("campaignId") + private Long campaignId = null; + + @SerializedName("stats") + private GetCampaignStats stats = null; + + public GetExtendedListCampaignStats campaignId(Long campaignId) { + this.campaignId = campaignId; + return this; + } + + /** + * ID of the campaign + * @return campaignId + **/ + @ApiModelProperty(example = "143", required = true, value = "ID of the campaign") + public Long getCampaignId() { + return campaignId; + } + + public void setCampaignId(Long campaignId) { + this.campaignId = campaignId; + } + + public GetExtendedListCampaignStats stats(GetCampaignStats stats) { + this.stats = stats; + return this; + } + + /** + * Get stats + * @return stats + **/ + @ApiModelProperty(required = true, value = "") + public GetCampaignStats getStats() { + return stats; + } + + public void setStats(GetCampaignStats stats) { + this.stats = stats; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetExtendedListCampaignStats getExtendedListCampaignStats = (GetExtendedListCampaignStats) o; + return ObjectUtils.equals(this.campaignId, getExtendedListCampaignStats.campaignId) && + ObjectUtils.equals(this.stats, getExtendedListCampaignStats.stats); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(campaignId, stats); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetExtendedListCampaignStats {\n"); + + sb.append(" campaignId: ").append(toIndentedString(campaignId)).append("\n"); + sb.append(" stats: ").append(toIndentedString(stats)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetFolder.java b/src/main/java/sibModel/GetFolder.java new file mode 100644 index 0000000..b6130ca --- /dev/null +++ b/src/main/java/sibModel/GetFolder.java @@ -0,0 +1,185 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * GetFolder + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetFolder { + @SerializedName("id") + private Long id = null; + + @SerializedName("name") + private String name = null; + + @SerializedName("totalBlacklisted") + private Long totalBlacklisted = null; + + @SerializedName("totalSubscribers") + private Long totalSubscribers = null; + + @SerializedName("uniqueSubscribers") + private Long uniqueSubscribers = null; + + public GetFolder id(Long id) { + this.id = id; + return this; + } + + /** + * ID of the folder + * @return id + **/ + @ApiModelProperty(example = "2", required = true, value = "ID of the folder") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public GetFolder name(String name) { + this.name = name; + return this; + } + + /** + * Name of the folder + * @return name + **/ + @ApiModelProperty(example = "Magento Customers", required = true, value = "Name of the folder") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public GetFolder totalBlacklisted(Long totalBlacklisted) { + this.totalBlacklisted = totalBlacklisted; + return this; + } + + /** + * Number of blacklisted contacts in the folder + * @return totalBlacklisted + **/ + @ApiModelProperty(example = "32", required = true, value = "Number of blacklisted contacts in the folder") + public Long getTotalBlacklisted() { + return totalBlacklisted; + } + + public void setTotalBlacklisted(Long totalBlacklisted) { + this.totalBlacklisted = totalBlacklisted; + } + + public GetFolder totalSubscribers(Long totalSubscribers) { + this.totalSubscribers = totalSubscribers; + return this; + } + + /** + * Number of contacts in the folder + * @return totalSubscribers + **/ + @ApiModelProperty(example = "19777", required = true, value = "Number of contacts in the folder") + public Long getTotalSubscribers() { + return totalSubscribers; + } + + public void setTotalSubscribers(Long totalSubscribers) { + this.totalSubscribers = totalSubscribers; + } + + public GetFolder uniqueSubscribers(Long uniqueSubscribers) { + this.uniqueSubscribers = uniqueSubscribers; + return this; + } + + /** + * Number of unique contacts in the folder + * @return uniqueSubscribers + **/ + @ApiModelProperty(example = "16222", required = true, value = "Number of unique contacts in the folder") + public Long getUniqueSubscribers() { + return uniqueSubscribers; + } + + public void setUniqueSubscribers(Long uniqueSubscribers) { + this.uniqueSubscribers = uniqueSubscribers; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetFolder getFolder = (GetFolder) o; + return ObjectUtils.equals(this.id, getFolder.id) && + ObjectUtils.equals(this.name, getFolder.name) && + ObjectUtils.equals(this.totalBlacklisted, getFolder.totalBlacklisted) && + ObjectUtils.equals(this.totalSubscribers, getFolder.totalSubscribers) && + ObjectUtils.equals(this.uniqueSubscribers, getFolder.uniqueSubscribers); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(id, name, totalBlacklisted, totalSubscribers, uniqueSubscribers); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetFolder {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" totalBlacklisted: ").append(toIndentedString(totalBlacklisted)).append("\n"); + sb.append(" totalSubscribers: ").append(toIndentedString(totalSubscribers)).append("\n"); + sb.append(" uniqueSubscribers: ").append(toIndentedString(uniqueSubscribers)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetFolderLists.java b/src/main/java/sibModel/GetFolderLists.java new file mode 100644 index 0000000..24d2546 --- /dev/null +++ b/src/main/java/sibModel/GetFolderLists.java @@ -0,0 +1,123 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * GetFolderLists + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetFolderLists { + @SerializedName("lists") + private List lists = new ArrayList(); + + @SerializedName("count") + private Long count = null; + + public GetFolderLists lists(List lists) { + this.lists = lists; + return this; + } + + public GetFolderLists addListsItem(Object listsItem) { + this.lists.add(listsItem); + return this; + } + + /** + * Get lists + * @return lists + **/ + @ApiModelProperty(required = true, value = "") + public List getLists() { + return lists; + } + + public void setLists(List lists) { + this.lists = lists; + } + + public GetFolderLists count(Long count) { + this.count = count; + return this; + } + + /** + * Number of lists in the folder + * @return count + **/ + @ApiModelProperty(example = "6", required = true, value = "Number of lists in the folder") + public Long getCount() { + return count; + } + + public void setCount(Long count) { + this.count = count; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetFolderLists getFolderLists = (GetFolderLists) o; + return ObjectUtils.equals(this.lists, getFolderLists.lists) && + ObjectUtils.equals(this.count, getFolderLists.count); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(lists, count); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetFolderLists {\n"); + + sb.append(" lists: ").append(toIndentedString(lists)).append("\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetFolders.java b/src/main/java/sibModel/GetFolders.java new file mode 100644 index 0000000..8f2465b --- /dev/null +++ b/src/main/java/sibModel/GetFolders.java @@ -0,0 +1,126 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * GetFolders + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetFolders { + @SerializedName("folders") + private List folders = null; + + @SerializedName("count") + private Long count = null; + + public GetFolders folders(List folders) { + this.folders = folders; + return this; + } + + public GetFolders addFoldersItem(Object foldersItem) { + if (this.folders == null) { + this.folders = new ArrayList(); + } + this.folders.add(foldersItem); + return this; + } + + /** + * Get folders + * @return folders + **/ + @ApiModelProperty(value = "") + public List getFolders() { + return folders; + } + + public void setFolders(List folders) { + this.folders = folders; + } + + public GetFolders count(Long count) { + this.count = count; + return this; + } + + /** + * Number of folders available in your account + * @return count + **/ + @ApiModelProperty(example = "10", value = "Number of folders available in your account") + public Long getCount() { + return count; + } + + public void setCount(Long count) { + this.count = count; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetFolders getFolders = (GetFolders) o; + return ObjectUtils.equals(this.folders, getFolders.folders) && + ObjectUtils.equals(this.count, getFolders.count); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(folders, count); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetFolders {\n"); + + sb.append(" folders: ").append(toIndentedString(folders)).append("\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetIp.java b/src/main/java/sibModel/GetIp.java new file mode 100644 index 0000000..61367fb --- /dev/null +++ b/src/main/java/sibModel/GetIp.java @@ -0,0 +1,162 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * GetIp + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetIp { + @SerializedName("id") + private Long id = null; + + @SerializedName("ip") + private String ip = null; + + @SerializedName("active") + private Boolean active = null; + + @SerializedName("domain") + private String domain = null; + + public GetIp id(Long id) { + this.id = id; + return this; + } + + /** + * ID of the dedicated IP + * @return id + **/ + @ApiModelProperty(example = "3", required = true, value = "ID of the dedicated IP") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public GetIp ip(String ip) { + this.ip = ip; + return this; + } + + /** + * Dedicated IP + * @return ip + **/ + @ApiModelProperty(example = "123.65.8.22", required = true, value = "Dedicated IP") + public String getIp() { + return ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + public GetIp active(Boolean active) { + this.active = active; + return this; + } + + /** + * Status of the IP (true=active, false=inactive) + * @return active + **/ + @ApiModelProperty(example = "true", required = true, value = "Status of the IP (true=active, false=inactive)") + public Boolean isActive() { + return active; + } + + public void setActive(Boolean active) { + this.active = active; + } + + public GetIp domain(String domain) { + this.domain = domain; + return this; + } + + /** + * Domain associated to the IP + * @return domain + **/ + @ApiModelProperty(example = "mailing.myshop.com", required = true, value = "Domain associated to the IP") + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetIp getIp = (GetIp) o; + return ObjectUtils.equals(this.id, getIp.id) && + ObjectUtils.equals(this.ip, getIp.ip) && + ObjectUtils.equals(this.active, getIp.active) && + ObjectUtils.equals(this.domain, getIp.domain); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(id, ip, active, domain); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetIp {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); + sb.append(" active: ").append(toIndentedString(active)).append("\n"); + sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetIpFromSender.java b/src/main/java/sibModel/GetIpFromSender.java new file mode 100644 index 0000000..9d60552 --- /dev/null +++ b/src/main/java/sibModel/GetIpFromSender.java @@ -0,0 +1,162 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * GetIpFromSender + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetIpFromSender { + @SerializedName("id") + private Long id = null; + + @SerializedName("ip") + private String ip = null; + + @SerializedName("domain") + private String domain = null; + + @SerializedName("weight") + private Long weight = null; + + public GetIpFromSender id(Long id) { + this.id = id; + return this; + } + + /** + * ID of the dedicated IP + * @return id + **/ + @ApiModelProperty(example = "3", required = true, value = "ID of the dedicated IP") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public GetIpFromSender ip(String ip) { + this.ip = ip; + return this; + } + + /** + * Dedicated IP + * @return ip + **/ + @ApiModelProperty(example = "123.65.8.22", required = true, value = "Dedicated IP") + public String getIp() { + return ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + public GetIpFromSender domain(String domain) { + this.domain = domain; + return this; + } + + /** + * Domain associated to the IP + * @return domain + **/ + @ApiModelProperty(example = "mailing.myshop.dom", required = true, value = "Domain associated to the IP") + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public GetIpFromSender weight(Long weight) { + this.weight = weight; + return this; + } + + /** + * Weight of the IP + * @return weight + **/ + @ApiModelProperty(example = "75", required = true, value = "Weight of the IP") + public Long getWeight() { + return weight; + } + + public void setWeight(Long weight) { + this.weight = weight; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetIpFromSender getIpFromSender = (GetIpFromSender) o; + return ObjectUtils.equals(this.id, getIpFromSender.id) && + ObjectUtils.equals(this.ip, getIpFromSender.ip) && + ObjectUtils.equals(this.domain, getIpFromSender.domain) && + ObjectUtils.equals(this.weight, getIpFromSender.weight); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(id, ip, domain, weight); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetIpFromSender {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); + sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); + sb.append(" weight: ").append(toIndentedString(weight)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetIps.java b/src/main/java/sibModel/GetIps.java new file mode 100644 index 0000000..fac652c --- /dev/null +++ b/src/main/java/sibModel/GetIps.java @@ -0,0 +1,101 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import sibModel.GetIp; + +/** + * GetIps + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetIps { + @SerializedName("ips") + private List ips = new ArrayList(); + + public GetIps ips(List ips) { + this.ips = ips; + return this; + } + + public GetIps addIpsItem(GetIp ipsItem) { + this.ips.add(ipsItem); + return this; + } + + /** + * Dedicated IP(s) available on your account + * @return ips + **/ + @ApiModelProperty(required = true, value = "Dedicated IP(s) available on your account") + public List getIps() { + return ips; + } + + public void setIps(List ips) { + this.ips = ips; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetIps getIps = (GetIps) o; + return ObjectUtils.equals(this.ips, getIps.ips); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(ips); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetIps {\n"); + + sb.append(" ips: ").append(toIndentedString(ips)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetIpsFromSender.java b/src/main/java/sibModel/GetIpsFromSender.java new file mode 100644 index 0000000..8d78035 --- /dev/null +++ b/src/main/java/sibModel/GetIpsFromSender.java @@ -0,0 +1,101 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import sibModel.GetIpFromSender; + +/** + * GetIpsFromSender + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetIpsFromSender { + @SerializedName("ips") + private List ips = new ArrayList(); + + public GetIpsFromSender ips(List ips) { + this.ips = ips; + return this; + } + + public GetIpsFromSender addIpsItem(GetIpFromSender ipsItem) { + this.ips.add(ipsItem); + return this; + } + + /** + * Dedicated IP(s) linked to a sender + * @return ips + **/ + @ApiModelProperty(required = true, value = "Dedicated IP(s) linked to a sender") + public List getIps() { + return ips; + } + + public void setIps(List ips) { + this.ips = ips; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetIpsFromSender getIpsFromSender = (GetIpsFromSender) o; + return ObjectUtils.equals(this.ips, getIpsFromSender.ips); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(ips); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetIpsFromSender {\n"); + + sb.append(" ips: ").append(toIndentedString(ips)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetList.java b/src/main/java/sibModel/GetList.java new file mode 100644 index 0000000..eef9497 --- /dev/null +++ b/src/main/java/sibModel/GetList.java @@ -0,0 +1,162 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * GetList + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetList { + @SerializedName("id") + private Long id = null; + + @SerializedName("name") + private String name = null; + + @SerializedName("totalBlacklisted") + private Long totalBlacklisted = null; + + @SerializedName("totalSubscribers") + private Long totalSubscribers = null; + + public GetList id(Long id) { + this.id = id; + return this; + } + + /** + * ID of the list + * @return id + **/ + @ApiModelProperty(example = "23", required = true, value = "ID of the list") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public GetList name(String name) { + this.name = name; + return this; + } + + /** + * Name of the list + * @return name + **/ + @ApiModelProperty(example = "Magento Customers - EN", required = true, value = "Name of the list") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public GetList totalBlacklisted(Long totalBlacklisted) { + this.totalBlacklisted = totalBlacklisted; + return this; + } + + /** + * Number of blacklisted contacts in the list + * @return totalBlacklisted + **/ + @ApiModelProperty(example = "13", required = true, value = "Number of blacklisted contacts in the list") + public Long getTotalBlacklisted() { + return totalBlacklisted; + } + + public void setTotalBlacklisted(Long totalBlacklisted) { + this.totalBlacklisted = totalBlacklisted; + } + + public GetList totalSubscribers(Long totalSubscribers) { + this.totalSubscribers = totalSubscribers; + return this; + } + + /** + * Number of contacts in the list + * @return totalSubscribers + **/ + @ApiModelProperty(example = "1776", required = true, value = "Number of contacts in the list") + public Long getTotalSubscribers() { + return totalSubscribers; + } + + public void setTotalSubscribers(Long totalSubscribers) { + this.totalSubscribers = totalSubscribers; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetList getList = (GetList) o; + return ObjectUtils.equals(this.id, getList.id) && + ObjectUtils.equals(this.name, getList.name) && + ObjectUtils.equals(this.totalBlacklisted, getList.totalBlacklisted) && + ObjectUtils.equals(this.totalSubscribers, getList.totalSubscribers); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(id, name, totalBlacklisted, totalSubscribers); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetList {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" totalBlacklisted: ").append(toIndentedString(totalBlacklisted)).append("\n"); + sb.append(" totalSubscribers: ").append(toIndentedString(totalSubscribers)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetLists.java b/src/main/java/sibModel/GetLists.java new file mode 100644 index 0000000..0e57ff9 --- /dev/null +++ b/src/main/java/sibModel/GetLists.java @@ -0,0 +1,123 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * GetLists + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetLists { + @SerializedName("lists") + private List lists = new ArrayList(); + + @SerializedName("count") + private Long count = null; + + public GetLists lists(List lists) { + this.lists = lists; + return this; + } + + public GetLists addListsItem(Object listsItem) { + this.lists.add(listsItem); + return this; + } + + /** + * Listing of all the lists available in your account + * @return lists + **/ + @ApiModelProperty(required = true, value = "Listing of all the lists available in your account") + public List getLists() { + return lists; + } + + public void setLists(List lists) { + this.lists = lists; + } + + public GetLists count(Long count) { + this.count = count; + return this; + } + + /** + * Number of lists in your account + * @return count + **/ + @ApiModelProperty(example = "150", required = true, value = "Number of lists in your account") + public Long getCount() { + return count; + } + + public void setCount(Long count) { + this.count = count; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLists getLists = (GetLists) o; + return ObjectUtils.equals(this.lists, getLists.lists) && + ObjectUtils.equals(this.count, getLists.count); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(lists, count); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetLists {\n"); + + sb.append(" lists: ").append(toIndentedString(lists)).append("\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetProcess.java b/src/main/java/sibModel/GetProcess.java new file mode 100644 index 0000000..e5265b0 --- /dev/null +++ b/src/main/java/sibModel/GetProcess.java @@ -0,0 +1,211 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * GetProcess + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetProcess { + @SerializedName("id") + private Long id = null; + + /** + * Status of the process + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + QUEUED("queued"), + + IN_PROCESS("in_process"), + + COMPLETED("completed"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String text) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("status") + private StatusEnum status = null; + + @SerializedName("name") + private String name = null; + + @SerializedName("export_url") + private String exportUrl = null; + + public GetProcess id(Long id) { + this.id = id; + return this; + } + + /** + * Id of the process + * @return id + **/ + @ApiModelProperty(example = "145", required = true, value = "Id of the process") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public GetProcess status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Status of the process + * @return status + **/ + @ApiModelProperty(example = "queued", required = true, value = "Status of the process") + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + public GetProcess name(String name) { + this.name = name; + return this; + } + + /** + * Process name + * @return name + **/ + @ApiModelProperty(example = "IMPORTUSER", required = true, value = "Process name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public GetProcess exportUrl(String exportUrl) { + this.exportUrl = exportUrl; + return this; + } + + /** + * URL on which send export the of contacts once the process is completed + * @return exportUrl + **/ + @ApiModelProperty(example = "http://requestb.in/16ua3aj1", value = "URL on which send export the of contacts once the process is completed") + public String getExportUrl() { + return exportUrl; + } + + public void setExportUrl(String exportUrl) { + this.exportUrl = exportUrl; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetProcess getProcess = (GetProcess) o; + return ObjectUtils.equals(this.id, getProcess.id) && + ObjectUtils.equals(this.status, getProcess.status) && + ObjectUtils.equals(this.name, getProcess.name) && + ObjectUtils.equals(this.exportUrl, getProcess.exportUrl); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(id, status, name, exportUrl); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetProcess {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" exportUrl: ").append(toIndentedString(exportUrl)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetProcesses.java b/src/main/java/sibModel/GetProcesses.java new file mode 100644 index 0000000..dd71225 --- /dev/null +++ b/src/main/java/sibModel/GetProcesses.java @@ -0,0 +1,127 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import sibModel.GetProcess; + +/** + * GetProcesses + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetProcesses { + @SerializedName("processes") + private List processes = null; + + @SerializedName("count") + private Long count = null; + + public GetProcesses processes(List processes) { + this.processes = processes; + return this; + } + + public GetProcesses addProcessesItem(GetProcess processesItem) { + if (this.processes == null) { + this.processes = new ArrayList(); + } + this.processes.add(processesItem); + return this; + } + + /** + * List of processes available on your account + * @return processes + **/ + @ApiModelProperty(value = "List of processes available on your account") + public List getProcesses() { + return processes; + } + + public void setProcesses(List processes) { + this.processes = processes; + } + + public GetProcesses count(Long count) { + this.count = count; + return this; + } + + /** + * Number of processes available on your account + * @return count + **/ + @ApiModelProperty(example = "5", required = true, value = "Number of processes available on your account") + public Long getCount() { + return count; + } + + public void setCount(Long count) { + this.count = count; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetProcesses getProcesses = (GetProcesses) o; + return ObjectUtils.equals(this.processes, getProcesses.processes) && + ObjectUtils.equals(this.count, getProcesses.count); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(processes, count); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetProcesses {\n"); + + sb.append(" processes: ").append(toIndentedString(processes)).append("\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetReports.java b/src/main/java/sibModel/GetReports.java new file mode 100644 index 0000000..89f1f46 --- /dev/null +++ b/src/main/java/sibModel/GetReports.java @@ -0,0 +1,104 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import sibModel.GetReportsReports; + +/** + * GetReports + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetReports { + @SerializedName("reports") + private List reports = null; + + public GetReports reports(List reports) { + this.reports = reports; + return this; + } + + public GetReports addReportsItem(GetReportsReports reportsItem) { + if (this.reports == null) { + this.reports = new ArrayList(); + } + this.reports.add(reportsItem); + return this; + } + + /** + * Get reports + * @return reports + **/ + @ApiModelProperty(value = "") + public List getReports() { + return reports; + } + + public void setReports(List reports) { + this.reports = reports; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetReports getReports = (GetReports) o; + return ObjectUtils.equals(this.reports, getReports.reports); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(reports); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetReports {\n"); + + sb.append(" reports: ").append(toIndentedString(reports)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetReportsReports.java b/src/main/java/sibModel/GetReportsReports.java new file mode 100644 index 0000000..ec3c065 --- /dev/null +++ b/src/main/java/sibModel/GetReportsReports.java @@ -0,0 +1,347 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.threeten.bp.LocalDate; + +/** + * GetReportsReports + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetReportsReports { + @SerializedName("date") + private LocalDate date = null; + + @SerializedName("requests") + private Long requests = null; + + @SerializedName("delivered") + private Long delivered = null; + + @SerializedName("hardBounces") + private Long hardBounces = null; + + @SerializedName("softBounces") + private Long softBounces = null; + + @SerializedName("clicks") + private Long clicks = null; + + @SerializedName("uniqueClicks") + private Long uniqueClicks = null; + + @SerializedName("opens") + private Long opens = null; + + @SerializedName("uniqueOpens") + private Long uniqueOpens = null; + + @SerializedName("spamReports") + private Long spamReports = null; + + @SerializedName("blocked") + private Long blocked = null; + + @SerializedName("invalid") + private Long invalid = null; + + public GetReportsReports date(LocalDate date) { + this.date = date; + return this; + } + + /** + * Date of the statistics + * @return date + **/ + @ApiModelProperty(example = "2017-04-06", required = true, value = "Date of the statistics") + public LocalDate getDate() { + return date; + } + + public void setDate(LocalDate date) { + this.date = date; + } + + public GetReportsReports requests(Long requests) { + this.requests = requests; + return this; + } + + /** + * Number of requests for the date + * @return requests + **/ + @ApiModelProperty(example = "65", required = true, value = "Number of requests for the date") + public Long getRequests() { + return requests; + } + + public void setRequests(Long requests) { + this.requests = requests; + } + + public GetReportsReports delivered(Long delivered) { + this.delivered = delivered; + return this; + } + + /** + * Number of delivered emails for the date + * @return delivered + **/ + @ApiModelProperty(example = "63", required = true, value = "Number of delivered emails for the date") + public Long getDelivered() { + return delivered; + } + + public void setDelivered(Long delivered) { + this.delivered = delivered; + } + + public GetReportsReports hardBounces(Long hardBounces) { + this.hardBounces = hardBounces; + return this; + } + + /** + * Number of hardbounces for the date + * @return hardBounces + **/ + @ApiModelProperty(example = "1", required = true, value = "Number of hardbounces for the date") + public Long getHardBounces() { + return hardBounces; + } + + public void setHardBounces(Long hardBounces) { + this.hardBounces = hardBounces; + } + + public GetReportsReports softBounces(Long softBounces) { + this.softBounces = softBounces; + return this; + } + + /** + * Number of softbounces for the date + * @return softBounces + **/ + @ApiModelProperty(example = "1", required = true, value = "Number of softbounces for the date") + public Long getSoftBounces() { + return softBounces; + } + + public void setSoftBounces(Long softBounces) { + this.softBounces = softBounces; + } + + public GetReportsReports clicks(Long clicks) { + this.clicks = clicks; + return this; + } + + /** + * Number of clicks for the date + * @return clicks + **/ + @ApiModelProperty(example = "6", required = true, value = "Number of clicks for the date") + public Long getClicks() { + return clicks; + } + + public void setClicks(Long clicks) { + this.clicks = clicks; + } + + public GetReportsReports uniqueClicks(Long uniqueClicks) { + this.uniqueClicks = uniqueClicks; + return this; + } + + /** + * Number of unique clicks for the date + * @return uniqueClicks + **/ + @ApiModelProperty(example = "5", required = true, value = "Number of unique clicks for the date") + public Long getUniqueClicks() { + return uniqueClicks; + } + + public void setUniqueClicks(Long uniqueClicks) { + this.uniqueClicks = uniqueClicks; + } + + public GetReportsReports opens(Long opens) { + this.opens = opens; + return this; + } + + /** + * Number of openings for the date + * @return opens + **/ + @ApiModelProperty(example = "58", required = true, value = "Number of openings for the date") + public Long getOpens() { + return opens; + } + + public void setOpens(Long opens) { + this.opens = opens; + } + + public GetReportsReports uniqueOpens(Long uniqueOpens) { + this.uniqueOpens = uniqueOpens; + return this; + } + + /** + * Number of unique openings for the date + * @return uniqueOpens + **/ + @ApiModelProperty(example = "52", required = true, value = "Number of unique openings for the date") + public Long getUniqueOpens() { + return uniqueOpens; + } + + public void setUniqueOpens(Long uniqueOpens) { + this.uniqueOpens = uniqueOpens; + } + + public GetReportsReports spamReports(Long spamReports) { + this.spamReports = spamReports; + return this; + } + + /** + * Number of complaints (spam reports) for the date + * @return spamReports + **/ + @ApiModelProperty(example = "0", required = true, value = "Number of complaints (spam reports) for the date") + public Long getSpamReports() { + return spamReports; + } + + public void setSpamReports(Long spamReports) { + this.spamReports = spamReports; + } + + public GetReportsReports blocked(Long blocked) { + this.blocked = blocked; + return this; + } + + /** + * Number of blocked emails for the date + * @return blocked + **/ + @ApiModelProperty(example = "0", required = true, value = "Number of blocked emails for the date") + public Long getBlocked() { + return blocked; + } + + public void setBlocked(Long blocked) { + this.blocked = blocked; + } + + public GetReportsReports invalid(Long invalid) { + this.invalid = invalid; + return this; + } + + /** + * Number of invalid emails for the date + * @return invalid + **/ + @ApiModelProperty(example = "0", required = true, value = "Number of invalid emails for the date") + public Long getInvalid() { + return invalid; + } + + public void setInvalid(Long invalid) { + this.invalid = invalid; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetReportsReports getReportsReports = (GetReportsReports) o; + return ObjectUtils.equals(this.date, getReportsReports.date) && + ObjectUtils.equals(this.requests, getReportsReports.requests) && + ObjectUtils.equals(this.delivered, getReportsReports.delivered) && + ObjectUtils.equals(this.hardBounces, getReportsReports.hardBounces) && + ObjectUtils.equals(this.softBounces, getReportsReports.softBounces) && + ObjectUtils.equals(this.clicks, getReportsReports.clicks) && + ObjectUtils.equals(this.uniqueClicks, getReportsReports.uniqueClicks) && + ObjectUtils.equals(this.opens, getReportsReports.opens) && + ObjectUtils.equals(this.uniqueOpens, getReportsReports.uniqueOpens) && + ObjectUtils.equals(this.spamReports, getReportsReports.spamReports) && + ObjectUtils.equals(this.blocked, getReportsReports.blocked) && + ObjectUtils.equals(this.invalid, getReportsReports.invalid); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(date, requests, delivered, hardBounces, softBounces, clicks, uniqueClicks, opens, uniqueOpens, spamReports, blocked, invalid); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetReportsReports {\n"); + + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" requests: ").append(toIndentedString(requests)).append("\n"); + sb.append(" delivered: ").append(toIndentedString(delivered)).append("\n"); + sb.append(" hardBounces: ").append(toIndentedString(hardBounces)).append("\n"); + sb.append(" softBounces: ").append(toIndentedString(softBounces)).append("\n"); + sb.append(" clicks: ").append(toIndentedString(clicks)).append("\n"); + sb.append(" uniqueClicks: ").append(toIndentedString(uniqueClicks)).append("\n"); + sb.append(" opens: ").append(toIndentedString(opens)).append("\n"); + sb.append(" uniqueOpens: ").append(toIndentedString(uniqueOpens)).append("\n"); + sb.append(" spamReports: ").append(toIndentedString(spamReports)).append("\n"); + sb.append(" blocked: ").append(toIndentedString(blocked)).append("\n"); + sb.append(" invalid: ").append(toIndentedString(invalid)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetSendersList.java b/src/main/java/sibModel/GetSendersList.java new file mode 100644 index 0000000..2c0d160 --- /dev/null +++ b/src/main/java/sibModel/GetSendersList.java @@ -0,0 +1,104 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import sibModel.GetSendersListSenders; + +/** + * GetSendersList + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetSendersList { + @SerializedName("senders") + private List senders = null; + + public GetSendersList senders(List senders) { + this.senders = senders; + return this; + } + + public GetSendersList addSendersItem(GetSendersListSenders sendersItem) { + if (this.senders == null) { + this.senders = new ArrayList(); + } + this.senders.add(sendersItem); + return this; + } + + /** + * List of the senders available in your account + * @return senders + **/ + @ApiModelProperty(value = "List of the senders available in your account") + public List getSenders() { + return senders; + } + + public void setSenders(List senders) { + this.senders = senders; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSendersList getSendersList = (GetSendersList) o; + return ObjectUtils.equals(this.senders, getSendersList.senders); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(senders); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetSendersList {\n"); + + sb.append(" senders: ").append(toIndentedString(senders)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetSendersListIps.java b/src/main/java/sibModel/GetSendersListIps.java new file mode 100644 index 0000000..d071eeb --- /dev/null +++ b/src/main/java/sibModel/GetSendersListIps.java @@ -0,0 +1,139 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * GetSendersListIps + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetSendersListIps { + @SerializedName("ip") + private String ip = null; + + @SerializedName("domain") + private String domain = null; + + @SerializedName("weight") + private Long weight = null; + + public GetSendersListIps ip(String ip) { + this.ip = ip; + return this; + } + + /** + * Dedicated IP available in your account + * @return ip + **/ + @ApiModelProperty(example = "123.98.689.7", required = true, value = "Dedicated IP available in your account") + public String getIp() { + return ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + public GetSendersListIps domain(String domain) { + this.domain = domain; + return this; + } + + /** + * Domain of the IP + * @return domain + **/ + @ApiModelProperty(example = "mycompany.com", required = true, value = "Domain of the IP") + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public GetSendersListIps weight(Long weight) { + this.weight = weight; + return this; + } + + /** + * Weight of the IP for this sender + * @return weight + **/ + @ApiModelProperty(example = "50", required = true, value = "Weight of the IP for this sender") + public Long getWeight() { + return weight; + } + + public void setWeight(Long weight) { + this.weight = weight; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSendersListIps getSendersListIps = (GetSendersListIps) o; + return ObjectUtils.equals(this.ip, getSendersListIps.ip) && + ObjectUtils.equals(this.domain, getSendersListIps.domain) && + ObjectUtils.equals(this.weight, getSendersListIps.weight); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(ip, domain, weight); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetSendersListIps {\n"); + + sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); + sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); + sb.append(" weight: ").append(toIndentedString(weight)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetSendersListSenders.java b/src/main/java/sibModel/GetSendersListSenders.java new file mode 100644 index 0000000..82eb05c --- /dev/null +++ b/src/main/java/sibModel/GetSendersListSenders.java @@ -0,0 +1,196 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import sibModel.GetSendersListIps; + +/** + * GetSendersListSenders + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetSendersListSenders { + @SerializedName("id") + private Long id = null; + + @SerializedName("name") + private String name = null; + + @SerializedName("email") + private String email = null; + + @SerializedName("active") + private Boolean active = null; + + @SerializedName("ips") + private List ips = null; + + public GetSendersListSenders id(Long id) { + this.id = id; + return this; + } + + /** + * Id of the sender + * @return id + **/ + @ApiModelProperty(example = "0", required = true, value = "Id of the sender") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public GetSendersListSenders name(String name) { + this.name = name; + return this; + } + + /** + * From Name associated to the sender + * @return name + **/ + @ApiModelProperty(example = "Marketing", required = true, value = "From Name associated to the sender") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public GetSendersListSenders email(String email) { + this.email = email; + return this; + } + + /** + * From Email associated to the sender + * @return email + **/ + @ApiModelProperty(example = "marketing@mycompany.com", required = true, value = "From Email associated to the sender") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public GetSendersListSenders active(Boolean active) { + this.active = active; + return this; + } + + /** + * Status of sender (true=activated, false=deactivated) + * @return active + **/ + @ApiModelProperty(example = "false", required = true, value = "Status of sender (true=activated, false=deactivated)") + public Boolean isActive() { + return active; + } + + public void setActive(Boolean active) { + this.active = active; + } + + public GetSendersListSenders ips(List ips) { + this.ips = ips; + return this; + } + + public GetSendersListSenders addIpsItem(GetSendersListIps ipsItem) { + if (this.ips == null) { + this.ips = new ArrayList(); + } + this.ips.add(ipsItem); + return this; + } + + /** + * List of dedicated IP(s) available in the account. This data is displayed only for dedicated IPs + * @return ips + **/ + @ApiModelProperty(value = "List of dedicated IP(s) available in the account. This data is displayed only for dedicated IPs") + public List getIps() { + return ips; + } + + public void setIps(List ips) { + this.ips = ips; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSendersListSenders getSendersListSenders = (GetSendersListSenders) o; + return ObjectUtils.equals(this.id, getSendersListSenders.id) && + ObjectUtils.equals(this.name, getSendersListSenders.name) && + ObjectUtils.equals(this.email, getSendersListSenders.email) && + ObjectUtils.equals(this.active, getSendersListSenders.active) && + ObjectUtils.equals(this.ips, getSendersListSenders.ips); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(id, name, email, active, ips); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetSendersListSenders {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" active: ").append(toIndentedString(active)).append("\n"); + sb.append(" ips: ").append(toIndentedString(ips)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetSmsCampaign.java b/src/main/java/sibModel/GetSmsCampaign.java new file mode 100644 index 0000000..c3180ef --- /dev/null +++ b/src/main/java/sibModel/GetSmsCampaign.java @@ -0,0 +1,334 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.threeten.bp.OffsetDateTime; +import sibModel.GetSmsCampaignOverview; + +/** + * GetSmsCampaign + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetSmsCampaign { + @SerializedName("id") + private Long id = null; + + @SerializedName("name") + private String name = null; + + /** + * Status of the SMS Campaign + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + DRAFT("draft"), + + SENT("sent"), + + ARCHIVE("archive"), + + QUEUED("queued"), + + SUSPENDED("suspended"), + + IN_PROCESS("in_process"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String text) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("status") + private StatusEnum status = null; + + @SerializedName("content") + private String content = null; + + @SerializedName("scheduledAt") + private OffsetDateTime scheduledAt = null; + + @SerializedName("testSent") + private Boolean testSent = null; + + @SerializedName("sender") + private String sender = null; + + @SerializedName("createdAt") + private OffsetDateTime createdAt = null; + + @SerializedName("modifiedAt") + private OffsetDateTime modifiedAt = null; + + public GetSmsCampaign id(Long id) { + this.id = id; + return this; + } + + /** + * ID of the SMS Campaign + * @return id + **/ + @ApiModelProperty(example = "2", required = true, value = "ID of the SMS Campaign") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public GetSmsCampaign name(String name) { + this.name = name; + return this; + } + + /** + * Name of the SMS Campaign + * @return name + **/ + @ApiModelProperty(example = "PROMO CODE", required = true, value = "Name of the SMS Campaign") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public GetSmsCampaign status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Status of the SMS Campaign + * @return status + **/ + @ApiModelProperty(example = "draft", required = true, value = "Status of the SMS Campaign") + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + public GetSmsCampaign content(String content) { + this.content = content; + return this; + } + + /** + * Content of the SMS Campaign + * @return content + **/ + @ApiModelProperty(example = "Visit our Store and get some discount !", required = true, value = "Content of the SMS Campaign") + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public GetSmsCampaign scheduledAt(OffsetDateTime scheduledAt) { + this.scheduledAt = scheduledAt; + return this; + } + + /** + * UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format + * @return scheduledAt + **/ + @ApiModelProperty(example = "2017-06-01T12:30:00Z", required = true, value = "UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format") + public OffsetDateTime getScheduledAt() { + return scheduledAt; + } + + public void setScheduledAt(OffsetDateTime scheduledAt) { + this.scheduledAt = scheduledAt; + } + + public GetSmsCampaign testSent(Boolean testSent) { + this.testSent = testSent; + return this; + } + + /** + * Retrieved the status of test SMS sending. (true=Test SMS has been sent false=Test SMS has not been sent) + * @return testSent + **/ + @ApiModelProperty(example = "false", required = true, value = "Retrieved the status of test SMS sending. (true=Test SMS has been sent false=Test SMS has not been sent)") + public Boolean isTestSent() { + return testSent; + } + + public void setTestSent(Boolean testSent) { + this.testSent = testSent; + } + + public GetSmsCampaign sender(String sender) { + this.sender = sender; + return this; + } + + /** + * Sender of the SMS Campaign + * @return sender + **/ + @ApiModelProperty(example = "MyCompany", required = true, value = "Sender of the SMS Campaign") + public String getSender() { + return sender; + } + + public void setSender(String sender) { + this.sender = sender; + } + + public GetSmsCampaign createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @return createdAt + **/ + @ApiModelProperty(example = "2017-06-01T12:30:00Z", required = true, value = "Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public GetSmsCampaign modifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + return this; + } + + /** + * UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @return modifiedAt + **/ + @ApiModelProperty(example = "2017-05-01T12:30:00Z", required = true, value = "UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)") + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } + + public void setModifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSmsCampaign getSmsCampaign = (GetSmsCampaign) o; + return ObjectUtils.equals(this.id, getSmsCampaign.id) && + ObjectUtils.equals(this.name, getSmsCampaign.name) && + ObjectUtils.equals(this.status, getSmsCampaign.status) && + ObjectUtils.equals(this.content, getSmsCampaign.content) && + ObjectUtils.equals(this.scheduledAt, getSmsCampaign.scheduledAt) && + ObjectUtils.equals(this.testSent, getSmsCampaign.testSent) && + ObjectUtils.equals(this.sender, getSmsCampaign.sender) && + ObjectUtils.equals(this.createdAt, getSmsCampaign.createdAt) && + ObjectUtils.equals(this.modifiedAt, getSmsCampaign.modifiedAt); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(id, name, status, content, scheduledAt, testSent, sender, createdAt, modifiedAt); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetSmsCampaign {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" scheduledAt: ").append(toIndentedString(scheduledAt)).append("\n"); + sb.append(" testSent: ").append(toIndentedString(testSent)).append("\n"); + sb.append(" sender: ").append(toIndentedString(sender)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetSmsCampaignOverview.java b/src/main/java/sibModel/GetSmsCampaignOverview.java new file mode 100644 index 0000000..c761bba --- /dev/null +++ b/src/main/java/sibModel/GetSmsCampaignOverview.java @@ -0,0 +1,333 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.threeten.bp.OffsetDateTime; + +/** + * GetSmsCampaignOverview + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetSmsCampaignOverview { + @SerializedName("id") + private Long id = null; + + @SerializedName("name") + private String name = null; + + /** + * Status of the SMS Campaign + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + DRAFT("draft"), + + SENT("sent"), + + ARCHIVE("archive"), + + QUEUED("queued"), + + SUSPENDED("suspended"), + + IN_PROCESS("in_process"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String text) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("status") + private StatusEnum status = null; + + @SerializedName("content") + private String content = null; + + @SerializedName("scheduledAt") + private OffsetDateTime scheduledAt = null; + + @SerializedName("testSent") + private Boolean testSent = null; + + @SerializedName("sender") + private String sender = null; + + @SerializedName("createdAt") + private OffsetDateTime createdAt = null; + + @SerializedName("modifiedAt") + private OffsetDateTime modifiedAt = null; + + public GetSmsCampaignOverview id(Long id) { + this.id = id; + return this; + } + + /** + * ID of the SMS Campaign + * @return id + **/ + @ApiModelProperty(example = "2", required = true, value = "ID of the SMS Campaign") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public GetSmsCampaignOverview name(String name) { + this.name = name; + return this; + } + + /** + * Name of the SMS Campaign + * @return name + **/ + @ApiModelProperty(example = "PROMO CODE", required = true, value = "Name of the SMS Campaign") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public GetSmsCampaignOverview status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Status of the SMS Campaign + * @return status + **/ + @ApiModelProperty(example = "draft", required = true, value = "Status of the SMS Campaign") + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + public GetSmsCampaignOverview content(String content) { + this.content = content; + return this; + } + + /** + * Content of the SMS Campaign + * @return content + **/ + @ApiModelProperty(example = "Visit our Store and get some discount !", required = true, value = "Content of the SMS Campaign") + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public GetSmsCampaignOverview scheduledAt(OffsetDateTime scheduledAt) { + this.scheduledAt = scheduledAt; + return this; + } + + /** + * UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format + * @return scheduledAt + **/ + @ApiModelProperty(example = "2017-06-01T12:30:00Z", required = true, value = "UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format") + public OffsetDateTime getScheduledAt() { + return scheduledAt; + } + + public void setScheduledAt(OffsetDateTime scheduledAt) { + this.scheduledAt = scheduledAt; + } + + public GetSmsCampaignOverview testSent(Boolean testSent) { + this.testSent = testSent; + return this; + } + + /** + * Retrieved the status of test SMS sending. (true=Test SMS has been sent false=Test SMS has not been sent) + * @return testSent + **/ + @ApiModelProperty(example = "false", required = true, value = "Retrieved the status of test SMS sending. (true=Test SMS has been sent false=Test SMS has not been sent)") + public Boolean isTestSent() { + return testSent; + } + + public void setTestSent(Boolean testSent) { + this.testSent = testSent; + } + + public GetSmsCampaignOverview sender(String sender) { + this.sender = sender; + return this; + } + + /** + * Sender of the SMS Campaign + * @return sender + **/ + @ApiModelProperty(example = "MyCompany", required = true, value = "Sender of the SMS Campaign") + public String getSender() { + return sender; + } + + public void setSender(String sender) { + this.sender = sender; + } + + public GetSmsCampaignOverview createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @return createdAt + **/ + @ApiModelProperty(example = "2017-06-01T12:30:00Z", required = true, value = "Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public GetSmsCampaignOverview modifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + return this; + } + + /** + * UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @return modifiedAt + **/ + @ApiModelProperty(example = "2017-05-01T12:30:00Z", required = true, value = "UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)") + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } + + public void setModifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSmsCampaignOverview getSmsCampaignOverview = (GetSmsCampaignOverview) o; + return ObjectUtils.equals(this.id, getSmsCampaignOverview.id) && + ObjectUtils.equals(this.name, getSmsCampaignOverview.name) && + ObjectUtils.equals(this.status, getSmsCampaignOverview.status) && + ObjectUtils.equals(this.content, getSmsCampaignOverview.content) && + ObjectUtils.equals(this.scheduledAt, getSmsCampaignOverview.scheduledAt) && + ObjectUtils.equals(this.testSent, getSmsCampaignOverview.testSent) && + ObjectUtils.equals(this.sender, getSmsCampaignOverview.sender) && + ObjectUtils.equals(this.createdAt, getSmsCampaignOverview.createdAt) && + ObjectUtils.equals(this.modifiedAt, getSmsCampaignOverview.modifiedAt); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(id, name, status, content, scheduledAt, testSent, sender, createdAt, modifiedAt); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetSmsCampaignOverview {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" scheduledAt: ").append(toIndentedString(scheduledAt)).append("\n"); + sb.append(" testSent: ").append(toIndentedString(testSent)).append("\n"); + sb.append(" sender: ").append(toIndentedString(sender)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetSmsCampaignStats.java b/src/main/java/sibModel/GetSmsCampaignStats.java new file mode 100644 index 0000000..80a82bc --- /dev/null +++ b/src/main/java/sibModel/GetSmsCampaignStats.java @@ -0,0 +1,231 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * GetSmsCampaignStats + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetSmsCampaignStats { + @SerializedName("delivered") + private Long delivered = null; + + @SerializedName("sent") + private Long sent = null; + + @SerializedName("processing") + private Long processing = null; + + @SerializedName("softBounces") + private Long softBounces = null; + + @SerializedName("hardBounces") + private Long hardBounces = null; + + @SerializedName("unsubscriptions") + private Long unsubscriptions = null; + + @SerializedName("answered") + private Long answered = null; + + public GetSmsCampaignStats delivered(Long delivered) { + this.delivered = delivered; + return this; + } + + /** + * Number of delivered SMS + * @return delivered + **/ + @ApiModelProperty(example = "2987", required = true, value = "Number of delivered SMS") + public Long getDelivered() { + return delivered; + } + + public void setDelivered(Long delivered) { + this.delivered = delivered; + } + + public GetSmsCampaignStats sent(Long sent) { + this.sent = sent; + return this; + } + + /** + * Number of sent SMS + * @return sent + **/ + @ApiModelProperty(example = "3000", required = true, value = "Number of sent SMS") + public Long getSent() { + return sent; + } + + public void setSent(Long sent) { + this.sent = sent; + } + + public GetSmsCampaignStats processing(Long processing) { + this.processing = processing; + return this; + } + + /** + * Number of processing SMS + * @return processing + **/ + @ApiModelProperty(example = "0", required = true, value = "Number of processing SMS") + public Long getProcessing() { + return processing; + } + + public void setProcessing(Long processing) { + this.processing = processing; + } + + public GetSmsCampaignStats softBounces(Long softBounces) { + this.softBounces = softBounces; + return this; + } + + /** + * Number of softbounced SMS + * @return softBounces + **/ + @ApiModelProperty(example = "3", required = true, value = "Number of softbounced SMS") + public Long getSoftBounces() { + return softBounces; + } + + public void setSoftBounces(Long softBounces) { + this.softBounces = softBounces; + } + + public GetSmsCampaignStats hardBounces(Long hardBounces) { + this.hardBounces = hardBounces; + return this; + } + + /** + * Number of hardbounced SMS + * @return hardBounces + **/ + @ApiModelProperty(example = "1", required = true, value = "Number of hardbounced SMS") + public Long getHardBounces() { + return hardBounces; + } + + public void setHardBounces(Long hardBounces) { + this.hardBounces = hardBounces; + } + + public GetSmsCampaignStats unsubscriptions(Long unsubscriptions) { + this.unsubscriptions = unsubscriptions; + return this; + } + + /** + * Number of unsubscription SMS + * @return unsubscriptions + **/ + @ApiModelProperty(example = "3", required = true, value = "Number of unsubscription SMS") + public Long getUnsubscriptions() { + return unsubscriptions; + } + + public void setUnsubscriptions(Long unsubscriptions) { + this.unsubscriptions = unsubscriptions; + } + + public GetSmsCampaignStats answered(Long answered) { + this.answered = answered; + return this; + } + + /** + * Number of replies to the SMS + * @return answered + **/ + @ApiModelProperty(example = "2", required = true, value = "Number of replies to the SMS") + public Long getAnswered() { + return answered; + } + + public void setAnswered(Long answered) { + this.answered = answered; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSmsCampaignStats getSmsCampaignStats = (GetSmsCampaignStats) o; + return ObjectUtils.equals(this.delivered, getSmsCampaignStats.delivered) && + ObjectUtils.equals(this.sent, getSmsCampaignStats.sent) && + ObjectUtils.equals(this.processing, getSmsCampaignStats.processing) && + ObjectUtils.equals(this.softBounces, getSmsCampaignStats.softBounces) && + ObjectUtils.equals(this.hardBounces, getSmsCampaignStats.hardBounces) && + ObjectUtils.equals(this.unsubscriptions, getSmsCampaignStats.unsubscriptions) && + ObjectUtils.equals(this.answered, getSmsCampaignStats.answered); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(delivered, sent, processing, softBounces, hardBounces, unsubscriptions, answered); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetSmsCampaignStats {\n"); + + sb.append(" delivered: ").append(toIndentedString(delivered)).append("\n"); + sb.append(" sent: ").append(toIndentedString(sent)).append("\n"); + sb.append(" processing: ").append(toIndentedString(processing)).append("\n"); + sb.append(" softBounces: ").append(toIndentedString(softBounces)).append("\n"); + sb.append(" hardBounces: ").append(toIndentedString(hardBounces)).append("\n"); + sb.append(" unsubscriptions: ").append(toIndentedString(unsubscriptions)).append("\n"); + sb.append(" answered: ").append(toIndentedString(answered)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetSmsCampaigns.java b/src/main/java/sibModel/GetSmsCampaigns.java new file mode 100644 index 0000000..5ca6ba3 --- /dev/null +++ b/src/main/java/sibModel/GetSmsCampaigns.java @@ -0,0 +1,126 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * GetSmsCampaigns + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetSmsCampaigns { + @SerializedName("campaigns") + private List campaigns = null; + + @SerializedName("count") + private Long count = null; + + public GetSmsCampaigns campaigns(List campaigns) { + this.campaigns = campaigns; + return this; + } + + public GetSmsCampaigns addCampaignsItem(Object campaignsItem) { + if (this.campaigns == null) { + this.campaigns = new ArrayList(); + } + this.campaigns.add(campaignsItem); + return this; + } + + /** + * Get campaigns + * @return campaigns + **/ + @ApiModelProperty(value = "") + public List getCampaigns() { + return campaigns; + } + + public void setCampaigns(List campaigns) { + this.campaigns = campaigns; + } + + public GetSmsCampaigns count(Long count) { + this.count = count; + return this; + } + + /** + * Number of SMS campaigns retrieved + * @return count + **/ + @ApiModelProperty(example = "12", required = true, value = "Number of SMS campaigns retrieved") + public Long getCount() { + return count; + } + + public void setCount(Long count) { + this.count = count; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSmsCampaigns getSmsCampaigns = (GetSmsCampaigns) o; + return ObjectUtils.equals(this.campaigns, getSmsCampaigns.campaigns) && + ObjectUtils.equals(this.count, getSmsCampaigns.count); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(campaigns, count); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetSmsCampaigns {\n"); + + sb.append(" campaigns: ").append(toIndentedString(campaigns)).append("\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetSmsEventReport.java b/src/main/java/sibModel/GetSmsEventReport.java new file mode 100644 index 0000000..5dcd1ae --- /dev/null +++ b/src/main/java/sibModel/GetSmsEventReport.java @@ -0,0 +1,104 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import sibModel.GetSmsEventReportEvents; + +/** + * GetSmsEventReport + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetSmsEventReport { + @SerializedName("events") + private List events = null; + + public GetSmsEventReport events(List events) { + this.events = events; + return this; + } + + public GetSmsEventReport addEventsItem(GetSmsEventReportEvents eventsItem) { + if (this.events == null) { + this.events = new ArrayList(); + } + this.events.add(eventsItem); + return this; + } + + /** + * Get events + * @return events + **/ + @ApiModelProperty(value = "") + public List getEvents() { + return events; + } + + public void setEvents(List events) { + this.events = events; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSmsEventReport getSmsEventReport = (GetSmsEventReport) o; + return ObjectUtils.equals(this.events, getSmsEventReport.events); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(events); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetSmsEventReport {\n"); + + sb.append(" events: ").append(toIndentedString(events)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetSmsEventReportEvents.java b/src/main/java/sibModel/GetSmsEventReportEvents.java new file mode 100644 index 0000000..e31cc58 --- /dev/null +++ b/src/main/java/sibModel/GetSmsEventReportEvents.java @@ -0,0 +1,293 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.threeten.bp.LocalDate; + +/** + * GetSmsEventReportEvents + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetSmsEventReportEvents { + @SerializedName("phoneNumber") + private String phoneNumber = null; + + @SerializedName("date") + private LocalDate date = null; + + @SerializedName("messageId") + private String messageId = null; + + /** + * Event which occurred + */ + @JsonAdapter(EventEnum.Adapter.class) + public enum EventEnum { + BOUNCES("bounces"), + + HARDBOUNCES("hardBounces"), + + SOFTBOUNCES("softBounces"), + + DELIVERED("delivered"), + + SENT("sent"), + + ACCEPTED("accepted"), + + UNSUBSCRIPTION("unsubscription"), + + REPLIES("replies"), + + BLOCKED("blocked"); + + private String value; + + EventEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static EventEnum fromValue(String text) { + for (EventEnum b : EventEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final EventEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public EventEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return EventEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("event") + private EventEnum event = null; + + @SerializedName("reason") + private String reason = null; + + @SerializedName("reply") + private String reply = null; + + @SerializedName("tag") + private String tag = null; + + public GetSmsEventReportEvents phoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + * Phone number which has generated the event + * @return phoneNumber + **/ + @ApiModelProperty(example = "00189001094", required = true, value = "Phone number which has generated the event") + public String getPhoneNumber() { + return phoneNumber; + } + + public void setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + } + + public GetSmsEventReportEvents date(LocalDate date) { + this.date = date; + return this; + } + + /** + * Date on which the event has been generated + * @return date + **/ + @ApiModelProperty(example = "2017-03-12", required = true, value = "Date on which the event has been generated") + public LocalDate getDate() { + return date; + } + + public void setDate(LocalDate date) { + this.date = date; + } + + public GetSmsEventReportEvents messageId(String messageId) { + this.messageId = messageId; + return this; + } + + /** + * Message ID which generated the event + * @return messageId + **/ + @ApiModelProperty(example = "1472640582425378", required = true, value = "Message ID which generated the event") + public String getMessageId() { + return messageId; + } + + public void setMessageId(String messageId) { + this.messageId = messageId; + } + + public GetSmsEventReportEvents event(EventEnum event) { + this.event = event; + return this; + } + + /** + * Event which occurred + * @return event + **/ + @ApiModelProperty(example = "accepted", required = true, value = "Event which occurred") + public EventEnum getEvent() { + return event; + } + + public void setEvent(EventEnum event) { + this.event = event; + } + + public GetSmsEventReportEvents reason(String reason) { + this.reason = reason; + return this; + } + + /** + * Reason of bounce (only available if the event is hardbounce or softbounce) + * @return reason + **/ + @ApiModelProperty(example = "Message is undeliverable due to an incorrect / invalid / blacklisted / permanently barred MSISDN for this operator", value = "Reason of bounce (only available if the event is hardbounce or softbounce)") + public String getReason() { + return reason; + } + + public void setReason(String reason) { + this.reason = reason; + } + + public GetSmsEventReportEvents reply(String reply) { + this.reply = reply; + return this; + } + + /** + * Get reply + * @return reply + **/ + @ApiModelProperty(value = "") + public String getReply() { + return reply; + } + + public void setReply(String reply) { + this.reply = reply; + } + + public GetSmsEventReportEvents tag(String tag) { + this.tag = tag; + return this; + } + + /** + * Tag of the SMS which generated the event + * @return tag + **/ + @ApiModelProperty(example = "CabWaiting", value = "Tag of the SMS which generated the event") + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSmsEventReportEvents getSmsEventReportEvents = (GetSmsEventReportEvents) o; + return ObjectUtils.equals(this.phoneNumber, getSmsEventReportEvents.phoneNumber) && + ObjectUtils.equals(this.date, getSmsEventReportEvents.date) && + ObjectUtils.equals(this.messageId, getSmsEventReportEvents.messageId) && + ObjectUtils.equals(this.event, getSmsEventReportEvents.event) && + ObjectUtils.equals(this.reason, getSmsEventReportEvents.reason) && + ObjectUtils.equals(this.reply, getSmsEventReportEvents.reply) && + ObjectUtils.equals(this.tag, getSmsEventReportEvents.tag); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(phoneNumber, date, messageId, event, reason, reply, tag); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetSmsEventReportEvents {\n"); + + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" messageId: ").append(toIndentedString(messageId)).append("\n"); + sb.append(" event: ").append(toIndentedString(event)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" reply: ").append(toIndentedString(reply)).append("\n"); + sb.append(" tag: ").append(toIndentedString(tag)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetSmtpTemplateOverview.java b/src/main/java/sibModel/GetSmtpTemplateOverview.java new file mode 100644 index 0000000..b034549 --- /dev/null +++ b/src/main/java/sibModel/GetSmtpTemplateOverview.java @@ -0,0 +1,348 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.threeten.bp.OffsetDateTime; +import sibModel.GetSmtpTemplateOverviewSender; + +/** + * GetSmtpTemplateOverview + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetSmtpTemplateOverview { + @SerializedName("id") + private Long id = null; + + @SerializedName("name") + private String name = null; + + @SerializedName("subject") + private String subject = null; + + @SerializedName("isActive") + private Boolean isActive = null; + + @SerializedName("testSent") + private Boolean testSent = null; + + @SerializedName("sender") + private GetSmtpTemplateOverviewSender sender = null; + + @SerializedName("replyTo") + private String replyTo = null; + + @SerializedName("toField") + private String toField = null; + + @SerializedName("tag") + private String tag = null; + + @SerializedName("htmlContent") + private String htmlContent = null; + + @SerializedName("createdAt") + private OffsetDateTime createdAt = null; + + @SerializedName("modifiedAt") + private OffsetDateTime modifiedAt = null; + + public GetSmtpTemplateOverview id(Long id) { + this.id = id; + return this; + } + + /** + * ID of the template + * @return id + **/ + @ApiModelProperty(example = "4", required = true, value = "ID of the template") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public GetSmtpTemplateOverview name(String name) { + this.name = name; + return this; + } + + /** + * Name of the template + * @return name + **/ + @ApiModelProperty(example = "Order Confirmation - EN", required = true, value = "Name of the template") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public GetSmtpTemplateOverview subject(String subject) { + this.subject = subject; + return this; + } + + /** + * Subject of the template + * @return subject + **/ + @ApiModelProperty(example = "Thanks for your order !", required = true, value = "Subject of the template") + public String getSubject() { + return subject; + } + + public void setSubject(String subject) { + this.subject = subject; + } + + public GetSmtpTemplateOverview isActive(Boolean isActive) { + this.isActive = isActive; + return this; + } + + /** + * Status of template (true=active, false=inactive) + * @return isActive + **/ + @ApiModelProperty(example = "true", required = true, value = "Status of template (true=active, false=inactive)") + public Boolean isIsActive() { + return isActive; + } + + public void setIsActive(Boolean isActive) { + this.isActive = isActive; + } + + public GetSmtpTemplateOverview testSent(Boolean testSent) { + this.testSent = testSent; + return this; + } + + /** + * Status of test sending for the template (true=test email has been sent, false=test email has not been sent) + * @return testSent + **/ + @ApiModelProperty(example = "true", required = true, value = "Status of test sending for the template (true=test email has been sent, false=test email has not been sent)") + public Boolean isTestSent() { + return testSent; + } + + public void setTestSent(Boolean testSent) { + this.testSent = testSent; + } + + public GetSmtpTemplateOverview sender(GetSmtpTemplateOverviewSender sender) { + this.sender = sender; + return this; + } + + /** + * Get sender + * @return sender + **/ + @ApiModelProperty(required = true, value = "") + public GetSmtpTemplateOverviewSender getSender() { + return sender; + } + + public void setSender(GetSmtpTemplateOverviewSender sender) { + this.sender = sender; + } + + public GetSmtpTemplateOverview replyTo(String replyTo) { + this.replyTo = replyTo; + return this; + } + + /** + * Email defined as the \"Reply to\" for the template + * @return replyTo + **/ + @ApiModelProperty(example = "replyto@domain.com", required = true, value = "Email defined as the \"Reply to\" for the template") + public String getReplyTo() { + return replyTo; + } + + public void setReplyTo(String replyTo) { + this.replyTo = replyTo; + } + + public GetSmtpTemplateOverview toField(String toField) { + this.toField = toField; + return this; + } + + /** + * Customisation of the \"to\" field for the template + * @return toField + **/ + @ApiModelProperty(example = "{FIRSTNAME} {LASTNAME}", required = true, value = "Customisation of the \"to\" field for the template") + public String getToField() { + return toField; + } + + public void setToField(String toField) { + this.toField = toField; + } + + public GetSmtpTemplateOverview tag(String tag) { + this.tag = tag; + return this; + } + + /** + * Tag of the template + * @return tag + **/ + @ApiModelProperty(example = "sports", required = true, value = "Tag of the template") + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + public GetSmtpTemplateOverview htmlContent(String htmlContent) { + this.htmlContent = htmlContent; + return this; + } + + /** + * HTML content of the template + * @return htmlContent + **/ + @ApiModelProperty(example = "Your order n°xxxxx has been confirmed. Thanks for your purchase.", required = true, value = "HTML content of the template") + public String getHtmlContent() { + return htmlContent; + } + + public void setHtmlContent(String htmlContent) { + this.htmlContent = htmlContent; + } + + public GetSmtpTemplateOverview createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Creation UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @return createdAt + **/ + @ApiModelProperty(example = "2017-05-01T12:30:00Z", required = true, value = "Creation UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ)") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public GetSmtpTemplateOverview modifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + return this; + } + + /** + * Last modification UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @return modifiedAt + **/ + @ApiModelProperty(example = "2017-05-12T12:30:00Z", required = true, value = "Last modification UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ)") + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } + + public void setModifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSmtpTemplateOverview getSmtpTemplateOverview = (GetSmtpTemplateOverview) o; + return ObjectUtils.equals(this.id, getSmtpTemplateOverview.id) && + ObjectUtils.equals(this.name, getSmtpTemplateOverview.name) && + ObjectUtils.equals(this.subject, getSmtpTemplateOverview.subject) && + ObjectUtils.equals(this.isActive, getSmtpTemplateOverview.isActive) && + ObjectUtils.equals(this.testSent, getSmtpTemplateOverview.testSent) && + ObjectUtils.equals(this.sender, getSmtpTemplateOverview.sender) && + ObjectUtils.equals(this.replyTo, getSmtpTemplateOverview.replyTo) && + ObjectUtils.equals(this.toField, getSmtpTemplateOverview.toField) && + ObjectUtils.equals(this.tag, getSmtpTemplateOverview.tag) && + ObjectUtils.equals(this.htmlContent, getSmtpTemplateOverview.htmlContent) && + ObjectUtils.equals(this.createdAt, getSmtpTemplateOverview.createdAt) && + ObjectUtils.equals(this.modifiedAt, getSmtpTemplateOverview.modifiedAt); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(id, name, subject, isActive, testSent, sender, replyTo, toField, tag, htmlContent, createdAt, modifiedAt); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetSmtpTemplateOverview {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); + sb.append(" isActive: ").append(toIndentedString(isActive)).append("\n"); + sb.append(" testSent: ").append(toIndentedString(testSent)).append("\n"); + sb.append(" sender: ").append(toIndentedString(sender)).append("\n"); + sb.append(" replyTo: ").append(toIndentedString(replyTo)).append("\n"); + sb.append(" toField: ").append(toIndentedString(toField)).append("\n"); + sb.append(" tag: ").append(toIndentedString(tag)).append("\n"); + sb.append(" htmlContent: ").append(toIndentedString(htmlContent)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetSmtpTemplateOverviewSender.java b/src/main/java/sibModel/GetSmtpTemplateOverviewSender.java new file mode 100644 index 0000000..390300e --- /dev/null +++ b/src/main/java/sibModel/GetSmtpTemplateOverviewSender.java @@ -0,0 +1,116 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * GetSmtpTemplateOverviewSender + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetSmtpTemplateOverviewSender { + @SerializedName("name") + private String name = null; + + @SerializedName("email") + private String email = null; + + public GetSmtpTemplateOverviewSender name(String name) { + this.name = name; + return this; + } + + /** + * From email for the template + * @return name + **/ + @ApiModelProperty(example = "Mary form MyShop", value = "From email for the template") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public GetSmtpTemplateOverviewSender email(String email) { + this.email = email; + return this; + } + + /** + * From email for the template + * @return email + **/ + @ApiModelProperty(example = "contact@myshop.fr", value = "From email for the template") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSmtpTemplateOverviewSender getSmtpTemplateOverviewSender = (GetSmtpTemplateOverviewSender) o; + return ObjectUtils.equals(this.name, getSmtpTemplateOverviewSender.name) && + ObjectUtils.equals(this.email, getSmtpTemplateOverviewSender.email); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(name, email); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetSmtpTemplateOverviewSender {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetSmtpTemplates.java b/src/main/java/sibModel/GetSmtpTemplates.java new file mode 100644 index 0000000..3287283 --- /dev/null +++ b/src/main/java/sibModel/GetSmtpTemplates.java @@ -0,0 +1,127 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import sibModel.GetSmtpTemplateOverview; + +/** + * GetSmtpTemplates + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetSmtpTemplates { + @SerializedName("count") + private Long count = null; + + @SerializedName("templates") + private List templates = null; + + public GetSmtpTemplates count(Long count) { + this.count = count; + return this; + } + + /** + * Count of smtp templates + * @return count + **/ + @ApiModelProperty(example = "1", value = "Count of smtp templates") + public Long getCount() { + return count; + } + + public void setCount(Long count) { + this.count = count; + } + + public GetSmtpTemplates templates(List templates) { + this.templates = templates; + return this; + } + + public GetSmtpTemplates addTemplatesItem(GetSmtpTemplateOverview templatesItem) { + if (this.templates == null) { + this.templates = new ArrayList(); + } + this.templates.add(templatesItem); + return this; + } + + /** + * Get templates + * @return templates + **/ + @ApiModelProperty(value = "") + public List getTemplates() { + return templates; + } + + public void setTemplates(List templates) { + this.templates = templates; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSmtpTemplates getSmtpTemplates = (GetSmtpTemplates) o; + return ObjectUtils.equals(this.count, getSmtpTemplates.count) && + ObjectUtils.equals(this.templates, getSmtpTemplates.templates); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(count, templates); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetSmtpTemplates {\n"); + + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" templates: ").append(toIndentedString(templates)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetStatsByDomain.java b/src/main/java/sibModel/GetStatsByDomain.java new file mode 100644 index 0000000..bf0c113 --- /dev/null +++ b/src/main/java/sibModel/GetStatsByDomain.java @@ -0,0 +1,65 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import java.util.HashMap; +import java.util.Map; +import sibModel.GetCampaignStats; + +/** + * GetStatsByDomain + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetStatsByDomain extends HashMap { + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(super.hashCode()); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetStatsByDomain {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetTransacAggregatedSmsReport.java b/src/main/java/sibModel/GetTransacAggregatedSmsReport.java new file mode 100644 index 0000000..6dcfd23 --- /dev/null +++ b/src/main/java/sibModel/GetTransacAggregatedSmsReport.java @@ -0,0 +1,300 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * GetTransacAggregatedSmsReport + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetTransacAggregatedSmsReport { + @SerializedName("range") + private String range = null; + + @SerializedName("requests") + private Long requests = null; + + @SerializedName("delivered") + private Long delivered = null; + + @SerializedName("hardBounces") + private Long hardBounces = null; + + @SerializedName("softBounces") + private Long softBounces = null; + + @SerializedName("blocked") + private Long blocked = null; + + @SerializedName("unsubscribed") + private Long unsubscribed = null; + + @SerializedName("replied") + private Long replied = null; + + @SerializedName("accepted") + private Long accepted = null; + + @SerializedName("rejected") + private Long rejected = null; + + public GetTransacAggregatedSmsReport range(String range) { + this.range = range; + return this; + } + + /** + * Time frame of the report + * @return range + **/ + @ApiModelProperty(example = "2016-09-08|2017-04-06", required = true, value = "Time frame of the report") + public String getRange() { + return range; + } + + public void setRange(String range) { + this.range = range; + } + + public GetTransacAggregatedSmsReport requests(Long requests) { + this.requests = requests; + return this; + } + + /** + * Number of requests for the timeframe + * @return requests + **/ + @ApiModelProperty(example = "263", required = true, value = "Number of requests for the timeframe") + public Long getRequests() { + return requests; + } + + public void setRequests(Long requests) { + this.requests = requests; + } + + public GetTransacAggregatedSmsReport delivered(Long delivered) { + this.delivered = delivered; + return this; + } + + /** + * Number of delivered SMS for the timeframe + * @return delivered + **/ + @ApiModelProperty(example = "249", required = true, value = "Number of delivered SMS for the timeframe") + public Long getDelivered() { + return delivered; + } + + public void setDelivered(Long delivered) { + this.delivered = delivered; + } + + public GetTransacAggregatedSmsReport hardBounces(Long hardBounces) { + this.hardBounces = hardBounces; + return this; + } + + /** + * Number of hardbounces for the timeframe + * @return hardBounces + **/ + @ApiModelProperty(example = "1", required = true, value = "Number of hardbounces for the timeframe") + public Long getHardBounces() { + return hardBounces; + } + + public void setHardBounces(Long hardBounces) { + this.hardBounces = hardBounces; + } + + public GetTransacAggregatedSmsReport softBounces(Long softBounces) { + this.softBounces = softBounces; + return this; + } + + /** + * Number of softbounces for the timeframe + * @return softBounces + **/ + @ApiModelProperty(example = "4", required = true, value = "Number of softbounces for the timeframe") + public Long getSoftBounces() { + return softBounces; + } + + public void setSoftBounces(Long softBounces) { + this.softBounces = softBounces; + } + + public GetTransacAggregatedSmsReport blocked(Long blocked) { + this.blocked = blocked; + return this; + } + + /** + * Number of blocked contact for the timeframe + * @return blocked + **/ + @ApiModelProperty(example = "2", required = true, value = "Number of blocked contact for the timeframe") + public Long getBlocked() { + return blocked; + } + + public void setBlocked(Long blocked) { + this.blocked = blocked; + } + + public GetTransacAggregatedSmsReport unsubscribed(Long unsubscribed) { + this.unsubscribed = unsubscribed; + return this; + } + + /** + * Number of unsubscription for the timeframe + * @return unsubscribed + **/ + @ApiModelProperty(example = "6", required = true, value = "Number of unsubscription for the timeframe") + public Long getUnsubscribed() { + return unsubscribed; + } + + public void setUnsubscribed(Long unsubscribed) { + this.unsubscribed = unsubscribed; + } + + public GetTransacAggregatedSmsReport replied(Long replied) { + this.replied = replied; + return this; + } + + /** + * Number of answered SMS for the timeframe + * @return replied + **/ + @ApiModelProperty(example = "12", required = true, value = "Number of answered SMS for the timeframe") + public Long getReplied() { + return replied; + } + + public void setReplied(Long replied) { + this.replied = replied; + } + + public GetTransacAggregatedSmsReport accepted(Long accepted) { + this.accepted = accepted; + return this; + } + + /** + * Number of accepted for the timeframe + * @return accepted + **/ + @ApiModelProperty(example = "252", required = true, value = "Number of accepted for the timeframe") + public Long getAccepted() { + return accepted; + } + + public void setAccepted(Long accepted) { + this.accepted = accepted; + } + + public GetTransacAggregatedSmsReport rejected(Long rejected) { + this.rejected = rejected; + return this; + } + + /** + * Number of rejected for the timeframe + * @return rejected + **/ + @ApiModelProperty(example = "8", required = true, value = "Number of rejected for the timeframe") + public Long getRejected() { + return rejected; + } + + public void setRejected(Long rejected) { + this.rejected = rejected; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTransacAggregatedSmsReport getTransacAggregatedSmsReport = (GetTransacAggregatedSmsReport) o; + return ObjectUtils.equals(this.range, getTransacAggregatedSmsReport.range) && + ObjectUtils.equals(this.requests, getTransacAggregatedSmsReport.requests) && + ObjectUtils.equals(this.delivered, getTransacAggregatedSmsReport.delivered) && + ObjectUtils.equals(this.hardBounces, getTransacAggregatedSmsReport.hardBounces) && + ObjectUtils.equals(this.softBounces, getTransacAggregatedSmsReport.softBounces) && + ObjectUtils.equals(this.blocked, getTransacAggregatedSmsReport.blocked) && + ObjectUtils.equals(this.unsubscribed, getTransacAggregatedSmsReport.unsubscribed) && + ObjectUtils.equals(this.replied, getTransacAggregatedSmsReport.replied) && + ObjectUtils.equals(this.accepted, getTransacAggregatedSmsReport.accepted) && + ObjectUtils.equals(this.rejected, getTransacAggregatedSmsReport.rejected); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(range, requests, delivered, hardBounces, softBounces, blocked, unsubscribed, replied, accepted, rejected); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetTransacAggregatedSmsReport {\n"); + + sb.append(" range: ").append(toIndentedString(range)).append("\n"); + sb.append(" requests: ").append(toIndentedString(requests)).append("\n"); + sb.append(" delivered: ").append(toIndentedString(delivered)).append("\n"); + sb.append(" hardBounces: ").append(toIndentedString(hardBounces)).append("\n"); + sb.append(" softBounces: ").append(toIndentedString(softBounces)).append("\n"); + sb.append(" blocked: ").append(toIndentedString(blocked)).append("\n"); + sb.append(" unsubscribed: ").append(toIndentedString(unsubscribed)).append("\n"); + sb.append(" replied: ").append(toIndentedString(replied)).append("\n"); + sb.append(" accepted: ").append(toIndentedString(accepted)).append("\n"); + sb.append(" rejected: ").append(toIndentedString(rejected)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetTransacSmsReport.java b/src/main/java/sibModel/GetTransacSmsReport.java new file mode 100644 index 0000000..c2b4638 --- /dev/null +++ b/src/main/java/sibModel/GetTransacSmsReport.java @@ -0,0 +1,104 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import sibModel.GetTransacSmsReportReports; + +/** + * GetTransacSmsReport + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetTransacSmsReport { + @SerializedName("reports") + private List reports = null; + + public GetTransacSmsReport reports(List reports) { + this.reports = reports; + return this; + } + + public GetTransacSmsReport addReportsItem(GetTransacSmsReportReports reportsItem) { + if (this.reports == null) { + this.reports = new ArrayList(); + } + this.reports.add(reportsItem); + return this; + } + + /** + * Get reports + * @return reports + **/ + @ApiModelProperty(value = "") + public List getReports() { + return reports; + } + + public void setReports(List reports) { + this.reports = reports; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTransacSmsReport getTransacSmsReport = (GetTransacSmsReport) o; + return ObjectUtils.equals(this.reports, getTransacSmsReport.reports); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(reports); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetTransacSmsReport {\n"); + + sb.append(" reports: ").append(toIndentedString(reports)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetTransacSmsReportReports.java b/src/main/java/sibModel/GetTransacSmsReportReports.java new file mode 100644 index 0000000..8d01312 --- /dev/null +++ b/src/main/java/sibModel/GetTransacSmsReportReports.java @@ -0,0 +1,301 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.threeten.bp.LocalDate; + +/** + * GetTransacSmsReportReports + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetTransacSmsReportReports { + @SerializedName("date") + private LocalDate date = null; + + @SerializedName("requests") + private Long requests = null; + + @SerializedName("delivered") + private Long delivered = null; + + @SerializedName("hardBounces") + private Long hardBounces = null; + + @SerializedName("softBounces") + private Long softBounces = null; + + @SerializedName("blocked") + private Long blocked = null; + + @SerializedName("unsubscribed") + private Long unsubscribed = null; + + @SerializedName("replied") + private Long replied = null; + + @SerializedName("accepted") + private Long accepted = null; + + @SerializedName("rejected") + private Long rejected = null; + + public GetTransacSmsReportReports date(LocalDate date) { + this.date = date; + return this; + } + + /** + * Date for which statistics are retrieved + * @return date + **/ + @ApiModelProperty(example = "2017-03-17", required = true, value = "Date for which statistics are retrieved") + public LocalDate getDate() { + return date; + } + + public void setDate(LocalDate date) { + this.date = date; + } + + public GetTransacSmsReportReports requests(Long requests) { + this.requests = requests; + return this; + } + + /** + * Number of requests for the date + * @return requests + **/ + @ApiModelProperty(example = "87", required = true, value = "Number of requests for the date") + public Long getRequests() { + return requests; + } + + public void setRequests(Long requests) { + this.requests = requests; + } + + public GetTransacSmsReportReports delivered(Long delivered) { + this.delivered = delivered; + return this; + } + + /** + * Number of delivered SMS for the date + * @return delivered + **/ + @ApiModelProperty(example = "85", required = true, value = "Number of delivered SMS for the date") + public Long getDelivered() { + return delivered; + } + + public void setDelivered(Long delivered) { + this.delivered = delivered; + } + + public GetTransacSmsReportReports hardBounces(Long hardBounces) { + this.hardBounces = hardBounces; + return this; + } + + /** + * Number of hardbounces for the date + * @return hardBounces + **/ + @ApiModelProperty(example = "1", required = true, value = "Number of hardbounces for the date") + public Long getHardBounces() { + return hardBounces; + } + + public void setHardBounces(Long hardBounces) { + this.hardBounces = hardBounces; + } + + public GetTransacSmsReportReports softBounces(Long softBounces) { + this.softBounces = softBounces; + return this; + } + + /** + * Number of softbounces for the date + * @return softBounces + **/ + @ApiModelProperty(example = "1", required = true, value = "Number of softbounces for the date") + public Long getSoftBounces() { + return softBounces; + } + + public void setSoftBounces(Long softBounces) { + this.softBounces = softBounces; + } + + public GetTransacSmsReportReports blocked(Long blocked) { + this.blocked = blocked; + return this; + } + + /** + * Number of blocked contact for the date + * @return blocked + **/ + @ApiModelProperty(example = "0", required = true, value = "Number of blocked contact for the date") + public Long getBlocked() { + return blocked; + } + + public void setBlocked(Long blocked) { + this.blocked = blocked; + } + + public GetTransacSmsReportReports unsubscribed(Long unsubscribed) { + this.unsubscribed = unsubscribed; + return this; + } + + /** + * Number of unsubscription for the date + * @return unsubscribed + **/ + @ApiModelProperty(example = "1", required = true, value = "Number of unsubscription for the date") + public Long getUnsubscribed() { + return unsubscribed; + } + + public void setUnsubscribed(Long unsubscribed) { + this.unsubscribed = unsubscribed; + } + + public GetTransacSmsReportReports replied(Long replied) { + this.replied = replied; + return this; + } + + /** + * Number of answered SMS for the date + * @return replied + **/ + @ApiModelProperty(example = "2", required = true, value = "Number of answered SMS for the date") + public Long getReplied() { + return replied; + } + + public void setReplied(Long replied) { + this.replied = replied; + } + + public GetTransacSmsReportReports accepted(Long accepted) { + this.accepted = accepted; + return this; + } + + /** + * Number of accepted for the date + * @return accepted + **/ + @ApiModelProperty(example = "85", required = true, value = "Number of accepted for the date") + public Long getAccepted() { + return accepted; + } + + public void setAccepted(Long accepted) { + this.accepted = accepted; + } + + public GetTransacSmsReportReports rejected(Long rejected) { + this.rejected = rejected; + return this; + } + + /** + * Number of rejected for the date + * @return rejected + **/ + @ApiModelProperty(example = "1", required = true, value = "Number of rejected for the date") + public Long getRejected() { + return rejected; + } + + public void setRejected(Long rejected) { + this.rejected = rejected; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTransacSmsReportReports getTransacSmsReportReports = (GetTransacSmsReportReports) o; + return ObjectUtils.equals(this.date, getTransacSmsReportReports.date) && + ObjectUtils.equals(this.requests, getTransacSmsReportReports.requests) && + ObjectUtils.equals(this.delivered, getTransacSmsReportReports.delivered) && + ObjectUtils.equals(this.hardBounces, getTransacSmsReportReports.hardBounces) && + ObjectUtils.equals(this.softBounces, getTransacSmsReportReports.softBounces) && + ObjectUtils.equals(this.blocked, getTransacSmsReportReports.blocked) && + ObjectUtils.equals(this.unsubscribed, getTransacSmsReportReports.unsubscribed) && + ObjectUtils.equals(this.replied, getTransacSmsReportReports.replied) && + ObjectUtils.equals(this.accepted, getTransacSmsReportReports.accepted) && + ObjectUtils.equals(this.rejected, getTransacSmsReportReports.rejected); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(date, requests, delivered, hardBounces, softBounces, blocked, unsubscribed, replied, accepted, rejected); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetTransacSmsReportReports {\n"); + + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" requests: ").append(toIndentedString(requests)).append("\n"); + sb.append(" delivered: ").append(toIndentedString(delivered)).append("\n"); + sb.append(" hardBounces: ").append(toIndentedString(hardBounces)).append("\n"); + sb.append(" softBounces: ").append(toIndentedString(softBounces)).append("\n"); + sb.append(" blocked: ").append(toIndentedString(blocked)).append("\n"); + sb.append(" unsubscribed: ").append(toIndentedString(unsubscribed)).append("\n"); + sb.append(" replied: ").append(toIndentedString(replied)).append("\n"); + sb.append(" accepted: ").append(toIndentedString(accepted)).append("\n"); + sb.append(" rejected: ").append(toIndentedString(rejected)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetWebhook.java b/src/main/java/sibModel/GetWebhook.java new file mode 100644 index 0000000..22746e2 --- /dev/null +++ b/src/main/java/sibModel/GetWebhook.java @@ -0,0 +1,286 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.threeten.bp.OffsetDateTime; + +/** + * GetWebhook + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetWebhook { + @SerializedName("url") + private String url = null; + + @SerializedName("id") + private Long id = null; + + @SerializedName("description") + private String description = null; + + @SerializedName("events") + private List events = new ArrayList(); + + /** + * Type of webhook (marketing or transac) + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + MARKETING("marketing"), + + TRANSAC("transac"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String text) { + for (TypeEnum b : TypeEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("type") + private TypeEnum type = null; + + @SerializedName("createdAt") + private OffsetDateTime createdAt = null; + + @SerializedName("modifiedAt") + private OffsetDateTime modifiedAt = null; + + public GetWebhook url(String url) { + this.url = url; + return this; + } + + /** + * URL of the webhook + * @return url + **/ + @ApiModelProperty(example = "http://requestb.in/173lyyx1", required = true, value = "URL of the webhook") + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public GetWebhook id(Long id) { + this.id = id; + return this; + } + + /** + * ID of the webhook + * @return id + **/ + @ApiModelProperty(example = "654", required = true, value = "ID of the webhook") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public GetWebhook description(String description) { + this.description = description; + return this; + } + + /** + * Description of the webhook + * @return description + **/ + @ApiModelProperty(example = "Webhook triggered on campaign openings", required = true, value = "Description of the webhook") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public GetWebhook events(List events) { + this.events = events; + return this; + } + + public GetWebhook addEventsItem(String eventsItem) { + this.events.add(eventsItem); + return this; + } + + /** + * Get events + * @return events + **/ + @ApiModelProperty(required = true, value = "") + public List getEvents() { + return events; + } + + public void setEvents(List events) { + this.events = events; + } + + public GetWebhook type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of webhook (marketing or transac) + * @return type + **/ + @ApiModelProperty(example = "marketing", required = true, value = "Type of webhook (marketing or transac)") + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + public GetWebhook createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Creation UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @return createdAt + **/ + @ApiModelProperty(example = "2016-12-01T12:50:00Z", required = true, value = "Creation UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ)") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public GetWebhook modifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + return this; + } + + /** + * Last modification UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) + * @return modifiedAt + **/ + @ApiModelProperty(example = "2017-05-12T13:15:00Z", required = true, value = "Last modification UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ)") + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } + + public void setModifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetWebhook getWebhook = (GetWebhook) o; + return ObjectUtils.equals(this.url, getWebhook.url) && + ObjectUtils.equals(this.id, getWebhook.id) && + ObjectUtils.equals(this.description, getWebhook.description) && + ObjectUtils.equals(this.events, getWebhook.events) && + ObjectUtils.equals(this.type, getWebhook.type) && + ObjectUtils.equals(this.createdAt, getWebhook.createdAt) && + ObjectUtils.equals(this.modifiedAt, getWebhook.modifiedAt); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(url, id, description, events, type, createdAt, modifiedAt); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetWebhook {\n"); + + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" events: ").append(toIndentedString(events)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/GetWebhooks.java b/src/main/java/sibModel/GetWebhooks.java new file mode 100644 index 0000000..56cd6f3 --- /dev/null +++ b/src/main/java/sibModel/GetWebhooks.java @@ -0,0 +1,100 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * GetWebhooks + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class GetWebhooks { + @SerializedName("webhooks") + private List webhooks = new ArrayList(); + + public GetWebhooks webhooks(List webhooks) { + this.webhooks = webhooks; + return this; + } + + public GetWebhooks addWebhooksItem(Object webhooksItem) { + this.webhooks.add(webhooksItem); + return this; + } + + /** + * Get webhooks + * @return webhooks + **/ + @ApiModelProperty(required = true, value = "") + public List getWebhooks() { + return webhooks; + } + + public void setWebhooks(List webhooks) { + this.webhooks = webhooks; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetWebhooks getWebhooks = (GetWebhooks) o; + return ObjectUtils.equals(this.webhooks, getWebhooks.webhooks); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(webhooks); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetWebhooks {\n"); + + sb.append(" webhooks: ").append(toIndentedString(webhooks)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/ManageIp.java b/src/main/java/sibModel/ManageIp.java new file mode 100644 index 0000000..aa233b5 --- /dev/null +++ b/src/main/java/sibModel/ManageIp.java @@ -0,0 +1,93 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * ManageIp + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class ManageIp { + @SerializedName("ip") + private String ip = null; + + public ManageIp ip(String ip) { + this.ip = ip; + return this; + } + + /** + * Dedicated ID + * @return ip + **/ + @ApiModelProperty(example = "123.65.8.22", value = "Dedicated ID") + public String getIp() { + return ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ManageIp manageIp = (ManageIp) o; + return ObjectUtils.equals(this.ip, manageIp.ip); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(ip); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ManageIp {\n"); + + sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/PostContactInfo.java b/src/main/java/sibModel/PostContactInfo.java new file mode 100644 index 0000000..43a7e47 --- /dev/null +++ b/src/main/java/sibModel/PostContactInfo.java @@ -0,0 +1,94 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import sibModel.PostContactInfoContacts; + +/** + * PostContactInfo + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class PostContactInfo { + @SerializedName("contacts") + private PostContactInfoContacts contacts = null; + + public PostContactInfo contacts(PostContactInfoContacts contacts) { + this.contacts = contacts; + return this; + } + + /** + * Get contacts + * @return contacts + **/ + @ApiModelProperty(required = true, value = "") + public PostContactInfoContacts getContacts() { + return contacts; + } + + public void setContacts(PostContactInfoContacts contacts) { + this.contacts = contacts; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PostContactInfo postContactInfo = (PostContactInfo) o; + return ObjectUtils.equals(this.contacts, postContactInfo.contacts); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(contacts); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PostContactInfo {\n"); + + sb.append(" contacts: ").append(toIndentedString(contacts)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/PostContactInfoContacts.java b/src/main/java/sibModel/PostContactInfoContacts.java new file mode 100644 index 0000000..e40cda8 --- /dev/null +++ b/src/main/java/sibModel/PostContactInfoContacts.java @@ -0,0 +1,131 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * PostContactInfoContacts + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class PostContactInfoContacts { + @SerializedName("success") + private List success = new ArrayList(); + + @SerializedName("failure") + private List failure = null; + + public PostContactInfoContacts success(List success) { + this.success = success; + return this; + } + + public PostContactInfoContacts addSuccessItem(String successItem) { + this.success.add(successItem); + return this; + } + + /** + * Get success + * @return success + **/ + @ApiModelProperty(required = true, value = "") + public List getSuccess() { + return success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public PostContactInfoContacts failure(List failure) { + this.failure = failure; + return this; + } + + public PostContactInfoContacts addFailureItem(String failureItem) { + if (this.failure == null) { + this.failure = new ArrayList(); + } + this.failure.add(failureItem); + return this; + } + + /** + * Get failure + * @return failure + **/ + @ApiModelProperty(value = "") + public List getFailure() { + return failure; + } + + public void setFailure(List failure) { + this.failure = failure; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PostContactInfoContacts postContactInfoContacts = (PostContactInfoContacts) o; + return ObjectUtils.equals(this.success, postContactInfoContacts.success) && + ObjectUtils.equals(this.failure, postContactInfoContacts.failure); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(success, failure); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PostContactInfoContacts {\n"); + + sb.append(" success: ").append(toIndentedString(success)).append("\n"); + sb.append(" failure: ").append(toIndentedString(failure)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/PostSendFailed.java b/src/main/java/sibModel/PostSendFailed.java new file mode 100644 index 0000000..78c5698 --- /dev/null +++ b/src/main/java/sibModel/PostSendFailed.java @@ -0,0 +1,211 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * PostSendFailed + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class PostSendFailed { + @SerializedName("code") + private Long code = null; + + @SerializedName("message") + private String message = null; + + @SerializedName("unexistingEmails") + private List unexistingEmails = null; + + @SerializedName("withoutListEmails") + private List withoutListEmails = null; + + @SerializedName("blackListedEmails") + private List blackListedEmails = null; + + public PostSendFailed code(Long code) { + this.code = code; + return this; + } + + /** + * Response code + * @return code + **/ + @ApiModelProperty(example = "invalid_parameter", required = true, value = "Response code") + public Long getCode() { + return code; + } + + public void setCode(Long code) { + this.code = code; + } + + public PostSendFailed message(String message) { + this.message = message; + return this; + } + + /** + * Response message + * @return message + **/ + @ApiModelProperty(example = "The email could not be sent to all recipients", required = true, value = "Response message") + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public PostSendFailed unexistingEmails(List unexistingEmails) { + this.unexistingEmails = unexistingEmails; + return this; + } + + public PostSendFailed addUnexistingEmailsItem(String unexistingEmailsItem) { + if (this.unexistingEmails == null) { + this.unexistingEmails = new ArrayList(); + } + this.unexistingEmails.add(unexistingEmailsItem); + return this; + } + + /** + * Get unexistingEmails + * @return unexistingEmails + **/ + @ApiModelProperty(value = "") + public List getUnexistingEmails() { + return unexistingEmails; + } + + public void setUnexistingEmails(List unexistingEmails) { + this.unexistingEmails = unexistingEmails; + } + + public PostSendFailed withoutListEmails(List withoutListEmails) { + this.withoutListEmails = withoutListEmails; + return this; + } + + public PostSendFailed addWithoutListEmailsItem(String withoutListEmailsItem) { + if (this.withoutListEmails == null) { + this.withoutListEmails = new ArrayList(); + } + this.withoutListEmails.add(withoutListEmailsItem); + return this; + } + + /** + * Get withoutListEmails + * @return withoutListEmails + **/ + @ApiModelProperty(value = "") + public List getWithoutListEmails() { + return withoutListEmails; + } + + public void setWithoutListEmails(List withoutListEmails) { + this.withoutListEmails = withoutListEmails; + } + + public PostSendFailed blackListedEmails(List blackListedEmails) { + this.blackListedEmails = blackListedEmails; + return this; + } + + public PostSendFailed addBlackListedEmailsItem(String blackListedEmailsItem) { + if (this.blackListedEmails == null) { + this.blackListedEmails = new ArrayList(); + } + this.blackListedEmails.add(blackListedEmailsItem); + return this; + } + + /** + * Get blackListedEmails + * @return blackListedEmails + **/ + @ApiModelProperty(value = "") + public List getBlackListedEmails() { + return blackListedEmails; + } + + public void setBlackListedEmails(List blackListedEmails) { + this.blackListedEmails = blackListedEmails; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PostSendFailed postSendFailed = (PostSendFailed) o; + return ObjectUtils.equals(this.code, postSendFailed.code) && + ObjectUtils.equals(this.message, postSendFailed.message) && + ObjectUtils.equals(this.unexistingEmails, postSendFailed.unexistingEmails) && + ObjectUtils.equals(this.withoutListEmails, postSendFailed.withoutListEmails) && + ObjectUtils.equals(this.blackListedEmails, postSendFailed.blackListedEmails); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(code, message, unexistingEmails, withoutListEmails, blackListedEmails); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PostSendFailed {\n"); + + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" unexistingEmails: ").append(toIndentedString(unexistingEmails)).append("\n"); + sb.append(" withoutListEmails: ").append(toIndentedString(withoutListEmails)).append("\n"); + sb.append(" blackListedEmails: ").append(toIndentedString(blackListedEmails)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/PostSendSmsTestFailed.java b/src/main/java/sibModel/PostSendSmsTestFailed.java new file mode 100644 index 0000000..a739728 --- /dev/null +++ b/src/main/java/sibModel/PostSendSmsTestFailed.java @@ -0,0 +1,180 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * PostSendSmsTestFailed + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class PostSendSmsTestFailed { + @SerializedName("code") + private Long code = null; + + @SerializedName("message") + private String message = null; + + @SerializedName("unexistingSms") + private List unexistingSms = null; + + @SerializedName("withoutListSms") + private List withoutListSms = null; + + public PostSendSmsTestFailed code(Long code) { + this.code = code; + return this; + } + + /** + * Response code + * @return code + **/ + @ApiModelProperty(example = "invalid_parameter", required = true, value = "Response code") + public Long getCode() { + return code; + } + + public void setCode(Long code) { + this.code = code; + } + + public PostSendSmsTestFailed message(String message) { + this.message = message; + return this; + } + + /** + * Response message + * @return message + **/ + @ApiModelProperty(example = "The SMS could not be sent to all recipients", required = true, value = "Response message") + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public PostSendSmsTestFailed unexistingSms(List unexistingSms) { + this.unexistingSms = unexistingSms; + return this; + } + + public PostSendSmsTestFailed addUnexistingSmsItem(String unexistingSmsItem) { + if (this.unexistingSms == null) { + this.unexistingSms = new ArrayList(); + } + this.unexistingSms.add(unexistingSmsItem); + return this; + } + + /** + * Get unexistingSms + * @return unexistingSms + **/ + @ApiModelProperty(value = "") + public List getUnexistingSms() { + return unexistingSms; + } + + public void setUnexistingSms(List unexistingSms) { + this.unexistingSms = unexistingSms; + } + + public PostSendSmsTestFailed withoutListSms(List withoutListSms) { + this.withoutListSms = withoutListSms; + return this; + } + + public PostSendSmsTestFailed addWithoutListSmsItem(String withoutListSmsItem) { + if (this.withoutListSms == null) { + this.withoutListSms = new ArrayList(); + } + this.withoutListSms.add(withoutListSmsItem); + return this; + } + + /** + * Get withoutListSms + * @return withoutListSms + **/ + @ApiModelProperty(value = "") + public List getWithoutListSms() { + return withoutListSms; + } + + public void setWithoutListSms(List withoutListSms) { + this.withoutListSms = withoutListSms; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PostSendSmsTestFailed postSendSmsTestFailed = (PostSendSmsTestFailed) o; + return ObjectUtils.equals(this.code, postSendSmsTestFailed.code) && + ObjectUtils.equals(this.message, postSendSmsTestFailed.message) && + ObjectUtils.equals(this.unexistingSms, postSendSmsTestFailed.unexistingSms) && + ObjectUtils.equals(this.withoutListSms, postSendSmsTestFailed.withoutListSms); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(code, message, unexistingSms, withoutListSms); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PostSendSmsTestFailed {\n"); + + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" unexistingSms: ").append(toIndentedString(unexistingSms)).append("\n"); + sb.append(" withoutListSms: ").append(toIndentedString(withoutListSms)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/RemainingCreditModel.java b/src/main/java/sibModel/RemainingCreditModel.java new file mode 100644 index 0000000..af84971 --- /dev/null +++ b/src/main/java/sibModel/RemainingCreditModel.java @@ -0,0 +1,118 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import sibModel.RemainingCreditModelChild; +import sibModel.RemainingCreditModelReseller; + +/** + * RemainingCreditModel + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class RemainingCreditModel { + @SerializedName("child") + private RemainingCreditModelChild child = null; + + @SerializedName("reseller") + private RemainingCreditModelReseller reseller = null; + + public RemainingCreditModel child(RemainingCreditModelChild child) { + this.child = child; + return this; + } + + /** + * Get child + * @return child + **/ + @ApiModelProperty(required = true, value = "") + public RemainingCreditModelChild getChild() { + return child; + } + + public void setChild(RemainingCreditModelChild child) { + this.child = child; + } + + public RemainingCreditModel reseller(RemainingCreditModelReseller reseller) { + this.reseller = reseller; + return this; + } + + /** + * Get reseller + * @return reseller + **/ + @ApiModelProperty(required = true, value = "") + public RemainingCreditModelReseller getReseller() { + return reseller; + } + + public void setReseller(RemainingCreditModelReseller reseller) { + this.reseller = reseller; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RemainingCreditModel remainingCreditModel = (RemainingCreditModel) o; + return ObjectUtils.equals(this.child, remainingCreditModel.child) && + ObjectUtils.equals(this.reseller, remainingCreditModel.reseller); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(child, reseller); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RemainingCreditModel {\n"); + + sb.append(" child: ").append(toIndentedString(child)).append("\n"); + sb.append(" reseller: ").append(toIndentedString(reseller)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/RemainingCreditModelChild.java b/src/main/java/sibModel/RemainingCreditModelChild.java new file mode 100644 index 0000000..d3256b6 --- /dev/null +++ b/src/main/java/sibModel/RemainingCreditModelChild.java @@ -0,0 +1,117 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Credits remaining for child account + */ +@ApiModel(description = "Credits remaining for child account") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class RemainingCreditModelChild { + @SerializedName("sms") + private Long sms = null; + + @SerializedName("email") + private Long email = null; + + public RemainingCreditModelChild sms(Long sms) { + this.sms = sms; + return this; + } + + /** + * SMS Credits remaining for child account + * @return sms + **/ + @ApiModelProperty(example = "500", required = true, value = "SMS Credits remaining for child account") + public Long getSms() { + return sms; + } + + public void setSms(Long sms) { + this.sms = sms; + } + + public RemainingCreditModelChild email(Long email) { + this.email = email; + return this; + } + + /** + * Email Credits remaining for child account + * @return email + **/ + @ApiModelProperty(example = "2000", required = true, value = "Email Credits remaining for child account") + public Long getEmail() { + return email; + } + + public void setEmail(Long email) { + this.email = email; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RemainingCreditModelChild remainingCreditModelChild = (RemainingCreditModelChild) o; + return ObjectUtils.equals(this.sms, remainingCreditModelChild.sms) && + ObjectUtils.equals(this.email, remainingCreditModelChild.email); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(sms, email); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RemainingCreditModelChild {\n"); + + sb.append(" sms: ").append(toIndentedString(sms)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/RemainingCreditModelReseller.java b/src/main/java/sibModel/RemainingCreditModelReseller.java new file mode 100644 index 0000000..f7e1338 --- /dev/null +++ b/src/main/java/sibModel/RemainingCreditModelReseller.java @@ -0,0 +1,116 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * RemainingCreditModelReseller + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class RemainingCreditModelReseller { + @SerializedName("sms") + private Long sms = null; + + @SerializedName("email") + private Long email = null; + + public RemainingCreditModelReseller sms(Long sms) { + this.sms = sms; + return this; + } + + /** + * SMS Credits remaining for reseller account + * @return sms + **/ + @ApiModelProperty(example = "12900", required = true, value = "SMS Credits remaining for reseller account") + public Long getSms() { + return sms; + } + + public void setSms(Long sms) { + this.sms = sms; + } + + public RemainingCreditModelReseller email(Long email) { + this.email = email; + return this; + } + + /** + * Email Credits remaining for reseller account + * @return email + **/ + @ApiModelProperty(example = "2000000", required = true, value = "Email Credits remaining for reseller account") + public Long getEmail() { + return email; + } + + public void setEmail(Long email) { + this.email = email; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RemainingCreditModelReseller remainingCreditModelReseller = (RemainingCreditModelReseller) o; + return ObjectUtils.equals(this.sms, remainingCreditModelReseller.sms) && + ObjectUtils.equals(this.email, remainingCreditModelReseller.email); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(sms, email); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RemainingCreditModelReseller {\n"); + + sb.append(" sms: ").append(toIndentedString(sms)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/RemoveCredits.java b/src/main/java/sibModel/RemoveCredits.java new file mode 100644 index 0000000..a2a4479 --- /dev/null +++ b/src/main/java/sibModel/RemoveCredits.java @@ -0,0 +1,116 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * RemoveCredits + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class RemoveCredits { + @SerializedName("sms") + private Long sms = null; + + @SerializedName("email") + private Long email = null; + + public RemoveCredits sms(Long sms) { + this.sms = sms; + return this; + } + + /** + * SMS credits to be removed from the child account + * @return sms + **/ + @ApiModelProperty(example = "300", value = "SMS credits to be removed from the child account") + public Long getSms() { + return sms; + } + + public void setSms(Long sms) { + this.sms = sms; + } + + public RemoveCredits email(Long email) { + this.email = email; + return this; + } + + /** + * Email credits to be removed from the child account + * @return email + **/ + @ApiModelProperty(example = "500", value = "Email credits to be removed from the child account") + public Long getEmail() { + return email; + } + + public void setEmail(Long email) { + this.email = email; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RemoveCredits removeCredits = (RemoveCredits) o; + return ObjectUtils.equals(this.sms, removeCredits.sms) && + ObjectUtils.equals(this.email, removeCredits.email); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(sms, email); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RemoveCredits {\n"); + + sb.append(" sms: ").append(toIndentedString(sms)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/RequestContactExport.java b/src/main/java/sibModel/RequestContactExport.java new file mode 100644 index 0000000..da4d670 --- /dev/null +++ b/src/main/java/sibModel/RequestContactExport.java @@ -0,0 +1,149 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * RequestContactExport + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class RequestContactExport { + @SerializedName("exportAttributes") + private List exportAttributes = null; + + @SerializedName("contactFilter") + private Object contactFilter = null; + + @SerializedName("notifyUrl") + private String notifyUrl = null; + + public RequestContactExport exportAttributes(List exportAttributes) { + this.exportAttributes = exportAttributes; + return this; + } + + public RequestContactExport addExportAttributesItem(String exportAttributesItem) { + if (this.exportAttributes == null) { + this.exportAttributes = new ArrayList(); + } + this.exportAttributes.add(exportAttributesItem); + return this; + } + + /** + * Name of attributes to export. These attributes must be in your contact database + * @return exportAttributes + **/ + @ApiModelProperty(value = "Name of attributes to export. These attributes must be in your contact database") + public List getExportAttributes() { + return exportAttributes; + } + + public void setExportAttributes(List exportAttributes) { + this.exportAttributes = exportAttributes; + } + + public RequestContactExport contactFilter(Object contactFilter) { + this.contactFilter = contactFilter; + return this; + } + + /** + * Filter to apply to the export + * @return contactFilter + **/ + @ApiModelProperty(example = "\"blacklisted:true,listid.id:32\"", required = true, value = "Filter to apply to the export") + public Object getContactFilter() { + return contactFilter; + } + + public void setContactFilter(Object contactFilter) { + this.contactFilter = contactFilter; + } + + public RequestContactExport notifyUrl(String notifyUrl) { + this.notifyUrl = notifyUrl; + return this; + } + + /** + * Webhook that will be called once the export process is finished + * @return notifyUrl + **/ + @ApiModelProperty(example = "http://requestb.in/173lyyx1", value = "Webhook that will be called once the export process is finished") + public String getNotifyUrl() { + return notifyUrl; + } + + public void setNotifyUrl(String notifyUrl) { + this.notifyUrl = notifyUrl; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RequestContactExport requestContactExport = (RequestContactExport) o; + return ObjectUtils.equals(this.exportAttributes, requestContactExport.exportAttributes) && + ObjectUtils.equals(this.contactFilter, requestContactExport.contactFilter) && + ObjectUtils.equals(this.notifyUrl, requestContactExport.notifyUrl); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(exportAttributes, contactFilter, notifyUrl); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RequestContactExport {\n"); + + sb.append(" exportAttributes: ").append(toIndentedString(exportAttributes)).append("\n"); + sb.append(" contactFilter: ").append(toIndentedString(contactFilter)).append("\n"); + sb.append(" notifyUrl: ").append(toIndentedString(notifyUrl)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/RequestContactImport.java b/src/main/java/sibModel/RequestContactImport.java new file mode 100644 index 0000000..1430d29 --- /dev/null +++ b/src/main/java/sibModel/RequestContactImport.java @@ -0,0 +1,196 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import sibModel.RequestContactImportNewList; + +/** + * RequestContactImport + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class RequestContactImport { + @SerializedName("fileUrl") + private String fileUrl = null; + + @SerializedName("fileBody") + private String fileBody = null; + + @SerializedName("listIds") + private List listIds = null; + + @SerializedName("notifyUrl") + private String notifyUrl = null; + + @SerializedName("newList") + private RequestContactImportNewList newList = null; + + public RequestContactImport fileUrl(String fileUrl) { + this.fileUrl = fileUrl; + return this; + } + + /** + * Mandatory if fileBody not defined. URL of the file to be imported (no local file). Possible file types: .txt, .csv + * @return fileUrl + **/ + @ApiModelProperty(example = "https://importfile.domain.com", value = "Mandatory if fileBody not defined. URL of the file to be imported (no local file). Possible file types: .txt, .csv") + public String getFileUrl() { + return fileUrl; + } + + public void setFileUrl(String fileUrl) { + this.fileUrl = fileUrl; + } + + public RequestContactImport fileBody(String fileBody) { + this.fileBody = fileBody; + return this; + } + + /** + * Mandatory if fileUrl is not defined. CSV content to be imported. Use semicolon to separate multiple attributes + * @return fileBody + **/ + @ApiModelProperty(example = "NAME;SURNAME;EMAIL\\n\"Smith\";\"John\";\"john.smith@example.com\"\\n\"Roger\";\"Ellie\";\"ellie36@example.com", value = "Mandatory if fileUrl is not defined. CSV content to be imported. Use semicolon to separate multiple attributes") + public String getFileBody() { + return fileBody; + } + + public void setFileBody(String fileBody) { + this.fileBody = fileBody; + } + + public RequestContactImport listIds(List listIds) { + this.listIds = listIds; + return this; + } + + public RequestContactImport addListIdsItem(Long listIdsItem) { + if (this.listIds == null) { + this.listIds = new ArrayList(); + } + this.listIds.add(listIdsItem); + return this; + } + + /** + * Manadatory if newList is not defined. Ids of the lists in which to add the contacts + * @return listIds + **/ + @ApiModelProperty(value = "Manadatory if newList is not defined. Ids of the lists in which to add the contacts") + public List getListIds() { + return listIds; + } + + public void setListIds(List listIds) { + this.listIds = listIds; + } + + public RequestContactImport notifyUrl(String notifyUrl) { + this.notifyUrl = notifyUrl; + return this; + } + + /** + * URL that will be called once the export process is finished + * @return notifyUrl + **/ + @ApiModelProperty(example = "http://requestb.in/173lyyx1", value = "URL that will be called once the export process is finished") + public String getNotifyUrl() { + return notifyUrl; + } + + public void setNotifyUrl(String notifyUrl) { + this.notifyUrl = notifyUrl; + } + + public RequestContactImport newList(RequestContactImportNewList newList) { + this.newList = newList; + return this; + } + + /** + * Get newList + * @return newList + **/ + @ApiModelProperty(value = "") + public RequestContactImportNewList getNewList() { + return newList; + } + + public void setNewList(RequestContactImportNewList newList) { + this.newList = newList; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RequestContactImport requestContactImport = (RequestContactImport) o; + return ObjectUtils.equals(this.fileUrl, requestContactImport.fileUrl) && + ObjectUtils.equals(this.fileBody, requestContactImport.fileBody) && + ObjectUtils.equals(this.listIds, requestContactImport.listIds) && + ObjectUtils.equals(this.notifyUrl, requestContactImport.notifyUrl) && + ObjectUtils.equals(this.newList, requestContactImport.newList); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(fileUrl, fileBody, listIds, notifyUrl, newList); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RequestContactImport {\n"); + + sb.append(" fileUrl: ").append(toIndentedString(fileUrl)).append("\n"); + sb.append(" fileBody: ").append(toIndentedString(fileBody)).append("\n"); + sb.append(" listIds: ").append(toIndentedString(listIds)).append("\n"); + sb.append(" notifyUrl: ").append(toIndentedString(notifyUrl)).append("\n"); + sb.append(" newList: ").append(toIndentedString(newList)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/RequestContactImportNewList.java b/src/main/java/sibModel/RequestContactImportNewList.java new file mode 100644 index 0000000..79fc6de --- /dev/null +++ b/src/main/java/sibModel/RequestContactImportNewList.java @@ -0,0 +1,116 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * RequestContactImportNewList + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class RequestContactImportNewList { + @SerializedName("listName") + private String listName = null; + + @SerializedName("folderId") + private Long folderId = null; + + public RequestContactImportNewList listName(String listName) { + this.listName = listName; + return this; + } + + /** + * List with listName will be created first and users will be imported in it (Mandatory if listIds is empty). + * @return listName + **/ + @ApiModelProperty(example = "ContactImport - 2017-05", value = "List with listName will be created first and users will be imported in it (Mandatory if listIds is empty).") + public String getListName() { + return listName; + } + + public void setListName(String listName) { + this.listName = listName; + } + + public RequestContactImportNewList folderId(Long folderId) { + this.folderId = folderId; + return this; + } + + /** + * Folder id will be used with listName to make newly created list’s desired parent (Mandatory if listName is not empty). + * @return folderId + **/ + @ApiModelProperty(example = "2", value = "Folder id will be used with listName to make newly created list’s desired parent (Mandatory if listName is not empty).") + public Long getFolderId() { + return folderId; + } + + public void setFolderId(Long folderId) { + this.folderId = folderId; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RequestContactImportNewList requestContactImportNewList = (RequestContactImportNewList) o; + return ObjectUtils.equals(this.listName, requestContactImportNewList.listName) && + ObjectUtils.equals(this.folderId, requestContactImportNewList.folderId); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(listName, folderId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RequestContactImportNewList {\n"); + + sb.append(" listName: ").append(toIndentedString(listName)).append("\n"); + sb.append(" folderId: ").append(toIndentedString(folderId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/RequestSmsRecipientExport.java b/src/main/java/sibModel/RequestSmsRecipientExport.java new file mode 100644 index 0000000..f9bcae8 --- /dev/null +++ b/src/main/java/sibModel/RequestSmsRecipientExport.java @@ -0,0 +1,171 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * RequestSmsRecipientExport + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class RequestSmsRecipientExport { + @SerializedName("notifyURL") + private String notifyURL = null; + + /** + * Filter the recipients based on how they interacted with the campaign + */ + @JsonAdapter(RecipientsTypeEnum.Adapter.class) + public enum RecipientsTypeEnum { + ALL("all"), + + DELIVERED("delivered"), + + ANSWERED("answered"), + + SOFTBOUNCES("softBounces"), + + HARDBOUNCES("hardBounces"), + + UNSUBSCRIBED("unsubscribed"); + + private String value; + + RecipientsTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static RecipientsTypeEnum fromValue(String text) { + for (RecipientsTypeEnum b : RecipientsTypeEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final RecipientsTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public RecipientsTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return RecipientsTypeEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("recipientsType") + private RecipientsTypeEnum recipientsType = RecipientsTypeEnum.ALL; + + public RequestSmsRecipientExport notifyURL(String notifyURL) { + this.notifyURL = notifyURL; + return this; + } + + /** + * URL that will be called once the export process is finished + * @return notifyURL + **/ + @ApiModelProperty(example = "http://requestb.in/173lyyx1", value = "URL that will be called once the export process is finished") + public String getNotifyURL() { + return notifyURL; + } + + public void setNotifyURL(String notifyURL) { + this.notifyURL = notifyURL; + } + + public RequestSmsRecipientExport recipientsType(RecipientsTypeEnum recipientsType) { + this.recipientsType = recipientsType; + return this; + } + + /** + * Filter the recipients based on how they interacted with the campaign + * @return recipientsType + **/ + @ApiModelProperty(example = "answered", required = true, value = "Filter the recipients based on how they interacted with the campaign") + public RecipientsTypeEnum getRecipientsType() { + return recipientsType; + } + + public void setRecipientsType(RecipientsTypeEnum recipientsType) { + this.recipientsType = recipientsType; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RequestSmsRecipientExport requestSmsRecipientExport = (RequestSmsRecipientExport) o; + return ObjectUtils.equals(this.notifyURL, requestSmsRecipientExport.notifyURL) && + ObjectUtils.equals(this.recipientsType, requestSmsRecipientExport.recipientsType); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(notifyURL, recipientsType); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RequestSmsRecipientExport {\n"); + + sb.append(" notifyURL: ").append(toIndentedString(notifyURL)).append("\n"); + sb.append(" recipientsType: ").append(toIndentedString(recipientsType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/SendEmail.java b/src/main/java/sibModel/SendEmail.java new file mode 100644 index 0000000..a5587d4 --- /dev/null +++ b/src/main/java/sibModel/SendEmail.java @@ -0,0 +1,304 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import sibModel.SendEmailAttachment; + +/** + * SendEmail + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class SendEmail { + @SerializedName("emailTo") + private List emailTo = new ArrayList(); + + @SerializedName("emailBcc") + private List emailBcc = null; + + @SerializedName("emailCc") + private List emailCc = null; + + @SerializedName("replyTo") + private String replyTo = null; + + @SerializedName("attachmentUrl") + private String attachmentUrl = null; + + @SerializedName("attachment") + private List attachment = null; + + @SerializedName("headers") + private Map headers = null; + + @SerializedName("attributes") + private Map attributes = null; + + public SendEmail emailTo(List emailTo) { + this.emailTo = emailTo; + return this; + } + + public SendEmail addEmailToItem(String emailToItem) { + this.emailTo.add(emailToItem); + return this; + } + + /** + * Email addresses of the recipients + * @return emailTo + **/ + @ApiModelProperty(required = true, value = "Email addresses of the recipients") + public List getEmailTo() { + return emailTo; + } + + public void setEmailTo(List emailTo) { + this.emailTo = emailTo; + } + + public SendEmail emailBcc(List emailBcc) { + this.emailBcc = emailBcc; + return this; + } + + public SendEmail addEmailBccItem(String emailBccItem) { + if (this.emailBcc == null) { + this.emailBcc = new ArrayList(); + } + this.emailBcc.add(emailBccItem); + return this; + } + + /** + * Email addresses of the recipients in bcc + * @return emailBcc + **/ + @ApiModelProperty(value = "Email addresses of the recipients in bcc") + public List getEmailBcc() { + return emailBcc; + } + + public void setEmailBcc(List emailBcc) { + this.emailBcc = emailBcc; + } + + public SendEmail emailCc(List emailCc) { + this.emailCc = emailCc; + return this; + } + + public SendEmail addEmailCcItem(String emailCcItem) { + if (this.emailCc == null) { + this.emailCc = new ArrayList(); + } + this.emailCc.add(emailCcItem); + return this; + } + + /** + * Email addresses of the recipients in cc + * @return emailCc + **/ + @ApiModelProperty(value = "Email addresses of the recipients in cc") + public List getEmailCc() { + return emailCc; + } + + public void setEmailCc(List emailCc) { + this.emailCc = emailCc; + } + + public SendEmail replyTo(String replyTo) { + this.replyTo = replyTo; + return this; + } + + /** + * Email on which campaign recipients will be able to reply to + * @return replyTo + **/ + @ApiModelProperty(example = "support@myshop.com", value = "Email on which campaign recipients will be able to reply to") + public String getReplyTo() { + return replyTo; + } + + public void setReplyTo(String replyTo) { + this.replyTo = replyTo; + } + + public SendEmail attachmentUrl(String attachmentUrl) { + this.attachmentUrl = attachmentUrl; + return this; + } + + /** + * Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps + * @return attachmentUrl + **/ + @ApiModelProperty(example = "https://attachment.domain.com", value = "Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps") + public String getAttachmentUrl() { + return attachmentUrl; + } + + public void setAttachmentUrl(String attachmentUrl) { + this.attachmentUrl = attachmentUrl; + } + + public SendEmail attachment(List attachment) { + this.attachment = attachment; + return this; + } + + public SendEmail addAttachmentItem(SendEmailAttachment attachmentItem) { + if (this.attachment == null) { + this.attachment = new ArrayList(); + } + this.attachment.add(attachmentItem); + return this; + } + + /** + * Pass the base64 content of the attachment. Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps + * @return attachment + **/ + @ApiModelProperty(value = "Pass the base64 content of the attachment. Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps") + public List getAttachment() { + return attachment; + } + + public void setAttachment(List attachment) { + this.attachment = attachment; + } + + public SendEmail headers(Map headers) { + this.headers = headers; + return this; + } + + public SendEmail putHeadersItem(String key, String headersItem) { + if (this.headers == null) { + this.headers = new HashMap(); + } + this.headers.put(key, headersItem); + return this; + } + + /** + * Get headers + * @return headers + **/ + @ApiModelProperty(value = "") + public Map getHeaders() { + return headers; + } + + public void setHeaders(Map headers) { + this.headers = headers; + } + + public SendEmail attributes(Map attributes) { + this.attributes = attributes; + return this; + } + + public SendEmail putAttributesItem(String key, String attributesItem) { + if (this.attributes == null) { + this.attributes = new HashMap(); + } + this.attributes.put(key, attributesItem); + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @ApiModelProperty(value = "") + public Map getAttributes() { + return attributes; + } + + public void setAttributes(Map attributes) { + this.attributes = attributes; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SendEmail sendEmail = (SendEmail) o; + return ObjectUtils.equals(this.emailTo, sendEmail.emailTo) && + ObjectUtils.equals(this.emailBcc, sendEmail.emailBcc) && + ObjectUtils.equals(this.emailCc, sendEmail.emailCc) && + ObjectUtils.equals(this.replyTo, sendEmail.replyTo) && + ObjectUtils.equals(this.attachmentUrl, sendEmail.attachmentUrl) && + ObjectUtils.equals(this.attachment, sendEmail.attachment) && + ObjectUtils.equals(this.headers, sendEmail.headers) && + ObjectUtils.equals(this.attributes, sendEmail.attributes); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(emailTo, emailBcc, emailCc, replyTo, attachmentUrl, attachment, headers, attributes); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SendEmail {\n"); + + sb.append(" emailTo: ").append(toIndentedString(emailTo)).append("\n"); + sb.append(" emailBcc: ").append(toIndentedString(emailBcc)).append("\n"); + sb.append(" emailCc: ").append(toIndentedString(emailCc)).append("\n"); + sb.append(" replyTo: ").append(toIndentedString(replyTo)).append("\n"); + sb.append(" attachmentUrl: ").append(toIndentedString(attachmentUrl)).append("\n"); + sb.append(" attachment: ").append(toIndentedString(attachment)).append("\n"); + sb.append(" headers: ").append(toIndentedString(headers)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/SendEmailAttachment.java b/src/main/java/sibModel/SendEmailAttachment.java new file mode 100644 index 0000000..bed9d85 --- /dev/null +++ b/src/main/java/sibModel/SendEmailAttachment.java @@ -0,0 +1,116 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * SendEmailAttachment + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class SendEmailAttachment { + @SerializedName("content") + private byte[] content = null; + + @SerializedName("name") + private String name = null; + + public SendEmailAttachment content(byte[] content) { + this.content = content; + return this; + } + + /** + * Base64 encoded chunk data of the attachment generated on the fly + * @return content + **/ + @ApiModelProperty(example = "b3JkZXIucGRm", value = "Base64 encoded chunk data of the attachment generated on the fly") + public byte[] getContent() { + return content; + } + + public void setContent(byte[] content) { + this.content = content; + } + + public SendEmailAttachment name(String name) { + this.name = name; + return this; + } + + /** + * Required for content. Name of the attachment + * @return name + **/ + @ApiModelProperty(example = "myAttachment.png", value = "Required for content. Name of the attachment") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SendEmailAttachment sendEmailAttachment = (SendEmailAttachment) o; + return ObjectUtils.equals(this.content, sendEmailAttachment.content) && + ObjectUtils.equals(this.name, sendEmailAttachment.name); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(content, name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SendEmailAttachment {\n"); + + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/SendReport.java b/src/main/java/sibModel/SendReport.java new file mode 100644 index 0000000..3ccf75d --- /dev/null +++ b/src/main/java/sibModel/SendReport.java @@ -0,0 +1,172 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import sibModel.SendReportEmail; + +/** + * SendReport + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class SendReport { + /** + * Language of email content for campaign report sending. + */ + @JsonAdapter(LanguageEnum.Adapter.class) + public enum LanguageEnum { + FR("fr"), + + ES("es"), + + PT("pt"), + + IT("it"), + + DE("de"), + + EN("en"); + + private String value; + + LanguageEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static LanguageEnum fromValue(String text) { + for (LanguageEnum b : LanguageEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final LanguageEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public LanguageEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return LanguageEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("language") + private LanguageEnum language = LanguageEnum.FR; + + @SerializedName("email") + private SendReportEmail email = null; + + public SendReport language(LanguageEnum language) { + this.language = language; + return this; + } + + /** + * Language of email content for campaign report sending. + * @return language + **/ + @ApiModelProperty(example = "en", value = "Language of email content for campaign report sending.") + public LanguageEnum getLanguage() { + return language; + } + + public void setLanguage(LanguageEnum language) { + this.language = language; + } + + public SendReport email(SendReportEmail email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @ApiModelProperty(required = true, value = "") + public SendReportEmail getEmail() { + return email; + } + + public void setEmail(SendReportEmail email) { + this.email = email; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SendReport sendReport = (SendReport) o; + return ObjectUtils.equals(this.language, sendReport.language) && + ObjectUtils.equals(this.email, sendReport.email); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(language, email); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SendReport {\n"); + + sb.append(" language: ").append(toIndentedString(language)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/SendReportEmail.java b/src/main/java/sibModel/SendReportEmail.java new file mode 100644 index 0000000..8204a20 --- /dev/null +++ b/src/main/java/sibModel/SendReportEmail.java @@ -0,0 +1,281 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * SendReportEmail + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class SendReportEmail { + @SerializedName("subject") + private String subject = null; + + @SerializedName("to") + private List to = null; + + /** + * Type of the message body + */ + @JsonAdapter(ContentTypeEnum.Adapter.class) + public enum ContentTypeEnum { + TEXT("text"), + + HTML("html"); + + private String value; + + ContentTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ContentTypeEnum fromValue(String text) { + for (ContentTypeEnum b : ContentTypeEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ContentTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ContentTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ContentTypeEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("contentType") + private ContentTypeEnum contentType = null; + + @SerializedName("bcc") + private List bcc = null; + + @SerializedName("cc") + private List cc = null; + + @SerializedName("body") + private String body = null; + + public SendReportEmail subject(String subject) { + this.subject = subject; + return this; + } + + /** + * Subject of the email message + * @return subject + **/ + @ApiModelProperty(example = "Report of the last campaign", value = "Subject of the email message") + public String getSubject() { + return subject; + } + + public void setSubject(String subject) { + this.subject = subject; + } + + public SendReportEmail to(List to) { + this.to = to; + return this; + } + + public SendReportEmail addToItem(String toItem) { + if (this.to == null) { + this.to = new ArrayList(); + } + this.to.add(toItem); + return this; + } + + /** + * Email addresses of the recipients + * @return to + **/ + @ApiModelProperty(value = "Email addresses of the recipients") + public List getTo() { + return to; + } + + public void setTo(List to) { + this.to = to; + } + + public SendReportEmail contentType(ContentTypeEnum contentType) { + this.contentType = contentType; + return this; + } + + /** + * Type of the message body + * @return contentType + **/ + @ApiModelProperty(example = "html", value = "Type of the message body") + public ContentTypeEnum getContentType() { + return contentType; + } + + public void setContentType(ContentTypeEnum contentType) { + this.contentType = contentType; + } + + public SendReportEmail bcc(List bcc) { + this.bcc = bcc; + return this; + } + + public SendReportEmail addBccItem(String bccItem) { + if (this.bcc == null) { + this.bcc = new ArrayList(); + } + this.bcc.add(bccItem); + return this; + } + + /** + * Email addresses of the recipients in bcc + * @return bcc + **/ + @ApiModelProperty(value = "Email addresses of the recipients in bcc") + public List getBcc() { + return bcc; + } + + public void setBcc(List bcc) { + this.bcc = bcc; + } + + public SendReportEmail cc(List cc) { + this.cc = cc; + return this; + } + + public SendReportEmail addCcItem(String ccItem) { + if (this.cc == null) { + this.cc = new ArrayList(); + } + this.cc.add(ccItem); + return this; + } + + /** + * Email addresses of the recipients in cc + * @return cc + **/ + @ApiModelProperty(value = "Email addresses of the recipients in cc") + public List getCc() { + return cc; + } + + public void setCc(List cc) { + this.cc = cc; + } + + public SendReportEmail body(String body) { + this.body = body; + return this; + } + + /** + * Body of the email message + * @return body + **/ + @ApiModelProperty(example = "Please find attached the report of our last email campaign.", value = "Body of the email message") + public String getBody() { + return body; + } + + public void setBody(String body) { + this.body = body; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SendReportEmail sendReportEmail = (SendReportEmail) o; + return ObjectUtils.equals(this.subject, sendReportEmail.subject) && + ObjectUtils.equals(this.to, sendReportEmail.to) && + ObjectUtils.equals(this.contentType, sendReportEmail.contentType) && + ObjectUtils.equals(this.bcc, sendReportEmail.bcc) && + ObjectUtils.equals(this.cc, sendReportEmail.cc) && + ObjectUtils.equals(this.body, sendReportEmail.body); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(subject, to, contentType, bcc, cc, body); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SendReportEmail {\n"); + + sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); + sb.append(" to: ").append(toIndentedString(to)).append("\n"); + sb.append(" contentType: ").append(toIndentedString(contentType)).append("\n"); + sb.append(" bcc: ").append(toIndentedString(bcc)).append("\n"); + sb.append(" cc: ").append(toIndentedString(cc)).append("\n"); + sb.append(" body: ").append(toIndentedString(body)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/SendSms.java b/src/main/java/sibModel/SendSms.java new file mode 100644 index 0000000..b8639a0 --- /dev/null +++ b/src/main/java/sibModel/SendSms.java @@ -0,0 +1,116 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * SendSms + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class SendSms { + @SerializedName("reference") + private String reference = null; + + @SerializedName("messageId") + private Long messageId = null; + + public SendSms reference(String reference) { + this.reference = reference; + return this; + } + + /** + * Get reference + * @return reference + **/ + @ApiModelProperty(example = "ab1cde2fgh3i4jklmno", required = true, value = "") + public String getReference() { + return reference; + } + + public void setReference(String reference) { + this.reference = reference; + } + + public SendSms messageId(Long messageId) { + this.messageId = messageId; + return this; + } + + /** + * Get messageId + * @return messageId + **/ + @ApiModelProperty(example = "1511882900176220", required = true, value = "") + public Long getMessageId() { + return messageId; + } + + public void setMessageId(Long messageId) { + this.messageId = messageId; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SendSms sendSms = (SendSms) o; + return ObjectUtils.equals(this.reference, sendSms.reference) && + ObjectUtils.equals(this.messageId, sendSms.messageId); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(reference, messageId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SendSms {\n"); + + sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); + sb.append(" messageId: ").append(toIndentedString(messageId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/SendSmtpEmail.java b/src/main/java/sibModel/SendSmtpEmail.java new file mode 100644 index 0000000..7102af2 --- /dev/null +++ b/src/main/java/sibModel/SendSmtpEmail.java @@ -0,0 +1,401 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import sibModel.SendSmtpEmailAttachment; +import sibModel.SendSmtpEmailBcc; +import sibModel.SendSmtpEmailCc; +import sibModel.SendSmtpEmailReplyTo; +import sibModel.SendSmtpEmailSender; +import sibModel.SendSmtpEmailTo; + +/** + * SendSmtpEmail + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class SendSmtpEmail { + @SerializedName("sender") + private SendSmtpEmailSender sender = null; + + @SerializedName("to") + private List to = new ArrayList(); + + @SerializedName("bcc") + private List bcc = null; + + @SerializedName("cc") + private List cc = null; + + @SerializedName("htmlContent") + private String htmlContent = null; + + @SerializedName("textContent") + private String textContent = null; + + @SerializedName("subject") + private String subject = null; + + @SerializedName("replyTo") + private SendSmtpEmailReplyTo replyTo = null; + + @SerializedName("attachment") + private List attachment = null; + + @SerializedName("headers") + private Map headers = null; + + @SerializedName("templateId") + private Long templateId = null; + + @SerializedName("params") + private Map params = null; + + public SendSmtpEmail sender(SendSmtpEmailSender sender) { + this.sender = sender; + return this; + } + + /** + * Get sender + * @return sender + **/ + @ApiModelProperty(required = true, value = "") + public SendSmtpEmailSender getSender() { + return sender; + } + + public void setSender(SendSmtpEmailSender sender) { + this.sender = sender; + } + + public SendSmtpEmail to(List to) { + this.to = to; + return this; + } + + public SendSmtpEmail addToItem(SendSmtpEmailTo toItem) { + this.to.add(toItem); + return this; + } + + /** + * Email addresses and names of the recipients + * @return to + **/ + @ApiModelProperty(required = true, value = "Email addresses and names of the recipients") + public List getTo() { + return to; + } + + public void setTo(List to) { + this.to = to; + } + + public SendSmtpEmail bcc(List bcc) { + this.bcc = bcc; + return this; + } + + public SendSmtpEmail addBccItem(SendSmtpEmailBcc bccItem) { + if (this.bcc == null) { + this.bcc = new ArrayList(); + } + this.bcc.add(bccItem); + return this; + } + + /** + * Email addresses and names of the recipients in bcc + * @return bcc + **/ + @ApiModelProperty(value = "Email addresses and names of the recipients in bcc") + public List getBcc() { + return bcc; + } + + public void setBcc(List bcc) { + this.bcc = bcc; + } + + public SendSmtpEmail cc(List cc) { + this.cc = cc; + return this; + } + + public SendSmtpEmail addCcItem(SendSmtpEmailCc ccItem) { + if (this.cc == null) { + this.cc = new ArrayList(); + } + this.cc.add(ccItem); + return this; + } + + /** + * Email addresses and names of the recipients in cc + * @return cc + **/ + @ApiModelProperty(value = "Email addresses and names of the recipients in cc") + public List getCc() { + return cc; + } + + public void setCc(List cc) { + this.cc = cc; + } + + public SendSmtpEmail htmlContent(String htmlContent) { + this.htmlContent = htmlContent; + return this; + } + + /** + * HTML body of the message ( Ignored if templateId is passed ) + * @return htmlContent + **/ + @ApiModelProperty(example = "Please confirm your email address by clicking on the link below", required = true, value = "HTML body of the message ( Ignored if templateId is passed )") + public String getHtmlContent() { + return htmlContent; + } + + public void setHtmlContent(String htmlContent) { + this.htmlContent = htmlContent; + } + + public SendSmtpEmail textContent(String textContent) { + this.textContent = textContent; + return this; + } + + /** + * Plain Text body of the message ( Ignored if templateId is passed ) + * @return textContent + **/ + @ApiModelProperty(example = "Please confirm your email address by clicking on the link https://text.domain.com", value = "Plain Text body of the message ( Ignored if templateId is passed )") + public String getTextContent() { + return textContent; + } + + public void setTextContent(String textContent) { + this.textContent = textContent; + } + + public SendSmtpEmail subject(String subject) { + this.subject = subject; + return this; + } + + /** + * Subject of the message + * @return subject + **/ + @ApiModelProperty(example = "Login Email confirmation", required = true, value = "Subject of the message") + public String getSubject() { + return subject; + } + + public void setSubject(String subject) { + this.subject = subject; + } + + public SendSmtpEmail replyTo(SendSmtpEmailReplyTo replyTo) { + this.replyTo = replyTo; + return this; + } + + /** + * Get replyTo + * @return replyTo + **/ + @ApiModelProperty(value = "") + public SendSmtpEmailReplyTo getReplyTo() { + return replyTo; + } + + public void setReplyTo(SendSmtpEmailReplyTo replyTo) { + this.replyTo = replyTo; + } + + public SendSmtpEmail attachment(List attachment) { + this.attachment = attachment; + return this; + } + + public SendSmtpEmail addAttachmentItem(SendSmtpEmailAttachment attachmentItem) { + if (this.attachment == null) { + this.attachment = new ArrayList(); + } + this.attachment.add(attachmentItem); + return this; + } + + /** + * Pass the absolute URL (no local file) or the base64 content of the attachment. Name can be used in both cases to define the attachment name. It is mandatory in case of content. Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps + * @return attachment + **/ + @ApiModelProperty(value = "Pass the absolute URL (no local file) or the base64 content of the attachment. Name can be used in both cases to define the attachment name. It is mandatory in case of content. Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps") + public List getAttachment() { + return attachment; + } + + public void setAttachment(List attachment) { + this.attachment = attachment; + } + + public SendSmtpEmail headers(Map headers) { + this.headers = headers; + return this; + } + + public SendSmtpEmail putHeadersItem(String key, String headersItem) { + if (this.headers == null) { + this.headers = new HashMap(); + } + this.headers.put(key, headersItem); + return this; + } + + /** + * Get headers + * @return headers + **/ + @ApiModelProperty(value = "") + public Map getHeaders() { + return headers; + } + + public void setHeaders(Map headers) { + this.headers = headers; + } + + public SendSmtpEmail templateId(Long templateId) { + this.templateId = templateId; + return this; + } + + /** + * Id of the template + * @return templateId + **/ + @ApiModelProperty(example = "2", value = "Id of the template") + public Long getTemplateId() { + return templateId; + } + + public void setTemplateId(Long templateId) { + this.templateId = templateId; + } + + public SendSmtpEmail params(Map params) { + this.params = params; + return this; + } + + public SendSmtpEmail putParamsItem(String key, String paramsItem) { + if (this.params == null) { + this.params = new HashMap(); + } + this.params.put(key, paramsItem); + return this; + } + + /** + * Get params + * @return params + **/ + @ApiModelProperty(value = "") + public Map getParams() { + return params; + } + + public void setParams(Map params) { + this.params = params; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SendSmtpEmail sendSmtpEmail = (SendSmtpEmail) o; + return ObjectUtils.equals(this.sender, sendSmtpEmail.sender) && + ObjectUtils.equals(this.to, sendSmtpEmail.to) && + ObjectUtils.equals(this.bcc, sendSmtpEmail.bcc) && + ObjectUtils.equals(this.cc, sendSmtpEmail.cc) && + ObjectUtils.equals(this.htmlContent, sendSmtpEmail.htmlContent) && + ObjectUtils.equals(this.textContent, sendSmtpEmail.textContent) && + ObjectUtils.equals(this.subject, sendSmtpEmail.subject) && + ObjectUtils.equals(this.replyTo, sendSmtpEmail.replyTo) && + ObjectUtils.equals(this.attachment, sendSmtpEmail.attachment) && + ObjectUtils.equals(this.headers, sendSmtpEmail.headers) && + ObjectUtils.equals(this.templateId, sendSmtpEmail.templateId) && + ObjectUtils.equals(this.params, sendSmtpEmail.params); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(sender, to, bcc, cc, htmlContent, textContent, subject, replyTo, attachment, headers, templateId, params); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SendSmtpEmail {\n"); + + sb.append(" sender: ").append(toIndentedString(sender)).append("\n"); + sb.append(" to: ").append(toIndentedString(to)).append("\n"); + sb.append(" bcc: ").append(toIndentedString(bcc)).append("\n"); + sb.append(" cc: ").append(toIndentedString(cc)).append("\n"); + sb.append(" htmlContent: ").append(toIndentedString(htmlContent)).append("\n"); + sb.append(" textContent: ").append(toIndentedString(textContent)).append("\n"); + sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); + sb.append(" replyTo: ").append(toIndentedString(replyTo)).append("\n"); + sb.append(" attachment: ").append(toIndentedString(attachment)).append("\n"); + sb.append(" headers: ").append(toIndentedString(headers)).append("\n"); + sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); + sb.append(" params: ").append(toIndentedString(params)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/SendSmtpEmailAttachment.java b/src/main/java/sibModel/SendSmtpEmailAttachment.java new file mode 100644 index 0000000..9be29bd --- /dev/null +++ b/src/main/java/sibModel/SendSmtpEmailAttachment.java @@ -0,0 +1,139 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * SendSmtpEmailAttachment + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class SendSmtpEmailAttachment { + @SerializedName("url") + private String url = null; + + @SerializedName("content") + private byte[] content = null; + + @SerializedName("name") + private String name = null; + + public SendSmtpEmailAttachment url(String url) { + this.url = url; + return this; + } + + /** + * Absolute url of the attachment (no local file). + * @return url + **/ + @ApiModelProperty(example = "https://attachment.domain.com/myAttachmentFromUrl.jpg", value = "Absolute url of the attachment (no local file).") + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public SendSmtpEmailAttachment content(byte[] content) { + this.content = content; + return this; + } + + /** + * Base64 encoded chunk data of the attachment generated on the fly + * @return content + **/ + @ApiModelProperty(example = "b3JkZXIucGRm", value = "Base64 encoded chunk data of the attachment generated on the fly") + public byte[] getContent() { + return content; + } + + public void setContent(byte[] content) { + this.content = content; + } + + public SendSmtpEmailAttachment name(String name) { + this.name = name; + return this; + } + + /** + * Required for content. Name of the attachment + * @return name + **/ + @ApiModelProperty(example = "myAttachment.png", value = "Required for content. Name of the attachment") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SendSmtpEmailAttachment sendSmtpEmailAttachment = (SendSmtpEmailAttachment) o; + return ObjectUtils.equals(this.url, sendSmtpEmailAttachment.url) && + ObjectUtils.equals(this.content, sendSmtpEmailAttachment.content) && + ObjectUtils.equals(this.name, sendSmtpEmailAttachment.name); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(url, content, name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SendSmtpEmailAttachment {\n"); + + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/SendSmtpEmailBcc.java b/src/main/java/sibModel/SendSmtpEmailBcc.java new file mode 100644 index 0000000..538c1c0 --- /dev/null +++ b/src/main/java/sibModel/SendSmtpEmailBcc.java @@ -0,0 +1,116 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * SendSmtpEmailBcc + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class SendSmtpEmailBcc { + @SerializedName("email") + private String email = null; + + @SerializedName("name") + private String name = null; + + public SendSmtpEmailBcc email(String email) { + this.email = email; + return this; + } + + /** + * Email address of the recipient in bcc + * @return email + **/ + @ApiModelProperty(example = "helen9766@example.com", required = true, value = "Email address of the recipient in bcc") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public SendSmtpEmailBcc name(String name) { + this.name = name; + return this; + } + + /** + * Name of the recipient in bcc + * @return name + **/ + @ApiModelProperty(example = "Helen", value = "Name of the recipient in bcc") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SendSmtpEmailBcc sendSmtpEmailBcc = (SendSmtpEmailBcc) o; + return ObjectUtils.equals(this.email, sendSmtpEmailBcc.email) && + ObjectUtils.equals(this.name, sendSmtpEmailBcc.name); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(email, name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SendSmtpEmailBcc {\n"); + + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/SendSmtpEmailCc.java b/src/main/java/sibModel/SendSmtpEmailCc.java new file mode 100644 index 0000000..c921ccd --- /dev/null +++ b/src/main/java/sibModel/SendSmtpEmailCc.java @@ -0,0 +1,116 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * SendSmtpEmailCc + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class SendSmtpEmailCc { + @SerializedName("email") + private String email = null; + + @SerializedName("name") + private String name = null; + + public SendSmtpEmailCc email(String email) { + this.email = email; + return this; + } + + /** + * Email address of the recipient in cc + * @return email + **/ + @ApiModelProperty(example = "ann6533@example.com", required = true, value = "Email address of the recipient in cc") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public SendSmtpEmailCc name(String name) { + this.name = name; + return this; + } + + /** + * Name of the recipient in cc + * @return name + **/ + @ApiModelProperty(example = "Ann", value = "Name of the recipient in cc") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SendSmtpEmailCc sendSmtpEmailCc = (SendSmtpEmailCc) o; + return ObjectUtils.equals(this.email, sendSmtpEmailCc.email) && + ObjectUtils.equals(this.name, sendSmtpEmailCc.name); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(email, name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SendSmtpEmailCc {\n"); + + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/SendSmtpEmailReplyTo.java b/src/main/java/sibModel/SendSmtpEmailReplyTo.java new file mode 100644 index 0000000..084cef9 --- /dev/null +++ b/src/main/java/sibModel/SendSmtpEmailReplyTo.java @@ -0,0 +1,117 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Email on which transactional mail recipients will be able to reply to + */ +@ApiModel(description = "Email on which transactional mail recipients will be able to reply to") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class SendSmtpEmailReplyTo { + @SerializedName("email") + private String email = null; + + @SerializedName("name") + private String name = null; + + public SendSmtpEmailReplyTo email(String email) { + this.email = email; + return this; + } + + /** + * Email address in reply to + * @return email + **/ + @ApiModelProperty(example = "ann6533@example.com", required = true, value = "Email address in reply to") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public SendSmtpEmailReplyTo name(String name) { + this.name = name; + return this; + } + + /** + * Name in reply to + * @return name + **/ + @ApiModelProperty(example = "Ann", value = "Name in reply to") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SendSmtpEmailReplyTo sendSmtpEmailReplyTo = (SendSmtpEmailReplyTo) o; + return ObjectUtils.equals(this.email, sendSmtpEmailReplyTo.email) && + ObjectUtils.equals(this.name, sendSmtpEmailReplyTo.name); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(email, name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SendSmtpEmailReplyTo {\n"); + + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/SendSmtpEmailSender.java b/src/main/java/sibModel/SendSmtpEmailSender.java new file mode 100644 index 0000000..36f8ee3 --- /dev/null +++ b/src/main/java/sibModel/SendSmtpEmailSender.java @@ -0,0 +1,116 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * SendSmtpEmailSender + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class SendSmtpEmailSender { + @SerializedName("name") + private String name = null; + + @SerializedName("email") + private String email = null; + + public SendSmtpEmailSender name(String name) { + this.name = name; + return this; + } + + /** + * Sender Name from which the emails are sent + * @return name + **/ + @ApiModelProperty(example = "Mary from MyShop", value = "Sender Name from which the emails are sent") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public SendSmtpEmailSender email(String email) { + this.email = email; + return this; + } + + /** + * Sender Email from which the emails are sent + * @return email + **/ + @ApiModelProperty(example = "no-reply@myshop.com", required = true, value = "Sender Email from which the emails are sent") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SendSmtpEmailSender sendSmtpEmailSender = (SendSmtpEmailSender) o; + return ObjectUtils.equals(this.name, sendSmtpEmailSender.name) && + ObjectUtils.equals(this.email, sendSmtpEmailSender.email); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(name, email); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SendSmtpEmailSender {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/SendSmtpEmailTo.java b/src/main/java/sibModel/SendSmtpEmailTo.java new file mode 100644 index 0000000..56ee75c --- /dev/null +++ b/src/main/java/sibModel/SendSmtpEmailTo.java @@ -0,0 +1,116 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * SendSmtpEmailTo + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class SendSmtpEmailTo { + @SerializedName("email") + private String email = null; + + @SerializedName("name") + private String name = null; + + public SendSmtpEmailTo email(String email) { + this.email = email; + return this; + } + + /** + * Email address of the recipient + * @return email + **/ + @ApiModelProperty(example = "jimmy98@example.com", required = true, value = "Email address of the recipient") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public SendSmtpEmailTo name(String name) { + this.name = name; + return this; + } + + /** + * Name of the recipient + * @return name + **/ + @ApiModelProperty(example = "Jimmy", value = "Name of the recipient") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SendSmtpEmailTo sendSmtpEmailTo = (SendSmtpEmailTo) o; + return ObjectUtils.equals(this.email, sendSmtpEmailTo.email) && + ObjectUtils.equals(this.name, sendSmtpEmailTo.name); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(email, name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SendSmtpEmailTo {\n"); + + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/SendTemplateEmail.java b/src/main/java/sibModel/SendTemplateEmail.java new file mode 100644 index 0000000..660e550 --- /dev/null +++ b/src/main/java/sibModel/SendTemplateEmail.java @@ -0,0 +1,93 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * SendTemplateEmail + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class SendTemplateEmail { + @SerializedName("messageId") + private String messageId = null; + + public SendTemplateEmail messageId(String messageId) { + this.messageId = messageId; + return this; + } + + /** + * Message ID of the template Email sent + * @return messageId + **/ + @ApiModelProperty(example = "<201798300811.5787683@relay.domain.com>", required = true, value = "Message ID of the template Email sent") + public String getMessageId() { + return messageId; + } + + public void setMessageId(String messageId) { + this.messageId = messageId; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SendTemplateEmail sendTemplateEmail = (SendTemplateEmail) o; + return ObjectUtils.equals(this.messageId, sendTemplateEmail.messageId); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(messageId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SendTemplateEmail {\n"); + + sb.append(" messageId: ").append(toIndentedString(messageId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/SendTestEmail.java b/src/main/java/sibModel/SendTestEmail.java new file mode 100644 index 0000000..8993aca --- /dev/null +++ b/src/main/java/sibModel/SendTestEmail.java @@ -0,0 +1,103 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * SendTestEmail + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class SendTestEmail { + @SerializedName("emailTo") + private List emailTo = null; + + public SendTestEmail emailTo(List emailTo) { + this.emailTo = emailTo; + return this; + } + + public SendTestEmail addEmailToItem(String emailToItem) { + if (this.emailTo == null) { + this.emailTo = new ArrayList(); + } + this.emailTo.add(emailToItem); + return this; + } + + /** + * If empty the test email will be sent to your entire test list. Use this field to send it to specific addresses in your list. + * @return emailTo + **/ + @ApiModelProperty(value = "If empty the test email will be sent to your entire test list. Use this field to send it to specific addresses in your list.") + public List getEmailTo() { + return emailTo; + } + + public void setEmailTo(List emailTo) { + this.emailTo = emailTo; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SendTestEmail sendTestEmail = (SendTestEmail) o; + return ObjectUtils.equals(this.emailTo, sendTestEmail.emailTo); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(emailTo); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SendTestEmail {\n"); + + sb.append(" emailTo: ").append(toIndentedString(emailTo)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/SendTestSms.java b/src/main/java/sibModel/SendTestSms.java new file mode 100644 index 0000000..afd10b3 --- /dev/null +++ b/src/main/java/sibModel/SendTestSms.java @@ -0,0 +1,103 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * SendTestSms + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class SendTestSms { + @SerializedName("phoneNumbers") + private List phoneNumbers = null; + + public SendTestSms phoneNumbers(List phoneNumbers) { + this.phoneNumbers = phoneNumbers; + return this; + } + + public SendTestSms addPhoneNumbersItem(String phoneNumbersItem) { + if (this.phoneNumbers == null) { + this.phoneNumbers = new ArrayList(); + } + this.phoneNumbers.add(phoneNumbersItem); + return this; + } + + /** + * Mobile number with the country code to send test SMS. The mobile number defined here must belong to one of your contacts in SendinBlue account and must not be blacklisted + * @return phoneNumbers + **/ + @ApiModelProperty(value = "Mobile number with the country code to send test SMS. The mobile number defined here must belong to one of your contacts in SendinBlue account and must not be blacklisted") + public List getPhoneNumbers() { + return phoneNumbers; + } + + public void setPhoneNumbers(List phoneNumbers) { + this.phoneNumbers = phoneNumbers; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SendTestSms sendTestSms = (SendTestSms) o; + return ObjectUtils.equals(this.phoneNumbers, sendTestSms.phoneNumbers); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(phoneNumbers); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SendTestSms {\n"); + + sb.append(" phoneNumbers: ").append(toIndentedString(phoneNumbers)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/SendTransacSms.java b/src/main/java/sibModel/SendTransacSms.java new file mode 100644 index 0000000..83f99c6 --- /dev/null +++ b/src/main/java/sibModel/SendTransacSms.java @@ -0,0 +1,255 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * SendTransacSms + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class SendTransacSms { + @SerializedName("sender") + private String sender = null; + + @SerializedName("recipient") + private String recipient = null; + + @SerializedName("content") + private String content = null; + + /** + * Type of the SMS + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + TRANSACTIONAL("transactional"), + + MARKETING("marketing"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String text) { + for (TypeEnum b : TypeEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("type") + private TypeEnum type = TypeEnum.TRANSACTIONAL; + + @SerializedName("tag") + private String tag = null; + + @SerializedName("webUrl") + private String webUrl = null; + + public SendTransacSms sender(String sender) { + this.sender = sender; + return this; + } + + /** + * Name of the sender. Only alphanumeric characters. No more than 11 characters + * @return sender + **/ + @ApiModelProperty(example = "MyShop", required = true, value = "Name of the sender. Only alphanumeric characters. No more than 11 characters") + public String getSender() { + return sender; + } + + public void setSender(String sender) { + this.sender = sender; + } + + public SendTransacSms recipient(String recipient) { + this.recipient = recipient; + return this; + } + + /** + * Mobile number to send SMS with the country code + * @return recipient + **/ + @ApiModelProperty(example = "33689965433", required = true, value = "Mobile number to send SMS with the country code") + public String getRecipient() { + return recipient; + } + + public void setRecipient(String recipient) { + this.recipient = recipient; + } + + public SendTransacSms content(String content) { + this.content = content; + return this; + } + + /** + * Content of the message. If more than 160 characters long, multiple text messages will be sent + * @return content + **/ + @ApiModelProperty(example = "Enter this code:CCJJG8 to validate your account", required = true, value = "Content of the message. If more than 160 characters long, multiple text messages will be sent") + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public SendTransacSms type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of the SMS + * @return type + **/ + @ApiModelProperty(example = "marketing", value = "Type of the SMS") + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + public SendTransacSms tag(String tag) { + this.tag = tag; + return this; + } + + /** + * Tag of the message + * @return tag + **/ + @ApiModelProperty(example = "accountValidation", value = "Tag of the message") + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + public SendTransacSms webUrl(String webUrl) { + this.webUrl = webUrl; + return this; + } + + /** + * Webhook to call for each event triggered by the message (delivered etc.) + * @return webUrl + **/ + @ApiModelProperty(example = "http://requestb.in/173lyyx1", value = "Webhook to call for each event triggered by the message (delivered etc.)") + public String getWebUrl() { + return webUrl; + } + + public void setWebUrl(String webUrl) { + this.webUrl = webUrl; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SendTransacSms sendTransacSms = (SendTransacSms) o; + return ObjectUtils.equals(this.sender, sendTransacSms.sender) && + ObjectUtils.equals(this.recipient, sendTransacSms.recipient) && + ObjectUtils.equals(this.content, sendTransacSms.content) && + ObjectUtils.equals(this.type, sendTransacSms.type) && + ObjectUtils.equals(this.tag, sendTransacSms.tag) && + ObjectUtils.equals(this.webUrl, sendTransacSms.webUrl); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(sender, recipient, content, type, tag, webUrl); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SendTransacSms {\n"); + + sb.append(" sender: ").append(toIndentedString(sender)).append("\n"); + sb.append(" recipient: ").append(toIndentedString(recipient)).append("\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" tag: ").append(toIndentedString(tag)).append("\n"); + sb.append(" webUrl: ").append(toIndentedString(webUrl)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/UpdateAttribute.java b/src/main/java/sibModel/UpdateAttribute.java new file mode 100644 index 0000000..b9ed278 --- /dev/null +++ b/src/main/java/sibModel/UpdateAttribute.java @@ -0,0 +1,127 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import sibModel.UpdateAttributeEnumeration; + +/** + * UpdateAttribute + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class UpdateAttribute { + @SerializedName("value") + private String value = null; + + @SerializedName("enumeration") + private List enumeration = null; + + public UpdateAttribute value(String value) { + this.value = value; + return this; + } + + /** + * Value of the attribute. Use only if the attribute's category is calculated or global + * @return value + **/ + @ApiModelProperty(example = "COUNT[BLACKLISTED,BLACKLISTED,<,NOW()]", value = "Value of the attribute. Use only if the attribute's category is calculated or global") + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public UpdateAttribute enumeration(List enumeration) { + this.enumeration = enumeration; + return this; + } + + public UpdateAttribute addEnumerationItem(UpdateAttributeEnumeration enumerationItem) { + if (this.enumeration == null) { + this.enumeration = new ArrayList(); + } + this.enumeration.add(enumerationItem); + return this; + } + + /** + * Values that the attribute can take. Use only if the attribute's category is category + * @return enumeration + **/ + @ApiModelProperty(value = "Values that the attribute can take. Use only if the attribute's category is category") + public List getEnumeration() { + return enumeration; + } + + public void setEnumeration(List enumeration) { + this.enumeration = enumeration; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateAttribute updateAttribute = (UpdateAttribute) o; + return ObjectUtils.equals(this.value, updateAttribute.value) && + ObjectUtils.equals(this.enumeration, updateAttribute.enumeration); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(value, enumeration); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateAttribute {\n"); + + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" enumeration: ").append(toIndentedString(enumeration)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/UpdateAttributeEnumeration.java b/src/main/java/sibModel/UpdateAttributeEnumeration.java new file mode 100644 index 0000000..e99ccf5 --- /dev/null +++ b/src/main/java/sibModel/UpdateAttributeEnumeration.java @@ -0,0 +1,116 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * UpdateAttributeEnumeration + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class UpdateAttributeEnumeration { + @SerializedName("value") + private Integer value = null; + + @SerializedName("label") + private String label = null; + + public UpdateAttributeEnumeration value(Integer value) { + this.value = value; + return this; + } + + /** + * Id of the value + * @return value + **/ + @ApiModelProperty(example = "1", required = true, value = "Id of the value") + public Integer getValue() { + return value; + } + + public void setValue(Integer value) { + this.value = value; + } + + public UpdateAttributeEnumeration label(String label) { + this.label = label; + return this; + } + + /** + * Label of the value + * @return label + **/ + @ApiModelProperty(example = "Men", required = true, value = "Label of the value") + public String getLabel() { + return label; + } + + public void setLabel(String label) { + this.label = label; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateAttributeEnumeration updateAttributeEnumeration = (UpdateAttributeEnumeration) o; + return ObjectUtils.equals(this.value, updateAttributeEnumeration.value) && + ObjectUtils.equals(this.label, updateAttributeEnumeration.label); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(value, label); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateAttributeEnumeration {\n"); + + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" label: ").append(toIndentedString(label)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/UpdateCampaignStatus.java b/src/main/java/sibModel/UpdateCampaignStatus.java new file mode 100644 index 0000000..90a0396 --- /dev/null +++ b/src/main/java/sibModel/UpdateCampaignStatus.java @@ -0,0 +1,153 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Status of the campaign + */ +@ApiModel(description = "Status of the campaign") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class UpdateCampaignStatus { + /** + * Gets or Sets status + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + SUSPENDED("suspended"), + + ARCHIVE("archive"), + + DARCHIVE("darchive"), + + SENT("sent"), + + QUEUED("queued"), + + REPLICATE("replicate"), + + REPLICATETEMPLATE("replicateTemplate"), + + DRAFT("draft"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String text) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("status") + private StatusEnum status = null; + + public UpdateCampaignStatus status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @ApiModelProperty(value = "") + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateCampaignStatus updateCampaignStatus = (UpdateCampaignStatus) o; + return ObjectUtils.equals(this.status, updateCampaignStatus.status); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(status); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateCampaignStatus {\n"); + + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/UpdateChild.java b/src/main/java/sibModel/UpdateChild.java new file mode 100644 index 0000000..dbb4c28 --- /dev/null +++ b/src/main/java/sibModel/UpdateChild.java @@ -0,0 +1,185 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * UpdateChild + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class UpdateChild { + @SerializedName("email") + private String email = null; + + @SerializedName("firstName") + private String firstName = null; + + @SerializedName("lastName") + private String lastName = null; + + @SerializedName("companyName") + private String companyName = null; + + @SerializedName("password") + private String password = null; + + public UpdateChild email(String email) { + this.email = email; + return this; + } + + /** + * New Email address to update the child account + * @return email + **/ + @ApiModelProperty(example = "josh.cruise@example.com", value = "New Email address to update the child account") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public UpdateChild firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * New First name to use to update the child account + * @return firstName + **/ + @ApiModelProperty(example = "Josh", value = "New First name to use to update the child account") + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public UpdateChild lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * New Last name to use to update the child account + * @return lastName + **/ + @ApiModelProperty(example = "Cruise", value = "New Last name to use to update the child account") + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public UpdateChild companyName(String companyName) { + this.companyName = companyName; + return this; + } + + /** + * New Company name to use to update the child account + * @return companyName + **/ + @ApiModelProperty(example = "Your Company", value = "New Company name to use to update the child account") + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + public UpdateChild password(String password) { + this.password = password; + return this; + } + + /** + * New password for the child account to login + * @return password + **/ + @ApiModelProperty(example = "Pa55w0rd65", value = "New password for the child account to login") + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateChild updateChild = (UpdateChild) o; + return ObjectUtils.equals(this.email, updateChild.email) && + ObjectUtils.equals(this.firstName, updateChild.firstName) && + ObjectUtils.equals(this.lastName, updateChild.lastName) && + ObjectUtils.equals(this.companyName, updateChild.companyName) && + ObjectUtils.equals(this.password, updateChild.password); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(email, firstName, lastName, companyName, password); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateChild {\n"); + + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" companyName: ").append(toIndentedString(companyName)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/UpdateContact.java b/src/main/java/sibModel/UpdateContact.java new file mode 100644 index 0000000..46cd398 --- /dev/null +++ b/src/main/java/sibModel/UpdateContact.java @@ -0,0 +1,244 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * UpdateContact + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class UpdateContact { + @SerializedName("attributes") + private Map attributes = null; + + @SerializedName("emailBlacklisted") + private Boolean emailBlacklisted = null; + + @SerializedName("smsBlacklisted") + private Boolean smsBlacklisted = null; + + @SerializedName("listIds") + private List listIds = null; + + @SerializedName("unlinkListIds") + private List unlinkListIds = null; + + @SerializedName("smtpBlacklistSender") + private List smtpBlacklistSender = null; + + public UpdateContact attributes(Map attributes) { + this.attributes = attributes; + return this; + } + + public UpdateContact putAttributesItem(String key, String attributesItem) { + if (this.attributes == null) { + this.attributes = new HashMap(); + } + this.attributes.put(key, attributesItem); + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @ApiModelProperty(value = "") + public Map getAttributes() { + return attributes; + } + + public void setAttributes(Map attributes) { + this.attributes = attributes; + } + + public UpdateContact emailBlacklisted(Boolean emailBlacklisted) { + this.emailBlacklisted = emailBlacklisted; + return this; + } + + /** + * Blacklist the contact for emails (emailBlacklisted = true) + * @return emailBlacklisted + **/ + @ApiModelProperty(example = "false", value = "Blacklist the contact for emails (emailBlacklisted = true)") + public Boolean isEmailBlacklisted() { + return emailBlacklisted; + } + + public void setEmailBlacklisted(Boolean emailBlacklisted) { + this.emailBlacklisted = emailBlacklisted; + } + + public UpdateContact smsBlacklisted(Boolean smsBlacklisted) { + this.smsBlacklisted = smsBlacklisted; + return this; + } + + /** + * Blacklist the contact for SMS (smsBlacklisted = true) + * @return smsBlacklisted + **/ + @ApiModelProperty(example = "true", value = "Blacklist the contact for SMS (smsBlacklisted = true)") + public Boolean isSmsBlacklisted() { + return smsBlacklisted; + } + + public void setSmsBlacklisted(Boolean smsBlacklisted) { + this.smsBlacklisted = smsBlacklisted; + } + + public UpdateContact listIds(List listIds) { + this.listIds = listIds; + return this; + } + + public UpdateContact addListIdsItem(Long listIdsItem) { + if (this.listIds == null) { + this.listIds = new ArrayList(); + } + this.listIds.add(listIdsItem); + return this; + } + + /** + * Ids of the lists to add the contact to + * @return listIds + **/ + @ApiModelProperty(value = "Ids of the lists to add the contact to") + public List getListIds() { + return listIds; + } + + public void setListIds(List listIds) { + this.listIds = listIds; + } + + public UpdateContact unlinkListIds(List unlinkListIds) { + this.unlinkListIds = unlinkListIds; + return this; + } + + public UpdateContact addUnlinkListIdsItem(Long unlinkListIdsItem) { + if (this.unlinkListIds == null) { + this.unlinkListIds = new ArrayList(); + } + this.unlinkListIds.add(unlinkListIdsItem); + return this; + } + + /** + * Ids of the lists to remove the contact from + * @return unlinkListIds + **/ + @ApiModelProperty(value = "Ids of the lists to remove the contact from") + public List getUnlinkListIds() { + return unlinkListIds; + } + + public void setUnlinkListIds(List unlinkListIds) { + this.unlinkListIds = unlinkListIds; + } + + public UpdateContact smtpBlacklistSender(List smtpBlacklistSender) { + this.smtpBlacklistSender = smtpBlacklistSender; + return this; + } + + public UpdateContact addSmtpBlacklistSenderItem(String smtpBlacklistSenderItem) { + if (this.smtpBlacklistSender == null) { + this.smtpBlacklistSender = new ArrayList(); + } + this.smtpBlacklistSender.add(smtpBlacklistSenderItem); + return this; + } + + /** + * SMTP forbidden sender for contact. Use only for email Contact + * @return smtpBlacklistSender + **/ + @ApiModelProperty(value = "SMTP forbidden sender for contact. Use only for email Contact") + public List getSmtpBlacklistSender() { + return smtpBlacklistSender; + } + + public void setSmtpBlacklistSender(List smtpBlacklistSender) { + this.smtpBlacklistSender = smtpBlacklistSender; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateContact updateContact = (UpdateContact) o; + return ObjectUtils.equals(this.attributes, updateContact.attributes) && + ObjectUtils.equals(this.emailBlacklisted, updateContact.emailBlacklisted) && + ObjectUtils.equals(this.smsBlacklisted, updateContact.smsBlacklisted) && + ObjectUtils.equals(this.listIds, updateContact.listIds) && + ObjectUtils.equals(this.unlinkListIds, updateContact.unlinkListIds) && + ObjectUtils.equals(this.smtpBlacklistSender, updateContact.smtpBlacklistSender); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(attributes, emailBlacklisted, smsBlacklisted, listIds, unlinkListIds, smtpBlacklistSender); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateContact {\n"); + + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" emailBlacklisted: ").append(toIndentedString(emailBlacklisted)).append("\n"); + sb.append(" smsBlacklisted: ").append(toIndentedString(smsBlacklisted)).append("\n"); + sb.append(" listIds: ").append(toIndentedString(listIds)).append("\n"); + sb.append(" unlinkListIds: ").append(toIndentedString(unlinkListIds)).append("\n"); + sb.append(" smtpBlacklistSender: ").append(toIndentedString(smtpBlacklistSender)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/UpdateEmailCampaign.java b/src/main/java/sibModel/UpdateEmailCampaign.java new file mode 100644 index 0000000..a0881bf --- /dev/null +++ b/src/main/java/sibModel/UpdateEmailCampaign.java @@ -0,0 +1,464 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.threeten.bp.OffsetDateTime; +import sibModel.UpdateEmailCampaignRecipients; +import sibModel.UpdateEmailCampaignSender; + +/** + * UpdateEmailCampaign + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class UpdateEmailCampaign { + @SerializedName("tag") + private String tag = null; + + @SerializedName("sender") + private UpdateEmailCampaignSender sender = null; + + @SerializedName("name") + private String name = null; + + @SerializedName("htmlContent") + private String htmlContent = null; + + @SerializedName("htmlUrl") + private String htmlUrl = null; + + @SerializedName("scheduledAt") + private OffsetDateTime scheduledAt = null; + + @SerializedName("subject") + private String subject = null; + + @SerializedName("replyTo") + private String replyTo = null; + + @SerializedName("toField") + private String toField = null; + + @SerializedName("recipients") + private UpdateEmailCampaignRecipients recipients = null; + + @SerializedName("attachmentUrl") + private String attachmentUrl = null; + + @SerializedName("inlineImageActivation") + private Boolean inlineImageActivation = false; + + @SerializedName("mirrorActive") + private Boolean mirrorActive = null; + + @SerializedName("recurring") + private Boolean recurring = false; + + @SerializedName("footer") + private String footer = null; + + @SerializedName("header") + private String header = null; + + @SerializedName("utmCampaign") + private String utmCampaign = null; + + public UpdateEmailCampaign tag(String tag) { + this.tag = tag; + return this; + } + + /** + * Tag of the campaign + * @return tag + **/ + @ApiModelProperty(example = "Newsletter", value = "Tag of the campaign") + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + public UpdateEmailCampaign sender(UpdateEmailCampaignSender sender) { + this.sender = sender; + return this; + } + + /** + * Get sender + * @return sender + **/ + @ApiModelProperty(value = "") + public UpdateEmailCampaignSender getSender() { + return sender; + } + + public void setSender(UpdateEmailCampaignSender sender) { + this.sender = sender; + } + + public UpdateEmailCampaign name(String name) { + this.name = name; + return this; + } + + /** + * Name of the campaign + * @return name + **/ + @ApiModelProperty(example = "Newsletter - May 2017", value = "Name of the campaign") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public UpdateEmailCampaign htmlContent(String htmlContent) { + this.htmlContent = htmlContent; + return this; + } + + /** + * Body of the message (HTML version). REQUIRED if htmlUrl is empty + * @return htmlContent + **/ + @ApiModelProperty(example = "Spring is here, discover my new collection", value = "Body of the message (HTML version). REQUIRED if htmlUrl is empty") + public String getHtmlContent() { + return htmlContent; + } + + public void setHtmlContent(String htmlContent) { + this.htmlContent = htmlContent; + } + + public UpdateEmailCampaign htmlUrl(String htmlUrl) { + this.htmlUrl = htmlUrl; + return this; + } + + /** + * Url which contents the body of the email message. REQUIRED if htmlContent is empty + * @return htmlUrl + **/ + @ApiModelProperty(example = "https://html.domain.com", value = "Url which contents the body of the email message. REQUIRED if htmlContent is empty") + public String getHtmlUrl() { + return htmlUrl; + } + + public void setHtmlUrl(String htmlUrl) { + this.htmlUrl = htmlUrl; + } + + public UpdateEmailCampaign scheduledAt(OffsetDateTime scheduledAt) { + this.scheduledAt = scheduledAt; + return this; + } + + /** + * UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. + * @return scheduledAt + **/ + @ApiModelProperty(example = "2017-06-01T12:30:00+02:00", value = "UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result.") + public OffsetDateTime getScheduledAt() { + return scheduledAt; + } + + public void setScheduledAt(OffsetDateTime scheduledAt) { + this.scheduledAt = scheduledAt; + } + + public UpdateEmailCampaign subject(String subject) { + this.subject = subject; + return this; + } + + /** + * Subject of the campaign + * @return subject + **/ + @ApiModelProperty(example = "Discover the New Collection !", value = "Subject of the campaign") + public String getSubject() { + return subject; + } + + public void setSubject(String subject) { + this.subject = subject; + } + + public UpdateEmailCampaign replyTo(String replyTo) { + this.replyTo = replyTo; + return this; + } + + /** + * Email on which campaign recipients will be able to reply to + * @return replyTo + **/ + @ApiModelProperty(example = "support@myshop.com", value = "Email on which campaign recipients will be able to reply to") + public String getReplyTo() { + return replyTo; + } + + public void setReplyTo(String replyTo) { + this.replyTo = replyTo; + } + + public UpdateEmailCampaign toField(String toField) { + this.toField = toField; + return this; + } + + /** + * This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. To use the contact attributes here, these must already exist in SendinBlue account + * @return toField + **/ + @ApiModelProperty(example = "{FNAME} {LNAME}", value = "This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. To use the contact attributes here, these must already exist in SendinBlue account") + public String getToField() { + return toField; + } + + public void setToField(String toField) { + this.toField = toField; + } + + public UpdateEmailCampaign recipients(UpdateEmailCampaignRecipients recipients) { + this.recipients = recipients; + return this; + } + + /** + * Get recipients + * @return recipients + **/ + @ApiModelProperty(value = "") + public UpdateEmailCampaignRecipients getRecipients() { + return recipients; + } + + public void setRecipients(UpdateEmailCampaignRecipients recipients) { + this.recipients = recipients; + } + + public UpdateEmailCampaign attachmentUrl(String attachmentUrl) { + this.attachmentUrl = attachmentUrl; + return this; + } + + /** + * Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps + * @return attachmentUrl + **/ + @ApiModelProperty(example = "https://attachment.domain.com", value = "Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps") + public String getAttachmentUrl() { + return attachmentUrl; + } + + public void setAttachmentUrl(String attachmentUrl) { + this.attachmentUrl = attachmentUrl; + } + + public UpdateEmailCampaign inlineImageActivation(Boolean inlineImageActivation) { + this.inlineImageActivation = inlineImageActivation; + return this; + } + + /** + * Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. You cannot send a campaign of more than 4MB with images embedded in the email. Campaigns with the images embedded in the email must be sent to less than 5000 contacts. + * @return inlineImageActivation + **/ + @ApiModelProperty(example = "true", value = "Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. You cannot send a campaign of more than 4MB with images embedded in the email. Campaigns with the images embedded in the email must be sent to less than 5000 contacts.") + public Boolean isInlineImageActivation() { + return inlineImageActivation; + } + + public void setInlineImageActivation(Boolean inlineImageActivation) { + this.inlineImageActivation = inlineImageActivation; + } + + public UpdateEmailCampaign mirrorActive(Boolean mirrorActive) { + this.mirrorActive = mirrorActive; + return this; + } + + /** + * Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign + * @return mirrorActive + **/ + @ApiModelProperty(example = "true", value = "Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign") + public Boolean isMirrorActive() { + return mirrorActive; + } + + public void setMirrorActive(Boolean mirrorActive) { + this.mirrorActive = mirrorActive; + } + + public UpdateEmailCampaign recurring(Boolean recurring) { + this.recurring = recurring; + return this; + } + + /** + * FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times + * @return recurring + **/ + @ApiModelProperty(example = "false", value = "FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times") + public Boolean isRecurring() { + return recurring; + } + + public void setRecurring(Boolean recurring) { + this.recurring = recurring; + } + + public UpdateEmailCampaign footer(String footer) { + this.footer = footer; + return this; + } + + /** + * Footer of the email campaign + * @return footer + **/ + @ApiModelProperty(example = "[DEFAULT_FOOTER]", value = "Footer of the email campaign") + public String getFooter() { + return footer; + } + + public void setFooter(String footer) { + this.footer = footer; + } + + public UpdateEmailCampaign header(String header) { + this.header = header; + return this; + } + + /** + * Header of the email campaign + * @return header + **/ + @ApiModelProperty(example = "[DEFAULT_HEADER]", value = "Header of the email campaign") + public String getHeader() { + return header; + } + + public void setHeader(String header) { + this.header = header; + } + + public UpdateEmailCampaign utmCampaign(String utmCampaign) { + this.utmCampaign = utmCampaign; + return this; + } + + /** + * Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed + * @return utmCampaign + **/ + @ApiModelProperty(example = "NL_05_2017", value = "Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed") + public String getUtmCampaign() { + return utmCampaign; + } + + public void setUtmCampaign(String utmCampaign) { + this.utmCampaign = utmCampaign; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateEmailCampaign updateEmailCampaign = (UpdateEmailCampaign) o; + return ObjectUtils.equals(this.tag, updateEmailCampaign.tag) && + ObjectUtils.equals(this.sender, updateEmailCampaign.sender) && + ObjectUtils.equals(this.name, updateEmailCampaign.name) && + ObjectUtils.equals(this.htmlContent, updateEmailCampaign.htmlContent) && + ObjectUtils.equals(this.htmlUrl, updateEmailCampaign.htmlUrl) && + ObjectUtils.equals(this.scheduledAt, updateEmailCampaign.scheduledAt) && + ObjectUtils.equals(this.subject, updateEmailCampaign.subject) && + ObjectUtils.equals(this.replyTo, updateEmailCampaign.replyTo) && + ObjectUtils.equals(this.toField, updateEmailCampaign.toField) && + ObjectUtils.equals(this.recipients, updateEmailCampaign.recipients) && + ObjectUtils.equals(this.attachmentUrl, updateEmailCampaign.attachmentUrl) && + ObjectUtils.equals(this.inlineImageActivation, updateEmailCampaign.inlineImageActivation) && + ObjectUtils.equals(this.mirrorActive, updateEmailCampaign.mirrorActive) && + ObjectUtils.equals(this.recurring, updateEmailCampaign.recurring) && + ObjectUtils.equals(this.footer, updateEmailCampaign.footer) && + ObjectUtils.equals(this.header, updateEmailCampaign.header) && + ObjectUtils.equals(this.utmCampaign, updateEmailCampaign.utmCampaign); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(tag, sender, name, htmlContent, htmlUrl, scheduledAt, subject, replyTo, toField, recipients, attachmentUrl, inlineImageActivation, mirrorActive, recurring, footer, header, utmCampaign); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateEmailCampaign {\n"); + + sb.append(" tag: ").append(toIndentedString(tag)).append("\n"); + sb.append(" sender: ").append(toIndentedString(sender)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" htmlContent: ").append(toIndentedString(htmlContent)).append("\n"); + sb.append(" htmlUrl: ").append(toIndentedString(htmlUrl)).append("\n"); + sb.append(" scheduledAt: ").append(toIndentedString(scheduledAt)).append("\n"); + sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); + sb.append(" replyTo: ").append(toIndentedString(replyTo)).append("\n"); + sb.append(" toField: ").append(toIndentedString(toField)).append("\n"); + sb.append(" recipients: ").append(toIndentedString(recipients)).append("\n"); + sb.append(" attachmentUrl: ").append(toIndentedString(attachmentUrl)).append("\n"); + sb.append(" inlineImageActivation: ").append(toIndentedString(inlineImageActivation)).append("\n"); + sb.append(" mirrorActive: ").append(toIndentedString(mirrorActive)).append("\n"); + sb.append(" recurring: ").append(toIndentedString(recurring)).append("\n"); + sb.append(" footer: ").append(toIndentedString(footer)).append("\n"); + sb.append(" header: ").append(toIndentedString(header)).append("\n"); + sb.append(" utmCampaign: ").append(toIndentedString(utmCampaign)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/UpdateEmailCampaignRecipients.java b/src/main/java/sibModel/UpdateEmailCampaignRecipients.java new file mode 100644 index 0000000..5c435a0 --- /dev/null +++ b/src/main/java/sibModel/UpdateEmailCampaignRecipients.java @@ -0,0 +1,134 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * UpdateEmailCampaignRecipients + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class UpdateEmailCampaignRecipients { + @SerializedName("exclusionListIds") + private List exclusionListIds = null; + + @SerializedName("listIds") + private List listIds = null; + + public UpdateEmailCampaignRecipients exclusionListIds(List exclusionListIds) { + this.exclusionListIds = exclusionListIds; + return this; + } + + public UpdateEmailCampaignRecipients addExclusionListIdsItem(Long exclusionListIdsItem) { + if (this.exclusionListIds == null) { + this.exclusionListIds = new ArrayList(); + } + this.exclusionListIds.add(exclusionListIdsItem); + return this; + } + + /** + * List ids which have to be excluded from a campaign + * @return exclusionListIds + **/ + @ApiModelProperty(value = "List ids which have to be excluded from a campaign") + public List getExclusionListIds() { + return exclusionListIds; + } + + public void setExclusionListIds(List exclusionListIds) { + this.exclusionListIds = exclusionListIds; + } + + public UpdateEmailCampaignRecipients listIds(List listIds) { + this.listIds = listIds; + return this; + } + + public UpdateEmailCampaignRecipients addListIdsItem(Long listIdsItem) { + if (this.listIds == null) { + this.listIds = new ArrayList(); + } + this.listIds.add(listIdsItem); + return this; + } + + /** + * Lists Ids to send the campaign to. REQUIRED if already not present in campaign and scheduledAt is not empty + * @return listIds + **/ + @ApiModelProperty(value = "Lists Ids to send the campaign to. REQUIRED if already not present in campaign and scheduledAt is not empty") + public List getListIds() { + return listIds; + } + + public void setListIds(List listIds) { + this.listIds = listIds; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateEmailCampaignRecipients updateEmailCampaignRecipients = (UpdateEmailCampaignRecipients) o; + return ObjectUtils.equals(this.exclusionListIds, updateEmailCampaignRecipients.exclusionListIds) && + ObjectUtils.equals(this.listIds, updateEmailCampaignRecipients.listIds); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(exclusionListIds, listIds); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateEmailCampaignRecipients {\n"); + + sb.append(" exclusionListIds: ").append(toIndentedString(exclusionListIds)).append("\n"); + sb.append(" listIds: ").append(toIndentedString(listIds)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/UpdateEmailCampaignSender.java b/src/main/java/sibModel/UpdateEmailCampaignSender.java new file mode 100644 index 0000000..500b8b4 --- /dev/null +++ b/src/main/java/sibModel/UpdateEmailCampaignSender.java @@ -0,0 +1,116 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * UpdateEmailCampaignSender + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class UpdateEmailCampaignSender { + @SerializedName("name") + private String name = null; + + @SerializedName("email") + private String email = null; + + public UpdateEmailCampaignSender name(String name) { + this.name = name; + return this; + } + + /** + * Sender Name from which the campaign emails are sent + * @return name + **/ + @ApiModelProperty(example = "Mary from MyShop", value = "Sender Name from which the campaign emails are sent") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public UpdateEmailCampaignSender email(String email) { + this.email = email; + return this; + } + + /** + * Sender email from which the campaign emails are sent + * @return email + **/ + @ApiModelProperty(example = "newsletter@myshop.com", value = "Sender email from which the campaign emails are sent") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateEmailCampaignSender updateEmailCampaignSender = (UpdateEmailCampaignSender) o; + return ObjectUtils.equals(this.name, updateEmailCampaignSender.name) && + ObjectUtils.equals(this.email, updateEmailCampaignSender.email); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(name, email); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateEmailCampaignSender {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/UpdateList.java b/src/main/java/sibModel/UpdateList.java new file mode 100644 index 0000000..ea92037 --- /dev/null +++ b/src/main/java/sibModel/UpdateList.java @@ -0,0 +1,116 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * UpdateList + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class UpdateList { + @SerializedName("name") + private String name = null; + + @SerializedName("folderId") + private Long folderId = null; + + public UpdateList name(String name) { + this.name = name; + return this; + } + + /** + * Name of the list. Only one parameter can be update at once + * @return name + **/ + @ApiModelProperty(example = "Magento Customer - ES", value = "Name of the list. Only one parameter can be update at once") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public UpdateList folderId(Long folderId) { + this.folderId = folderId; + return this; + } + + /** + * Id of the folder in which to move the list. Only one parameter can updated at once + * @return folderId + **/ + @ApiModelProperty(example = "2", value = "Id of the folder in which to move the list. Only one parameter can updated at once") + public Long getFolderId() { + return folderId; + } + + public void setFolderId(Long folderId) { + this.folderId = folderId; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateList updateList = (UpdateList) o; + return ObjectUtils.equals(this.name, updateList.name) && + ObjectUtils.equals(this.folderId, updateList.folderId); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(name, folderId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateList {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" folderId: ").append(toIndentedString(folderId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/UpdateSender.java b/src/main/java/sibModel/UpdateSender.java new file mode 100644 index 0000000..5caa4bf --- /dev/null +++ b/src/main/java/sibModel/UpdateSender.java @@ -0,0 +1,150 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import sibModel.CreateSenderIps; + +/** + * UpdateSender + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class UpdateSender { + @SerializedName("name") + private String name = null; + + @SerializedName("email") + private String email = null; + + @SerializedName("ips") + private List ips = null; + + public UpdateSender name(String name) { + this.name = name; + return this; + } + + /** + * From Name to update the sender + * @return name + **/ + @ApiModelProperty(example = "Newsletter", value = "From Name to update the sender") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public UpdateSender email(String email) { + this.email = email; + return this; + } + + /** + * From Email to update the sender + * @return email + **/ + @ApiModelProperty(example = "newsletter@mycompany.com", value = "From Email to update the sender") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public UpdateSender ips(List ips) { + this.ips = ips; + return this; + } + + public UpdateSender addIpsItem(CreateSenderIps ipsItem) { + if (this.ips == null) { + this.ips = new ArrayList(); + } + this.ips.add(ipsItem); + return this; + } + + /** + * Only in case of dedicated IP, IPs to associate to the sender. If passed, will replace all the existing IPs. + * @return ips + **/ + @ApiModelProperty(value = "Only in case of dedicated IP, IPs to associate to the sender. If passed, will replace all the existing IPs.") + public List getIps() { + return ips; + } + + public void setIps(List ips) { + this.ips = ips; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateSender updateSender = (UpdateSender) o; + return ObjectUtils.equals(this.name, updateSender.name) && + ObjectUtils.equals(this.email, updateSender.email) && + ObjectUtils.equals(this.ips, updateSender.ips); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(name, email, ips); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateSender {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" ips: ").append(toIndentedString(ips)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/UpdateSmsCampaign.java b/src/main/java/sibModel/UpdateSmsCampaign.java new file mode 100644 index 0000000..319e759 --- /dev/null +++ b/src/main/java/sibModel/UpdateSmsCampaign.java @@ -0,0 +1,187 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.threeten.bp.OffsetDateTime; +import sibModel.CreateSmsCampaignRecipients; + +/** + * UpdateSmsCampaign + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class UpdateSmsCampaign { + @SerializedName("name") + private String name = null; + + @SerializedName("sender") + private String sender = null; + + @SerializedName("content") + private String content = null; + + @SerializedName("recipients") + private CreateSmsCampaignRecipients recipients = null; + + @SerializedName("scheduledAt") + private OffsetDateTime scheduledAt = null; + + public UpdateSmsCampaign name(String name) { + this.name = name; + return this; + } + + /** + * Name of the campaign + * @return name + **/ + @ApiModelProperty(example = "Spring Promo Code", value = "Name of the campaign") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public UpdateSmsCampaign sender(String sender) { + this.sender = sender; + return this; + } + + /** + * Name of the sender. The number of characters is limited to 11 + * @return sender + **/ + @ApiModelProperty(example = "MyShop", value = "Name of the sender. The number of characters is limited to 11") + public String getSender() { + return sender; + } + + public void setSender(String sender) { + this.sender = sender; + } + + public UpdateSmsCampaign content(String content) { + this.content = content; + return this; + } + + /** + * Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS + * @return content + **/ + @ApiModelProperty(example = "Get a discount by visiting our NY store and saying : Happy Spring!", value = "Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS") + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public UpdateSmsCampaign recipients(CreateSmsCampaignRecipients recipients) { + this.recipients = recipients; + return this; + } + + /** + * Get recipients + * @return recipients + **/ + @ApiModelProperty(value = "") + public CreateSmsCampaignRecipients getRecipients() { + return recipients; + } + + public void setRecipients(CreateSmsCampaignRecipients recipients) { + this.recipients = recipients; + } + + public UpdateSmsCampaign scheduledAt(OffsetDateTime scheduledAt) { + this.scheduledAt = scheduledAt; + return this; + } + + /** + * UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. + * @return scheduledAt + **/ + @ApiModelProperty(example = "2017-05-05T12:30:00+02:00", value = "UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result.") + public OffsetDateTime getScheduledAt() { + return scheduledAt; + } + + public void setScheduledAt(OffsetDateTime scheduledAt) { + this.scheduledAt = scheduledAt; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateSmsCampaign updateSmsCampaign = (UpdateSmsCampaign) o; + return ObjectUtils.equals(this.name, updateSmsCampaign.name) && + ObjectUtils.equals(this.sender, updateSmsCampaign.sender) && + ObjectUtils.equals(this.content, updateSmsCampaign.content) && + ObjectUtils.equals(this.recipients, updateSmsCampaign.recipients) && + ObjectUtils.equals(this.scheduledAt, updateSmsCampaign.scheduledAt); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(name, sender, content, recipients, scheduledAt); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateSmsCampaign {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" sender: ").append(toIndentedString(sender)).append("\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" recipients: ").append(toIndentedString(recipients)).append("\n"); + sb.append(" scheduledAt: ").append(toIndentedString(scheduledAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/UpdateSmtpTemplate.java b/src/main/java/sibModel/UpdateSmtpTemplate.java new file mode 100644 index 0000000..8be14a0 --- /dev/null +++ b/src/main/java/sibModel/UpdateSmtpTemplate.java @@ -0,0 +1,301 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import sibModel.UpdateSmtpTemplateSender; + +/** + * UpdateSmtpTemplate + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class UpdateSmtpTemplate { + @SerializedName("tag") + private String tag = null; + + @SerializedName("sender") + private UpdateSmtpTemplateSender sender = null; + + @SerializedName("templateName") + private String templateName = null; + + @SerializedName("htmlContent") + private String htmlContent = null; + + @SerializedName("htmlUrl") + private String htmlUrl = null; + + @SerializedName("subject") + private String subject = null; + + @SerializedName("replyTo") + private String replyTo = null; + + @SerializedName("toField") + private String toField = null; + + @SerializedName("attachmentUrl") + private String attachmentUrl = null; + + @SerializedName("isActive") + private Boolean isActive = null; + + public UpdateSmtpTemplate tag(String tag) { + this.tag = tag; + return this; + } + + /** + * Tag of the template + * @return tag + **/ + @ApiModelProperty(example = "OrderConfirmation", value = "Tag of the template") + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + public UpdateSmtpTemplate sender(UpdateSmtpTemplateSender sender) { + this.sender = sender; + return this; + } + + /** + * Get sender + * @return sender + **/ + @ApiModelProperty(value = "") + public UpdateSmtpTemplateSender getSender() { + return sender; + } + + public void setSender(UpdateSmtpTemplateSender sender) { + this.sender = sender; + } + + public UpdateSmtpTemplate templateName(String templateName) { + this.templateName = templateName; + return this; + } + + /** + * Name of the template + * @return templateName + **/ + @ApiModelProperty(example = "Order Confirmation - EN", value = "Name of the template") + public String getTemplateName() { + return templateName; + } + + public void setTemplateName(String templateName) { + this.templateName = templateName; + } + + public UpdateSmtpTemplate htmlContent(String htmlContent) { + this.htmlContent = htmlContent; + return this; + } + + /** + * Required if htmlUrl is empty. Body of the message (HTML must have more than 10 characters) + * @return htmlContent + **/ + @ApiModelProperty(example = "The order n°xxxxx has been confirmed. Thanks for your purchase", value = "Required if htmlUrl is empty. Body of the message (HTML must have more than 10 characters)") + public String getHtmlContent() { + return htmlContent; + } + + public void setHtmlContent(String htmlContent) { + this.htmlContent = htmlContent; + } + + public UpdateSmtpTemplate htmlUrl(String htmlUrl) { + this.htmlUrl = htmlUrl; + return this; + } + + /** + * Required if htmlContent is empty. URL to the body of the email (HTML) + * @return htmlUrl + **/ + @ApiModelProperty(example = "https://html.domain.com", value = "Required if htmlContent is empty. URL to the body of the email (HTML)") + public String getHtmlUrl() { + return htmlUrl; + } + + public void setHtmlUrl(String htmlUrl) { + this.htmlUrl = htmlUrl; + } + + public UpdateSmtpTemplate subject(String subject) { + this.subject = subject; + return this; + } + + /** + * Subject of the email + * @return subject + **/ + @ApiModelProperty(example = "Thanks for your purchase !", value = "Subject of the email") + public String getSubject() { + return subject; + } + + public void setSubject(String subject) { + this.subject = subject; + } + + public UpdateSmtpTemplate replyTo(String replyTo) { + this.replyTo = replyTo; + return this; + } + + /** + * Email on which campaign recipients will be able to reply to + * @return replyTo + **/ + @ApiModelProperty(example = "support@myshop.com", value = "Email on which campaign recipients will be able to reply to") + public String getReplyTo() { + return replyTo; + } + + public void setReplyTo(String replyTo) { + this.replyTo = replyTo; + } + + public UpdateSmtpTemplate toField(String toField) { + this.toField = toField; + return this; + } + + /** + * To personalize the «To» Field, e.g. if you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These attributes must already exist in contacts database + * @return toField + **/ + @ApiModelProperty(example = "{FNAME} {LNAME}", value = "To personalize the «To» Field, e.g. if you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These attributes must already exist in contacts database") + public String getToField() { + return toField; + } + + public void setToField(String toField) { + this.toField = toField; + } + + public UpdateSmtpTemplate attachmentUrl(String attachmentUrl) { + this.attachmentUrl = attachmentUrl; + return this; + } + + /** + * Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps + * @return attachmentUrl + **/ + @ApiModelProperty(example = "https://attachment.domain.com", value = "Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps") + public String getAttachmentUrl() { + return attachmentUrl; + } + + public void setAttachmentUrl(String attachmentUrl) { + this.attachmentUrl = attachmentUrl; + } + + public UpdateSmtpTemplate isActive(Boolean isActive) { + this.isActive = isActive; + return this; + } + + /** + * Status of the template. isActive = false means template is inactive, isActive = true means template is active + * @return isActive + **/ + @ApiModelProperty(example = "true", value = "Status of the template. isActive = false means template is inactive, isActive = true means template is active") + public Boolean isIsActive() { + return isActive; + } + + public void setIsActive(Boolean isActive) { + this.isActive = isActive; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateSmtpTemplate updateSmtpTemplate = (UpdateSmtpTemplate) o; + return ObjectUtils.equals(this.tag, updateSmtpTemplate.tag) && + ObjectUtils.equals(this.sender, updateSmtpTemplate.sender) && + ObjectUtils.equals(this.templateName, updateSmtpTemplate.templateName) && + ObjectUtils.equals(this.htmlContent, updateSmtpTemplate.htmlContent) && + ObjectUtils.equals(this.htmlUrl, updateSmtpTemplate.htmlUrl) && + ObjectUtils.equals(this.subject, updateSmtpTemplate.subject) && + ObjectUtils.equals(this.replyTo, updateSmtpTemplate.replyTo) && + ObjectUtils.equals(this.toField, updateSmtpTemplate.toField) && + ObjectUtils.equals(this.attachmentUrl, updateSmtpTemplate.attachmentUrl) && + ObjectUtils.equals(this.isActive, updateSmtpTemplate.isActive); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(tag, sender, templateName, htmlContent, htmlUrl, subject, replyTo, toField, attachmentUrl, isActive); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateSmtpTemplate {\n"); + + sb.append(" tag: ").append(toIndentedString(tag)).append("\n"); + sb.append(" sender: ").append(toIndentedString(sender)).append("\n"); + sb.append(" templateName: ").append(toIndentedString(templateName)).append("\n"); + sb.append(" htmlContent: ").append(toIndentedString(htmlContent)).append("\n"); + sb.append(" htmlUrl: ").append(toIndentedString(htmlUrl)).append("\n"); + sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); + sb.append(" replyTo: ").append(toIndentedString(replyTo)).append("\n"); + sb.append(" toField: ").append(toIndentedString(toField)).append("\n"); + sb.append(" attachmentUrl: ").append(toIndentedString(attachmentUrl)).append("\n"); + sb.append(" isActive: ").append(toIndentedString(isActive)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/UpdateSmtpTemplateSender.java b/src/main/java/sibModel/UpdateSmtpTemplateSender.java new file mode 100644 index 0000000..55ece5f --- /dev/null +++ b/src/main/java/sibModel/UpdateSmtpTemplateSender.java @@ -0,0 +1,116 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * UpdateSmtpTemplateSender + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class UpdateSmtpTemplateSender { + @SerializedName("name") + private String name = null; + + @SerializedName("email") + private String email = null; + + public UpdateSmtpTemplateSender name(String name) { + this.name = name; + return this; + } + + /** + * Name of the sender + * @return name + **/ + @ApiModelProperty(example = "Mary from MyShop", value = "Name of the sender") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public UpdateSmtpTemplateSender email(String email) { + this.email = email; + return this; + } + + /** + * Email of the sender + * @return email + **/ + @ApiModelProperty(example = "contact@myshop.com", value = "Email of the sender") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateSmtpTemplateSender updateSmtpTemplateSender = (UpdateSmtpTemplateSender) o; + return ObjectUtils.equals(this.name, updateSmtpTemplateSender.name) && + ObjectUtils.equals(this.email, updateSmtpTemplateSender.email); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(name, email); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateSmtpTemplateSender {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/sibModel/UpdateWebhook.java b/src/main/java/sibModel/UpdateWebhook.java new file mode 100644 index 0000000..1c388f6 --- /dev/null +++ b/src/main/java/sibModel/UpdateWebhook.java @@ -0,0 +1,218 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibModel; + +import org.apache.commons.lang3.ObjectUtils; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * UpdateWebhook + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-02-15T11:12:00.535+05:30") +public class UpdateWebhook { + @SerializedName("url") + private String url = null; + + @SerializedName("description") + private String description = null; + + /** + * Gets or Sets events + */ + @JsonAdapter(EventsEnum.Adapter.class) + public enum EventsEnum { + HARDBOUNCE("hardBounce"), + + SOFTBOUNCE("softBounce"), + + BLOCKED("blocked"), + + SPAM("spam"), + + DELIVERED("delivered"), + + REQUEST("request"), + + CLICK("click"), + + INVALID("invalid"), + + DEFERRED("deferred"), + + OPENED("opened"), + + UNIQUEOPENED("uniqueOpened"), + + UNSUBSCRIBED("unsubscribed"), + + LISTADDITION("listAddition"); + + private String value; + + EventsEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static EventsEnum fromValue(String text) { + for (EventsEnum b : EventsEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final EventsEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public EventsEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return EventsEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("events") + private List events = null; + + public UpdateWebhook url(String url) { + this.url = url; + return this; + } + + /** + * URL of the webhook + * @return url + **/ + @ApiModelProperty(example = "http://requestb.in/173lyyx1", value = "URL of the webhook") + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public UpdateWebhook description(String description) { + this.description = description; + return this; + } + + /** + * Description of the webhook + * @return description + **/ + @ApiModelProperty(example = "Webhook triggered on contact hardbounce", value = "Description of the webhook") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public UpdateWebhook events(List events) { + this.events = events; + return this; + } + + public UpdateWebhook addEventsItem(EventsEnum eventsItem) { + if (this.events == null) { + this.events = new ArrayList(); + } + this.events.add(eventsItem); + return this; + } + + /** + * Events triggering the webhook. Possible values for Transactional type webhook – request, delivered, hardBounce, softBounce, blocked, spam, invalid, deferred, click, opened, uniqueOpened and unsubscribed and possible values for Marketing type webhook – spam, opened, click, hardBounce, softBounce, unsubscribed, listAddition and delivered + * @return events + **/ + @ApiModelProperty(value = "Events triggering the webhook. Possible values for Transactional type webhook – request, delivered, hardBounce, softBounce, blocked, spam, invalid, deferred, click, opened, uniqueOpened and unsubscribed and possible values for Marketing type webhook – spam, opened, click, hardBounce, softBounce, unsubscribed, listAddition and delivered") + public List getEvents() { + return events; + } + + public void setEvents(List events) { + this.events = events; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateWebhook updateWebhook = (UpdateWebhook) o; + return ObjectUtils.equals(this.url, updateWebhook.url) && + ObjectUtils.equals(this.description, updateWebhook.description) && + ObjectUtils.equals(this.events, updateWebhook.events); + } + + @Override + public int hashCode() { + return ObjectUtils.hashCodeMulti(url, description, events); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateWebhook {\n"); + + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" events: ").append(toIndentedString(events)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/test/java/sibApi/AccountApiTest.java b/src/test/java/sibApi/AccountApiTest.java new file mode 100644 index 0000000..99438a4 --- /dev/null +++ b/src/test/java/sibApi/AccountApiTest.java @@ -0,0 +1,50 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibApi; + +import sendinblue.ApiException; +import sibModel.GetAccount; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for AccountApi + */ +@Ignore +public class AccountApiTest { + + private final AccountApi api = new AccountApi(); + + + /** + * Get your account informations, plans and credits details + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getAccountTest() throws ApiException { + GetAccount response = api.getAccount(); + + // TODO: test validations + } + +} diff --git a/src/test/java/sibApi/AttributesApiTest.java b/src/test/java/sibApi/AttributesApiTest.java new file mode 100644 index 0000000..d6d66f7 --- /dev/null +++ b/src/test/java/sibApi/AttributesApiTest.java @@ -0,0 +1,106 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibApi; + +import sendinblue.ApiException; +import sibModel.CreateAttribute; +import sibModel.ErrorModel; +import sibModel.GetAttributes; +import sibModel.UpdateAttribute; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for AttributesApi + */ +@Ignore +public class AttributesApiTest { + + private final AttributesApi api = new AttributesApi(); + + + /** + * Creates contact attribute + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createAttributeTest() throws ApiException { + String attributeCategory = null; + String attributeName = null; + CreateAttribute createAttribute = null; + api.createAttribute(attributeCategory, attributeName, createAttribute); + + // TODO: test validations + } + + /** + * Deletes an attribute + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteAttributeTest() throws ApiException { + String attributeCategory = null; + String attributeName = null; + api.deleteAttribute(attributeCategory, attributeName); + + // TODO: test validations + } + + /** + * Lists all attributes + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getAttributesTest() throws ApiException { + GetAttributes response = api.getAttributes(); + + // TODO: test validations + } + + /** + * Updates contact attribute + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateAttributeTest() throws ApiException { + String attributeCategory = null; + String attributeName = null; + UpdateAttribute updateAttribute = null; + api.updateAttribute(attributeCategory, attributeName, updateAttribute); + + // TODO: test validations + } + +} diff --git a/src/test/java/sibApi/ContactsApiTest.java b/src/test/java/sibApi/ContactsApiTest.java new file mode 100644 index 0000000..833334b --- /dev/null +++ b/src/test/java/sibApi/ContactsApiTest.java @@ -0,0 +1,476 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibApi; + +import sendinblue.ApiException; +import sibModel.AddRemoveContactToList; +import sibModel.CreateAttribute; +import sibModel.CreateContact; +import sibModel.CreateList; +import sibModel.CreateModel; +import sibModel.CreateUpdateFolder; +import sibModel.CreatedProcessId; +import sibModel.ErrorModel; +import sibModel.GetAttributes; +import sibModel.GetContactCampaignStats; +import sibModel.GetContacts; +import sibModel.GetExtendedContactDetails; +import sibModel.GetExtendedList; +import sibModel.GetFolder; +import sibModel.GetFolderLists; +import sibModel.GetFolders; +import sibModel.GetLists; +import org.threeten.bp.OffsetDateTime; +import sibModel.PostContactInfo; +import sibModel.RequestContactExport; +import sibModel.RequestContactImport; +import sibModel.UpdateAttribute; +import sibModel.UpdateContact; +import sibModel.UpdateList; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for ContactsApi + */ +@Ignore +public class ContactsApiTest { + + private final ContactsApi api = new ContactsApi(); + + + /** + * Add existing contacts to a list + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void addContactToListTest() throws ApiException { + Long listId = null; + AddRemoveContactToList contactEmails = null; + PostContactInfo response = api.addContactToList(listId, contactEmails); + + // TODO: test validations + } + + /** + * Creates contact attribute + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createAttributeTest() throws ApiException { + String attributeCategory = null; + String attributeName = null; + CreateAttribute createAttribute = null; + api.createAttribute(attributeCategory, attributeName, createAttribute); + + // TODO: test validations + } + + /** + * Create a contact + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createContactTest() throws ApiException { + CreateContact createContact = null; + CreateModel response = api.createContact(createContact); + + // TODO: test validations + } + + /** + * Create a folder + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createFolderTest() throws ApiException { + CreateUpdateFolder createFolder = null; + CreateModel response = api.createFolder(createFolder); + + // TODO: test validations + } + + /** + * Create a list + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createListTest() throws ApiException { + CreateList createList = null; + CreateModel response = api.createList(createList); + + // TODO: test validations + } + + /** + * Deletes an attribute + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteAttributeTest() throws ApiException { + String attributeCategory = null; + String attributeName = null; + api.deleteAttribute(attributeCategory, attributeName); + + // TODO: test validations + } + + /** + * Delete a folder (and all its lists) + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteFolderTest() throws ApiException { + Long folderId = null; + api.deleteFolder(folderId); + + // TODO: test validations + } + + /** + * Delete a list + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteListTest() throws ApiException { + Long listId = null; + api.deleteList(listId); + + // TODO: test validations + } + + /** + * Lists all attributes + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getAttributesTest() throws ApiException { + GetAttributes response = api.getAttributes(); + + // TODO: test validations + } + + /** + * Retrieves contact informations + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getContactInfoTest() throws ApiException { + String email = null; + GetExtendedContactDetails response = api.getContactInfo(email); + + // TODO: test validations + } + + /** + * Get the campaigns statistics for a contact + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getContactStatsTest() throws ApiException { + String email = null; + GetContactCampaignStats response = api.getContactStats(email); + + // TODO: test validations + } + + /** + * Get all the contacts + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getContactsTest() throws ApiException { + Long limit = null; + Long offset = null; + OffsetDateTime modifiedSince = null; + GetContacts response = api.getContacts(limit, offset, modifiedSince); + + // TODO: test validations + } + + /** + * Get the contacts in a list + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getContactsFromListTest() throws ApiException { + Long listId = null; + OffsetDateTime modifiedSince = null; + Long limit = null; + Long offset = null; + GetContacts response = api.getContactsFromList(listId, modifiedSince, limit, offset); + + // TODO: test validations + } + + /** + * Returns folder details + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getFolderTest() throws ApiException { + Long folderId = null; + GetFolder response = api.getFolder(folderId); + + // TODO: test validations + } + + /** + * Get the lists in a folder + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getFolderListsTest() throws ApiException { + Long folderId = null; + Long limit = null; + Long offset = null; + GetFolderLists response = api.getFolderLists(folderId, limit, offset); + + // TODO: test validations + } + + /** + * Get all the folders + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getFoldersTest() throws ApiException { + Long limit = null; + Long offset = null; + GetFolders response = api.getFolders(limit, offset); + + // TODO: test validations + } + + /** + * Get the details of a list + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getListTest() throws ApiException { + Long listId = null; + GetExtendedList response = api.getList(listId); + + // TODO: test validations + } + + /** + * Get all the lists + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getListsTest() throws ApiException { + Long limit = null; + Long offset = null; + GetLists response = api.getLists(limit, offset); + + // TODO: test validations + } + + /** + * Import contacts + * + * It returns the background process ID which on completion calls the notify URL that you have set in the input. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void importContactsTest() throws ApiException { + RequestContactImport requestContactImport = null; + CreatedProcessId response = api.importContacts(requestContactImport); + + // TODO: test validations + } + + /** + * Remove existing contacts from a list + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void removeContactToListTest() throws ApiException { + Long listId = null; + AddRemoveContactToList contactEmails = null; + PostContactInfo response = api.removeContactToList(listId, contactEmails); + + // TODO: test validations + } + + /** + * Export contacts + * + * It returns the background process ID which on completion calls the notify URL that you have set in the input. File will be available in csv. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void requestContactExportTest() throws ApiException { + RequestContactExport requestContactExport = null; + CreatedProcessId response = api.requestContactExport(requestContactExport); + + // TODO: test validations + } + + /** + * Updates contact attribute + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateAttributeTest() throws ApiException { + String attributeCategory = null; + String attributeName = null; + UpdateAttribute updateAttribute = null; + api.updateAttribute(attributeCategory, attributeName, updateAttribute); + + // TODO: test validations + } + + /** + * Updates a contact + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateContactTest() throws ApiException { + String email = null; + UpdateContact updateContact = null; + api.updateContact(email, updateContact); + + // TODO: test validations + } + + /** + * Update a contact folder + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateFolderTest() throws ApiException { + Long folderId = null; + CreateUpdateFolder updateFolder = null; + api.updateFolder(folderId, updateFolder); + + // TODO: test validations + } + + /** + * Update a list + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateListTest() throws ApiException { + Long listId = null; + UpdateList updateList = null; + api.updateList(listId, updateList); + + // TODO: test validations + } + +} diff --git a/src/test/java/sibApi/EmailCampaignsApiTest.java b/src/test/java/sibApi/EmailCampaignsApiTest.java new file mode 100644 index 0000000..f7f4562 --- /dev/null +++ b/src/test/java/sibApi/EmailCampaignsApiTest.java @@ -0,0 +1,214 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibApi; + +import sendinblue.ApiException; +import sibModel.CreateEmailCampaign; +import sibModel.CreateModel; +import sibModel.CreatedProcessId; +import sibModel.EmailExportRecipients; +import sibModel.ErrorModel; +import sibModel.GetEmailCampaign; +import sibModel.GetEmailCampaigns; +import sibModel.PostSendFailed; +import sibModel.SendReport; +import sibModel.SendTestEmail; +import sibModel.UpdateCampaignStatus; +import sibModel.UpdateEmailCampaign; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for EmailCampaignsApi + */ +@Ignore +public class EmailCampaignsApiTest { + + private final EmailCampaignsApi api = new EmailCampaignsApi(); + + + /** + * Create an email campaign + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createEmailCampaignTest() throws ApiException { + CreateEmailCampaign emailCampaigns = null; + CreateModel response = api.createEmailCampaign(emailCampaigns); + + // TODO: test validations + } + + /** + * Delete an email campaign + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteEmailCampaignTest() throws ApiException { + Long campaignId = null; + api.deleteEmailCampaign(campaignId); + + // TODO: test validations + } + + /** + * Export the recipients of a campaign + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void emailExportRecipientsTest() throws ApiException { + Long campaignId = null; + EmailExportRecipients recipientExport = null; + CreatedProcessId response = api.emailExportRecipients(campaignId, recipientExport); + + // TODO: test validations + } + + /** + * Get campaign informations + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getEmailCampaignTest() throws ApiException { + Long campaignId = null; + GetEmailCampaign response = api.getEmailCampaign(campaignId); + + // TODO: test validations + } + + /** + * Return all your created campaigns + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getEmailCampaignsTest() throws ApiException { + String type = null; + String status = null; + Long limit = null; + Long offset = null; + GetEmailCampaigns response = api.getEmailCampaigns(type, status, limit, offset); + + // TODO: test validations + } + + /** + * Send an email campaign id of the campaign immediately + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void sendEmailCampaignNowTest() throws ApiException { + Long campaignId = null; + api.sendEmailCampaignNow(campaignId); + + // TODO: test validations + } + + /** + * Send the report of a campaigns + * + * A PDF will be sent to the specified email addresses + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void sendReportTest() throws ApiException { + Long campaignId = null; + SendReport sendReport = null; + api.sendReport(campaignId, sendReport); + + // TODO: test validations + } + + /** + * Send an email campaign to your test list + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void sendTestEmailTest() throws ApiException { + Long campaignId = null; + SendTestEmail emailTo = null; + api.sendTestEmail(campaignId, emailTo); + + // TODO: test validations + } + + /** + * Update a campaign status + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateCampaignStatusTest() throws ApiException { + Long campaignId = null; + UpdateCampaignStatus status = null; + api.updateCampaignStatus(campaignId, status); + + // TODO: test validations + } + + /** + * Update a campaign + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateEmailCampaignTest() throws ApiException { + Long campaignId = null; + UpdateEmailCampaign emailCampaign = null; + api.updateEmailCampaign(campaignId, emailCampaign); + + // TODO: test validations + } + +} diff --git a/src/test/java/sibApi/FoldersApiTest.java b/src/test/java/sibApi/FoldersApiTest.java new file mode 100644 index 0000000..8b59ad6 --- /dev/null +++ b/src/test/java/sibApi/FoldersApiTest.java @@ -0,0 +1,140 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibApi; + +import sendinblue.ApiException; +import sibModel.CreateModel; +import sibModel.CreateUpdateFolder; +import sibModel.ErrorModel; +import sibModel.GetFolder; +import sibModel.GetFolderLists; +import sibModel.GetFolders; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for FoldersApi + */ +@Ignore +public class FoldersApiTest { + + private final FoldersApi api = new FoldersApi(); + + + /** + * Create a folder + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createFolderTest() throws ApiException { + CreateUpdateFolder createFolder = null; + CreateModel response = api.createFolder(createFolder); + + // TODO: test validations + } + + /** + * Delete a folder (and all its lists) + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteFolderTest() throws ApiException { + Long folderId = null; + api.deleteFolder(folderId); + + // TODO: test validations + } + + /** + * Returns folder details + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getFolderTest() throws ApiException { + Long folderId = null; + GetFolder response = api.getFolder(folderId); + + // TODO: test validations + } + + /** + * Get the lists in a folder + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getFolderListsTest() throws ApiException { + Long folderId = null; + Long limit = null; + Long offset = null; + GetFolderLists response = api.getFolderLists(folderId, limit, offset); + + // TODO: test validations + } + + /** + * Get all the folders + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getFoldersTest() throws ApiException { + Long limit = null; + Long offset = null; + GetFolders response = api.getFolders(limit, offset); + + // TODO: test validations + } + + /** + * Update a contact folder + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateFolderTest() throws ApiException { + Long folderId = null; + CreateUpdateFolder updateFolder = null; + api.updateFolder(folderId, updateFolder); + + // TODO: test validations + } + +} diff --git a/src/test/java/sibApi/ListsApiTest.java b/src/test/java/sibApi/ListsApiTest.java new file mode 100644 index 0000000..e9ddc41 --- /dev/null +++ b/src/test/java/sibApi/ListsApiTest.java @@ -0,0 +1,198 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibApi; + +import sendinblue.ApiException; +import sibModel.AddRemoveContactToList; +import sibModel.CreateList; +import sibModel.CreateModel; +import sibModel.ErrorModel; +import sibModel.GetContacts; +import sibModel.GetExtendedList; +import sibModel.GetFolderLists; +import sibModel.GetLists; +import org.threeten.bp.OffsetDateTime; +import sibModel.PostContactInfo; +import sibModel.UpdateList; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for ListsApi + */ +@Ignore +public class ListsApiTest { + + private final ListsApi api = new ListsApi(); + + + /** + * Add existing contacts to a list + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void addContactToListTest() throws ApiException { + Long listId = null; + AddRemoveContactToList contactEmails = null; + PostContactInfo response = api.addContactToList(listId, contactEmails); + + // TODO: test validations + } + + /** + * Create a list + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createListTest() throws ApiException { + CreateList createList = null; + CreateModel response = api.createList(createList); + + // TODO: test validations + } + + /** + * Delete a list + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteListTest() throws ApiException { + Long listId = null; + api.deleteList(listId); + + // TODO: test validations + } + + /** + * Get the contacts in a list + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getContactsFromListTest() throws ApiException { + Long listId = null; + OffsetDateTime modifiedSince = null; + Long limit = null; + Long offset = null; + GetContacts response = api.getContactsFromList(listId, modifiedSince, limit, offset); + + // TODO: test validations + } + + /** + * Get the lists in a folder + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getFolderListsTest() throws ApiException { + Long folderId = null; + Long limit = null; + Long offset = null; + GetFolderLists response = api.getFolderLists(folderId, limit, offset); + + // TODO: test validations + } + + /** + * Get the details of a list + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getListTest() throws ApiException { + Long listId = null; + GetExtendedList response = api.getList(listId); + + // TODO: test validations + } + + /** + * Get all the lists + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getListsTest() throws ApiException { + Long limit = null; + Long offset = null; + GetLists response = api.getLists(limit, offset); + + // TODO: test validations + } + + /** + * Remove existing contacts from a list + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void removeContactToListTest() throws ApiException { + Long listId = null; + AddRemoveContactToList contactEmails = null; + PostContactInfo response = api.removeContactToList(listId, contactEmails); + + // TODO: test validations + } + + /** + * Update a list + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateListTest() throws ApiException { + Long listId = null; + UpdateList updateList = null; + api.updateList(listId, updateList); + + // TODO: test validations + } + +} diff --git a/src/test/java/sibApi/ProcessApiTest.java b/src/test/java/sibApi/ProcessApiTest.java new file mode 100644 index 0000000..6156ca6 --- /dev/null +++ b/src/test/java/sibApi/ProcessApiTest.java @@ -0,0 +1,70 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibApi; + +import sendinblue.ApiException; +import sibModel.ErrorModel; +import sibModel.GetProcess; +import sibModel.GetProcesses; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for ProcessApi + */ +@Ignore +public class ProcessApiTest { + + private final ProcessApi api = new ProcessApi(); + + + /** + * Return the informations for a process + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getProcessTest() throws ApiException { + Long processId = null; + GetProcess response = api.getProcess(processId); + + // TODO: test validations + } + + /** + * Return all the processes for your account + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getProcessesTest() throws ApiException { + Long limit = null; + Long offset = null; + GetProcesses response = api.getProcesses(limit, offset); + + // TODO: test validations + } + +} diff --git a/src/test/java/sibApi/ResellerApiTest.java b/src/test/java/sibApi/ResellerApiTest.java new file mode 100644 index 0000000..e1b2e67 --- /dev/null +++ b/src/test/java/sibApi/ResellerApiTest.java @@ -0,0 +1,192 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibApi; + +import sendinblue.ApiException; +import sibModel.AddCredits; +import sibModel.CreateChild; +import sibModel.CreateReseller; +import sibModel.ErrorModel; +import sibModel.GetChildInfo; +import sibModel.GetChildrenList; +import sibModel.ManageIp; +import sibModel.RemainingCreditModel; +import sibModel.RemoveCredits; +import sibModel.UpdateChild; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for ResellerApi + */ +@Ignore +public class ResellerApiTest { + + private final ResellerApi api = new ResellerApi(); + + + /** + * Add Email and/or SMS credits to a specific child account + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void addCreditsTest() throws ApiException { + String childAuthKey = null; + AddCredits addCredits = null; + RemainingCreditModel response = api.addCredits(childAuthKey, addCredits); + + // TODO: test validations + } + + /** + * Associate a dedicated IP to the child + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void associateIpToChildTest() throws ApiException { + String childAuthKey = null; + ManageIp ip = null; + api.associateIpToChild(childAuthKey, ip); + + // TODO: test validations + } + + /** + * Creates a reseller child + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createResellerChildTest() throws ApiException { + CreateChild resellerChild = null; + CreateReseller response = api.createResellerChild(resellerChild); + + // TODO: test validations + } + + /** + * Deletes a single reseller child based on the childAuthKey supplied + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteResellerChildTest() throws ApiException { + String childAuthKey = null; + api.deleteResellerChild(childAuthKey); + + // TODO: test validations + } + + /** + * Dissociate a dedicated IP to the child + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void dissociateIpFromChildTest() throws ApiException { + String childAuthKey = null; + ManageIp ip = null; + api.dissociateIpFromChild(childAuthKey, ip); + + // TODO: test validations + } + + /** + * Gets the info about a specific child account + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getChildInfoTest() throws ApiException { + String childAuthKey = null; + GetChildInfo response = api.getChildInfo(childAuthKey); + + // TODO: test validations + } + + /** + * Gets the list of all reseller's children accounts + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getResellerChildsTest() throws ApiException { + GetChildrenList response = api.getResellerChilds(); + + // TODO: test validations + } + + /** + * Remove Email and/or SMS credits from a specific child account + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void removeCreditsTest() throws ApiException { + String childAuthKey = null; + RemoveCredits removeCredits = null; + RemainingCreditModel response = api.removeCredits(childAuthKey, removeCredits); + + // TODO: test validations + } + + /** + * Updates infos of reseller's child based on the childAuthKey supplied + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateResellerChildTest() throws ApiException { + String childAuthKey = null; + UpdateChild resellerChild = null; + api.updateResellerChild(childAuthKey, resellerChild); + + // TODO: test validations + } + +} diff --git a/src/test/java/sibApi/SendersApiTest.java b/src/test/java/sibApi/SendersApiTest.java new file mode 100644 index 0000000..3ce9273 --- /dev/null +++ b/src/test/java/sibApi/SendersApiTest.java @@ -0,0 +1,138 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibApi; + +import sendinblue.ApiException; +import sibModel.CreateSender; +import sibModel.CreateSenderModel; +import sibModel.ErrorModel; +import sibModel.GetIps; +import sibModel.GetIpsFromSender; +import sibModel.GetSendersList; +import sibModel.UpdateSender; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for SendersApi + */ +@Ignore +public class SendersApiTest { + + private final SendersApi api = new SendersApi(); + + + /** + * Create a new sender + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createSenderTest() throws ApiException { + CreateSender sender = null; + CreateSenderModel response = api.createSender(sender); + + // TODO: test validations + } + + /** + * Delete a sender + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteSenderTest() throws ApiException { + Long senderId = null; + api.deleteSender(senderId); + + // TODO: test validations + } + + /** + * Return all the dedicated IPs for your account + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getIpsTest() throws ApiException { + GetIps response = api.getIps(); + + // TODO: test validations + } + + /** + * Return all the dedicated IPs for a sender + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getIpsFromSenderTest() throws ApiException { + Long senderId = null; + GetIpsFromSender response = api.getIpsFromSender(senderId); + + // TODO: test validations + } + + /** + * Get the list of all your senders + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getSendersTest() throws ApiException { + String ip = null; + String domain = null; + GetSendersList response = api.getSenders(ip, domain); + + // TODO: test validations + } + + /** + * Update a sender + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateSenderTest() throws ApiException { + Long senderId = null; + UpdateSender sender = null; + api.updateSender(senderId, sender); + + // TODO: test validations + } + +} diff --git a/src/test/java/sibApi/SmsCampaignsApiTest.java b/src/test/java/sibApi/SmsCampaignsApiTest.java new file mode 100644 index 0000000..ef83c69 --- /dev/null +++ b/src/test/java/sibApi/SmsCampaignsApiTest.java @@ -0,0 +1,214 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibApi; + +import sendinblue.ApiException; +import sibModel.CreateModel; +import sibModel.CreateSmsCampaign; +import sibModel.CreatedProcessId; +import sibModel.ErrorModel; +import sibModel.GetSmsCampaign; +import sibModel.GetSmsCampaigns; +import sibModel.PostSendSmsTestFailed; +import sibModel.RequestSmsRecipientExport; +import sibModel.SendReport; +import sibModel.SendTestSms; +import sibModel.UpdateCampaignStatus; +import sibModel.UpdateSmsCampaign; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for SmsCampaignsApi + */ +@Ignore +public class SmsCampaignsApiTest { + + private final SmsCampaignsApi api = new SmsCampaignsApi(); + + + /** + * Creates an SMS campaign + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createSmsCampaignTest() throws ApiException { + CreateSmsCampaign createSmsCampaign = null; + CreateModel response = api.createSmsCampaign(createSmsCampaign); + + // TODO: test validations + } + + /** + * Delete the SMS campaign + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteSmsCampaignTest() throws ApiException { + Long campaignId = null; + api.deleteSmsCampaign(campaignId); + + // TODO: test validations + } + + /** + * Get an SMS campaign + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getSmsCampaignTest() throws ApiException { + Long campaignId = null; + GetSmsCampaign getSmsCampaign = null; + GetSmsCampaign response = api.getSmsCampaign(campaignId, getSmsCampaign); + + // TODO: test validations + } + + /** + * Returns the informations for all your created SMS campaigns + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getSmsCampaignsTest() throws ApiException { + String status = null; + Long limit = null; + Long offset = null; + GetSmsCampaigns response = api.getSmsCampaigns(status, limit, offset); + + // TODO: test validations + } + + /** + * Exports the recipients of the specified campaign. + * + * It returns the background process ID which on completion calls the notify URL that you have set in the input. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void requestSmsRecipientExportTest() throws ApiException { + Long campaignId = null; + RequestSmsRecipientExport recipientExport = null; + CreatedProcessId response = api.requestSmsRecipientExport(campaignId, recipientExport); + + // TODO: test validations + } + + /** + * Send your SMS campaign immediately + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void sendSmsCampaignNowTest() throws ApiException { + Long campaignId = null; + api.sendSmsCampaignNow(campaignId); + + // TODO: test validations + } + + /** + * Send report of SMS campaigns + * + * Send report of Sent and Archived campaign, to the specified email addresses, with respective data and a pdf attachment in detail. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void sendSmsReportTest() throws ApiException { + Long campaignId = null; + SendReport sendReport = null; + api.sendSmsReport(campaignId, sendReport); + + // TODO: test validations + } + + /** + * Send an SMS + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void sendTestSmsTest() throws ApiException { + Long campaignId = null; + SendTestSms sendTestSms = null; + api.sendTestSms(campaignId, sendTestSms); + + // TODO: test validations + } + + /** + * Updates an SMS campaign + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateSmsCampaignTest() throws ApiException { + Long campaignId = null; + UpdateSmsCampaign updateSmsCampaign = null; + api.updateSmsCampaign(campaignId, updateSmsCampaign); + + // TODO: test validations + } + + /** + * Update the campaign status + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateSmsCampaignStatusTest() throws ApiException { + Long campaignId = null; + UpdateCampaignStatus status = null; + api.updateSmsCampaignStatus(campaignId, status); + + // TODO: test validations + } + +} diff --git a/src/test/java/sibApi/SmtpApiTest.java b/src/test/java/sibApi/SmtpApiTest.java new file mode 100644 index 0000000..88f3338 --- /dev/null +++ b/src/test/java/sibApi/SmtpApiTest.java @@ -0,0 +1,265 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibApi; + +import sendinblue.ApiException; +import sibModel.CreateModel; +import sibModel.CreateSmtpEmail; +import sibModel.CreateSmtpTemplate; +import sibModel.DeleteHardbounces; +import sibModel.ErrorModel; +import sibModel.GetAggregatedReport; +import sibModel.GetEmailEventReport; +import sibModel.GetReports; +import sibModel.GetSmtpTemplateOverview; +import sibModel.GetSmtpTemplates; +import org.threeten.bp.LocalDate; +import sibModel.PostSendFailed; +import sibModel.SendEmail; +import sibModel.SendSmtpEmail; +import sibModel.SendTemplateEmail; +import sibModel.SendTestEmail; +import sibModel.UpdateSmtpTemplate; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for SmtpApi + */ +@Ignore +public class SmtpApiTest { + + private final SmtpApi api = new SmtpApi(); + + + /** + * Create an smtp template + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createSmtpTemplateTest() throws ApiException { + CreateSmtpTemplate smtpTemplate = null; + CreateModel response = api.createSmtpTemplate(smtpTemplate); + + // TODO: test validations + } + + /** + * Delete hardbounces + * + * Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteHardbouncesTest() throws ApiException { + DeleteHardbounces deleteHardbounces = null; + api.deleteHardbounces(deleteHardbounces); + + // TODO: test validations + } + + /** + * Delete an inactive smtp template + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteSmtpTemplateTest() throws ApiException { + Long templateId = null; + api.deleteSmtpTemplate(templateId); + + // TODO: test validations + } + + /** + * Get your SMTP activity aggregated over a period of time + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getAggregatedSmtpReportTest() throws ApiException { + LocalDate startDate = null; + LocalDate endDate = null; + Integer days = null; + String tag = null; + GetAggregatedReport response = api.getAggregatedSmtpReport(startDate, endDate, days, tag); + + // TODO: test validations + } + + /** + * Get all your SMTP activity (unaggregated events) + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getEmailEventReportTest() throws ApiException { + Long limit = null; + Long offset = null; + LocalDate startDate = null; + LocalDate endDate = null; + Integer days = null; + String email = null; + String event = null; + String tags = null; + String messageId = null; + Long templateId = null; + GetEmailEventReport response = api.getEmailEventReport(limit, offset, startDate, endDate, days, email, event, tags, messageId, templateId); + + // TODO: test validations + } + + /** + * Get your SMTP activity aggregated per day + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getSmtpReportTest() throws ApiException { + Long limit = null; + Long offset = null; + LocalDate startDate = null; + LocalDate endDate = null; + Integer days = null; + String tag = null; + GetReports response = api.getSmtpReport(limit, offset, startDate, endDate, days, tag); + + // TODO: test validations + } + + /** + * Returns the template informations + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getSmtpTemplateTest() throws ApiException { + Long templateId = null; + GetSmtpTemplateOverview response = api.getSmtpTemplate(templateId); + + // TODO: test validations + } + + /** + * Get the list of SMTP templates + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getSmtpTemplatesTest() throws ApiException { + Boolean templateStatus = null; + Long limit = null; + Long offset = null; + GetSmtpTemplates response = api.getSmtpTemplates(templateStatus, limit, offset); + + // TODO: test validations + } + + /** + * Send a template + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void sendTemplateTest() throws ApiException { + Long templateId = null; + SendEmail sendEmail = null; + SendTemplateEmail response = api.sendTemplate(templateId, sendEmail); + + // TODO: test validations + } + + /** + * Send a template to your test list + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void sendTestTemplateTest() throws ApiException { + Long templateId = null; + SendTestEmail sendTestEmail = null; + api.sendTestTemplate(templateId, sendTestEmail); + + // TODO: test validations + } + + /** + * Send a transactional email + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void sendTransacEmailTest() throws ApiException { + SendSmtpEmail sendSmtpEmail = null; + CreateSmtpEmail response = api.sendTransacEmail(sendSmtpEmail); + + // TODO: test validations + } + + /** + * Updates an smtp templates + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateSmtpTemplateTest() throws ApiException { + Long templateId = null; + UpdateSmtpTemplate smtpTemplate = null; + api.updateSmtpTemplate(templateId, smtpTemplate); + + // TODO: test validations + } + +} diff --git a/src/test/java/sibApi/TransactionalSmsApiTest.java b/src/test/java/sibApi/TransactionalSmsApiTest.java new file mode 100644 index 0000000..aaa5f12 --- /dev/null +++ b/src/test/java/sibApi/TransactionalSmsApiTest.java @@ -0,0 +1,118 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibApi; + +import sendinblue.ApiException; +import sibModel.ErrorModel; +import sibModel.GetSmsEventReport; +import sibModel.GetTransacAggregatedSmsReport; +import sibModel.GetTransacSmsReport; +import org.threeten.bp.LocalDate; +import sibModel.SendSms; +import sibModel.SendTransacSms; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for TransactionalSmsApi + */ +@Ignore +public class TransactionalSmsApiTest { + + private final TransactionalSmsApi api = new TransactionalSmsApi(); + + + /** + * Get all the SMS activity (unaggregated events) + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getSmsEventsTest() throws ApiException { + Long limit = null; + LocalDate startDate = null; + LocalDate endDate = null; + Long offset = null; + Integer days = null; + String phoneNumber = null; + String event = null; + String tags = null; + GetSmsEventReport response = api.getSmsEvents(limit, startDate, endDate, offset, days, phoneNumber, event, tags); + + // TODO: test validations + } + + /** + * Get your SMS activity aggregated over a period of time + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getTransacAggregatedSmsReportTest() throws ApiException { + LocalDate startDate = null; + LocalDate endDate = null; + Integer days = null; + String tag = null; + GetTransacAggregatedSmsReport response = api.getTransacAggregatedSmsReport(startDate, endDate, days, tag); + + // TODO: test validations + } + + /** + * Get your SMS activity aggregated per day + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getTransacSmsReportTest() throws ApiException { + LocalDate startDate = null; + LocalDate endDate = null; + Integer days = null; + String tag = null; + GetTransacSmsReport response = api.getTransacSmsReport(startDate, endDate, days, tag); + + // TODO: test validations + } + + /** + * Send the SMS campaign to the specified mobile number + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void sendTransacSmsTest() throws ApiException { + SendTransacSms sendTransacSms = null; + SendSms response = api.sendTransacSms(sendTransacSms); + + // TODO: test validations + } + +} diff --git a/src/test/java/sibApi/WebhooksApiTest.java b/src/test/java/sibApi/WebhooksApiTest.java new file mode 100644 index 0000000..c97ba14 --- /dev/null +++ b/src/test/java/sibApi/WebhooksApiTest.java @@ -0,0 +1,121 @@ +/* + * SendinBlue API + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | + * + * OpenAPI spec version: 3.0.0 + * Contact: contact@sendinblue.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package sibApi; + +import sendinblue.ApiException; +import sibModel.CreateModel; +import sibModel.CreateWebhook; +import sibModel.ErrorModel; +import sibModel.GetWebhook; +import sibModel.GetWebhooks; +import sibModel.UpdateWebhook; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for WebhooksApi + */ +@Ignore +public class WebhooksApiTest { + + private final WebhooksApi api = new WebhooksApi(); + + + /** + * Create a webhook + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createWebhookTest() throws ApiException { + CreateWebhook createWebhook = null; + CreateModel response = api.createWebhook(createWebhook); + + // TODO: test validations + } + + /** + * Delete a webhook + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteWebhookTest() throws ApiException { + Long webhookId = null; + api.deleteWebhook(webhookId); + + // TODO: test validations + } + + /** + * Get a webhook details + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getWebhookTest() throws ApiException { + Long webhookId = null; + GetWebhook response = api.getWebhook(webhookId); + + // TODO: test validations + } + + /** + * Get all webhooks + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getWebhooksTest() throws ApiException { + String type = null; + GetWebhooks response = api.getWebhooks(type); + + // TODO: test validations + } + + /** + * Update a webhook + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateWebhookTest() throws ApiException { + Long webhookId = null; + UpdateWebhook updateWebhook = null; + api.updateWebhook(webhookId, updateWebhook); + + // TODO: test validations + } + +}