From d0fafcbcc3857da5be06bf39b777f899c7032562 Mon Sep 17 00:00:00 2001 From: amitsendinblue Date: Fri, 29 Mar 2019 15:54:18 +0530 Subject: [PATCH 1/2] csharp wrapper generated for swagger-codegen cli version 2.4.4 --- .gitignore | 186 + .swagger-codegen-ignore | 23 + .swagger-codegen/VERSION | 1 + LICENSE.md | 21 + README.md | 383 +- docs/AccountApi.md | 73 + docs/AddContactToList.md | 9 + docs/AddCredits.md | 10 + docs/AttributesApi.md | 287 + docs/ContactsApi.md | 1831 ++++++ docs/CreateAttribute.md | 11 + docs/CreateAttributeEnumeration.md | 10 + docs/CreateChild.md | 13 + docs/CreateContact.md | 15 + docs/CreateEmailCampaign.md | 33 + docs/CreateEmailCampaignRecipients.md | 10 + docs/CreateEmailCampaignSender.md | 10 + docs/CreateList.md | 10 + docs/CreateModel.md | 9 + docs/CreateReseller.md | 9 + docs/CreateSender.md | 11 + docs/CreateSenderIps.md | 11 + docs/CreateSenderModel.md | 11 + docs/CreateSmsCampaign.md | 13 + docs/CreateSmsCampaignRecipients.md | 10 + docs/CreateSmtpEmail.md | 9 + docs/CreateSmtpTemplate.md | 18 + docs/CreateSmtpTemplateSender.md | 10 + docs/CreateUpdateContactModel.md | 9 + docs/CreateUpdateFolder.md | 9 + docs/CreateWebhook.md | 12 + docs/CreatedProcessId.md | 9 + docs/DeleteHardbounces.md | 11 + docs/EmailCampaignsApi.md | 714 +++ docs/EmailExportRecipients.md | 10 + docs/ErrorModel.md | 10 + docs/FoldersApi.md | 428 ++ docs/GetAccount.md | 16 + docs/GetAccountMarketingAutomation.md | 10 + docs/GetAccountPlan.md | 14 + docs/GetAccountRelay.md | 10 + docs/GetAccountRelayData.md | 11 + docs/GetAggregatedReport.md | 21 + docs/GetAttributes.md | 9 + docs/GetAttributesAttributes.md | 13 + docs/GetAttributesEnumeration.md | 10 + docs/GetCampaignOverview.md | 21 + docs/GetCampaignRecipients.md | 10 + docs/GetCampaignStats.md | 20 + docs/GetChildInfo.md | 17 + docs/GetChildInfoApiKeys.md | 10 + docs/GetChildInfoApiKeysV2.md | 10 + docs/GetChildInfoApiKeysV3.md | 10 + docs/GetChildInfoCredits.md | 10 + docs/GetChildInfoStatistics.md | 11 + docs/GetChildrenList.md | 9 + docs/GetClient.md | 12 + docs/GetContactCampaignStats.md | 16 + docs/GetContactCampaignStatsClicked.md | 10 + docs/GetContactCampaignStatsOpened.md | 12 + ...etContactCampaignStatsTransacAttributes.md | 11 + .../GetContactCampaignStatsUnsubscriptions.md | 10 + docs/GetContactDetails.md | 17 + docs/GetContacts.md | 10 + docs/GetEmailCampaign.md | 38 + docs/GetEmailCampaigns.md | 10 + docs/GetEmailEventReport.md | 9 + docs/GetEmailEventReportEvents.md | 18 + docs/GetExtendedCampaignOverview.md | 36 + docs/GetExtendedCampaignOverviewSender.md | 10 + docs/GetExtendedCampaignStats.md | 14 + docs/GetExtendedClient.md | 13 + docs/GetExtendedClientAddress.md | 12 + docs/GetExtendedContactDetails.md | 18 + docs/GetExtendedContactDetailsStatistics.md | 16 + ...ExtendedContactDetailsStatisticsClicked.md | 10 + ...etExtendedContactDetailsStatisticsLinks.md | 12 + ...dedContactDetailsStatisticsMessagesSent.md | 10 + ...tExtendedContactDetailsStatisticsOpened.md | 12 + ...ContactDetailsStatisticsUnsubscriptions.md | 10 + ...sticsUnsubscriptionsAdminUnsubscription.md | 10 + ...isticsUnsubscriptionsUserUnsubscription.md | 11 + docs/GetExtendedList.md | 16 + docs/GetExtendedListCampaignStats.md | 10 + docs/GetFolder.md | 13 + docs/GetFolderLists.md | 10 + docs/GetFolders.md | 10 + docs/GetIp.md | 12 + docs/GetIpFromSender.md | 12 + docs/GetIps.md | 9 + docs/GetIpsFromSender.md | 9 + docs/GetList.md | 12 + docs/GetLists.md | 10 + docs/GetProcess.md | 12 + docs/GetProcesses.md | 10 + docs/GetReports.md | 9 + docs/GetReportsReports.md | 21 + docs/GetSendersList.md | 9 + docs/GetSendersListIps.md | 11 + docs/GetSendersListSenders.md | 13 + docs/GetSmsCampaign.md | 18 + docs/GetSmsCampaignOverview.md | 16 + docs/GetSmsCampaignStats.md | 15 + docs/GetSmsCampaigns.md | 10 + docs/GetSmsEventReport.md | 9 + docs/GetSmsEventReportEvents.md | 15 + docs/GetSmtpTemplateOverview.md | 20 + docs/GetSmtpTemplateOverviewSender.md | 10 + docs/GetSmtpTemplates.md | 10 + docs/GetStatsByDomain.md | 8 + docs/GetTransacAggregatedSmsReport.md | 18 + docs/GetTransacSmsReport.md | 9 + docs/GetTransacSmsReportReports.md | 18 + docs/GetWebhook.md | 15 + docs/GetWebhooks.md | 9 + docs/ListsApi.md | 645 ++ docs/ManageIp.md | 9 + docs/PostContactInfo.md | 9 + docs/PostContactInfoContacts.md | 11 + docs/PostSendFailed.md | 13 + docs/PostSendSmsTestFailed.md | 12 + docs/ProcessApi.md | 148 + docs/RemainingCreditModel.md | 10 + docs/RemainingCreditModelChild.md | 10 + docs/RemainingCreditModelReseller.md | 10 + docs/RemoveContactFromList.md | 10 + docs/RemoveCredits.md | 10 + docs/RequestContactExport.md | 11 + docs/RequestContactImport.md | 17 + docs/RequestContactImportNewList.md | 10 + docs/RequestSmsRecipientExport.md | 10 + docs/ResellerApi.md | 631 ++ docs/SMSCampaignsApi.md | 714 +++ docs/SMTPApi.md | 880 +++ docs/SendEmail.md | 17 + docs/SendEmailAttachment.md | 10 + docs/SendReport.md | 10 + docs/SendReportEmail.md | 14 + docs/SendSms.md | 13 + docs/SendSmtpEmail.md | 21 + docs/SendSmtpEmailAttachment.md | 11 + docs/SendSmtpEmailBcc.md | 10 + docs/SendSmtpEmailCc.md | 10 + docs/SendSmtpEmailReplyTo.md | 10 + docs/SendSmtpEmailSender.md | 10 + docs/SendSmtpEmailTo.md | 10 + docs/SendTemplateEmail.md | 9 + docs/SendTestEmail.md | 9 + docs/SendTestSms.md | 9 + docs/SendTransacSms.md | 14 + docs/SendersApi.md | 420 ++ docs/TransactionalSMSApi.md | 310 + docs/UpdateAttribute.md | 10 + docs/UpdateAttributeEnumeration.md | 10 + docs/UpdateCampaignStatus.md | 9 + docs/UpdateChild.md | 13 + docs/UpdateContact.md | 14 + docs/UpdateEmailCampaign.md | 33 + docs/UpdateEmailCampaignRecipients.md | 10 + docs/UpdateEmailCampaignSender.md | 10 + docs/UpdateList.md | 10 + docs/UpdateSender.md | 11 + docs/UpdateSmsCampaign.md | 13 + docs/UpdateSmtpTemplate.md | 18 + docs/UpdateSmtpTemplateSender.md | 10 + docs/UpdateWebhook.md | 11 + docs/WebhooksApi.md | 353 ++ git_push.sh | 52 + mono_nunit_test.sh | 22 + sib_api_v3_sdk.sln | 30 + .../Api/AccountApiTests.cs | 80 + .../Api/AttributesApiTests.cs | 121 + .../Api/ContactsApiTests.cs | 399 ++ .../Api/EmailCampaignsApiTests.cs | 199 + .../Api/FoldersApiTests.cs | 145 + src/sib_api_v3_sdk.Test/Api/ListsApiTests.cs | 186 + .../Api/ProcessApiTests.cs | 94 + .../Api/ResellerApiTests.cs | 181 + .../Api/SMSCampaignsApiTests.cs | 198 + src/sib_api_v3_sdk.Test/Api/SMTPApiTests.cs | 235 + .../Api/SendersApiTests.cs | 142 + .../Api/TransactionalSMSApiTests.cs | 130 + .../Api/WebhooksApiTests.cs | 130 + .../Model/AddContactToListTests.cs | 80 + .../Model/AddCreditsTests.cs | 88 + .../Model/CreateAttributeEnumerationTests.cs | 88 + .../Model/CreateAttributeTests.cs | 96 + .../Model/CreateChildTests.cs | 112 + .../Model/CreateContactTests.cs | 128 + .../CreateEmailCampaignRecipientsTests.cs | 88 + .../Model/CreateEmailCampaignSenderTests.cs | 88 + .../Model/CreateEmailCampaignTests.cs | 272 + .../Model/CreateListTests.cs | 88 + .../Model/CreateModelTests.cs | 80 + .../Model/CreateResellerTests.cs | 80 + .../Model/CreateSenderIpsTests.cs | 96 + .../Model/CreateSenderModelTests.cs | 96 + .../Model/CreateSenderTests.cs | 96 + .../Model/CreateSmsCampaignRecipientsTests.cs | 88 + .../Model/CreateSmsCampaignTests.cs | 112 + .../Model/CreateSmtpEmailTests.cs | 80 + .../Model/CreateSmtpTemplateSenderTests.cs | 88 + .../Model/CreateSmtpTemplateTests.cs | 152 + .../Model/CreateUpdateContactModelTests.cs | 80 + .../Model/CreateUpdateFolderTests.cs | 80 + .../Model/CreateWebhookTests.cs | 104 + .../Model/CreatedProcessIdTests.cs | 80 + .../Model/DeleteHardbouncesTests.cs | 96 + .../Model/EmailExportRecipientsTests.cs | 88 + .../Model/ErrorModelTests.cs | 88 + .../GetAccountMarketingAutomationTests.cs | 88 + .../Model/GetAccountPlanTests.cs | 120 + .../Model/GetAccountRelayDataTests.cs | 96 + .../Model/GetAccountRelayTests.cs | 88 + .../Model/GetAccountTests.cs | 136 + .../Model/GetAggregatedReportTests.cs | 176 + .../Model/GetAttributesAttributesTests.cs | 112 + .../Model/GetAttributesEnumerationTests.cs | 88 + .../Model/GetAttributesTests.cs | 80 + .../Model/GetCampaignOverviewTests.cs | 176 + .../Model/GetCampaignRecipientsTests.cs | 88 + .../Model/GetCampaignStatsTests.cs | 168 + .../Model/GetChildInfoApiKeysTests.cs | 88 + .../Model/GetChildInfoApiKeysV2Tests.cs | 88 + .../Model/GetChildInfoApiKeysV3Tests.cs | 88 + .../Model/GetChildInfoCreditsTests.cs | 88 + .../Model/GetChildInfoStatisticsTests.cs | 96 + .../Model/GetChildInfoTests.cs | 144 + .../Model/GetChildrenListTests.cs | 80 + .../Model/GetClientTests.cs | 104 + .../GetContactCampaignStatsClickedTests.cs | 88 + .../GetContactCampaignStatsOpenedTests.cs | 104 + .../Model/GetContactCampaignStatsTests.cs | 136 + ...tactCampaignStatsTransacAttributesTests.cs | 96 + ...ontactCampaignStatsUnsubscriptionsTests.cs | 88 + .../Model/GetContactDetailsTests.cs | 144 + .../Model/GetContactsTests.cs | 88 + .../Model/GetEmailCampaignTests.cs | 312 + .../Model/GetEmailCampaignsTests.cs | 88 + .../Model/GetEmailEventReportEventsTests.cs | 152 + .../Model/GetEmailEventReportTests.cs | 80 + .../GetExtendedCampaignOverviewSenderTests.cs | 88 + .../Model/GetExtendedCampaignOverviewTests.cs | 296 + .../Model/GetExtendedCampaignStatsTests.cs | 120 + .../Model/GetExtendedClientAddressTests.cs | 104 + .../Model/GetExtendedClientTests.cs | 112 + ...dedContactDetailsStatisticsClickedTests.cs | 88 + ...endedContactDetailsStatisticsLinksTests.cs | 104 + ...ntactDetailsStatisticsMessagesSentTests.cs | 88 + ...ndedContactDetailsStatisticsOpenedTests.cs | 104 + ...etExtendedContactDetailsStatisticsTests.cs | 136 + ...UnsubscriptionsAdminUnsubscriptionTests.cs | 88 + ...ctDetailsStatisticsUnsubscriptionsTests.cs | 88 + ...sUnsubscriptionsUserUnsubscriptionTests.cs | 96 + .../Model/GetExtendedContactDetailsTests.cs | 152 + .../GetExtendedListCampaignStatsTests.cs | 88 + .../Model/GetExtendedListTests.cs | 136 + .../Model/GetFolderListsTests.cs | 88 + .../Model/GetFolderTests.cs | 112 + .../Model/GetFoldersTests.cs | 88 + .../Model/GetIpFromSenderTests.cs | 104 + src/sib_api_v3_sdk.Test/Model/GetIpTests.cs | 104 + .../Model/GetIpsFromSenderTests.cs | 80 + src/sib_api_v3_sdk.Test/Model/GetIpsTests.cs | 80 + src/sib_api_v3_sdk.Test/Model/GetListTests.cs | 104 + .../Model/GetListsTests.cs | 88 + .../Model/GetProcessTests.cs | 104 + .../Model/GetProcessesTests.cs | 88 + .../Model/GetReportsReportsTests.cs | 176 + .../Model/GetReportsTests.cs | 80 + .../Model/GetSendersListIpsTests.cs | 96 + .../Model/GetSendersListSendersTests.cs | 112 + .../Model/GetSendersListTests.cs | 80 + .../Model/GetSmsCampaignOverviewTests.cs | 136 + .../Model/GetSmsCampaignStatsTests.cs | 128 + .../Model/GetSmsCampaignTests.cs | 152 + .../Model/GetSmsCampaignsTests.cs | 88 + .../Model/GetSmsEventReportEventsTests.cs | 128 + .../Model/GetSmsEventReportTests.cs | 80 + .../GetSmtpTemplateOverviewSenderTests.cs | 88 + .../Model/GetSmtpTemplateOverviewTests.cs | 168 + .../Model/GetSmtpTemplatesTests.cs | 88 + .../Model/GetStatsByDomainTests.cs | 72 + .../GetTransacAggregatedSmsReportTests.cs | 152 + .../Model/GetTransacSmsReportReportsTests.cs | 152 + .../Model/GetTransacSmsReportTests.cs | 80 + .../Model/GetWebhookTests.cs | 128 + .../Model/GetWebhooksTests.cs | 80 + .../Model/ManageIpTests.cs | 80 + .../Model/PostContactInfoContactsTests.cs | 96 + .../Model/PostContactInfoTests.cs | 80 + .../Model/PostSendFailedTests.cs | 112 + .../Model/PostSendSmsTestFailedTests.cs | 104 + .../Model/RemainingCreditModelChildTests.cs | 88 + .../RemainingCreditModelResellerTests.cs | 88 + .../Model/RemainingCreditModelTests.cs | 88 + .../Model/RemoveContactFromListTests.cs | 88 + .../Model/RemoveCreditsTests.cs | 88 + .../Model/RequestContactExportTests.cs | 96 + .../Model/RequestContactImportNewListTests.cs | 88 + .../Model/RequestContactImportTests.cs | 144 + .../Model/RequestSmsRecipientExportTests.cs | 88 + .../Model/SendEmailAttachmentTests.cs | 88 + .../Model/SendEmailTests.cs | 144 + .../Model/SendReportEmailTests.cs | 120 + .../Model/SendReportTests.cs | 88 + src/sib_api_v3_sdk.Test/Model/SendSmsTests.cs | 112 + .../Model/SendSmtpEmailAttachmentTests.cs | 96 + .../Model/SendSmtpEmailBccTests.cs | 88 + .../Model/SendSmtpEmailCcTests.cs | 88 + .../Model/SendSmtpEmailReplyToTests.cs | 88 + .../Model/SendSmtpEmailSenderTests.cs | 88 + .../Model/SendSmtpEmailTests.cs | 176 + .../Model/SendSmtpEmailToTests.cs | 88 + .../Model/SendTemplateEmailTests.cs | 80 + .../Model/SendTestEmailTests.cs | 80 + .../Model/SendTestSmsTests.cs | 80 + .../Model/SendTransacSmsTests.cs | 120 + .../Model/UpdateAttributeEnumerationTests.cs | 88 + .../Model/UpdateAttributeTests.cs | 88 + .../Model/UpdateCampaignStatusTests.cs | 80 + .../Model/UpdateChildTests.cs | 112 + .../Model/UpdateContactTests.cs | 120 + .../UpdateEmailCampaignRecipientsTests.cs | 88 + .../Model/UpdateEmailCampaignSenderTests.cs | 88 + .../Model/UpdateEmailCampaignTests.cs | 272 + .../Model/UpdateListTests.cs | 88 + .../Model/UpdateSenderTests.cs | 96 + .../Model/UpdateSmsCampaignTests.cs | 112 + .../Model/UpdateSmtpTemplateSenderTests.cs | 88 + .../Model/UpdateSmtpTemplateTests.cs | 152 + .../Model/UpdateWebhookTests.cs | 96 + .../sib_api_v3_sdk.Test.csproj | 42 + src/sib_api_v3_sdk/Api/AccountApi.cs | 311 + src/sib_api_v3_sdk/Api/AttributesApi.cs | 1004 +++ src/sib_api_v3_sdk/Api/ContactsApi.cs | 5630 +++++++++++++++++ src/sib_api_v3_sdk/Api/EmailCampaignsApi.cs | 2290 +++++++ src/sib_api_v3_sdk/Api/FoldersApi.cs | 1388 ++++ src/sib_api_v3_sdk/Api/ListsApi.cs | 2057 ++++++ src/sib_api_v3_sdk/Api/ProcessApi.cs | 528 ++ src/sib_api_v3_sdk/Api/ResellerApi.cs | 2037 ++++++ src/sib_api_v3_sdk/Api/SMSCampaignsApi.cs | 2280 +++++++ src/sib_api_v3_sdk/Api/SMTPApi.cs | 2778 ++++++++ src/sib_api_v3_sdk/Api/SendersApi.cs | 1328 ++++ src/sib_api_v3_sdk/Api/TransactionalSMSApi.cs | 1044 +++ src/sib_api_v3_sdk/Api/WebhooksApi.cs | 1149 ++++ src/sib_api_v3_sdk/Client/ApiClient.cs | 530 ++ src/sib_api_v3_sdk/Client/ApiException.cs | 60 + src/sib_api_v3_sdk/Client/ApiResponse.cs | 54 + src/sib_api_v3_sdk/Client/Configuration.cs | 453 ++ src/sib_api_v3_sdk/Client/ExceptionFactory.cs | 24 + .../Client/GlobalConfiguration.cs | 34 + src/sib_api_v3_sdk/Client/IApiAccessor.cs | 42 + .../Client/IReadableConfiguration.cs | 94 + .../Client/SwaggerDateConverter.cs | 30 + src/sib_api_v3_sdk/Model/AddContactToList.cs | 125 + src/sib_api_v3_sdk/Model/AddCredits.cs | 142 + src/sib_api_v3_sdk/Model/CreateAttribute.cs | 204 + .../Model/CreateAttributeEnumeration.cs | 163 + src/sib_api_v3_sdk/Model/CreateChild.cs | 238 + src/sib_api_v3_sdk/Model/CreateContact.cs | 235 + .../Model/CreateEmailCampaign.cs | 621 ++ .../Model/CreateEmailCampaignRecipients.cs | 142 + .../Model/CreateEmailCampaignSender.cs | 155 + src/sib_api_v3_sdk/Model/CreateList.cs | 163 + src/sib_api_v3_sdk/Model/CreateModel.cs | 138 + src/sib_api_v3_sdk/Model/CreateReseller.cs | 138 + src/sib_api_v3_sdk/Model/CreateSender.cs | 180 + src/sib_api_v3_sdk/Model/CreateSenderIps.cs | 192 + src/sib_api_v3_sdk/Model/CreateSenderModel.cs | 172 + src/sib_api_v3_sdk/Model/CreateSmsCampaign.cs | 227 + .../Model/CreateSmsCampaignRecipients.cs | 155 + src/sib_api_v3_sdk/Model/CreateSmtpEmail.cs | 138 + .../Model/CreateSmtpTemplate.cs | 306 + .../Model/CreateSmtpTemplateSender.cs | 155 + .../Model/CreateUpdateContactModel.cs | 125 + .../Model/CreateUpdateFolder.cs | 125 + src/sib_api_v3_sdk/Model/CreateWebhook.cs | 313 + src/sib_api_v3_sdk/Model/CreatedProcessId.cs | 138 + src/sib_api_v3_sdk/Model/DeleteHardbounces.cs | 159 + .../Model/EmailExportRecipients.cs | 212 + src/sib_api_v3_sdk/Model/ErrorModel.cs | 262 + src/sib_api_v3_sdk/Model/GetAccount.cs | 302 + .../Model/GetAccountMarketingAutomation.cs | 155 + src/sib_api_v3_sdk/Model/GetAccountPlan.cs | 295 + src/sib_api_v3_sdk/Model/GetAccountRelay.cs | 162 + .../Model/GetAccountRelayData.cs | 188 + .../Model/GetAggregatedReport.cs | 438 ++ src/sib_api_v3_sdk/Model/GetAttributes.cs | 138 + .../Model/GetAttributesAttributes.cs | 292 + .../Model/GetAttributesEnumeration.cs | 163 + .../Model/GetCampaignOverview.cs | 432 ++ .../Model/GetCampaignRecipients.cs | 161 + src/sib_api_v3_sdk/Model/GetCampaignStats.cs | 397 ++ src/sib_api_v3_sdk/Model/GetChildInfo.cs | 303 + .../Model/GetChildInfoApiKeys.cs | 153 + .../Model/GetChildInfoApiKeysV2.cs | 163 + .../Model/GetChildInfoApiKeysV3.cs | 163 + .../Model/GetChildInfoCredits.cs | 142 + .../Model/GetChildInfoStatistics.cs | 159 + src/sib_api_v3_sdk/Model/GetChildrenList.cs | 125 + src/sib_api_v3_sdk/Model/GetClient.cs | 213 + .../Model/GetContactCampaignStats.cs | 236 + .../Model/GetContactCampaignStatsClicked.cs | 162 + .../Model/GetContactCampaignStatsOpened.cs | 213 + ...etContactCampaignStatsTransacAttributes.cs | 189 + .../GetContactCampaignStatsUnsubscriptions.cs | 163 + src/sib_api_v3_sdk/Model/GetContactDetails.cs | 328 + src/sib_api_v3_sdk/Model/GetContacts.cs | 162 + src/sib_api_v3_sdk/Model/GetEmailCampaign.cs | 814 +++ src/sib_api_v3_sdk/Model/GetEmailCampaigns.cs | 154 + .../Model/GetEmailEventReport.cs | 124 + .../Model/GetEmailEventReportEvents.cs | 396 ++ .../Model/GetExtendedCampaignOverview.cs | 766 +++ .../GetExtendedCampaignOverviewSender.cs | 142 + .../Model/GetExtendedCampaignStats.cs | 262 + src/sib_api_v3_sdk/Model/GetExtendedClient.cs | 237 + .../Model/GetExtendedClientAddress.cs | 213 + .../Model/GetExtendedContactDetails.cs | 352 ++ .../GetExtendedContactDetailsStatistics.cs | 243 + ...ExtendedContactDetailsStatisticsClicked.cs | 163 + ...etExtendedContactDetailsStatisticsLinks.cs | 213 + ...dedContactDetailsStatisticsMessagesSent.cs | 163 + ...tExtendedContactDetailsStatisticsOpened.cs | 213 + ...ContactDetailsStatisticsUnsubscriptions.cs | 163 + ...sticsUnsubscriptionsAdminUnsubscription.cs | 163 + ...isticsUnsubscriptionsUserUnsubscription.cs | 188 + src/sib_api_v3_sdk/Model/GetExtendedList.cs | 296 + .../Model/GetExtendedListCampaignStats.cs | 162 + src/sib_api_v3_sdk/Model/GetFolder.cs | 238 + src/sib_api_v3_sdk/Model/GetFolderLists.cs | 162 + src/sib_api_v3_sdk/Model/GetFolders.cs | 141 + src/sib_api_v3_sdk/Model/GetIp.cs | 213 + src/sib_api_v3_sdk/Model/GetIpFromSender.cs | 213 + src/sib_api_v3_sdk/Model/GetIps.cs | 138 + src/sib_api_v3_sdk/Model/GetIpsFromSender.cs | 138 + src/sib_api_v3_sdk/Model/GetList.cs | 213 + src/sib_api_v3_sdk/Model/GetLists.cs | 163 + src/sib_api_v3_sdk/Model/GetProcess.cs | 232 + src/sib_api_v3_sdk/Model/GetProcesses.cs | 155 + src/sib_api_v3_sdk/Model/GetReports.cs | 124 + src/sib_api_v3_sdk/Model/GetReportsReports.cs | 439 ++ src/sib_api_v3_sdk/Model/GetSendersList.cs | 125 + src/sib_api_v3_sdk/Model/GetSendersListIps.cs | 188 + .../Model/GetSendersListSenders.cs | 230 + src/sib_api_v3_sdk/Model/GetSmsCampaign.cs | 406 ++ .../Model/GetSmsCampaignOverview.cs | 358 ++ .../Model/GetSmsCampaignStats.cs | 288 + src/sib_api_v3_sdk/Model/GetSmsCampaigns.cs | 154 + src/sib_api_v3_sdk/Model/GetSmsEventReport.cs | 124 + .../Model/GetSmsEventReportEvents.cs | 326 + .../Model/GetSmtpTemplateOverview.cs | 412 ++ .../Model/GetSmtpTemplateOverviewSender.cs | 142 + src/sib_api_v3_sdk/Model/GetSmtpTemplates.cs | 141 + src/sib_api_v3_sdk/Model/GetStatsByDomain.cs | 110 + .../Model/GetTransacAggregatedSmsReport.cs | 363 ++ .../Model/GetTransacSmsReport.cs | 124 + .../Model/GetTransacSmsReportReports.cs | 364 ++ src/sib_api_v3_sdk/Model/GetWebhook.cs | 308 + src/sib_api_v3_sdk/Model/GetWebhooks.cs | 137 + src/sib_api_v3_sdk/Model/ManageIp.cs | 125 + src/sib_api_v3_sdk/Model/PostContactInfo.cs | 137 + .../Model/PostContactInfoContacts.cs | 157 + src/sib_api_v3_sdk/Model/PostSendFailed.cs | 211 + .../Model/PostSendSmsTestFailed.cs | 195 + .../Model/RemainingCreditModel.cs | 161 + .../Model/RemainingCreditModelChild.cs | 163 + .../Model/RemainingCreditModelReseller.cs | 163 + .../Model/RemoveContactFromList.cs | 142 + src/sib_api_v3_sdk/Model/RemoveCredits.cs | 142 + .../Model/RequestContactExport.cs | 172 + .../Model/RequestContactImport.cs | 292 + .../Model/RequestContactImportNewList.cs | 142 + .../Model/RequestSmsRecipientExport.cs | 200 + src/sib_api_v3_sdk/Model/SendEmail.cs | 274 + .../Model/SendEmailAttachment.cs | 163 + src/sib_api_v3_sdk/Model/SendReport.cs | 207 + src/sib_api_v3_sdk/Model/SendReportEmail.cs | 268 + src/sib_api_v3_sdk/Model/SendSms.cs | 212 + src/sib_api_v3_sdk/Model/SendSmtpEmail.cs | 340 + .../Model/SendSmtpEmailAttachment.cs | 159 + src/sib_api_v3_sdk/Model/SendSmtpEmailBcc.cs | 155 + src/sib_api_v3_sdk/Model/SendSmtpEmailCc.cs | 155 + .../Model/SendSmtpEmailReplyTo.cs | 155 + .../Model/SendSmtpEmailSender.cs | 155 + src/sib_api_v3_sdk/Model/SendSmtpEmailTo.cs | 155 + src/sib_api_v3_sdk/Model/SendTemplateEmail.cs | 138 + src/sib_api_v3_sdk/Model/SendTestEmail.cs | 125 + src/sib_api_v3_sdk/Model/SendTestSms.cs | 125 + src/sib_api_v3_sdk/Model/SendTransacSms.cs | 274 + src/sib_api_v3_sdk/Model/UpdateAttribute.cs | 142 + .../Model/UpdateAttributeEnumeration.cs | 163 + .../Model/UpdateCampaignStatus.cs | 182 + src/sib_api_v3_sdk/Model/UpdateChild.cs | 193 + src/sib_api_v3_sdk/Model/UpdateContact.cs | 210 + .../Model/UpdateEmailCampaign.cs | 600 ++ .../Model/UpdateEmailCampaignRecipients.cs | 142 + .../Model/UpdateEmailCampaignSender.cs | 142 + src/sib_api_v3_sdk/Model/UpdateList.cs | 142 + src/sib_api_v3_sdk/Model/UpdateSender.cs | 159 + src/sib_api_v3_sdk/Model/UpdateSmsCampaign.cs | 198 + .../Model/UpdateSmtpTemplate.cs | 277 + .../Model/UpdateSmtpTemplateSender.cs | 142 + src/sib_api_v3_sdk/Model/UpdateWebhook.cs | 246 + src/sib_api_v3_sdk/sib_api_v3_sdk.csproj | 38 + 505 files changed, 85473 insertions(+), 2 deletions(-) create mode 100644 .gitignore create mode 100644 .swagger-codegen-ignore create mode 100644 .swagger-codegen/VERSION create mode 100644 LICENSE.md create mode 100644 docs/AccountApi.md create mode 100644 docs/AddContactToList.md create mode 100644 docs/AddCredits.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/CreateUpdateContactModel.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/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/RemoveContactFromList.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/SMSCampaignsApi.md create mode 100644 docs/SMTPApi.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/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 mono_nunit_test.sh create mode 100644 sib_api_v3_sdk.sln create mode 100644 src/sib_api_v3_sdk.Test/Api/AccountApiTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Api/AttributesApiTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Api/ContactsApiTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Api/EmailCampaignsApiTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Api/FoldersApiTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Api/ListsApiTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Api/ProcessApiTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Api/ResellerApiTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Api/SMSCampaignsApiTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Api/SMTPApiTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Api/SendersApiTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Api/TransactionalSMSApiTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Api/WebhooksApiTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/AddContactToListTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/AddCreditsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/CreateAttributeEnumerationTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/CreateAttributeTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/CreateChildTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/CreateContactTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/CreateEmailCampaignRecipientsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/CreateEmailCampaignSenderTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/CreateEmailCampaignTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/CreateListTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/CreateModelTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/CreateResellerTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/CreateSenderIpsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/CreateSenderModelTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/CreateSenderTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/CreateSmsCampaignRecipientsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/CreateSmsCampaignTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/CreateSmtpEmailTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/CreateSmtpTemplateSenderTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/CreateSmtpTemplateTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/CreateUpdateContactModelTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/CreateUpdateFolderTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/CreateWebhookTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/CreatedProcessIdTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/DeleteHardbouncesTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/EmailExportRecipientsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/ErrorModelTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetAccountMarketingAutomationTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetAccountPlanTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetAccountRelayDataTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetAccountRelayTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetAccountTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetAggregatedReportTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetAttributesAttributesTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetAttributesEnumerationTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetAttributesTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetCampaignOverviewTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetCampaignRecipientsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetCampaignStatsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetChildInfoApiKeysTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetChildInfoApiKeysV2Tests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetChildInfoApiKeysV3Tests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetChildInfoCreditsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetChildInfoStatisticsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetChildInfoTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetChildrenListTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetClientTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetContactCampaignStatsClickedTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetContactCampaignStatsOpenedTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetContactCampaignStatsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetContactCampaignStatsTransacAttributesTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetContactCampaignStatsUnsubscriptionsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetContactDetailsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetContactsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetEmailCampaignTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetEmailCampaignsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetEmailEventReportEventsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetEmailEventReportTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetExtendedCampaignOverviewSenderTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetExtendedCampaignOverviewTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetExtendedCampaignStatsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetExtendedClientAddressTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetExtendedClientTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsStatisticsClickedTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsStatisticsLinksTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsStatisticsMessagesSentTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsStatisticsOpenedTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsStatisticsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscriptionTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscriptionTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetExtendedListCampaignStatsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetExtendedListTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetFolderListsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetFolderTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetFoldersTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetIpFromSenderTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetIpTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetIpsFromSenderTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetIpsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetListTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetListsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetProcessTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetProcessesTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetReportsReportsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetReportsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetSendersListIpsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetSendersListSendersTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetSendersListTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetSmsCampaignOverviewTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetSmsCampaignStatsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetSmsCampaignTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetSmsCampaignsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetSmsEventReportEventsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetSmsEventReportTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetSmtpTemplateOverviewSenderTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetSmtpTemplateOverviewTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetSmtpTemplatesTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetStatsByDomainTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetTransacAggregatedSmsReportTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetTransacSmsReportReportsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetTransacSmsReportTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetWebhookTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/GetWebhooksTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/ManageIpTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/PostContactInfoContactsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/PostContactInfoTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/PostSendFailedTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/PostSendSmsTestFailedTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/RemainingCreditModelChildTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/RemainingCreditModelResellerTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/RemainingCreditModelTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/RemoveContactFromListTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/RemoveCreditsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/RequestContactExportTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/RequestContactImportNewListTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/RequestContactImportTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/RequestSmsRecipientExportTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/SendEmailAttachmentTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/SendEmailTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/SendReportEmailTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/SendReportTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/SendSmsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/SendSmtpEmailAttachmentTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/SendSmtpEmailBccTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/SendSmtpEmailCcTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/SendSmtpEmailReplyToTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/SendSmtpEmailSenderTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/SendSmtpEmailTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/SendSmtpEmailToTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/SendTemplateEmailTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/SendTestEmailTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/SendTestSmsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/SendTransacSmsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/UpdateAttributeEnumerationTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/UpdateAttributeTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/UpdateCampaignStatusTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/UpdateChildTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/UpdateContactTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/UpdateEmailCampaignRecipientsTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/UpdateEmailCampaignSenderTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/UpdateEmailCampaignTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/UpdateListTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/UpdateSenderTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/UpdateSmsCampaignTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/UpdateSmtpTemplateSenderTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/UpdateSmtpTemplateTests.cs create mode 100644 src/sib_api_v3_sdk.Test/Model/UpdateWebhookTests.cs create mode 100644 src/sib_api_v3_sdk.Test/sib_api_v3_sdk.Test.csproj create mode 100644 src/sib_api_v3_sdk/Api/AccountApi.cs create mode 100644 src/sib_api_v3_sdk/Api/AttributesApi.cs create mode 100644 src/sib_api_v3_sdk/Api/ContactsApi.cs create mode 100644 src/sib_api_v3_sdk/Api/EmailCampaignsApi.cs create mode 100644 src/sib_api_v3_sdk/Api/FoldersApi.cs create mode 100644 src/sib_api_v3_sdk/Api/ListsApi.cs create mode 100644 src/sib_api_v3_sdk/Api/ProcessApi.cs create mode 100644 src/sib_api_v3_sdk/Api/ResellerApi.cs create mode 100644 src/sib_api_v3_sdk/Api/SMSCampaignsApi.cs create mode 100644 src/sib_api_v3_sdk/Api/SMTPApi.cs create mode 100644 src/sib_api_v3_sdk/Api/SendersApi.cs create mode 100644 src/sib_api_v3_sdk/Api/TransactionalSMSApi.cs create mode 100644 src/sib_api_v3_sdk/Api/WebhooksApi.cs create mode 100644 src/sib_api_v3_sdk/Client/ApiClient.cs create mode 100644 src/sib_api_v3_sdk/Client/ApiException.cs create mode 100644 src/sib_api_v3_sdk/Client/ApiResponse.cs create mode 100644 src/sib_api_v3_sdk/Client/Configuration.cs create mode 100644 src/sib_api_v3_sdk/Client/ExceptionFactory.cs create mode 100644 src/sib_api_v3_sdk/Client/GlobalConfiguration.cs create mode 100644 src/sib_api_v3_sdk/Client/IApiAccessor.cs create mode 100644 src/sib_api_v3_sdk/Client/IReadableConfiguration.cs create mode 100644 src/sib_api_v3_sdk/Client/SwaggerDateConverter.cs create mode 100644 src/sib_api_v3_sdk/Model/AddContactToList.cs create mode 100644 src/sib_api_v3_sdk/Model/AddCredits.cs create mode 100644 src/sib_api_v3_sdk/Model/CreateAttribute.cs create mode 100644 src/sib_api_v3_sdk/Model/CreateAttributeEnumeration.cs create mode 100644 src/sib_api_v3_sdk/Model/CreateChild.cs create mode 100644 src/sib_api_v3_sdk/Model/CreateContact.cs create mode 100644 src/sib_api_v3_sdk/Model/CreateEmailCampaign.cs create mode 100644 src/sib_api_v3_sdk/Model/CreateEmailCampaignRecipients.cs create mode 100644 src/sib_api_v3_sdk/Model/CreateEmailCampaignSender.cs create mode 100644 src/sib_api_v3_sdk/Model/CreateList.cs create mode 100644 src/sib_api_v3_sdk/Model/CreateModel.cs create mode 100644 src/sib_api_v3_sdk/Model/CreateReseller.cs create mode 100644 src/sib_api_v3_sdk/Model/CreateSender.cs create mode 100644 src/sib_api_v3_sdk/Model/CreateSenderIps.cs create mode 100644 src/sib_api_v3_sdk/Model/CreateSenderModel.cs create mode 100644 src/sib_api_v3_sdk/Model/CreateSmsCampaign.cs create mode 100644 src/sib_api_v3_sdk/Model/CreateSmsCampaignRecipients.cs create mode 100644 src/sib_api_v3_sdk/Model/CreateSmtpEmail.cs create mode 100644 src/sib_api_v3_sdk/Model/CreateSmtpTemplate.cs create mode 100644 src/sib_api_v3_sdk/Model/CreateSmtpTemplateSender.cs create mode 100644 src/sib_api_v3_sdk/Model/CreateUpdateContactModel.cs create mode 100644 src/sib_api_v3_sdk/Model/CreateUpdateFolder.cs create mode 100644 src/sib_api_v3_sdk/Model/CreateWebhook.cs create mode 100644 src/sib_api_v3_sdk/Model/CreatedProcessId.cs create mode 100644 src/sib_api_v3_sdk/Model/DeleteHardbounces.cs create mode 100644 src/sib_api_v3_sdk/Model/EmailExportRecipients.cs create mode 100644 src/sib_api_v3_sdk/Model/ErrorModel.cs create mode 100644 src/sib_api_v3_sdk/Model/GetAccount.cs create mode 100644 src/sib_api_v3_sdk/Model/GetAccountMarketingAutomation.cs create mode 100644 src/sib_api_v3_sdk/Model/GetAccountPlan.cs create mode 100644 src/sib_api_v3_sdk/Model/GetAccountRelay.cs create mode 100644 src/sib_api_v3_sdk/Model/GetAccountRelayData.cs create mode 100644 src/sib_api_v3_sdk/Model/GetAggregatedReport.cs create mode 100644 src/sib_api_v3_sdk/Model/GetAttributes.cs create mode 100644 src/sib_api_v3_sdk/Model/GetAttributesAttributes.cs create mode 100644 src/sib_api_v3_sdk/Model/GetAttributesEnumeration.cs create mode 100644 src/sib_api_v3_sdk/Model/GetCampaignOverview.cs create mode 100644 src/sib_api_v3_sdk/Model/GetCampaignRecipients.cs create mode 100644 src/sib_api_v3_sdk/Model/GetCampaignStats.cs create mode 100644 src/sib_api_v3_sdk/Model/GetChildInfo.cs create mode 100644 src/sib_api_v3_sdk/Model/GetChildInfoApiKeys.cs create mode 100644 src/sib_api_v3_sdk/Model/GetChildInfoApiKeysV2.cs create mode 100644 src/sib_api_v3_sdk/Model/GetChildInfoApiKeysV3.cs create mode 100644 src/sib_api_v3_sdk/Model/GetChildInfoCredits.cs create mode 100644 src/sib_api_v3_sdk/Model/GetChildInfoStatistics.cs create mode 100644 src/sib_api_v3_sdk/Model/GetChildrenList.cs create mode 100644 src/sib_api_v3_sdk/Model/GetClient.cs create mode 100644 src/sib_api_v3_sdk/Model/GetContactCampaignStats.cs create mode 100644 src/sib_api_v3_sdk/Model/GetContactCampaignStatsClicked.cs create mode 100644 src/sib_api_v3_sdk/Model/GetContactCampaignStatsOpened.cs create mode 100644 src/sib_api_v3_sdk/Model/GetContactCampaignStatsTransacAttributes.cs create mode 100644 src/sib_api_v3_sdk/Model/GetContactCampaignStatsUnsubscriptions.cs create mode 100644 src/sib_api_v3_sdk/Model/GetContactDetails.cs create mode 100644 src/sib_api_v3_sdk/Model/GetContacts.cs create mode 100644 src/sib_api_v3_sdk/Model/GetEmailCampaign.cs create mode 100644 src/sib_api_v3_sdk/Model/GetEmailCampaigns.cs create mode 100644 src/sib_api_v3_sdk/Model/GetEmailEventReport.cs create mode 100644 src/sib_api_v3_sdk/Model/GetEmailEventReportEvents.cs create mode 100644 src/sib_api_v3_sdk/Model/GetExtendedCampaignOverview.cs create mode 100644 src/sib_api_v3_sdk/Model/GetExtendedCampaignOverviewSender.cs create mode 100644 src/sib_api_v3_sdk/Model/GetExtendedCampaignStats.cs create mode 100644 src/sib_api_v3_sdk/Model/GetExtendedClient.cs create mode 100644 src/sib_api_v3_sdk/Model/GetExtendedClientAddress.cs create mode 100644 src/sib_api_v3_sdk/Model/GetExtendedContactDetails.cs create mode 100644 src/sib_api_v3_sdk/Model/GetExtendedContactDetailsStatistics.cs create mode 100644 src/sib_api_v3_sdk/Model/GetExtendedContactDetailsStatisticsClicked.cs create mode 100644 src/sib_api_v3_sdk/Model/GetExtendedContactDetailsStatisticsLinks.cs create mode 100644 src/sib_api_v3_sdk/Model/GetExtendedContactDetailsStatisticsMessagesSent.cs create mode 100644 src/sib_api_v3_sdk/Model/GetExtendedContactDetailsStatisticsOpened.cs create mode 100644 src/sib_api_v3_sdk/Model/GetExtendedContactDetailsStatisticsUnsubscriptions.cs create mode 100644 src/sib_api_v3_sdk/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.cs create mode 100644 src/sib_api_v3_sdk/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.cs create mode 100644 src/sib_api_v3_sdk/Model/GetExtendedList.cs create mode 100644 src/sib_api_v3_sdk/Model/GetExtendedListCampaignStats.cs create mode 100644 src/sib_api_v3_sdk/Model/GetFolder.cs create mode 100644 src/sib_api_v3_sdk/Model/GetFolderLists.cs create mode 100644 src/sib_api_v3_sdk/Model/GetFolders.cs create mode 100644 src/sib_api_v3_sdk/Model/GetIp.cs create mode 100644 src/sib_api_v3_sdk/Model/GetIpFromSender.cs create mode 100644 src/sib_api_v3_sdk/Model/GetIps.cs create mode 100644 src/sib_api_v3_sdk/Model/GetIpsFromSender.cs create mode 100644 src/sib_api_v3_sdk/Model/GetList.cs create mode 100644 src/sib_api_v3_sdk/Model/GetLists.cs create mode 100644 src/sib_api_v3_sdk/Model/GetProcess.cs create mode 100644 src/sib_api_v3_sdk/Model/GetProcesses.cs create mode 100644 src/sib_api_v3_sdk/Model/GetReports.cs create mode 100644 src/sib_api_v3_sdk/Model/GetReportsReports.cs create mode 100644 src/sib_api_v3_sdk/Model/GetSendersList.cs create mode 100644 src/sib_api_v3_sdk/Model/GetSendersListIps.cs create mode 100644 src/sib_api_v3_sdk/Model/GetSendersListSenders.cs create mode 100644 src/sib_api_v3_sdk/Model/GetSmsCampaign.cs create mode 100644 src/sib_api_v3_sdk/Model/GetSmsCampaignOverview.cs create mode 100644 src/sib_api_v3_sdk/Model/GetSmsCampaignStats.cs create mode 100644 src/sib_api_v3_sdk/Model/GetSmsCampaigns.cs create mode 100644 src/sib_api_v3_sdk/Model/GetSmsEventReport.cs create mode 100644 src/sib_api_v3_sdk/Model/GetSmsEventReportEvents.cs create mode 100644 src/sib_api_v3_sdk/Model/GetSmtpTemplateOverview.cs create mode 100644 src/sib_api_v3_sdk/Model/GetSmtpTemplateOverviewSender.cs create mode 100644 src/sib_api_v3_sdk/Model/GetSmtpTemplates.cs create mode 100644 src/sib_api_v3_sdk/Model/GetStatsByDomain.cs create mode 100644 src/sib_api_v3_sdk/Model/GetTransacAggregatedSmsReport.cs create mode 100644 src/sib_api_v3_sdk/Model/GetTransacSmsReport.cs create mode 100644 src/sib_api_v3_sdk/Model/GetTransacSmsReportReports.cs create mode 100644 src/sib_api_v3_sdk/Model/GetWebhook.cs create mode 100644 src/sib_api_v3_sdk/Model/GetWebhooks.cs create mode 100644 src/sib_api_v3_sdk/Model/ManageIp.cs create mode 100644 src/sib_api_v3_sdk/Model/PostContactInfo.cs create mode 100644 src/sib_api_v3_sdk/Model/PostContactInfoContacts.cs create mode 100644 src/sib_api_v3_sdk/Model/PostSendFailed.cs create mode 100644 src/sib_api_v3_sdk/Model/PostSendSmsTestFailed.cs create mode 100644 src/sib_api_v3_sdk/Model/RemainingCreditModel.cs create mode 100644 src/sib_api_v3_sdk/Model/RemainingCreditModelChild.cs create mode 100644 src/sib_api_v3_sdk/Model/RemainingCreditModelReseller.cs create mode 100644 src/sib_api_v3_sdk/Model/RemoveContactFromList.cs create mode 100644 src/sib_api_v3_sdk/Model/RemoveCredits.cs create mode 100644 src/sib_api_v3_sdk/Model/RequestContactExport.cs create mode 100644 src/sib_api_v3_sdk/Model/RequestContactImport.cs create mode 100644 src/sib_api_v3_sdk/Model/RequestContactImportNewList.cs create mode 100644 src/sib_api_v3_sdk/Model/RequestSmsRecipientExport.cs create mode 100644 src/sib_api_v3_sdk/Model/SendEmail.cs create mode 100644 src/sib_api_v3_sdk/Model/SendEmailAttachment.cs create mode 100644 src/sib_api_v3_sdk/Model/SendReport.cs create mode 100644 src/sib_api_v3_sdk/Model/SendReportEmail.cs create mode 100644 src/sib_api_v3_sdk/Model/SendSms.cs create mode 100644 src/sib_api_v3_sdk/Model/SendSmtpEmail.cs create mode 100644 src/sib_api_v3_sdk/Model/SendSmtpEmailAttachment.cs create mode 100644 src/sib_api_v3_sdk/Model/SendSmtpEmailBcc.cs create mode 100644 src/sib_api_v3_sdk/Model/SendSmtpEmailCc.cs create mode 100644 src/sib_api_v3_sdk/Model/SendSmtpEmailReplyTo.cs create mode 100644 src/sib_api_v3_sdk/Model/SendSmtpEmailSender.cs create mode 100644 src/sib_api_v3_sdk/Model/SendSmtpEmailTo.cs create mode 100644 src/sib_api_v3_sdk/Model/SendTemplateEmail.cs create mode 100644 src/sib_api_v3_sdk/Model/SendTestEmail.cs create mode 100644 src/sib_api_v3_sdk/Model/SendTestSms.cs create mode 100644 src/sib_api_v3_sdk/Model/SendTransacSms.cs create mode 100644 src/sib_api_v3_sdk/Model/UpdateAttribute.cs create mode 100644 src/sib_api_v3_sdk/Model/UpdateAttributeEnumeration.cs create mode 100644 src/sib_api_v3_sdk/Model/UpdateCampaignStatus.cs create mode 100644 src/sib_api_v3_sdk/Model/UpdateChild.cs create mode 100644 src/sib_api_v3_sdk/Model/UpdateContact.cs create mode 100644 src/sib_api_v3_sdk/Model/UpdateEmailCampaign.cs create mode 100644 src/sib_api_v3_sdk/Model/UpdateEmailCampaignRecipients.cs create mode 100644 src/sib_api_v3_sdk/Model/UpdateEmailCampaignSender.cs create mode 100644 src/sib_api_v3_sdk/Model/UpdateList.cs create mode 100644 src/sib_api_v3_sdk/Model/UpdateSender.cs create mode 100644 src/sib_api_v3_sdk/Model/UpdateSmsCampaign.cs create mode 100644 src/sib_api_v3_sdk/Model/UpdateSmtpTemplate.cs create mode 100644 src/sib_api_v3_sdk/Model/UpdateSmtpTemplateSender.cs create mode 100644 src/sib_api_v3_sdk/Model/UpdateWebhook.cs create mode 100644 src/sib_api_v3_sdk/sib_api_v3_sdk.csproj diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..17302c9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,186 @@ +# Ref: https://gist.github.com/kmorcinek/2710267 +# Download this file using PowerShell v3 under Windows with the following comand +# Invoke-WebRequest https://gist.githubusercontent.com/kmorcinek/2710267/raw/ -OutFile .gitignore + +# User-specific files +*.suo +*.user +*.sln.docstates +./nuget + +# Build results + +[Dd]ebug/ +[Rr]elease/ +x64/ +build/ +[Bb]in/ +[Oo]bj/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.log +*.scc + +# OS generated files # +.DS_Store* +ehthumbs.db +Icon? +Thumbs.db + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +*.ncrunch* +.*crunch*.local.xml + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.Publish.xml + +# Windows Azure Build Output +csx +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +sql/ +*.Cache +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.[Pp]ublish.xml +*.pfx +*.publishsettings +modulesbin/ +tempbin/ + +# EPiServer Site file (VPP) +AppData/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# vim +*.txt~ +*.swp +*.swo + +# svn +.svn + +# SQL Server files +**/App_Data/*.mdf +**/App_Data/*.ldf +**/App_Data/*.sdf + + +#LightSwitch generated files +GeneratedArtifacts/ +_Pvt_Extensions/ +ModelManifest.xml + +# ========================= +# Windows detritus +# ========================= + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Mac desktop service store files +.DS_Store + +# SASS Compiler cache +.sass-cache + +# Visual Studio 2014 CTP +**/*.sln.ide 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..ab6d278 --- /dev/null +++ b/.swagger-codegen/VERSION @@ -0,0 +1 @@ +2.4.4 \ No newline at end of file diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..bdb86b3 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019 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. diff --git a/README.md b/README.md index 93dba56..703709c 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,381 @@ -# APIv3-csharp-library -SendinBlue's C# library for API v3 +# SendinBlue's API v3 C# 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). + +This C# SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project and is reviewed and maintained by SendinBlue: + +- API version: 3.0.0 +- SDK version: 1.0.0 +- Build package: io.swagger.codegen.languages.CSharpClientCodegen + For more information, please visit [https://account.sendinblue.com/support](https://account.sendinblue.com/support) + + +## Frameworks supported +- .NET 4.0 or later +- Windows Phone 7.1 (Mango) + + +## Dependencies +- [RestSharp](https://www.nuget.org/packages/RestSharp) - 105.1.0 or later +- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 7.0.0 or later +- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.2.0 or later + +The DLLs included in the package may not be the latest version. We recommend using [NuGet](https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages: +``` +Install-Package RestSharp +Install-Package Newtonsoft.Json +Install-Package JsonSubTypes +``` + +NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See [RestSharp#742](https://github.com/restsharp/RestSharp/issues/742) + + +## Installation +Include the Dependencies (RestSharp, Json.NET and JsonSubTypes as mentioned in Dependencies section) in the C# project, and use the namespaces: +```csharp +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; +``` + + +## Getting Started + +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class Example + { + public void main() + { + + // Configure API key authorization: api-key + Configuration.Default.ApiKey.Add("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.ApiKeyPrefix.Add("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.ApiKey.Add("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.ApiKeyPrefix.Add("partner-key", "Bearer"); + + var apiInstance = new AccountApi(); + + try + { + // Get your account informations, plans and credits details + GetAccount result = apiInstance.GetAccount(); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling AccountApi.GetAccount: " + e.Message ); + } + + } + } +} +``` + + +## 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* | [**DeleteContact**](docs/ContactsApi.md#deletecontact) | **DELETE** /contacts/{email} | Deletes a contact +*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* | [**RemoveContactFromList**](docs/ContactsApi.md#removecontactfromlist) | **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* | [**RemoveContactFromList**](docs/ListsApi.md#removecontactfromlist) | **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 +*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 +*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 +*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 + + - [Model.AddContactToList](docs/AddContactToList.md) + - [Model.AddCredits](docs/AddCredits.md) + - [Model.CreateAttribute](docs/CreateAttribute.md) + - [Model.CreateAttributeEnumeration](docs/CreateAttributeEnumeration.md) + - [Model.CreateChild](docs/CreateChild.md) + - [Model.CreateContact](docs/CreateContact.md) + - [Model.CreateEmailCampaign](docs/CreateEmailCampaign.md) + - [Model.CreateEmailCampaignRecipients](docs/CreateEmailCampaignRecipients.md) + - [Model.CreateEmailCampaignSender](docs/CreateEmailCampaignSender.md) + - [Model.CreateList](docs/CreateList.md) + - [Model.CreateModel](docs/CreateModel.md) + - [Model.CreateReseller](docs/CreateReseller.md) + - [Model.CreateSender](docs/CreateSender.md) + - [Model.CreateSenderIps](docs/CreateSenderIps.md) + - [Model.CreateSenderModel](docs/CreateSenderModel.md) + - [Model.CreateSmsCampaign](docs/CreateSmsCampaign.md) + - [Model.CreateSmsCampaignRecipients](docs/CreateSmsCampaignRecipients.md) + - [Model.CreateSmtpEmail](docs/CreateSmtpEmail.md) + - [Model.CreateSmtpTemplate](docs/CreateSmtpTemplate.md) + - [Model.CreateSmtpTemplateSender](docs/CreateSmtpTemplateSender.md) + - [Model.CreateUpdateContactModel](docs/CreateUpdateContactModel.md) + - [Model.CreateUpdateFolder](docs/CreateUpdateFolder.md) + - [Model.CreateWebhook](docs/CreateWebhook.md) + - [Model.CreatedProcessId](docs/CreatedProcessId.md) + - [Model.DeleteHardbounces](docs/DeleteHardbounces.md) + - [Model.EmailExportRecipients](docs/EmailExportRecipients.md) + - [Model.ErrorModel](docs/ErrorModel.md) + - [Model.GetAccountMarketingAutomation](docs/GetAccountMarketingAutomation.md) + - [Model.GetAccountPlan](docs/GetAccountPlan.md) + - [Model.GetAccountRelay](docs/GetAccountRelay.md) + - [Model.GetAccountRelayData](docs/GetAccountRelayData.md) + - [Model.GetAggregatedReport](docs/GetAggregatedReport.md) + - [Model.GetAttributes](docs/GetAttributes.md) + - [Model.GetAttributesAttributes](docs/GetAttributesAttributes.md) + - [Model.GetAttributesEnumeration](docs/GetAttributesEnumeration.md) + - [Model.GetCampaignOverview](docs/GetCampaignOverview.md) + - [Model.GetCampaignRecipients](docs/GetCampaignRecipients.md) + - [Model.GetCampaignStats](docs/GetCampaignStats.md) + - [Model.GetChildInfoApiKeys](docs/GetChildInfoApiKeys.md) + - [Model.GetChildInfoApiKeysV2](docs/GetChildInfoApiKeysV2.md) + - [Model.GetChildInfoApiKeysV3](docs/GetChildInfoApiKeysV3.md) + - [Model.GetChildInfoCredits](docs/GetChildInfoCredits.md) + - [Model.GetChildInfoStatistics](docs/GetChildInfoStatistics.md) + - [Model.GetChildrenList](docs/GetChildrenList.md) + - [Model.GetClient](docs/GetClient.md) + - [Model.GetContactCampaignStats](docs/GetContactCampaignStats.md) + - [Model.GetContactCampaignStatsClicked](docs/GetContactCampaignStatsClicked.md) + - [Model.GetContactCampaignStatsOpened](docs/GetContactCampaignStatsOpened.md) + - [Model.GetContactCampaignStatsTransacAttributes](docs/GetContactCampaignStatsTransacAttributes.md) + - [Model.GetContactCampaignStatsUnsubscriptions](docs/GetContactCampaignStatsUnsubscriptions.md) + - [Model.GetContactDetails](docs/GetContactDetails.md) + - [Model.GetContacts](docs/GetContacts.md) + - [Model.GetEmailCampaigns](docs/GetEmailCampaigns.md) + - [Model.GetEmailEventReport](docs/GetEmailEventReport.md) + - [Model.GetEmailEventReportEvents](docs/GetEmailEventReportEvents.md) + - [Model.GetExtendedCampaignOverviewSender](docs/GetExtendedCampaignOverviewSender.md) + - [Model.GetExtendedCampaignStats](docs/GetExtendedCampaignStats.md) + - [Model.GetExtendedClientAddress](docs/GetExtendedClientAddress.md) + - [Model.GetExtendedContactDetailsStatistics](docs/GetExtendedContactDetailsStatistics.md) + - [Model.GetExtendedContactDetailsStatisticsClicked](docs/GetExtendedContactDetailsStatisticsClicked.md) + - [Model.GetExtendedContactDetailsStatisticsLinks](docs/GetExtendedContactDetailsStatisticsLinks.md) + - [Model.GetExtendedContactDetailsStatisticsMessagesSent](docs/GetExtendedContactDetailsStatisticsMessagesSent.md) + - [Model.GetExtendedContactDetailsStatisticsOpened](docs/GetExtendedContactDetailsStatisticsOpened.md) + - [Model.GetExtendedContactDetailsStatisticsUnsubscriptions](docs/GetExtendedContactDetailsStatisticsUnsubscriptions.md) + - [Model.GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription](docs/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.md) + - [Model.GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription](docs/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.md) + - [Model.GetExtendedListCampaignStats](docs/GetExtendedListCampaignStats.md) + - [Model.GetFolder](docs/GetFolder.md) + - [Model.GetFolderLists](docs/GetFolderLists.md) + - [Model.GetFolders](docs/GetFolders.md) + - [Model.GetIp](docs/GetIp.md) + - [Model.GetIpFromSender](docs/GetIpFromSender.md) + - [Model.GetIps](docs/GetIps.md) + - [Model.GetIpsFromSender](docs/GetIpsFromSender.md) + - [Model.GetList](docs/GetList.md) + - [Model.GetLists](docs/GetLists.md) + - [Model.GetProcess](docs/GetProcess.md) + - [Model.GetProcesses](docs/GetProcesses.md) + - [Model.GetReports](docs/GetReports.md) + - [Model.GetReportsReports](docs/GetReportsReports.md) + - [Model.GetSendersList](docs/GetSendersList.md) + - [Model.GetSendersListIps](docs/GetSendersListIps.md) + - [Model.GetSendersListSenders](docs/GetSendersListSenders.md) + - [Model.GetSmsCampaignOverview](docs/GetSmsCampaignOverview.md) + - [Model.GetSmsCampaignStats](docs/GetSmsCampaignStats.md) + - [Model.GetSmsCampaigns](docs/GetSmsCampaigns.md) + - [Model.GetSmsEventReport](docs/GetSmsEventReport.md) + - [Model.GetSmsEventReportEvents](docs/GetSmsEventReportEvents.md) + - [Model.GetSmtpTemplateOverview](docs/GetSmtpTemplateOverview.md) + - [Model.GetSmtpTemplateOverviewSender](docs/GetSmtpTemplateOverviewSender.md) + - [Model.GetSmtpTemplates](docs/GetSmtpTemplates.md) + - [Model.GetStatsByDomain](docs/GetStatsByDomain.md) + - [Model.GetTransacAggregatedSmsReport](docs/GetTransacAggregatedSmsReport.md) + - [Model.GetTransacSmsReport](docs/GetTransacSmsReport.md) + - [Model.GetTransacSmsReportReports](docs/GetTransacSmsReportReports.md) + - [Model.GetWebhook](docs/GetWebhook.md) + - [Model.GetWebhooks](docs/GetWebhooks.md) + - [Model.ManageIp](docs/ManageIp.md) + - [Model.PostContactInfo](docs/PostContactInfo.md) + - [Model.PostContactInfoContacts](docs/PostContactInfoContacts.md) + - [Model.PostSendFailed](docs/PostSendFailed.md) + - [Model.PostSendSmsTestFailed](docs/PostSendSmsTestFailed.md) + - [Model.RemainingCreditModel](docs/RemainingCreditModel.md) + - [Model.RemainingCreditModelChild](docs/RemainingCreditModelChild.md) + - [Model.RemainingCreditModelReseller](docs/RemainingCreditModelReseller.md) + - [Model.RemoveContactFromList](docs/RemoveContactFromList.md) + - [Model.RemoveCredits](docs/RemoveCredits.md) + - [Model.RequestContactExport](docs/RequestContactExport.md) + - [Model.RequestContactImport](docs/RequestContactImport.md) + - [Model.RequestContactImportNewList](docs/RequestContactImportNewList.md) + - [Model.RequestSmsRecipientExport](docs/RequestSmsRecipientExport.md) + - [Model.SendEmail](docs/SendEmail.md) + - [Model.SendEmailAttachment](docs/SendEmailAttachment.md) + - [Model.SendReport](docs/SendReport.md) + - [Model.SendReportEmail](docs/SendReportEmail.md) + - [Model.SendSms](docs/SendSms.md) + - [Model.SendSmtpEmail](docs/SendSmtpEmail.md) + - [Model.SendSmtpEmailAttachment](docs/SendSmtpEmailAttachment.md) + - [Model.SendSmtpEmailBcc](docs/SendSmtpEmailBcc.md) + - [Model.SendSmtpEmailCc](docs/SendSmtpEmailCc.md) + - [Model.SendSmtpEmailReplyTo](docs/SendSmtpEmailReplyTo.md) + - [Model.SendSmtpEmailSender](docs/SendSmtpEmailSender.md) + - [Model.SendSmtpEmailTo](docs/SendSmtpEmailTo.md) + - [Model.SendTemplateEmail](docs/SendTemplateEmail.md) + - [Model.SendTestEmail](docs/SendTestEmail.md) + - [Model.SendTestSms](docs/SendTestSms.md) + - [Model.SendTransacSms](docs/SendTransacSms.md) + - [Model.UpdateAttribute](docs/UpdateAttribute.md) + - [Model.UpdateAttributeEnumeration](docs/UpdateAttributeEnumeration.md) + - [Model.UpdateCampaignStatus](docs/UpdateCampaignStatus.md) + - [Model.UpdateChild](docs/UpdateChild.md) + - [Model.UpdateContact](docs/UpdateContact.md) + - [Model.UpdateEmailCampaign](docs/UpdateEmailCampaign.md) + - [Model.UpdateEmailCampaignRecipients](docs/UpdateEmailCampaignRecipients.md) + - [Model.UpdateEmailCampaignSender](docs/UpdateEmailCampaignSender.md) + - [Model.UpdateList](docs/UpdateList.md) + - [Model.UpdateSender](docs/UpdateSender.md) + - [Model.UpdateSmsCampaign](docs/UpdateSmsCampaign.md) + - [Model.UpdateSmtpTemplate](docs/UpdateSmtpTemplate.md) + - [Model.UpdateSmtpTemplateSender](docs/UpdateSmtpTemplateSender.md) + - [Model.UpdateWebhook](docs/UpdateWebhook.md) + - [Model.GetChildInfo](docs/GetChildInfo.md) + - [Model.GetExtendedCampaignOverview](docs/GetExtendedCampaignOverview.md) + - [Model.GetExtendedClient](docs/GetExtendedClient.md) + - [Model.GetExtendedContactDetails](docs/GetExtendedContactDetails.md) + - [Model.GetExtendedList](docs/GetExtendedList.md) + - [Model.GetSmsCampaign](docs/GetSmsCampaign.md) + - [Model.GetAccount](docs/GetAccount.md) + - [Model.GetEmailCampaign](docs/GetEmailCampaign.md) + + + +## Documentation for Authorization + + +### api-key + +- **Type**: API key +- **API key parameter name**: api-key +- **Location**: HTTP header + + +### partner-key + +The partner key should be passed in the request headers as `partner-key` along with `api-key` pair for successful authentication of partner (Optional). + +- **Type**: API key +- **API key parameter name**: partner-key +- **Location**: HTTP header + +If you find a bug, please post the issue on [Github](https://github.com/sendinblue/APIv3-csharp-library/issues). + +As always, if you need additional assistance, drop us a note [here](https://account.sendinblue.com/support). + +## Author + +contact@sendinblue.com \ No newline at end of file diff --git a/docs/AccountApi.md b/docs/AccountApi.md new file mode 100644 index 0000000..434f632 --- /dev/null +++ b/docs/AccountApi.md @@ -0,0 +1,73 @@ +# sib_api_v3_sdk.Api.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 +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetAccountExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new AccountApi(); + + try + { + // Get your account informations, plans and credits details + GetAccount result = apiInstance.GetAccount(); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling AccountApi.GetAccount: " + e.Message ); + } + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**GetAccount**](GetAccount.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/AddContactToList.md b/docs/AddContactToList.md new file mode 100644 index 0000000..9801726 --- /dev/null +++ b/docs/AddContactToList.md @@ -0,0 +1,9 @@ +# sib_api_v3_sdk.Model.AddContactToList +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Emails** | **List<string>** | Emails to add to a list | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/AddCredits.md b/docs/AddCredits.md new file mode 100644 index 0000000..699a9cb --- /dev/null +++ b/docs/AddCredits.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.AddCredits +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Sms** | **long?** | Required if email credits are empty. SMS credits to be added to the child account | [optional] +**Email** | **long?** | Required if sms credits are empty. Email credits to be added to the child account | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/AttributesApi.md b/docs/AttributesApi.md new file mode 100644 index 0000000..3a54d39 --- /dev/null +++ b/docs/AttributesApi.md @@ -0,0 +1,287 @@ +# sib_api_v3_sdk.Api.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** +> void CreateAttribute (string attributeCategory, string attributeName, CreateAttribute createAttribute) + +Creates contact attribute + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class CreateAttributeExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new AttributesApi(); + var attributeCategory = attributeCategory_example; // string | Category of the attribute + var attributeName = attributeName_example; // string | Name of the attribute + var createAttribute = new CreateAttribute(); // CreateAttribute | Values to create an attribute + + try + { + // Creates contact attribute + apiInstance.CreateAttribute(attributeCategory, attributeName, createAttribute); + } + catch (Exception e) + { + Debug.Print("Exception when calling AttributesApi.CreateAttribute: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attributeCategory** | **string**| Category of the attribute | + **attributeName** | **string**| Name of the attribute | + **createAttribute** | [**CreateAttribute**](CreateAttribute.md)| Values to create an attribute | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteAttribute** +> void DeleteAttribute (string attributeCategory, string attributeName) + +Deletes an attribute + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class DeleteAttributeExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new AttributesApi(); + var attributeCategory = attributeCategory_example; // string | Category of the attribute + var attributeName = attributeName_example; // string | Name of the existing attribute + + try + { + // Deletes an attribute + apiInstance.DeleteAttribute(attributeCategory, attributeName); + } + catch (Exception e) + { + Debug.Print("Exception when calling AttributesApi.DeleteAttribute: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attributeCategory** | **string**| Category of the attribute | + **attributeName** | **string**| Name of the existing attribute | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetAttributes** +> GetAttributes GetAttributes () + +Lists all attributes + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetAttributesExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new AttributesApi(); + + try + { + // Lists all attributes + GetAttributes result = apiInstance.GetAttributes(); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling AttributesApi.GetAttributes: " + e.Message ); + } + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**GetAttributes**](GetAttributes.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **UpdateAttribute** +> void UpdateAttribute (string attributeCategory, string attributeName, UpdateAttribute updateAttribute) + +Updates contact attribute + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class UpdateAttributeExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new AttributesApi(); + var attributeCategory = attributeCategory_example; // string | Category of the attribute + var attributeName = attributeName_example; // string | Name of the existing attribute + var updateAttribute = new UpdateAttribute(); // UpdateAttribute | Values to update an attribute + + try + { + // Updates contact attribute + apiInstance.UpdateAttribute(attributeCategory, attributeName, updateAttribute); + } + catch (Exception e) + { + Debug.Print("Exception when calling AttributesApi.UpdateAttribute: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attributeCategory** | **string**| Category of the attribute | + **attributeName** | **string**| Name of the existing attribute | + **updateAttribute** | [**UpdateAttribute**](UpdateAttribute.md)| Values to update an attribute | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ContactsApi.md b/docs/ContactsApi.md new file mode 100644 index 0000000..1cba241 --- /dev/null +++ b/docs/ContactsApi.md @@ -0,0 +1,1831 @@ +# sib_api_v3_sdk.Api.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 +[**DeleteContact**](ContactsApi.md#deletecontact) | **DELETE** /contacts/{email} | Deletes a contact +[**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 +[**RemoveContactFromList**](ContactsApi.md#removecontactfromlist) | **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 (long? listId, AddContactToList contactEmails) + +Add existing contacts to a list + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class AddContactToListExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ContactsApi(); + var listId = 789; // long? | Id of the list + var contactEmails = new AddContactToList(); // AddContactToList | Emails addresses of the contacts + + try + { + // Add existing contacts to a list + PostContactInfo result = apiInstance.AddContactToList(listId, contactEmails); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ContactsApi.AddContactToList: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **long?**| Id of the list | + **contactEmails** | [**AddContactToList**](AddContactToList.md)| Emails addresses of the contacts | + +### Return type + +[**PostContactInfo**](PostContactInfo.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **CreateAttribute** +> void CreateAttribute (string attributeCategory, string attributeName, CreateAttribute createAttribute) + +Creates contact attribute + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class CreateAttributeExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ContactsApi(); + var attributeCategory = attributeCategory_example; // string | Category of the attribute + var attributeName = attributeName_example; // string | Name of the attribute + var createAttribute = new CreateAttribute(); // CreateAttribute | Values to create an attribute + + try + { + // Creates contact attribute + apiInstance.CreateAttribute(attributeCategory, attributeName, createAttribute); + } + catch (Exception e) + { + Debug.Print("Exception when calling ContactsApi.CreateAttribute: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attributeCategory** | **string**| Category of the attribute | + **attributeName** | **string**| Name of the attribute | + **createAttribute** | [**CreateAttribute**](CreateAttribute.md)| Values to create an attribute | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **CreateContact** +> CreateUpdateContactModel CreateContact (CreateContact createContact) + +Create a contact + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class CreateContactExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ContactsApi(); + var createContact = new CreateContact(); // CreateContact | Values to create a contact + + try + { + // Create a contact + CreateUpdateContactModel result = apiInstance.CreateContact(createContact); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ContactsApi.CreateContact: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createContact** | [**CreateContact**](CreateContact.md)| Values to create a contact | + +### Return type + +[**CreateUpdateContactModel**](CreateUpdateContactModel.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **CreateFolder** +> CreateModel CreateFolder (CreateUpdateFolder createFolder) + +Create a folder + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class CreateFolderExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ContactsApi(); + var createFolder = new CreateUpdateFolder(); // CreateUpdateFolder | Name of the folder + + try + { + // Create a folder + CreateModel result = apiInstance.CreateFolder(createFolder); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ContactsApi.CreateFolder: " + e.Message ); + } + } + } +} +``` + +### 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **CreateList** +> CreateModel CreateList (CreateList createList) + +Create a list + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class CreateListExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ContactsApi(); + var createList = new CreateList(); // CreateList | Values to create a list + + try + { + // Create a list + CreateModel result = apiInstance.CreateList(createList); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ContactsApi.CreateList: " + e.Message ); + } + } + } +} +``` + +### 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteAttribute** +> void DeleteAttribute (string attributeCategory, string attributeName) + +Deletes an attribute + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class DeleteAttributeExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ContactsApi(); + var attributeCategory = attributeCategory_example; // string | Category of the attribute + var attributeName = attributeName_example; // string | Name of the existing attribute + + try + { + // Deletes an attribute + apiInstance.DeleteAttribute(attributeCategory, attributeName); + } + catch (Exception e) + { + Debug.Print("Exception when calling ContactsApi.DeleteAttribute: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attributeCategory** | **string**| Category of the attribute | + **attributeName** | **string**| Name of the existing attribute | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteContact** +> void DeleteContact (string email) + +Deletes a contact + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class DeleteContactExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ContactsApi(); + var email = email_example; // string | Email (urlencoded) of the contact + + try + { + // Deletes a contact + apiInstance.DeleteContact(email); + } + catch (Exception e) + { + Debug.Print("Exception when calling ContactsApi.DeleteContact: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **string**| Email (urlencoded) of the contact | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteFolder** +> void DeleteFolder (long? folderId) + +Delete a folder (and all its lists) + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class DeleteFolderExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ContactsApi(); + var folderId = 789; // long? | Id of the folder + + try + { + // Delete a folder (and all its lists) + apiInstance.DeleteFolder(folderId); + } + catch (Exception e) + { + Debug.Print("Exception when calling ContactsApi.DeleteFolder: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **folderId** | **long?**| Id of the folder | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteList** +> void DeleteList (long? listId) + +Delete a list + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class DeleteListExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ContactsApi(); + var listId = 789; // long? | Id of the list + + try + { + // Delete a list + apiInstance.DeleteList(listId); + } + catch (Exception e) + { + Debug.Print("Exception when calling ContactsApi.DeleteList: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **long?**| Id of the list | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetAttributes** +> GetAttributes GetAttributes () + +Lists all attributes + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetAttributesExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ContactsApi(); + + try + { + // Lists all attributes + GetAttributes result = apiInstance.GetAttributes(); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ContactsApi.GetAttributes: " + e.Message ); + } + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**GetAttributes**](GetAttributes.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetContactInfo** +> GetExtendedContactDetails GetContactInfo (string email) + +Retrieves contact informations + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetContactInfoExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ContactsApi(); + var email = email_example; // string | Email (urlencoded) of the contact + + try + { + // Retrieves contact informations + GetExtendedContactDetails result = apiInstance.GetContactInfo(email); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ContactsApi.GetContactInfo: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **string**| Email (urlencoded) of the contact | + +### Return type + +[**GetExtendedContactDetails**](GetExtendedContactDetails.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetContactStats** +> GetContactCampaignStats GetContactStats (string email) + +Get the campaigns statistics for a contact + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetContactStatsExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ContactsApi(); + var email = email_example; // string | Email address (urlencoded) of the contact + + try + { + // Get the campaigns statistics for a contact + GetContactCampaignStats result = apiInstance.GetContactStats(email); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ContactsApi.GetContactStats: " + e.Message ); + } + } + } +} +``` + +### 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetContacts** +> GetContacts GetContacts (long? limit = null, long? offset = null, DateTime? modifiedSince = null) + +Get all the contacts + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetContactsExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ContactsApi(); + var limit = 789; // long? | Number of documents per page (optional) (default to 50) + var offset = 789; // long? | Index of the first document of the page (optional) (default to 0) + var modifiedSince = 2013-10-20T19:20:30+01:00; // DateTime? | 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) + + try + { + // Get all the contacts + GetContacts result = apiInstance.GetContacts(limit, offset, modifiedSince); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ContactsApi.GetContacts: " + e.Message ); + } + } + } +} +``` + +### 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** | **DateTime?**| 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetContactsFromList** +> GetContacts GetContactsFromList (long? listId, DateTime? modifiedSince = null, long? limit = null, long? offset = null) + +Get the contacts in a list + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetContactsFromListExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ContactsApi(); + var listId = 789; // long? | Id of the list + var modifiedSince = 2013-10-20T19:20:30+01:00; // DateTime? | 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) + var limit = 789; // long? | Number of documents per page (optional) (default to 50) + var offset = 789; // long? | Index of the first document of the page (optional) (default to 0) + + try + { + // Get the contacts in a list + GetContacts result = apiInstance.GetContactsFromList(listId, modifiedSince, limit, offset); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ContactsApi.GetContactsFromList: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **long?**| Id of the list | + **modifiedSince** | **DateTime?**| 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetFolder** +> GetFolder GetFolder (long? folderId) + +Returns folder details + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetFolderExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ContactsApi(); + var folderId = 789; // long? | id of the folder + + try + { + // Returns folder details + GetFolder result = apiInstance.GetFolder(folderId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ContactsApi.GetFolder: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **folderId** | **long?**| id of the folder | + +### Return type + +[**GetFolder**](GetFolder.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetFolderLists** +> GetFolderLists GetFolderLists (long? folderId, long? limit = null, long? offset = null) + +Get the lists in a folder + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetFolderListsExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ContactsApi(); + var folderId = 789; // long? | Id of the folder + var limit = 789; // long? | Number of documents per page (optional) (default to 10) + var offset = 789; // long? | Index of the first document of the page (optional) (default to 0) + + try + { + // Get the lists in a folder + GetFolderLists result = apiInstance.GetFolderLists(folderId, limit, offset); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ContactsApi.GetFolderLists: " + e.Message ); + } + } + } +} +``` + +### 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetFolders** +> GetFolders GetFolders (long? limit, long? offset) + +Get all the folders + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetFoldersExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ContactsApi(); + var limit = 789; // long? | Number of documents per page (default to 10) + var offset = 789; // long? | Index of the first document of the page (default to 0) + + try + { + // Get all the folders + GetFolders result = apiInstance.GetFolders(limit, offset); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ContactsApi.GetFolders: " + e.Message ); + } + } + } +} +``` + +### 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetList** +> GetExtendedList GetList (long? listId) + +Get the details of a list + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetListExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ContactsApi(); + var listId = 789; // long? | Id of the list + + try + { + // Get the details of a list + GetExtendedList result = apiInstance.GetList(listId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ContactsApi.GetList: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **long?**| Id of the list | + +### Return type + +[**GetExtendedList**](GetExtendedList.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetLists** +> GetLists GetLists (long? limit = null, long? offset = null) + +Get all the lists + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetListsExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ContactsApi(); + var limit = 789; // long? | Number of documents per page (optional) (default to 10) + var offset = 789; // long? | Index of the first document of the page (optional) (default to 0) + + try + { + // Get all the lists + GetLists result = apiInstance.GetLists(limit, offset); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ContactsApi.GetLists: " + e.Message ); + } + } + } +} +``` + +### 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **ImportContacts** +> CreatedProcessId ImportContacts (RequestContactImport requestContactImport) + +Import contacts + +It returns the background process ID which on completion calls the notify URL that you have set in the input. + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class ImportContactsExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ContactsApi(); + var 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 + { + // Import contacts + CreatedProcessId result = apiInstance.ImportContacts(requestContactImport); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ContactsApi.ImportContacts: " + e.Message ); + } + } + } +} +``` + +### 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **RemoveContactFromList** +> PostContactInfo RemoveContactFromList (long? listId, RemoveContactFromList contactEmails) + +Remove existing contacts from a list + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class RemoveContactFromListExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ContactsApi(); + var listId = 789; // long? | Id of the list + var contactEmails = new RemoveContactFromList(); // RemoveContactFromList | Emails adresses of the contact + + try + { + // Remove existing contacts from a list + PostContactInfo result = apiInstance.RemoveContactFromList(listId, contactEmails); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ContactsApi.RemoveContactFromList: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **long?**| Id of the list | + **contactEmails** | [**RemoveContactFromList**](RemoveContactFromList.md)| Emails adresses of the contact | + +### Return type + +[**PostContactInfo**](PostContactInfo.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **RequestContactExport** +> CreatedProcessId RequestContactExport (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 +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class RequestContactExportExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ContactsApi(); + var requestContactExport = new RequestContactExport(); // RequestContactExport | Values to request a contact export + + try + { + // Export contacts + CreatedProcessId result = apiInstance.RequestContactExport(requestContactExport); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ContactsApi.RequestContactExport: " + e.Message ); + } + } + } +} +``` + +### 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **UpdateAttribute** +> void UpdateAttribute (string attributeCategory, string attributeName, UpdateAttribute updateAttribute) + +Updates contact attribute + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class UpdateAttributeExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ContactsApi(); + var attributeCategory = attributeCategory_example; // string | Category of the attribute + var attributeName = attributeName_example; // string | Name of the existing attribute + var updateAttribute = new UpdateAttribute(); // UpdateAttribute | Values to update an attribute + + try + { + // Updates contact attribute + apiInstance.UpdateAttribute(attributeCategory, attributeName, updateAttribute); + } + catch (Exception e) + { + Debug.Print("Exception when calling ContactsApi.UpdateAttribute: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attributeCategory** | **string**| Category of the attribute | + **attributeName** | **string**| Name of the existing attribute | + **updateAttribute** | [**UpdateAttribute**](UpdateAttribute.md)| Values to update an attribute | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **UpdateContact** +> void UpdateContact (string email, UpdateContact updateContact) + +Updates a contact + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class UpdateContactExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ContactsApi(); + var email = email_example; // string | Email (urlencoded) of the contact + var updateContact = new UpdateContact(); // UpdateContact | Values to update a contact + + try + { + // Updates a contact + apiInstance.UpdateContact(email, updateContact); + } + catch (Exception e) + { + Debug.Print("Exception when calling ContactsApi.UpdateContact: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **string**| Email (urlencoded) of the contact | + **updateContact** | [**UpdateContact**](UpdateContact.md)| Values to update a contact | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **UpdateFolder** +> void UpdateFolder (long? folderId, CreateUpdateFolder updateFolder) + +Update a contact folder + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class UpdateFolderExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ContactsApi(); + var folderId = 789; // long? | Id of the folder + var updateFolder = new CreateUpdateFolder(); // CreateUpdateFolder | Name of the folder + + try + { + // Update a contact folder + apiInstance.UpdateFolder(folderId, updateFolder); + } + catch (Exception e) + { + Debug.Print("Exception when calling ContactsApi.UpdateFolder: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **folderId** | **long?**| Id of the folder | + **updateFolder** | [**CreateUpdateFolder**](CreateUpdateFolder.md)| Name of the folder | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **UpdateList** +> void UpdateList (long? listId, UpdateList updateList) + +Update a list + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class UpdateListExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ContactsApi(); + var listId = 789; // long? | Id of the list + var updateList = new UpdateList(); // UpdateList | Values to update a list + + try + { + // Update a list + apiInstance.UpdateList(listId, updateList); + } + catch (Exception e) + { + Debug.Print("Exception when calling ContactsApi.UpdateList: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **long?**| Id of the list | + **updateList** | [**UpdateList**](UpdateList.md)| Values to update a list | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/CreateAttribute.md b/docs/CreateAttribute.md new file mode 100644 index 0000000..2243d6d --- /dev/null +++ b/docs/CreateAttribute.md @@ -0,0 +1,11 @@ +# sib_api_v3_sdk.Model.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) | List of values and labels that the attribute can take. Use only if the attribute's category is \"category\". For example, [{'value':1, 'label':'male'}, {'value':2, 'label':'female'}] | [optional] +**Type** | **string** | Type of the attribute. Use only if the attribute's category is 'normal', 'category' or 'transactional' ( type 'boolean' is only available if the category is 'normal' attribute, type 'id' is only available if the category is 'transactional' attribute & type 'category' is only available if the category is 'category' attribute ) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateAttributeEnumeration.md b/docs/CreateAttributeEnumeration.md new file mode 100644 index 0000000..daefa2a --- /dev/null +++ b/docs/CreateAttributeEnumeration.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.CreateAttributeEnumeration +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **int?** | Id of the value | +**Label** | **string** | Label of the value | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateChild.md b/docs/CreateChild.md new file mode 100644 index 0000000..e55dfe7 --- /dev/null +++ b/docs/CreateChild.md @@ -0,0 +1,13 @@ +# sib_api_v3_sdk.Model.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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateContact.md b/docs/CreateContact.md new file mode 100644 index 0000000..64f84c0 --- /dev/null +++ b/docs/CreateContact.md @@ -0,0 +1,15 @@ +# sib_api_v3_sdk.Model.CreateContact +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | Email address of the user. Mandatory if \"sms\" field is not passed in \"attributes\" parameter' | [optional] +**Attributes** | **Object** | Pass the set of attributes and their values. These attributes must be present in your SendinBlue account. For eg. {'FNAME':'Elly', 'LNAME':'Roger'} | [optional] +**EmailBlacklisted** | **bool?** | Set this field to blacklist the contact for emails (emailBlacklisted = true) | [optional] +**SmsBlacklisted** | **bool?** | Set this field to blacklist the contact for SMS (smsBlacklisted = true) | [optional] +**ListIds** | **List<long?>** | Ids of the lists to add the contact to | [optional] +**UpdateEnabled** | **bool?** | Facilitate to update the existing contact in the same request (updateEnabled = true) | [optional] [default to false] +**SmtpBlacklistSender** | **List<string>** | SMTP forbidden sender for contact. Use only for email Contact ( only available if updateEnabled = true ) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateEmailCampaign.md b/docs/CreateEmailCampaign.md new file mode 100644 index 0000000..c916fbe --- /dev/null +++ b/docs/CreateEmailCampaign.md @@ -0,0 +1,33 @@ +# sib_api_v3_sdk.Model.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 and templateId are empty. Body of the message (HTML) | [optional] +**HtmlUrl** | **string** | Mandatory if htmlContent and templateId are empty. Url to the message (HTML) | [optional] +**TemplateId** | **long?** | Mandatory if htmlContent and htmlUrl are empty. Id of the SMTP template with status 'active'. Used to copy only its content fetched from htmlContent/htmlUrl to an email campaign for RSS feature. | [optional] +**ScheduledAt** | **DateTime?** | Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part). | [optional] +**Subject** | **string** | Subject of the campaign. Mandatory if abTesting is false. Ignored if abTesting is true. | [optional] +**ReplyTo** | **string** | Email on which the campaign recipients will be able to reply to | [optional] +**ToField** | **string** | To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization | [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** | **bool?** | 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] [default to false] +**MirrorActive** | **bool?** | Use true to enable the mirror link | [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] +**Params** | **Object** | Pass the set of attributes to customize the type classic campaign. For example, {'FNAME':'Joe', 'LNAME':'Doe'}. Only available if 'type' is 'classic'. It's considered only if campaign is in New Template Language format. The New Template Language is dependent on the values of 'subject', 'htmlContent/htmlUrl', 'sender.name' & 'toField' | [optional] +**SendAtBestTime** | **bool?** | Set this to true if you want to send your campaign at best time. | [optional] [default to false] +**AbTesting** | **bool?** | Status of A/B Test. abTesting = false means it is disabled, & abTesting = true means it is enabled. 'subjectA', 'subjectB', 'splitRule', 'winnerCriteria' & 'winnerDelay' will be considered when abTesting is set to true. 'subjectA' & 'subjectB' are mandatory together & 'subject' if passed is ignored. Can be set to true only if 'sendAtBestTime' is 'false'. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B | [optional] [default to false] +**SubjectA** | **string** | Subject A of the campaign. Mandatory if abTesting = true. subjectA & subjectB should have unique value | [optional] +**SubjectB** | **string** | Subject B of the campaign. Mandatory if abTesting = true. subjectA & subjectB should have unique value | [optional] +**SplitRule** | **long?** | Add the size of your test groups. Mandatory if abTesting = true & 'recipients' is passed. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else | [optional] +**WinnerCriteria** | **string** | Choose the metrics that will determinate the winning version. Mandatory if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerCriteria' is ignored if passed | [optional] +**WinnerDelay** | **long?** | Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. Mandatory if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerDelay' is ignored if passed | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateEmailCampaignRecipients.md b/docs/CreateEmailCampaignRecipients.md new file mode 100644 index 0000000..5b66d95 --- /dev/null +++ b/docs/CreateEmailCampaignRecipients.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.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] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateEmailCampaignSender.md b/docs/CreateEmailCampaignSender.md new file mode 100644 index 0000000..98c25af --- /dev/null +++ b/docs/CreateEmailCampaignSender.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.CreateEmailCampaignSender +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Sender Name | [optional] +**Email** | **string** | Sender email | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateList.md b/docs/CreateList.md new file mode 100644 index 0000000..ea7f209 --- /dev/null +++ b/docs/CreateList.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.CreateList +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of the list | +**FolderId** | **long?** | Id of the parent folder in which this list is to be created | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateModel.md b/docs/CreateModel.md new file mode 100644 index 0000000..891f56c --- /dev/null +++ b/docs/CreateModel.md @@ -0,0 +1,9 @@ +# sib_api_v3_sdk.Model.CreateModel +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **long?** | ID of the object created | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateReseller.md b/docs/CreateReseller.md new file mode 100644 index 0000000..f2bfea1 --- /dev/null +++ b/docs/CreateReseller.md @@ -0,0 +1,9 @@ +# sib_api_v3_sdk.Model.CreateReseller +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AuthKey** | **string** | AuthKey of Reseller child created | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateSender.md b/docs/CreateSender.md new file mode 100644 index 0000000..8aee417 --- /dev/null +++ b/docs/CreateSender.md @@ -0,0 +1,11 @@ +# sib_api_v3_sdk.Model.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] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateSenderIps.md b/docs/CreateSenderIps.md new file mode 100644 index 0000000..8ecfd96 --- /dev/null +++ b/docs/CreateSenderIps.md @@ -0,0 +1,11 @@ +# sib_api_v3_sdk.Model.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] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateSenderModel.md b/docs/CreateSenderModel.md new file mode 100644 index 0000000..9d1bdb4 --- /dev/null +++ b/docs/CreateSenderModel.md @@ -0,0 +1,11 @@ +# sib_api_v3_sdk.Model.CreateSenderModel +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **long?** | ID of the Sender created | +**SpfError** | **bool?** | Status of SPF configuration for the sender (true = SPF not well configured, false = SPF well configured) | [optional] +**DkimError** | **bool?** | Status of DKIM configuration for the sender (true = DKIM not well configured, false = DKIM well configured) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateSmsCampaign.md b/docs/CreateSmsCampaign.md new file mode 100644 index 0000000..18c1a0f --- /dev/null +++ b/docs/CreateSmsCampaign.md @@ -0,0 +1,13 @@ +# sib_api_v3_sdk.Model.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 | +**Recipients** | [**CreateSmsCampaignRecipients**](CreateSmsCampaignRecipients.md) | | [optional] +**ScheduledAt** | **DateTime?** | 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] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateSmsCampaignRecipients.md b/docs/CreateSmsCampaignRecipients.md new file mode 100644 index 0000000..fc16a9e --- /dev/null +++ b/docs/CreateSmsCampaignRecipients.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.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 | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateSmtpEmail.md b/docs/CreateSmtpEmail.md new file mode 100644 index 0000000..d56b26d --- /dev/null +++ b/docs/CreateSmtpEmail.md @@ -0,0 +1,9 @@ +# sib_api_v3_sdk.Model.CreateSmtpEmail +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MessageId** | **string** | Message ID of the SMTP Email sent | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateSmtpTemplate.md b/docs/CreateSmtpTemplate.md new file mode 100644 index 0000000..87aa9b9 --- /dev/null +++ b/docs/CreateSmtpTemplate.md @@ -0,0 +1,18 @@ +# sib_api_v3_sdk.Model.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** | To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization | [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** | **bool?** | Status of template. isActive = true means template is active and isActive = false means template is inactive | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateSmtpTemplateSender.md b/docs/CreateSmtpTemplateSender.md new file mode 100644 index 0000000..f6b0c6f --- /dev/null +++ b/docs/CreateSmtpTemplateSender.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateUpdateContactModel.md b/docs/CreateUpdateContactModel.md new file mode 100644 index 0000000..f3814f6 --- /dev/null +++ b/docs/CreateUpdateContactModel.md @@ -0,0 +1,9 @@ +# sib_api_v3_sdk.Model.CreateUpdateContactModel +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **long?** | ID of the contact when a new contact is created | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateUpdateFolder.md b/docs/CreateUpdateFolder.md new file mode 100644 index 0000000..cd78cc4 --- /dev/null +++ b/docs/CreateUpdateFolder.md @@ -0,0 +1,9 @@ +# sib_api_v3_sdk.Model.CreateUpdateFolder +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of the folder | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateWebhook.md b/docs/CreateWebhook.md new file mode 100644 index 0000000..c5884b4 --- /dev/null +++ b/docs/CreateWebhook.md @@ -0,0 +1,12 @@ +# sib_api_v3_sdk.Model.CreateWebhook +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Url** | **string** | URL of the webhook | +**Description** | **string** | Description of the webhook | [optional] +**Events** | **List<string>** | 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 | +**Type** | **string** | Type of the webhook | [optional] [default to TypeEnum.Transactional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreatedProcessId.md b/docs/CreatedProcessId.md new file mode 100644 index 0000000..d8baf0b --- /dev/null +++ b/docs/CreatedProcessId.md @@ -0,0 +1,9 @@ +# sib_api_v3_sdk.Model.CreatedProcessId +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ProcessId** | **long?** | Id of the process created | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/DeleteHardbounces.md b/docs/DeleteHardbounces.md new file mode 100644 index 0000000..08d32ea --- /dev/null +++ b/docs/DeleteHardbounces.md @@ -0,0 +1,11 @@ +# sib_api_v3_sdk.Model.DeleteHardbounces +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StartDate** | **string** | Starting date (YYYY-MM-DD) of the time period for deletion. The hardbounces occurred after this date will be deleted. Must be less than or equal to the endDate | [optional] +**EndDate** | **string** | Ending date (YYYY-MM-DD) of the time period for deletion. The hardbounces until this date will be deleted. Must be greater than or equal to the startDate | [optional] +**ContactEmail** | **string** | Target a specific email address | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/EmailCampaignsApi.md b/docs/EmailCampaignsApi.md new file mode 100644 index 0000000..db33312 --- /dev/null +++ b/docs/EmailCampaignsApi.md @@ -0,0 +1,714 @@ +# sib_api_v3_sdk.Api.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 (CreateEmailCampaign emailCampaigns) + +Create an email campaign + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class CreateEmailCampaignExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new EmailCampaignsApi(); + var emailCampaigns = new CreateEmailCampaign(); // CreateEmailCampaign | Values to create a campaign + + try + { + // Create an email campaign + CreateModel result = apiInstance.CreateEmailCampaign(emailCampaigns); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling EmailCampaignsApi.CreateEmailCampaign: " + e.Message ); + } + } + } +} +``` + +### 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteEmailCampaign** +> void DeleteEmailCampaign (long? campaignId) + +Delete an email campaign + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class DeleteEmailCampaignExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new EmailCampaignsApi(); + var campaignId = 789; // long? | id of the campaign + + try + { + // Delete an email campaign + apiInstance.DeleteEmailCampaign(campaignId); + } + catch (Exception e) + { + Debug.Print("Exception when calling EmailCampaignsApi.DeleteEmailCampaign: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **long?**| id of the campaign | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **EmailExportRecipients** +> CreatedProcessId EmailExportRecipients (long? campaignId, EmailExportRecipients recipientExport = null) + +Export the recipients of a campaign + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class EmailExportRecipientsExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new EmailCampaignsApi(); + var campaignId = 789; // long? | Id of the campaign + var recipientExport = new EmailExportRecipients(); // EmailExportRecipients | Values to send for a recipient export request (optional) + + try + { + // Export the recipients of a campaign + CreatedProcessId result = apiInstance.EmailExportRecipients(campaignId, recipientExport); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling EmailCampaignsApi.EmailExportRecipients: " + e.Message ); + } + } + } +} +``` + +### 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetEmailCampaign** +> GetEmailCampaign GetEmailCampaign (long? campaignId) + +Get campaign informations + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetEmailCampaignExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new EmailCampaignsApi(); + var campaignId = 789; // long? | Id of the campaign + + try + { + // Get campaign informations + GetEmailCampaign result = apiInstance.GetEmailCampaign(campaignId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling EmailCampaignsApi.GetEmailCampaign: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **long?**| Id of the campaign | + +### Return type + +[**GetEmailCampaign**](GetEmailCampaign.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetEmailCampaigns** +> GetEmailCampaigns GetEmailCampaigns (string type = null, string status = null, DateTime? startDate = null, DateTime? endDate = null, long? limit = null, long? offset = null) + +Return all your created campaigns + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetEmailCampaignsExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new EmailCampaignsApi(); + var type = type_example; // string | Filter on the type of the campaigns (optional) + var status = status_example; // string | Filter on the status of the campaign (optional) + var startDate = 2013-10-20T19:20:30+01:00; // DateTime? | Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + var endDate = 2013-10-20T19:20:30+01:00; // DateTime? | Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + var limit = 789; // long? | Number of documents per page (optional) (default to 500) + var offset = 789; // long? | Index of the first document in the page (optional) (default to 0) + + try + { + // Return all your created campaigns + GetEmailCampaigns result = apiInstance.GetEmailCampaigns(type, status, startDate, endDate, limit, offset); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling EmailCampaignsApi.GetEmailCampaigns: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **type** | **string**| Filter on the type of the campaigns | [optional] + **status** | **string**| Filter on the status of the campaign | [optional] + **startDate** | **DateTime?**| Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) | [optional] + **endDate** | **DateTime?**| Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) | [optional] + **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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **SendEmailCampaignNow** +> void SendEmailCampaignNow (long? campaignId) + +Send an email campaign id of the campaign immediately + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class SendEmailCampaignNowExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new EmailCampaignsApi(); + var campaignId = 789; // long? | Id of the campaign + + try + { + // Send an email campaign id of the campaign immediately + apiInstance.SendEmailCampaignNow(campaignId); + } + catch (Exception e) + { + Debug.Print("Exception when calling EmailCampaignsApi.SendEmailCampaignNow: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **long?**| Id of the campaign | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **SendReport** +> void SendReport (long? campaignId, SendReport sendReport) + +Send the report of a campaigns + +A PDF will be sent to the specified email addresses + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class SendReportExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new EmailCampaignsApi(); + var campaignId = 789; // long? | Id of the campaign + var sendReport = new SendReport(); // SendReport | Values for send a report + + try + { + // Send the report of a campaigns + apiInstance.SendReport(campaignId, sendReport); + } + catch (Exception e) + { + Debug.Print("Exception when calling EmailCampaignsApi.SendReport: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **long?**| Id of the campaign | + **sendReport** | [**SendReport**](SendReport.md)| Values for send a report | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **SendTestEmail** +> void SendTestEmail (long? campaignId, SendTestEmail emailTo) + +Send an email campaign to your test list + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class SendTestEmailExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new EmailCampaignsApi(); + var campaignId = 789; // long? | Id of the campaign + var emailTo = new SendTestEmail(); // SendTestEmail | + + try + { + // Send an email campaign to your test list + apiInstance.SendTestEmail(campaignId, emailTo); + } + catch (Exception e) + { + Debug.Print("Exception when calling EmailCampaignsApi.SendTestEmail: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **long?**| Id of the campaign | + **emailTo** | [**SendTestEmail**](SendTestEmail.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **UpdateCampaignStatus** +> void UpdateCampaignStatus (long? campaignId, UpdateCampaignStatus status) + +Update a campaign status + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class UpdateCampaignStatusExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new EmailCampaignsApi(); + var campaignId = 789; // long? | Id of the campaign + var status = new UpdateCampaignStatus(); // UpdateCampaignStatus | Status of the campaign + + try + { + // Update a campaign status + apiInstance.UpdateCampaignStatus(campaignId, status); + } + catch (Exception e) + { + Debug.Print("Exception when calling EmailCampaignsApi.UpdateCampaignStatus: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **long?**| Id of the campaign | + **status** | [**UpdateCampaignStatus**](UpdateCampaignStatus.md)| Status of the campaign | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **UpdateEmailCampaign** +> void UpdateEmailCampaign (long? campaignId, UpdateEmailCampaign emailCampaign) + +Update a campaign + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class UpdateEmailCampaignExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new EmailCampaignsApi(); + var campaignId = 789; // long? | Id of the campaign + var emailCampaign = new UpdateEmailCampaign(); // UpdateEmailCampaign | Values to update a campaign + + try + { + // Update a campaign + apiInstance.UpdateEmailCampaign(campaignId, emailCampaign); + } + catch (Exception e) + { + Debug.Print("Exception when calling EmailCampaignsApi.UpdateEmailCampaign: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **long?**| Id of the campaign | + **emailCampaign** | [**UpdateEmailCampaign**](UpdateEmailCampaign.md)| Values to update a campaign | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/EmailExportRecipients.md b/docs/EmailExportRecipients.md new file mode 100644 index 0000000..dbeadd6 --- /dev/null +++ b/docs/EmailExportRecipients.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.EmailExportRecipients +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NotifyURL** | **string** | Webhook called once the export process is finished | [optional] +**RecipientsType** | **string** | Type of recipients to export for a campaign | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/ErrorModel.md b/docs/ErrorModel.md new file mode 100644 index 0000000..e301052 --- /dev/null +++ b/docs/ErrorModel.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.ErrorModel +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | **string** | Error code displayed in case of a failure | +**Message** | **string** | Readable message associated to the failure | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/FoldersApi.md b/docs/FoldersApi.md new file mode 100644 index 0000000..e33b31d --- /dev/null +++ b/docs/FoldersApi.md @@ -0,0 +1,428 @@ +# sib_api_v3_sdk.Api.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 (CreateUpdateFolder createFolder) + +Create a folder + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class CreateFolderExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new FoldersApi(); + var createFolder = new CreateUpdateFolder(); // CreateUpdateFolder | Name of the folder + + try + { + // Create a folder + CreateModel result = apiInstance.CreateFolder(createFolder); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling FoldersApi.CreateFolder: " + e.Message ); + } + } + } +} +``` + +### 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteFolder** +> void DeleteFolder (long? folderId) + +Delete a folder (and all its lists) + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class DeleteFolderExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new FoldersApi(); + var folderId = 789; // long? | Id of the folder + + try + { + // Delete a folder (and all its lists) + apiInstance.DeleteFolder(folderId); + } + catch (Exception e) + { + Debug.Print("Exception when calling FoldersApi.DeleteFolder: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **folderId** | **long?**| Id of the folder | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetFolder** +> GetFolder GetFolder (long? folderId) + +Returns folder details + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetFolderExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new FoldersApi(); + var folderId = 789; // long? | id of the folder + + try + { + // Returns folder details + GetFolder result = apiInstance.GetFolder(folderId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling FoldersApi.GetFolder: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **folderId** | **long?**| id of the folder | + +### Return type + +[**GetFolder**](GetFolder.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetFolderLists** +> GetFolderLists GetFolderLists (long? folderId, long? limit = null, long? offset = null) + +Get the lists in a folder + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetFolderListsExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new FoldersApi(); + var folderId = 789; // long? | Id of the folder + var limit = 789; // long? | Number of documents per page (optional) (default to 10) + var offset = 789; // long? | Index of the first document of the page (optional) (default to 0) + + try + { + // Get the lists in a folder + GetFolderLists result = apiInstance.GetFolderLists(folderId, limit, offset); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling FoldersApi.GetFolderLists: " + e.Message ); + } + } + } +} +``` + +### 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetFolders** +> GetFolders GetFolders (long? limit, long? offset) + +Get all the folders + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetFoldersExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new FoldersApi(); + var limit = 789; // long? | Number of documents per page (default to 10) + var offset = 789; // long? | Index of the first document of the page (default to 0) + + try + { + // Get all the folders + GetFolders result = apiInstance.GetFolders(limit, offset); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling FoldersApi.GetFolders: " + e.Message ); + } + } + } +} +``` + +### 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **UpdateFolder** +> void UpdateFolder (long? folderId, CreateUpdateFolder updateFolder) + +Update a contact folder + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class UpdateFolderExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new FoldersApi(); + var folderId = 789; // long? | Id of the folder + var updateFolder = new CreateUpdateFolder(); // CreateUpdateFolder | Name of the folder + + try + { + // Update a contact folder + apiInstance.UpdateFolder(folderId, updateFolder); + } + catch (Exception e) + { + Debug.Print("Exception when calling FoldersApi.UpdateFolder: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **folderId** | **long?**| Id of the folder | + **updateFolder** | [**CreateUpdateFolder**](CreateUpdateFolder.md)| Name of the folder | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/GetAccount.md b/docs/GetAccount.md new file mode 100644 index 0000000..fa67959 --- /dev/null +++ b/docs/GetAccount.md @@ -0,0 +1,16 @@ +# sib_api_v3_sdk.Model.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] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetAccountMarketingAutomation.md b/docs/GetAccountMarketingAutomation.md new file mode 100644 index 0000000..b3ad46e --- /dev/null +++ b/docs/GetAccountMarketingAutomation.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.GetAccountMarketingAutomation +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Key** | **string** | Marketing Automation Tracker ID | [optional] +**Enabled** | **bool?** | Status of Marketing Automation Plateform activation for your account (true=enabled, false=disabled) | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetAccountPlan.md b/docs/GetAccountPlan.md new file mode 100644 index 0000000..46c1358 --- /dev/null +++ b/docs/GetAccountPlan.md @@ -0,0 +1,14 @@ +# sib_api_v3_sdk.Model.GetAccountPlan +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | Displays the plan type of the user | +**CreditsType** | **string** | This is the type of the credit, \"Send Limit\" is one of the possible types of credit of a user. \"Send Limit\" implies the total number of emails you can send to the subscribers in your account. | +**Credits** | **float?** | Remaining credits of the user | +**StartDate** | **DateTime?** | Date of the period from which the plan will start (only available for \"subscription\" and \"reseller\" plan type) | [optional] +**EndDate** | **DateTime?** | Date of the period from which the plan will end (only available for \"subscription\" and \"reseller\" plan type) | [optional] +**UserLimit** | **int?** | Only in case of reseller account. It implies the total number of child accounts you can add to your account. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetAccountRelay.md b/docs/GetAccountRelay.md new file mode 100644 index 0000000..a9969d9 --- /dev/null +++ b/docs/GetAccountRelay.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.GetAccountRelay +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool?** | Status of your SMTP Account (true=Enabled, false=Disabled) | +**Data** | [**GetAccountRelayData**](GetAccountRelayData.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetAccountRelayData.md b/docs/GetAccountRelayData.md new file mode 100644 index 0000000..5191ea1 --- /dev/null +++ b/docs/GetAccountRelayData.md @@ -0,0 +1,11 @@ +# sib_api_v3_sdk.Model.GetAccountRelayData +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**UserName** | **string** | Email to use as login on SMTP | +**Relay** | **string** | URL of the SMTP Relay | +**Port** | **int?** | Port used for SMTP Relay | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetAggregatedReport.md b/docs/GetAggregatedReport.md new file mode 100644 index 0000000..257c582 --- /dev/null +++ b/docs/GetAggregatedReport.md @@ -0,0 +1,21 @@ +# sib_api_v3_sdk.Model.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 | +**Unsubscribed** | **long?** | Number of unsubscribed emails for the timeframe | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetAttributes.md b/docs/GetAttributes.md new file mode 100644 index 0000000..8deb33a --- /dev/null +++ b/docs/GetAttributes.md @@ -0,0 +1,9 @@ +# sib_api_v3_sdk.Model.GetAttributes +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | [**List<GetAttributesAttributes>**](GetAttributesAttributes.md) | Listing of available contact attributes in your account | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetAttributesAttributes.md b/docs/GetAttributesAttributes.md new file mode 100644 index 0000000..1078599 --- /dev/null +++ b/docs/GetAttributesAttributes.md @@ -0,0 +1,13 @@ +# sib_api_v3_sdk.Model.GetAttributesAttributes +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of the attribute | +**Category** | **string** | Category of the attribute | +**Type** | **string** | Type of the attribute | [optional] +**Enumeration** | [**List<GetAttributesEnumeration>**](GetAttributesEnumeration.md) | Parameter only available for \"category\" type attributes. | [optional] +**CalculatedValue** | **string** | Calculated value formula | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetAttributesEnumeration.md b/docs/GetAttributesEnumeration.md new file mode 100644 index 0000000..6a8de68 --- /dev/null +++ b/docs/GetAttributesEnumeration.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.GetAttributesEnumeration +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **long?** | ID of Value of the \"category\" type attribute | +**Label** | **string** | Label of the \"category\" type attribute | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetCampaignOverview.md b/docs/GetCampaignOverview.md new file mode 100644 index 0000000..4c8e0d9 --- /dev/null +++ b/docs/GetCampaignOverview.md @@ -0,0 +1,21 @@ +# sib_api_v3_sdk.Model.GetCampaignOverview +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **long?** | ID of the campaign | +**Name** | **string** | Name of the campaign | +**Subject** | **string** | Subject of the campaign. Only available if `abTesting` flag of the campaign is `false` | [optional] +**Type** | **string** | Type of campaign | +**Status** | **string** | Status of the campaign | +**ScheduledAt** | **DateTime?** | UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) | [optional] +**AbTesting** | **bool?** | Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled. | [optional] +**SubjectA** | **string** | Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` | [optional] +**SubjectB** | **string** | Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` | [optional] +**SplitRule** | **int?** | The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true` | [optional] +**WinnerCriteria** | **string** | Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true` | [optional] +**WinnerDelay** | **int?** | The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true` | [optional] +**SendAtBestTime** | **bool?** | It is true if you have chosen to send your campaign at best time, otherwise it is false | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetCampaignRecipients.md b/docs/GetCampaignRecipients.md new file mode 100644 index 0000000..d32bb00 --- /dev/null +++ b/docs/GetCampaignRecipients.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.GetCampaignRecipients +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Lists** | **List<long?>** | | +**ExclusionLists** | **List<long?>** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetCampaignStats.md b/docs/GetCampaignStats.md new file mode 100644 index 0000000..7fede07 --- /dev/null +++ b/docs/GetCampaignStats.md @@ -0,0 +1,20 @@ +# sib_api_v3_sdk.Model.GetCampaignStats +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ListId** | **long?** | List Id of email campaign (only in case of get email campaign(s)(not for global stats)) | [optional] +**UniqueClicks** | **long?** | Number of unique clicks for the campaign | +**Clickers** | **long?** | Number of total 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 | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetChildInfo.md b/docs/GetChildInfo.md new file mode 100644 index 0000000..23d6389 --- /dev/null +++ b/docs/GetChildInfo.md @@ -0,0 +1,17 @@ +# sib_api_v3_sdk.Model.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] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetChildInfoApiKeys.md b/docs/GetChildInfoApiKeys.md new file mode 100644 index 0000000..fe758f1 --- /dev/null +++ b/docs/GetChildInfoApiKeys.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.GetChildInfoApiKeys +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**V2** | [**List<GetChildInfoApiKeysV2>**](GetChildInfoApiKeysV2.md) | | +**V3** | [**List<GetChildInfoApiKeysV3>**](GetChildInfoApiKeysV3.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetChildInfoApiKeysV2.md b/docs/GetChildInfoApiKeysV2.md new file mode 100644 index 0000000..69eabc3 --- /dev/null +++ b/docs/GetChildInfoApiKeysV2.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.GetChildInfoApiKeysV2 +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of the key for version 2 | +**Key** | **string** | API Key for version 2 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetChildInfoApiKeysV3.md b/docs/GetChildInfoApiKeysV3.md new file mode 100644 index 0000000..d3094ff --- /dev/null +++ b/docs/GetChildInfoApiKeysV3.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.GetChildInfoApiKeysV3 +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of the key for version 3 | +**Key** | **string** | API Key for version 3 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetChildInfoCredits.md b/docs/GetChildInfoCredits.md new file mode 100644 index 0000000..4209459 --- /dev/null +++ b/docs/GetChildInfoCredits.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.GetChildInfoCredits +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EmailCredits** | **long?** | Email credits available for your child | [optional] +**SmsCredits** | **long?** | SMS credits available for your child | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetChildInfoStatistics.md b/docs/GetChildInfoStatistics.md new file mode 100644 index 0000000..5816e29 --- /dev/null +++ b/docs/GetChildInfoStatistics.md @@ -0,0 +1,11 @@ +# sib_api_v3_sdk.Model.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] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetChildrenList.md b/docs/GetChildrenList.md new file mode 100644 index 0000000..88678a1 --- /dev/null +++ b/docs/GetChildrenList.md @@ -0,0 +1,9 @@ +# sib_api_v3_sdk.Model.GetChildrenList +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Children** | **List<Object>** | Your children's account information | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetClient.md b/docs/GetClient.md new file mode 100644 index 0000000..17a4c85 --- /dev/null +++ b/docs/GetClient.md @@ -0,0 +1,12 @@ +# sib_api_v3_sdk.Model.GetClient +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | Login Email | +**FirstName** | **string** | First Name | +**LastName** | **string** | Last Name | +**CompanyName** | **string** | Name of the company | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetContactCampaignStats.md b/docs/GetContactCampaignStats.md new file mode 100644 index 0000000..46ce0b9 --- /dev/null +++ b/docs/GetContactCampaignStats.md @@ -0,0 +1,16 @@ +# sib_api_v3_sdk.Model.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] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetContactCampaignStatsClicked.md b/docs/GetContactCampaignStatsClicked.md new file mode 100644 index 0000000..b0d36d1 --- /dev/null +++ b/docs/GetContactCampaignStatsClicked.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.GetContactCampaignStatsClicked +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CampaignId** | **long?** | ID of the campaign which generated the event | +**Links** | [**List<GetExtendedContactDetailsStatisticsLinks>**](GetExtendedContactDetailsStatisticsLinks.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetContactCampaignStatsOpened.md b/docs/GetContactCampaignStatsOpened.md new file mode 100644 index 0000000..7b402c9 --- /dev/null +++ b/docs/GetContactCampaignStatsOpened.md @@ -0,0 +1,12 @@ +# sib_api_v3_sdk.Model.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** | **DateTime?** | UTC date-time of the event | +**Ip** | **string** | IP from which the user has opened the campaign | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetContactCampaignStatsTransacAttributes.md b/docs/GetContactCampaignStatsTransacAttributes.md new file mode 100644 index 0000000..a614641 --- /dev/null +++ b/docs/GetContactCampaignStatsTransacAttributes.md @@ -0,0 +1,11 @@ +# sib_api_v3_sdk.Model.GetContactCampaignStatsTransacAttributes +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**OrderDate** | **DateTime?** | Date of the order | +**OrderPrice** | **float?** | Price of the order | +**OrderId** | **long?** | ID of the order | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetContactCampaignStatsUnsubscriptions.md b/docs/GetContactCampaignStatsUnsubscriptions.md new file mode 100644 index 0000000..cf35064 --- /dev/null +++ b/docs/GetContactCampaignStatsUnsubscriptions.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetContactDetails.md b/docs/GetContactDetails.md new file mode 100644 index 0000000..7980b77 --- /dev/null +++ b/docs/GetContactDetails.md @@ -0,0 +1,17 @@ +# sib_api_v3_sdk.Model.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** | **bool?** | Blacklist status for email campaigns (true=blacklisted, false=not blacklisted) | +**SmsBlacklisted** | **bool?** | Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted) | +**CreatedAt** | **DateTime?** | Creation UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**ModifiedAt** | **DateTime?** | Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**ListIds** | **List<long?>** | | +**ListUnsubscribed** | **List<long?>** | | [optional] +**Attributes** | **Object** | Set of attributes of the contact | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetContacts.md b/docs/GetContacts.md new file mode 100644 index 0000000..cb894ce --- /dev/null +++ b/docs/GetContacts.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.GetContacts +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Contacts** | **List<Object>** | | +**Count** | **long?** | Number of contacts | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetEmailCampaign.md b/docs/GetEmailCampaign.md new file mode 100644 index 0000000..968fcf9 --- /dev/null +++ b/docs/GetEmailCampaign.md @@ -0,0 +1,38 @@ +# sib_api_v3_sdk.Model.GetEmailCampaign +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **long?** | ID of the campaign | +**Name** | **string** | Name of the campaign | +**Subject** | **string** | Subject of the campaign. Only available if `abTesting` flag of the campaign is `false` | [optional] +**Type** | **string** | Type of campaign | +**Status** | **string** | Status of the campaign | +**ScheduledAt** | **DateTime?** | UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) | [optional] +**AbTesting** | **bool?** | Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled. | [optional] +**SubjectA** | **string** | Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` | [optional] +**SubjectB** | **string** | Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` | [optional] +**SplitRule** | **int?** | The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true` | [optional] +**WinnerCriteria** | **string** | Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true` | [optional] +**WinnerDelay** | **int?** | The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true` | [optional] +**SendAtBestTime** | **bool?** | It is true if you have chosen to send your campaign at best time, otherwise it is false | [optional] +**TestSent** | **bool?** | 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** | **DateTime?** | Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**ModifiedAt** | **DateTime?** | UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**InlineImageActivation** | **bool?** | Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. | [optional] +**MirrorActive** | **bool?** | 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** | **bool?** | 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] +**SentDate** | **DateTime?** | Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent' | [optional] +**Recipients** | **Object** | | +**Statistics** | **Object** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetEmailCampaigns.md b/docs/GetEmailCampaigns.md new file mode 100644 index 0000000..47c8e87 --- /dev/null +++ b/docs/GetEmailCampaigns.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.GetEmailCampaigns +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Campaigns** | **List<Object>** | | [optional] +**Count** | **long?** | Number of Email campaigns retrieved | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetEmailEventReport.md b/docs/GetEmailEventReport.md new file mode 100644 index 0000000..ffc837a --- /dev/null +++ b/docs/GetEmailEventReport.md @@ -0,0 +1,9 @@ +# sib_api_v3_sdk.Model.GetEmailEventReport +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Events** | [**List<GetEmailEventReportEvents>**](GetEmailEventReportEvents.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetEmailEventReportEvents.md b/docs/GetEmailEventReportEvents.md new file mode 100644 index 0000000..5867499 --- /dev/null +++ b/docs/GetEmailEventReportEvents.md @@ -0,0 +1,18 @@ +# sib_api_v3_sdk.Model.GetEmailEventReportEvents +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | Email address which generates the event | +**Date** | **DateTime?** | 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** | **string** | 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 | [optional] +**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 | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetExtendedCampaignOverview.md b/docs/GetExtendedCampaignOverview.md new file mode 100644 index 0000000..e5e3836 --- /dev/null +++ b/docs/GetExtendedCampaignOverview.md @@ -0,0 +1,36 @@ +# sib_api_v3_sdk.Model.GetExtendedCampaignOverview +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **long?** | ID of the campaign | +**Name** | **string** | Name of the campaign | +**Subject** | **string** | Subject of the campaign. Only available if `abTesting` flag of the campaign is `false` | [optional] +**Type** | **string** | Type of campaign | +**Status** | **string** | Status of the campaign | +**ScheduledAt** | **DateTime?** | UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) | [optional] +**AbTesting** | **bool?** | Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled. | [optional] +**SubjectA** | **string** | Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` | [optional] +**SubjectB** | **string** | Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` | [optional] +**SplitRule** | **int?** | The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true` | [optional] +**WinnerCriteria** | **string** | Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true` | [optional] +**WinnerDelay** | **int?** | The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true` | [optional] +**SendAtBestTime** | **bool?** | It is true if you have chosen to send your campaign at best time, otherwise it is false | [optional] +**TestSent** | **bool?** | 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** | **DateTime?** | Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**ModifiedAt** | **DateTime?** | UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**InlineImageActivation** | **bool?** | Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. | [optional] +**MirrorActive** | **bool?** | 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** | **bool?** | 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] +**SentDate** | **DateTime?** | Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent' | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetExtendedCampaignOverviewSender.md b/docs/GetExtendedCampaignOverviewSender.md new file mode 100644 index 0000000..6f73a57 --- /dev/null +++ b/docs/GetExtendedCampaignOverviewSender.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.GetExtendedCampaignOverviewSender +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Sender name of the campaign | [optional] +**Email** | **string** | Sender email of the campaign | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetExtendedCampaignStats.md b/docs/GetExtendedCampaignStats.md new file mode 100644 index 0000000..bbdeffe --- /dev/null +++ b/docs/GetExtendedCampaignStats.md @@ -0,0 +1,14 @@ +# sib_api_v3_sdk.Model.GetExtendedCampaignStats +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**GlobalStats** | **Object** | Overall statistics of the campaign | +**CampaignStats** | **List<Object>** | List-wise statistics of the campaign. | +**MirrorClick** | **long?** | Number of clicks on mirror link | +**Remaining** | **long?** | Number of remaning emails to send | +**LinksStats** | **Object** | Statistics about the number of clicks for the links | +**StatsByDomain** | [**GetStatsByDomain**](GetStatsByDomain.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetExtendedClient.md b/docs/GetExtendedClient.md new file mode 100644 index 0000000..08af3c8 --- /dev/null +++ b/docs/GetExtendedClient.md @@ -0,0 +1,13 @@ +# sib_api_v3_sdk.Model.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) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetExtendedClientAddress.md b/docs/GetExtendedClientAddress.md new file mode 100644 index 0000000..b312cb6 --- /dev/null +++ b/docs/GetExtendedClientAddress.md @@ -0,0 +1,12 @@ +# sib_api_v3_sdk.Model.GetExtendedClientAddress +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Street** | **string** | Street information | +**City** | **string** | City information | +**ZipCode** | **string** | Zip Code information | +**Country** | **string** | Country information | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetExtendedContactDetails.md b/docs/GetExtendedContactDetails.md new file mode 100644 index 0000000..8fa6ca9 --- /dev/null +++ b/docs/GetExtendedContactDetails.md @@ -0,0 +1,18 @@ +# sib_api_v3_sdk.Model.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** | **bool?** | Blacklist status for email campaigns (true=blacklisted, false=not blacklisted) | +**SmsBlacklisted** | **bool?** | Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted) | +**CreatedAt** | **DateTime?** | Creation UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**ModifiedAt** | **DateTime?** | Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**ListIds** | **List<long?>** | | +**ListUnsubscribed** | **List<long?>** | | [optional] +**Attributes** | **Object** | Set of attributes of the contact | +**Statistics** | [**GetExtendedContactDetailsStatistics**](GetExtendedContactDetailsStatistics.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetExtendedContactDetailsStatistics.md b/docs/GetExtendedContactDetailsStatistics.md new file mode 100644 index 0000000..0226277 --- /dev/null +++ b/docs/GetExtendedContactDetailsStatistics.md @@ -0,0 +1,16 @@ +# sib_api_v3_sdk.Model.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] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetExtendedContactDetailsStatisticsClicked.md b/docs/GetExtendedContactDetailsStatisticsClicked.md new file mode 100644 index 0000000..44d2cf9 --- /dev/null +++ b/docs/GetExtendedContactDetailsStatisticsClicked.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetExtendedContactDetailsStatisticsLinks.md b/docs/GetExtendedContactDetailsStatisticsLinks.md new file mode 100644 index 0000000..5090a1e --- /dev/null +++ b/docs/GetExtendedContactDetailsStatisticsLinks.md @@ -0,0 +1,12 @@ +# sib_api_v3_sdk.Model.GetExtendedContactDetailsStatisticsLinks +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | **long?** | Number of clicks on this link for the campaign | +**EventTime** | **DateTime?** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetExtendedContactDetailsStatisticsMessagesSent.md b/docs/GetExtendedContactDetailsStatisticsMessagesSent.md new file mode 100644 index 0000000..19b9f91 --- /dev/null +++ b/docs/GetExtendedContactDetailsStatisticsMessagesSent.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.GetExtendedContactDetailsStatisticsMessagesSent +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CampaignId** | **long?** | ID of the campaign which generated the event | +**EventTime** | **DateTime?** | UTC date-time of the event | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetExtendedContactDetailsStatisticsOpened.md b/docs/GetExtendedContactDetailsStatisticsOpened.md new file mode 100644 index 0000000..42cf81f --- /dev/null +++ b/docs/GetExtendedContactDetailsStatisticsOpened.md @@ -0,0 +1,12 @@ +# sib_api_v3_sdk.Model.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** | **DateTime?** | UTC date-time of the event | +**Ip** | **string** | IP from which the user has opened the email | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetExtendedContactDetailsStatisticsUnsubscriptions.md b/docs/GetExtendedContactDetailsStatisticsUnsubscriptions.md new file mode 100644 index 0000000..8a858ad --- /dev/null +++ b/docs/GetExtendedContactDetailsStatisticsUnsubscriptions.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.md b/docs/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.md new file mode 100644 index 0000000..0c9d219 --- /dev/null +++ b/docs/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EventTime** | **DateTime?** | UTC date-time of the event | +**Ip** | **string** | IP from which the user has been unsubscribed | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.md b/docs/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.md new file mode 100644 index 0000000..99a074c --- /dev/null +++ b/docs/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.md @@ -0,0 +1,11 @@ +# sib_api_v3_sdk.Model.GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CampaignId** | **long?** | ID of the campaign which generated the event | +**EventTime** | **DateTime?** | UTC date-time of the event | +**Ip** | **string** | IP from which the user has unsubscribed | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetExtendedList.md b/docs/GetExtendedList.md new file mode 100644 index 0000000..33f341b --- /dev/null +++ b/docs/GetExtendedList.md @@ -0,0 +1,16 @@ +# sib_api_v3_sdk.Model.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** | **DateTime?** | Creation UTC date-time of the list (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**CampaignStats** | [**List<GetExtendedListCampaignStats>**](GetExtendedListCampaignStats.md) | | [optional] +**DynamicList** | **bool?** | Status telling if the list is dynamic or not (true=dynamic, false=not dynamic) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetExtendedListCampaignStats.md b/docs/GetExtendedListCampaignStats.md new file mode 100644 index 0000000..2bea38e --- /dev/null +++ b/docs/GetExtendedListCampaignStats.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.GetExtendedListCampaignStats +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CampaignId** | **long?** | ID of the campaign | +**Stats** | [**GetCampaignStats**](GetCampaignStats.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetFolder.md b/docs/GetFolder.md new file mode 100644 index 0000000..3459032 --- /dev/null +++ b/docs/GetFolder.md @@ -0,0 +1,13 @@ +# sib_api_v3_sdk.Model.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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetFolderLists.md b/docs/GetFolderLists.md new file mode 100644 index 0000000..a2e4d62 --- /dev/null +++ b/docs/GetFolderLists.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.GetFolderLists +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Lists** | **List<Object>** | | +**Count** | **long?** | Number of lists in the folder | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetFolders.md b/docs/GetFolders.md new file mode 100644 index 0000000..d06056f --- /dev/null +++ b/docs/GetFolders.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.GetFolders +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Folders** | **List<Object>** | | [optional] +**Count** | **long?** | Number of folders available in your account | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetIp.md b/docs/GetIp.md new file mode 100644 index 0000000..c957cfb --- /dev/null +++ b/docs/GetIp.md @@ -0,0 +1,12 @@ +# sib_api_v3_sdk.Model.GetIp +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **long?** | ID of the dedicated IP | +**Ip** | **string** | Dedicated IP | +**Active** | **bool?** | Status of the IP (true=active, false=inactive) | +**Domain** | **string** | Domain associated to the IP | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetIpFromSender.md b/docs/GetIpFromSender.md new file mode 100644 index 0000000..4ff6d7b --- /dev/null +++ b/docs/GetIpFromSender.md @@ -0,0 +1,12 @@ +# sib_api_v3_sdk.Model.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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetIps.md b/docs/GetIps.md new file mode 100644 index 0000000..9b9cd91 --- /dev/null +++ b/docs/GetIps.md @@ -0,0 +1,9 @@ +# sib_api_v3_sdk.Model.GetIps +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ips** | [**List<GetIp>**](GetIp.md) | Dedicated IP(s) available on your account | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetIpsFromSender.md b/docs/GetIpsFromSender.md new file mode 100644 index 0000000..19548ab --- /dev/null +++ b/docs/GetIpsFromSender.md @@ -0,0 +1,9 @@ +# sib_api_v3_sdk.Model.GetIpsFromSender +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ips** | [**List<GetIpFromSender>**](GetIpFromSender.md) | Dedicated IP(s) linked to a sender | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetList.md b/docs/GetList.md new file mode 100644 index 0000000..563a7b2 --- /dev/null +++ b/docs/GetList.md @@ -0,0 +1,12 @@ +# sib_api_v3_sdk.Model.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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetLists.md b/docs/GetLists.md new file mode 100644 index 0000000..72da3c3 --- /dev/null +++ b/docs/GetLists.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetProcess.md b/docs/GetProcess.md new file mode 100644 index 0000000..01a11e2 --- /dev/null +++ b/docs/GetProcess.md @@ -0,0 +1,12 @@ +# sib_api_v3_sdk.Model.GetProcess +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **long?** | Id of the process | +**Status** | **string** | Status of the process | +**Name** | **string** | Process name | +**ExportUrl** | **string** | URL on which send export the of contacts once the process is completed | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetProcesses.md b/docs/GetProcesses.md new file mode 100644 index 0000000..3028d33 --- /dev/null +++ b/docs/GetProcesses.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetReports.md b/docs/GetReports.md new file mode 100644 index 0000000..e0fe66c --- /dev/null +++ b/docs/GetReports.md @@ -0,0 +1,9 @@ +# sib_api_v3_sdk.Model.GetReports +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Reports** | [**List<GetReportsReports>**](GetReportsReports.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetReportsReports.md b/docs/GetReportsReports.md new file mode 100644 index 0000000..82a5b48 --- /dev/null +++ b/docs/GetReportsReports.md @@ -0,0 +1,21 @@ +# sib_api_v3_sdk.Model.GetReportsReports +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Date** | **DateTime?** | 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 | +**Unsubscribed** | **long?** | Number of unsubscribed emails for the date | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetSendersList.md b/docs/GetSendersList.md new file mode 100644 index 0000000..9ec41ac --- /dev/null +++ b/docs/GetSendersList.md @@ -0,0 +1,9 @@ +# sib_api_v3_sdk.Model.GetSendersList +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Senders** | [**List<GetSendersListSenders>**](GetSendersListSenders.md) | List of the senders available in your account | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetSendersListIps.md b/docs/GetSendersListIps.md new file mode 100644 index 0000000..10cb281 --- /dev/null +++ b/docs/GetSendersListIps.md @@ -0,0 +1,11 @@ +# sib_api_v3_sdk.Model.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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetSendersListSenders.md b/docs/GetSendersListSenders.md new file mode 100644 index 0000000..41bd074 --- /dev/null +++ b/docs/GetSendersListSenders.md @@ -0,0 +1,13 @@ +# sib_api_v3_sdk.Model.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** | **bool?** | 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] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetSmsCampaign.md b/docs/GetSmsCampaign.md new file mode 100644 index 0000000..fd56c16 --- /dev/null +++ b/docs/GetSmsCampaign.md @@ -0,0 +1,18 @@ +# sib_api_v3_sdk.Model.GetSmsCampaign +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **long?** | ID of the SMS Campaign | +**Name** | **string** | Name of the SMS Campaign | +**Status** | **string** | Status of the SMS Campaign | +**Content** | **string** | Content of the SMS Campaign | +**ScheduledAt** | **DateTime?** | UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format | +**Sender** | **string** | Sender of the SMS Campaign | +**CreatedAt** | **DateTime?** | Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**ModifiedAt** | **DateTime?** | UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**Recipients** | **Object** | | +**Statistics** | **Object** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetSmsCampaignOverview.md b/docs/GetSmsCampaignOverview.md new file mode 100644 index 0000000..6d5e374 --- /dev/null +++ b/docs/GetSmsCampaignOverview.md @@ -0,0 +1,16 @@ +# sib_api_v3_sdk.Model.GetSmsCampaignOverview +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **long?** | ID of the SMS Campaign | +**Name** | **string** | Name of the SMS Campaign | +**Status** | **string** | Status of the SMS Campaign | +**Content** | **string** | Content of the SMS Campaign | +**ScheduledAt** | **DateTime?** | UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format | +**Sender** | **string** | Sender of the SMS Campaign | +**CreatedAt** | **DateTime?** | Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**ModifiedAt** | **DateTime?** | UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetSmsCampaignStats.md b/docs/GetSmsCampaignStats.md new file mode 100644 index 0000000..c7e04ab --- /dev/null +++ b/docs/GetSmsCampaignStats.md @@ -0,0 +1,15 @@ +# sib_api_v3_sdk.Model.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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetSmsCampaigns.md b/docs/GetSmsCampaigns.md new file mode 100644 index 0000000..e642c11 --- /dev/null +++ b/docs/GetSmsCampaigns.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.GetSmsCampaigns +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Campaigns** | **List<Object>** | | [optional] +**Count** | **long?** | Number of SMS campaigns retrieved | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetSmsEventReport.md b/docs/GetSmsEventReport.md new file mode 100644 index 0000000..d4e6ee0 --- /dev/null +++ b/docs/GetSmsEventReport.md @@ -0,0 +1,9 @@ +# sib_api_v3_sdk.Model.GetSmsEventReport +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Events** | [**List<GetSmsEventReportEvents>**](GetSmsEventReportEvents.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetSmsEventReportEvents.md b/docs/GetSmsEventReportEvents.md new file mode 100644 index 0000000..a293ea4 --- /dev/null +++ b/docs/GetSmsEventReportEvents.md @@ -0,0 +1,15 @@ +# sib_api_v3_sdk.Model.GetSmsEventReportEvents +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PhoneNumber** | **string** | Phone number which has generated the event | +**Date** | **DateTime?** | UTC date-time on which the event has been generated | +**MessageId** | **string** | Message ID which generated the event | +**Event** | **string** | 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] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetSmtpTemplateOverview.md b/docs/GetSmtpTemplateOverview.md new file mode 100644 index 0000000..af41f91 --- /dev/null +++ b/docs/GetSmtpTemplateOverview.md @@ -0,0 +1,20 @@ +# sib_api_v3_sdk.Model.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** | **bool?** | Status of template (true=active, false=inactive) | +**TestSent** | **bool?** | 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** | **DateTime?** | Creation UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**ModifiedAt** | **DateTime?** | Last modification UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ) | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetSmtpTemplateOverviewSender.md b/docs/GetSmtpTemplateOverviewSender.md new file mode 100644 index 0000000..c0ec8f7 --- /dev/null +++ b/docs/GetSmtpTemplateOverviewSender.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.GetSmtpTemplateOverviewSender +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | From email for the template | [optional] +**Email** | **string** | From email for the template | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetSmtpTemplates.md b/docs/GetSmtpTemplates.md new file mode 100644 index 0000000..9db6370 --- /dev/null +++ b/docs/GetSmtpTemplates.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.GetSmtpTemplates +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | **long?** | Count of smtp templates | [optional] +**Templates** | [**List<GetSmtpTemplateOverview>**](GetSmtpTemplateOverview.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetStatsByDomain.md b/docs/GetStatsByDomain.md new file mode 100644 index 0000000..6ef5162 --- /dev/null +++ b/docs/GetStatsByDomain.md @@ -0,0 +1,8 @@ +# sib_api_v3_sdk.Model.GetStatsByDomain +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetTransacAggregatedSmsReport.md b/docs/GetTransacAggregatedSmsReport.md new file mode 100644 index 0000000..b61685f --- /dev/null +++ b/docs/GetTransacAggregatedSmsReport.md @@ -0,0 +1,18 @@ +# sib_api_v3_sdk.Model.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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetTransacSmsReport.md b/docs/GetTransacSmsReport.md new file mode 100644 index 0000000..a21ece9 --- /dev/null +++ b/docs/GetTransacSmsReport.md @@ -0,0 +1,9 @@ +# sib_api_v3_sdk.Model.GetTransacSmsReport +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Reports** | [**List<GetTransacSmsReportReports>**](GetTransacSmsReportReports.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetTransacSmsReportReports.md b/docs/GetTransacSmsReportReports.md new file mode 100644 index 0000000..c2abb44 --- /dev/null +++ b/docs/GetTransacSmsReportReports.md @@ -0,0 +1,18 @@ +# sib_api_v3_sdk.Model.GetTransacSmsReportReports +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Date** | **DateTime?** | 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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetWebhook.md b/docs/GetWebhook.md new file mode 100644 index 0000000..6c85b20 --- /dev/null +++ b/docs/GetWebhook.md @@ -0,0 +1,15 @@ +# sib_api_v3_sdk.Model.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** | **string** | Type of webhook (marketing or transac) | +**CreatedAt** | **DateTime?** | Creation UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) | +**ModifiedAt** | **DateTime?** | Last modification UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetWebhooks.md b/docs/GetWebhooks.md new file mode 100644 index 0000000..331f459 --- /dev/null +++ b/docs/GetWebhooks.md @@ -0,0 +1,9 @@ +# sib_api_v3_sdk.Model.GetWebhooks +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Webhooks** | **List<Object>** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/ListsApi.md b/docs/ListsApi.md new file mode 100644 index 0000000..8a98206 --- /dev/null +++ b/docs/ListsApi.md @@ -0,0 +1,645 @@ +# sib_api_v3_sdk.Api.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 +[**RemoveContactFromList**](ListsApi.md#removecontactfromlist) | **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 (long? listId, AddContactToList contactEmails) + +Add existing contacts to a list + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class AddContactToListExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ListsApi(); + var listId = 789; // long? | Id of the list + var contactEmails = new AddContactToList(); // AddContactToList | Emails addresses of the contacts + + try + { + // Add existing contacts to a list + PostContactInfo result = apiInstance.AddContactToList(listId, contactEmails); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ListsApi.AddContactToList: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **long?**| Id of the list | + **contactEmails** | [**AddContactToList**](AddContactToList.md)| Emails addresses of the contacts | + +### Return type + +[**PostContactInfo**](PostContactInfo.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **CreateList** +> CreateModel CreateList (CreateList createList) + +Create a list + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class CreateListExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ListsApi(); + var createList = new CreateList(); // CreateList | Values to create a list + + try + { + // Create a list + CreateModel result = apiInstance.CreateList(createList); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ListsApi.CreateList: " + e.Message ); + } + } + } +} +``` + +### 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteList** +> void DeleteList (long? listId) + +Delete a list + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class DeleteListExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ListsApi(); + var listId = 789; // long? | Id of the list + + try + { + // Delete a list + apiInstance.DeleteList(listId); + } + catch (Exception e) + { + Debug.Print("Exception when calling ListsApi.DeleteList: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **long?**| Id of the list | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetContactsFromList** +> GetContacts GetContactsFromList (long? listId, DateTime? modifiedSince = null, long? limit = null, long? offset = null) + +Get the contacts in a list + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetContactsFromListExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ListsApi(); + var listId = 789; // long? | Id of the list + var modifiedSince = 2013-10-20T19:20:30+01:00; // DateTime? | 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) + var limit = 789; // long? | Number of documents per page (optional) (default to 50) + var offset = 789; // long? | Index of the first document of the page (optional) (default to 0) + + try + { + // Get the contacts in a list + GetContacts result = apiInstance.GetContactsFromList(listId, modifiedSince, limit, offset); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ListsApi.GetContactsFromList: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **long?**| Id of the list | + **modifiedSince** | **DateTime?**| 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetFolderLists** +> GetFolderLists GetFolderLists (long? folderId, long? limit = null, long? offset = null) + +Get the lists in a folder + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetFolderListsExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ListsApi(); + var folderId = 789; // long? | Id of the folder + var limit = 789; // long? | Number of documents per page (optional) (default to 10) + var offset = 789; // long? | Index of the first document of the page (optional) (default to 0) + + try + { + // Get the lists in a folder + GetFolderLists result = apiInstance.GetFolderLists(folderId, limit, offset); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ListsApi.GetFolderLists: " + e.Message ); + } + } + } +} +``` + +### 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetList** +> GetExtendedList GetList (long? listId) + +Get the details of a list + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetListExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ListsApi(); + var listId = 789; // long? | Id of the list + + try + { + // Get the details of a list + GetExtendedList result = apiInstance.GetList(listId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ListsApi.GetList: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **long?**| Id of the list | + +### Return type + +[**GetExtendedList**](GetExtendedList.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetLists** +> GetLists GetLists (long? limit = null, long? offset = null) + +Get all the lists + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetListsExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ListsApi(); + var limit = 789; // long? | Number of documents per page (optional) (default to 10) + var offset = 789; // long? | Index of the first document of the page (optional) (default to 0) + + try + { + // Get all the lists + GetLists result = apiInstance.GetLists(limit, offset); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ListsApi.GetLists: " + e.Message ); + } + } + } +} +``` + +### 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **RemoveContactFromList** +> PostContactInfo RemoveContactFromList (long? listId, RemoveContactFromList contactEmails) + +Remove existing contacts from a list + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class RemoveContactFromListExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ListsApi(); + var listId = 789; // long? | Id of the list + var contactEmails = new RemoveContactFromList(); // RemoveContactFromList | Emails adresses of the contact + + try + { + // Remove existing contacts from a list + PostContactInfo result = apiInstance.RemoveContactFromList(listId, contactEmails); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ListsApi.RemoveContactFromList: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **long?**| Id of the list | + **contactEmails** | [**RemoveContactFromList**](RemoveContactFromList.md)| Emails adresses of the contact | + +### Return type + +[**PostContactInfo**](PostContactInfo.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **UpdateList** +> void UpdateList (long? listId, UpdateList updateList) + +Update a list + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class UpdateListExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ListsApi(); + var listId = 789; // long? | Id of the list + var updateList = new UpdateList(); // UpdateList | Values to update a list + + try + { + // Update a list + apiInstance.UpdateList(listId, updateList); + } + catch (Exception e) + { + Debug.Print("Exception when calling ListsApi.UpdateList: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **listId** | **long?**| Id of the list | + **updateList** | [**UpdateList**](UpdateList.md)| Values to update a list | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ManageIp.md b/docs/ManageIp.md new file mode 100644 index 0000000..3587f0c --- /dev/null +++ b/docs/ManageIp.md @@ -0,0 +1,9 @@ +# sib_api_v3_sdk.Model.ManageIp +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | Dedicated ID | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/PostContactInfo.md b/docs/PostContactInfo.md new file mode 100644 index 0000000..e062bbf --- /dev/null +++ b/docs/PostContactInfo.md @@ -0,0 +1,9 @@ +# sib_api_v3_sdk.Model.PostContactInfo +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Contacts** | [**PostContactInfoContacts**](PostContactInfoContacts.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/PostContactInfoContacts.md b/docs/PostContactInfoContacts.md new file mode 100644 index 0000000..807b51a --- /dev/null +++ b/docs/PostContactInfoContacts.md @@ -0,0 +1,11 @@ +# sib_api_v3_sdk.Model.PostContactInfoContacts +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Success** | **List<string>** | | [optional] +**Failure** | **List<string>** | | [optional] +**Total** | **long?** | Displays the count of total number of contacts removed from list when user opts for \"all\" option. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/PostSendFailed.md b/docs/PostSendFailed.md new file mode 100644 index 0000000..14671bb --- /dev/null +++ b/docs/PostSendFailed.md @@ -0,0 +1,13 @@ +# sib_api_v3_sdk.Model.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] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/PostSendSmsTestFailed.md b/docs/PostSendSmsTestFailed.md new file mode 100644 index 0000000..3aded13 --- /dev/null +++ b/docs/PostSendSmsTestFailed.md @@ -0,0 +1,12 @@ +# sib_api_v3_sdk.Model.PostSendSmsTestFailed +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | **long?** | Response code | +**Message** | **string** | Response message | +**UnexistingSms** | **List<string>** | | [optional] +**WithoutListSms** | **List<string>** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/ProcessApi.md b/docs/ProcessApi.md new file mode 100644 index 0000000..3bf23df --- /dev/null +++ b/docs/ProcessApi.md @@ -0,0 +1,148 @@ +# sib_api_v3_sdk.Api.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 (long? processId) + +Return the informations for a process + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetProcessExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ProcessApi(); + var processId = 789; // long? | Id of the process + + try + { + // Return the informations for a process + GetProcess result = apiInstance.GetProcess(processId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ProcessApi.GetProcess: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **processId** | **long?**| Id of the process | + +### Return type + +[**GetProcess**](GetProcess.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetProcesses** +> GetProcesses GetProcesses (long? limit = null, long? offset = null) + +Return all the processes for your account + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetProcessesExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ProcessApi(); + var limit = 789; // long? | Number limitation for the result returned (optional) (default to 10) + var offset = 789; // long? | Beginning point in the list to retrieve from. (optional) (default to 0) + + try + { + // Return all the processes for your account + GetProcesses result = apiInstance.GetProcesses(limit, offset); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ProcessApi.GetProcesses: " + e.Message ); + } + } + } +} +``` + +### 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/RemainingCreditModel.md b/docs/RemainingCreditModel.md new file mode 100644 index 0000000..3dcbd13 --- /dev/null +++ b/docs/RemainingCreditModel.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.RemainingCreditModel +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Child** | [**RemainingCreditModelChild**](RemainingCreditModelChild.md) | | +**Reseller** | [**RemainingCreditModelReseller**](RemainingCreditModelReseller.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/RemainingCreditModelChild.md b/docs/RemainingCreditModelChild.md new file mode 100644 index 0000000..f9f4cc0 --- /dev/null +++ b/docs/RemainingCreditModelChild.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.RemainingCreditModelChild +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Sms** | **long?** | SMS Credits remaining for child account | +**Email** | **long?** | Email Credits remaining for child account | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/RemainingCreditModelReseller.md b/docs/RemainingCreditModelReseller.md new file mode 100644 index 0000000..3bc6376 --- /dev/null +++ b/docs/RemainingCreditModelReseller.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.RemainingCreditModelReseller +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Sms** | **long?** | SMS Credits remaining for reseller account | +**Email** | **long?** | Email Credits remaining for reseller account | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/RemoveContactFromList.md b/docs/RemoveContactFromList.md new file mode 100644 index 0000000..b9444b1 --- /dev/null +++ b/docs/RemoveContactFromList.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.RemoveContactFromList +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Emails** | **List<string>** | Required if 'all' is false. Emails to remove from a list | [optional] +**All** | **bool?** | Required if 'emails' is empty. Remove all existing contacts from a list | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/RemoveCredits.md b/docs/RemoveCredits.md new file mode 100644 index 0000000..1b3d392 --- /dev/null +++ b/docs/RemoveCredits.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.RemoveCredits +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Sms** | **long?** | Required if email credits are empty. SMS credits to be removed from the child account | [optional] +**Email** | **long?** | Required if sms credits are empty. Email credits to be removed from the child account | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/RequestContactExport.md b/docs/RequestContactExport.md new file mode 100644 index 0000000..f5b3802 --- /dev/null +++ b/docs/RequestContactExport.md @@ -0,0 +1,11 @@ +# sib_api_v3_sdk.Model.RequestContactExport +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ExportAttributes** | **List<string>** | List of all the attributes that you want to export. These attributes must be present in your contact database. For example, ['fname', 'lname', 'email']. | [optional] +**ContactFilter** | **Object** | Set the filter for the contacts to be exported. For example, {'blacklisted':true} will export all the blacklisted contacts. | +**NotifyUrl** | **string** | Webhook that will be called once the export process is finished | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/RequestContactImport.md b/docs/RequestContactImport.md new file mode 100644 index 0000000..bb7a643 --- /dev/null +++ b/docs/RequestContactImport.md @@ -0,0 +1,17 @@ +# sib_api_v3_sdk.Model.RequestContactImport +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FileUrl** | **string** | Mandatory if fileBody is not defined. URL of the file to be imported (no local file). Possible file formats: .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?>** | Mandatory if newList is not defined. Ids of the lists in which the contacts shall be imported. For example, [2, 4, 7]. | [optional] +**NotifyUrl** | **string** | URL that will be called once the export process is finished | [optional] +**NewList** | [**RequestContactImportNewList**](RequestContactImportNewList.md) | | [optional] +**EmailBlacklist** | **bool?** | To blacklist all the contacts for email | [optional] [default to false] +**SmsBlacklist** | **bool?** | To blacklist all the contacts for sms | [optional] [default to false] +**UpdateExistingContacts** | **bool?** | To facilitate the choice to update the existing contacts | [optional] [default to true] +**EmptyContactsAttributes** | **bool?** | To facilitate the choice to erase any attribute of the existing contacts with empty value. emptyContactsAttributes = true means the empty fields in your import will erase any attribute that currently contain data in SendinBlue, & emptyContactsAttributes = false means the empty fields will not affect your existing data ( only available if `updateExistingContacts` set to true ) | [optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/RequestContactImportNewList.md b/docs/RequestContactImportNewList.md new file mode 100644 index 0000000..f7c55dd --- /dev/null +++ b/docs/RequestContactImportNewList.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.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?** | Id of the folder where this new list shall be created (Mandatory if listName is not empty). | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/RequestSmsRecipientExport.md b/docs/RequestSmsRecipientExport.md new file mode 100644 index 0000000..bffafa8 --- /dev/null +++ b/docs/RequestSmsRecipientExport.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.RequestSmsRecipientExport +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NotifyURL** | **string** | URL that will be called once the export process is finished | [optional] +**RecipientsType** | **string** | Filter the recipients based on how they interacted with the campaign | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/ResellerApi.md b/docs/ResellerApi.md new file mode 100644 index 0000000..31d5747 --- /dev/null +++ b/docs/ResellerApi.md @@ -0,0 +1,631 @@ +# sib_api_v3_sdk.Api.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 (string childAuthKey, AddCredits addCredits) + +Add Email and/or SMS credits to a specific child account + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class AddCreditsExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ResellerApi(); + var childAuthKey = childAuthKey_example; // string | auth key of reseller's child + var addCredits = new AddCredits(); // AddCredits | Values to post to add credit to a specific child account + + try + { + // Add Email and/or SMS credits to a specific child account + RemainingCreditModel result = apiInstance.AddCredits(childAuthKey, addCredits); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ResellerApi.AddCredits: " + e.Message ); + } + } + } +} +``` + +### 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **AssociateIpToChild** +> void AssociateIpToChild (string childAuthKey, ManageIp ip) + +Associate a dedicated IP to the child + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class AssociateIpToChildExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ResellerApi(); + var childAuthKey = childAuthKey_example; // string | auth key of reseller's child + var ip = new ManageIp(); // ManageIp | IP to associate + + try + { + // Associate a dedicated IP to the child + apiInstance.AssociateIpToChild(childAuthKey, ip); + } + catch (Exception e) + { + Debug.Print("Exception when calling ResellerApi.AssociateIpToChild: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **childAuthKey** | **string**| auth key of reseller's child | + **ip** | [**ManageIp**](ManageIp.md)| IP to associate | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **CreateResellerChild** +> CreateReseller CreateResellerChild (CreateChild resellerChild = null) + +Creates a reseller child + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class CreateResellerChildExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ResellerApi(); + var resellerChild = new CreateChild(); // CreateChild | reseller child to add (optional) + + try + { + // Creates a reseller child + CreateReseller result = apiInstance.CreateResellerChild(resellerChild); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ResellerApi.CreateResellerChild: " + e.Message ); + } + } + } +} +``` + +### 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteResellerChild** +> void DeleteResellerChild (string childAuthKey) + +Deletes a single reseller child based on the childAuthKey supplied + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class DeleteResellerChildExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ResellerApi(); + var childAuthKey = childAuthKey_example; // string | auth key of reseller's child + + try + { + // Deletes a single reseller child based on the childAuthKey supplied + apiInstance.DeleteResellerChild(childAuthKey); + } + catch (Exception e) + { + Debug.Print("Exception when calling ResellerApi.DeleteResellerChild: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **childAuthKey** | **string**| auth key of reseller's child | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DissociateIpFromChild** +> void DissociateIpFromChild (string childAuthKey, ManageIp ip) + +Dissociate a dedicated IP to the child + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class DissociateIpFromChildExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ResellerApi(); + var childAuthKey = childAuthKey_example; // string | auth key of reseller's child + var ip = new ManageIp(); // ManageIp | IP to dissociate + + try + { + // Dissociate a dedicated IP to the child + apiInstance.DissociateIpFromChild(childAuthKey, ip); + } + catch (Exception e) + { + Debug.Print("Exception when calling ResellerApi.DissociateIpFromChild: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **childAuthKey** | **string**| auth key of reseller's child | + **ip** | [**ManageIp**](ManageIp.md)| IP to dissociate | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetChildInfo** +> GetChildInfo GetChildInfo (string childAuthKey) + +Gets the info about a specific child account + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetChildInfoExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ResellerApi(); + var childAuthKey = childAuthKey_example; // string | auth key of reseller's child + + try + { + // Gets the info about a specific child account + GetChildInfo result = apiInstance.GetChildInfo(childAuthKey); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ResellerApi.GetChildInfo: " + e.Message ); + } + } + } +} +``` + +### 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetResellerChilds** +> GetChildrenList GetResellerChilds () + +Gets the list of all reseller's children accounts + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetResellerChildsExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ResellerApi(); + + try + { + // Gets the list of all reseller's children accounts + GetChildrenList result = apiInstance.GetResellerChilds(); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ResellerApi.GetResellerChilds: " + e.Message ); + } + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**GetChildrenList**](GetChildrenList.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **RemoveCredits** +> RemainingCreditModel RemoveCredits (string childAuthKey, RemoveCredits removeCredits) + +Remove Email and/or SMS credits from a specific child account + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class RemoveCreditsExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ResellerApi(); + var childAuthKey = childAuthKey_example; // string | auth key of reseller's child + var removeCredits = new RemoveCredits(); // RemoveCredits | Values to post to remove email or SMS credits from a specific child account + + try + { + // Remove Email and/or SMS credits from a specific child account + RemainingCreditModel result = apiInstance.RemoveCredits(childAuthKey, removeCredits); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ResellerApi.RemoveCredits: " + e.Message ); + } + } + } +} +``` + +### 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **UpdateResellerChild** +> void UpdateResellerChild (string childAuthKey, UpdateChild resellerChild) + +Updates infos of reseller's child based on the childAuthKey supplied + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class UpdateResellerChildExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new ResellerApi(); + var childAuthKey = childAuthKey_example; // string | auth key of reseller's child + var resellerChild = new UpdateChild(); // UpdateChild | values to update in child profile + + try + { + // Updates infos of reseller's child based on the childAuthKey supplied + apiInstance.UpdateResellerChild(childAuthKey, resellerChild); + } + catch (Exception e) + { + Debug.Print("Exception when calling ResellerApi.UpdateResellerChild: " + e.Message ); + } + } + } +} +``` + +### 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 + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/SMSCampaignsApi.md b/docs/SMSCampaignsApi.md new file mode 100644 index 0000000..4806b0e --- /dev/null +++ b/docs/SMSCampaignsApi.md @@ -0,0 +1,714 @@ +# sib_api_v3_sdk.Api.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 createSmsCampaign) + +Creates an SMS campaign + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class CreateSmsCampaignExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new SMSCampaignsApi(); + var createSmsCampaign = new CreateSmsCampaign(); // CreateSmsCampaign | Values to create an SMS Campaign + + try + { + // Creates an SMS campaign + CreateModel result = apiInstance.CreateSmsCampaign(createSmsCampaign); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling SMSCampaignsApi.CreateSmsCampaign: " + e.Message ); + } + } + } +} +``` + +### 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteSmsCampaign** +> void DeleteSmsCampaign (long? campaignId) + +Delete the SMS campaign + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class DeleteSmsCampaignExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new SMSCampaignsApi(); + var campaignId = 789; // long? | id of the SMS campaign + + try + { + // Delete the SMS campaign + apiInstance.DeleteSmsCampaign(campaignId); + } + catch (Exception e) + { + Debug.Print("Exception when calling SMSCampaignsApi.DeleteSmsCampaign: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **long?**| id of the SMS campaign | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetSmsCampaign** +> GetSmsCampaign GetSmsCampaign (long? campaignId) + +Get an SMS campaign + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetSmsCampaignExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new SMSCampaignsApi(); + var campaignId = 789; // long? | id of the SMS campaign + + try + { + // Get an SMS campaign + GetSmsCampaign result = apiInstance.GetSmsCampaign(campaignId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling SMSCampaignsApi.GetSmsCampaign: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **long?**| id of the SMS campaign | + +### Return type + +[**GetSmsCampaign**](GetSmsCampaign.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetSmsCampaigns** +> GetSmsCampaigns GetSmsCampaigns (string status = null, DateTime? startDate = null, DateTime? endDate = null, long? limit = null, long? offset = null) + +Returns the informations for all your created SMS campaigns + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetSmsCampaignsExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new SMSCampaignsApi(); + var status = status_example; // string | Status of campaign. (optional) + var startDate = 2013-10-20T19:20:30+01:00; // DateTime? | Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + var endDate = 2013-10-20T19:20:30+01:00; // DateTime? | Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + var limit = 789; // long? | Number limitation for the result returned (optional) (default to 500) + var offset = 789; // long? | Beginning point in the list to retrieve from. (optional) (default to 0) + + try + { + // Returns the informations for all your created SMS campaigns + GetSmsCampaigns result = apiInstance.GetSmsCampaigns(status, startDate, endDate, limit, offset); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling SMSCampaignsApi.GetSmsCampaigns: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | **string**| Status of campaign. | [optional] + **startDate** | **DateTime?**| Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) | [optional] + **endDate** | **DateTime?**| Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) | [optional] + **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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **RequestSmsRecipientExport** +> CreatedProcessId RequestSmsRecipientExport (long? campaignId, RequestSmsRecipientExport recipientExport = null) + +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 +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class RequestSmsRecipientExportExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new SMSCampaignsApi(); + var campaignId = 789; // long? | id of the campaign + var recipientExport = new RequestSmsRecipientExport(); // RequestSmsRecipientExport | Values to send for a recipient export request (optional) + + try + { + // Exports the recipients of the specified campaign. + CreatedProcessId result = apiInstance.RequestSmsRecipientExport(campaignId, recipientExport); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling SMSCampaignsApi.RequestSmsRecipientExport: " + e.Message ); + } + } + } +} +``` + +### 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **SendSmsCampaignNow** +> void SendSmsCampaignNow (long? campaignId) + +Send your SMS campaign immediately + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class SendSmsCampaignNowExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new SMSCampaignsApi(); + var campaignId = 789; // long? | id of the campaign + + try + { + // Send your SMS campaign immediately + apiInstance.SendSmsCampaignNow(campaignId); + } + catch (Exception e) + { + Debug.Print("Exception when calling SMSCampaignsApi.SendSmsCampaignNow: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **long?**| id of the campaign | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **SendSmsReport** +> void SendSmsReport (long? campaignId, SendReport 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 +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class SendSmsReportExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new SMSCampaignsApi(); + var campaignId = 789; // long? | id of the campaign + var sendReport = new SendReport(); // SendReport | Values for send a report + + try + { + // Send report of SMS campaigns + apiInstance.SendSmsReport(campaignId, sendReport); + } + catch (Exception e) + { + Debug.Print("Exception when calling SMSCampaignsApi.SendSmsReport: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **long?**| id of the campaign | + **sendReport** | [**SendReport**](SendReport.md)| Values for send a report | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **SendTestSms** +> void SendTestSms (long? campaignId, SendTestSms phoneNumber) + +Send an SMS + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class SendTestSmsExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new SMSCampaignsApi(); + var campaignId = 789; // long? | Id of the SMS campaign + var phoneNumber = new SendTestSms(); // SendTestSms | Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted + + try + { + // Send an SMS + apiInstance.SendTestSms(campaignId, phoneNumber); + } + catch (Exception e) + { + Debug.Print("Exception when calling SMSCampaignsApi.SendTestSms: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **long?**| Id of the SMS campaign | + **phoneNumber** | [**SendTestSms**](SendTestSms.md)| Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **UpdateSmsCampaign** +> void UpdateSmsCampaign (long? campaignId, UpdateSmsCampaign updateSmsCampaign) + +Updates an SMS campaign + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class UpdateSmsCampaignExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new SMSCampaignsApi(); + var campaignId = 789; // long? | id of the SMS campaign + var updateSmsCampaign = new UpdateSmsCampaign(); // UpdateSmsCampaign | Values to update an SMS Campaign + + try + { + // Updates an SMS campaign + apiInstance.UpdateSmsCampaign(campaignId, updateSmsCampaign); + } + catch (Exception e) + { + Debug.Print("Exception when calling SMSCampaignsApi.UpdateSmsCampaign: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **long?**| id of the SMS campaign | + **updateSmsCampaign** | [**UpdateSmsCampaign**](UpdateSmsCampaign.md)| Values to update an SMS Campaign | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **UpdateSmsCampaignStatus** +> void UpdateSmsCampaignStatus (long? campaignId, UpdateCampaignStatus status) + +Update the campaign status + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class UpdateSmsCampaignStatusExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new SMSCampaignsApi(); + var campaignId = 789; // long? | id of the campaign + var status = new UpdateCampaignStatus(); // UpdateCampaignStatus | Status of the campaign. + + try + { + // Update the campaign status + apiInstance.UpdateSmsCampaignStatus(campaignId, status); + } + catch (Exception e) + { + Debug.Print("Exception when calling SMSCampaignsApi.UpdateSmsCampaignStatus: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaignId** | **long?**| id of the campaign | + **status** | [**UpdateCampaignStatus**](UpdateCampaignStatus.md)| Status of the campaign. | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/SMTPApi.md b/docs/SMTPApi.md new file mode 100644 index 0000000..f1a0b8c --- /dev/null +++ b/docs/SMTPApi.md @@ -0,0 +1,880 @@ +# sib_api_v3_sdk.Api.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 (CreateSmtpTemplate smtpTemplate) + +Create an smtp template + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class CreateSmtpTemplateExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new SMTPApi(); + var smtpTemplate = new CreateSmtpTemplate(); // CreateSmtpTemplate | values to update in smtp template + + try + { + // Create an smtp template + CreateModel result = apiInstance.CreateSmtpTemplate(smtpTemplate); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling SMTPApi.CreateSmtpTemplate: " + e.Message ); + } + } + } +} +``` + +### 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteHardbounces** +> void DeleteHardbounces (DeleteHardbounces deleteHardbounces = null) + +Delete hardbounces + +Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures) + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class DeleteHardbouncesExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new SMTPApi(); + var deleteHardbounces = new DeleteHardbounces(); // DeleteHardbounces | values to delete hardbounces (optional) + + try + { + // Delete hardbounces + apiInstance.DeleteHardbounces(deleteHardbounces); + } + catch (Exception e) + { + Debug.Print("Exception when calling SMTPApi.DeleteHardbounces: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deleteHardbounces** | [**DeleteHardbounces**](DeleteHardbounces.md)| values to delete hardbounces | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteSmtpTemplate** +> void DeleteSmtpTemplate (long? templateId) + +Delete an inactive smtp template + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class DeleteSmtpTemplateExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new SMTPApi(); + var templateId = 789; // long? | id of the template + + try + { + // Delete an inactive smtp template + apiInstance.DeleteSmtpTemplate(templateId); + } + catch (Exception e) + { + Debug.Print("Exception when calling SMTPApi.DeleteSmtpTemplate: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **long?**| id of the template | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetAggregatedSmtpReport** +> GetAggregatedReport GetAggregatedSmtpReport (string startDate = null, string endDate = null, int? days = null, string tag = null) + +Get your SMTP activity aggregated over a period of time + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetAggregatedSmtpReportExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new SMTPApi(); + var startDate = startDate_example; // string | Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + var endDate = endDate_example; // string | Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + var days = 56; // int? | Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + var tag = tag_example; // string | Tag of the emails (optional) + + try + { + // Get your SMTP activity aggregated over a period of time + GetAggregatedReport result = apiInstance.GetAggregatedSmtpReport(startDate, endDate, days, tag); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling SMTPApi.GetAggregatedSmtpReport: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **startDate** | **string**| Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate | [optional] + **endDate** | **string**| Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate | [optional] + **days** | **int?**| 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetEmailEventReport** +> GetEmailEventReport GetEmailEventReport (long? limit = null, long? offset = null, string startDate = null, string endDate = null, int? days = null, string email = null, string _event = null, string tags = null, string messageId = null, long? templateId = null) + +Get all your SMTP activity (unaggregated events) + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetEmailEventReportExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new SMTPApi(); + var limit = 789; // long? | Number limitation for the result returned (optional) (default to 50) + var offset = 789; // long? | Beginning point in the list to retrieve from. (optional) (default to 0) + var startDate = startDate_example; // string | Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + var endDate = endDate_example; // string | Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + var days = 56; // int? | Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + var email = email_example; // string | Filter the report for a specific email addresses (optional) + var _event = _event_example; // string | Filter the report for a specific event type (optional) + var tags = tags_example; // string | Filter the report for tags (serialized and urlencoded array) (optional) + var messageId = messageId_example; // string | Filter on a specific message id (optional) + var templateId = 789; // long? | Filter on a specific template id (optional) + + try + { + // Get all your SMTP activity (unaggregated events) + GetEmailEventReport result = apiInstance.GetEmailEventReport(limit, offset, startDate, endDate, days, email, _event, tags, messageId, templateId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling SMTPApi.GetEmailEventReport: " + e.Message ); + } + } + } +} +``` + +### 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** | **string**| Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate | [optional] + **endDate** | **string**| Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate | [optional] + **days** | **int?**| 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] + **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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetSmtpReport** +> GetReports GetSmtpReport (long? limit = null, long? offset = null, string startDate = null, string endDate = null, int? days = null, string tag = null) + +Get your SMTP activity aggregated per day + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetSmtpReportExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new SMTPApi(); + var limit = 789; // long? | Number of documents returned per page (optional) (default to 50) + var offset = 789; // long? | Index of the first document on the page (optional) (default to 0) + var startDate = startDate_example; // string | Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) (optional) + var endDate = endDate_example; // string | Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) (optional) + var days = 56; // int? | Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + var tag = tag_example; // string | Tag of the emails (optional) + + try + { + // Get your SMTP activity aggregated per day + GetReports result = apiInstance.GetSmtpReport(limit, offset, startDate, endDate, days, tag); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling SMTPApi.GetSmtpReport: " + e.Message ); + } + } + } +} +``` + +### 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** | **string**| Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) | [optional] + **endDate** | **string**| Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) | [optional] + **days** | **int?**| 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetSmtpTemplate** +> GetSmtpTemplateOverview GetSmtpTemplate (long? templateId) + +Returns the template informations + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetSmtpTemplateExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new SMTPApi(); + var templateId = 789; // long? | id of the template + + try + { + // Returns the template informations + GetSmtpTemplateOverview result = apiInstance.GetSmtpTemplate(templateId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling SMTPApi.GetSmtpTemplate: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **long?**| id of the template | + +### Return type + +[**GetSmtpTemplateOverview**](GetSmtpTemplateOverview.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetSmtpTemplates** +> GetSmtpTemplates GetSmtpTemplates (bool? templateStatus = null, long? limit = null, long? offset = null) + +Get the list of SMTP templates + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetSmtpTemplatesExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new SMTPApi(); + var templateStatus = true; // bool? | Filter on the status of the template. Active = true, inactive = false (optional) + var limit = 789; // long? | Number of documents returned per page (optional) (default to 50) + var offset = 789; // long? | Index of the first document in the page (optional) (default to 0) + + try + { + // Get the list of SMTP templates + GetSmtpTemplates result = apiInstance.GetSmtpTemplates(templateStatus, limit, offset); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling SMTPApi.GetSmtpTemplates: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateStatus** | **bool?**| 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **SendTemplate** +> SendTemplateEmail SendTemplate (long? templateId, SendEmail sendEmail) + +Send a template + +This endpoint is deprecated. Prefer v3/smtp/email instead. + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class SendTemplateExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new SMTPApi(); + var templateId = 789; // long? | Id of the template + var sendEmail = new SendEmail(); // SendEmail | + + try + { + // Send a template + SendTemplateEmail result = apiInstance.SendTemplate(templateId, sendEmail); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling SMTPApi.SendTemplate: " + e.Message ); + } + } + } +} +``` + +### 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **SendTestTemplate** +> void SendTestTemplate (long? templateId, SendTestEmail sendTestEmail) + +Send a template to your test list + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class SendTestTemplateExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new SMTPApi(); + var templateId = 789; // long? | Id of the template + var sendTestEmail = new SendTestEmail(); // SendTestEmail | + + try + { + // Send a template to your test list + apiInstance.SendTestTemplate(templateId, sendTestEmail); + } + catch (Exception e) + { + Debug.Print("Exception when calling SMTPApi.SendTestTemplate: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **long?**| Id of the template | + **sendTestEmail** | [**SendTestEmail**](SendTestEmail.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **SendTransacEmail** +> CreateSmtpEmail SendTransacEmail (SendSmtpEmail sendSmtpEmail) + +Send a transactional email + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class SendTransacEmailExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new SMTPApi(); + var sendSmtpEmail = new SendSmtpEmail(); // SendSmtpEmail | Values to send a transactional email + + try + { + // Send a transactional email + CreateSmtpEmail result = apiInstance.SendTransacEmail(sendSmtpEmail); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling SMTPApi.SendTransacEmail: " + e.Message ); + } + } + } +} +``` + +### 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **UpdateSmtpTemplate** +> void UpdateSmtpTemplate (long? templateId, UpdateSmtpTemplate smtpTemplate) + +Updates an smtp templates + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class UpdateSmtpTemplateExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new SMTPApi(); + var templateId = 789; // long? | id of the template + var smtpTemplate = new UpdateSmtpTemplate(); // UpdateSmtpTemplate | values to update in smtp template + + try + { + // Updates an smtp templates + apiInstance.UpdateSmtpTemplate(templateId, smtpTemplate); + } + catch (Exception e) + { + Debug.Print("Exception when calling SMTPApi.UpdateSmtpTemplate: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **long?**| id of the template | + **smtpTemplate** | [**UpdateSmtpTemplate**](UpdateSmtpTemplate.md)| values to update in smtp template | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/SendEmail.md b/docs/SendEmail.md new file mode 100644 index 0000000..a23e6cf --- /dev/null +++ b/docs/SendEmail.md @@ -0,0 +1,17 @@ +# sib_api_v3_sdk.Model.SendEmail +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EmailTo** | **List<string>** | List of the email addresses of the recipients. For example, ['abc@example.com', 'asd@example.com']. | +**EmailBcc** | **List<string>** | List of the email addresses of the recipients in bcc | [optional] +**EmailCc** | **List<string>** | List of the email addresses of the recipients in cc | [optional] +**ReplyTo** | **string** | Email address which shall be used by campaign recipients to reply back | [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 list of content (base64 encoded) and name of the attachment. For example, [{'content':'base64 encoded content 1', 'name':'attcahment1'}, {'content':'base64 encoded content 2', 'name':'attcahment2'}]. | [optional] +**Headers** | **Object** | Pass the set of headers that shall be sent along the mail headers in the original email. 'sender.ip' header can be set (only for dedicated ip users) to mention the IP to be used for sending transactional emails. For example, {'Content-Type':'text/html', 'charset':'iso-8859-1', 'sender.ip':'1.2.3.4'} | [optional] +**Attributes** | **Object** | Pass the set of attributes to customize the template. For example, {'FNAME':'Joe', 'LNAME':'Doe'} | [optional] +**Tags** | **List<string>** | Tag your emails to find them more easily | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendEmailAttachment.md b/docs/SendEmailAttachment.md new file mode 100644 index 0000000..7fb0bb2 --- /dev/null +++ b/docs/SendEmailAttachment.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.SendEmailAttachment +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | **byte[]** | Base64 encoded chunk data of the attachment generated on the fly | +**Name** | **string** | Required for content. Name of the attachment | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendReport.md b/docs/SendReport.md new file mode 100644 index 0000000..9fde33f --- /dev/null +++ b/docs/SendReport.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.SendReport +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Language** | **string** | Language of email content for campaign report sending. | [optional] [default to LanguageEnum.Fr] +**Email** | [**SendReportEmail**](SendReportEmail.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendReportEmail.md b/docs/SendReportEmail.md new file mode 100644 index 0000000..5e811d8 --- /dev/null +++ b/docs/SendReportEmail.md @@ -0,0 +1,14 @@ +# sib_api_v3_sdk.Model.SendReportEmail +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Subject** | **string** | Subject of the email message | +**To** | **List<string>** | Email addresses of the recipients | +**ContentType** | **string** | Type of the message body | [optional] [default to ContentTypeEnum.Html] +**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 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendSms.md b/docs/SendSms.md new file mode 100644 index 0000000..8baaa26 --- /dev/null +++ b/docs/SendSms.md @@ -0,0 +1,13 @@ +# sib_api_v3_sdk.Model.SendSms +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Reference** | **string** | | +**MessageId** | **long?** | | +**SmsCount** | **long?** | Count of SMS's to send multiple text messages | [optional] +**UsedCredits** | **float?** | SMS credits used per text message | [optional] +**RemainingCredits** | **float?** | Remaining SMS credits of the user | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendSmtpEmail.md b/docs/SendSmtpEmail.md new file mode 100644 index 0000000..bc353f2 --- /dev/null +++ b/docs/SendSmtpEmail.md @@ -0,0 +1,21 @@ +# sib_api_v3_sdk.Model.SendSmtpEmail +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Sender** | [**SendSmtpEmailSender**](SendSmtpEmailSender.md) | | [optional] +**To** | [**List<SendSmtpEmailTo>**](SendSmtpEmailTo.md) | List of email addresses and names (optional) of the recipients. For example, [{'name':'Jimmy', 'email':'jimmy98@example.com'}, {'name':'Joe', 'email':'joe@example.com'}] | +**Bcc** | [**List<SendSmtpEmailBcc>**](SendSmtpEmailBcc.md) | List of email addresses and names (optional) of the recipients in bcc | [optional] +**Cc** | [**List<SendSmtpEmailCc>**](SendSmtpEmailCc.md) | List of email addresses and names (optional) of the recipients in cc | [optional] +**HtmlContent** | **string** | HTML body of the message ( Mandatory if 'templateId' is not passed, ignored if 'templateId' is passed ) | [optional] +**TextContent** | **string** | Plain Text body of the message ( Ignored if 'templateId' is passed ) | [optional] +**Subject** | **string** | Subject of the message. Mandatory if 'templateId' is not passed | [optional] +**ReplyTo** | [**SendSmtpEmailReplyTo**](SendSmtpEmailReplyTo.md) | | [optional] +**Attachment** | [**List<SendSmtpEmailAttachment>**](SendSmtpEmailAttachment.md) | Pass the absolute URL (no local file) or the base64 content of the attachment along with the attachment name (Mandatory if attachment content is passed). For example, [{'url':'https://attachment.domain.com/myAttachmentFromUrl.jpg', 'name':'My attachment 1'}, {'content':'base64 exmaple content', 'name':'My attachment 2'}]. Allowed extensions for attachment file: 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, eps and odt ( If 'templateId' is passed and is in New Template Language format then only attachment url is accepted. If template is in Old template Language format, then 'attachment' is ignored ) | [optional] +**Headers** | **Object** | Pass the set of headers that shall be sent along the mail headers in the original email. 'sender.ip' header can be set (only for dedicated ip users) to mention the IP to be used for sending transactional emails. For example, {'Content-Type':'text/html', 'charset':'iso-8859-1', 'sender.ip':'1.2.3.4'} | [optional] +**TemplateId** | **long?** | Id of the template | [optional] +**Params** | **Object** | Pass the set of attributes to customize the template. For example, {'FNAME':'Joe', 'LNAME':'Doe'}. It's considered only if template is in New Template Language format. | [optional] +**Tags** | **List<string>** | Tag your emails to find them more easily | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendSmtpEmailAttachment.md b/docs/SendSmtpEmailAttachment.md new file mode 100644 index 0000000..1a6e9b4 --- /dev/null +++ b/docs/SendSmtpEmailAttachment.md @@ -0,0 +1,11 @@ +# sib_api_v3_sdk.Model.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 if content is passed. Name of the attachment | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendSmtpEmailBcc.md b/docs/SendSmtpEmailBcc.md new file mode 100644 index 0000000..6f5cedc --- /dev/null +++ b/docs/SendSmtpEmailBcc.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.SendSmtpEmailBcc +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | Email address of the recipient in bcc | +**Name** | **string** | Name of the recipient in bcc | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendSmtpEmailCc.md b/docs/SendSmtpEmailCc.md new file mode 100644 index 0000000..5623b02 --- /dev/null +++ b/docs/SendSmtpEmailCc.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.SendSmtpEmailCc +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | Email address of the recipient in cc | +**Name** | **string** | Name of the recipient in cc | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendSmtpEmailReplyTo.md b/docs/SendSmtpEmailReplyTo.md new file mode 100644 index 0000000..011b801 --- /dev/null +++ b/docs/SendSmtpEmailReplyTo.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.SendSmtpEmailReplyTo +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | Email address in reply to | +**Name** | **string** | Name in reply to | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendSmtpEmailSender.md b/docs/SendSmtpEmailSender.md new file mode 100644 index 0000000..8060c4c --- /dev/null +++ b/docs/SendSmtpEmailSender.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.SendSmtpEmailSender +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of the sender from which the emails will be sent | [optional] +**Email** | **string** | Email of the sender from which the emails will be sent | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendSmtpEmailTo.md b/docs/SendSmtpEmailTo.md new file mode 100644 index 0000000..274dc13 --- /dev/null +++ b/docs/SendSmtpEmailTo.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.SendSmtpEmailTo +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | Email address of the recipient | +**Name** | **string** | Name of the recipient | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendTemplateEmail.md b/docs/SendTemplateEmail.md new file mode 100644 index 0000000..9e9572c --- /dev/null +++ b/docs/SendTemplateEmail.md @@ -0,0 +1,9 @@ +# sib_api_v3_sdk.Model.SendTemplateEmail +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MessageId** | **string** | Message ID of the template Email sent | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendTestEmail.md b/docs/SendTestEmail.md new file mode 100644 index 0000000..6321f3d --- /dev/null +++ b/docs/SendTestEmail.md @@ -0,0 +1,9 @@ +# sib_api_v3_sdk.Model.SendTestEmail +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EmailTo** | **List<string>** | List of the email addresses of the recipients whom you wish to send the test mail. If left empty, the test mail will be sent to your entire test list. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendTestSms.md b/docs/SendTestSms.md new file mode 100644 index 0000000..d1c397d --- /dev/null +++ b/docs/SendTestSms.md @@ -0,0 +1,9 @@ +# sib_api_v3_sdk.Model.SendTestSms +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PhoneNumber** | **string** | Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendTransacSms.md b/docs/SendTransacSms.md new file mode 100644 index 0000000..e5ef150 --- /dev/null +++ b/docs/SendTransacSms.md @@ -0,0 +1,14 @@ +# sib_api_v3_sdk.Model.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, will be sent as multiple text messages | +**Type** | **string** | Type of the SMS. Marketing SMS messages are those sent typically with marketing content. Transactional SMS messages are sent to individuals and are triggered in response to some action, such as a sign-up, purchase, etc. | [optional] [default to TypeEnum.Transactional] +**Tag** | **string** | Tag of the message | [optional] +**WebUrl** | **string** | Webhook to call for each event triggered by the message (delivered etc.) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendersApi.md b/docs/SendersApi.md new file mode 100644 index 0000000..18623d9 --- /dev/null +++ b/docs/SendersApi.md @@ -0,0 +1,420 @@ +# sib_api_v3_sdk.Api.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 (CreateSender sender = null) + +Create a new sender + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class CreateSenderExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new SendersApi(); + var sender = new CreateSender(); // CreateSender | sender's name (optional) + + try + { + // Create a new sender + CreateSenderModel result = apiInstance.CreateSender(sender); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling SendersApi.CreateSender: " + e.Message ); + } + } + } +} +``` + +### 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteSender** +> void DeleteSender (long? senderId) + +Delete a sender + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class DeleteSenderExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new SendersApi(); + var senderId = 789; // long? | Id of the sender + + try + { + // Delete a sender + apiInstance.DeleteSender(senderId); + } + catch (Exception e) + { + Debug.Print("Exception when calling SendersApi.DeleteSender: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **senderId** | **long?**| Id of the sender | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetIps** +> GetIps GetIps () + +Return all the dedicated IPs for your account + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetIpsExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new SendersApi(); + + try + { + // Return all the dedicated IPs for your account + GetIps result = apiInstance.GetIps(); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling SendersApi.GetIps: " + e.Message ); + } + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**GetIps**](GetIps.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetIpsFromSender** +> GetIpsFromSender GetIpsFromSender (long? senderId) + +Return all the dedicated IPs for a sender + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetIpsFromSenderExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new SendersApi(); + var senderId = 789; // long? | Id of the sender + + try + { + // Return all the dedicated IPs for a sender + GetIpsFromSender result = apiInstance.GetIpsFromSender(senderId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling SendersApi.GetIpsFromSender: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **senderId** | **long?**| Id of the sender | + +### Return type + +[**GetIpsFromSender**](GetIpsFromSender.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetSenders** +> GetSendersList GetSenders (string ip = null, string domain = null) + +Get the list of all your senders + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetSendersExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new SendersApi(); + var ip = ip_example; // string | Filter your senders for a specific ip (available for dedicated IP usage only) (optional) + var domain = domain_example; // string | Filter your senders for a specific domain (optional) + + try + { + // Get the list of all your senders + GetSendersList result = apiInstance.GetSenders(ip, domain); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling SendersApi.GetSenders: " + e.Message ); + } + } + } +} +``` + +### 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **UpdateSender** +> void UpdateSender (long? senderId, UpdateSender sender = null) + +Update a sender + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class UpdateSenderExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new SendersApi(); + var senderId = 789; // long? | Id of the sender + var sender = new UpdateSender(); // UpdateSender | sender's name (optional) + + try + { + // Update a sender + apiInstance.UpdateSender(senderId, sender); + } + catch (Exception e) + { + Debug.Print("Exception when calling SendersApi.UpdateSender: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **senderId** | **long?**| Id of the sender | + **sender** | [**UpdateSender**](UpdateSender.md)| sender's name | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/TransactionalSMSApi.md b/docs/TransactionalSMSApi.md new file mode 100644 index 0000000..e718058 --- /dev/null +++ b/docs/TransactionalSMSApi.md @@ -0,0 +1,310 @@ +# sib_api_v3_sdk.Api.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 (long? limit = null, string startDate = null, string endDate = null, long? offset = null, int? days = null, string phoneNumber = null, string _event = null, string tags = null) + +Get all the SMS activity (unaggregated events) + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetSmsEventsExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new TransactionalSMSApi(); + var limit = 789; // long? | Number of documents per page (optional) (default to 50) + var startDate = startDate_example; // string | Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + var endDate = endDate_example; // string | Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + var offset = 789; // long? | Index of the first document of the page (optional) (default to 0) + var days = 56; // int? | Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + var phoneNumber = phoneNumber_example; // string | Filter the report for a specific phone number (optional) + var _event = _event_example; // string | Filter the report for specific events (optional) + var tags = tags_example; // string | Filter the report for specific tags passed as a serialized urlencoded array (optional) + + try + { + // Get all the SMS activity (unaggregated events) + GetSmsEventReport result = apiInstance.GetSmsEvents(limit, startDate, endDate, offset, days, phoneNumber, _event, tags); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling TransactionalSMSApi.GetSmsEvents: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **long?**| Number of documents per page | [optional] [default to 50] + **startDate** | **string**| Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report | [optional] + **endDate** | **string**| 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** | **int?**| 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] + **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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetTransacAggregatedSmsReport** +> GetTransacAggregatedSmsReport GetTransacAggregatedSmsReport (string startDate = null, string endDate = null, int? days = null, string tag = null) + +Get your SMS activity aggregated over a period of time + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetTransacAggregatedSmsReportExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new TransactionalSMSApi(); + var startDate = startDate_example; // string | Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + var endDate = endDate_example; // string | Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + var days = 56; // int? | Number of days in the past including today (positive integer). Not compatible with startDate and endDate (optional) + var tag = tag_example; // string | Filter on a tag (optional) + + try + { + // Get your SMS activity aggregated over a period of time + GetTransacAggregatedSmsReport result = apiInstance.GetTransacAggregatedSmsReport(startDate, endDate, days, tag); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling TransactionalSMSApi.GetTransacAggregatedSmsReport: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **startDate** | **string**| Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report | [optional] + **endDate** | **string**| Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report | [optional] + **days** | **int?**| 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetTransacSmsReport** +> GetTransacSmsReport GetTransacSmsReport (string startDate = null, string endDate = null, int? days = null, string tag = null) + +Get your SMS activity aggregated per day + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetTransacSmsReportExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new TransactionalSMSApi(); + var startDate = startDate_example; // string | Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + var endDate = endDate_example; // string | Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + var days = 56; // int? | Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + var tag = tag_example; // string | Filter on a tag (optional) + + try + { + // Get your SMS activity aggregated per day + GetTransacSmsReport result = apiInstance.GetTransacSmsReport(startDate, endDate, days, tag); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling TransactionalSMSApi.GetTransacSmsReport: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **startDate** | **string**| Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report | [optional] + **endDate** | **string**| Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report | [optional] + **days** | **int?**| 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **SendTransacSms** +> SendSms SendTransacSms (SendTransacSms sendTransacSms) + +Send the SMS campaign to the specified mobile number + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class SendTransacSmsExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new TransactionalSMSApi(); + var sendTransacSms = new SendTransacSms(); // SendTransacSms | Values to send a transactional SMS + + try + { + // Send the SMS campaign to the specified mobile number + SendSms result = apiInstance.SendTransacSms(sendTransacSms); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling TransactionalSMSApi.SendTransacSms: " + e.Message ); + } + } + } +} +``` + +### 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/UpdateAttribute.md b/docs/UpdateAttribute.md new file mode 100644 index 0000000..97e9c91 --- /dev/null +++ b/docs/UpdateAttribute.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.UpdateAttribute +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | Value of the attribute to update. Use only if the attribute's category is 'calculated' or 'global' | [optional] +**Enumeration** | [**List<UpdateAttributeEnumeration>**](UpdateAttributeEnumeration.md) | List of the values and labels that the attribute can take. Use only if the attribute's category is \"category\". For example, [{'value':1, 'label':'male'}, {'value':2, 'label':'female'}] | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateAttributeEnumeration.md b/docs/UpdateAttributeEnumeration.md new file mode 100644 index 0000000..fd04dd7 --- /dev/null +++ b/docs/UpdateAttributeEnumeration.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.UpdateAttributeEnumeration +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **int?** | Id of the value | +**Label** | **string** | Label of the value | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateCampaignStatus.md b/docs/UpdateCampaignStatus.md new file mode 100644 index 0000000..65b6dfc --- /dev/null +++ b/docs/UpdateCampaignStatus.md @@ -0,0 +1,9 @@ +# sib_api_v3_sdk.Model.UpdateCampaignStatus +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | **string** | Note:- replicateTemplate status will be available only for template type campaigns. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateChild.md b/docs/UpdateChild.md new file mode 100644 index 0000000..0160199 --- /dev/null +++ b/docs/UpdateChild.md @@ -0,0 +1,13 @@ +# sib_api_v3_sdk.Model.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] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateContact.md b/docs/UpdateContact.md new file mode 100644 index 0000000..728728c --- /dev/null +++ b/docs/UpdateContact.md @@ -0,0 +1,14 @@ +# sib_api_v3_sdk.Model.UpdateContact +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **Object** | Pass the set of attributes to be updated. These attributes must be present in your account. To update existing email address of a contact with the new one please pass EMAIL in attribtes. For eg. { 'EMAIL':'newemail@domain.com', 'FNAME':'Ellie', 'LNAME':'Roger'} | [optional] +**EmailBlacklisted** | **bool?** | Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true) | [optional] +**SmsBlacklisted** | **bool?** | Set/unset this field to blacklist/allow 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] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateEmailCampaign.md b/docs/UpdateEmailCampaign.md new file mode 100644 index 0000000..543d868 --- /dev/null +++ b/docs/UpdateEmailCampaign.md @@ -0,0 +1,33 @@ +# sib_api_v3_sdk.Model.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** | **DateTime?** | 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. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part). | [optional] +**Subject** | **string** | Subject of the campaign | [optional] +**ReplyTo** | **string** | Email on which campaign recipients will be able to reply to | [optional] +**ToField** | **string** | To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization | [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** | **bool?** | 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] [default to false] +**MirrorActive** | **bool?** | 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** | **bool?** | 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] [default to false] +**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] +**Params** | **Object** | Pass the set of attributes to customize the type 'classic' campaign. For example, {'FNAME':'Joe', 'LNAME':'Doe'}. The 'params' field will get updated, only if the campaign is in New Template Language, else ignored. The New Template Language is dependent on the values of 'subject', 'htmlContent/htmlUrl', 'sender.name' & 'toField' | [optional] +**SendAtBestTime** | **bool?** | Set this to true if you want to send your campaign at best time. Note:- if true, warmup ip will be disabled. | [optional] +**AbTesting** | **bool?** | Status of A/B Test. abTesting = false means it is disabled, & abTesting = true means it is enabled. 'subjectA', 'subjectB', 'splitRule', 'winnerCriteria' & 'winnerDelay' will be considered if abTesting is set to true. 'subject' if passed is ignored. Can be set to true only if 'sendAtBestTime' is 'false'. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B | [optional] [default to false] +**SubjectA** | **string** | Subject A of the campaign. Considered if abTesting = true. subjectA & subjectB should have unique value | [optional] +**SubjectB** | **string** | Subject B of the campaign. Considered if abTesting = true. subjectA & subjectB should have unique value | [optional] +**SplitRule** | **long?** | Add the size of your test groups. Considered if abTesting = true. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else | [optional] +**WinnerCriteria** | **string** | Choose the metrics that will determinate the winning version. Considered if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerCriteria' is ignored if passed or alreday exist in record | [optional] +**WinnerDelay** | **long?** | Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. Considered if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerDelay' is ignored if passed or alreday exist in record | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateEmailCampaignRecipients.md b/docs/UpdateEmailCampaignRecipients.md new file mode 100644 index 0000000..fe4c309 --- /dev/null +++ b/docs/UpdateEmailCampaignRecipients.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.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] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateEmailCampaignSender.md b/docs/UpdateEmailCampaignSender.md new file mode 100644 index 0000000..5cf80c0 --- /dev/null +++ b/docs/UpdateEmailCampaignSender.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.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] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateList.md b/docs/UpdateList.md new file mode 100644 index 0000000..ed737bd --- /dev/null +++ b/docs/UpdateList.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.UpdateList +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of the list. Either of the two parameters (name, folderId) can be updated at a time. | [optional] +**FolderId** | **long?** | Id of the folder in which the list is to be moved. Either of the two parameters (name, folderId) can be updated at a time. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateSender.md b/docs/UpdateSender.md new file mode 100644 index 0000000..7447b69 --- /dev/null +++ b/docs/UpdateSender.md @@ -0,0 +1,11 @@ +# sib_api_v3_sdk.Model.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] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateSmsCampaign.md b/docs/UpdateSmsCampaign.md new file mode 100644 index 0000000..81b2ca9 --- /dev/null +++ b/docs/UpdateSmsCampaign.md @@ -0,0 +1,13 @@ +# sib_api_v3_sdk.Model.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** | **DateTime?** | 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] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateSmtpTemplate.md b/docs/UpdateSmtpTemplate.md new file mode 100644 index 0000000..02f75c3 --- /dev/null +++ b/docs/UpdateSmtpTemplate.md @@ -0,0 +1,18 @@ +# sib_api_v3_sdk.Model.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. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization | [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** | **bool?** | Status of the template. isActive = false means template is inactive, isActive = true means template is active | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateSmtpTemplateSender.md b/docs/UpdateSmtpTemplateSender.md new file mode 100644 index 0000000..a1e1ab9 --- /dev/null +++ b/docs/UpdateSmtpTemplateSender.md @@ -0,0 +1,10 @@ +# sib_api_v3_sdk.Model.UpdateSmtpTemplateSender +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of the sender | [optional] +**Email** | **string** | Email of the sender | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateWebhook.md b/docs/UpdateWebhook.md new file mode 100644 index 0000000..2568722 --- /dev/null +++ b/docs/UpdateWebhook.md @@ -0,0 +1,11 @@ +# sib_api_v3_sdk.Model.UpdateWebhook +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Url** | **string** | URL of the webhook | [optional] +**Description** | **string** | Description of the webhook | [optional] +**Events** | **List<string>** | 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] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/WebhooksApi.md b/docs/WebhooksApi.md new file mode 100644 index 0000000..c5cb061 --- /dev/null +++ b/docs/WebhooksApi.md @@ -0,0 +1,353 @@ +# sib_api_v3_sdk.Api.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 createWebhook) + +Create a webhook + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class CreateWebhookExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new WebhooksApi(); + var createWebhook = new CreateWebhook(); // CreateWebhook | Values to create a webhook + + try + { + // Create a webhook + CreateModel result = apiInstance.CreateWebhook(createWebhook); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling WebhooksApi.CreateWebhook: " + e.Message ); + } + } + } +} +``` + +### 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), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteWebhook** +> void DeleteWebhook (long? webhookId) + +Delete a webhook + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class DeleteWebhookExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new WebhooksApi(); + var webhookId = 789; // long? | Id of the webhook + + try + { + // Delete a webhook + apiInstance.DeleteWebhook(webhookId); + } + catch (Exception e) + { + Debug.Print("Exception when calling WebhooksApi.DeleteWebhook: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhookId** | **long?**| Id of the webhook | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetWebhook** +> GetWebhook GetWebhook (long? webhookId) + +Get a webhook details + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetWebhookExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new WebhooksApi(); + var webhookId = 789; // long? | Id of the webhook + + try + { + // Get a webhook details + GetWebhook result = apiInstance.GetWebhook(webhookId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling WebhooksApi.GetWebhook: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhookId** | **long?**| Id of the webhook | + +### Return type + +[**GetWebhook**](GetWebhook.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetWebhooks** +> GetWebhooks GetWebhooks (string type = null) + +Get all webhooks + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class GetWebhooksExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new WebhooksApi(); + var type = type_example; // string | Filter on webhook type (optional) (default to transactional) + + try + { + // Get all webhooks + GetWebhooks result = apiInstance.GetWebhooks(type); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling WebhooksApi.GetWebhooks: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **type** | **string**| Filter on webhook type | [optional] [default to transactional] + +### Return type + +[**GetWebhooks**](GetWebhooks.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **UpdateWebhook** +> void UpdateWebhook (long? webhookId, UpdateWebhook updateWebhook) + +Update a webhook + +### Example +```csharp +using System; +using System.Diagnostics; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace Example +{ + public class UpdateWebhookExample + { + public void main() + { + // Configure API key authorization: api-key + Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer"); + // Configure API key authorization: partner-key + Configuration.Default.AddApiKey("partner-key", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer"); + + var apiInstance = new WebhooksApi(); + var webhookId = 789; // long? | Id of the webhook + var updateWebhook = new UpdateWebhook(); // UpdateWebhook | Values to update a webhook + + try + { + // Update a webhook + apiInstance.UpdateWebhook(webhookId, updateWebhook); + } + catch (Exception e) + { + Debug.Print("Exception when calling WebhooksApi.UpdateWebhook: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhookId** | **long?**| Id of the webhook | + **updateWebhook** | [**UpdateWebhook**](UpdateWebhook.md)| Values to update a webhook | + +### Return type + +void (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/git_push.sh b/git_push.sh new file mode 100644 index 0000000..160f6f2 --- /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/mono_nunit_test.sh b/mono_nunit_test.sh new file mode 100644 index 0000000..7d5afad --- /dev/null +++ b/mono_nunit_test.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +# +# Generated by: https://github.com/swagger-api/swagger-codegen.git +# + +wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe +mozroots --import --sync + +echo "[INFO] remove bin/Debug/SwaggerClientTest.dll" +rm src/sib_api_v3_sdk.Test/bin/Debug/sib_api_v3_sdk.Test.dll 2> /dev/null + +echo "[INFO] install NUnit runners via NuGet" +wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe +mozroots --import --sync +mono nuget.exe install src/sib_api_v3_sdk.Test/packages.config -o packages + +echo "[INFO] Install NUnit runners via NuGet" +mono nuget.exe install NUnit.Runners -Version 2.6.4 -OutputDirectory packages + +echo "[INFO] Build the solution and run the unit test" +xbuild sib_api_v3_sdk.sln && \ + mono ./packages/NUnit.Runners.2.6.4/tools/nunit-console.exe src/sib_api_v3_sdk.Test/bin/Debug/sib_api_v3_sdk.Test.dll diff --git a/sib_api_v3_sdk.sln b/sib_api_v3_sdk.sln new file mode 100644 index 0000000..4987e52 --- /dev/null +++ b/sib_api_v3_sdk.sln @@ -0,0 +1,30 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28010.2036 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "sib_api_v3_sdk", "src\sib_api_v3_sdk\sib_api_v3_sdk.csproj", "{2DFA7157-CAE0-4C80-9673-ED9A34C881D6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "sib_api_v3_sdk.Test", "src\sib_api_v3_sdk.Test\sib_api_v3_sdk.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2DFA7157-CAE0-4C80-9673-ED9A34C881D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2DFA7157-CAE0-4C80-9673-ED9A34C881D6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2DFA7157-CAE0-4C80-9673-ED9A34C881D6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2DFA7157-CAE0-4C80-9673-ED9A34C881D6}.Release|Any CPU.Build.0 = Release|Any CPU + {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU + {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU + {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {0CDB1E24-73F2-467F-AC14-86211A4AAF31} + EndGlobalSection +EndGlobal diff --git a/src/sib_api_v3_sdk.Test/Api/AccountApiTests.cs b/src/sib_api_v3_sdk.Test/Api/AccountApiTests.cs new file mode 100644 index 0000000..bdb62b9 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Api/AccountApiTests.cs @@ -0,0 +1,80 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using NUnit.Framework; + +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing AccountApi + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the API endpoint. + /// + [TestFixture] + public class AccountApiTests + { + private AccountApi instance; + + /// + /// Setup before each unit test + /// + [SetUp] + public void Init() + { + instance = new AccountApi(); + } + + /// + /// Clean up after each unit test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of AccountApi + /// + [Test] + public void InstanceTest() + { + // TODO uncomment below to test 'IsInstanceOfType' AccountApi + //Assert.IsInstanceOfType(typeof(AccountApi), instance, "instance is a AccountApi"); + } + + + /// + /// Test GetAccount + /// + [Test] + public void GetAccountTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.GetAccount(); + //Assert.IsInstanceOf (response, "response is GetAccount"); + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Api/AttributesApiTests.cs b/src/sib_api_v3_sdk.Test/Api/AttributesApiTests.cs new file mode 100644 index 0000000..9917384 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Api/AttributesApiTests.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using NUnit.Framework; + +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing AttributesApi + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the API endpoint. + /// + [TestFixture] + public class AttributesApiTests + { + private AttributesApi instance; + + /// + /// Setup before each unit test + /// + [SetUp] + public void Init() + { + instance = new AttributesApi(); + } + + /// + /// Clean up after each unit test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of AttributesApi + /// + [Test] + public void InstanceTest() + { + // TODO uncomment below to test 'IsInstanceOfType' AttributesApi + //Assert.IsInstanceOfType(typeof(AttributesApi), instance, "instance is a AttributesApi"); + } + + + /// + /// Test CreateAttribute + /// + [Test] + public void CreateAttributeTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string attributeCategory = null; + //string attributeName = null; + //CreateAttribute createAttribute = null; + //instance.CreateAttribute(attributeCategory, attributeName, createAttribute); + + } + + /// + /// Test DeleteAttribute + /// + [Test] + public void DeleteAttributeTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string attributeCategory = null; + //string attributeName = null; + //instance.DeleteAttribute(attributeCategory, attributeName); + + } + + /// + /// Test GetAttributes + /// + [Test] + public void GetAttributesTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.GetAttributes(); + //Assert.IsInstanceOf (response, "response is GetAttributes"); + } + + /// + /// Test UpdateAttribute + /// + [Test] + public void UpdateAttributeTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string attributeCategory = null; + //string attributeName = null; + //UpdateAttribute updateAttribute = null; + //instance.UpdateAttribute(attributeCategory, attributeName, updateAttribute); + + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Api/ContactsApiTests.cs b/src/sib_api_v3_sdk.Test/Api/ContactsApiTests.cs new file mode 100644 index 0000000..45698c2 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Api/ContactsApiTests.cs @@ -0,0 +1,399 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using NUnit.Framework; + +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing ContactsApi + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the API endpoint. + /// + [TestFixture] + public class ContactsApiTests + { + private ContactsApi instance; + + /// + /// Setup before each unit test + /// + [SetUp] + public void Init() + { + instance = new ContactsApi(); + } + + /// + /// Clean up after each unit test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of ContactsApi + /// + [Test] + public void InstanceTest() + { + // TODO uncomment below to test 'IsInstanceOfType' ContactsApi + //Assert.IsInstanceOfType(typeof(ContactsApi), instance, "instance is a ContactsApi"); + } + + + /// + /// Test AddContactToList + /// + [Test] + public void AddContactToListTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? listId = null; + //AddContactToList contactEmails = null; + //var response = instance.AddContactToList(listId, contactEmails); + //Assert.IsInstanceOf (response, "response is PostContactInfo"); + } + + /// + /// Test CreateAttribute + /// + [Test] + public void CreateAttributeTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string attributeCategory = null; + //string attributeName = null; + //CreateAttribute createAttribute = null; + //instance.CreateAttribute(attributeCategory, attributeName, createAttribute); + + } + + /// + /// Test CreateContact + /// + [Test] + public void CreateContactTest() + { + // TODO uncomment below to test the method and replace null with proper value + //CreateContact createContact = null; + //var response = instance.CreateContact(createContact); + //Assert.IsInstanceOf (response, "response is CreateUpdateContactModel"); + } + + /// + /// Test CreateFolder + /// + [Test] + public void CreateFolderTest() + { + // TODO uncomment below to test the method and replace null with proper value + //CreateUpdateFolder createFolder = null; + //var response = instance.CreateFolder(createFolder); + //Assert.IsInstanceOf (response, "response is CreateModel"); + } + + /// + /// Test CreateList + /// + [Test] + public void CreateListTest() + { + // TODO uncomment below to test the method and replace null with proper value + //CreateList createList = null; + //var response = instance.CreateList(createList); + //Assert.IsInstanceOf (response, "response is CreateModel"); + } + + /// + /// Test DeleteAttribute + /// + [Test] + public void DeleteAttributeTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string attributeCategory = null; + //string attributeName = null; + //instance.DeleteAttribute(attributeCategory, attributeName); + + } + + /// + /// Test DeleteContact + /// + [Test] + public void DeleteContactTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string email = null; + //instance.DeleteContact(email); + + } + + /// + /// Test DeleteFolder + /// + [Test] + public void DeleteFolderTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? folderId = null; + //instance.DeleteFolder(folderId); + + } + + /// + /// Test DeleteList + /// + [Test] + public void DeleteListTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? listId = null; + //instance.DeleteList(listId); + + } + + /// + /// Test GetAttributes + /// + [Test] + public void GetAttributesTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.GetAttributes(); + //Assert.IsInstanceOf (response, "response is GetAttributes"); + } + + /// + /// Test GetContactInfo + /// + [Test] + public void GetContactInfoTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string email = null; + //var response = instance.GetContactInfo(email); + //Assert.IsInstanceOf (response, "response is GetExtendedContactDetails"); + } + + /// + /// Test GetContactStats + /// + [Test] + public void GetContactStatsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string email = null; + //var response = instance.GetContactStats(email); + //Assert.IsInstanceOf (response, "response is GetContactCampaignStats"); + } + + /// + /// Test GetContacts + /// + [Test] + public void GetContactsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? limit = null; + //long? offset = null; + //DateTime? modifiedSince = null; + //var response = instance.GetContacts(limit, offset, modifiedSince); + //Assert.IsInstanceOf (response, "response is GetContacts"); + } + + /// + /// Test GetContactsFromList + /// + [Test] + public void GetContactsFromListTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? listId = null; + //DateTime? modifiedSince = null; + //long? limit = null; + //long? offset = null; + //var response = instance.GetContactsFromList(listId, modifiedSince, limit, offset); + //Assert.IsInstanceOf (response, "response is GetContacts"); + } + + /// + /// Test GetFolder + /// + [Test] + public void GetFolderTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? folderId = null; + //var response = instance.GetFolder(folderId); + //Assert.IsInstanceOf (response, "response is GetFolder"); + } + + /// + /// Test GetFolderLists + /// + [Test] + public void GetFolderListsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? folderId = null; + //long? limit = null; + //long? offset = null; + //var response = instance.GetFolderLists(folderId, limit, offset); + //Assert.IsInstanceOf (response, "response is GetFolderLists"); + } + + /// + /// Test GetFolders + /// + [Test] + public void GetFoldersTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? limit = null; + //long? offset = null; + //var response = instance.GetFolders(limit, offset); + //Assert.IsInstanceOf (response, "response is GetFolders"); + } + + /// + /// Test GetList + /// + [Test] + public void GetListTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? listId = null; + //var response = instance.GetList(listId); + //Assert.IsInstanceOf (response, "response is GetExtendedList"); + } + + /// + /// Test GetLists + /// + [Test] + public void GetListsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? limit = null; + //long? offset = null; + //var response = instance.GetLists(limit, offset); + //Assert.IsInstanceOf (response, "response is GetLists"); + } + + /// + /// Test ImportContacts + /// + [Test] + public void ImportContactsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //RequestContactImport requestContactImport = null; + //var response = instance.ImportContacts(requestContactImport); + //Assert.IsInstanceOf (response, "response is CreatedProcessId"); + } + + /// + /// Test RemoveContactFromList + /// + [Test] + public void RemoveContactFromListTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? listId = null; + //RemoveContactFromList contactEmails = null; + //var response = instance.RemoveContactFromList(listId, contactEmails); + //Assert.IsInstanceOf (response, "response is PostContactInfo"); + } + + /// + /// Test RequestContactExport + /// + [Test] + public void RequestContactExportTest() + { + // TODO uncomment below to test the method and replace null with proper value + //RequestContactExport requestContactExport = null; + //var response = instance.RequestContactExport(requestContactExport); + //Assert.IsInstanceOf (response, "response is CreatedProcessId"); + } + + /// + /// Test UpdateAttribute + /// + [Test] + public void UpdateAttributeTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string attributeCategory = null; + //string attributeName = null; + //UpdateAttribute updateAttribute = null; + //instance.UpdateAttribute(attributeCategory, attributeName, updateAttribute); + + } + + /// + /// Test UpdateContact + /// + [Test] + public void UpdateContactTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string email = null; + //UpdateContact updateContact = null; + //instance.UpdateContact(email, updateContact); + + } + + /// + /// Test UpdateFolder + /// + [Test] + public void UpdateFolderTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? folderId = null; + //CreateUpdateFolder updateFolder = null; + //instance.UpdateFolder(folderId, updateFolder); + + } + + /// + /// Test UpdateList + /// + [Test] + public void UpdateListTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? listId = null; + //UpdateList updateList = null; + //instance.UpdateList(listId, updateList); + + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Api/EmailCampaignsApiTests.cs b/src/sib_api_v3_sdk.Test/Api/EmailCampaignsApiTests.cs new file mode 100644 index 0000000..1dfbbad --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Api/EmailCampaignsApiTests.cs @@ -0,0 +1,199 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using NUnit.Framework; + +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing EmailCampaignsApi + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the API endpoint. + /// + [TestFixture] + public class EmailCampaignsApiTests + { + private EmailCampaignsApi instance; + + /// + /// Setup before each unit test + /// + [SetUp] + public void Init() + { + instance = new EmailCampaignsApi(); + } + + /// + /// Clean up after each unit test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of EmailCampaignsApi + /// + [Test] + public void InstanceTest() + { + // TODO uncomment below to test 'IsInstanceOfType' EmailCampaignsApi + //Assert.IsInstanceOfType(typeof(EmailCampaignsApi), instance, "instance is a EmailCampaignsApi"); + } + + + /// + /// Test CreateEmailCampaign + /// + [Test] + public void CreateEmailCampaignTest() + { + // TODO uncomment below to test the method and replace null with proper value + //CreateEmailCampaign emailCampaigns = null; + //var response = instance.CreateEmailCampaign(emailCampaigns); + //Assert.IsInstanceOf (response, "response is CreateModel"); + } + + /// + /// Test DeleteEmailCampaign + /// + [Test] + public void DeleteEmailCampaignTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? campaignId = null; + //instance.DeleteEmailCampaign(campaignId); + + } + + /// + /// Test EmailExportRecipients + /// + [Test] + public void EmailExportRecipientsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? campaignId = null; + //EmailExportRecipients recipientExport = null; + //var response = instance.EmailExportRecipients(campaignId, recipientExport); + //Assert.IsInstanceOf (response, "response is CreatedProcessId"); + } + + /// + /// Test GetEmailCampaign + /// + [Test] + public void GetEmailCampaignTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? campaignId = null; + //var response = instance.GetEmailCampaign(campaignId); + //Assert.IsInstanceOf (response, "response is GetEmailCampaign"); + } + + /// + /// Test GetEmailCampaigns + /// + [Test] + public void GetEmailCampaignsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string type = null; + //string status = null; + //DateTime? startDate = null; + //DateTime? endDate = null; + //long? limit = null; + //long? offset = null; + //var response = instance.GetEmailCampaigns(type, status, startDate, endDate, limit, offset); + //Assert.IsInstanceOf (response, "response is GetEmailCampaigns"); + } + + /// + /// Test SendEmailCampaignNow + /// + [Test] + public void SendEmailCampaignNowTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? campaignId = null; + //instance.SendEmailCampaignNow(campaignId); + + } + + /// + /// Test SendReport + /// + [Test] + public void SendReportTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? campaignId = null; + //SendReport sendReport = null; + //instance.SendReport(campaignId, sendReport); + + } + + /// + /// Test SendTestEmail + /// + [Test] + public void SendTestEmailTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? campaignId = null; + //SendTestEmail emailTo = null; + //instance.SendTestEmail(campaignId, emailTo); + + } + + /// + /// Test UpdateCampaignStatus + /// + [Test] + public void UpdateCampaignStatusTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? campaignId = null; + //UpdateCampaignStatus status = null; + //instance.UpdateCampaignStatus(campaignId, status); + + } + + /// + /// Test UpdateEmailCampaign + /// + [Test] + public void UpdateEmailCampaignTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? campaignId = null; + //UpdateEmailCampaign emailCampaign = null; + //instance.UpdateEmailCampaign(campaignId, emailCampaign); + + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Api/FoldersApiTests.cs b/src/sib_api_v3_sdk.Test/Api/FoldersApiTests.cs new file mode 100644 index 0000000..7b9a1af --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Api/FoldersApiTests.cs @@ -0,0 +1,145 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using NUnit.Framework; + +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing FoldersApi + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the API endpoint. + /// + [TestFixture] + public class FoldersApiTests + { + private FoldersApi instance; + + /// + /// Setup before each unit test + /// + [SetUp] + public void Init() + { + instance = new FoldersApi(); + } + + /// + /// Clean up after each unit test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of FoldersApi + /// + [Test] + public void InstanceTest() + { + // TODO uncomment below to test 'IsInstanceOfType' FoldersApi + //Assert.IsInstanceOfType(typeof(FoldersApi), instance, "instance is a FoldersApi"); + } + + + /// + /// Test CreateFolder + /// + [Test] + public void CreateFolderTest() + { + // TODO uncomment below to test the method and replace null with proper value + //CreateUpdateFolder createFolder = null; + //var response = instance.CreateFolder(createFolder); + //Assert.IsInstanceOf (response, "response is CreateModel"); + } + + /// + /// Test DeleteFolder + /// + [Test] + public void DeleteFolderTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? folderId = null; + //instance.DeleteFolder(folderId); + + } + + /// + /// Test GetFolder + /// + [Test] + public void GetFolderTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? folderId = null; + //var response = instance.GetFolder(folderId); + //Assert.IsInstanceOf (response, "response is GetFolder"); + } + + /// + /// Test GetFolderLists + /// + [Test] + public void GetFolderListsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? folderId = null; + //long? limit = null; + //long? offset = null; + //var response = instance.GetFolderLists(folderId, limit, offset); + //Assert.IsInstanceOf (response, "response is GetFolderLists"); + } + + /// + /// Test GetFolders + /// + [Test] + public void GetFoldersTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? limit = null; + //long? offset = null; + //var response = instance.GetFolders(limit, offset); + //Assert.IsInstanceOf (response, "response is GetFolders"); + } + + /// + /// Test UpdateFolder + /// + [Test] + public void UpdateFolderTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? folderId = null; + //CreateUpdateFolder updateFolder = null; + //instance.UpdateFolder(folderId, updateFolder); + + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Api/ListsApiTests.cs b/src/sib_api_v3_sdk.Test/Api/ListsApiTests.cs new file mode 100644 index 0000000..9f4cfe8 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Api/ListsApiTests.cs @@ -0,0 +1,186 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using NUnit.Framework; + +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing ListsApi + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the API endpoint. + /// + [TestFixture] + public class ListsApiTests + { + private ListsApi instance; + + /// + /// Setup before each unit test + /// + [SetUp] + public void Init() + { + instance = new ListsApi(); + } + + /// + /// Clean up after each unit test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of ListsApi + /// + [Test] + public void InstanceTest() + { + // TODO uncomment below to test 'IsInstanceOfType' ListsApi + //Assert.IsInstanceOfType(typeof(ListsApi), instance, "instance is a ListsApi"); + } + + + /// + /// Test AddContactToList + /// + [Test] + public void AddContactToListTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? listId = null; + //AddContactToList contactEmails = null; + //var response = instance.AddContactToList(listId, contactEmails); + //Assert.IsInstanceOf (response, "response is PostContactInfo"); + } + + /// + /// Test CreateList + /// + [Test] + public void CreateListTest() + { + // TODO uncomment below to test the method and replace null with proper value + //CreateList createList = null; + //var response = instance.CreateList(createList); + //Assert.IsInstanceOf (response, "response is CreateModel"); + } + + /// + /// Test DeleteList + /// + [Test] + public void DeleteListTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? listId = null; + //instance.DeleteList(listId); + + } + + /// + /// Test GetContactsFromList + /// + [Test] + public void GetContactsFromListTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? listId = null; + //DateTime? modifiedSince = null; + //long? limit = null; + //long? offset = null; + //var response = instance.GetContactsFromList(listId, modifiedSince, limit, offset); + //Assert.IsInstanceOf (response, "response is GetContacts"); + } + + /// + /// Test GetFolderLists + /// + [Test] + public void GetFolderListsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? folderId = null; + //long? limit = null; + //long? offset = null; + //var response = instance.GetFolderLists(folderId, limit, offset); + //Assert.IsInstanceOf (response, "response is GetFolderLists"); + } + + /// + /// Test GetList + /// + [Test] + public void GetListTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? listId = null; + //var response = instance.GetList(listId); + //Assert.IsInstanceOf (response, "response is GetExtendedList"); + } + + /// + /// Test GetLists + /// + [Test] + public void GetListsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? limit = null; + //long? offset = null; + //var response = instance.GetLists(limit, offset); + //Assert.IsInstanceOf (response, "response is GetLists"); + } + + /// + /// Test RemoveContactFromList + /// + [Test] + public void RemoveContactFromListTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? listId = null; + //RemoveContactFromList contactEmails = null; + //var response = instance.RemoveContactFromList(listId, contactEmails); + //Assert.IsInstanceOf (response, "response is PostContactInfo"); + } + + /// + /// Test UpdateList + /// + [Test] + public void UpdateListTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? listId = null; + //UpdateList updateList = null; + //instance.UpdateList(listId, updateList); + + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Api/ProcessApiTests.cs b/src/sib_api_v3_sdk.Test/Api/ProcessApiTests.cs new file mode 100644 index 0000000..b89c8a3 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Api/ProcessApiTests.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using NUnit.Framework; + +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing ProcessApi + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the API endpoint. + /// + [TestFixture] + public class ProcessApiTests + { + private ProcessApi instance; + + /// + /// Setup before each unit test + /// + [SetUp] + public void Init() + { + instance = new ProcessApi(); + } + + /// + /// Clean up after each unit test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of ProcessApi + /// + [Test] + public void InstanceTest() + { + // TODO uncomment below to test 'IsInstanceOfType' ProcessApi + //Assert.IsInstanceOfType(typeof(ProcessApi), instance, "instance is a ProcessApi"); + } + + + /// + /// Test GetProcess + /// + [Test] + public void GetProcessTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? processId = null; + //var response = instance.GetProcess(processId); + //Assert.IsInstanceOf (response, "response is GetProcess"); + } + + /// + /// Test GetProcesses + /// + [Test] + public void GetProcessesTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? limit = null; + //long? offset = null; + //var response = instance.GetProcesses(limit, offset); + //Assert.IsInstanceOf (response, "response is GetProcesses"); + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Api/ResellerApiTests.cs b/src/sib_api_v3_sdk.Test/Api/ResellerApiTests.cs new file mode 100644 index 0000000..5cd56d4 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Api/ResellerApiTests.cs @@ -0,0 +1,181 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using NUnit.Framework; + +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing ResellerApi + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the API endpoint. + /// + [TestFixture] + public class ResellerApiTests + { + private ResellerApi instance; + + /// + /// Setup before each unit test + /// + [SetUp] + public void Init() + { + instance = new ResellerApi(); + } + + /// + /// Clean up after each unit test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of ResellerApi + /// + [Test] + public void InstanceTest() + { + // TODO uncomment below to test 'IsInstanceOfType' ResellerApi + //Assert.IsInstanceOfType(typeof(ResellerApi), instance, "instance is a ResellerApi"); + } + + + /// + /// Test AddCredits + /// + [Test] + public void AddCreditsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string childAuthKey = null; + //AddCredits addCredits = null; + //var response = instance.AddCredits(childAuthKey, addCredits); + //Assert.IsInstanceOf (response, "response is RemainingCreditModel"); + } + + /// + /// Test AssociateIpToChild + /// + [Test] + public void AssociateIpToChildTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string childAuthKey = null; + //ManageIp ip = null; + //instance.AssociateIpToChild(childAuthKey, ip); + + } + + /// + /// Test CreateResellerChild + /// + [Test] + public void CreateResellerChildTest() + { + // TODO uncomment below to test the method and replace null with proper value + //CreateChild resellerChild = null; + //var response = instance.CreateResellerChild(resellerChild); + //Assert.IsInstanceOf (response, "response is CreateReseller"); + } + + /// + /// Test DeleteResellerChild + /// + [Test] + public void DeleteResellerChildTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string childAuthKey = null; + //instance.DeleteResellerChild(childAuthKey); + + } + + /// + /// Test DissociateIpFromChild + /// + [Test] + public void DissociateIpFromChildTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string childAuthKey = null; + //ManageIp ip = null; + //instance.DissociateIpFromChild(childAuthKey, ip); + + } + + /// + /// Test GetChildInfo + /// + [Test] + public void GetChildInfoTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string childAuthKey = null; + //var response = instance.GetChildInfo(childAuthKey); + //Assert.IsInstanceOf (response, "response is GetChildInfo"); + } + + /// + /// Test GetResellerChilds + /// + [Test] + public void GetResellerChildsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.GetResellerChilds(); + //Assert.IsInstanceOf (response, "response is GetChildrenList"); + } + + /// + /// Test RemoveCredits + /// + [Test] + public void RemoveCreditsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string childAuthKey = null; + //RemoveCredits removeCredits = null; + //var response = instance.RemoveCredits(childAuthKey, removeCredits); + //Assert.IsInstanceOf (response, "response is RemainingCreditModel"); + } + + /// + /// Test UpdateResellerChild + /// + [Test] + public void UpdateResellerChildTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string childAuthKey = null; + //UpdateChild resellerChild = null; + //instance.UpdateResellerChild(childAuthKey, resellerChild); + + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Api/SMSCampaignsApiTests.cs b/src/sib_api_v3_sdk.Test/Api/SMSCampaignsApiTests.cs new file mode 100644 index 0000000..dcfa6f0 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Api/SMSCampaignsApiTests.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using NUnit.Framework; + +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing SMSCampaignsApi + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the API endpoint. + /// + [TestFixture] + public class SMSCampaignsApiTests + { + private SMSCampaignsApi instance; + + /// + /// Setup before each unit test + /// + [SetUp] + public void Init() + { + instance = new SMSCampaignsApi(); + } + + /// + /// Clean up after each unit test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of SMSCampaignsApi + /// + [Test] + public void InstanceTest() + { + // TODO uncomment below to test 'IsInstanceOfType' SMSCampaignsApi + //Assert.IsInstanceOfType(typeof(SMSCampaignsApi), instance, "instance is a SMSCampaignsApi"); + } + + + /// + /// Test CreateSmsCampaign + /// + [Test] + public void CreateSmsCampaignTest() + { + // TODO uncomment below to test the method and replace null with proper value + //CreateSmsCampaign createSmsCampaign = null; + //var response = instance.CreateSmsCampaign(createSmsCampaign); + //Assert.IsInstanceOf (response, "response is CreateModel"); + } + + /// + /// Test DeleteSmsCampaign + /// + [Test] + public void DeleteSmsCampaignTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? campaignId = null; + //instance.DeleteSmsCampaign(campaignId); + + } + + /// + /// Test GetSmsCampaign + /// + [Test] + public void GetSmsCampaignTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? campaignId = null; + //var response = instance.GetSmsCampaign(campaignId); + //Assert.IsInstanceOf (response, "response is GetSmsCampaign"); + } + + /// + /// Test GetSmsCampaigns + /// + [Test] + public void GetSmsCampaignsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string status = null; + //DateTime? startDate = null; + //DateTime? endDate = null; + //long? limit = null; + //long? offset = null; + //var response = instance.GetSmsCampaigns(status, startDate, endDate, limit, offset); + //Assert.IsInstanceOf (response, "response is GetSmsCampaigns"); + } + + /// + /// Test RequestSmsRecipientExport + /// + [Test] + public void RequestSmsRecipientExportTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? campaignId = null; + //RequestSmsRecipientExport recipientExport = null; + //var response = instance.RequestSmsRecipientExport(campaignId, recipientExport); + //Assert.IsInstanceOf (response, "response is CreatedProcessId"); + } + + /// + /// Test SendSmsCampaignNow + /// + [Test] + public void SendSmsCampaignNowTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? campaignId = null; + //instance.SendSmsCampaignNow(campaignId); + + } + + /// + /// Test SendSmsReport + /// + [Test] + public void SendSmsReportTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? campaignId = null; + //SendReport sendReport = null; + //instance.SendSmsReport(campaignId, sendReport); + + } + + /// + /// Test SendTestSms + /// + [Test] + public void SendTestSmsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? campaignId = null; + //SendTestSms phoneNumber = null; + //instance.SendTestSms(campaignId, phoneNumber); + + } + + /// + /// Test UpdateSmsCampaign + /// + [Test] + public void UpdateSmsCampaignTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? campaignId = null; + //UpdateSmsCampaign updateSmsCampaign = null; + //instance.UpdateSmsCampaign(campaignId, updateSmsCampaign); + + } + + /// + /// Test UpdateSmsCampaignStatus + /// + [Test] + public void UpdateSmsCampaignStatusTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? campaignId = null; + //UpdateCampaignStatus status = null; + //instance.UpdateSmsCampaignStatus(campaignId, status); + + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Api/SMTPApiTests.cs b/src/sib_api_v3_sdk.Test/Api/SMTPApiTests.cs new file mode 100644 index 0000000..2b28c74 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Api/SMTPApiTests.cs @@ -0,0 +1,235 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using NUnit.Framework; + +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing SMTPApi + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the API endpoint. + /// + [TestFixture] + public class SMTPApiTests + { + private SMTPApi instance; + + /// + /// Setup before each unit test + /// + [SetUp] + public void Init() + { + instance = new SMTPApi(); + } + + /// + /// Clean up after each unit test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of SMTPApi + /// + [Test] + public void InstanceTest() + { + // TODO uncomment below to test 'IsInstanceOfType' SMTPApi + //Assert.IsInstanceOfType(typeof(SMTPApi), instance, "instance is a SMTPApi"); + } + + + /// + /// Test CreateSmtpTemplate + /// + [Test] + public void CreateSmtpTemplateTest() + { + // TODO uncomment below to test the method and replace null with proper value + //CreateSmtpTemplate smtpTemplate = null; + //var response = instance.CreateSmtpTemplate(smtpTemplate); + //Assert.IsInstanceOf (response, "response is CreateModel"); + } + + /// + /// Test DeleteHardbounces + /// + [Test] + public void DeleteHardbouncesTest() + { + // TODO uncomment below to test the method and replace null with proper value + //DeleteHardbounces deleteHardbounces = null; + //instance.DeleteHardbounces(deleteHardbounces); + + } + + /// + /// Test DeleteSmtpTemplate + /// + [Test] + public void DeleteSmtpTemplateTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? templateId = null; + //instance.DeleteSmtpTemplate(templateId); + + } + + /// + /// Test GetAggregatedSmtpReport + /// + [Test] + public void GetAggregatedSmtpReportTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string startDate = null; + //string endDate = null; + //int? days = null; + //string tag = null; + //var response = instance.GetAggregatedSmtpReport(startDate, endDate, days, tag); + //Assert.IsInstanceOf (response, "response is GetAggregatedReport"); + } + + /// + /// Test GetEmailEventReport + /// + [Test] + public void GetEmailEventReportTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? limit = null; + //long? offset = null; + //string startDate = null; + //string endDate = null; + //int? days = null; + //string email = null; + //string _event = null; + //string tags = null; + //string messageId = null; + //long? templateId = null; + //var response = instance.GetEmailEventReport(limit, offset, startDate, endDate, days, email, _event, tags, messageId, templateId); + //Assert.IsInstanceOf (response, "response is GetEmailEventReport"); + } + + /// + /// Test GetSmtpReport + /// + [Test] + public void GetSmtpReportTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? limit = null; + //long? offset = null; + //string startDate = null; + //string endDate = null; + //int? days = null; + //string tag = null; + //var response = instance.GetSmtpReport(limit, offset, startDate, endDate, days, tag); + //Assert.IsInstanceOf (response, "response is GetReports"); + } + + /// + /// Test GetSmtpTemplate + /// + [Test] + public void GetSmtpTemplateTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? templateId = null; + //var response = instance.GetSmtpTemplate(templateId); + //Assert.IsInstanceOf (response, "response is GetSmtpTemplateOverview"); + } + + /// + /// Test GetSmtpTemplates + /// + [Test] + public void GetSmtpTemplatesTest() + { + // TODO uncomment below to test the method and replace null with proper value + //bool? templateStatus = null; + //long? limit = null; + //long? offset = null; + //var response = instance.GetSmtpTemplates(templateStatus, limit, offset); + //Assert.IsInstanceOf (response, "response is GetSmtpTemplates"); + } + + /// + /// Test SendTemplate + /// + [Test] + public void SendTemplateTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? templateId = null; + //SendEmail sendEmail = null; + //var response = instance.SendTemplate(templateId, sendEmail); + //Assert.IsInstanceOf (response, "response is SendTemplateEmail"); + } + + /// + /// Test SendTestTemplate + /// + [Test] + public void SendTestTemplateTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? templateId = null; + //SendTestEmail sendTestEmail = null; + //instance.SendTestTemplate(templateId, sendTestEmail); + + } + + /// + /// Test SendTransacEmail + /// + [Test] + public void SendTransacEmailTest() + { + // TODO uncomment below to test the method and replace null with proper value + //SendSmtpEmail sendSmtpEmail = null; + //var response = instance.SendTransacEmail(sendSmtpEmail); + //Assert.IsInstanceOf (response, "response is CreateSmtpEmail"); + } + + /// + /// Test UpdateSmtpTemplate + /// + [Test] + public void UpdateSmtpTemplateTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? templateId = null; + //UpdateSmtpTemplate smtpTemplate = null; + //instance.UpdateSmtpTemplate(templateId, smtpTemplate); + + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Api/SendersApiTests.cs b/src/sib_api_v3_sdk.Test/Api/SendersApiTests.cs new file mode 100644 index 0000000..45be8dd --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Api/SendersApiTests.cs @@ -0,0 +1,142 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using NUnit.Framework; + +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing SendersApi + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the API endpoint. + /// + [TestFixture] + public class SendersApiTests + { + private SendersApi instance; + + /// + /// Setup before each unit test + /// + [SetUp] + public void Init() + { + instance = new SendersApi(); + } + + /// + /// Clean up after each unit test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of SendersApi + /// + [Test] + public void InstanceTest() + { + // TODO uncomment below to test 'IsInstanceOfType' SendersApi + //Assert.IsInstanceOfType(typeof(SendersApi), instance, "instance is a SendersApi"); + } + + + /// + /// Test CreateSender + /// + [Test] + public void CreateSenderTest() + { + // TODO uncomment below to test the method and replace null with proper value + //CreateSender sender = null; + //var response = instance.CreateSender(sender); + //Assert.IsInstanceOf (response, "response is CreateSenderModel"); + } + + /// + /// Test DeleteSender + /// + [Test] + public void DeleteSenderTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? senderId = null; + //instance.DeleteSender(senderId); + + } + + /// + /// Test GetIps + /// + [Test] + public void GetIpsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.GetIps(); + //Assert.IsInstanceOf (response, "response is GetIps"); + } + + /// + /// Test GetIpsFromSender + /// + [Test] + public void GetIpsFromSenderTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? senderId = null; + //var response = instance.GetIpsFromSender(senderId); + //Assert.IsInstanceOf (response, "response is GetIpsFromSender"); + } + + /// + /// Test GetSenders + /// + [Test] + public void GetSendersTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string ip = null; + //string domain = null; + //var response = instance.GetSenders(ip, domain); + //Assert.IsInstanceOf (response, "response is GetSendersList"); + } + + /// + /// Test UpdateSender + /// + [Test] + public void UpdateSenderTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? senderId = null; + //UpdateSender sender = null; + //instance.UpdateSender(senderId, sender); + + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Api/TransactionalSMSApiTests.cs b/src/sib_api_v3_sdk.Test/Api/TransactionalSMSApiTests.cs new file mode 100644 index 0000000..234fd36 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Api/TransactionalSMSApiTests.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using NUnit.Framework; + +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing TransactionalSMSApi + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the API endpoint. + /// + [TestFixture] + public class TransactionalSMSApiTests + { + private TransactionalSMSApi instance; + + /// + /// Setup before each unit test + /// + [SetUp] + public void Init() + { + instance = new TransactionalSMSApi(); + } + + /// + /// Clean up after each unit test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of TransactionalSMSApi + /// + [Test] + public void InstanceTest() + { + // TODO uncomment below to test 'IsInstanceOfType' TransactionalSMSApi + //Assert.IsInstanceOfType(typeof(TransactionalSMSApi), instance, "instance is a TransactionalSMSApi"); + } + + + /// + /// Test GetSmsEvents + /// + [Test] + public void GetSmsEventsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? limit = null; + //string startDate = null; + //string endDate = null; + //long? offset = null; + //int? days = null; + //string phoneNumber = null; + //string _event = null; + //string tags = null; + //var response = instance.GetSmsEvents(limit, startDate, endDate, offset, days, phoneNumber, _event, tags); + //Assert.IsInstanceOf (response, "response is GetSmsEventReport"); + } + + /// + /// Test GetTransacAggregatedSmsReport + /// + [Test] + public void GetTransacAggregatedSmsReportTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string startDate = null; + //string endDate = null; + //int? days = null; + //string tag = null; + //var response = instance.GetTransacAggregatedSmsReport(startDate, endDate, days, tag); + //Assert.IsInstanceOf (response, "response is GetTransacAggregatedSmsReport"); + } + + /// + /// Test GetTransacSmsReport + /// + [Test] + public void GetTransacSmsReportTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string startDate = null; + //string endDate = null; + //int? days = null; + //string tag = null; + //var response = instance.GetTransacSmsReport(startDate, endDate, days, tag); + //Assert.IsInstanceOf (response, "response is GetTransacSmsReport"); + } + + /// + /// Test SendTransacSms + /// + [Test] + public void SendTransacSmsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //SendTransacSms sendTransacSms = null; + //var response = instance.SendTransacSms(sendTransacSms); + //Assert.IsInstanceOf (response, "response is SendSms"); + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Api/WebhooksApiTests.cs b/src/sib_api_v3_sdk.Test/Api/WebhooksApiTests.cs new file mode 100644 index 0000000..b27076c --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Api/WebhooksApiTests.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using NUnit.Framework; + +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing WebhooksApi + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the API endpoint. + /// + [TestFixture] + public class WebhooksApiTests + { + private WebhooksApi instance; + + /// + /// Setup before each unit test + /// + [SetUp] + public void Init() + { + instance = new WebhooksApi(); + } + + /// + /// Clean up after each unit test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of WebhooksApi + /// + [Test] + public void InstanceTest() + { + // TODO uncomment below to test 'IsInstanceOfType' WebhooksApi + //Assert.IsInstanceOfType(typeof(WebhooksApi), instance, "instance is a WebhooksApi"); + } + + + /// + /// Test CreateWebhook + /// + [Test] + public void CreateWebhookTest() + { + // TODO uncomment below to test the method and replace null with proper value + //CreateWebhook createWebhook = null; + //var response = instance.CreateWebhook(createWebhook); + //Assert.IsInstanceOf (response, "response is CreateModel"); + } + + /// + /// Test DeleteWebhook + /// + [Test] + public void DeleteWebhookTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? webhookId = null; + //instance.DeleteWebhook(webhookId); + + } + + /// + /// Test GetWebhook + /// + [Test] + public void GetWebhookTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? webhookId = null; + //var response = instance.GetWebhook(webhookId); + //Assert.IsInstanceOf (response, "response is GetWebhook"); + } + + /// + /// Test GetWebhooks + /// + [Test] + public void GetWebhooksTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string type = null; + //var response = instance.GetWebhooks(type); + //Assert.IsInstanceOf (response, "response is GetWebhooks"); + } + + /// + /// Test UpdateWebhook + /// + [Test] + public void UpdateWebhookTest() + { + // TODO uncomment below to test the method and replace null with proper value + //long? webhookId = null; + //UpdateWebhook updateWebhook = null; + //instance.UpdateWebhook(webhookId, updateWebhook); + + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/AddContactToListTests.cs b/src/sib_api_v3_sdk.Test/Model/AddContactToListTests.cs new file mode 100644 index 0000000..0515e11 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/AddContactToListTests.cs @@ -0,0 +1,80 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing AddContactToList + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class AddContactToListTests + { + // TODO uncomment below to declare an instance variable for AddContactToList + //private AddContactToList instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of AddContactToList + //instance = new AddContactToList(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of AddContactToList + /// + [Test] + public void AddContactToListInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" AddContactToList + //Assert.IsInstanceOfType (instance, "variable 'instance' is a AddContactToList"); + } + + + /// + /// Test the property 'Emails' + /// + [Test] + public void EmailsTest() + { + // TODO unit test for the property 'Emails' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/AddCreditsTests.cs b/src/sib_api_v3_sdk.Test/Model/AddCreditsTests.cs new file mode 100644 index 0000000..a42a9ee --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/AddCreditsTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing AddCredits + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class AddCreditsTests + { + // TODO uncomment below to declare an instance variable for AddCredits + //private AddCredits instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of AddCredits + //instance = new AddCredits(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of AddCredits + /// + [Test] + public void AddCreditsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" AddCredits + //Assert.IsInstanceOfType (instance, "variable 'instance' is a AddCredits"); + } + + + /// + /// Test the property 'Sms' + /// + [Test] + public void SmsTest() + { + // TODO unit test for the property 'Sms' + } + /// + /// Test the property 'Email' + /// + [Test] + public void EmailTest() + { + // TODO unit test for the property 'Email' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/CreateAttributeEnumerationTests.cs b/src/sib_api_v3_sdk.Test/Model/CreateAttributeEnumerationTests.cs new file mode 100644 index 0000000..4fbca81 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/CreateAttributeEnumerationTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing CreateAttributeEnumeration + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class CreateAttributeEnumerationTests + { + // TODO uncomment below to declare an instance variable for CreateAttributeEnumeration + //private CreateAttributeEnumeration instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of CreateAttributeEnumeration + //instance = new CreateAttributeEnumeration(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of CreateAttributeEnumeration + /// + [Test] + public void CreateAttributeEnumerationInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" CreateAttributeEnumeration + //Assert.IsInstanceOfType (instance, "variable 'instance' is a CreateAttributeEnumeration"); + } + + + /// + /// Test the property 'Value' + /// + [Test] + public void ValueTest() + { + // TODO unit test for the property 'Value' + } + /// + /// Test the property 'Label' + /// + [Test] + public void LabelTest() + { + // TODO unit test for the property 'Label' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/CreateAttributeTests.cs b/src/sib_api_v3_sdk.Test/Model/CreateAttributeTests.cs new file mode 100644 index 0000000..219316d --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/CreateAttributeTests.cs @@ -0,0 +1,96 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing CreateAttribute + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class CreateAttributeTests + { + // TODO uncomment below to declare an instance variable for CreateAttribute + //private CreateAttribute instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of CreateAttribute + //instance = new CreateAttribute(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of CreateAttribute + /// + [Test] + public void CreateAttributeInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" CreateAttribute + //Assert.IsInstanceOfType (instance, "variable 'instance' is a CreateAttribute"); + } + + + /// + /// Test the property 'Value' + /// + [Test] + public void ValueTest() + { + // TODO unit test for the property 'Value' + } + /// + /// Test the property 'Enumeration' + /// + [Test] + public void EnumerationTest() + { + // TODO unit test for the property 'Enumeration' + } + /// + /// Test the property 'Type' + /// + [Test] + public void TypeTest() + { + // TODO unit test for the property 'Type' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/CreateChildTests.cs b/src/sib_api_v3_sdk.Test/Model/CreateChildTests.cs new file mode 100644 index 0000000..43dbd48 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/CreateChildTests.cs @@ -0,0 +1,112 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing CreateChild + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class CreateChildTests + { + // TODO uncomment below to declare an instance variable for CreateChild + //private CreateChild instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of CreateChild + //instance = new CreateChild(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of CreateChild + /// + [Test] + public void CreateChildInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" CreateChild + //Assert.IsInstanceOfType (instance, "variable 'instance' is a CreateChild"); + } + + + /// + /// Test the property 'Email' + /// + [Test] + public void EmailTest() + { + // TODO unit test for the property 'Email' + } + /// + /// Test the property 'FirstName' + /// + [Test] + public void FirstNameTest() + { + // TODO unit test for the property 'FirstName' + } + /// + /// Test the property 'LastName' + /// + [Test] + public void LastNameTest() + { + // TODO unit test for the property 'LastName' + } + /// + /// Test the property 'CompanyName' + /// + [Test] + public void CompanyNameTest() + { + // TODO unit test for the property 'CompanyName' + } + /// + /// Test the property 'Password' + /// + [Test] + public void PasswordTest() + { + // TODO unit test for the property 'Password' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/CreateContactTests.cs b/src/sib_api_v3_sdk.Test/Model/CreateContactTests.cs new file mode 100644 index 0000000..d90bfc4 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/CreateContactTests.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing CreateContact + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class CreateContactTests + { + // TODO uncomment below to declare an instance variable for CreateContact + //private CreateContact instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of CreateContact + //instance = new CreateContact(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of CreateContact + /// + [Test] + public void CreateContactInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" CreateContact + //Assert.IsInstanceOfType (instance, "variable 'instance' is a CreateContact"); + } + + + /// + /// Test the property 'Email' + /// + [Test] + public void EmailTest() + { + // TODO unit test for the property 'Email' + } + /// + /// Test the property 'Attributes' + /// + [Test] + public void AttributesTest() + { + // TODO unit test for the property 'Attributes' + } + /// + /// Test the property 'EmailBlacklisted' + /// + [Test] + public void EmailBlacklistedTest() + { + // TODO unit test for the property 'EmailBlacklisted' + } + /// + /// Test the property 'SmsBlacklisted' + /// + [Test] + public void SmsBlacklistedTest() + { + // TODO unit test for the property 'SmsBlacklisted' + } + /// + /// Test the property 'ListIds' + /// + [Test] + public void ListIdsTest() + { + // TODO unit test for the property 'ListIds' + } + /// + /// Test the property 'UpdateEnabled' + /// + [Test] + public void UpdateEnabledTest() + { + // TODO unit test for the property 'UpdateEnabled' + } + /// + /// Test the property 'SmtpBlacklistSender' + /// + [Test] + public void SmtpBlacklistSenderTest() + { + // TODO unit test for the property 'SmtpBlacklistSender' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/CreateEmailCampaignRecipientsTests.cs b/src/sib_api_v3_sdk.Test/Model/CreateEmailCampaignRecipientsTests.cs new file mode 100644 index 0000000..2350c99 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/CreateEmailCampaignRecipientsTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing CreateEmailCampaignRecipients + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class CreateEmailCampaignRecipientsTests + { + // TODO uncomment below to declare an instance variable for CreateEmailCampaignRecipients + //private CreateEmailCampaignRecipients instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of CreateEmailCampaignRecipients + //instance = new CreateEmailCampaignRecipients(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of CreateEmailCampaignRecipients + /// + [Test] + public void CreateEmailCampaignRecipientsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" CreateEmailCampaignRecipients + //Assert.IsInstanceOfType (instance, "variable 'instance' is a CreateEmailCampaignRecipients"); + } + + + /// + /// Test the property 'ExclusionListIds' + /// + [Test] + public void ExclusionListIdsTest() + { + // TODO unit test for the property 'ExclusionListIds' + } + /// + /// Test the property 'ListIds' + /// + [Test] + public void ListIdsTest() + { + // TODO unit test for the property 'ListIds' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/CreateEmailCampaignSenderTests.cs b/src/sib_api_v3_sdk.Test/Model/CreateEmailCampaignSenderTests.cs new file mode 100644 index 0000000..e259b40 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/CreateEmailCampaignSenderTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing CreateEmailCampaignSender + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class CreateEmailCampaignSenderTests + { + // TODO uncomment below to declare an instance variable for CreateEmailCampaignSender + //private CreateEmailCampaignSender instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of CreateEmailCampaignSender + //instance = new CreateEmailCampaignSender(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of CreateEmailCampaignSender + /// + [Test] + public void CreateEmailCampaignSenderInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" CreateEmailCampaignSender + //Assert.IsInstanceOfType (instance, "variable 'instance' is a CreateEmailCampaignSender"); + } + + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Email' + /// + [Test] + public void EmailTest() + { + // TODO unit test for the property 'Email' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/CreateEmailCampaignTests.cs b/src/sib_api_v3_sdk.Test/Model/CreateEmailCampaignTests.cs new file mode 100644 index 0000000..879b2cb --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/CreateEmailCampaignTests.cs @@ -0,0 +1,272 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing CreateEmailCampaign + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class CreateEmailCampaignTests + { + // TODO uncomment below to declare an instance variable for CreateEmailCampaign + //private CreateEmailCampaign instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of CreateEmailCampaign + //instance = new CreateEmailCampaign(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of CreateEmailCampaign + /// + [Test] + public void CreateEmailCampaignInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" CreateEmailCampaign + //Assert.IsInstanceOfType (instance, "variable 'instance' is a CreateEmailCampaign"); + } + + + /// + /// Test the property 'Tag' + /// + [Test] + public void TagTest() + { + // TODO unit test for the property 'Tag' + } + /// + /// Test the property 'Sender' + /// + [Test] + public void SenderTest() + { + // TODO unit test for the property 'Sender' + } + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'HtmlContent' + /// + [Test] + public void HtmlContentTest() + { + // TODO unit test for the property 'HtmlContent' + } + /// + /// Test the property 'HtmlUrl' + /// + [Test] + public void HtmlUrlTest() + { + // TODO unit test for the property 'HtmlUrl' + } + /// + /// Test the property 'TemplateId' + /// + [Test] + public void TemplateIdTest() + { + // TODO unit test for the property 'TemplateId' + } + /// + /// Test the property 'ScheduledAt' + /// + [Test] + public void ScheduledAtTest() + { + // TODO unit test for the property 'ScheduledAt' + } + /// + /// Test the property 'Subject' + /// + [Test] + public void SubjectTest() + { + // TODO unit test for the property 'Subject' + } + /// + /// Test the property 'ReplyTo' + /// + [Test] + public void ReplyToTest() + { + // TODO unit test for the property 'ReplyTo' + } + /// + /// Test the property 'ToField' + /// + [Test] + public void ToFieldTest() + { + // TODO unit test for the property 'ToField' + } + /// + /// Test the property 'Recipients' + /// + [Test] + public void RecipientsTest() + { + // TODO unit test for the property 'Recipients' + } + /// + /// Test the property 'AttachmentUrl' + /// + [Test] + public void AttachmentUrlTest() + { + // TODO unit test for the property 'AttachmentUrl' + } + /// + /// Test the property 'InlineImageActivation' + /// + [Test] + public void InlineImageActivationTest() + { + // TODO unit test for the property 'InlineImageActivation' + } + /// + /// Test the property 'MirrorActive' + /// + [Test] + public void MirrorActiveTest() + { + // TODO unit test for the property 'MirrorActive' + } + /// + /// Test the property 'Footer' + /// + [Test] + public void FooterTest() + { + // TODO unit test for the property 'Footer' + } + /// + /// Test the property 'Header' + /// + [Test] + public void HeaderTest() + { + // TODO unit test for the property 'Header' + } + /// + /// Test the property 'UtmCampaign' + /// + [Test] + public void UtmCampaignTest() + { + // TODO unit test for the property 'UtmCampaign' + } + /// + /// Test the property 'Params' + /// + [Test] + public void ParamsTest() + { + // TODO unit test for the property 'Params' + } + /// + /// Test the property 'SendAtBestTime' + /// + [Test] + public void SendAtBestTimeTest() + { + // TODO unit test for the property 'SendAtBestTime' + } + /// + /// Test the property 'AbTesting' + /// + [Test] + public void AbTestingTest() + { + // TODO unit test for the property 'AbTesting' + } + /// + /// Test the property 'SubjectA' + /// + [Test] + public void SubjectATest() + { + // TODO unit test for the property 'SubjectA' + } + /// + /// Test the property 'SubjectB' + /// + [Test] + public void SubjectBTest() + { + // TODO unit test for the property 'SubjectB' + } + /// + /// Test the property 'SplitRule' + /// + [Test] + public void SplitRuleTest() + { + // TODO unit test for the property 'SplitRule' + } + /// + /// Test the property 'WinnerCriteria' + /// + [Test] + public void WinnerCriteriaTest() + { + // TODO unit test for the property 'WinnerCriteria' + } + /// + /// Test the property 'WinnerDelay' + /// + [Test] + public void WinnerDelayTest() + { + // TODO unit test for the property 'WinnerDelay' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/CreateListTests.cs b/src/sib_api_v3_sdk.Test/Model/CreateListTests.cs new file mode 100644 index 0000000..bc9f4c2 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/CreateListTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing CreateList + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class CreateListTests + { + // TODO uncomment below to declare an instance variable for CreateList + //private CreateList instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of CreateList + //instance = new CreateList(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of CreateList + /// + [Test] + public void CreateListInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" CreateList + //Assert.IsInstanceOfType (instance, "variable 'instance' is a CreateList"); + } + + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'FolderId' + /// + [Test] + public void FolderIdTest() + { + // TODO unit test for the property 'FolderId' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/CreateModelTests.cs b/src/sib_api_v3_sdk.Test/Model/CreateModelTests.cs new file mode 100644 index 0000000..51f4a4d --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/CreateModelTests.cs @@ -0,0 +1,80 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing CreateModel + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class CreateModelTests + { + // TODO uncomment below to declare an instance variable for CreateModel + //private CreateModel instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of CreateModel + //instance = new CreateModel(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of CreateModel + /// + [Test] + public void CreateModelInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" CreateModel + //Assert.IsInstanceOfType (instance, "variable 'instance' is a CreateModel"); + } + + + /// + /// Test the property 'Id' + /// + [Test] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/CreateResellerTests.cs b/src/sib_api_v3_sdk.Test/Model/CreateResellerTests.cs new file mode 100644 index 0000000..a3207c6 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/CreateResellerTests.cs @@ -0,0 +1,80 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing CreateReseller + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class CreateResellerTests + { + // TODO uncomment below to declare an instance variable for CreateReseller + //private CreateReseller instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of CreateReseller + //instance = new CreateReseller(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of CreateReseller + /// + [Test] + public void CreateResellerInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" CreateReseller + //Assert.IsInstanceOfType (instance, "variable 'instance' is a CreateReseller"); + } + + + /// + /// Test the property 'AuthKey' + /// + [Test] + public void AuthKeyTest() + { + // TODO unit test for the property 'AuthKey' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/CreateSenderIpsTests.cs b/src/sib_api_v3_sdk.Test/Model/CreateSenderIpsTests.cs new file mode 100644 index 0000000..dee2fb7 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/CreateSenderIpsTests.cs @@ -0,0 +1,96 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing CreateSenderIps + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class CreateSenderIpsTests + { + // TODO uncomment below to declare an instance variable for CreateSenderIps + //private CreateSenderIps instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of CreateSenderIps + //instance = new CreateSenderIps(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of CreateSenderIps + /// + [Test] + public void CreateSenderIpsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" CreateSenderIps + //Assert.IsInstanceOfType (instance, "variable 'instance' is a CreateSenderIps"); + } + + + /// + /// Test the property 'Ip' + /// + [Test] + public void IpTest() + { + // TODO unit test for the property 'Ip' + } + /// + /// Test the property 'Domain' + /// + [Test] + public void DomainTest() + { + // TODO unit test for the property 'Domain' + } + /// + /// Test the property 'Weight' + /// + [Test] + public void WeightTest() + { + // TODO unit test for the property 'Weight' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/CreateSenderModelTests.cs b/src/sib_api_v3_sdk.Test/Model/CreateSenderModelTests.cs new file mode 100644 index 0000000..5d3709b --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/CreateSenderModelTests.cs @@ -0,0 +1,96 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing CreateSenderModel + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class CreateSenderModelTests + { + // TODO uncomment below to declare an instance variable for CreateSenderModel + //private CreateSenderModel instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of CreateSenderModel + //instance = new CreateSenderModel(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of CreateSenderModel + /// + [Test] + public void CreateSenderModelInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" CreateSenderModel + //Assert.IsInstanceOfType (instance, "variable 'instance' is a CreateSenderModel"); + } + + + /// + /// Test the property 'Id' + /// + [Test] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'SpfError' + /// + [Test] + public void SpfErrorTest() + { + // TODO unit test for the property 'SpfError' + } + /// + /// Test the property 'DkimError' + /// + [Test] + public void DkimErrorTest() + { + // TODO unit test for the property 'DkimError' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/CreateSenderTests.cs b/src/sib_api_v3_sdk.Test/Model/CreateSenderTests.cs new file mode 100644 index 0000000..7b369a9 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/CreateSenderTests.cs @@ -0,0 +1,96 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing CreateSender + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class CreateSenderTests + { + // TODO uncomment below to declare an instance variable for CreateSender + //private CreateSender instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of CreateSender + //instance = new CreateSender(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of CreateSender + /// + [Test] + public void CreateSenderInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" CreateSender + //Assert.IsInstanceOfType (instance, "variable 'instance' is a CreateSender"); + } + + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Email' + /// + [Test] + public void EmailTest() + { + // TODO unit test for the property 'Email' + } + /// + /// Test the property 'Ips' + /// + [Test] + public void IpsTest() + { + // TODO unit test for the property 'Ips' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/CreateSmsCampaignRecipientsTests.cs b/src/sib_api_v3_sdk.Test/Model/CreateSmsCampaignRecipientsTests.cs new file mode 100644 index 0000000..6453a8d --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/CreateSmsCampaignRecipientsTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing CreateSmsCampaignRecipients + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class CreateSmsCampaignRecipientsTests + { + // TODO uncomment below to declare an instance variable for CreateSmsCampaignRecipients + //private CreateSmsCampaignRecipients instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of CreateSmsCampaignRecipients + //instance = new CreateSmsCampaignRecipients(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of CreateSmsCampaignRecipients + /// + [Test] + public void CreateSmsCampaignRecipientsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" CreateSmsCampaignRecipients + //Assert.IsInstanceOfType (instance, "variable 'instance' is a CreateSmsCampaignRecipients"); + } + + + /// + /// Test the property 'ListIds' + /// + [Test] + public void ListIdsTest() + { + // TODO unit test for the property 'ListIds' + } + /// + /// Test the property 'ExclusionListIds' + /// + [Test] + public void ExclusionListIdsTest() + { + // TODO unit test for the property 'ExclusionListIds' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/CreateSmsCampaignTests.cs b/src/sib_api_v3_sdk.Test/Model/CreateSmsCampaignTests.cs new file mode 100644 index 0000000..5779ec4 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/CreateSmsCampaignTests.cs @@ -0,0 +1,112 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing CreateSmsCampaign + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class CreateSmsCampaignTests + { + // TODO uncomment below to declare an instance variable for CreateSmsCampaign + //private CreateSmsCampaign instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of CreateSmsCampaign + //instance = new CreateSmsCampaign(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of CreateSmsCampaign + /// + [Test] + public void CreateSmsCampaignInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" CreateSmsCampaign + //Assert.IsInstanceOfType (instance, "variable 'instance' is a CreateSmsCampaign"); + } + + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Sender' + /// + [Test] + public void SenderTest() + { + // TODO unit test for the property 'Sender' + } + /// + /// Test the property 'Content' + /// + [Test] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Recipients' + /// + [Test] + public void RecipientsTest() + { + // TODO unit test for the property 'Recipients' + } + /// + /// Test the property 'ScheduledAt' + /// + [Test] + public void ScheduledAtTest() + { + // TODO unit test for the property 'ScheduledAt' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/CreateSmtpEmailTests.cs b/src/sib_api_v3_sdk.Test/Model/CreateSmtpEmailTests.cs new file mode 100644 index 0000000..4105fd9 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/CreateSmtpEmailTests.cs @@ -0,0 +1,80 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing CreateSmtpEmail + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class CreateSmtpEmailTests + { + // TODO uncomment below to declare an instance variable for CreateSmtpEmail + //private CreateSmtpEmail instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of CreateSmtpEmail + //instance = new CreateSmtpEmail(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of CreateSmtpEmail + /// + [Test] + public void CreateSmtpEmailInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" CreateSmtpEmail + //Assert.IsInstanceOfType (instance, "variable 'instance' is a CreateSmtpEmail"); + } + + + /// + /// Test the property 'MessageId' + /// + [Test] + public void MessageIdTest() + { + // TODO unit test for the property 'MessageId' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/CreateSmtpTemplateSenderTests.cs b/src/sib_api_v3_sdk.Test/Model/CreateSmtpTemplateSenderTests.cs new file mode 100644 index 0000000..36b3439 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/CreateSmtpTemplateSenderTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing CreateSmtpTemplateSender + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class CreateSmtpTemplateSenderTests + { + // TODO uncomment below to declare an instance variable for CreateSmtpTemplateSender + //private CreateSmtpTemplateSender instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of CreateSmtpTemplateSender + //instance = new CreateSmtpTemplateSender(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of CreateSmtpTemplateSender + /// + [Test] + public void CreateSmtpTemplateSenderInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" CreateSmtpTemplateSender + //Assert.IsInstanceOfType (instance, "variable 'instance' is a CreateSmtpTemplateSender"); + } + + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Email' + /// + [Test] + public void EmailTest() + { + // TODO unit test for the property 'Email' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/CreateSmtpTemplateTests.cs b/src/sib_api_v3_sdk.Test/Model/CreateSmtpTemplateTests.cs new file mode 100644 index 0000000..70db206 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/CreateSmtpTemplateTests.cs @@ -0,0 +1,152 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing CreateSmtpTemplate + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class CreateSmtpTemplateTests + { + // TODO uncomment below to declare an instance variable for CreateSmtpTemplate + //private CreateSmtpTemplate instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of CreateSmtpTemplate + //instance = new CreateSmtpTemplate(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of CreateSmtpTemplate + /// + [Test] + public void CreateSmtpTemplateInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" CreateSmtpTemplate + //Assert.IsInstanceOfType (instance, "variable 'instance' is a CreateSmtpTemplate"); + } + + + /// + /// Test the property 'Tag' + /// + [Test] + public void TagTest() + { + // TODO unit test for the property 'Tag' + } + /// + /// Test the property 'Sender' + /// + [Test] + public void SenderTest() + { + // TODO unit test for the property 'Sender' + } + /// + /// Test the property 'TemplateName' + /// + [Test] + public void TemplateNameTest() + { + // TODO unit test for the property 'TemplateName' + } + /// + /// Test the property 'HtmlContent' + /// + [Test] + public void HtmlContentTest() + { + // TODO unit test for the property 'HtmlContent' + } + /// + /// Test the property 'HtmlUrl' + /// + [Test] + public void HtmlUrlTest() + { + // TODO unit test for the property 'HtmlUrl' + } + /// + /// Test the property 'Subject' + /// + [Test] + public void SubjectTest() + { + // TODO unit test for the property 'Subject' + } + /// + /// Test the property 'ReplyTo' + /// + [Test] + public void ReplyToTest() + { + // TODO unit test for the property 'ReplyTo' + } + /// + /// Test the property 'ToField' + /// + [Test] + public void ToFieldTest() + { + // TODO unit test for the property 'ToField' + } + /// + /// Test the property 'AttachmentUrl' + /// + [Test] + public void AttachmentUrlTest() + { + // TODO unit test for the property 'AttachmentUrl' + } + /// + /// Test the property 'IsActive' + /// + [Test] + public void IsActiveTest() + { + // TODO unit test for the property 'IsActive' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/CreateUpdateContactModelTests.cs b/src/sib_api_v3_sdk.Test/Model/CreateUpdateContactModelTests.cs new file mode 100644 index 0000000..825667f --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/CreateUpdateContactModelTests.cs @@ -0,0 +1,80 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing CreateUpdateContactModel + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class CreateUpdateContactModelTests + { + // TODO uncomment below to declare an instance variable for CreateUpdateContactModel + //private CreateUpdateContactModel instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of CreateUpdateContactModel + //instance = new CreateUpdateContactModel(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of CreateUpdateContactModel + /// + [Test] + public void CreateUpdateContactModelInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" CreateUpdateContactModel + //Assert.IsInstanceOfType (instance, "variable 'instance' is a CreateUpdateContactModel"); + } + + + /// + /// Test the property 'Id' + /// + [Test] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/CreateUpdateFolderTests.cs b/src/sib_api_v3_sdk.Test/Model/CreateUpdateFolderTests.cs new file mode 100644 index 0000000..00a68e5 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/CreateUpdateFolderTests.cs @@ -0,0 +1,80 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing CreateUpdateFolder + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class CreateUpdateFolderTests + { + // TODO uncomment below to declare an instance variable for CreateUpdateFolder + //private CreateUpdateFolder instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of CreateUpdateFolder + //instance = new CreateUpdateFolder(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of CreateUpdateFolder + /// + [Test] + public void CreateUpdateFolderInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" CreateUpdateFolder + //Assert.IsInstanceOfType (instance, "variable 'instance' is a CreateUpdateFolder"); + } + + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/CreateWebhookTests.cs b/src/sib_api_v3_sdk.Test/Model/CreateWebhookTests.cs new file mode 100644 index 0000000..6dee7d9 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/CreateWebhookTests.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing CreateWebhook + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class CreateWebhookTests + { + // TODO uncomment below to declare an instance variable for CreateWebhook + //private CreateWebhook instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of CreateWebhook + //instance = new CreateWebhook(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of CreateWebhook + /// + [Test] + public void CreateWebhookInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" CreateWebhook + //Assert.IsInstanceOfType (instance, "variable 'instance' is a CreateWebhook"); + } + + + /// + /// Test the property 'Url' + /// + [Test] + public void UrlTest() + { + // TODO unit test for the property 'Url' + } + /// + /// Test the property 'Description' + /// + [Test] + public void DescriptionTest() + { + // TODO unit test for the property 'Description' + } + /// + /// Test the property 'Events' + /// + [Test] + public void EventsTest() + { + // TODO unit test for the property 'Events' + } + /// + /// Test the property 'Type' + /// + [Test] + public void TypeTest() + { + // TODO unit test for the property 'Type' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/CreatedProcessIdTests.cs b/src/sib_api_v3_sdk.Test/Model/CreatedProcessIdTests.cs new file mode 100644 index 0000000..b68bfb8 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/CreatedProcessIdTests.cs @@ -0,0 +1,80 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing CreatedProcessId + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class CreatedProcessIdTests + { + // TODO uncomment below to declare an instance variable for CreatedProcessId + //private CreatedProcessId instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of CreatedProcessId + //instance = new CreatedProcessId(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of CreatedProcessId + /// + [Test] + public void CreatedProcessIdInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" CreatedProcessId + //Assert.IsInstanceOfType (instance, "variable 'instance' is a CreatedProcessId"); + } + + + /// + /// Test the property 'ProcessId' + /// + [Test] + public void ProcessIdTest() + { + // TODO unit test for the property 'ProcessId' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/DeleteHardbouncesTests.cs b/src/sib_api_v3_sdk.Test/Model/DeleteHardbouncesTests.cs new file mode 100644 index 0000000..2c5e95a --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/DeleteHardbouncesTests.cs @@ -0,0 +1,96 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing DeleteHardbounces + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class DeleteHardbouncesTests + { + // TODO uncomment below to declare an instance variable for DeleteHardbounces + //private DeleteHardbounces instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of DeleteHardbounces + //instance = new DeleteHardbounces(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of DeleteHardbounces + /// + [Test] + public void DeleteHardbouncesInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" DeleteHardbounces + //Assert.IsInstanceOfType (instance, "variable 'instance' is a DeleteHardbounces"); + } + + + /// + /// Test the property 'StartDate' + /// + [Test] + public void StartDateTest() + { + // TODO unit test for the property 'StartDate' + } + /// + /// Test the property 'EndDate' + /// + [Test] + public void EndDateTest() + { + // TODO unit test for the property 'EndDate' + } + /// + /// Test the property 'ContactEmail' + /// + [Test] + public void ContactEmailTest() + { + // TODO unit test for the property 'ContactEmail' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/EmailExportRecipientsTests.cs b/src/sib_api_v3_sdk.Test/Model/EmailExportRecipientsTests.cs new file mode 100644 index 0000000..4e52912 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/EmailExportRecipientsTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing EmailExportRecipients + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class EmailExportRecipientsTests + { + // TODO uncomment below to declare an instance variable for EmailExportRecipients + //private EmailExportRecipients instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of EmailExportRecipients + //instance = new EmailExportRecipients(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of EmailExportRecipients + /// + [Test] + public void EmailExportRecipientsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" EmailExportRecipients + //Assert.IsInstanceOfType (instance, "variable 'instance' is a EmailExportRecipients"); + } + + + /// + /// Test the property 'NotifyURL' + /// + [Test] + public void NotifyURLTest() + { + // TODO unit test for the property 'NotifyURL' + } + /// + /// Test the property 'RecipientsType' + /// + [Test] + public void RecipientsTypeTest() + { + // TODO unit test for the property 'RecipientsType' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/ErrorModelTests.cs b/src/sib_api_v3_sdk.Test/Model/ErrorModelTests.cs new file mode 100644 index 0000000..f1482c8 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/ErrorModelTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing ErrorModel + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class ErrorModelTests + { + // TODO uncomment below to declare an instance variable for ErrorModel + //private ErrorModel instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of ErrorModel + //instance = new ErrorModel(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of ErrorModel + /// + [Test] + public void ErrorModelInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" ErrorModel + //Assert.IsInstanceOfType (instance, "variable 'instance' is a ErrorModel"); + } + + + /// + /// Test the property 'Code' + /// + [Test] + public void CodeTest() + { + // TODO unit test for the property 'Code' + } + /// + /// Test the property 'Message' + /// + [Test] + public void MessageTest() + { + // TODO unit test for the property 'Message' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetAccountMarketingAutomationTests.cs b/src/sib_api_v3_sdk.Test/Model/GetAccountMarketingAutomationTests.cs new file mode 100644 index 0000000..1a7f247 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetAccountMarketingAutomationTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetAccountMarketingAutomation + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetAccountMarketingAutomationTests + { + // TODO uncomment below to declare an instance variable for GetAccountMarketingAutomation + //private GetAccountMarketingAutomation instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetAccountMarketingAutomation + //instance = new GetAccountMarketingAutomation(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetAccountMarketingAutomation + /// + [Test] + public void GetAccountMarketingAutomationInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetAccountMarketingAutomation + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetAccountMarketingAutomation"); + } + + + /// + /// Test the property 'Key' + /// + [Test] + public void KeyTest() + { + // TODO unit test for the property 'Key' + } + /// + /// Test the property 'Enabled' + /// + [Test] + public void EnabledTest() + { + // TODO unit test for the property 'Enabled' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetAccountPlanTests.cs b/src/sib_api_v3_sdk.Test/Model/GetAccountPlanTests.cs new file mode 100644 index 0000000..af4e6a6 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetAccountPlanTests.cs @@ -0,0 +1,120 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetAccountPlan + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetAccountPlanTests + { + // TODO uncomment below to declare an instance variable for GetAccountPlan + //private GetAccountPlan instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetAccountPlan + //instance = new GetAccountPlan(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetAccountPlan + /// + [Test] + public void GetAccountPlanInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetAccountPlan + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetAccountPlan"); + } + + + /// + /// Test the property 'Type' + /// + [Test] + public void TypeTest() + { + // TODO unit test for the property 'Type' + } + /// + /// Test the property 'CreditsType' + /// + [Test] + public void CreditsTypeTest() + { + // TODO unit test for the property 'CreditsType' + } + /// + /// Test the property 'Credits' + /// + [Test] + public void CreditsTest() + { + // TODO unit test for the property 'Credits' + } + /// + /// Test the property 'StartDate' + /// + [Test] + public void StartDateTest() + { + // TODO unit test for the property 'StartDate' + } + /// + /// Test the property 'EndDate' + /// + [Test] + public void EndDateTest() + { + // TODO unit test for the property 'EndDate' + } + /// + /// Test the property 'UserLimit' + /// + [Test] + public void UserLimitTest() + { + // TODO unit test for the property 'UserLimit' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetAccountRelayDataTests.cs b/src/sib_api_v3_sdk.Test/Model/GetAccountRelayDataTests.cs new file mode 100644 index 0000000..8b6e5ef --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetAccountRelayDataTests.cs @@ -0,0 +1,96 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetAccountRelayData + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetAccountRelayDataTests + { + // TODO uncomment below to declare an instance variable for GetAccountRelayData + //private GetAccountRelayData instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetAccountRelayData + //instance = new GetAccountRelayData(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetAccountRelayData + /// + [Test] + public void GetAccountRelayDataInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetAccountRelayData + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetAccountRelayData"); + } + + + /// + /// Test the property 'UserName' + /// + [Test] + public void UserNameTest() + { + // TODO unit test for the property 'UserName' + } + /// + /// Test the property 'Relay' + /// + [Test] + public void RelayTest() + { + // TODO unit test for the property 'Relay' + } + /// + /// Test the property 'Port' + /// + [Test] + public void PortTest() + { + // TODO unit test for the property 'Port' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetAccountRelayTests.cs b/src/sib_api_v3_sdk.Test/Model/GetAccountRelayTests.cs new file mode 100644 index 0000000..ff77d94 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetAccountRelayTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetAccountRelay + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetAccountRelayTests + { + // TODO uncomment below to declare an instance variable for GetAccountRelay + //private GetAccountRelay instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetAccountRelay + //instance = new GetAccountRelay(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetAccountRelay + /// + [Test] + public void GetAccountRelayInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetAccountRelay + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetAccountRelay"); + } + + + /// + /// Test the property 'Enabled' + /// + [Test] + public void EnabledTest() + { + // TODO unit test for the property 'Enabled' + } + /// + /// Test the property 'Data' + /// + [Test] + public void DataTest() + { + // TODO unit test for the property 'Data' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetAccountTests.cs b/src/sib_api_v3_sdk.Test/Model/GetAccountTests.cs new file mode 100644 index 0000000..cbfef7b --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetAccountTests.cs @@ -0,0 +1,136 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetAccount + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetAccountTests + { + // TODO uncomment below to declare an instance variable for GetAccount + //private GetAccount instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetAccount + //instance = new GetAccount(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetAccount + /// + [Test] + public void GetAccountInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetAccount + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetAccount"); + } + + + /// + /// Test the property 'Email' + /// + [Test] + public void EmailTest() + { + // TODO unit test for the property 'Email' + } + /// + /// Test the property 'FirstName' + /// + [Test] + public void FirstNameTest() + { + // TODO unit test for the property 'FirstName' + } + /// + /// Test the property 'LastName' + /// + [Test] + public void LastNameTest() + { + // TODO unit test for the property 'LastName' + } + /// + /// Test the property 'CompanyName' + /// + [Test] + public void CompanyNameTest() + { + // TODO unit test for the property 'CompanyName' + } + /// + /// Test the property 'Address' + /// + [Test] + public void AddressTest() + { + // TODO unit test for the property 'Address' + } + /// + /// Test the property 'Plan' + /// + [Test] + public void PlanTest() + { + // TODO unit test for the property 'Plan' + } + /// + /// Test the property 'Relay' + /// + [Test] + public void RelayTest() + { + // TODO unit test for the property 'Relay' + } + /// + /// Test the property 'MarketingAutomation' + /// + [Test] + public void MarketingAutomationTest() + { + // TODO unit test for the property 'MarketingAutomation' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetAggregatedReportTests.cs b/src/sib_api_v3_sdk.Test/Model/GetAggregatedReportTests.cs new file mode 100644 index 0000000..05ca3cb --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetAggregatedReportTests.cs @@ -0,0 +1,176 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetAggregatedReport + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetAggregatedReportTests + { + // TODO uncomment below to declare an instance variable for GetAggregatedReport + //private GetAggregatedReport instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetAggregatedReport + //instance = new GetAggregatedReport(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetAggregatedReport + /// + [Test] + public void GetAggregatedReportInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetAggregatedReport + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetAggregatedReport"); + } + + + /// + /// Test the property 'Range' + /// + [Test] + public void RangeTest() + { + // TODO unit test for the property 'Range' + } + /// + /// Test the property 'Requests' + /// + [Test] + public void RequestsTest() + { + // TODO unit test for the property 'Requests' + } + /// + /// Test the property 'Delivered' + /// + [Test] + public void DeliveredTest() + { + // TODO unit test for the property 'Delivered' + } + /// + /// Test the property 'HardBounces' + /// + [Test] + public void HardBouncesTest() + { + // TODO unit test for the property 'HardBounces' + } + /// + /// Test the property 'SoftBounces' + /// + [Test] + public void SoftBouncesTest() + { + // TODO unit test for the property 'SoftBounces' + } + /// + /// Test the property 'Clicks' + /// + [Test] + public void ClicksTest() + { + // TODO unit test for the property 'Clicks' + } + /// + /// Test the property 'UniqueClicks' + /// + [Test] + public void UniqueClicksTest() + { + // TODO unit test for the property 'UniqueClicks' + } + /// + /// Test the property 'Opens' + /// + [Test] + public void OpensTest() + { + // TODO unit test for the property 'Opens' + } + /// + /// Test the property 'UniqueOpens' + /// + [Test] + public void UniqueOpensTest() + { + // TODO unit test for the property 'UniqueOpens' + } + /// + /// Test the property 'SpamReports' + /// + [Test] + public void SpamReportsTest() + { + // TODO unit test for the property 'SpamReports' + } + /// + /// Test the property 'Blocked' + /// + [Test] + public void BlockedTest() + { + // TODO unit test for the property 'Blocked' + } + /// + /// Test the property 'Invalid' + /// + [Test] + public void InvalidTest() + { + // TODO unit test for the property 'Invalid' + } + /// + /// Test the property 'Unsubscribed' + /// + [Test] + public void UnsubscribedTest() + { + // TODO unit test for the property 'Unsubscribed' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetAttributesAttributesTests.cs b/src/sib_api_v3_sdk.Test/Model/GetAttributesAttributesTests.cs new file mode 100644 index 0000000..1215d23 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetAttributesAttributesTests.cs @@ -0,0 +1,112 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetAttributesAttributes + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetAttributesAttributesTests + { + // TODO uncomment below to declare an instance variable for GetAttributesAttributes + //private GetAttributesAttributes instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetAttributesAttributes + //instance = new GetAttributesAttributes(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetAttributesAttributes + /// + [Test] + public void GetAttributesAttributesInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetAttributesAttributes + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetAttributesAttributes"); + } + + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Category' + /// + [Test] + public void CategoryTest() + { + // TODO unit test for the property 'Category' + } + /// + /// Test the property 'Type' + /// + [Test] + public void TypeTest() + { + // TODO unit test for the property 'Type' + } + /// + /// Test the property 'Enumeration' + /// + [Test] + public void EnumerationTest() + { + // TODO unit test for the property 'Enumeration' + } + /// + /// Test the property 'CalculatedValue' + /// + [Test] + public void CalculatedValueTest() + { + // TODO unit test for the property 'CalculatedValue' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetAttributesEnumerationTests.cs b/src/sib_api_v3_sdk.Test/Model/GetAttributesEnumerationTests.cs new file mode 100644 index 0000000..bf5d46d --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetAttributesEnumerationTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetAttributesEnumeration + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetAttributesEnumerationTests + { + // TODO uncomment below to declare an instance variable for GetAttributesEnumeration + //private GetAttributesEnumeration instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetAttributesEnumeration + //instance = new GetAttributesEnumeration(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetAttributesEnumeration + /// + [Test] + public void GetAttributesEnumerationInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetAttributesEnumeration + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetAttributesEnumeration"); + } + + + /// + /// Test the property 'Value' + /// + [Test] + public void ValueTest() + { + // TODO unit test for the property 'Value' + } + /// + /// Test the property 'Label' + /// + [Test] + public void LabelTest() + { + // TODO unit test for the property 'Label' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetAttributesTests.cs b/src/sib_api_v3_sdk.Test/Model/GetAttributesTests.cs new file mode 100644 index 0000000..330f258 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetAttributesTests.cs @@ -0,0 +1,80 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetAttributes + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetAttributesTests + { + // TODO uncomment below to declare an instance variable for GetAttributes + //private GetAttributes instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetAttributes + //instance = new GetAttributes(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetAttributes + /// + [Test] + public void GetAttributesInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetAttributes + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetAttributes"); + } + + + /// + /// Test the property 'Attributes' + /// + [Test] + public void AttributesTest() + { + // TODO unit test for the property 'Attributes' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetCampaignOverviewTests.cs b/src/sib_api_v3_sdk.Test/Model/GetCampaignOverviewTests.cs new file mode 100644 index 0000000..ed3dea1 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetCampaignOverviewTests.cs @@ -0,0 +1,176 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetCampaignOverview + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetCampaignOverviewTests + { + // TODO uncomment below to declare an instance variable for GetCampaignOverview + //private GetCampaignOverview instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetCampaignOverview + //instance = new GetCampaignOverview(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetCampaignOverview + /// + [Test] + public void GetCampaignOverviewInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetCampaignOverview + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetCampaignOverview"); + } + + + /// + /// Test the property 'Id' + /// + [Test] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Subject' + /// + [Test] + public void SubjectTest() + { + // TODO unit test for the property 'Subject' + } + /// + /// Test the property 'Type' + /// + [Test] + public void TypeTest() + { + // TODO unit test for the property 'Type' + } + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + /// + /// Test the property 'ScheduledAt' + /// + [Test] + public void ScheduledAtTest() + { + // TODO unit test for the property 'ScheduledAt' + } + /// + /// Test the property 'AbTesting' + /// + [Test] + public void AbTestingTest() + { + // TODO unit test for the property 'AbTesting' + } + /// + /// Test the property 'SubjectA' + /// + [Test] + public void SubjectATest() + { + // TODO unit test for the property 'SubjectA' + } + /// + /// Test the property 'SubjectB' + /// + [Test] + public void SubjectBTest() + { + // TODO unit test for the property 'SubjectB' + } + /// + /// Test the property 'SplitRule' + /// + [Test] + public void SplitRuleTest() + { + // TODO unit test for the property 'SplitRule' + } + /// + /// Test the property 'WinnerCriteria' + /// + [Test] + public void WinnerCriteriaTest() + { + // TODO unit test for the property 'WinnerCriteria' + } + /// + /// Test the property 'WinnerDelay' + /// + [Test] + public void WinnerDelayTest() + { + // TODO unit test for the property 'WinnerDelay' + } + /// + /// Test the property 'SendAtBestTime' + /// + [Test] + public void SendAtBestTimeTest() + { + // TODO unit test for the property 'SendAtBestTime' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetCampaignRecipientsTests.cs b/src/sib_api_v3_sdk.Test/Model/GetCampaignRecipientsTests.cs new file mode 100644 index 0000000..4d99c3c --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetCampaignRecipientsTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetCampaignRecipients + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetCampaignRecipientsTests + { + // TODO uncomment below to declare an instance variable for GetCampaignRecipients + //private GetCampaignRecipients instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetCampaignRecipients + //instance = new GetCampaignRecipients(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetCampaignRecipients + /// + [Test] + public void GetCampaignRecipientsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetCampaignRecipients + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetCampaignRecipients"); + } + + + /// + /// Test the property 'Lists' + /// + [Test] + public void ListsTest() + { + // TODO unit test for the property 'Lists' + } + /// + /// Test the property 'ExclusionLists' + /// + [Test] + public void ExclusionListsTest() + { + // TODO unit test for the property 'ExclusionLists' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetCampaignStatsTests.cs b/src/sib_api_v3_sdk.Test/Model/GetCampaignStatsTests.cs new file mode 100644 index 0000000..2fa0c15 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetCampaignStatsTests.cs @@ -0,0 +1,168 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetCampaignStats + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetCampaignStatsTests + { + // TODO uncomment below to declare an instance variable for GetCampaignStats + //private GetCampaignStats instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetCampaignStats + //instance = new GetCampaignStats(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetCampaignStats + /// + [Test] + public void GetCampaignStatsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetCampaignStats + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetCampaignStats"); + } + + + /// + /// Test the property 'ListId' + /// + [Test] + public void ListIdTest() + { + // TODO unit test for the property 'ListId' + } + /// + /// Test the property 'UniqueClicks' + /// + [Test] + public void UniqueClicksTest() + { + // TODO unit test for the property 'UniqueClicks' + } + /// + /// Test the property 'Clickers' + /// + [Test] + public void ClickersTest() + { + // TODO unit test for the property 'Clickers' + } + /// + /// Test the property 'Complaints' + /// + [Test] + public void ComplaintsTest() + { + // TODO unit test for the property 'Complaints' + } + /// + /// Test the property 'Delivered' + /// + [Test] + public void DeliveredTest() + { + // TODO unit test for the property 'Delivered' + } + /// + /// Test the property 'Sent' + /// + [Test] + public void SentTest() + { + // TODO unit test for the property 'Sent' + } + /// + /// Test the property 'SoftBounces' + /// + [Test] + public void SoftBouncesTest() + { + // TODO unit test for the property 'SoftBounces' + } + /// + /// Test the property 'HardBounces' + /// + [Test] + public void HardBouncesTest() + { + // TODO unit test for the property 'HardBounces' + } + /// + /// Test the property 'UniqueViews' + /// + [Test] + public void UniqueViewsTest() + { + // TODO unit test for the property 'UniqueViews' + } + /// + /// Test the property 'Unsubscriptions' + /// + [Test] + public void UnsubscriptionsTest() + { + // TODO unit test for the property 'Unsubscriptions' + } + /// + /// Test the property 'Viewed' + /// + [Test] + public void ViewedTest() + { + // TODO unit test for the property 'Viewed' + } + /// + /// Test the property 'Deferred' + /// + [Test] + public void DeferredTest() + { + // TODO unit test for the property 'Deferred' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetChildInfoApiKeysTests.cs b/src/sib_api_v3_sdk.Test/Model/GetChildInfoApiKeysTests.cs new file mode 100644 index 0000000..906a728 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetChildInfoApiKeysTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetChildInfoApiKeys + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetChildInfoApiKeysTests + { + // TODO uncomment below to declare an instance variable for GetChildInfoApiKeys + //private GetChildInfoApiKeys instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetChildInfoApiKeys + //instance = new GetChildInfoApiKeys(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetChildInfoApiKeys + /// + [Test] + public void GetChildInfoApiKeysInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetChildInfoApiKeys + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetChildInfoApiKeys"); + } + + + /// + /// Test the property 'V2' + /// + [Test] + public void V2Test() + { + // TODO unit test for the property 'V2' + } + /// + /// Test the property 'V3' + /// + [Test] + public void V3Test() + { + // TODO unit test for the property 'V3' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetChildInfoApiKeysV2Tests.cs b/src/sib_api_v3_sdk.Test/Model/GetChildInfoApiKeysV2Tests.cs new file mode 100644 index 0000000..5368739 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetChildInfoApiKeysV2Tests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetChildInfoApiKeysV2 + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetChildInfoApiKeysV2Tests + { + // TODO uncomment below to declare an instance variable for GetChildInfoApiKeysV2 + //private GetChildInfoApiKeysV2 instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetChildInfoApiKeysV2 + //instance = new GetChildInfoApiKeysV2(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetChildInfoApiKeysV2 + /// + [Test] + public void GetChildInfoApiKeysV2InstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetChildInfoApiKeysV2 + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetChildInfoApiKeysV2"); + } + + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Key' + /// + [Test] + public void KeyTest() + { + // TODO unit test for the property 'Key' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetChildInfoApiKeysV3Tests.cs b/src/sib_api_v3_sdk.Test/Model/GetChildInfoApiKeysV3Tests.cs new file mode 100644 index 0000000..5f94fc8 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetChildInfoApiKeysV3Tests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetChildInfoApiKeysV3 + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetChildInfoApiKeysV3Tests + { + // TODO uncomment below to declare an instance variable for GetChildInfoApiKeysV3 + //private GetChildInfoApiKeysV3 instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetChildInfoApiKeysV3 + //instance = new GetChildInfoApiKeysV3(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetChildInfoApiKeysV3 + /// + [Test] + public void GetChildInfoApiKeysV3InstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetChildInfoApiKeysV3 + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetChildInfoApiKeysV3"); + } + + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Key' + /// + [Test] + public void KeyTest() + { + // TODO unit test for the property 'Key' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetChildInfoCreditsTests.cs b/src/sib_api_v3_sdk.Test/Model/GetChildInfoCreditsTests.cs new file mode 100644 index 0000000..f61d6d1 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetChildInfoCreditsTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetChildInfoCredits + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetChildInfoCreditsTests + { + // TODO uncomment below to declare an instance variable for GetChildInfoCredits + //private GetChildInfoCredits instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetChildInfoCredits + //instance = new GetChildInfoCredits(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetChildInfoCredits + /// + [Test] + public void GetChildInfoCreditsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetChildInfoCredits + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetChildInfoCredits"); + } + + + /// + /// Test the property 'EmailCredits' + /// + [Test] + public void EmailCreditsTest() + { + // TODO unit test for the property 'EmailCredits' + } + /// + /// Test the property 'SmsCredits' + /// + [Test] + public void SmsCreditsTest() + { + // TODO unit test for the property 'SmsCredits' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetChildInfoStatisticsTests.cs b/src/sib_api_v3_sdk.Test/Model/GetChildInfoStatisticsTests.cs new file mode 100644 index 0000000..bea26ea --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetChildInfoStatisticsTests.cs @@ -0,0 +1,96 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetChildInfoStatistics + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetChildInfoStatisticsTests + { + // TODO uncomment below to declare an instance variable for GetChildInfoStatistics + //private GetChildInfoStatistics instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetChildInfoStatistics + //instance = new GetChildInfoStatistics(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetChildInfoStatistics + /// + [Test] + public void GetChildInfoStatisticsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetChildInfoStatistics + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetChildInfoStatistics"); + } + + + /// + /// Test the property 'PreviousMonthTotalSent' + /// + [Test] + public void PreviousMonthTotalSentTest() + { + // TODO unit test for the property 'PreviousMonthTotalSent' + } + /// + /// Test the property 'CurrentMonthTotalSent' + /// + [Test] + public void CurrentMonthTotalSentTest() + { + // TODO unit test for the property 'CurrentMonthTotalSent' + } + /// + /// Test the property 'TotalSent' + /// + [Test] + public void TotalSentTest() + { + // TODO unit test for the property 'TotalSent' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetChildInfoTests.cs b/src/sib_api_v3_sdk.Test/Model/GetChildInfoTests.cs new file mode 100644 index 0000000..f76e39d --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetChildInfoTests.cs @@ -0,0 +1,144 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetChildInfo + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetChildInfoTests + { + // TODO uncomment below to declare an instance variable for GetChildInfo + //private GetChildInfo instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetChildInfo + //instance = new GetChildInfo(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetChildInfo + /// + [Test] + public void GetChildInfoInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetChildInfo + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetChildInfo"); + } + + + /// + /// Test the property 'Email' + /// + [Test] + public void EmailTest() + { + // TODO unit test for the property 'Email' + } + /// + /// Test the property 'FirstName' + /// + [Test] + public void FirstNameTest() + { + // TODO unit test for the property 'FirstName' + } + /// + /// Test the property 'LastName' + /// + [Test] + public void LastNameTest() + { + // TODO unit test for the property 'LastName' + } + /// + /// Test the property 'CompanyName' + /// + [Test] + public void CompanyNameTest() + { + // TODO unit test for the property 'CompanyName' + } + /// + /// Test the property 'Credits' + /// + [Test] + public void CreditsTest() + { + // TODO unit test for the property 'Credits' + } + /// + /// Test the property 'Statistics' + /// + [Test] + public void StatisticsTest() + { + // TODO unit test for the property 'Statistics' + } + /// + /// Test the property 'Password' + /// + [Test] + public void PasswordTest() + { + // TODO unit test for the property 'Password' + } + /// + /// Test the property 'Ips' + /// + [Test] + public void IpsTest() + { + // TODO unit test for the property 'Ips' + } + /// + /// Test the property 'ApiKeys' + /// + [Test] + public void ApiKeysTest() + { + // TODO unit test for the property 'ApiKeys' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetChildrenListTests.cs b/src/sib_api_v3_sdk.Test/Model/GetChildrenListTests.cs new file mode 100644 index 0000000..2f603fe --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetChildrenListTests.cs @@ -0,0 +1,80 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetChildrenList + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetChildrenListTests + { + // TODO uncomment below to declare an instance variable for GetChildrenList + //private GetChildrenList instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetChildrenList + //instance = new GetChildrenList(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetChildrenList + /// + [Test] + public void GetChildrenListInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetChildrenList + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetChildrenList"); + } + + + /// + /// Test the property 'Children' + /// + [Test] + public void ChildrenTest() + { + // TODO unit test for the property 'Children' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetClientTests.cs b/src/sib_api_v3_sdk.Test/Model/GetClientTests.cs new file mode 100644 index 0000000..0a266cc --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetClientTests.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetClient + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetClientTests + { + // TODO uncomment below to declare an instance variable for GetClient + //private GetClient instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetClient + //instance = new GetClient(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetClient + /// + [Test] + public void GetClientInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetClient + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetClient"); + } + + + /// + /// Test the property 'Email' + /// + [Test] + public void EmailTest() + { + // TODO unit test for the property 'Email' + } + /// + /// Test the property 'FirstName' + /// + [Test] + public void FirstNameTest() + { + // TODO unit test for the property 'FirstName' + } + /// + /// Test the property 'LastName' + /// + [Test] + public void LastNameTest() + { + // TODO unit test for the property 'LastName' + } + /// + /// Test the property 'CompanyName' + /// + [Test] + public void CompanyNameTest() + { + // TODO unit test for the property 'CompanyName' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetContactCampaignStatsClickedTests.cs b/src/sib_api_v3_sdk.Test/Model/GetContactCampaignStatsClickedTests.cs new file mode 100644 index 0000000..ccca40f --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetContactCampaignStatsClickedTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetContactCampaignStatsClicked + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetContactCampaignStatsClickedTests + { + // TODO uncomment below to declare an instance variable for GetContactCampaignStatsClicked + //private GetContactCampaignStatsClicked instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetContactCampaignStatsClicked + //instance = new GetContactCampaignStatsClicked(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetContactCampaignStatsClicked + /// + [Test] + public void GetContactCampaignStatsClickedInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetContactCampaignStatsClicked + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetContactCampaignStatsClicked"); + } + + + /// + /// Test the property 'CampaignId' + /// + [Test] + public void CampaignIdTest() + { + // TODO unit test for the property 'CampaignId' + } + /// + /// Test the property 'Links' + /// + [Test] + public void LinksTest() + { + // TODO unit test for the property 'Links' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetContactCampaignStatsOpenedTests.cs b/src/sib_api_v3_sdk.Test/Model/GetContactCampaignStatsOpenedTests.cs new file mode 100644 index 0000000..d64ac3e --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetContactCampaignStatsOpenedTests.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetContactCampaignStatsOpened + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetContactCampaignStatsOpenedTests + { + // TODO uncomment below to declare an instance variable for GetContactCampaignStatsOpened + //private GetContactCampaignStatsOpened instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetContactCampaignStatsOpened + //instance = new GetContactCampaignStatsOpened(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetContactCampaignStatsOpened + /// + [Test] + public void GetContactCampaignStatsOpenedInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetContactCampaignStatsOpened + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetContactCampaignStatsOpened"); + } + + + /// + /// Test the property 'CampaignId' + /// + [Test] + public void CampaignIdTest() + { + // TODO unit test for the property 'CampaignId' + } + /// + /// Test the property 'Count' + /// + [Test] + public void CountTest() + { + // TODO unit test for the property 'Count' + } + /// + /// Test the property 'EventTime' + /// + [Test] + public void EventTimeTest() + { + // TODO unit test for the property 'EventTime' + } + /// + /// Test the property 'Ip' + /// + [Test] + public void IpTest() + { + // TODO unit test for the property 'Ip' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetContactCampaignStatsTests.cs b/src/sib_api_v3_sdk.Test/Model/GetContactCampaignStatsTests.cs new file mode 100644 index 0000000..b9bc34f --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetContactCampaignStatsTests.cs @@ -0,0 +1,136 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetContactCampaignStats + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetContactCampaignStatsTests + { + // TODO uncomment below to declare an instance variable for GetContactCampaignStats + //private GetContactCampaignStats instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetContactCampaignStats + //instance = new GetContactCampaignStats(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetContactCampaignStats + /// + [Test] + public void GetContactCampaignStatsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetContactCampaignStats + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetContactCampaignStats"); + } + + + /// + /// Test the property 'MessagesSent' + /// + [Test] + public void MessagesSentTest() + { + // TODO unit test for the property 'MessagesSent' + } + /// + /// Test the property 'HardBounces' + /// + [Test] + public void HardBouncesTest() + { + // TODO unit test for the property 'HardBounces' + } + /// + /// Test the property 'SoftBounces' + /// + [Test] + public void SoftBouncesTest() + { + // TODO unit test for the property 'SoftBounces' + } + /// + /// Test the property 'Complaints' + /// + [Test] + public void ComplaintsTest() + { + // TODO unit test for the property 'Complaints' + } + /// + /// Test the property 'Unsubscriptions' + /// + [Test] + public void UnsubscriptionsTest() + { + // TODO unit test for the property 'Unsubscriptions' + } + /// + /// Test the property 'Opened' + /// + [Test] + public void OpenedTest() + { + // TODO unit test for the property 'Opened' + } + /// + /// Test the property 'Clicked' + /// + [Test] + public void ClickedTest() + { + // TODO unit test for the property 'Clicked' + } + /// + /// Test the property 'TransacAttributes' + /// + [Test] + public void TransacAttributesTest() + { + // TODO unit test for the property 'TransacAttributes' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetContactCampaignStatsTransacAttributesTests.cs b/src/sib_api_v3_sdk.Test/Model/GetContactCampaignStatsTransacAttributesTests.cs new file mode 100644 index 0000000..fa31550 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetContactCampaignStatsTransacAttributesTests.cs @@ -0,0 +1,96 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetContactCampaignStatsTransacAttributes + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetContactCampaignStatsTransacAttributesTests + { + // TODO uncomment below to declare an instance variable for GetContactCampaignStatsTransacAttributes + //private GetContactCampaignStatsTransacAttributes instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetContactCampaignStatsTransacAttributes + //instance = new GetContactCampaignStatsTransacAttributes(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetContactCampaignStatsTransacAttributes + /// + [Test] + public void GetContactCampaignStatsTransacAttributesInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetContactCampaignStatsTransacAttributes + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetContactCampaignStatsTransacAttributes"); + } + + + /// + /// Test the property 'OrderDate' + /// + [Test] + public void OrderDateTest() + { + // TODO unit test for the property 'OrderDate' + } + /// + /// Test the property 'OrderPrice' + /// + [Test] + public void OrderPriceTest() + { + // TODO unit test for the property 'OrderPrice' + } + /// + /// Test the property 'OrderId' + /// + [Test] + public void OrderIdTest() + { + // TODO unit test for the property 'OrderId' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetContactCampaignStatsUnsubscriptionsTests.cs b/src/sib_api_v3_sdk.Test/Model/GetContactCampaignStatsUnsubscriptionsTests.cs new file mode 100644 index 0000000..0207d06 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetContactCampaignStatsUnsubscriptionsTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetContactCampaignStatsUnsubscriptions + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetContactCampaignStatsUnsubscriptionsTests + { + // TODO uncomment below to declare an instance variable for GetContactCampaignStatsUnsubscriptions + //private GetContactCampaignStatsUnsubscriptions instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetContactCampaignStatsUnsubscriptions + //instance = new GetContactCampaignStatsUnsubscriptions(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetContactCampaignStatsUnsubscriptions + /// + [Test] + public void GetContactCampaignStatsUnsubscriptionsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetContactCampaignStatsUnsubscriptions + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetContactCampaignStatsUnsubscriptions"); + } + + + /// + /// Test the property 'UserUnsubscription' + /// + [Test] + public void UserUnsubscriptionTest() + { + // TODO unit test for the property 'UserUnsubscription' + } + /// + /// Test the property 'AdminUnsubscription' + /// + [Test] + public void AdminUnsubscriptionTest() + { + // TODO unit test for the property 'AdminUnsubscription' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetContactDetailsTests.cs b/src/sib_api_v3_sdk.Test/Model/GetContactDetailsTests.cs new file mode 100644 index 0000000..1823037 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetContactDetailsTests.cs @@ -0,0 +1,144 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetContactDetails + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetContactDetailsTests + { + // TODO uncomment below to declare an instance variable for GetContactDetails + //private GetContactDetails instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetContactDetails + //instance = new GetContactDetails(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetContactDetails + /// + [Test] + public void GetContactDetailsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetContactDetails + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetContactDetails"); + } + + + /// + /// Test the property 'Email' + /// + [Test] + public void EmailTest() + { + // TODO unit test for the property 'Email' + } + /// + /// Test the property 'Id' + /// + [Test] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'EmailBlacklisted' + /// + [Test] + public void EmailBlacklistedTest() + { + // TODO unit test for the property 'EmailBlacklisted' + } + /// + /// Test the property 'SmsBlacklisted' + /// + [Test] + public void SmsBlacklistedTest() + { + // TODO unit test for the property 'SmsBlacklisted' + } + /// + /// Test the property 'CreatedAt' + /// + [Test] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'ModifiedAt' + /// + [Test] + public void ModifiedAtTest() + { + // TODO unit test for the property 'ModifiedAt' + } + /// + /// Test the property 'ListIds' + /// + [Test] + public void ListIdsTest() + { + // TODO unit test for the property 'ListIds' + } + /// + /// Test the property 'ListUnsubscribed' + /// + [Test] + public void ListUnsubscribedTest() + { + // TODO unit test for the property 'ListUnsubscribed' + } + /// + /// Test the property 'Attributes' + /// + [Test] + public void AttributesTest() + { + // TODO unit test for the property 'Attributes' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetContactsTests.cs b/src/sib_api_v3_sdk.Test/Model/GetContactsTests.cs new file mode 100644 index 0000000..32edd0d --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetContactsTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetContacts + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetContactsTests + { + // TODO uncomment below to declare an instance variable for GetContacts + //private GetContacts instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetContacts + //instance = new GetContacts(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetContacts + /// + [Test] + public void GetContactsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetContacts + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetContacts"); + } + + + /// + /// Test the property 'Contacts' + /// + [Test] + public void ContactsTest() + { + // TODO unit test for the property 'Contacts' + } + /// + /// Test the property 'Count' + /// + [Test] + public void CountTest() + { + // TODO unit test for the property 'Count' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetEmailCampaignTests.cs b/src/sib_api_v3_sdk.Test/Model/GetEmailCampaignTests.cs new file mode 100644 index 0000000..af9d532 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetEmailCampaignTests.cs @@ -0,0 +1,312 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetEmailCampaign + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetEmailCampaignTests + { + // TODO uncomment below to declare an instance variable for GetEmailCampaign + //private GetEmailCampaign instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetEmailCampaign + //instance = new GetEmailCampaign(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetEmailCampaign + /// + [Test] + public void GetEmailCampaignInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetEmailCampaign + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetEmailCampaign"); + } + + + /// + /// Test the property 'Id' + /// + [Test] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Subject' + /// + [Test] + public void SubjectTest() + { + // TODO unit test for the property 'Subject' + } + /// + /// Test the property 'Type' + /// + [Test] + public void TypeTest() + { + // TODO unit test for the property 'Type' + } + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + /// + /// Test the property 'ScheduledAt' + /// + [Test] + public void ScheduledAtTest() + { + // TODO unit test for the property 'ScheduledAt' + } + /// + /// Test the property 'AbTesting' + /// + [Test] + public void AbTestingTest() + { + // TODO unit test for the property 'AbTesting' + } + /// + /// Test the property 'SubjectA' + /// + [Test] + public void SubjectATest() + { + // TODO unit test for the property 'SubjectA' + } + /// + /// Test the property 'SubjectB' + /// + [Test] + public void SubjectBTest() + { + // TODO unit test for the property 'SubjectB' + } + /// + /// Test the property 'SplitRule' + /// + [Test] + public void SplitRuleTest() + { + // TODO unit test for the property 'SplitRule' + } + /// + /// Test the property 'WinnerCriteria' + /// + [Test] + public void WinnerCriteriaTest() + { + // TODO unit test for the property 'WinnerCriteria' + } + /// + /// Test the property 'WinnerDelay' + /// + [Test] + public void WinnerDelayTest() + { + // TODO unit test for the property 'WinnerDelay' + } + /// + /// Test the property 'SendAtBestTime' + /// + [Test] + public void SendAtBestTimeTest() + { + // TODO unit test for the property 'SendAtBestTime' + } + /// + /// Test the property 'TestSent' + /// + [Test] + public void TestSentTest() + { + // TODO unit test for the property 'TestSent' + } + /// + /// Test the property 'Header' + /// + [Test] + public void HeaderTest() + { + // TODO unit test for the property 'Header' + } + /// + /// Test the property 'Footer' + /// + [Test] + public void FooterTest() + { + // TODO unit test for the property 'Footer' + } + /// + /// Test the property 'Sender' + /// + [Test] + public void SenderTest() + { + // TODO unit test for the property 'Sender' + } + /// + /// Test the property 'ReplyTo' + /// + [Test] + public void ReplyToTest() + { + // TODO unit test for the property 'ReplyTo' + } + /// + /// Test the property 'ToField' + /// + [Test] + public void ToFieldTest() + { + // TODO unit test for the property 'ToField' + } + /// + /// Test the property 'HtmlContent' + /// + [Test] + public void HtmlContentTest() + { + // TODO unit test for the property 'HtmlContent' + } + /// + /// Test the property 'ShareLink' + /// + [Test] + public void ShareLinkTest() + { + // TODO unit test for the property 'ShareLink' + } + /// + /// Test the property 'Tag' + /// + [Test] + public void TagTest() + { + // TODO unit test for the property 'Tag' + } + /// + /// Test the property 'CreatedAt' + /// + [Test] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'ModifiedAt' + /// + [Test] + public void ModifiedAtTest() + { + // TODO unit test for the property 'ModifiedAt' + } + /// + /// Test the property 'InlineImageActivation' + /// + [Test] + public void InlineImageActivationTest() + { + // TODO unit test for the property 'InlineImageActivation' + } + /// + /// Test the property 'MirrorActive' + /// + [Test] + public void MirrorActiveTest() + { + // TODO unit test for the property 'MirrorActive' + } + /// + /// Test the property 'Recurring' + /// + [Test] + public void RecurringTest() + { + // TODO unit test for the property 'Recurring' + } + /// + /// Test the property 'SentDate' + /// + [Test] + public void SentDateTest() + { + // TODO unit test for the property 'SentDate' + } + /// + /// Test the property 'Recipients' + /// + [Test] + public void RecipientsTest() + { + // TODO unit test for the property 'Recipients' + } + /// + /// Test the property 'Statistics' + /// + [Test] + public void StatisticsTest() + { + // TODO unit test for the property 'Statistics' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetEmailCampaignsTests.cs b/src/sib_api_v3_sdk.Test/Model/GetEmailCampaignsTests.cs new file mode 100644 index 0000000..c9ca0b9 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetEmailCampaignsTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetEmailCampaigns + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetEmailCampaignsTests + { + // TODO uncomment below to declare an instance variable for GetEmailCampaigns + //private GetEmailCampaigns instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetEmailCampaigns + //instance = new GetEmailCampaigns(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetEmailCampaigns + /// + [Test] + public void GetEmailCampaignsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetEmailCampaigns + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetEmailCampaigns"); + } + + + /// + /// Test the property 'Campaigns' + /// + [Test] + public void CampaignsTest() + { + // TODO unit test for the property 'Campaigns' + } + /// + /// Test the property 'Count' + /// + [Test] + public void CountTest() + { + // TODO unit test for the property 'Count' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetEmailEventReportEventsTests.cs b/src/sib_api_v3_sdk.Test/Model/GetEmailEventReportEventsTests.cs new file mode 100644 index 0000000..d7e0675 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetEmailEventReportEventsTests.cs @@ -0,0 +1,152 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetEmailEventReportEvents + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetEmailEventReportEventsTests + { + // TODO uncomment below to declare an instance variable for GetEmailEventReportEvents + //private GetEmailEventReportEvents instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetEmailEventReportEvents + //instance = new GetEmailEventReportEvents(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetEmailEventReportEvents + /// + [Test] + public void GetEmailEventReportEventsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetEmailEventReportEvents + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetEmailEventReportEvents"); + } + + + /// + /// Test the property 'Email' + /// + [Test] + public void EmailTest() + { + // TODO unit test for the property 'Email' + } + /// + /// Test the property 'Date' + /// + [Test] + public void DateTest() + { + // TODO unit test for the property 'Date' + } + /// + /// Test the property 'Subject' + /// + [Test] + public void SubjectTest() + { + // TODO unit test for the property 'Subject' + } + /// + /// Test the property 'MessageId' + /// + [Test] + public void MessageIdTest() + { + // TODO unit test for the property 'MessageId' + } + /// + /// Test the property 'Event' + /// + [Test] + public void EventTest() + { + // TODO unit test for the property 'Event' + } + /// + /// Test the property 'Reason' + /// + [Test] + public void ReasonTest() + { + // TODO unit test for the property 'Reason' + } + /// + /// Test the property 'Tag' + /// + [Test] + public void TagTest() + { + // TODO unit test for the property 'Tag' + } + /// + /// Test the property 'Ip' + /// + [Test] + public void IpTest() + { + // TODO unit test for the property 'Ip' + } + /// + /// Test the property 'Link' + /// + [Test] + public void LinkTest() + { + // TODO unit test for the property 'Link' + } + /// + /// Test the property 'From' + /// + [Test] + public void FromTest() + { + // TODO unit test for the property 'From' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetEmailEventReportTests.cs b/src/sib_api_v3_sdk.Test/Model/GetEmailEventReportTests.cs new file mode 100644 index 0000000..513841d --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetEmailEventReportTests.cs @@ -0,0 +1,80 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetEmailEventReport + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetEmailEventReportTests + { + // TODO uncomment below to declare an instance variable for GetEmailEventReport + //private GetEmailEventReport instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetEmailEventReport + //instance = new GetEmailEventReport(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetEmailEventReport + /// + [Test] + public void GetEmailEventReportInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetEmailEventReport + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetEmailEventReport"); + } + + + /// + /// Test the property 'Events' + /// + [Test] + public void EventsTest() + { + // TODO unit test for the property 'Events' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetExtendedCampaignOverviewSenderTests.cs b/src/sib_api_v3_sdk.Test/Model/GetExtendedCampaignOverviewSenderTests.cs new file mode 100644 index 0000000..e33fff2 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetExtendedCampaignOverviewSenderTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetExtendedCampaignOverviewSender + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetExtendedCampaignOverviewSenderTests + { + // TODO uncomment below to declare an instance variable for GetExtendedCampaignOverviewSender + //private GetExtendedCampaignOverviewSender instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetExtendedCampaignOverviewSender + //instance = new GetExtendedCampaignOverviewSender(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetExtendedCampaignOverviewSender + /// + [Test] + public void GetExtendedCampaignOverviewSenderInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetExtendedCampaignOverviewSender + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetExtendedCampaignOverviewSender"); + } + + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Email' + /// + [Test] + public void EmailTest() + { + // TODO unit test for the property 'Email' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetExtendedCampaignOverviewTests.cs b/src/sib_api_v3_sdk.Test/Model/GetExtendedCampaignOverviewTests.cs new file mode 100644 index 0000000..1dac1da --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetExtendedCampaignOverviewTests.cs @@ -0,0 +1,296 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetExtendedCampaignOverview + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetExtendedCampaignOverviewTests + { + // TODO uncomment below to declare an instance variable for GetExtendedCampaignOverview + //private GetExtendedCampaignOverview instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetExtendedCampaignOverview + //instance = new GetExtendedCampaignOverview(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetExtendedCampaignOverview + /// + [Test] + public void GetExtendedCampaignOverviewInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetExtendedCampaignOverview + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetExtendedCampaignOverview"); + } + + + /// + /// Test the property 'Id' + /// + [Test] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Subject' + /// + [Test] + public void SubjectTest() + { + // TODO unit test for the property 'Subject' + } + /// + /// Test the property 'Type' + /// + [Test] + public void TypeTest() + { + // TODO unit test for the property 'Type' + } + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + /// + /// Test the property 'ScheduledAt' + /// + [Test] + public void ScheduledAtTest() + { + // TODO unit test for the property 'ScheduledAt' + } + /// + /// Test the property 'AbTesting' + /// + [Test] + public void AbTestingTest() + { + // TODO unit test for the property 'AbTesting' + } + /// + /// Test the property 'SubjectA' + /// + [Test] + public void SubjectATest() + { + // TODO unit test for the property 'SubjectA' + } + /// + /// Test the property 'SubjectB' + /// + [Test] + public void SubjectBTest() + { + // TODO unit test for the property 'SubjectB' + } + /// + /// Test the property 'SplitRule' + /// + [Test] + public void SplitRuleTest() + { + // TODO unit test for the property 'SplitRule' + } + /// + /// Test the property 'WinnerCriteria' + /// + [Test] + public void WinnerCriteriaTest() + { + // TODO unit test for the property 'WinnerCriteria' + } + /// + /// Test the property 'WinnerDelay' + /// + [Test] + public void WinnerDelayTest() + { + // TODO unit test for the property 'WinnerDelay' + } + /// + /// Test the property 'SendAtBestTime' + /// + [Test] + public void SendAtBestTimeTest() + { + // TODO unit test for the property 'SendAtBestTime' + } + /// + /// Test the property 'TestSent' + /// + [Test] + public void TestSentTest() + { + // TODO unit test for the property 'TestSent' + } + /// + /// Test the property 'Header' + /// + [Test] + public void HeaderTest() + { + // TODO unit test for the property 'Header' + } + /// + /// Test the property 'Footer' + /// + [Test] + public void FooterTest() + { + // TODO unit test for the property 'Footer' + } + /// + /// Test the property 'Sender' + /// + [Test] + public void SenderTest() + { + // TODO unit test for the property 'Sender' + } + /// + /// Test the property 'ReplyTo' + /// + [Test] + public void ReplyToTest() + { + // TODO unit test for the property 'ReplyTo' + } + /// + /// Test the property 'ToField' + /// + [Test] + public void ToFieldTest() + { + // TODO unit test for the property 'ToField' + } + /// + /// Test the property 'HtmlContent' + /// + [Test] + public void HtmlContentTest() + { + // TODO unit test for the property 'HtmlContent' + } + /// + /// Test the property 'ShareLink' + /// + [Test] + public void ShareLinkTest() + { + // TODO unit test for the property 'ShareLink' + } + /// + /// Test the property 'Tag' + /// + [Test] + public void TagTest() + { + // TODO unit test for the property 'Tag' + } + /// + /// Test the property 'CreatedAt' + /// + [Test] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'ModifiedAt' + /// + [Test] + public void ModifiedAtTest() + { + // TODO unit test for the property 'ModifiedAt' + } + /// + /// Test the property 'InlineImageActivation' + /// + [Test] + public void InlineImageActivationTest() + { + // TODO unit test for the property 'InlineImageActivation' + } + /// + /// Test the property 'MirrorActive' + /// + [Test] + public void MirrorActiveTest() + { + // TODO unit test for the property 'MirrorActive' + } + /// + /// Test the property 'Recurring' + /// + [Test] + public void RecurringTest() + { + // TODO unit test for the property 'Recurring' + } + /// + /// Test the property 'SentDate' + /// + [Test] + public void SentDateTest() + { + // TODO unit test for the property 'SentDate' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetExtendedCampaignStatsTests.cs b/src/sib_api_v3_sdk.Test/Model/GetExtendedCampaignStatsTests.cs new file mode 100644 index 0000000..046c605 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetExtendedCampaignStatsTests.cs @@ -0,0 +1,120 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetExtendedCampaignStats + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetExtendedCampaignStatsTests + { + // TODO uncomment below to declare an instance variable for GetExtendedCampaignStats + //private GetExtendedCampaignStats instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetExtendedCampaignStats + //instance = new GetExtendedCampaignStats(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetExtendedCampaignStats + /// + [Test] + public void GetExtendedCampaignStatsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetExtendedCampaignStats + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetExtendedCampaignStats"); + } + + + /// + /// Test the property 'GlobalStats' + /// + [Test] + public void GlobalStatsTest() + { + // TODO unit test for the property 'GlobalStats' + } + /// + /// Test the property 'CampaignStats' + /// + [Test] + public void CampaignStatsTest() + { + // TODO unit test for the property 'CampaignStats' + } + /// + /// Test the property 'MirrorClick' + /// + [Test] + public void MirrorClickTest() + { + // TODO unit test for the property 'MirrorClick' + } + /// + /// Test the property 'Remaining' + /// + [Test] + public void RemainingTest() + { + // TODO unit test for the property 'Remaining' + } + /// + /// Test the property 'LinksStats' + /// + [Test] + public void LinksStatsTest() + { + // TODO unit test for the property 'LinksStats' + } + /// + /// Test the property 'StatsByDomain' + /// + [Test] + public void StatsByDomainTest() + { + // TODO unit test for the property 'StatsByDomain' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetExtendedClientAddressTests.cs b/src/sib_api_v3_sdk.Test/Model/GetExtendedClientAddressTests.cs new file mode 100644 index 0000000..5c95caf --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetExtendedClientAddressTests.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetExtendedClientAddress + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetExtendedClientAddressTests + { + // TODO uncomment below to declare an instance variable for GetExtendedClientAddress + //private GetExtendedClientAddress instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetExtendedClientAddress + //instance = new GetExtendedClientAddress(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetExtendedClientAddress + /// + [Test] + public void GetExtendedClientAddressInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetExtendedClientAddress + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetExtendedClientAddress"); + } + + + /// + /// Test the property 'Street' + /// + [Test] + public void StreetTest() + { + // TODO unit test for the property 'Street' + } + /// + /// Test the property 'City' + /// + [Test] + public void CityTest() + { + // TODO unit test for the property 'City' + } + /// + /// Test the property 'ZipCode' + /// + [Test] + public void ZipCodeTest() + { + // TODO unit test for the property 'ZipCode' + } + /// + /// Test the property 'Country' + /// + [Test] + public void CountryTest() + { + // TODO unit test for the property 'Country' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetExtendedClientTests.cs b/src/sib_api_v3_sdk.Test/Model/GetExtendedClientTests.cs new file mode 100644 index 0000000..5616e3e --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetExtendedClientTests.cs @@ -0,0 +1,112 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetExtendedClient + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetExtendedClientTests + { + // TODO uncomment below to declare an instance variable for GetExtendedClient + //private GetExtendedClient instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetExtendedClient + //instance = new GetExtendedClient(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetExtendedClient + /// + [Test] + public void GetExtendedClientInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetExtendedClient + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetExtendedClient"); + } + + + /// + /// Test the property 'Email' + /// + [Test] + public void EmailTest() + { + // TODO unit test for the property 'Email' + } + /// + /// Test the property 'FirstName' + /// + [Test] + public void FirstNameTest() + { + // TODO unit test for the property 'FirstName' + } + /// + /// Test the property 'LastName' + /// + [Test] + public void LastNameTest() + { + // TODO unit test for the property 'LastName' + } + /// + /// Test the property 'CompanyName' + /// + [Test] + public void CompanyNameTest() + { + // TODO unit test for the property 'CompanyName' + } + /// + /// Test the property 'Address' + /// + [Test] + public void AddressTest() + { + // TODO unit test for the property 'Address' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsStatisticsClickedTests.cs b/src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsStatisticsClickedTests.cs new file mode 100644 index 0000000..8e6d3b6 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsStatisticsClickedTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetExtendedContactDetailsStatisticsClicked + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetExtendedContactDetailsStatisticsClickedTests + { + // TODO uncomment below to declare an instance variable for GetExtendedContactDetailsStatisticsClicked + //private GetExtendedContactDetailsStatisticsClicked instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetExtendedContactDetailsStatisticsClicked + //instance = new GetExtendedContactDetailsStatisticsClicked(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetExtendedContactDetailsStatisticsClicked + /// + [Test] + public void GetExtendedContactDetailsStatisticsClickedInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetExtendedContactDetailsStatisticsClicked + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetExtendedContactDetailsStatisticsClicked"); + } + + + /// + /// Test the property 'CampaignId' + /// + [Test] + public void CampaignIdTest() + { + // TODO unit test for the property 'CampaignId' + } + /// + /// Test the property 'Links' + /// + [Test] + public void LinksTest() + { + // TODO unit test for the property 'Links' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsStatisticsLinksTests.cs b/src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsStatisticsLinksTests.cs new file mode 100644 index 0000000..fb404d2 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsStatisticsLinksTests.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetExtendedContactDetailsStatisticsLinks + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetExtendedContactDetailsStatisticsLinksTests + { + // TODO uncomment below to declare an instance variable for GetExtendedContactDetailsStatisticsLinks + //private GetExtendedContactDetailsStatisticsLinks instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetExtendedContactDetailsStatisticsLinks + //instance = new GetExtendedContactDetailsStatisticsLinks(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetExtendedContactDetailsStatisticsLinks + /// + [Test] + public void GetExtendedContactDetailsStatisticsLinksInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetExtendedContactDetailsStatisticsLinks + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetExtendedContactDetailsStatisticsLinks"); + } + + + /// + /// Test the property 'Count' + /// + [Test] + public void CountTest() + { + // TODO unit test for the property 'Count' + } + /// + /// Test the property 'EventTime' + /// + [Test] + public void EventTimeTest() + { + // TODO unit test for the property 'EventTime' + } + /// + /// Test the property 'Ip' + /// + [Test] + public void IpTest() + { + // TODO unit test for the property 'Ip' + } + /// + /// Test the property 'Url' + /// + [Test] + public void UrlTest() + { + // TODO unit test for the property 'Url' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsStatisticsMessagesSentTests.cs b/src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsStatisticsMessagesSentTests.cs new file mode 100644 index 0000000..d7e41ab --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsStatisticsMessagesSentTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetExtendedContactDetailsStatisticsMessagesSent + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetExtendedContactDetailsStatisticsMessagesSentTests + { + // TODO uncomment below to declare an instance variable for GetExtendedContactDetailsStatisticsMessagesSent + //private GetExtendedContactDetailsStatisticsMessagesSent instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetExtendedContactDetailsStatisticsMessagesSent + //instance = new GetExtendedContactDetailsStatisticsMessagesSent(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetExtendedContactDetailsStatisticsMessagesSent + /// + [Test] + public void GetExtendedContactDetailsStatisticsMessagesSentInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetExtendedContactDetailsStatisticsMessagesSent + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetExtendedContactDetailsStatisticsMessagesSent"); + } + + + /// + /// Test the property 'CampaignId' + /// + [Test] + public void CampaignIdTest() + { + // TODO unit test for the property 'CampaignId' + } + /// + /// Test the property 'EventTime' + /// + [Test] + public void EventTimeTest() + { + // TODO unit test for the property 'EventTime' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsStatisticsOpenedTests.cs b/src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsStatisticsOpenedTests.cs new file mode 100644 index 0000000..3ddbe32 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsStatisticsOpenedTests.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetExtendedContactDetailsStatisticsOpened + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetExtendedContactDetailsStatisticsOpenedTests + { + // TODO uncomment below to declare an instance variable for GetExtendedContactDetailsStatisticsOpened + //private GetExtendedContactDetailsStatisticsOpened instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetExtendedContactDetailsStatisticsOpened + //instance = new GetExtendedContactDetailsStatisticsOpened(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetExtendedContactDetailsStatisticsOpened + /// + [Test] + public void GetExtendedContactDetailsStatisticsOpenedInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetExtendedContactDetailsStatisticsOpened + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetExtendedContactDetailsStatisticsOpened"); + } + + + /// + /// Test the property 'CampaignId' + /// + [Test] + public void CampaignIdTest() + { + // TODO unit test for the property 'CampaignId' + } + /// + /// Test the property 'Count' + /// + [Test] + public void CountTest() + { + // TODO unit test for the property 'Count' + } + /// + /// Test the property 'EventTime' + /// + [Test] + public void EventTimeTest() + { + // TODO unit test for the property 'EventTime' + } + /// + /// Test the property 'Ip' + /// + [Test] + public void IpTest() + { + // TODO unit test for the property 'Ip' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsStatisticsTests.cs b/src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsStatisticsTests.cs new file mode 100644 index 0000000..f261b6a --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsStatisticsTests.cs @@ -0,0 +1,136 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetExtendedContactDetailsStatistics + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetExtendedContactDetailsStatisticsTests + { + // TODO uncomment below to declare an instance variable for GetExtendedContactDetailsStatistics + //private GetExtendedContactDetailsStatistics instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetExtendedContactDetailsStatistics + //instance = new GetExtendedContactDetailsStatistics(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetExtendedContactDetailsStatistics + /// + [Test] + public void GetExtendedContactDetailsStatisticsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetExtendedContactDetailsStatistics + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetExtendedContactDetailsStatistics"); + } + + + /// + /// Test the property 'MessagesSent' + /// + [Test] + public void MessagesSentTest() + { + // TODO unit test for the property 'MessagesSent' + } + /// + /// Test the property 'HardBounces' + /// + [Test] + public void HardBouncesTest() + { + // TODO unit test for the property 'HardBounces' + } + /// + /// Test the property 'SoftBounces' + /// + [Test] + public void SoftBouncesTest() + { + // TODO unit test for the property 'SoftBounces' + } + /// + /// Test the property 'Complaints' + /// + [Test] + public void ComplaintsTest() + { + // TODO unit test for the property 'Complaints' + } + /// + /// Test the property 'Unsubscriptions' + /// + [Test] + public void UnsubscriptionsTest() + { + // TODO unit test for the property 'Unsubscriptions' + } + /// + /// Test the property 'Opened' + /// + [Test] + public void OpenedTest() + { + // TODO unit test for the property 'Opened' + } + /// + /// Test the property 'Clicked' + /// + [Test] + public void ClickedTest() + { + // TODO unit test for the property 'Clicked' + } + /// + /// Test the property 'TransacAttributes' + /// + [Test] + public void TransacAttributesTest() + { + // TODO unit test for the property 'TransacAttributes' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscriptionTests.cs b/src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscriptionTests.cs new file mode 100644 index 0000000..a94d0ba --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscriptionTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscriptionTests + { + // TODO uncomment below to declare an instance variable for GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription + //private GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription + //instance = new GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription + /// + [Test] + public void GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscriptionInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription"); + } + + + /// + /// Test the property 'EventTime' + /// + [Test] + public void EventTimeTest() + { + // TODO unit test for the property 'EventTime' + } + /// + /// Test the property 'Ip' + /// + [Test] + public void IpTest() + { + // TODO unit test for the property 'Ip' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsTests.cs b/src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsTests.cs new file mode 100644 index 0000000..c3cd8d3 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetExtendedContactDetailsStatisticsUnsubscriptions + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetExtendedContactDetailsStatisticsUnsubscriptionsTests + { + // TODO uncomment below to declare an instance variable for GetExtendedContactDetailsStatisticsUnsubscriptions + //private GetExtendedContactDetailsStatisticsUnsubscriptions instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetExtendedContactDetailsStatisticsUnsubscriptions + //instance = new GetExtendedContactDetailsStatisticsUnsubscriptions(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetExtendedContactDetailsStatisticsUnsubscriptions + /// + [Test] + public void GetExtendedContactDetailsStatisticsUnsubscriptionsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetExtendedContactDetailsStatisticsUnsubscriptions + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetExtendedContactDetailsStatisticsUnsubscriptions"); + } + + + /// + /// Test the property 'UserUnsubscription' + /// + [Test] + public void UserUnsubscriptionTest() + { + // TODO unit test for the property 'UserUnsubscription' + } + /// + /// Test the property 'AdminUnsubscription' + /// + [Test] + public void AdminUnsubscriptionTest() + { + // TODO unit test for the property 'AdminUnsubscription' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscriptionTests.cs b/src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscriptionTests.cs new file mode 100644 index 0000000..4e42c32 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscriptionTests.cs @@ -0,0 +1,96 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscriptionTests + { + // TODO uncomment below to declare an instance variable for GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription + //private GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription + //instance = new GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription + /// + [Test] + public void GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscriptionInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription"); + } + + + /// + /// Test the property 'CampaignId' + /// + [Test] + public void CampaignIdTest() + { + // TODO unit test for the property 'CampaignId' + } + /// + /// Test the property 'EventTime' + /// + [Test] + public void EventTimeTest() + { + // TODO unit test for the property 'EventTime' + } + /// + /// Test the property 'Ip' + /// + [Test] + public void IpTest() + { + // TODO unit test for the property 'Ip' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsTests.cs b/src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsTests.cs new file mode 100644 index 0000000..c9d924b --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetExtendedContactDetailsTests.cs @@ -0,0 +1,152 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetExtendedContactDetails + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetExtendedContactDetailsTests + { + // TODO uncomment below to declare an instance variable for GetExtendedContactDetails + //private GetExtendedContactDetails instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetExtendedContactDetails + //instance = new GetExtendedContactDetails(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetExtendedContactDetails + /// + [Test] + public void GetExtendedContactDetailsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetExtendedContactDetails + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetExtendedContactDetails"); + } + + + /// + /// Test the property 'Email' + /// + [Test] + public void EmailTest() + { + // TODO unit test for the property 'Email' + } + /// + /// Test the property 'Id' + /// + [Test] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'EmailBlacklisted' + /// + [Test] + public void EmailBlacklistedTest() + { + // TODO unit test for the property 'EmailBlacklisted' + } + /// + /// Test the property 'SmsBlacklisted' + /// + [Test] + public void SmsBlacklistedTest() + { + // TODO unit test for the property 'SmsBlacklisted' + } + /// + /// Test the property 'CreatedAt' + /// + [Test] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'ModifiedAt' + /// + [Test] + public void ModifiedAtTest() + { + // TODO unit test for the property 'ModifiedAt' + } + /// + /// Test the property 'ListIds' + /// + [Test] + public void ListIdsTest() + { + // TODO unit test for the property 'ListIds' + } + /// + /// Test the property 'ListUnsubscribed' + /// + [Test] + public void ListUnsubscribedTest() + { + // TODO unit test for the property 'ListUnsubscribed' + } + /// + /// Test the property 'Attributes' + /// + [Test] + public void AttributesTest() + { + // TODO unit test for the property 'Attributes' + } + /// + /// Test the property 'Statistics' + /// + [Test] + public void StatisticsTest() + { + // TODO unit test for the property 'Statistics' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetExtendedListCampaignStatsTests.cs b/src/sib_api_v3_sdk.Test/Model/GetExtendedListCampaignStatsTests.cs new file mode 100644 index 0000000..ab04a91 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetExtendedListCampaignStatsTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetExtendedListCampaignStats + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetExtendedListCampaignStatsTests + { + // TODO uncomment below to declare an instance variable for GetExtendedListCampaignStats + //private GetExtendedListCampaignStats instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetExtendedListCampaignStats + //instance = new GetExtendedListCampaignStats(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetExtendedListCampaignStats + /// + [Test] + public void GetExtendedListCampaignStatsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetExtendedListCampaignStats + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetExtendedListCampaignStats"); + } + + + /// + /// Test the property 'CampaignId' + /// + [Test] + public void CampaignIdTest() + { + // TODO unit test for the property 'CampaignId' + } + /// + /// Test the property 'Stats' + /// + [Test] + public void StatsTest() + { + // TODO unit test for the property 'Stats' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetExtendedListTests.cs b/src/sib_api_v3_sdk.Test/Model/GetExtendedListTests.cs new file mode 100644 index 0000000..408b8ab --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetExtendedListTests.cs @@ -0,0 +1,136 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetExtendedList + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetExtendedListTests + { + // TODO uncomment below to declare an instance variable for GetExtendedList + //private GetExtendedList instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetExtendedList + //instance = new GetExtendedList(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetExtendedList + /// + [Test] + public void GetExtendedListInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetExtendedList + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetExtendedList"); + } + + + /// + /// Test the property 'Id' + /// + [Test] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'TotalBlacklisted' + /// + [Test] + public void TotalBlacklistedTest() + { + // TODO unit test for the property 'TotalBlacklisted' + } + /// + /// Test the property 'TotalSubscribers' + /// + [Test] + public void TotalSubscribersTest() + { + // TODO unit test for the property 'TotalSubscribers' + } + /// + /// Test the property 'FolderId' + /// + [Test] + public void FolderIdTest() + { + // TODO unit test for the property 'FolderId' + } + /// + /// Test the property 'CreatedAt' + /// + [Test] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'CampaignStats' + /// + [Test] + public void CampaignStatsTest() + { + // TODO unit test for the property 'CampaignStats' + } + /// + /// Test the property 'DynamicList' + /// + [Test] + public void DynamicListTest() + { + // TODO unit test for the property 'DynamicList' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetFolderListsTests.cs b/src/sib_api_v3_sdk.Test/Model/GetFolderListsTests.cs new file mode 100644 index 0000000..53cd2d0 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetFolderListsTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetFolderLists + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetFolderListsTests + { + // TODO uncomment below to declare an instance variable for GetFolderLists + //private GetFolderLists instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetFolderLists + //instance = new GetFolderLists(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetFolderLists + /// + [Test] + public void GetFolderListsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetFolderLists + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetFolderLists"); + } + + + /// + /// Test the property 'Lists' + /// + [Test] + public void ListsTest() + { + // TODO unit test for the property 'Lists' + } + /// + /// Test the property 'Count' + /// + [Test] + public void CountTest() + { + // TODO unit test for the property 'Count' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetFolderTests.cs b/src/sib_api_v3_sdk.Test/Model/GetFolderTests.cs new file mode 100644 index 0000000..5013c9a --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetFolderTests.cs @@ -0,0 +1,112 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetFolder + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetFolderTests + { + // TODO uncomment below to declare an instance variable for GetFolder + //private GetFolder instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetFolder + //instance = new GetFolder(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetFolder + /// + [Test] + public void GetFolderInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetFolder + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetFolder"); + } + + + /// + /// Test the property 'Id' + /// + [Test] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'TotalBlacklisted' + /// + [Test] + public void TotalBlacklistedTest() + { + // TODO unit test for the property 'TotalBlacklisted' + } + /// + /// Test the property 'TotalSubscribers' + /// + [Test] + public void TotalSubscribersTest() + { + // TODO unit test for the property 'TotalSubscribers' + } + /// + /// Test the property 'UniqueSubscribers' + /// + [Test] + public void UniqueSubscribersTest() + { + // TODO unit test for the property 'UniqueSubscribers' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetFoldersTests.cs b/src/sib_api_v3_sdk.Test/Model/GetFoldersTests.cs new file mode 100644 index 0000000..e9dbfee --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetFoldersTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetFolders + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetFoldersTests + { + // TODO uncomment below to declare an instance variable for GetFolders + //private GetFolders instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetFolders + //instance = new GetFolders(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetFolders + /// + [Test] + public void GetFoldersInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetFolders + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetFolders"); + } + + + /// + /// Test the property 'Folders' + /// + [Test] + public void FoldersTest() + { + // TODO unit test for the property 'Folders' + } + /// + /// Test the property 'Count' + /// + [Test] + public void CountTest() + { + // TODO unit test for the property 'Count' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetIpFromSenderTests.cs b/src/sib_api_v3_sdk.Test/Model/GetIpFromSenderTests.cs new file mode 100644 index 0000000..b3e8c65 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetIpFromSenderTests.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetIpFromSender + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetIpFromSenderTests + { + // TODO uncomment below to declare an instance variable for GetIpFromSender + //private GetIpFromSender instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetIpFromSender + //instance = new GetIpFromSender(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetIpFromSender + /// + [Test] + public void GetIpFromSenderInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetIpFromSender + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetIpFromSender"); + } + + + /// + /// Test the property 'Id' + /// + [Test] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Ip' + /// + [Test] + public void IpTest() + { + // TODO unit test for the property 'Ip' + } + /// + /// Test the property 'Domain' + /// + [Test] + public void DomainTest() + { + // TODO unit test for the property 'Domain' + } + /// + /// Test the property 'Weight' + /// + [Test] + public void WeightTest() + { + // TODO unit test for the property 'Weight' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetIpTests.cs b/src/sib_api_v3_sdk.Test/Model/GetIpTests.cs new file mode 100644 index 0000000..cb9eb65 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetIpTests.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetIp + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetIpTests + { + // TODO uncomment below to declare an instance variable for GetIp + //private GetIp instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetIp + //instance = new GetIp(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetIp + /// + [Test] + public void GetIpInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetIp + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetIp"); + } + + + /// + /// Test the property 'Id' + /// + [Test] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Ip' + /// + [Test] + public void IpTest() + { + // TODO unit test for the property 'Ip' + } + /// + /// Test the property 'Active' + /// + [Test] + public void ActiveTest() + { + // TODO unit test for the property 'Active' + } + /// + /// Test the property 'Domain' + /// + [Test] + public void DomainTest() + { + // TODO unit test for the property 'Domain' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetIpsFromSenderTests.cs b/src/sib_api_v3_sdk.Test/Model/GetIpsFromSenderTests.cs new file mode 100644 index 0000000..72d65ae --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetIpsFromSenderTests.cs @@ -0,0 +1,80 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetIpsFromSender + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetIpsFromSenderTests + { + // TODO uncomment below to declare an instance variable for GetIpsFromSender + //private GetIpsFromSender instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetIpsFromSender + //instance = new GetIpsFromSender(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetIpsFromSender + /// + [Test] + public void GetIpsFromSenderInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetIpsFromSender + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetIpsFromSender"); + } + + + /// + /// Test the property 'Ips' + /// + [Test] + public void IpsTest() + { + // TODO unit test for the property 'Ips' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetIpsTests.cs b/src/sib_api_v3_sdk.Test/Model/GetIpsTests.cs new file mode 100644 index 0000000..f04d2d4 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetIpsTests.cs @@ -0,0 +1,80 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetIps + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetIpsTests + { + // TODO uncomment below to declare an instance variable for GetIps + //private GetIps instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetIps + //instance = new GetIps(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetIps + /// + [Test] + public void GetIpsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetIps + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetIps"); + } + + + /// + /// Test the property 'Ips' + /// + [Test] + public void IpsTest() + { + // TODO unit test for the property 'Ips' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetListTests.cs b/src/sib_api_v3_sdk.Test/Model/GetListTests.cs new file mode 100644 index 0000000..46bc9e1 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetListTests.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetList + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetListTests + { + // TODO uncomment below to declare an instance variable for GetList + //private GetList instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetList + //instance = new GetList(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetList + /// + [Test] + public void GetListInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetList + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetList"); + } + + + /// + /// Test the property 'Id' + /// + [Test] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'TotalBlacklisted' + /// + [Test] + public void TotalBlacklistedTest() + { + // TODO unit test for the property 'TotalBlacklisted' + } + /// + /// Test the property 'TotalSubscribers' + /// + [Test] + public void TotalSubscribersTest() + { + // TODO unit test for the property 'TotalSubscribers' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetListsTests.cs b/src/sib_api_v3_sdk.Test/Model/GetListsTests.cs new file mode 100644 index 0000000..cf2f73a --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetListsTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetLists + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetListsTests + { + // TODO uncomment below to declare an instance variable for GetLists + //private GetLists instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetLists + //instance = new GetLists(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetLists + /// + [Test] + public void GetListsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetLists + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetLists"); + } + + + /// + /// Test the property 'Lists' + /// + [Test] + public void ListsTest() + { + // TODO unit test for the property 'Lists' + } + /// + /// Test the property 'Count' + /// + [Test] + public void CountTest() + { + // TODO unit test for the property 'Count' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetProcessTests.cs b/src/sib_api_v3_sdk.Test/Model/GetProcessTests.cs new file mode 100644 index 0000000..f69961e --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetProcessTests.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetProcess + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetProcessTests + { + // TODO uncomment below to declare an instance variable for GetProcess + //private GetProcess instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetProcess + //instance = new GetProcess(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetProcess + /// + [Test] + public void GetProcessInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetProcess + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetProcess"); + } + + + /// + /// Test the property 'Id' + /// + [Test] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'ExportUrl' + /// + [Test] + public void ExportUrlTest() + { + // TODO unit test for the property 'ExportUrl' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetProcessesTests.cs b/src/sib_api_v3_sdk.Test/Model/GetProcessesTests.cs new file mode 100644 index 0000000..33ea1b8 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetProcessesTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetProcesses + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetProcessesTests + { + // TODO uncomment below to declare an instance variable for GetProcesses + //private GetProcesses instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetProcesses + //instance = new GetProcesses(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetProcesses + /// + [Test] + public void GetProcessesInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetProcesses + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetProcesses"); + } + + + /// + /// Test the property 'Processes' + /// + [Test] + public void ProcessesTest() + { + // TODO unit test for the property 'Processes' + } + /// + /// Test the property 'Count' + /// + [Test] + public void CountTest() + { + // TODO unit test for the property 'Count' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetReportsReportsTests.cs b/src/sib_api_v3_sdk.Test/Model/GetReportsReportsTests.cs new file mode 100644 index 0000000..83ad4c2 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetReportsReportsTests.cs @@ -0,0 +1,176 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetReportsReports + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetReportsReportsTests + { + // TODO uncomment below to declare an instance variable for GetReportsReports + //private GetReportsReports instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetReportsReports + //instance = new GetReportsReports(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetReportsReports + /// + [Test] + public void GetReportsReportsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetReportsReports + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetReportsReports"); + } + + + /// + /// Test the property 'Date' + /// + [Test] + public void DateTest() + { + // TODO unit test for the property 'Date' + } + /// + /// Test the property 'Requests' + /// + [Test] + public void RequestsTest() + { + // TODO unit test for the property 'Requests' + } + /// + /// Test the property 'Delivered' + /// + [Test] + public void DeliveredTest() + { + // TODO unit test for the property 'Delivered' + } + /// + /// Test the property 'HardBounces' + /// + [Test] + public void HardBouncesTest() + { + // TODO unit test for the property 'HardBounces' + } + /// + /// Test the property 'SoftBounces' + /// + [Test] + public void SoftBouncesTest() + { + // TODO unit test for the property 'SoftBounces' + } + /// + /// Test the property 'Clicks' + /// + [Test] + public void ClicksTest() + { + // TODO unit test for the property 'Clicks' + } + /// + /// Test the property 'UniqueClicks' + /// + [Test] + public void UniqueClicksTest() + { + // TODO unit test for the property 'UniqueClicks' + } + /// + /// Test the property 'Opens' + /// + [Test] + public void OpensTest() + { + // TODO unit test for the property 'Opens' + } + /// + /// Test the property 'UniqueOpens' + /// + [Test] + public void UniqueOpensTest() + { + // TODO unit test for the property 'UniqueOpens' + } + /// + /// Test the property 'SpamReports' + /// + [Test] + public void SpamReportsTest() + { + // TODO unit test for the property 'SpamReports' + } + /// + /// Test the property 'Blocked' + /// + [Test] + public void BlockedTest() + { + // TODO unit test for the property 'Blocked' + } + /// + /// Test the property 'Invalid' + /// + [Test] + public void InvalidTest() + { + // TODO unit test for the property 'Invalid' + } + /// + /// Test the property 'Unsubscribed' + /// + [Test] + public void UnsubscribedTest() + { + // TODO unit test for the property 'Unsubscribed' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetReportsTests.cs b/src/sib_api_v3_sdk.Test/Model/GetReportsTests.cs new file mode 100644 index 0000000..8b32f61 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetReportsTests.cs @@ -0,0 +1,80 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetReports + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetReportsTests + { + // TODO uncomment below to declare an instance variable for GetReports + //private GetReports instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetReports + //instance = new GetReports(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetReports + /// + [Test] + public void GetReportsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetReports + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetReports"); + } + + + /// + /// Test the property 'Reports' + /// + [Test] + public void ReportsTest() + { + // TODO unit test for the property 'Reports' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetSendersListIpsTests.cs b/src/sib_api_v3_sdk.Test/Model/GetSendersListIpsTests.cs new file mode 100644 index 0000000..6e6b832 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetSendersListIpsTests.cs @@ -0,0 +1,96 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetSendersListIps + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetSendersListIpsTests + { + // TODO uncomment below to declare an instance variable for GetSendersListIps + //private GetSendersListIps instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetSendersListIps + //instance = new GetSendersListIps(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetSendersListIps + /// + [Test] + public void GetSendersListIpsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetSendersListIps + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetSendersListIps"); + } + + + /// + /// Test the property 'Ip' + /// + [Test] + public void IpTest() + { + // TODO unit test for the property 'Ip' + } + /// + /// Test the property 'Domain' + /// + [Test] + public void DomainTest() + { + // TODO unit test for the property 'Domain' + } + /// + /// Test the property 'Weight' + /// + [Test] + public void WeightTest() + { + // TODO unit test for the property 'Weight' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetSendersListSendersTests.cs b/src/sib_api_v3_sdk.Test/Model/GetSendersListSendersTests.cs new file mode 100644 index 0000000..0360bf8 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetSendersListSendersTests.cs @@ -0,0 +1,112 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetSendersListSenders + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetSendersListSendersTests + { + // TODO uncomment below to declare an instance variable for GetSendersListSenders + //private GetSendersListSenders instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetSendersListSenders + //instance = new GetSendersListSenders(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetSendersListSenders + /// + [Test] + public void GetSendersListSendersInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetSendersListSenders + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetSendersListSenders"); + } + + + /// + /// Test the property 'Id' + /// + [Test] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Email' + /// + [Test] + public void EmailTest() + { + // TODO unit test for the property 'Email' + } + /// + /// Test the property 'Active' + /// + [Test] + public void ActiveTest() + { + // TODO unit test for the property 'Active' + } + /// + /// Test the property 'Ips' + /// + [Test] + public void IpsTest() + { + // TODO unit test for the property 'Ips' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetSendersListTests.cs b/src/sib_api_v3_sdk.Test/Model/GetSendersListTests.cs new file mode 100644 index 0000000..7c387e8 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetSendersListTests.cs @@ -0,0 +1,80 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetSendersList + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetSendersListTests + { + // TODO uncomment below to declare an instance variable for GetSendersList + //private GetSendersList instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetSendersList + //instance = new GetSendersList(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetSendersList + /// + [Test] + public void GetSendersListInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetSendersList + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetSendersList"); + } + + + /// + /// Test the property 'Senders' + /// + [Test] + public void SendersTest() + { + // TODO unit test for the property 'Senders' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetSmsCampaignOverviewTests.cs b/src/sib_api_v3_sdk.Test/Model/GetSmsCampaignOverviewTests.cs new file mode 100644 index 0000000..06d9e8a --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetSmsCampaignOverviewTests.cs @@ -0,0 +1,136 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetSmsCampaignOverview + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetSmsCampaignOverviewTests + { + // TODO uncomment below to declare an instance variable for GetSmsCampaignOverview + //private GetSmsCampaignOverview instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetSmsCampaignOverview + //instance = new GetSmsCampaignOverview(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetSmsCampaignOverview + /// + [Test] + public void GetSmsCampaignOverviewInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetSmsCampaignOverview + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetSmsCampaignOverview"); + } + + + /// + /// Test the property 'Id' + /// + [Test] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + /// + /// Test the property 'Content' + /// + [Test] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'ScheduledAt' + /// + [Test] + public void ScheduledAtTest() + { + // TODO unit test for the property 'ScheduledAt' + } + /// + /// Test the property 'Sender' + /// + [Test] + public void SenderTest() + { + // TODO unit test for the property 'Sender' + } + /// + /// Test the property 'CreatedAt' + /// + [Test] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'ModifiedAt' + /// + [Test] + public void ModifiedAtTest() + { + // TODO unit test for the property 'ModifiedAt' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetSmsCampaignStatsTests.cs b/src/sib_api_v3_sdk.Test/Model/GetSmsCampaignStatsTests.cs new file mode 100644 index 0000000..24864b2 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetSmsCampaignStatsTests.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetSmsCampaignStats + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetSmsCampaignStatsTests + { + // TODO uncomment below to declare an instance variable for GetSmsCampaignStats + //private GetSmsCampaignStats instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetSmsCampaignStats + //instance = new GetSmsCampaignStats(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetSmsCampaignStats + /// + [Test] + public void GetSmsCampaignStatsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetSmsCampaignStats + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetSmsCampaignStats"); + } + + + /// + /// Test the property 'Delivered' + /// + [Test] + public void DeliveredTest() + { + // TODO unit test for the property 'Delivered' + } + /// + /// Test the property 'Sent' + /// + [Test] + public void SentTest() + { + // TODO unit test for the property 'Sent' + } + /// + /// Test the property 'Processing' + /// + [Test] + public void ProcessingTest() + { + // TODO unit test for the property 'Processing' + } + /// + /// Test the property 'SoftBounces' + /// + [Test] + public void SoftBouncesTest() + { + // TODO unit test for the property 'SoftBounces' + } + /// + /// Test the property 'HardBounces' + /// + [Test] + public void HardBouncesTest() + { + // TODO unit test for the property 'HardBounces' + } + /// + /// Test the property 'Unsubscriptions' + /// + [Test] + public void UnsubscriptionsTest() + { + // TODO unit test for the property 'Unsubscriptions' + } + /// + /// Test the property 'Answered' + /// + [Test] + public void AnsweredTest() + { + // TODO unit test for the property 'Answered' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetSmsCampaignTests.cs b/src/sib_api_v3_sdk.Test/Model/GetSmsCampaignTests.cs new file mode 100644 index 0000000..0201bba --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetSmsCampaignTests.cs @@ -0,0 +1,152 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetSmsCampaign + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetSmsCampaignTests + { + // TODO uncomment below to declare an instance variable for GetSmsCampaign + //private GetSmsCampaign instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetSmsCampaign + //instance = new GetSmsCampaign(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetSmsCampaign + /// + [Test] + public void GetSmsCampaignInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetSmsCampaign + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetSmsCampaign"); + } + + + /// + /// Test the property 'Id' + /// + [Test] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + /// + /// Test the property 'Content' + /// + [Test] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'ScheduledAt' + /// + [Test] + public void ScheduledAtTest() + { + // TODO unit test for the property 'ScheduledAt' + } + /// + /// Test the property 'Sender' + /// + [Test] + public void SenderTest() + { + // TODO unit test for the property 'Sender' + } + /// + /// Test the property 'CreatedAt' + /// + [Test] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'ModifiedAt' + /// + [Test] + public void ModifiedAtTest() + { + // TODO unit test for the property 'ModifiedAt' + } + /// + /// Test the property 'Recipients' + /// + [Test] + public void RecipientsTest() + { + // TODO unit test for the property 'Recipients' + } + /// + /// Test the property 'Statistics' + /// + [Test] + public void StatisticsTest() + { + // TODO unit test for the property 'Statistics' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetSmsCampaignsTests.cs b/src/sib_api_v3_sdk.Test/Model/GetSmsCampaignsTests.cs new file mode 100644 index 0000000..ea0fe0f --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetSmsCampaignsTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetSmsCampaigns + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetSmsCampaignsTests + { + // TODO uncomment below to declare an instance variable for GetSmsCampaigns + //private GetSmsCampaigns instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetSmsCampaigns + //instance = new GetSmsCampaigns(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetSmsCampaigns + /// + [Test] + public void GetSmsCampaignsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetSmsCampaigns + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetSmsCampaigns"); + } + + + /// + /// Test the property 'Campaigns' + /// + [Test] + public void CampaignsTest() + { + // TODO unit test for the property 'Campaigns' + } + /// + /// Test the property 'Count' + /// + [Test] + public void CountTest() + { + // TODO unit test for the property 'Count' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetSmsEventReportEventsTests.cs b/src/sib_api_v3_sdk.Test/Model/GetSmsEventReportEventsTests.cs new file mode 100644 index 0000000..441a9f0 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetSmsEventReportEventsTests.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetSmsEventReportEvents + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetSmsEventReportEventsTests + { + // TODO uncomment below to declare an instance variable for GetSmsEventReportEvents + //private GetSmsEventReportEvents instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetSmsEventReportEvents + //instance = new GetSmsEventReportEvents(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetSmsEventReportEvents + /// + [Test] + public void GetSmsEventReportEventsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetSmsEventReportEvents + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetSmsEventReportEvents"); + } + + + /// + /// Test the property 'PhoneNumber' + /// + [Test] + public void PhoneNumberTest() + { + // TODO unit test for the property 'PhoneNumber' + } + /// + /// Test the property 'Date' + /// + [Test] + public void DateTest() + { + // TODO unit test for the property 'Date' + } + /// + /// Test the property 'MessageId' + /// + [Test] + public void MessageIdTest() + { + // TODO unit test for the property 'MessageId' + } + /// + /// Test the property 'Event' + /// + [Test] + public void EventTest() + { + // TODO unit test for the property 'Event' + } + /// + /// Test the property 'Reason' + /// + [Test] + public void ReasonTest() + { + // TODO unit test for the property 'Reason' + } + /// + /// Test the property 'Reply' + /// + [Test] + public void ReplyTest() + { + // TODO unit test for the property 'Reply' + } + /// + /// Test the property 'Tag' + /// + [Test] + public void TagTest() + { + // TODO unit test for the property 'Tag' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetSmsEventReportTests.cs b/src/sib_api_v3_sdk.Test/Model/GetSmsEventReportTests.cs new file mode 100644 index 0000000..7218b82 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetSmsEventReportTests.cs @@ -0,0 +1,80 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetSmsEventReport + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetSmsEventReportTests + { + // TODO uncomment below to declare an instance variable for GetSmsEventReport + //private GetSmsEventReport instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetSmsEventReport + //instance = new GetSmsEventReport(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetSmsEventReport + /// + [Test] + public void GetSmsEventReportInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetSmsEventReport + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetSmsEventReport"); + } + + + /// + /// Test the property 'Events' + /// + [Test] + public void EventsTest() + { + // TODO unit test for the property 'Events' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetSmtpTemplateOverviewSenderTests.cs b/src/sib_api_v3_sdk.Test/Model/GetSmtpTemplateOverviewSenderTests.cs new file mode 100644 index 0000000..6dc86a0 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetSmtpTemplateOverviewSenderTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetSmtpTemplateOverviewSender + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetSmtpTemplateOverviewSenderTests + { + // TODO uncomment below to declare an instance variable for GetSmtpTemplateOverviewSender + //private GetSmtpTemplateOverviewSender instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetSmtpTemplateOverviewSender + //instance = new GetSmtpTemplateOverviewSender(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetSmtpTemplateOverviewSender + /// + [Test] + public void GetSmtpTemplateOverviewSenderInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetSmtpTemplateOverviewSender + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetSmtpTemplateOverviewSender"); + } + + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Email' + /// + [Test] + public void EmailTest() + { + // TODO unit test for the property 'Email' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetSmtpTemplateOverviewTests.cs b/src/sib_api_v3_sdk.Test/Model/GetSmtpTemplateOverviewTests.cs new file mode 100644 index 0000000..1921681 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetSmtpTemplateOverviewTests.cs @@ -0,0 +1,168 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetSmtpTemplateOverview + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetSmtpTemplateOverviewTests + { + // TODO uncomment below to declare an instance variable for GetSmtpTemplateOverview + //private GetSmtpTemplateOverview instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetSmtpTemplateOverview + //instance = new GetSmtpTemplateOverview(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetSmtpTemplateOverview + /// + [Test] + public void GetSmtpTemplateOverviewInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetSmtpTemplateOverview + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetSmtpTemplateOverview"); + } + + + /// + /// Test the property 'Id' + /// + [Test] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Subject' + /// + [Test] + public void SubjectTest() + { + // TODO unit test for the property 'Subject' + } + /// + /// Test the property 'IsActive' + /// + [Test] + public void IsActiveTest() + { + // TODO unit test for the property 'IsActive' + } + /// + /// Test the property 'TestSent' + /// + [Test] + public void TestSentTest() + { + // TODO unit test for the property 'TestSent' + } + /// + /// Test the property 'Sender' + /// + [Test] + public void SenderTest() + { + // TODO unit test for the property 'Sender' + } + /// + /// Test the property 'ReplyTo' + /// + [Test] + public void ReplyToTest() + { + // TODO unit test for the property 'ReplyTo' + } + /// + /// Test the property 'ToField' + /// + [Test] + public void ToFieldTest() + { + // TODO unit test for the property 'ToField' + } + /// + /// Test the property 'Tag' + /// + [Test] + public void TagTest() + { + // TODO unit test for the property 'Tag' + } + /// + /// Test the property 'HtmlContent' + /// + [Test] + public void HtmlContentTest() + { + // TODO unit test for the property 'HtmlContent' + } + /// + /// Test the property 'CreatedAt' + /// + [Test] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'ModifiedAt' + /// + [Test] + public void ModifiedAtTest() + { + // TODO unit test for the property 'ModifiedAt' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetSmtpTemplatesTests.cs b/src/sib_api_v3_sdk.Test/Model/GetSmtpTemplatesTests.cs new file mode 100644 index 0000000..738e9c7 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetSmtpTemplatesTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetSmtpTemplates + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetSmtpTemplatesTests + { + // TODO uncomment below to declare an instance variable for GetSmtpTemplates + //private GetSmtpTemplates instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetSmtpTemplates + //instance = new GetSmtpTemplates(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetSmtpTemplates + /// + [Test] + public void GetSmtpTemplatesInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetSmtpTemplates + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetSmtpTemplates"); + } + + + /// + /// Test the property 'Count' + /// + [Test] + public void CountTest() + { + // TODO unit test for the property 'Count' + } + /// + /// Test the property 'Templates' + /// + [Test] + public void TemplatesTest() + { + // TODO unit test for the property 'Templates' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetStatsByDomainTests.cs b/src/sib_api_v3_sdk.Test/Model/GetStatsByDomainTests.cs new file mode 100644 index 0000000..3b53e3a --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetStatsByDomainTests.cs @@ -0,0 +1,72 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetStatsByDomain + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetStatsByDomainTests + { + // TODO uncomment below to declare an instance variable for GetStatsByDomain + //private GetStatsByDomain instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetStatsByDomain + //instance = new GetStatsByDomain(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetStatsByDomain + /// + [Test] + public void GetStatsByDomainInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetStatsByDomain + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetStatsByDomain"); + } + + + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetTransacAggregatedSmsReportTests.cs b/src/sib_api_v3_sdk.Test/Model/GetTransacAggregatedSmsReportTests.cs new file mode 100644 index 0000000..6eb4a1d --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetTransacAggregatedSmsReportTests.cs @@ -0,0 +1,152 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetTransacAggregatedSmsReport + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetTransacAggregatedSmsReportTests + { + // TODO uncomment below to declare an instance variable for GetTransacAggregatedSmsReport + //private GetTransacAggregatedSmsReport instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetTransacAggregatedSmsReport + //instance = new GetTransacAggregatedSmsReport(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetTransacAggregatedSmsReport + /// + [Test] + public void GetTransacAggregatedSmsReportInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetTransacAggregatedSmsReport + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetTransacAggregatedSmsReport"); + } + + + /// + /// Test the property 'Range' + /// + [Test] + public void RangeTest() + { + // TODO unit test for the property 'Range' + } + /// + /// Test the property 'Requests' + /// + [Test] + public void RequestsTest() + { + // TODO unit test for the property 'Requests' + } + /// + /// Test the property 'Delivered' + /// + [Test] + public void DeliveredTest() + { + // TODO unit test for the property 'Delivered' + } + /// + /// Test the property 'HardBounces' + /// + [Test] + public void HardBouncesTest() + { + // TODO unit test for the property 'HardBounces' + } + /// + /// Test the property 'SoftBounces' + /// + [Test] + public void SoftBouncesTest() + { + // TODO unit test for the property 'SoftBounces' + } + /// + /// Test the property 'Blocked' + /// + [Test] + public void BlockedTest() + { + // TODO unit test for the property 'Blocked' + } + /// + /// Test the property 'Unsubscribed' + /// + [Test] + public void UnsubscribedTest() + { + // TODO unit test for the property 'Unsubscribed' + } + /// + /// Test the property 'Replied' + /// + [Test] + public void RepliedTest() + { + // TODO unit test for the property 'Replied' + } + /// + /// Test the property 'Accepted' + /// + [Test] + public void AcceptedTest() + { + // TODO unit test for the property 'Accepted' + } + /// + /// Test the property 'Rejected' + /// + [Test] + public void RejectedTest() + { + // TODO unit test for the property 'Rejected' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetTransacSmsReportReportsTests.cs b/src/sib_api_v3_sdk.Test/Model/GetTransacSmsReportReportsTests.cs new file mode 100644 index 0000000..be0ddfa --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetTransacSmsReportReportsTests.cs @@ -0,0 +1,152 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetTransacSmsReportReports + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetTransacSmsReportReportsTests + { + // TODO uncomment below to declare an instance variable for GetTransacSmsReportReports + //private GetTransacSmsReportReports instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetTransacSmsReportReports + //instance = new GetTransacSmsReportReports(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetTransacSmsReportReports + /// + [Test] + public void GetTransacSmsReportReportsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetTransacSmsReportReports + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetTransacSmsReportReports"); + } + + + /// + /// Test the property 'Date' + /// + [Test] + public void DateTest() + { + // TODO unit test for the property 'Date' + } + /// + /// Test the property 'Requests' + /// + [Test] + public void RequestsTest() + { + // TODO unit test for the property 'Requests' + } + /// + /// Test the property 'Delivered' + /// + [Test] + public void DeliveredTest() + { + // TODO unit test for the property 'Delivered' + } + /// + /// Test the property 'HardBounces' + /// + [Test] + public void HardBouncesTest() + { + // TODO unit test for the property 'HardBounces' + } + /// + /// Test the property 'SoftBounces' + /// + [Test] + public void SoftBouncesTest() + { + // TODO unit test for the property 'SoftBounces' + } + /// + /// Test the property 'Blocked' + /// + [Test] + public void BlockedTest() + { + // TODO unit test for the property 'Blocked' + } + /// + /// Test the property 'Unsubscribed' + /// + [Test] + public void UnsubscribedTest() + { + // TODO unit test for the property 'Unsubscribed' + } + /// + /// Test the property 'Replied' + /// + [Test] + public void RepliedTest() + { + // TODO unit test for the property 'Replied' + } + /// + /// Test the property 'Accepted' + /// + [Test] + public void AcceptedTest() + { + // TODO unit test for the property 'Accepted' + } + /// + /// Test the property 'Rejected' + /// + [Test] + public void RejectedTest() + { + // TODO unit test for the property 'Rejected' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetTransacSmsReportTests.cs b/src/sib_api_v3_sdk.Test/Model/GetTransacSmsReportTests.cs new file mode 100644 index 0000000..32cf4a7 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetTransacSmsReportTests.cs @@ -0,0 +1,80 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetTransacSmsReport + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetTransacSmsReportTests + { + // TODO uncomment below to declare an instance variable for GetTransacSmsReport + //private GetTransacSmsReport instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetTransacSmsReport + //instance = new GetTransacSmsReport(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetTransacSmsReport + /// + [Test] + public void GetTransacSmsReportInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetTransacSmsReport + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetTransacSmsReport"); + } + + + /// + /// Test the property 'Reports' + /// + [Test] + public void ReportsTest() + { + // TODO unit test for the property 'Reports' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetWebhookTests.cs b/src/sib_api_v3_sdk.Test/Model/GetWebhookTests.cs new file mode 100644 index 0000000..6430c62 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetWebhookTests.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetWebhook + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetWebhookTests + { + // TODO uncomment below to declare an instance variable for GetWebhook + //private GetWebhook instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetWebhook + //instance = new GetWebhook(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetWebhook + /// + [Test] + public void GetWebhookInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetWebhook + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetWebhook"); + } + + + /// + /// Test the property 'Url' + /// + [Test] + public void UrlTest() + { + // TODO unit test for the property 'Url' + } + /// + /// Test the property 'Id' + /// + [Test] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Description' + /// + [Test] + public void DescriptionTest() + { + // TODO unit test for the property 'Description' + } + /// + /// Test the property 'Events' + /// + [Test] + public void EventsTest() + { + // TODO unit test for the property 'Events' + } + /// + /// Test the property 'Type' + /// + [Test] + public void TypeTest() + { + // TODO unit test for the property 'Type' + } + /// + /// Test the property 'CreatedAt' + /// + [Test] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'ModifiedAt' + /// + [Test] + public void ModifiedAtTest() + { + // TODO unit test for the property 'ModifiedAt' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/GetWebhooksTests.cs b/src/sib_api_v3_sdk.Test/Model/GetWebhooksTests.cs new file mode 100644 index 0000000..61217a3 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/GetWebhooksTests.cs @@ -0,0 +1,80 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing GetWebhooks + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GetWebhooksTests + { + // TODO uncomment below to declare an instance variable for GetWebhooks + //private GetWebhooks instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GetWebhooks + //instance = new GetWebhooks(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GetWebhooks + /// + [Test] + public void GetWebhooksInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GetWebhooks + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetWebhooks"); + } + + + /// + /// Test the property 'Webhooks' + /// + [Test] + public void WebhooksTest() + { + // TODO unit test for the property 'Webhooks' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/ManageIpTests.cs b/src/sib_api_v3_sdk.Test/Model/ManageIpTests.cs new file mode 100644 index 0000000..871173e --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/ManageIpTests.cs @@ -0,0 +1,80 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing ManageIp + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class ManageIpTests + { + // TODO uncomment below to declare an instance variable for ManageIp + //private ManageIp instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of ManageIp + //instance = new ManageIp(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of ManageIp + /// + [Test] + public void ManageIpInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" ManageIp + //Assert.IsInstanceOfType (instance, "variable 'instance' is a ManageIp"); + } + + + /// + /// Test the property 'Ip' + /// + [Test] + public void IpTest() + { + // TODO unit test for the property 'Ip' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/PostContactInfoContactsTests.cs b/src/sib_api_v3_sdk.Test/Model/PostContactInfoContactsTests.cs new file mode 100644 index 0000000..678b946 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/PostContactInfoContactsTests.cs @@ -0,0 +1,96 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing PostContactInfoContacts + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class PostContactInfoContactsTests + { + // TODO uncomment below to declare an instance variable for PostContactInfoContacts + //private PostContactInfoContacts instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of PostContactInfoContacts + //instance = new PostContactInfoContacts(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of PostContactInfoContacts + /// + [Test] + public void PostContactInfoContactsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" PostContactInfoContacts + //Assert.IsInstanceOfType (instance, "variable 'instance' is a PostContactInfoContacts"); + } + + + /// + /// Test the property 'Success' + /// + [Test] + public void SuccessTest() + { + // TODO unit test for the property 'Success' + } + /// + /// Test the property 'Failure' + /// + [Test] + public void FailureTest() + { + // TODO unit test for the property 'Failure' + } + /// + /// Test the property 'Total' + /// + [Test] + public void TotalTest() + { + // TODO unit test for the property 'Total' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/PostContactInfoTests.cs b/src/sib_api_v3_sdk.Test/Model/PostContactInfoTests.cs new file mode 100644 index 0000000..feb7980 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/PostContactInfoTests.cs @@ -0,0 +1,80 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing PostContactInfo + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class PostContactInfoTests + { + // TODO uncomment below to declare an instance variable for PostContactInfo + //private PostContactInfo instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of PostContactInfo + //instance = new PostContactInfo(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of PostContactInfo + /// + [Test] + public void PostContactInfoInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" PostContactInfo + //Assert.IsInstanceOfType (instance, "variable 'instance' is a PostContactInfo"); + } + + + /// + /// Test the property 'Contacts' + /// + [Test] + public void ContactsTest() + { + // TODO unit test for the property 'Contacts' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/PostSendFailedTests.cs b/src/sib_api_v3_sdk.Test/Model/PostSendFailedTests.cs new file mode 100644 index 0000000..2939b8e --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/PostSendFailedTests.cs @@ -0,0 +1,112 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing PostSendFailed + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class PostSendFailedTests + { + // TODO uncomment below to declare an instance variable for PostSendFailed + //private PostSendFailed instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of PostSendFailed + //instance = new PostSendFailed(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of PostSendFailed + /// + [Test] + public void PostSendFailedInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" PostSendFailed + //Assert.IsInstanceOfType (instance, "variable 'instance' is a PostSendFailed"); + } + + + /// + /// Test the property 'Code' + /// + [Test] + public void CodeTest() + { + // TODO unit test for the property 'Code' + } + /// + /// Test the property 'Message' + /// + [Test] + public void MessageTest() + { + // TODO unit test for the property 'Message' + } + /// + /// Test the property 'UnexistingEmails' + /// + [Test] + public void UnexistingEmailsTest() + { + // TODO unit test for the property 'UnexistingEmails' + } + /// + /// Test the property 'WithoutListEmails' + /// + [Test] + public void WithoutListEmailsTest() + { + // TODO unit test for the property 'WithoutListEmails' + } + /// + /// Test the property 'BlackListedEmails' + /// + [Test] + public void BlackListedEmailsTest() + { + // TODO unit test for the property 'BlackListedEmails' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/PostSendSmsTestFailedTests.cs b/src/sib_api_v3_sdk.Test/Model/PostSendSmsTestFailedTests.cs new file mode 100644 index 0000000..7697a7a --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/PostSendSmsTestFailedTests.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing PostSendSmsTestFailed + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class PostSendSmsTestFailedTests + { + // TODO uncomment below to declare an instance variable for PostSendSmsTestFailed + //private PostSendSmsTestFailed instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of PostSendSmsTestFailed + //instance = new PostSendSmsTestFailed(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of PostSendSmsTestFailed + /// + [Test] + public void PostSendSmsTestFailedInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" PostSendSmsTestFailed + //Assert.IsInstanceOfType (instance, "variable 'instance' is a PostSendSmsTestFailed"); + } + + + /// + /// Test the property 'Code' + /// + [Test] + public void CodeTest() + { + // TODO unit test for the property 'Code' + } + /// + /// Test the property 'Message' + /// + [Test] + public void MessageTest() + { + // TODO unit test for the property 'Message' + } + /// + /// Test the property 'UnexistingSms' + /// + [Test] + public void UnexistingSmsTest() + { + // TODO unit test for the property 'UnexistingSms' + } + /// + /// Test the property 'WithoutListSms' + /// + [Test] + public void WithoutListSmsTest() + { + // TODO unit test for the property 'WithoutListSms' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/RemainingCreditModelChildTests.cs b/src/sib_api_v3_sdk.Test/Model/RemainingCreditModelChildTests.cs new file mode 100644 index 0000000..3bb5865 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/RemainingCreditModelChildTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing RemainingCreditModelChild + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class RemainingCreditModelChildTests + { + // TODO uncomment below to declare an instance variable for RemainingCreditModelChild + //private RemainingCreditModelChild instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of RemainingCreditModelChild + //instance = new RemainingCreditModelChild(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of RemainingCreditModelChild + /// + [Test] + public void RemainingCreditModelChildInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" RemainingCreditModelChild + //Assert.IsInstanceOfType (instance, "variable 'instance' is a RemainingCreditModelChild"); + } + + + /// + /// Test the property 'Sms' + /// + [Test] + public void SmsTest() + { + // TODO unit test for the property 'Sms' + } + /// + /// Test the property 'Email' + /// + [Test] + public void EmailTest() + { + // TODO unit test for the property 'Email' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/RemainingCreditModelResellerTests.cs b/src/sib_api_v3_sdk.Test/Model/RemainingCreditModelResellerTests.cs new file mode 100644 index 0000000..0f2f9ae --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/RemainingCreditModelResellerTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing RemainingCreditModelReseller + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class RemainingCreditModelResellerTests + { + // TODO uncomment below to declare an instance variable for RemainingCreditModelReseller + //private RemainingCreditModelReseller instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of RemainingCreditModelReseller + //instance = new RemainingCreditModelReseller(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of RemainingCreditModelReseller + /// + [Test] + public void RemainingCreditModelResellerInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" RemainingCreditModelReseller + //Assert.IsInstanceOfType (instance, "variable 'instance' is a RemainingCreditModelReseller"); + } + + + /// + /// Test the property 'Sms' + /// + [Test] + public void SmsTest() + { + // TODO unit test for the property 'Sms' + } + /// + /// Test the property 'Email' + /// + [Test] + public void EmailTest() + { + // TODO unit test for the property 'Email' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/RemainingCreditModelTests.cs b/src/sib_api_v3_sdk.Test/Model/RemainingCreditModelTests.cs new file mode 100644 index 0000000..869c5de --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/RemainingCreditModelTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing RemainingCreditModel + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class RemainingCreditModelTests + { + // TODO uncomment below to declare an instance variable for RemainingCreditModel + //private RemainingCreditModel instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of RemainingCreditModel + //instance = new RemainingCreditModel(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of RemainingCreditModel + /// + [Test] + public void RemainingCreditModelInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" RemainingCreditModel + //Assert.IsInstanceOfType (instance, "variable 'instance' is a RemainingCreditModel"); + } + + + /// + /// Test the property 'Child' + /// + [Test] + public void ChildTest() + { + // TODO unit test for the property 'Child' + } + /// + /// Test the property 'Reseller' + /// + [Test] + public void ResellerTest() + { + // TODO unit test for the property 'Reseller' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/RemoveContactFromListTests.cs b/src/sib_api_v3_sdk.Test/Model/RemoveContactFromListTests.cs new file mode 100644 index 0000000..d6b789f --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/RemoveContactFromListTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing RemoveContactFromList + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class RemoveContactFromListTests + { + // TODO uncomment below to declare an instance variable for RemoveContactFromList + //private RemoveContactFromList instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of RemoveContactFromList + //instance = new RemoveContactFromList(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of RemoveContactFromList + /// + [Test] + public void RemoveContactFromListInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" RemoveContactFromList + //Assert.IsInstanceOfType (instance, "variable 'instance' is a RemoveContactFromList"); + } + + + /// + /// Test the property 'Emails' + /// + [Test] + public void EmailsTest() + { + // TODO unit test for the property 'Emails' + } + /// + /// Test the property 'All' + /// + [Test] + public void AllTest() + { + // TODO unit test for the property 'All' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/RemoveCreditsTests.cs b/src/sib_api_v3_sdk.Test/Model/RemoveCreditsTests.cs new file mode 100644 index 0000000..89855cd --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/RemoveCreditsTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing RemoveCredits + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class RemoveCreditsTests + { + // TODO uncomment below to declare an instance variable for RemoveCredits + //private RemoveCredits instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of RemoveCredits + //instance = new RemoveCredits(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of RemoveCredits + /// + [Test] + public void RemoveCreditsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" RemoveCredits + //Assert.IsInstanceOfType (instance, "variable 'instance' is a RemoveCredits"); + } + + + /// + /// Test the property 'Sms' + /// + [Test] + public void SmsTest() + { + // TODO unit test for the property 'Sms' + } + /// + /// Test the property 'Email' + /// + [Test] + public void EmailTest() + { + // TODO unit test for the property 'Email' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/RequestContactExportTests.cs b/src/sib_api_v3_sdk.Test/Model/RequestContactExportTests.cs new file mode 100644 index 0000000..ad89e78 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/RequestContactExportTests.cs @@ -0,0 +1,96 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing RequestContactExport + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class RequestContactExportTests + { + // TODO uncomment below to declare an instance variable for RequestContactExport + //private RequestContactExport instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of RequestContactExport + //instance = new RequestContactExport(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of RequestContactExport + /// + [Test] + public void RequestContactExportInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" RequestContactExport + //Assert.IsInstanceOfType (instance, "variable 'instance' is a RequestContactExport"); + } + + + /// + /// Test the property 'ExportAttributes' + /// + [Test] + public void ExportAttributesTest() + { + // TODO unit test for the property 'ExportAttributes' + } + /// + /// Test the property 'ContactFilter' + /// + [Test] + public void ContactFilterTest() + { + // TODO unit test for the property 'ContactFilter' + } + /// + /// Test the property 'NotifyUrl' + /// + [Test] + public void NotifyUrlTest() + { + // TODO unit test for the property 'NotifyUrl' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/RequestContactImportNewListTests.cs b/src/sib_api_v3_sdk.Test/Model/RequestContactImportNewListTests.cs new file mode 100644 index 0000000..1aeeea4 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/RequestContactImportNewListTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing RequestContactImportNewList + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class RequestContactImportNewListTests + { + // TODO uncomment below to declare an instance variable for RequestContactImportNewList + //private RequestContactImportNewList instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of RequestContactImportNewList + //instance = new RequestContactImportNewList(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of RequestContactImportNewList + /// + [Test] + public void RequestContactImportNewListInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" RequestContactImportNewList + //Assert.IsInstanceOfType (instance, "variable 'instance' is a RequestContactImportNewList"); + } + + + /// + /// Test the property 'ListName' + /// + [Test] + public void ListNameTest() + { + // TODO unit test for the property 'ListName' + } + /// + /// Test the property 'FolderId' + /// + [Test] + public void FolderIdTest() + { + // TODO unit test for the property 'FolderId' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/RequestContactImportTests.cs b/src/sib_api_v3_sdk.Test/Model/RequestContactImportTests.cs new file mode 100644 index 0000000..9499599 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/RequestContactImportTests.cs @@ -0,0 +1,144 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing RequestContactImport + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class RequestContactImportTests + { + // TODO uncomment below to declare an instance variable for RequestContactImport + //private RequestContactImport instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of RequestContactImport + //instance = new RequestContactImport(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of RequestContactImport + /// + [Test] + public void RequestContactImportInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" RequestContactImport + //Assert.IsInstanceOfType (instance, "variable 'instance' is a RequestContactImport"); + } + + + /// + /// Test the property 'FileUrl' + /// + [Test] + public void FileUrlTest() + { + // TODO unit test for the property 'FileUrl' + } + /// + /// Test the property 'FileBody' + /// + [Test] + public void FileBodyTest() + { + // TODO unit test for the property 'FileBody' + } + /// + /// Test the property 'ListIds' + /// + [Test] + public void ListIdsTest() + { + // TODO unit test for the property 'ListIds' + } + /// + /// Test the property 'NotifyUrl' + /// + [Test] + public void NotifyUrlTest() + { + // TODO unit test for the property 'NotifyUrl' + } + /// + /// Test the property 'NewList' + /// + [Test] + public void NewListTest() + { + // TODO unit test for the property 'NewList' + } + /// + /// Test the property 'EmailBlacklist' + /// + [Test] + public void EmailBlacklistTest() + { + // TODO unit test for the property 'EmailBlacklist' + } + /// + /// Test the property 'SmsBlacklist' + /// + [Test] + public void SmsBlacklistTest() + { + // TODO unit test for the property 'SmsBlacklist' + } + /// + /// Test the property 'UpdateExistingContacts' + /// + [Test] + public void UpdateExistingContactsTest() + { + // TODO unit test for the property 'UpdateExistingContacts' + } + /// + /// Test the property 'EmptyContactsAttributes' + /// + [Test] + public void EmptyContactsAttributesTest() + { + // TODO unit test for the property 'EmptyContactsAttributes' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/RequestSmsRecipientExportTests.cs b/src/sib_api_v3_sdk.Test/Model/RequestSmsRecipientExportTests.cs new file mode 100644 index 0000000..ee3983a --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/RequestSmsRecipientExportTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing RequestSmsRecipientExport + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class RequestSmsRecipientExportTests + { + // TODO uncomment below to declare an instance variable for RequestSmsRecipientExport + //private RequestSmsRecipientExport instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of RequestSmsRecipientExport + //instance = new RequestSmsRecipientExport(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of RequestSmsRecipientExport + /// + [Test] + public void RequestSmsRecipientExportInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" RequestSmsRecipientExport + //Assert.IsInstanceOfType (instance, "variable 'instance' is a RequestSmsRecipientExport"); + } + + + /// + /// Test the property 'NotifyURL' + /// + [Test] + public void NotifyURLTest() + { + // TODO unit test for the property 'NotifyURL' + } + /// + /// Test the property 'RecipientsType' + /// + [Test] + public void RecipientsTypeTest() + { + // TODO unit test for the property 'RecipientsType' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/SendEmailAttachmentTests.cs b/src/sib_api_v3_sdk.Test/Model/SendEmailAttachmentTests.cs new file mode 100644 index 0000000..3bd0aa5 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/SendEmailAttachmentTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing SendEmailAttachment + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class SendEmailAttachmentTests + { + // TODO uncomment below to declare an instance variable for SendEmailAttachment + //private SendEmailAttachment instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of SendEmailAttachment + //instance = new SendEmailAttachment(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of SendEmailAttachment + /// + [Test] + public void SendEmailAttachmentInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" SendEmailAttachment + //Assert.IsInstanceOfType (instance, "variable 'instance' is a SendEmailAttachment"); + } + + + /// + /// Test the property 'Content' + /// + [Test] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/SendEmailTests.cs b/src/sib_api_v3_sdk.Test/Model/SendEmailTests.cs new file mode 100644 index 0000000..87a347f --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/SendEmailTests.cs @@ -0,0 +1,144 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing SendEmail + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class SendEmailTests + { + // TODO uncomment below to declare an instance variable for SendEmail + //private SendEmail instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of SendEmail + //instance = new SendEmail(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of SendEmail + /// + [Test] + public void SendEmailInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" SendEmail + //Assert.IsInstanceOfType (instance, "variable 'instance' is a SendEmail"); + } + + + /// + /// Test the property 'EmailTo' + /// + [Test] + public void EmailToTest() + { + // TODO unit test for the property 'EmailTo' + } + /// + /// Test the property 'EmailBcc' + /// + [Test] + public void EmailBccTest() + { + // TODO unit test for the property 'EmailBcc' + } + /// + /// Test the property 'EmailCc' + /// + [Test] + public void EmailCcTest() + { + // TODO unit test for the property 'EmailCc' + } + /// + /// Test the property 'ReplyTo' + /// + [Test] + public void ReplyToTest() + { + // TODO unit test for the property 'ReplyTo' + } + /// + /// Test the property 'AttachmentUrl' + /// + [Test] + public void AttachmentUrlTest() + { + // TODO unit test for the property 'AttachmentUrl' + } + /// + /// Test the property 'Attachment' + /// + [Test] + public void AttachmentTest() + { + // TODO unit test for the property 'Attachment' + } + /// + /// Test the property 'Headers' + /// + [Test] + public void HeadersTest() + { + // TODO unit test for the property 'Headers' + } + /// + /// Test the property 'Attributes' + /// + [Test] + public void AttributesTest() + { + // TODO unit test for the property 'Attributes' + } + /// + /// Test the property 'Tags' + /// + [Test] + public void TagsTest() + { + // TODO unit test for the property 'Tags' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/SendReportEmailTests.cs b/src/sib_api_v3_sdk.Test/Model/SendReportEmailTests.cs new file mode 100644 index 0000000..bf7652c --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/SendReportEmailTests.cs @@ -0,0 +1,120 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing SendReportEmail + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class SendReportEmailTests + { + // TODO uncomment below to declare an instance variable for SendReportEmail + //private SendReportEmail instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of SendReportEmail + //instance = new SendReportEmail(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of SendReportEmail + /// + [Test] + public void SendReportEmailInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" SendReportEmail + //Assert.IsInstanceOfType (instance, "variable 'instance' is a SendReportEmail"); + } + + + /// + /// Test the property 'Subject' + /// + [Test] + public void SubjectTest() + { + // TODO unit test for the property 'Subject' + } + /// + /// Test the property 'To' + /// + [Test] + public void ToTest() + { + // TODO unit test for the property 'To' + } + /// + /// Test the property 'ContentType' + /// + [Test] + public void ContentTypeTest() + { + // TODO unit test for the property 'ContentType' + } + /// + /// Test the property 'Bcc' + /// + [Test] + public void BccTest() + { + // TODO unit test for the property 'Bcc' + } + /// + /// Test the property 'Cc' + /// + [Test] + public void CcTest() + { + // TODO unit test for the property 'Cc' + } + /// + /// Test the property 'Body' + /// + [Test] + public void BodyTest() + { + // TODO unit test for the property 'Body' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/SendReportTests.cs b/src/sib_api_v3_sdk.Test/Model/SendReportTests.cs new file mode 100644 index 0000000..020de39 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/SendReportTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing SendReport + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class SendReportTests + { + // TODO uncomment below to declare an instance variable for SendReport + //private SendReport instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of SendReport + //instance = new SendReport(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of SendReport + /// + [Test] + public void SendReportInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" SendReport + //Assert.IsInstanceOfType (instance, "variable 'instance' is a SendReport"); + } + + + /// + /// Test the property 'Language' + /// + [Test] + public void LanguageTest() + { + // TODO unit test for the property 'Language' + } + /// + /// Test the property 'Email' + /// + [Test] + public void EmailTest() + { + // TODO unit test for the property 'Email' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/SendSmsTests.cs b/src/sib_api_v3_sdk.Test/Model/SendSmsTests.cs new file mode 100644 index 0000000..d9ecd68 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/SendSmsTests.cs @@ -0,0 +1,112 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing SendSms + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class SendSmsTests + { + // TODO uncomment below to declare an instance variable for SendSms + //private SendSms instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of SendSms + //instance = new SendSms(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of SendSms + /// + [Test] + public void SendSmsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" SendSms + //Assert.IsInstanceOfType (instance, "variable 'instance' is a SendSms"); + } + + + /// + /// Test the property 'Reference' + /// + [Test] + public void ReferenceTest() + { + // TODO unit test for the property 'Reference' + } + /// + /// Test the property 'MessageId' + /// + [Test] + public void MessageIdTest() + { + // TODO unit test for the property 'MessageId' + } + /// + /// Test the property 'SmsCount' + /// + [Test] + public void SmsCountTest() + { + // TODO unit test for the property 'SmsCount' + } + /// + /// Test the property 'UsedCredits' + /// + [Test] + public void UsedCreditsTest() + { + // TODO unit test for the property 'UsedCredits' + } + /// + /// Test the property 'RemainingCredits' + /// + [Test] + public void RemainingCreditsTest() + { + // TODO unit test for the property 'RemainingCredits' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/SendSmtpEmailAttachmentTests.cs b/src/sib_api_v3_sdk.Test/Model/SendSmtpEmailAttachmentTests.cs new file mode 100644 index 0000000..c741794 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/SendSmtpEmailAttachmentTests.cs @@ -0,0 +1,96 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing SendSmtpEmailAttachment + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class SendSmtpEmailAttachmentTests + { + // TODO uncomment below to declare an instance variable for SendSmtpEmailAttachment + //private SendSmtpEmailAttachment instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of SendSmtpEmailAttachment + //instance = new SendSmtpEmailAttachment(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of SendSmtpEmailAttachment + /// + [Test] + public void SendSmtpEmailAttachmentInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" SendSmtpEmailAttachment + //Assert.IsInstanceOfType (instance, "variable 'instance' is a SendSmtpEmailAttachment"); + } + + + /// + /// Test the property 'Url' + /// + [Test] + public void UrlTest() + { + // TODO unit test for the property 'Url' + } + /// + /// Test the property 'Content' + /// + [Test] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/SendSmtpEmailBccTests.cs b/src/sib_api_v3_sdk.Test/Model/SendSmtpEmailBccTests.cs new file mode 100644 index 0000000..b21954e --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/SendSmtpEmailBccTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing SendSmtpEmailBcc + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class SendSmtpEmailBccTests + { + // TODO uncomment below to declare an instance variable for SendSmtpEmailBcc + //private SendSmtpEmailBcc instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of SendSmtpEmailBcc + //instance = new SendSmtpEmailBcc(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of SendSmtpEmailBcc + /// + [Test] + public void SendSmtpEmailBccInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" SendSmtpEmailBcc + //Assert.IsInstanceOfType (instance, "variable 'instance' is a SendSmtpEmailBcc"); + } + + + /// + /// Test the property 'Email' + /// + [Test] + public void EmailTest() + { + // TODO unit test for the property 'Email' + } + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/SendSmtpEmailCcTests.cs b/src/sib_api_v3_sdk.Test/Model/SendSmtpEmailCcTests.cs new file mode 100644 index 0000000..6c22cc8 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/SendSmtpEmailCcTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing SendSmtpEmailCc + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class SendSmtpEmailCcTests + { + // TODO uncomment below to declare an instance variable for SendSmtpEmailCc + //private SendSmtpEmailCc instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of SendSmtpEmailCc + //instance = new SendSmtpEmailCc(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of SendSmtpEmailCc + /// + [Test] + public void SendSmtpEmailCcInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" SendSmtpEmailCc + //Assert.IsInstanceOfType (instance, "variable 'instance' is a SendSmtpEmailCc"); + } + + + /// + /// Test the property 'Email' + /// + [Test] + public void EmailTest() + { + // TODO unit test for the property 'Email' + } + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/SendSmtpEmailReplyToTests.cs b/src/sib_api_v3_sdk.Test/Model/SendSmtpEmailReplyToTests.cs new file mode 100644 index 0000000..1f48b22 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/SendSmtpEmailReplyToTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing SendSmtpEmailReplyTo + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class SendSmtpEmailReplyToTests + { + // TODO uncomment below to declare an instance variable for SendSmtpEmailReplyTo + //private SendSmtpEmailReplyTo instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of SendSmtpEmailReplyTo + //instance = new SendSmtpEmailReplyTo(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of SendSmtpEmailReplyTo + /// + [Test] + public void SendSmtpEmailReplyToInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" SendSmtpEmailReplyTo + //Assert.IsInstanceOfType (instance, "variable 'instance' is a SendSmtpEmailReplyTo"); + } + + + /// + /// Test the property 'Email' + /// + [Test] + public void EmailTest() + { + // TODO unit test for the property 'Email' + } + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/SendSmtpEmailSenderTests.cs b/src/sib_api_v3_sdk.Test/Model/SendSmtpEmailSenderTests.cs new file mode 100644 index 0000000..b157166 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/SendSmtpEmailSenderTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing SendSmtpEmailSender + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class SendSmtpEmailSenderTests + { + // TODO uncomment below to declare an instance variable for SendSmtpEmailSender + //private SendSmtpEmailSender instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of SendSmtpEmailSender + //instance = new SendSmtpEmailSender(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of SendSmtpEmailSender + /// + [Test] + public void SendSmtpEmailSenderInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" SendSmtpEmailSender + //Assert.IsInstanceOfType (instance, "variable 'instance' is a SendSmtpEmailSender"); + } + + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Email' + /// + [Test] + public void EmailTest() + { + // TODO unit test for the property 'Email' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/SendSmtpEmailTests.cs b/src/sib_api_v3_sdk.Test/Model/SendSmtpEmailTests.cs new file mode 100644 index 0000000..62e77f1 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/SendSmtpEmailTests.cs @@ -0,0 +1,176 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing SendSmtpEmail + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class SendSmtpEmailTests + { + // TODO uncomment below to declare an instance variable for SendSmtpEmail + //private SendSmtpEmail instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of SendSmtpEmail + //instance = new SendSmtpEmail(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of SendSmtpEmail + /// + [Test] + public void SendSmtpEmailInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" SendSmtpEmail + //Assert.IsInstanceOfType (instance, "variable 'instance' is a SendSmtpEmail"); + } + + + /// + /// Test the property 'Sender' + /// + [Test] + public void SenderTest() + { + // TODO unit test for the property 'Sender' + } + /// + /// Test the property 'To' + /// + [Test] + public void ToTest() + { + // TODO unit test for the property 'To' + } + /// + /// Test the property 'Bcc' + /// + [Test] + public void BccTest() + { + // TODO unit test for the property 'Bcc' + } + /// + /// Test the property 'Cc' + /// + [Test] + public void CcTest() + { + // TODO unit test for the property 'Cc' + } + /// + /// Test the property 'HtmlContent' + /// + [Test] + public void HtmlContentTest() + { + // TODO unit test for the property 'HtmlContent' + } + /// + /// Test the property 'TextContent' + /// + [Test] + public void TextContentTest() + { + // TODO unit test for the property 'TextContent' + } + /// + /// Test the property 'Subject' + /// + [Test] + public void SubjectTest() + { + // TODO unit test for the property 'Subject' + } + /// + /// Test the property 'ReplyTo' + /// + [Test] + public void ReplyToTest() + { + // TODO unit test for the property 'ReplyTo' + } + /// + /// Test the property 'Attachment' + /// + [Test] + public void AttachmentTest() + { + // TODO unit test for the property 'Attachment' + } + /// + /// Test the property 'Headers' + /// + [Test] + public void HeadersTest() + { + // TODO unit test for the property 'Headers' + } + /// + /// Test the property 'TemplateId' + /// + [Test] + public void TemplateIdTest() + { + // TODO unit test for the property 'TemplateId' + } + /// + /// Test the property 'Params' + /// + [Test] + public void ParamsTest() + { + // TODO unit test for the property 'Params' + } + /// + /// Test the property 'Tags' + /// + [Test] + public void TagsTest() + { + // TODO unit test for the property 'Tags' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/SendSmtpEmailToTests.cs b/src/sib_api_v3_sdk.Test/Model/SendSmtpEmailToTests.cs new file mode 100644 index 0000000..b55c8cc --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/SendSmtpEmailToTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing SendSmtpEmailTo + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class SendSmtpEmailToTests + { + // TODO uncomment below to declare an instance variable for SendSmtpEmailTo + //private SendSmtpEmailTo instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of SendSmtpEmailTo + //instance = new SendSmtpEmailTo(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of SendSmtpEmailTo + /// + [Test] + public void SendSmtpEmailToInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" SendSmtpEmailTo + //Assert.IsInstanceOfType (instance, "variable 'instance' is a SendSmtpEmailTo"); + } + + + /// + /// Test the property 'Email' + /// + [Test] + public void EmailTest() + { + // TODO unit test for the property 'Email' + } + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/SendTemplateEmailTests.cs b/src/sib_api_v3_sdk.Test/Model/SendTemplateEmailTests.cs new file mode 100644 index 0000000..5612054 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/SendTemplateEmailTests.cs @@ -0,0 +1,80 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing SendTemplateEmail + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class SendTemplateEmailTests + { + // TODO uncomment below to declare an instance variable for SendTemplateEmail + //private SendTemplateEmail instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of SendTemplateEmail + //instance = new SendTemplateEmail(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of SendTemplateEmail + /// + [Test] + public void SendTemplateEmailInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" SendTemplateEmail + //Assert.IsInstanceOfType (instance, "variable 'instance' is a SendTemplateEmail"); + } + + + /// + /// Test the property 'MessageId' + /// + [Test] + public void MessageIdTest() + { + // TODO unit test for the property 'MessageId' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/SendTestEmailTests.cs b/src/sib_api_v3_sdk.Test/Model/SendTestEmailTests.cs new file mode 100644 index 0000000..8431ce0 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/SendTestEmailTests.cs @@ -0,0 +1,80 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing SendTestEmail + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class SendTestEmailTests + { + // TODO uncomment below to declare an instance variable for SendTestEmail + //private SendTestEmail instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of SendTestEmail + //instance = new SendTestEmail(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of SendTestEmail + /// + [Test] + public void SendTestEmailInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" SendTestEmail + //Assert.IsInstanceOfType (instance, "variable 'instance' is a SendTestEmail"); + } + + + /// + /// Test the property 'EmailTo' + /// + [Test] + public void EmailToTest() + { + // TODO unit test for the property 'EmailTo' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/SendTestSmsTests.cs b/src/sib_api_v3_sdk.Test/Model/SendTestSmsTests.cs new file mode 100644 index 0000000..5114767 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/SendTestSmsTests.cs @@ -0,0 +1,80 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing SendTestSms + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class SendTestSmsTests + { + // TODO uncomment below to declare an instance variable for SendTestSms + //private SendTestSms instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of SendTestSms + //instance = new SendTestSms(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of SendTestSms + /// + [Test] + public void SendTestSmsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" SendTestSms + //Assert.IsInstanceOfType (instance, "variable 'instance' is a SendTestSms"); + } + + + /// + /// Test the property 'PhoneNumber' + /// + [Test] + public void PhoneNumberTest() + { + // TODO unit test for the property 'PhoneNumber' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/SendTransacSmsTests.cs b/src/sib_api_v3_sdk.Test/Model/SendTransacSmsTests.cs new file mode 100644 index 0000000..83b867b --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/SendTransacSmsTests.cs @@ -0,0 +1,120 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing SendTransacSms + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class SendTransacSmsTests + { + // TODO uncomment below to declare an instance variable for SendTransacSms + //private SendTransacSms instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of SendTransacSms + //instance = new SendTransacSms(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of SendTransacSms + /// + [Test] + public void SendTransacSmsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" SendTransacSms + //Assert.IsInstanceOfType (instance, "variable 'instance' is a SendTransacSms"); + } + + + /// + /// Test the property 'Sender' + /// + [Test] + public void SenderTest() + { + // TODO unit test for the property 'Sender' + } + /// + /// Test the property 'Recipient' + /// + [Test] + public void RecipientTest() + { + // TODO unit test for the property 'Recipient' + } + /// + /// Test the property 'Content' + /// + [Test] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Type' + /// + [Test] + public void TypeTest() + { + // TODO unit test for the property 'Type' + } + /// + /// Test the property 'Tag' + /// + [Test] + public void TagTest() + { + // TODO unit test for the property 'Tag' + } + /// + /// Test the property 'WebUrl' + /// + [Test] + public void WebUrlTest() + { + // TODO unit test for the property 'WebUrl' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/UpdateAttributeEnumerationTests.cs b/src/sib_api_v3_sdk.Test/Model/UpdateAttributeEnumerationTests.cs new file mode 100644 index 0000000..b49cb36 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/UpdateAttributeEnumerationTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing UpdateAttributeEnumeration + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class UpdateAttributeEnumerationTests + { + // TODO uncomment below to declare an instance variable for UpdateAttributeEnumeration + //private UpdateAttributeEnumeration instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of UpdateAttributeEnumeration + //instance = new UpdateAttributeEnumeration(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of UpdateAttributeEnumeration + /// + [Test] + public void UpdateAttributeEnumerationInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" UpdateAttributeEnumeration + //Assert.IsInstanceOfType (instance, "variable 'instance' is a UpdateAttributeEnumeration"); + } + + + /// + /// Test the property 'Value' + /// + [Test] + public void ValueTest() + { + // TODO unit test for the property 'Value' + } + /// + /// Test the property 'Label' + /// + [Test] + public void LabelTest() + { + // TODO unit test for the property 'Label' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/UpdateAttributeTests.cs b/src/sib_api_v3_sdk.Test/Model/UpdateAttributeTests.cs new file mode 100644 index 0000000..3ad899e --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/UpdateAttributeTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing UpdateAttribute + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class UpdateAttributeTests + { + // TODO uncomment below to declare an instance variable for UpdateAttribute + //private UpdateAttribute instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of UpdateAttribute + //instance = new UpdateAttribute(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of UpdateAttribute + /// + [Test] + public void UpdateAttributeInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" UpdateAttribute + //Assert.IsInstanceOfType (instance, "variable 'instance' is a UpdateAttribute"); + } + + + /// + /// Test the property 'Value' + /// + [Test] + public void ValueTest() + { + // TODO unit test for the property 'Value' + } + /// + /// Test the property 'Enumeration' + /// + [Test] + public void EnumerationTest() + { + // TODO unit test for the property 'Enumeration' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/UpdateCampaignStatusTests.cs b/src/sib_api_v3_sdk.Test/Model/UpdateCampaignStatusTests.cs new file mode 100644 index 0000000..75717ef --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/UpdateCampaignStatusTests.cs @@ -0,0 +1,80 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing UpdateCampaignStatus + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class UpdateCampaignStatusTests + { + // TODO uncomment below to declare an instance variable for UpdateCampaignStatus + //private UpdateCampaignStatus instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of UpdateCampaignStatus + //instance = new UpdateCampaignStatus(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of UpdateCampaignStatus + /// + [Test] + public void UpdateCampaignStatusInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" UpdateCampaignStatus + //Assert.IsInstanceOfType (instance, "variable 'instance' is a UpdateCampaignStatus"); + } + + + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/UpdateChildTests.cs b/src/sib_api_v3_sdk.Test/Model/UpdateChildTests.cs new file mode 100644 index 0000000..2ec1537 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/UpdateChildTests.cs @@ -0,0 +1,112 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing UpdateChild + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class UpdateChildTests + { + // TODO uncomment below to declare an instance variable for UpdateChild + //private UpdateChild instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of UpdateChild + //instance = new UpdateChild(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of UpdateChild + /// + [Test] + public void UpdateChildInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" UpdateChild + //Assert.IsInstanceOfType (instance, "variable 'instance' is a UpdateChild"); + } + + + /// + /// Test the property 'Email' + /// + [Test] + public void EmailTest() + { + // TODO unit test for the property 'Email' + } + /// + /// Test the property 'FirstName' + /// + [Test] + public void FirstNameTest() + { + // TODO unit test for the property 'FirstName' + } + /// + /// Test the property 'LastName' + /// + [Test] + public void LastNameTest() + { + // TODO unit test for the property 'LastName' + } + /// + /// Test the property 'CompanyName' + /// + [Test] + public void CompanyNameTest() + { + // TODO unit test for the property 'CompanyName' + } + /// + /// Test the property 'Password' + /// + [Test] + public void PasswordTest() + { + // TODO unit test for the property 'Password' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/UpdateContactTests.cs b/src/sib_api_v3_sdk.Test/Model/UpdateContactTests.cs new file mode 100644 index 0000000..4b6a232 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/UpdateContactTests.cs @@ -0,0 +1,120 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing UpdateContact + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class UpdateContactTests + { + // TODO uncomment below to declare an instance variable for UpdateContact + //private UpdateContact instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of UpdateContact + //instance = new UpdateContact(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of UpdateContact + /// + [Test] + public void UpdateContactInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" UpdateContact + //Assert.IsInstanceOfType (instance, "variable 'instance' is a UpdateContact"); + } + + + /// + /// Test the property 'Attributes' + /// + [Test] + public void AttributesTest() + { + // TODO unit test for the property 'Attributes' + } + /// + /// Test the property 'EmailBlacklisted' + /// + [Test] + public void EmailBlacklistedTest() + { + // TODO unit test for the property 'EmailBlacklisted' + } + /// + /// Test the property 'SmsBlacklisted' + /// + [Test] + public void SmsBlacklistedTest() + { + // TODO unit test for the property 'SmsBlacklisted' + } + /// + /// Test the property 'ListIds' + /// + [Test] + public void ListIdsTest() + { + // TODO unit test for the property 'ListIds' + } + /// + /// Test the property 'UnlinkListIds' + /// + [Test] + public void UnlinkListIdsTest() + { + // TODO unit test for the property 'UnlinkListIds' + } + /// + /// Test the property 'SmtpBlacklistSender' + /// + [Test] + public void SmtpBlacklistSenderTest() + { + // TODO unit test for the property 'SmtpBlacklistSender' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/UpdateEmailCampaignRecipientsTests.cs b/src/sib_api_v3_sdk.Test/Model/UpdateEmailCampaignRecipientsTests.cs new file mode 100644 index 0000000..b4453a1 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/UpdateEmailCampaignRecipientsTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing UpdateEmailCampaignRecipients + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class UpdateEmailCampaignRecipientsTests + { + // TODO uncomment below to declare an instance variable for UpdateEmailCampaignRecipients + //private UpdateEmailCampaignRecipients instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of UpdateEmailCampaignRecipients + //instance = new UpdateEmailCampaignRecipients(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of UpdateEmailCampaignRecipients + /// + [Test] + public void UpdateEmailCampaignRecipientsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" UpdateEmailCampaignRecipients + //Assert.IsInstanceOfType (instance, "variable 'instance' is a UpdateEmailCampaignRecipients"); + } + + + /// + /// Test the property 'ExclusionListIds' + /// + [Test] + public void ExclusionListIdsTest() + { + // TODO unit test for the property 'ExclusionListIds' + } + /// + /// Test the property 'ListIds' + /// + [Test] + public void ListIdsTest() + { + // TODO unit test for the property 'ListIds' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/UpdateEmailCampaignSenderTests.cs b/src/sib_api_v3_sdk.Test/Model/UpdateEmailCampaignSenderTests.cs new file mode 100644 index 0000000..28fead8 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/UpdateEmailCampaignSenderTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing UpdateEmailCampaignSender + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class UpdateEmailCampaignSenderTests + { + // TODO uncomment below to declare an instance variable for UpdateEmailCampaignSender + //private UpdateEmailCampaignSender instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of UpdateEmailCampaignSender + //instance = new UpdateEmailCampaignSender(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of UpdateEmailCampaignSender + /// + [Test] + public void UpdateEmailCampaignSenderInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" UpdateEmailCampaignSender + //Assert.IsInstanceOfType (instance, "variable 'instance' is a UpdateEmailCampaignSender"); + } + + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Email' + /// + [Test] + public void EmailTest() + { + // TODO unit test for the property 'Email' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/UpdateEmailCampaignTests.cs b/src/sib_api_v3_sdk.Test/Model/UpdateEmailCampaignTests.cs new file mode 100644 index 0000000..46f5686 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/UpdateEmailCampaignTests.cs @@ -0,0 +1,272 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing UpdateEmailCampaign + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class UpdateEmailCampaignTests + { + // TODO uncomment below to declare an instance variable for UpdateEmailCampaign + //private UpdateEmailCampaign instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of UpdateEmailCampaign + //instance = new UpdateEmailCampaign(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of UpdateEmailCampaign + /// + [Test] + public void UpdateEmailCampaignInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" UpdateEmailCampaign + //Assert.IsInstanceOfType (instance, "variable 'instance' is a UpdateEmailCampaign"); + } + + + /// + /// Test the property 'Tag' + /// + [Test] + public void TagTest() + { + // TODO unit test for the property 'Tag' + } + /// + /// Test the property 'Sender' + /// + [Test] + public void SenderTest() + { + // TODO unit test for the property 'Sender' + } + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'HtmlContent' + /// + [Test] + public void HtmlContentTest() + { + // TODO unit test for the property 'HtmlContent' + } + /// + /// Test the property 'HtmlUrl' + /// + [Test] + public void HtmlUrlTest() + { + // TODO unit test for the property 'HtmlUrl' + } + /// + /// Test the property 'ScheduledAt' + /// + [Test] + public void ScheduledAtTest() + { + // TODO unit test for the property 'ScheduledAt' + } + /// + /// Test the property 'Subject' + /// + [Test] + public void SubjectTest() + { + // TODO unit test for the property 'Subject' + } + /// + /// Test the property 'ReplyTo' + /// + [Test] + public void ReplyToTest() + { + // TODO unit test for the property 'ReplyTo' + } + /// + /// Test the property 'ToField' + /// + [Test] + public void ToFieldTest() + { + // TODO unit test for the property 'ToField' + } + /// + /// Test the property 'Recipients' + /// + [Test] + public void RecipientsTest() + { + // TODO unit test for the property 'Recipients' + } + /// + /// Test the property 'AttachmentUrl' + /// + [Test] + public void AttachmentUrlTest() + { + // TODO unit test for the property 'AttachmentUrl' + } + /// + /// Test the property 'InlineImageActivation' + /// + [Test] + public void InlineImageActivationTest() + { + // TODO unit test for the property 'InlineImageActivation' + } + /// + /// Test the property 'MirrorActive' + /// + [Test] + public void MirrorActiveTest() + { + // TODO unit test for the property 'MirrorActive' + } + /// + /// Test the property 'Recurring' + /// + [Test] + public void RecurringTest() + { + // TODO unit test for the property 'Recurring' + } + /// + /// Test the property 'Footer' + /// + [Test] + public void FooterTest() + { + // TODO unit test for the property 'Footer' + } + /// + /// Test the property 'Header' + /// + [Test] + public void HeaderTest() + { + // TODO unit test for the property 'Header' + } + /// + /// Test the property 'UtmCampaign' + /// + [Test] + public void UtmCampaignTest() + { + // TODO unit test for the property 'UtmCampaign' + } + /// + /// Test the property 'Params' + /// + [Test] + public void ParamsTest() + { + // TODO unit test for the property 'Params' + } + /// + /// Test the property 'SendAtBestTime' + /// + [Test] + public void SendAtBestTimeTest() + { + // TODO unit test for the property 'SendAtBestTime' + } + /// + /// Test the property 'AbTesting' + /// + [Test] + public void AbTestingTest() + { + // TODO unit test for the property 'AbTesting' + } + /// + /// Test the property 'SubjectA' + /// + [Test] + public void SubjectATest() + { + // TODO unit test for the property 'SubjectA' + } + /// + /// Test the property 'SubjectB' + /// + [Test] + public void SubjectBTest() + { + // TODO unit test for the property 'SubjectB' + } + /// + /// Test the property 'SplitRule' + /// + [Test] + public void SplitRuleTest() + { + // TODO unit test for the property 'SplitRule' + } + /// + /// Test the property 'WinnerCriteria' + /// + [Test] + public void WinnerCriteriaTest() + { + // TODO unit test for the property 'WinnerCriteria' + } + /// + /// Test the property 'WinnerDelay' + /// + [Test] + public void WinnerDelayTest() + { + // TODO unit test for the property 'WinnerDelay' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/UpdateListTests.cs b/src/sib_api_v3_sdk.Test/Model/UpdateListTests.cs new file mode 100644 index 0000000..8077ff6 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/UpdateListTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing UpdateList + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class UpdateListTests + { + // TODO uncomment below to declare an instance variable for UpdateList + //private UpdateList instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of UpdateList + //instance = new UpdateList(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of UpdateList + /// + [Test] + public void UpdateListInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" UpdateList + //Assert.IsInstanceOfType (instance, "variable 'instance' is a UpdateList"); + } + + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'FolderId' + /// + [Test] + public void FolderIdTest() + { + // TODO unit test for the property 'FolderId' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/UpdateSenderTests.cs b/src/sib_api_v3_sdk.Test/Model/UpdateSenderTests.cs new file mode 100644 index 0000000..3304118 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/UpdateSenderTests.cs @@ -0,0 +1,96 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing UpdateSender + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class UpdateSenderTests + { + // TODO uncomment below to declare an instance variable for UpdateSender + //private UpdateSender instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of UpdateSender + //instance = new UpdateSender(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of UpdateSender + /// + [Test] + public void UpdateSenderInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" UpdateSender + //Assert.IsInstanceOfType (instance, "variable 'instance' is a UpdateSender"); + } + + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Email' + /// + [Test] + public void EmailTest() + { + // TODO unit test for the property 'Email' + } + /// + /// Test the property 'Ips' + /// + [Test] + public void IpsTest() + { + // TODO unit test for the property 'Ips' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/UpdateSmsCampaignTests.cs b/src/sib_api_v3_sdk.Test/Model/UpdateSmsCampaignTests.cs new file mode 100644 index 0000000..86e0349 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/UpdateSmsCampaignTests.cs @@ -0,0 +1,112 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing UpdateSmsCampaign + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class UpdateSmsCampaignTests + { + // TODO uncomment below to declare an instance variable for UpdateSmsCampaign + //private UpdateSmsCampaign instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of UpdateSmsCampaign + //instance = new UpdateSmsCampaign(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of UpdateSmsCampaign + /// + [Test] + public void UpdateSmsCampaignInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" UpdateSmsCampaign + //Assert.IsInstanceOfType (instance, "variable 'instance' is a UpdateSmsCampaign"); + } + + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Sender' + /// + [Test] + public void SenderTest() + { + // TODO unit test for the property 'Sender' + } + /// + /// Test the property 'Content' + /// + [Test] + public void ContentTest() + { + // TODO unit test for the property 'Content' + } + /// + /// Test the property 'Recipients' + /// + [Test] + public void RecipientsTest() + { + // TODO unit test for the property 'Recipients' + } + /// + /// Test the property 'ScheduledAt' + /// + [Test] + public void ScheduledAtTest() + { + // TODO unit test for the property 'ScheduledAt' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/UpdateSmtpTemplateSenderTests.cs b/src/sib_api_v3_sdk.Test/Model/UpdateSmtpTemplateSenderTests.cs new file mode 100644 index 0000000..6cca71d --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/UpdateSmtpTemplateSenderTests.cs @@ -0,0 +1,88 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing UpdateSmtpTemplateSender + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class UpdateSmtpTemplateSenderTests + { + // TODO uncomment below to declare an instance variable for UpdateSmtpTemplateSender + //private UpdateSmtpTemplateSender instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of UpdateSmtpTemplateSender + //instance = new UpdateSmtpTemplateSender(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of UpdateSmtpTemplateSender + /// + [Test] + public void UpdateSmtpTemplateSenderInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" UpdateSmtpTemplateSender + //Assert.IsInstanceOfType (instance, "variable 'instance' is a UpdateSmtpTemplateSender"); + } + + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Email' + /// + [Test] + public void EmailTest() + { + // TODO unit test for the property 'Email' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/UpdateSmtpTemplateTests.cs b/src/sib_api_v3_sdk.Test/Model/UpdateSmtpTemplateTests.cs new file mode 100644 index 0000000..7f29491 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/UpdateSmtpTemplateTests.cs @@ -0,0 +1,152 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing UpdateSmtpTemplate + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class UpdateSmtpTemplateTests + { + // TODO uncomment below to declare an instance variable for UpdateSmtpTemplate + //private UpdateSmtpTemplate instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of UpdateSmtpTemplate + //instance = new UpdateSmtpTemplate(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of UpdateSmtpTemplate + /// + [Test] + public void UpdateSmtpTemplateInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" UpdateSmtpTemplate + //Assert.IsInstanceOfType (instance, "variable 'instance' is a UpdateSmtpTemplate"); + } + + + /// + /// Test the property 'Tag' + /// + [Test] + public void TagTest() + { + // TODO unit test for the property 'Tag' + } + /// + /// Test the property 'Sender' + /// + [Test] + public void SenderTest() + { + // TODO unit test for the property 'Sender' + } + /// + /// Test the property 'TemplateName' + /// + [Test] + public void TemplateNameTest() + { + // TODO unit test for the property 'TemplateName' + } + /// + /// Test the property 'HtmlContent' + /// + [Test] + public void HtmlContentTest() + { + // TODO unit test for the property 'HtmlContent' + } + /// + /// Test the property 'HtmlUrl' + /// + [Test] + public void HtmlUrlTest() + { + // TODO unit test for the property 'HtmlUrl' + } + /// + /// Test the property 'Subject' + /// + [Test] + public void SubjectTest() + { + // TODO unit test for the property 'Subject' + } + /// + /// Test the property 'ReplyTo' + /// + [Test] + public void ReplyToTest() + { + // TODO unit test for the property 'ReplyTo' + } + /// + /// Test the property 'ToField' + /// + [Test] + public void ToFieldTest() + { + // TODO unit test for the property 'ToField' + } + /// + /// Test the property 'AttachmentUrl' + /// + [Test] + public void AttachmentUrlTest() + { + // TODO unit test for the property 'AttachmentUrl' + } + /// + /// Test the property 'IsActive' + /// + [Test] + public void IsActiveTest() + { + // TODO unit test for the property 'IsActive' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/Model/UpdateWebhookTests.cs b/src/sib_api_v3_sdk.Test/Model/UpdateWebhookTests.cs new file mode 100644 index 0000000..3098f20 --- /dev/null +++ b/src/sib_api_v3_sdk.Test/Model/UpdateWebhookTests.cs @@ -0,0 +1,96 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using sib_api_v3_sdk.Api; +using sib_api_v3_sdk.Model; +using sib_api_v3_sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace sib_api_v3_sdk.Test +{ + /// + /// Class for testing UpdateWebhook + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class UpdateWebhookTests + { + // TODO uncomment below to declare an instance variable for UpdateWebhook + //private UpdateWebhook instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of UpdateWebhook + //instance = new UpdateWebhook(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of UpdateWebhook + /// + [Test] + public void UpdateWebhookInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" UpdateWebhook + //Assert.IsInstanceOfType (instance, "variable 'instance' is a UpdateWebhook"); + } + + + /// + /// Test the property 'Url' + /// + [Test] + public void UrlTest() + { + // TODO unit test for the property 'Url' + } + /// + /// Test the property 'Description' + /// + [Test] + public void DescriptionTest() + { + // TODO unit test for the property 'Description' + } + /// + /// Test the property 'Events' + /// + [Test] + public void EventsTest() + { + // TODO unit test for the property 'Events' + } + + } + +} diff --git a/src/sib_api_v3_sdk.Test/sib_api_v3_sdk.Test.csproj b/src/sib_api_v3_sdk.Test/sib_api_v3_sdk.Test.csproj new file mode 100644 index 0000000..38fbb5b --- /dev/null +++ b/src/sib_api_v3_sdk.Test/sib_api_v3_sdk.Test.csproj @@ -0,0 +1,42 @@ + + + + net45 + sib_api_v3_sdk.Test + sib_api_v3_sdk.Test + Library + Swagger + Swagger + Swagger Library + A library generated from a Swagger doc + No Copyright + true + true + true + sib_api_v3_sdk.Test + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/sib_api_v3_sdk/Api/AccountApi.cs b/src/sib_api_v3_sdk/Api/AccountApi.cs new file mode 100644 index 0000000..2456525 --- /dev/null +++ b/src/sib_api_v3_sdk/Api/AccountApi.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using RestSharp; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace sib_api_v3_sdk.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IAccountApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Get your account informations, plans and credits details + /// + /// + /// + /// + /// Thrown when fails to make API call + /// GetAccount + GetAccount GetAccount (); + + /// + /// Get your account informations, plans and credits details + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ApiResponse of GetAccount + ApiResponse GetAccountWithHttpInfo (); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Get your account informations, plans and credits details + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Task of GetAccount + System.Threading.Tasks.Task GetAccountAsync (); + + /// + /// Get your account informations, plans and credits details + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Task of ApiResponse (GetAccount) + System.Threading.Tasks.Task> GetAccountAsyncWithHttpInfo (); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class AccountApi : IAccountApi + { + private sib_api_v3_sdk.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public AccountApi(String basePath) + { + this.Configuration = new sib_api_v3_sdk.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = sib_api_v3_sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public AccountApi(sib_api_v3_sdk.Client.Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = sib_api_v3_sdk.Client.Configuration.Default; + else + this.Configuration = configuration; + + ExceptionFactory = sib_api_v3_sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + + /// + /// Sets the base path of the API client. + /// + /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] + public void SetBasePath(String basePath) + { + // do nothing + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public sib_api_v3_sdk.Client.Configuration Configuration {get; set;} + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public sib_api_v3_sdk.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public IDictionary DefaultHeader() + { + return new ReadOnlyDictionary(this.Configuration.DefaultHeader); + } + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + + /// + /// Get your account informations, plans and credits details + /// + /// Thrown when fails to make API call + /// GetAccount + public GetAccount GetAccount () + { + ApiResponse localVarResponse = GetAccountWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Get your account informations, plans and credits details + /// + /// Thrown when fails to make API call + /// ApiResponse of GetAccount + public ApiResponse< GetAccount > GetAccountWithHttpInfo () + { + + var localVarPath = "/account"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetAccount", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetAccount) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetAccount))); + } + + /// + /// Get your account informations, plans and credits details + /// + /// Thrown when fails to make API call + /// Task of GetAccount + public async System.Threading.Tasks.Task GetAccountAsync () + { + ApiResponse localVarResponse = await GetAccountAsyncWithHttpInfo(); + return localVarResponse.Data; + + } + + /// + /// Get your account informations, plans and credits details + /// + /// Thrown when fails to make API call + /// Task of ApiResponse (GetAccount) + public async System.Threading.Tasks.Task> GetAccountAsyncWithHttpInfo () + { + + var localVarPath = "/account"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetAccount", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetAccount) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetAccount))); + } + + } +} diff --git a/src/sib_api_v3_sdk/Api/AttributesApi.cs b/src/sib_api_v3_sdk/Api/AttributesApi.cs new file mode 100644 index 0000000..2852ad3 --- /dev/null +++ b/src/sib_api_v3_sdk/Api/AttributesApi.cs @@ -0,0 +1,1004 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using RestSharp; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace sib_api_v3_sdk.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IAttributesApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Creates contact attribute + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the attribute + /// Values to create an attribute + /// + void CreateAttribute (string attributeCategory, string attributeName, CreateAttribute createAttribute); + + /// + /// Creates contact attribute + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the attribute + /// Values to create an attribute + /// ApiResponse of Object(void) + ApiResponse CreateAttributeWithHttpInfo (string attributeCategory, string attributeName, CreateAttribute createAttribute); + /// + /// Deletes an attribute + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the existing attribute + /// + void DeleteAttribute (string attributeCategory, string attributeName); + + /// + /// Deletes an attribute + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the existing attribute + /// ApiResponse of Object(void) + ApiResponse DeleteAttributeWithHttpInfo (string attributeCategory, string attributeName); + /// + /// Lists all attributes + /// + /// + /// + /// + /// Thrown when fails to make API call + /// GetAttributes + GetAttributes GetAttributes (); + + /// + /// Lists all attributes + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ApiResponse of GetAttributes + ApiResponse GetAttributesWithHttpInfo (); + /// + /// Updates contact attribute + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the existing attribute + /// Values to update an attribute + /// + void UpdateAttribute (string attributeCategory, string attributeName, UpdateAttribute updateAttribute); + + /// + /// Updates contact attribute + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the existing attribute + /// Values to update an attribute + /// ApiResponse of Object(void) + ApiResponse UpdateAttributeWithHttpInfo (string attributeCategory, string attributeName, UpdateAttribute updateAttribute); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Creates contact attribute + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the attribute + /// Values to create an attribute + /// Task of void + System.Threading.Tasks.Task CreateAttributeAsync (string attributeCategory, string attributeName, CreateAttribute createAttribute); + + /// + /// Creates contact attribute + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the attribute + /// Values to create an attribute + /// Task of ApiResponse + System.Threading.Tasks.Task> CreateAttributeAsyncWithHttpInfo (string attributeCategory, string attributeName, CreateAttribute createAttribute); + /// + /// Deletes an attribute + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the existing attribute + /// Task of void + System.Threading.Tasks.Task DeleteAttributeAsync (string attributeCategory, string attributeName); + + /// + /// Deletes an attribute + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the existing attribute + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteAttributeAsyncWithHttpInfo (string attributeCategory, string attributeName); + /// + /// Lists all attributes + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Task of GetAttributes + System.Threading.Tasks.Task GetAttributesAsync (); + + /// + /// Lists all attributes + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Task of ApiResponse (GetAttributes) + System.Threading.Tasks.Task> GetAttributesAsyncWithHttpInfo (); + /// + /// Updates contact attribute + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the existing attribute + /// Values to update an attribute + /// Task of void + System.Threading.Tasks.Task UpdateAttributeAsync (string attributeCategory, string attributeName, UpdateAttribute updateAttribute); + + /// + /// Updates contact attribute + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the existing attribute + /// Values to update an attribute + /// Task of ApiResponse + System.Threading.Tasks.Task> UpdateAttributeAsyncWithHttpInfo (string attributeCategory, string attributeName, UpdateAttribute updateAttribute); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class AttributesApi : IAttributesApi + { + private sib_api_v3_sdk.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public AttributesApi(String basePath) + { + this.Configuration = new sib_api_v3_sdk.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = sib_api_v3_sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public AttributesApi(sib_api_v3_sdk.Client.Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = sib_api_v3_sdk.Client.Configuration.Default; + else + this.Configuration = configuration; + + ExceptionFactory = sib_api_v3_sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + + /// + /// Sets the base path of the API client. + /// + /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] + public void SetBasePath(String basePath) + { + // do nothing + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public sib_api_v3_sdk.Client.Configuration Configuration {get; set;} + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public sib_api_v3_sdk.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public IDictionary DefaultHeader() + { + return new ReadOnlyDictionary(this.Configuration.DefaultHeader); + } + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + + /// + /// Creates contact attribute + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the attribute + /// Values to create an attribute + /// + public void CreateAttribute (string attributeCategory, string attributeName, CreateAttribute createAttribute) + { + CreateAttributeWithHttpInfo(attributeCategory, attributeName, createAttribute); + } + + /// + /// Creates contact attribute + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the attribute + /// Values to create an attribute + /// ApiResponse of Object(void) + public ApiResponse CreateAttributeWithHttpInfo (string attributeCategory, string attributeName, CreateAttribute createAttribute) + { + // verify the required parameter 'attributeCategory' is set + if (attributeCategory == null) + throw new ApiException(400, "Missing required parameter 'attributeCategory' when calling AttributesApi->CreateAttribute"); + // verify the required parameter 'attributeName' is set + if (attributeName == null) + throw new ApiException(400, "Missing required parameter 'attributeName' when calling AttributesApi->CreateAttribute"); + // verify the required parameter 'createAttribute' is set + if (createAttribute == null) + throw new ApiException(400, "Missing required parameter 'createAttribute' when calling AttributesApi->CreateAttribute"); + + var localVarPath = "/contacts/attributes/{attributeCategory}/{attributeName}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (attributeCategory != null) localVarPathParams.Add("attributeCategory", this.Configuration.ApiClient.ParameterToString(attributeCategory)); // path parameter + if (attributeName != null) localVarPathParams.Add("attributeName", this.Configuration.ApiClient.ParameterToString(attributeName)); // path parameter + if (createAttribute != null && createAttribute.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(createAttribute); // http body (model) parameter + } + else + { + localVarPostBody = createAttribute; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateAttribute", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Creates contact attribute + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the attribute + /// Values to create an attribute + /// Task of void + public async System.Threading.Tasks.Task CreateAttributeAsync (string attributeCategory, string attributeName, CreateAttribute createAttribute) + { + await CreateAttributeAsyncWithHttpInfo(attributeCategory, attributeName, createAttribute); + + } + + /// + /// Creates contact attribute + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the attribute + /// Values to create an attribute + /// Task of ApiResponse + public async System.Threading.Tasks.Task> CreateAttributeAsyncWithHttpInfo (string attributeCategory, string attributeName, CreateAttribute createAttribute) + { + // verify the required parameter 'attributeCategory' is set + if (attributeCategory == null) + throw new ApiException(400, "Missing required parameter 'attributeCategory' when calling AttributesApi->CreateAttribute"); + // verify the required parameter 'attributeName' is set + if (attributeName == null) + throw new ApiException(400, "Missing required parameter 'attributeName' when calling AttributesApi->CreateAttribute"); + // verify the required parameter 'createAttribute' is set + if (createAttribute == null) + throw new ApiException(400, "Missing required parameter 'createAttribute' when calling AttributesApi->CreateAttribute"); + + var localVarPath = "/contacts/attributes/{attributeCategory}/{attributeName}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (attributeCategory != null) localVarPathParams.Add("attributeCategory", this.Configuration.ApiClient.ParameterToString(attributeCategory)); // path parameter + if (attributeName != null) localVarPathParams.Add("attributeName", this.Configuration.ApiClient.ParameterToString(attributeName)); // path parameter + if (createAttribute != null && createAttribute.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(createAttribute); // http body (model) parameter + } + else + { + localVarPostBody = createAttribute; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateAttribute", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Deletes an attribute + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the existing attribute + /// + public void DeleteAttribute (string attributeCategory, string attributeName) + { + DeleteAttributeWithHttpInfo(attributeCategory, attributeName); + } + + /// + /// Deletes an attribute + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the existing attribute + /// ApiResponse of Object(void) + public ApiResponse DeleteAttributeWithHttpInfo (string attributeCategory, string attributeName) + { + // verify the required parameter 'attributeCategory' is set + if (attributeCategory == null) + throw new ApiException(400, "Missing required parameter 'attributeCategory' when calling AttributesApi->DeleteAttribute"); + // verify the required parameter 'attributeName' is set + if (attributeName == null) + throw new ApiException(400, "Missing required parameter 'attributeName' when calling AttributesApi->DeleteAttribute"); + + var localVarPath = "/contacts/attributes/{attributeCategory}/{attributeName}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (attributeCategory != null) localVarPathParams.Add("attributeCategory", this.Configuration.ApiClient.ParameterToString(attributeCategory)); // path parameter + if (attributeName != null) localVarPathParams.Add("attributeName", this.Configuration.ApiClient.ParameterToString(attributeName)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteAttribute", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Deletes an attribute + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the existing attribute + /// Task of void + public async System.Threading.Tasks.Task DeleteAttributeAsync (string attributeCategory, string attributeName) + { + await DeleteAttributeAsyncWithHttpInfo(attributeCategory, attributeName); + + } + + /// + /// Deletes an attribute + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the existing attribute + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteAttributeAsyncWithHttpInfo (string attributeCategory, string attributeName) + { + // verify the required parameter 'attributeCategory' is set + if (attributeCategory == null) + throw new ApiException(400, "Missing required parameter 'attributeCategory' when calling AttributesApi->DeleteAttribute"); + // verify the required parameter 'attributeName' is set + if (attributeName == null) + throw new ApiException(400, "Missing required parameter 'attributeName' when calling AttributesApi->DeleteAttribute"); + + var localVarPath = "/contacts/attributes/{attributeCategory}/{attributeName}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (attributeCategory != null) localVarPathParams.Add("attributeCategory", this.Configuration.ApiClient.ParameterToString(attributeCategory)); // path parameter + if (attributeName != null) localVarPathParams.Add("attributeName", this.Configuration.ApiClient.ParameterToString(attributeName)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteAttribute", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Lists all attributes + /// + /// Thrown when fails to make API call + /// GetAttributes + public GetAttributes GetAttributes () + { + ApiResponse localVarResponse = GetAttributesWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Lists all attributes + /// + /// Thrown when fails to make API call + /// ApiResponse of GetAttributes + public ApiResponse< GetAttributes > GetAttributesWithHttpInfo () + { + + var localVarPath = "/contacts/attributes"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetAttributes", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetAttributes) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetAttributes))); + } + + /// + /// Lists all attributes + /// + /// Thrown when fails to make API call + /// Task of GetAttributes + public async System.Threading.Tasks.Task GetAttributesAsync () + { + ApiResponse localVarResponse = await GetAttributesAsyncWithHttpInfo(); + return localVarResponse.Data; + + } + + /// + /// Lists all attributes + /// + /// Thrown when fails to make API call + /// Task of ApiResponse (GetAttributes) + public async System.Threading.Tasks.Task> GetAttributesAsyncWithHttpInfo () + { + + var localVarPath = "/contacts/attributes"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetAttributes", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetAttributes) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetAttributes))); + } + + /// + /// Updates contact attribute + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the existing attribute + /// Values to update an attribute + /// + public void UpdateAttribute (string attributeCategory, string attributeName, UpdateAttribute updateAttribute) + { + UpdateAttributeWithHttpInfo(attributeCategory, attributeName, updateAttribute); + } + + /// + /// Updates contact attribute + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the existing attribute + /// Values to update an attribute + /// ApiResponse of Object(void) + public ApiResponse UpdateAttributeWithHttpInfo (string attributeCategory, string attributeName, UpdateAttribute updateAttribute) + { + // verify the required parameter 'attributeCategory' is set + if (attributeCategory == null) + throw new ApiException(400, "Missing required parameter 'attributeCategory' when calling AttributesApi->UpdateAttribute"); + // verify the required parameter 'attributeName' is set + if (attributeName == null) + throw new ApiException(400, "Missing required parameter 'attributeName' when calling AttributesApi->UpdateAttribute"); + // verify the required parameter 'updateAttribute' is set + if (updateAttribute == null) + throw new ApiException(400, "Missing required parameter 'updateAttribute' when calling AttributesApi->UpdateAttribute"); + + var localVarPath = "/contacts/attributes/{attributeCategory}/{attributeName}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (attributeCategory != null) localVarPathParams.Add("attributeCategory", this.Configuration.ApiClient.ParameterToString(attributeCategory)); // path parameter + if (attributeName != null) localVarPathParams.Add("attributeName", this.Configuration.ApiClient.ParameterToString(attributeName)); // path parameter + if (updateAttribute != null && updateAttribute.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(updateAttribute); // http body (model) parameter + } + else + { + localVarPostBody = updateAttribute; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateAttribute", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Updates contact attribute + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the existing attribute + /// Values to update an attribute + /// Task of void + public async System.Threading.Tasks.Task UpdateAttributeAsync (string attributeCategory, string attributeName, UpdateAttribute updateAttribute) + { + await UpdateAttributeAsyncWithHttpInfo(attributeCategory, attributeName, updateAttribute); + + } + + /// + /// Updates contact attribute + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the existing attribute + /// Values to update an attribute + /// Task of ApiResponse + public async System.Threading.Tasks.Task> UpdateAttributeAsyncWithHttpInfo (string attributeCategory, string attributeName, UpdateAttribute updateAttribute) + { + // verify the required parameter 'attributeCategory' is set + if (attributeCategory == null) + throw new ApiException(400, "Missing required parameter 'attributeCategory' when calling AttributesApi->UpdateAttribute"); + // verify the required parameter 'attributeName' is set + if (attributeName == null) + throw new ApiException(400, "Missing required parameter 'attributeName' when calling AttributesApi->UpdateAttribute"); + // verify the required parameter 'updateAttribute' is set + if (updateAttribute == null) + throw new ApiException(400, "Missing required parameter 'updateAttribute' when calling AttributesApi->UpdateAttribute"); + + var localVarPath = "/contacts/attributes/{attributeCategory}/{attributeName}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (attributeCategory != null) localVarPathParams.Add("attributeCategory", this.Configuration.ApiClient.ParameterToString(attributeCategory)); // path parameter + if (attributeName != null) localVarPathParams.Add("attributeName", this.Configuration.ApiClient.ParameterToString(attributeName)); // path parameter + if (updateAttribute != null && updateAttribute.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(updateAttribute); // http body (model) parameter + } + else + { + localVarPostBody = updateAttribute; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateAttribute", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + } +} diff --git a/src/sib_api_v3_sdk/Api/ContactsApi.cs b/src/sib_api_v3_sdk/Api/ContactsApi.cs new file mode 100644 index 0000000..a866510 --- /dev/null +++ b/src/sib_api_v3_sdk/Api/ContactsApi.cs @@ -0,0 +1,5630 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using RestSharp; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace sib_api_v3_sdk.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IContactsApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Add existing contacts to a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// Emails addresses of the contacts + /// PostContactInfo + PostContactInfo AddContactToList (long? listId, AddContactToList contactEmails); + + /// + /// Add existing contacts to a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// Emails addresses of the contacts + /// ApiResponse of PostContactInfo + ApiResponse AddContactToListWithHttpInfo (long? listId, AddContactToList contactEmails); + /// + /// Creates contact attribute + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the attribute + /// Values to create an attribute + /// + void CreateAttribute (string attributeCategory, string attributeName, CreateAttribute createAttribute); + + /// + /// Creates contact attribute + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the attribute + /// Values to create an attribute + /// ApiResponse of Object(void) + ApiResponse CreateAttributeWithHttpInfo (string attributeCategory, string attributeName, CreateAttribute createAttribute); + /// + /// Create a contact + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Values to create a contact + /// CreateUpdateContactModel + CreateUpdateContactModel CreateContact (CreateContact createContact); + + /// + /// Create a contact + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Values to create a contact + /// ApiResponse of CreateUpdateContactModel + ApiResponse CreateContactWithHttpInfo (CreateContact createContact); + /// + /// Create a folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Name of the folder + /// CreateModel + CreateModel CreateFolder (CreateUpdateFolder createFolder); + + /// + /// Create a folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Name of the folder + /// ApiResponse of CreateModel + ApiResponse CreateFolderWithHttpInfo (CreateUpdateFolder createFolder); + /// + /// Create a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Values to create a list + /// CreateModel + CreateModel CreateList (CreateList createList); + + /// + /// Create a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Values to create a list + /// ApiResponse of CreateModel + ApiResponse CreateListWithHttpInfo (CreateList createList); + /// + /// Deletes an attribute + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the existing attribute + /// + void DeleteAttribute (string attributeCategory, string attributeName); + + /// + /// Deletes an attribute + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the existing attribute + /// ApiResponse of Object(void) + ApiResponse DeleteAttributeWithHttpInfo (string attributeCategory, string attributeName); + /// + /// Deletes a contact + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Email (urlencoded) of the contact + /// + void DeleteContact (string email); + + /// + /// Deletes a contact + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Email (urlencoded) of the contact + /// ApiResponse of Object(void) + ApiResponse DeleteContactWithHttpInfo (string email); + /// + /// Delete a folder (and all its lists) + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the folder + /// + void DeleteFolder (long? folderId); + + /// + /// Delete a folder (and all its lists) + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the folder + /// ApiResponse of Object(void) + ApiResponse DeleteFolderWithHttpInfo (long? folderId); + /// + /// Delete a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// + void DeleteList (long? listId); + + /// + /// Delete a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// ApiResponse of Object(void) + ApiResponse DeleteListWithHttpInfo (long? listId); + /// + /// Lists all attributes + /// + /// + /// + /// + /// Thrown when fails to make API call + /// GetAttributes + GetAttributes GetAttributes (); + + /// + /// Lists all attributes + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ApiResponse of GetAttributes + ApiResponse GetAttributesWithHttpInfo (); + /// + /// Retrieves contact informations + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Email (urlencoded) of the contact + /// GetExtendedContactDetails + GetExtendedContactDetails GetContactInfo (string email); + + /// + /// Retrieves contact informations + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Email (urlencoded) of the contact + /// ApiResponse of GetExtendedContactDetails + ApiResponse GetContactInfoWithHttpInfo (string email); + /// + /// Get the campaigns statistics for a contact + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Email address (urlencoded) of the contact + /// GetContactCampaignStats + GetContactCampaignStats GetContactStats (string email); + + /// + /// Get the campaigns statistics for a contact + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Email address (urlencoded) of the contact + /// ApiResponse of GetContactCampaignStats + ApiResponse GetContactStatsWithHttpInfo (string email); + /// + /// Get all the contacts + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number of documents per page (optional, default to 50) + /// Index of the first document of the page (optional, default to 0) + /// 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) + /// GetContacts + GetContacts GetContacts (long? limit = null, long? offset = null, DateTime? modifiedSince = null); + + /// + /// Get all the contacts + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number of documents per page (optional, default to 50) + /// Index of the first document of the page (optional, default to 0) + /// 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) + /// ApiResponse of GetContacts + ApiResponse GetContactsWithHttpInfo (long? limit = null, long? offset = null, DateTime? modifiedSince = null); + /// + /// Get the contacts in a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// 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) + /// Number of documents per page (optional, default to 50) + /// Index of the first document of the page (optional, default to 0) + /// GetContacts + GetContacts GetContactsFromList (long? listId, DateTime? modifiedSince = null, long? limit = null, long? offset = null); + + /// + /// Get the contacts in a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// 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) + /// Number of documents per page (optional, default to 50) + /// Index of the first document of the page (optional, default to 0) + /// ApiResponse of GetContacts + ApiResponse GetContactsFromListWithHttpInfo (long? listId, DateTime? modifiedSince = null, long? limit = null, long? offset = null); + /// + /// Returns folder details + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the folder + /// GetFolder + GetFolder GetFolder (long? folderId); + + /// + /// Returns folder details + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the folder + /// ApiResponse of GetFolder + ApiResponse GetFolderWithHttpInfo (long? folderId); + /// + /// Get the lists in a folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// GetFolderLists + GetFolderLists GetFolderLists (long? folderId, long? limit = null, long? offset = null); + + /// + /// Get the lists in a folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// ApiResponse of GetFolderLists + ApiResponse GetFolderListsWithHttpInfo (long? folderId, long? limit = null, long? offset = null); + /// + /// Get all the folders + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number of documents per page + /// Index of the first document of the page + /// GetFolders + GetFolders GetFolders (long? limit, long? offset); + + /// + /// Get all the folders + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number of documents per page + /// Index of the first document of the page + /// ApiResponse of GetFolders + ApiResponse GetFoldersWithHttpInfo (long? limit, long? offset); + /// + /// Get the details of a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// GetExtendedList + GetExtendedList GetList (long? listId); + + /// + /// Get the details of a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// ApiResponse of GetExtendedList + ApiResponse GetListWithHttpInfo (long? listId); + /// + /// Get all the lists + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// GetLists + GetLists GetLists (long? limit = null, long? offset = null); + + /// + /// Get all the lists + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// ApiResponse of GetLists + ApiResponse GetListsWithHttpInfo (long? limit = null, long? offset = null); + /// + /// Import contacts + /// + /// + /// It returns the background process ID which on completion calls the notify URL that you have set in the input. + /// + /// Thrown when fails to make API call + /// 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`` + /// CreatedProcessId + CreatedProcessId ImportContacts (RequestContactImport requestContactImport); + + /// + /// Import contacts + /// + /// + /// It returns the background process ID which on completion calls the notify URL that you have set in the input. + /// + /// Thrown when fails to make API call + /// 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`` + /// ApiResponse of CreatedProcessId + ApiResponse ImportContactsWithHttpInfo (RequestContactImport requestContactImport); + /// + /// Remove existing contacts from a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// Emails adresses of the contact + /// PostContactInfo + PostContactInfo RemoveContactFromList (long? listId, RemoveContactFromList contactEmails); + + /// + /// Remove existing contacts from a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// Emails adresses of the contact + /// ApiResponse of PostContactInfo + ApiResponse RemoveContactFromListWithHttpInfo (long? listId, RemoveContactFromList contactEmails); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Values to request a contact export + /// CreatedProcessId + CreatedProcessId RequestContactExport (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. + /// + /// Thrown when fails to make API call + /// Values to request a contact export + /// ApiResponse of CreatedProcessId + ApiResponse RequestContactExportWithHttpInfo (RequestContactExport requestContactExport); + /// + /// Updates contact attribute + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the existing attribute + /// Values to update an attribute + /// + void UpdateAttribute (string attributeCategory, string attributeName, UpdateAttribute updateAttribute); + + /// + /// Updates contact attribute + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the existing attribute + /// Values to update an attribute + /// ApiResponse of Object(void) + ApiResponse UpdateAttributeWithHttpInfo (string attributeCategory, string attributeName, UpdateAttribute updateAttribute); + /// + /// Updates a contact + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Email (urlencoded) of the contact + /// Values to update a contact + /// + void UpdateContact (string email, UpdateContact updateContact); + + /// + /// Updates a contact + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Email (urlencoded) of the contact + /// Values to update a contact + /// ApiResponse of Object(void) + ApiResponse UpdateContactWithHttpInfo (string email, UpdateContact updateContact); + /// + /// Update a contact folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Name of the folder + /// + void UpdateFolder (long? folderId, CreateUpdateFolder updateFolder); + + /// + /// Update a contact folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Name of the folder + /// ApiResponse of Object(void) + ApiResponse UpdateFolderWithHttpInfo (long? folderId, CreateUpdateFolder updateFolder); + /// + /// Update a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// Values to update a list + /// + void UpdateList (long? listId, UpdateList updateList); + + /// + /// Update a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// Values to update a list + /// ApiResponse of Object(void) + ApiResponse UpdateListWithHttpInfo (long? listId, UpdateList updateList); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Add existing contacts to a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// Emails addresses of the contacts + /// Task of PostContactInfo + System.Threading.Tasks.Task AddContactToListAsync (long? listId, AddContactToList contactEmails); + + /// + /// Add existing contacts to a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// Emails addresses of the contacts + /// Task of ApiResponse (PostContactInfo) + System.Threading.Tasks.Task> AddContactToListAsyncWithHttpInfo (long? listId, AddContactToList contactEmails); + /// + /// Creates contact attribute + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the attribute + /// Values to create an attribute + /// Task of void + System.Threading.Tasks.Task CreateAttributeAsync (string attributeCategory, string attributeName, CreateAttribute createAttribute); + + /// + /// Creates contact attribute + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the attribute + /// Values to create an attribute + /// Task of ApiResponse + System.Threading.Tasks.Task> CreateAttributeAsyncWithHttpInfo (string attributeCategory, string attributeName, CreateAttribute createAttribute); + /// + /// Create a contact + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Values to create a contact + /// Task of CreateUpdateContactModel + System.Threading.Tasks.Task CreateContactAsync (CreateContact createContact); + + /// + /// Create a contact + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Values to create a contact + /// Task of ApiResponse (CreateUpdateContactModel) + System.Threading.Tasks.Task> CreateContactAsyncWithHttpInfo (CreateContact createContact); + /// + /// Create a folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Name of the folder + /// Task of CreateModel + System.Threading.Tasks.Task CreateFolderAsync (CreateUpdateFolder createFolder); + + /// + /// Create a folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Name of the folder + /// Task of ApiResponse (CreateModel) + System.Threading.Tasks.Task> CreateFolderAsyncWithHttpInfo (CreateUpdateFolder createFolder); + /// + /// Create a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Values to create a list + /// Task of CreateModel + System.Threading.Tasks.Task CreateListAsync (CreateList createList); + + /// + /// Create a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Values to create a list + /// Task of ApiResponse (CreateModel) + System.Threading.Tasks.Task> CreateListAsyncWithHttpInfo (CreateList createList); + /// + /// Deletes an attribute + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the existing attribute + /// Task of void + System.Threading.Tasks.Task DeleteAttributeAsync (string attributeCategory, string attributeName); + + /// + /// Deletes an attribute + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the existing attribute + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteAttributeAsyncWithHttpInfo (string attributeCategory, string attributeName); + /// + /// Deletes a contact + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Email (urlencoded) of the contact + /// Task of void + System.Threading.Tasks.Task DeleteContactAsync (string email); + + /// + /// Deletes a contact + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Email (urlencoded) of the contact + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteContactAsyncWithHttpInfo (string email); + /// + /// Delete a folder (and all its lists) + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Task of void + System.Threading.Tasks.Task DeleteFolderAsync (long? folderId); + + /// + /// Delete a folder (and all its lists) + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteFolderAsyncWithHttpInfo (long? folderId); + /// + /// Delete a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// Task of void + System.Threading.Tasks.Task DeleteListAsync (long? listId); + + /// + /// Delete a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteListAsyncWithHttpInfo (long? listId); + /// + /// Lists all attributes + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Task of GetAttributes + System.Threading.Tasks.Task GetAttributesAsync (); + + /// + /// Lists all attributes + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Task of ApiResponse (GetAttributes) + System.Threading.Tasks.Task> GetAttributesAsyncWithHttpInfo (); + /// + /// Retrieves contact informations + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Email (urlencoded) of the contact + /// Task of GetExtendedContactDetails + System.Threading.Tasks.Task GetContactInfoAsync (string email); + + /// + /// Retrieves contact informations + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Email (urlencoded) of the contact + /// Task of ApiResponse (GetExtendedContactDetails) + System.Threading.Tasks.Task> GetContactInfoAsyncWithHttpInfo (string email); + /// + /// Get the campaigns statistics for a contact + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Email address (urlencoded) of the contact + /// Task of GetContactCampaignStats + System.Threading.Tasks.Task GetContactStatsAsync (string email); + + /// + /// Get the campaigns statistics for a contact + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Email address (urlencoded) of the contact + /// Task of ApiResponse (GetContactCampaignStats) + System.Threading.Tasks.Task> GetContactStatsAsyncWithHttpInfo (string email); + /// + /// Get all the contacts + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number of documents per page (optional, default to 50) + /// Index of the first document of the page (optional, default to 0) + /// 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) + /// Task of GetContacts + System.Threading.Tasks.Task GetContactsAsync (long? limit = null, long? offset = null, DateTime? modifiedSince = null); + + /// + /// Get all the contacts + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number of documents per page (optional, default to 50) + /// Index of the first document of the page (optional, default to 0) + /// 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) + /// Task of ApiResponse (GetContacts) + System.Threading.Tasks.Task> GetContactsAsyncWithHttpInfo (long? limit = null, long? offset = null, DateTime? modifiedSince = null); + /// + /// Get the contacts in a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// 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) + /// Number of documents per page (optional, default to 50) + /// Index of the first document of the page (optional, default to 0) + /// Task of GetContacts + System.Threading.Tasks.Task GetContactsFromListAsync (long? listId, DateTime? modifiedSince = null, long? limit = null, long? offset = null); + + /// + /// Get the contacts in a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// 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) + /// Number of documents per page (optional, default to 50) + /// Index of the first document of the page (optional, default to 0) + /// Task of ApiResponse (GetContacts) + System.Threading.Tasks.Task> GetContactsFromListAsyncWithHttpInfo (long? listId, DateTime? modifiedSince = null, long? limit = null, long? offset = null); + /// + /// Returns folder details + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the folder + /// Task of GetFolder + System.Threading.Tasks.Task GetFolderAsync (long? folderId); + + /// + /// Returns folder details + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the folder + /// Task of ApiResponse (GetFolder) + System.Threading.Tasks.Task> GetFolderAsyncWithHttpInfo (long? folderId); + /// + /// Get the lists in a folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// Task of GetFolderLists + System.Threading.Tasks.Task GetFolderListsAsync (long? folderId, long? limit = null, long? offset = null); + + /// + /// Get the lists in a folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// Task of ApiResponse (GetFolderLists) + System.Threading.Tasks.Task> GetFolderListsAsyncWithHttpInfo (long? folderId, long? limit = null, long? offset = null); + /// + /// Get all the folders + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number of documents per page + /// Index of the first document of the page + /// Task of GetFolders + System.Threading.Tasks.Task GetFoldersAsync (long? limit, long? offset); + + /// + /// Get all the folders + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number of documents per page + /// Index of the first document of the page + /// Task of ApiResponse (GetFolders) + System.Threading.Tasks.Task> GetFoldersAsyncWithHttpInfo (long? limit, long? offset); + /// + /// Get the details of a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// Task of GetExtendedList + System.Threading.Tasks.Task GetListAsync (long? listId); + + /// + /// Get the details of a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// Task of ApiResponse (GetExtendedList) + System.Threading.Tasks.Task> GetListAsyncWithHttpInfo (long? listId); + /// + /// Get all the lists + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// Task of GetLists + System.Threading.Tasks.Task GetListsAsync (long? limit = null, long? offset = null); + + /// + /// Get all the lists + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// Task of ApiResponse (GetLists) + System.Threading.Tasks.Task> GetListsAsyncWithHttpInfo (long? limit = null, long? offset = null); + /// + /// Import contacts + /// + /// + /// It returns the background process ID which on completion calls the notify URL that you have set in the input. + /// + /// Thrown when fails to make API call + /// 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`` + /// Task of CreatedProcessId + System.Threading.Tasks.Task ImportContactsAsync (RequestContactImport requestContactImport); + + /// + /// Import contacts + /// + /// + /// It returns the background process ID which on completion calls the notify URL that you have set in the input. + /// + /// Thrown when fails to make API call + /// 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`` + /// Task of ApiResponse (CreatedProcessId) + System.Threading.Tasks.Task> ImportContactsAsyncWithHttpInfo (RequestContactImport requestContactImport); + /// + /// Remove existing contacts from a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// Emails adresses of the contact + /// Task of PostContactInfo + System.Threading.Tasks.Task RemoveContactFromListAsync (long? listId, RemoveContactFromList contactEmails); + + /// + /// Remove existing contacts from a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// Emails adresses of the contact + /// Task of ApiResponse (PostContactInfo) + System.Threading.Tasks.Task> RemoveContactFromListAsyncWithHttpInfo (long? listId, RemoveContactFromList contactEmails); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Values to request a contact export + /// Task of CreatedProcessId + System.Threading.Tasks.Task RequestContactExportAsync (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. + /// + /// Thrown when fails to make API call + /// Values to request a contact export + /// Task of ApiResponse (CreatedProcessId) + System.Threading.Tasks.Task> RequestContactExportAsyncWithHttpInfo (RequestContactExport requestContactExport); + /// + /// Updates contact attribute + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the existing attribute + /// Values to update an attribute + /// Task of void + System.Threading.Tasks.Task UpdateAttributeAsync (string attributeCategory, string attributeName, UpdateAttribute updateAttribute); + + /// + /// Updates contact attribute + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the existing attribute + /// Values to update an attribute + /// Task of ApiResponse + System.Threading.Tasks.Task> UpdateAttributeAsyncWithHttpInfo (string attributeCategory, string attributeName, UpdateAttribute updateAttribute); + /// + /// Updates a contact + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Email (urlencoded) of the contact + /// Values to update a contact + /// Task of void + System.Threading.Tasks.Task UpdateContactAsync (string email, UpdateContact updateContact); + + /// + /// Updates a contact + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Email (urlencoded) of the contact + /// Values to update a contact + /// Task of ApiResponse + System.Threading.Tasks.Task> UpdateContactAsyncWithHttpInfo (string email, UpdateContact updateContact); + /// + /// Update a contact folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Name of the folder + /// Task of void + System.Threading.Tasks.Task UpdateFolderAsync (long? folderId, CreateUpdateFolder updateFolder); + + /// + /// Update a contact folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Name of the folder + /// Task of ApiResponse + System.Threading.Tasks.Task> UpdateFolderAsyncWithHttpInfo (long? folderId, CreateUpdateFolder updateFolder); + /// + /// Update a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// Values to update a list + /// Task of void + System.Threading.Tasks.Task UpdateListAsync (long? listId, UpdateList updateList); + + /// + /// Update a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// Values to update a list + /// Task of ApiResponse + System.Threading.Tasks.Task> UpdateListAsyncWithHttpInfo (long? listId, UpdateList updateList); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class ContactsApi : IContactsApi + { + private sib_api_v3_sdk.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public ContactsApi(String basePath) + { + this.Configuration = new sib_api_v3_sdk.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = sib_api_v3_sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public ContactsApi(sib_api_v3_sdk.Client.Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = sib_api_v3_sdk.Client.Configuration.Default; + else + this.Configuration = configuration; + + ExceptionFactory = sib_api_v3_sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + + /// + /// Sets the base path of the API client. + /// + /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] + public void SetBasePath(String basePath) + { + // do nothing + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public sib_api_v3_sdk.Client.Configuration Configuration {get; set;} + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public sib_api_v3_sdk.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public IDictionary DefaultHeader() + { + return new ReadOnlyDictionary(this.Configuration.DefaultHeader); + } + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + + /// + /// Add existing contacts to a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// Emails addresses of the contacts + /// PostContactInfo + public PostContactInfo AddContactToList (long? listId, AddContactToList contactEmails) + { + ApiResponse localVarResponse = AddContactToListWithHttpInfo(listId, contactEmails); + return localVarResponse.Data; + } + + /// + /// Add existing contacts to a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// Emails addresses of the contacts + /// ApiResponse of PostContactInfo + public ApiResponse< PostContactInfo > AddContactToListWithHttpInfo (long? listId, AddContactToList contactEmails) + { + // verify the required parameter 'listId' is set + if (listId == null) + throw new ApiException(400, "Missing required parameter 'listId' when calling ContactsApi->AddContactToList"); + // verify the required parameter 'contactEmails' is set + if (contactEmails == null) + throw new ApiException(400, "Missing required parameter 'contactEmails' when calling ContactsApi->AddContactToList"); + + var localVarPath = "/contacts/lists/{listId}/contacts/add"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (listId != null) localVarPathParams.Add("listId", this.Configuration.ApiClient.ParameterToString(listId)); // path parameter + if (contactEmails != null && contactEmails.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(contactEmails); // http body (model) parameter + } + else + { + localVarPostBody = contactEmails; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("AddContactToList", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (PostContactInfo) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostContactInfo))); + } + + /// + /// Add existing contacts to a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// Emails addresses of the contacts + /// Task of PostContactInfo + public async System.Threading.Tasks.Task AddContactToListAsync (long? listId, AddContactToList contactEmails) + { + ApiResponse localVarResponse = await AddContactToListAsyncWithHttpInfo(listId, contactEmails); + return localVarResponse.Data; + + } + + /// + /// Add existing contacts to a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// Emails addresses of the contacts + /// Task of ApiResponse (PostContactInfo) + public async System.Threading.Tasks.Task> AddContactToListAsyncWithHttpInfo (long? listId, AddContactToList contactEmails) + { + // verify the required parameter 'listId' is set + if (listId == null) + throw new ApiException(400, "Missing required parameter 'listId' when calling ContactsApi->AddContactToList"); + // verify the required parameter 'contactEmails' is set + if (contactEmails == null) + throw new ApiException(400, "Missing required parameter 'contactEmails' when calling ContactsApi->AddContactToList"); + + var localVarPath = "/contacts/lists/{listId}/contacts/add"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (listId != null) localVarPathParams.Add("listId", this.Configuration.ApiClient.ParameterToString(listId)); // path parameter + if (contactEmails != null && contactEmails.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(contactEmails); // http body (model) parameter + } + else + { + localVarPostBody = contactEmails; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("AddContactToList", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (PostContactInfo) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostContactInfo))); + } + + /// + /// Creates contact attribute + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the attribute + /// Values to create an attribute + /// + public void CreateAttribute (string attributeCategory, string attributeName, CreateAttribute createAttribute) + { + CreateAttributeWithHttpInfo(attributeCategory, attributeName, createAttribute); + } + + /// + /// Creates contact attribute + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the attribute + /// Values to create an attribute + /// ApiResponse of Object(void) + public ApiResponse CreateAttributeWithHttpInfo (string attributeCategory, string attributeName, CreateAttribute createAttribute) + { + // verify the required parameter 'attributeCategory' is set + if (attributeCategory == null) + throw new ApiException(400, "Missing required parameter 'attributeCategory' when calling ContactsApi->CreateAttribute"); + // verify the required parameter 'attributeName' is set + if (attributeName == null) + throw new ApiException(400, "Missing required parameter 'attributeName' when calling ContactsApi->CreateAttribute"); + // verify the required parameter 'createAttribute' is set + if (createAttribute == null) + throw new ApiException(400, "Missing required parameter 'createAttribute' when calling ContactsApi->CreateAttribute"); + + var localVarPath = "/contacts/attributes/{attributeCategory}/{attributeName}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (attributeCategory != null) localVarPathParams.Add("attributeCategory", this.Configuration.ApiClient.ParameterToString(attributeCategory)); // path parameter + if (attributeName != null) localVarPathParams.Add("attributeName", this.Configuration.ApiClient.ParameterToString(attributeName)); // path parameter + if (createAttribute != null && createAttribute.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(createAttribute); // http body (model) parameter + } + else + { + localVarPostBody = createAttribute; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateAttribute", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Creates contact attribute + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the attribute + /// Values to create an attribute + /// Task of void + public async System.Threading.Tasks.Task CreateAttributeAsync (string attributeCategory, string attributeName, CreateAttribute createAttribute) + { + await CreateAttributeAsyncWithHttpInfo(attributeCategory, attributeName, createAttribute); + + } + + /// + /// Creates contact attribute + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the attribute + /// Values to create an attribute + /// Task of ApiResponse + public async System.Threading.Tasks.Task> CreateAttributeAsyncWithHttpInfo (string attributeCategory, string attributeName, CreateAttribute createAttribute) + { + // verify the required parameter 'attributeCategory' is set + if (attributeCategory == null) + throw new ApiException(400, "Missing required parameter 'attributeCategory' when calling ContactsApi->CreateAttribute"); + // verify the required parameter 'attributeName' is set + if (attributeName == null) + throw new ApiException(400, "Missing required parameter 'attributeName' when calling ContactsApi->CreateAttribute"); + // verify the required parameter 'createAttribute' is set + if (createAttribute == null) + throw new ApiException(400, "Missing required parameter 'createAttribute' when calling ContactsApi->CreateAttribute"); + + var localVarPath = "/contacts/attributes/{attributeCategory}/{attributeName}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (attributeCategory != null) localVarPathParams.Add("attributeCategory", this.Configuration.ApiClient.ParameterToString(attributeCategory)); // path parameter + if (attributeName != null) localVarPathParams.Add("attributeName", this.Configuration.ApiClient.ParameterToString(attributeName)); // path parameter + if (createAttribute != null && createAttribute.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(createAttribute); // http body (model) parameter + } + else + { + localVarPostBody = createAttribute; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateAttribute", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Create a contact + /// + /// Thrown when fails to make API call + /// Values to create a contact + /// CreateUpdateContactModel + public CreateUpdateContactModel CreateContact (CreateContact createContact) + { + ApiResponse localVarResponse = CreateContactWithHttpInfo(createContact); + return localVarResponse.Data; + } + + /// + /// Create a contact + /// + /// Thrown when fails to make API call + /// Values to create a contact + /// ApiResponse of CreateUpdateContactModel + public ApiResponse< CreateUpdateContactModel > CreateContactWithHttpInfo (CreateContact createContact) + { + // verify the required parameter 'createContact' is set + if (createContact == null) + throw new ApiException(400, "Missing required parameter 'createContact' when calling ContactsApi->CreateContact"); + + var localVarPath = "/contacts"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (createContact != null && createContact.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(createContact); // http body (model) parameter + } + else + { + localVarPostBody = createContact; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateContact", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (CreateUpdateContactModel) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateUpdateContactModel))); + } + + /// + /// Create a contact + /// + /// Thrown when fails to make API call + /// Values to create a contact + /// Task of CreateUpdateContactModel + public async System.Threading.Tasks.Task CreateContactAsync (CreateContact createContact) + { + ApiResponse localVarResponse = await CreateContactAsyncWithHttpInfo(createContact); + return localVarResponse.Data; + + } + + /// + /// Create a contact + /// + /// Thrown when fails to make API call + /// Values to create a contact + /// Task of ApiResponse (CreateUpdateContactModel) + public async System.Threading.Tasks.Task> CreateContactAsyncWithHttpInfo (CreateContact createContact) + { + // verify the required parameter 'createContact' is set + if (createContact == null) + throw new ApiException(400, "Missing required parameter 'createContact' when calling ContactsApi->CreateContact"); + + var localVarPath = "/contacts"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (createContact != null && createContact.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(createContact); // http body (model) parameter + } + else + { + localVarPostBody = createContact; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateContact", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (CreateUpdateContactModel) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateUpdateContactModel))); + } + + /// + /// Create a folder + /// + /// Thrown when fails to make API call + /// Name of the folder + /// CreateModel + public CreateModel CreateFolder (CreateUpdateFolder createFolder) + { + ApiResponse localVarResponse = CreateFolderWithHttpInfo(createFolder); + return localVarResponse.Data; + } + + /// + /// Create a folder + /// + /// Thrown when fails to make API call + /// Name of the folder + /// ApiResponse of CreateModel + public ApiResponse< CreateModel > CreateFolderWithHttpInfo (CreateUpdateFolder createFolder) + { + // verify the required parameter 'createFolder' is set + if (createFolder == null) + throw new ApiException(400, "Missing required parameter 'createFolder' when calling ContactsApi->CreateFolder"); + + var localVarPath = "/contacts/folders"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (createFolder != null && createFolder.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(createFolder); // http body (model) parameter + } + else + { + localVarPostBody = createFolder; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateFolder", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (CreateModel) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateModel))); + } + + /// + /// Create a folder + /// + /// Thrown when fails to make API call + /// Name of the folder + /// Task of CreateModel + public async System.Threading.Tasks.Task CreateFolderAsync (CreateUpdateFolder createFolder) + { + ApiResponse localVarResponse = await CreateFolderAsyncWithHttpInfo(createFolder); + return localVarResponse.Data; + + } + + /// + /// Create a folder + /// + /// Thrown when fails to make API call + /// Name of the folder + /// Task of ApiResponse (CreateModel) + public async System.Threading.Tasks.Task> CreateFolderAsyncWithHttpInfo (CreateUpdateFolder createFolder) + { + // verify the required parameter 'createFolder' is set + if (createFolder == null) + throw new ApiException(400, "Missing required parameter 'createFolder' when calling ContactsApi->CreateFolder"); + + var localVarPath = "/contacts/folders"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (createFolder != null && createFolder.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(createFolder); // http body (model) parameter + } + else + { + localVarPostBody = createFolder; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateFolder", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (CreateModel) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateModel))); + } + + /// + /// Create a list + /// + /// Thrown when fails to make API call + /// Values to create a list + /// CreateModel + public CreateModel CreateList (CreateList createList) + { + ApiResponse localVarResponse = CreateListWithHttpInfo(createList); + return localVarResponse.Data; + } + + /// + /// Create a list + /// + /// Thrown when fails to make API call + /// Values to create a list + /// ApiResponse of CreateModel + public ApiResponse< CreateModel > CreateListWithHttpInfo (CreateList createList) + { + // verify the required parameter 'createList' is set + if (createList == null) + throw new ApiException(400, "Missing required parameter 'createList' when calling ContactsApi->CreateList"); + + var localVarPath = "/contacts/lists"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (createList != null && createList.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(createList); // http body (model) parameter + } + else + { + localVarPostBody = createList; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateList", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (CreateModel) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateModel))); + } + + /// + /// Create a list + /// + /// Thrown when fails to make API call + /// Values to create a list + /// Task of CreateModel + public async System.Threading.Tasks.Task CreateListAsync (CreateList createList) + { + ApiResponse localVarResponse = await CreateListAsyncWithHttpInfo(createList); + return localVarResponse.Data; + + } + + /// + /// Create a list + /// + /// Thrown when fails to make API call + /// Values to create a list + /// Task of ApiResponse (CreateModel) + public async System.Threading.Tasks.Task> CreateListAsyncWithHttpInfo (CreateList createList) + { + // verify the required parameter 'createList' is set + if (createList == null) + throw new ApiException(400, "Missing required parameter 'createList' when calling ContactsApi->CreateList"); + + var localVarPath = "/contacts/lists"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (createList != null && createList.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(createList); // http body (model) parameter + } + else + { + localVarPostBody = createList; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateList", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (CreateModel) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateModel))); + } + + /// + /// Deletes an attribute + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the existing attribute + /// + public void DeleteAttribute (string attributeCategory, string attributeName) + { + DeleteAttributeWithHttpInfo(attributeCategory, attributeName); + } + + /// + /// Deletes an attribute + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the existing attribute + /// ApiResponse of Object(void) + public ApiResponse DeleteAttributeWithHttpInfo (string attributeCategory, string attributeName) + { + // verify the required parameter 'attributeCategory' is set + if (attributeCategory == null) + throw new ApiException(400, "Missing required parameter 'attributeCategory' when calling ContactsApi->DeleteAttribute"); + // verify the required parameter 'attributeName' is set + if (attributeName == null) + throw new ApiException(400, "Missing required parameter 'attributeName' when calling ContactsApi->DeleteAttribute"); + + var localVarPath = "/contacts/attributes/{attributeCategory}/{attributeName}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (attributeCategory != null) localVarPathParams.Add("attributeCategory", this.Configuration.ApiClient.ParameterToString(attributeCategory)); // path parameter + if (attributeName != null) localVarPathParams.Add("attributeName", this.Configuration.ApiClient.ParameterToString(attributeName)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteAttribute", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Deletes an attribute + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the existing attribute + /// Task of void + public async System.Threading.Tasks.Task DeleteAttributeAsync (string attributeCategory, string attributeName) + { + await DeleteAttributeAsyncWithHttpInfo(attributeCategory, attributeName); + + } + + /// + /// Deletes an attribute + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the existing attribute + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteAttributeAsyncWithHttpInfo (string attributeCategory, string attributeName) + { + // verify the required parameter 'attributeCategory' is set + if (attributeCategory == null) + throw new ApiException(400, "Missing required parameter 'attributeCategory' when calling ContactsApi->DeleteAttribute"); + // verify the required parameter 'attributeName' is set + if (attributeName == null) + throw new ApiException(400, "Missing required parameter 'attributeName' when calling ContactsApi->DeleteAttribute"); + + var localVarPath = "/contacts/attributes/{attributeCategory}/{attributeName}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (attributeCategory != null) localVarPathParams.Add("attributeCategory", this.Configuration.ApiClient.ParameterToString(attributeCategory)); // path parameter + if (attributeName != null) localVarPathParams.Add("attributeName", this.Configuration.ApiClient.ParameterToString(attributeName)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteAttribute", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Deletes a contact + /// + /// Thrown when fails to make API call + /// Email (urlencoded) of the contact + /// + public void DeleteContact (string email) + { + DeleteContactWithHttpInfo(email); + } + + /// + /// Deletes a contact + /// + /// Thrown when fails to make API call + /// Email (urlencoded) of the contact + /// ApiResponse of Object(void) + public ApiResponse DeleteContactWithHttpInfo (string email) + { + // verify the required parameter 'email' is set + if (email == null) + throw new ApiException(400, "Missing required parameter 'email' when calling ContactsApi->DeleteContact"); + + var localVarPath = "/contacts/{email}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (email != null) localVarPathParams.Add("email", this.Configuration.ApiClient.ParameterToString(email)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteContact", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Deletes a contact + /// + /// Thrown when fails to make API call + /// Email (urlencoded) of the contact + /// Task of void + public async System.Threading.Tasks.Task DeleteContactAsync (string email) + { + await DeleteContactAsyncWithHttpInfo(email); + + } + + /// + /// Deletes a contact + /// + /// Thrown when fails to make API call + /// Email (urlencoded) of the contact + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteContactAsyncWithHttpInfo (string email) + { + // verify the required parameter 'email' is set + if (email == null) + throw new ApiException(400, "Missing required parameter 'email' when calling ContactsApi->DeleteContact"); + + var localVarPath = "/contacts/{email}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (email != null) localVarPathParams.Add("email", this.Configuration.ApiClient.ParameterToString(email)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteContact", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Delete a folder (and all its lists) + /// + /// Thrown when fails to make API call + /// Id of the folder + /// + public void DeleteFolder (long? folderId) + { + DeleteFolderWithHttpInfo(folderId); + } + + /// + /// Delete a folder (and all its lists) + /// + /// Thrown when fails to make API call + /// Id of the folder + /// ApiResponse of Object(void) + public ApiResponse DeleteFolderWithHttpInfo (long? folderId) + { + // verify the required parameter 'folderId' is set + if (folderId == null) + throw new ApiException(400, "Missing required parameter 'folderId' when calling ContactsApi->DeleteFolder"); + + var localVarPath = "/contacts/folders/{folderId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (folderId != null) localVarPathParams.Add("folderId", this.Configuration.ApiClient.ParameterToString(folderId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteFolder", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Delete a folder (and all its lists) + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Task of void + public async System.Threading.Tasks.Task DeleteFolderAsync (long? folderId) + { + await DeleteFolderAsyncWithHttpInfo(folderId); + + } + + /// + /// Delete a folder (and all its lists) + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteFolderAsyncWithHttpInfo (long? folderId) + { + // verify the required parameter 'folderId' is set + if (folderId == null) + throw new ApiException(400, "Missing required parameter 'folderId' when calling ContactsApi->DeleteFolder"); + + var localVarPath = "/contacts/folders/{folderId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (folderId != null) localVarPathParams.Add("folderId", this.Configuration.ApiClient.ParameterToString(folderId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteFolder", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Delete a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// + public void DeleteList (long? listId) + { + DeleteListWithHttpInfo(listId); + } + + /// + /// Delete a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// ApiResponse of Object(void) + public ApiResponse DeleteListWithHttpInfo (long? listId) + { + // verify the required parameter 'listId' is set + if (listId == null) + throw new ApiException(400, "Missing required parameter 'listId' when calling ContactsApi->DeleteList"); + + var localVarPath = "/contacts/lists/{listId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (listId != null) localVarPathParams.Add("listId", this.Configuration.ApiClient.ParameterToString(listId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteList", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Delete a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// Task of void + public async System.Threading.Tasks.Task DeleteListAsync (long? listId) + { + await DeleteListAsyncWithHttpInfo(listId); + + } + + /// + /// Delete a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteListAsyncWithHttpInfo (long? listId) + { + // verify the required parameter 'listId' is set + if (listId == null) + throw new ApiException(400, "Missing required parameter 'listId' when calling ContactsApi->DeleteList"); + + var localVarPath = "/contacts/lists/{listId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (listId != null) localVarPathParams.Add("listId", this.Configuration.ApiClient.ParameterToString(listId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteList", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Lists all attributes + /// + /// Thrown when fails to make API call + /// GetAttributes + public GetAttributes GetAttributes () + { + ApiResponse localVarResponse = GetAttributesWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Lists all attributes + /// + /// Thrown when fails to make API call + /// ApiResponse of GetAttributes + public ApiResponse< GetAttributes > GetAttributesWithHttpInfo () + { + + var localVarPath = "/contacts/attributes"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetAttributes", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetAttributes) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetAttributes))); + } + + /// + /// Lists all attributes + /// + /// Thrown when fails to make API call + /// Task of GetAttributes + public async System.Threading.Tasks.Task GetAttributesAsync () + { + ApiResponse localVarResponse = await GetAttributesAsyncWithHttpInfo(); + return localVarResponse.Data; + + } + + /// + /// Lists all attributes + /// + /// Thrown when fails to make API call + /// Task of ApiResponse (GetAttributes) + public async System.Threading.Tasks.Task> GetAttributesAsyncWithHttpInfo () + { + + var localVarPath = "/contacts/attributes"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetAttributes", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetAttributes) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetAttributes))); + } + + /// + /// Retrieves contact informations + /// + /// Thrown when fails to make API call + /// Email (urlencoded) of the contact + /// GetExtendedContactDetails + public GetExtendedContactDetails GetContactInfo (string email) + { + ApiResponse localVarResponse = GetContactInfoWithHttpInfo(email); + return localVarResponse.Data; + } + + /// + /// Retrieves contact informations + /// + /// Thrown when fails to make API call + /// Email (urlencoded) of the contact + /// ApiResponse of GetExtendedContactDetails + public ApiResponse< GetExtendedContactDetails > GetContactInfoWithHttpInfo (string email) + { + // verify the required parameter 'email' is set + if (email == null) + throw new ApiException(400, "Missing required parameter 'email' when calling ContactsApi->GetContactInfo"); + + var localVarPath = "/contacts/{email}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (email != null) localVarPathParams.Add("email", this.Configuration.ApiClient.ParameterToString(email)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetContactInfo", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetExtendedContactDetails) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetExtendedContactDetails))); + } + + /// + /// Retrieves contact informations + /// + /// Thrown when fails to make API call + /// Email (urlencoded) of the contact + /// Task of GetExtendedContactDetails + public async System.Threading.Tasks.Task GetContactInfoAsync (string email) + { + ApiResponse localVarResponse = await GetContactInfoAsyncWithHttpInfo(email); + return localVarResponse.Data; + + } + + /// + /// Retrieves contact informations + /// + /// Thrown when fails to make API call + /// Email (urlencoded) of the contact + /// Task of ApiResponse (GetExtendedContactDetails) + public async System.Threading.Tasks.Task> GetContactInfoAsyncWithHttpInfo (string email) + { + // verify the required parameter 'email' is set + if (email == null) + throw new ApiException(400, "Missing required parameter 'email' when calling ContactsApi->GetContactInfo"); + + var localVarPath = "/contacts/{email}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (email != null) localVarPathParams.Add("email", this.Configuration.ApiClient.ParameterToString(email)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetContactInfo", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetExtendedContactDetails) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetExtendedContactDetails))); + } + + /// + /// Get the campaigns statistics for a contact + /// + /// Thrown when fails to make API call + /// Email address (urlencoded) of the contact + /// GetContactCampaignStats + public GetContactCampaignStats GetContactStats (string email) + { + ApiResponse localVarResponse = GetContactStatsWithHttpInfo(email); + return localVarResponse.Data; + } + + /// + /// Get the campaigns statistics for a contact + /// + /// Thrown when fails to make API call + /// Email address (urlencoded) of the contact + /// ApiResponse of GetContactCampaignStats + public ApiResponse< GetContactCampaignStats > GetContactStatsWithHttpInfo (string email) + { + // verify the required parameter 'email' is set + if (email == null) + throw new ApiException(400, "Missing required parameter 'email' when calling ContactsApi->GetContactStats"); + + var localVarPath = "/contacts/{email}/campaignStats"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (email != null) localVarPathParams.Add("email", this.Configuration.ApiClient.ParameterToString(email)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetContactStats", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetContactCampaignStats) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetContactCampaignStats))); + } + + /// + /// Get the campaigns statistics for a contact + /// + /// Thrown when fails to make API call + /// Email address (urlencoded) of the contact + /// Task of GetContactCampaignStats + public async System.Threading.Tasks.Task GetContactStatsAsync (string email) + { + ApiResponse localVarResponse = await GetContactStatsAsyncWithHttpInfo(email); + return localVarResponse.Data; + + } + + /// + /// Get the campaigns statistics for a contact + /// + /// Thrown when fails to make API call + /// Email address (urlencoded) of the contact + /// Task of ApiResponse (GetContactCampaignStats) + public async System.Threading.Tasks.Task> GetContactStatsAsyncWithHttpInfo (string email) + { + // verify the required parameter 'email' is set + if (email == null) + throw new ApiException(400, "Missing required parameter 'email' when calling ContactsApi->GetContactStats"); + + var localVarPath = "/contacts/{email}/campaignStats"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (email != null) localVarPathParams.Add("email", this.Configuration.ApiClient.ParameterToString(email)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetContactStats", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetContactCampaignStats) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetContactCampaignStats))); + } + + /// + /// Get all the contacts + /// + /// Thrown when fails to make API call + /// Number of documents per page (optional, default to 50) + /// Index of the first document of the page (optional, default to 0) + /// 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) + /// GetContacts + public GetContacts GetContacts (long? limit = null, long? offset = null, DateTime? modifiedSince = null) + { + ApiResponse localVarResponse = GetContactsWithHttpInfo(limit, offset, modifiedSince); + return localVarResponse.Data; + } + + /// + /// Get all the contacts + /// + /// Thrown when fails to make API call + /// Number of documents per page (optional, default to 50) + /// Index of the first document of the page (optional, default to 0) + /// 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) + /// ApiResponse of GetContacts + public ApiResponse< GetContacts > GetContactsWithHttpInfo (long? limit = null, long? offset = null, DateTime? modifiedSince = null) + { + + var localVarPath = "/contacts"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (offset != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter + if (modifiedSince != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "modifiedSince", modifiedSince)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetContacts", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetContacts) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetContacts))); + } + + /// + /// Get all the contacts + /// + /// Thrown when fails to make API call + /// Number of documents per page (optional, default to 50) + /// Index of the first document of the page (optional, default to 0) + /// 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) + /// Task of GetContacts + public async System.Threading.Tasks.Task GetContactsAsync (long? limit = null, long? offset = null, DateTime? modifiedSince = null) + { + ApiResponse localVarResponse = await GetContactsAsyncWithHttpInfo(limit, offset, modifiedSince); + return localVarResponse.Data; + + } + + /// + /// Get all the contacts + /// + /// Thrown when fails to make API call + /// Number of documents per page (optional, default to 50) + /// Index of the first document of the page (optional, default to 0) + /// 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) + /// Task of ApiResponse (GetContacts) + public async System.Threading.Tasks.Task> GetContactsAsyncWithHttpInfo (long? limit = null, long? offset = null, DateTime? modifiedSince = null) + { + + var localVarPath = "/contacts"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (offset != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter + if (modifiedSince != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "modifiedSince", modifiedSince)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetContacts", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetContacts) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetContacts))); + } + + /// + /// Get the contacts in a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// 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) + /// Number of documents per page (optional, default to 50) + /// Index of the first document of the page (optional, default to 0) + /// GetContacts + public GetContacts GetContactsFromList (long? listId, DateTime? modifiedSince = null, long? limit = null, long? offset = null) + { + ApiResponse localVarResponse = GetContactsFromListWithHttpInfo(listId, modifiedSince, limit, offset); + return localVarResponse.Data; + } + + /// + /// Get the contacts in a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// 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) + /// Number of documents per page (optional, default to 50) + /// Index of the first document of the page (optional, default to 0) + /// ApiResponse of GetContacts + public ApiResponse< GetContacts > GetContactsFromListWithHttpInfo (long? listId, DateTime? modifiedSince = null, long? limit = null, long? offset = null) + { + // verify the required parameter 'listId' is set + if (listId == null) + throw new ApiException(400, "Missing required parameter 'listId' when calling ContactsApi->GetContactsFromList"); + + var localVarPath = "/contacts/lists/{listId}/contacts"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (listId != null) localVarPathParams.Add("listId", this.Configuration.ApiClient.ParameterToString(listId)); // path parameter + if (modifiedSince != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "modifiedSince", modifiedSince)); // query parameter + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (offset != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetContactsFromList", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetContacts) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetContacts))); + } + + /// + /// Get the contacts in a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// 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) + /// Number of documents per page (optional, default to 50) + /// Index of the first document of the page (optional, default to 0) + /// Task of GetContacts + public async System.Threading.Tasks.Task GetContactsFromListAsync (long? listId, DateTime? modifiedSince = null, long? limit = null, long? offset = null) + { + ApiResponse localVarResponse = await GetContactsFromListAsyncWithHttpInfo(listId, modifiedSince, limit, offset); + return localVarResponse.Data; + + } + + /// + /// Get the contacts in a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// 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) + /// Number of documents per page (optional, default to 50) + /// Index of the first document of the page (optional, default to 0) + /// Task of ApiResponse (GetContacts) + public async System.Threading.Tasks.Task> GetContactsFromListAsyncWithHttpInfo (long? listId, DateTime? modifiedSince = null, long? limit = null, long? offset = null) + { + // verify the required parameter 'listId' is set + if (listId == null) + throw new ApiException(400, "Missing required parameter 'listId' when calling ContactsApi->GetContactsFromList"); + + var localVarPath = "/contacts/lists/{listId}/contacts"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (listId != null) localVarPathParams.Add("listId", this.Configuration.ApiClient.ParameterToString(listId)); // path parameter + if (modifiedSince != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "modifiedSince", modifiedSince)); // query parameter + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (offset != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetContactsFromList", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetContacts) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetContacts))); + } + + /// + /// Returns folder details + /// + /// Thrown when fails to make API call + /// id of the folder + /// GetFolder + public GetFolder GetFolder (long? folderId) + { + ApiResponse localVarResponse = GetFolderWithHttpInfo(folderId); + return localVarResponse.Data; + } + + /// + /// Returns folder details + /// + /// Thrown when fails to make API call + /// id of the folder + /// ApiResponse of GetFolder + public ApiResponse< GetFolder > GetFolderWithHttpInfo (long? folderId) + { + // verify the required parameter 'folderId' is set + if (folderId == null) + throw new ApiException(400, "Missing required parameter 'folderId' when calling ContactsApi->GetFolder"); + + var localVarPath = "/contacts/folders/{folderId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (folderId != null) localVarPathParams.Add("folderId", this.Configuration.ApiClient.ParameterToString(folderId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetFolder", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetFolder) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetFolder))); + } + + /// + /// Returns folder details + /// + /// Thrown when fails to make API call + /// id of the folder + /// Task of GetFolder + public async System.Threading.Tasks.Task GetFolderAsync (long? folderId) + { + ApiResponse localVarResponse = await GetFolderAsyncWithHttpInfo(folderId); + return localVarResponse.Data; + + } + + /// + /// Returns folder details + /// + /// Thrown when fails to make API call + /// id of the folder + /// Task of ApiResponse (GetFolder) + public async System.Threading.Tasks.Task> GetFolderAsyncWithHttpInfo (long? folderId) + { + // verify the required parameter 'folderId' is set + if (folderId == null) + throw new ApiException(400, "Missing required parameter 'folderId' when calling ContactsApi->GetFolder"); + + var localVarPath = "/contacts/folders/{folderId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (folderId != null) localVarPathParams.Add("folderId", this.Configuration.ApiClient.ParameterToString(folderId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetFolder", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetFolder) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetFolder))); + } + + /// + /// Get the lists in a folder + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// GetFolderLists + public GetFolderLists GetFolderLists (long? folderId, long? limit = null, long? offset = null) + { + ApiResponse localVarResponse = GetFolderListsWithHttpInfo(folderId, limit, offset); + return localVarResponse.Data; + } + + /// + /// Get the lists in a folder + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// ApiResponse of GetFolderLists + public ApiResponse< GetFolderLists > GetFolderListsWithHttpInfo (long? folderId, long? limit = null, long? offset = null) + { + // verify the required parameter 'folderId' is set + if (folderId == null) + throw new ApiException(400, "Missing required parameter 'folderId' when calling ContactsApi->GetFolderLists"); + + var localVarPath = "/contacts/folders/{folderId}/lists"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (folderId != null) localVarPathParams.Add("folderId", this.Configuration.ApiClient.ParameterToString(folderId)); // path parameter + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (offset != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetFolderLists", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetFolderLists) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetFolderLists))); + } + + /// + /// Get the lists in a folder + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// Task of GetFolderLists + public async System.Threading.Tasks.Task GetFolderListsAsync (long? folderId, long? limit = null, long? offset = null) + { + ApiResponse localVarResponse = await GetFolderListsAsyncWithHttpInfo(folderId, limit, offset); + return localVarResponse.Data; + + } + + /// + /// Get the lists in a folder + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// Task of ApiResponse (GetFolderLists) + public async System.Threading.Tasks.Task> GetFolderListsAsyncWithHttpInfo (long? folderId, long? limit = null, long? offset = null) + { + // verify the required parameter 'folderId' is set + if (folderId == null) + throw new ApiException(400, "Missing required parameter 'folderId' when calling ContactsApi->GetFolderLists"); + + var localVarPath = "/contacts/folders/{folderId}/lists"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (folderId != null) localVarPathParams.Add("folderId", this.Configuration.ApiClient.ParameterToString(folderId)); // path parameter + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (offset != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetFolderLists", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetFolderLists) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetFolderLists))); + } + + /// + /// Get all the folders + /// + /// Thrown when fails to make API call + /// Number of documents per page + /// Index of the first document of the page + /// GetFolders + public GetFolders GetFolders (long? limit, long? offset) + { + ApiResponse localVarResponse = GetFoldersWithHttpInfo(limit, offset); + return localVarResponse.Data; + } + + /// + /// Get all the folders + /// + /// Thrown when fails to make API call + /// Number of documents per page + /// Index of the first document of the page + /// ApiResponse of GetFolders + public ApiResponse< GetFolders > GetFoldersWithHttpInfo (long? limit, long? offset) + { + // verify the required parameter 'limit' is set + if (limit == null) + throw new ApiException(400, "Missing required parameter 'limit' when calling ContactsApi->GetFolders"); + // verify the required parameter 'offset' is set + if (offset == null) + throw new ApiException(400, "Missing required parameter 'offset' when calling ContactsApi->GetFolders"); + + var localVarPath = "/contacts/folders"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (offset != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetFolders", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetFolders) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetFolders))); + } + + /// + /// Get all the folders + /// + /// Thrown when fails to make API call + /// Number of documents per page + /// Index of the first document of the page + /// Task of GetFolders + public async System.Threading.Tasks.Task GetFoldersAsync (long? limit, long? offset) + { + ApiResponse localVarResponse = await GetFoldersAsyncWithHttpInfo(limit, offset); + return localVarResponse.Data; + + } + + /// + /// Get all the folders + /// + /// Thrown when fails to make API call + /// Number of documents per page + /// Index of the first document of the page + /// Task of ApiResponse (GetFolders) + public async System.Threading.Tasks.Task> GetFoldersAsyncWithHttpInfo (long? limit, long? offset) + { + // verify the required parameter 'limit' is set + if (limit == null) + throw new ApiException(400, "Missing required parameter 'limit' when calling ContactsApi->GetFolders"); + // verify the required parameter 'offset' is set + if (offset == null) + throw new ApiException(400, "Missing required parameter 'offset' when calling ContactsApi->GetFolders"); + + var localVarPath = "/contacts/folders"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (offset != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetFolders", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetFolders) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetFolders))); + } + + /// + /// Get the details of a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// GetExtendedList + public GetExtendedList GetList (long? listId) + { + ApiResponse localVarResponse = GetListWithHttpInfo(listId); + return localVarResponse.Data; + } + + /// + /// Get the details of a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// ApiResponse of GetExtendedList + public ApiResponse< GetExtendedList > GetListWithHttpInfo (long? listId) + { + // verify the required parameter 'listId' is set + if (listId == null) + throw new ApiException(400, "Missing required parameter 'listId' when calling ContactsApi->GetList"); + + var localVarPath = "/contacts/lists/{listId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (listId != null) localVarPathParams.Add("listId", this.Configuration.ApiClient.ParameterToString(listId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetList", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetExtendedList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetExtendedList))); + } + + /// + /// Get the details of a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// Task of GetExtendedList + public async System.Threading.Tasks.Task GetListAsync (long? listId) + { + ApiResponse localVarResponse = await GetListAsyncWithHttpInfo(listId); + return localVarResponse.Data; + + } + + /// + /// Get the details of a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// Task of ApiResponse (GetExtendedList) + public async System.Threading.Tasks.Task> GetListAsyncWithHttpInfo (long? listId) + { + // verify the required parameter 'listId' is set + if (listId == null) + throw new ApiException(400, "Missing required parameter 'listId' when calling ContactsApi->GetList"); + + var localVarPath = "/contacts/lists/{listId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (listId != null) localVarPathParams.Add("listId", this.Configuration.ApiClient.ParameterToString(listId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetList", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetExtendedList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetExtendedList))); + } + + /// + /// Get all the lists + /// + /// Thrown when fails to make API call + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// GetLists + public GetLists GetLists (long? limit = null, long? offset = null) + { + ApiResponse localVarResponse = GetListsWithHttpInfo(limit, offset); + return localVarResponse.Data; + } + + /// + /// Get all the lists + /// + /// Thrown when fails to make API call + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// ApiResponse of GetLists + public ApiResponse< GetLists > GetListsWithHttpInfo (long? limit = null, long? offset = null) + { + + var localVarPath = "/contacts/lists"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (offset != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetLists", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetLists) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetLists))); + } + + /// + /// Get all the lists + /// + /// Thrown when fails to make API call + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// Task of GetLists + public async System.Threading.Tasks.Task GetListsAsync (long? limit = null, long? offset = null) + { + ApiResponse localVarResponse = await GetListsAsyncWithHttpInfo(limit, offset); + return localVarResponse.Data; + + } + + /// + /// Get all the lists + /// + /// Thrown when fails to make API call + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// Task of ApiResponse (GetLists) + public async System.Threading.Tasks.Task> GetListsAsyncWithHttpInfo (long? limit = null, long? offset = null) + { + + var localVarPath = "/contacts/lists"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (offset != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetLists", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetLists) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetLists))); + } + + /// + /// Import contacts It returns the background process ID which on completion calls the notify URL that you have set in the input. + /// + /// Thrown when fails to make API call + /// 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`` + /// CreatedProcessId + public CreatedProcessId ImportContacts (RequestContactImport requestContactImport) + { + ApiResponse localVarResponse = ImportContactsWithHttpInfo(requestContactImport); + return localVarResponse.Data; + } + + /// + /// Import contacts It returns the background process ID which on completion calls the notify URL that you have set in the input. + /// + /// Thrown when fails to make API call + /// 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`` + /// ApiResponse of CreatedProcessId + public ApiResponse< CreatedProcessId > ImportContactsWithHttpInfo (RequestContactImport requestContactImport) + { + // verify the required parameter 'requestContactImport' is set + if (requestContactImport == null) + throw new ApiException(400, "Missing required parameter 'requestContactImport' when calling ContactsApi->ImportContacts"); + + var localVarPath = "/contacts/import"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (requestContactImport != null && requestContactImport.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(requestContactImport); // http body (model) parameter + } + else + { + localVarPostBody = requestContactImport; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ImportContacts", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (CreatedProcessId) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreatedProcessId))); + } + + /// + /// Import contacts It returns the background process ID which on completion calls the notify URL that you have set in the input. + /// + /// Thrown when fails to make API call + /// 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`` + /// Task of CreatedProcessId + public async System.Threading.Tasks.Task ImportContactsAsync (RequestContactImport requestContactImport) + { + ApiResponse localVarResponse = await ImportContactsAsyncWithHttpInfo(requestContactImport); + return localVarResponse.Data; + + } + + /// + /// Import contacts It returns the background process ID which on completion calls the notify URL that you have set in the input. + /// + /// Thrown when fails to make API call + /// 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`` + /// Task of ApiResponse (CreatedProcessId) + public async System.Threading.Tasks.Task> ImportContactsAsyncWithHttpInfo (RequestContactImport requestContactImport) + { + // verify the required parameter 'requestContactImport' is set + if (requestContactImport == null) + throw new ApiException(400, "Missing required parameter 'requestContactImport' when calling ContactsApi->ImportContacts"); + + var localVarPath = "/contacts/import"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (requestContactImport != null && requestContactImport.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(requestContactImport); // http body (model) parameter + } + else + { + localVarPostBody = requestContactImport; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ImportContacts", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (CreatedProcessId) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreatedProcessId))); + } + + /// + /// Remove existing contacts from a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// Emails adresses of the contact + /// PostContactInfo + public PostContactInfo RemoveContactFromList (long? listId, RemoveContactFromList contactEmails) + { + ApiResponse localVarResponse = RemoveContactFromListWithHttpInfo(listId, contactEmails); + return localVarResponse.Data; + } + + /// + /// Remove existing contacts from a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// Emails adresses of the contact + /// ApiResponse of PostContactInfo + public ApiResponse< PostContactInfo > RemoveContactFromListWithHttpInfo (long? listId, RemoveContactFromList contactEmails) + { + // verify the required parameter 'listId' is set + if (listId == null) + throw new ApiException(400, "Missing required parameter 'listId' when calling ContactsApi->RemoveContactFromList"); + // verify the required parameter 'contactEmails' is set + if (contactEmails == null) + throw new ApiException(400, "Missing required parameter 'contactEmails' when calling ContactsApi->RemoveContactFromList"); + + var localVarPath = "/contacts/lists/{listId}/contacts/remove"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (listId != null) localVarPathParams.Add("listId", this.Configuration.ApiClient.ParameterToString(listId)); // path parameter + if (contactEmails != null && contactEmails.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(contactEmails); // http body (model) parameter + } + else + { + localVarPostBody = contactEmails; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("RemoveContactFromList", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (PostContactInfo) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostContactInfo))); + } + + /// + /// Remove existing contacts from a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// Emails adresses of the contact + /// Task of PostContactInfo + public async System.Threading.Tasks.Task RemoveContactFromListAsync (long? listId, RemoveContactFromList contactEmails) + { + ApiResponse localVarResponse = await RemoveContactFromListAsyncWithHttpInfo(listId, contactEmails); + return localVarResponse.Data; + + } + + /// + /// Remove existing contacts from a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// Emails adresses of the contact + /// Task of ApiResponse (PostContactInfo) + public async System.Threading.Tasks.Task> RemoveContactFromListAsyncWithHttpInfo (long? listId, RemoveContactFromList contactEmails) + { + // verify the required parameter 'listId' is set + if (listId == null) + throw new ApiException(400, "Missing required parameter 'listId' when calling ContactsApi->RemoveContactFromList"); + // verify the required parameter 'contactEmails' is set + if (contactEmails == null) + throw new ApiException(400, "Missing required parameter 'contactEmails' when calling ContactsApi->RemoveContactFromList"); + + var localVarPath = "/contacts/lists/{listId}/contacts/remove"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (listId != null) localVarPathParams.Add("listId", this.Configuration.ApiClient.ParameterToString(listId)); // path parameter + if (contactEmails != null && contactEmails.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(contactEmails); // http body (model) parameter + } + else + { + localVarPostBody = contactEmails; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("RemoveContactFromList", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (PostContactInfo) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostContactInfo))); + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Values to request a contact export + /// CreatedProcessId + public CreatedProcessId RequestContactExport (RequestContactExport requestContactExport) + { + ApiResponse localVarResponse = RequestContactExportWithHttpInfo(requestContactExport); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Values to request a contact export + /// ApiResponse of CreatedProcessId + public ApiResponse< CreatedProcessId > RequestContactExportWithHttpInfo (RequestContactExport requestContactExport) + { + // verify the required parameter 'requestContactExport' is set + if (requestContactExport == null) + throw new ApiException(400, "Missing required parameter 'requestContactExport' when calling ContactsApi->RequestContactExport"); + + var localVarPath = "/contacts/export"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (requestContactExport != null && requestContactExport.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(requestContactExport); // http body (model) parameter + } + else + { + localVarPostBody = requestContactExport; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("RequestContactExport", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (CreatedProcessId) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreatedProcessId))); + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Values to request a contact export + /// Task of CreatedProcessId + public async System.Threading.Tasks.Task RequestContactExportAsync (RequestContactExport requestContactExport) + { + ApiResponse localVarResponse = await RequestContactExportAsyncWithHttpInfo(requestContactExport); + return localVarResponse.Data; + + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Values to request a contact export + /// Task of ApiResponse (CreatedProcessId) + public async System.Threading.Tasks.Task> RequestContactExportAsyncWithHttpInfo (RequestContactExport requestContactExport) + { + // verify the required parameter 'requestContactExport' is set + if (requestContactExport == null) + throw new ApiException(400, "Missing required parameter 'requestContactExport' when calling ContactsApi->RequestContactExport"); + + var localVarPath = "/contacts/export"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (requestContactExport != null && requestContactExport.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(requestContactExport); // http body (model) parameter + } + else + { + localVarPostBody = requestContactExport; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("RequestContactExport", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (CreatedProcessId) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreatedProcessId))); + } + + /// + /// Updates contact attribute + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the existing attribute + /// Values to update an attribute + /// + public void UpdateAttribute (string attributeCategory, string attributeName, UpdateAttribute updateAttribute) + { + UpdateAttributeWithHttpInfo(attributeCategory, attributeName, updateAttribute); + } + + /// + /// Updates contact attribute + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the existing attribute + /// Values to update an attribute + /// ApiResponse of Object(void) + public ApiResponse UpdateAttributeWithHttpInfo (string attributeCategory, string attributeName, UpdateAttribute updateAttribute) + { + // verify the required parameter 'attributeCategory' is set + if (attributeCategory == null) + throw new ApiException(400, "Missing required parameter 'attributeCategory' when calling ContactsApi->UpdateAttribute"); + // verify the required parameter 'attributeName' is set + if (attributeName == null) + throw new ApiException(400, "Missing required parameter 'attributeName' when calling ContactsApi->UpdateAttribute"); + // verify the required parameter 'updateAttribute' is set + if (updateAttribute == null) + throw new ApiException(400, "Missing required parameter 'updateAttribute' when calling ContactsApi->UpdateAttribute"); + + var localVarPath = "/contacts/attributes/{attributeCategory}/{attributeName}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (attributeCategory != null) localVarPathParams.Add("attributeCategory", this.Configuration.ApiClient.ParameterToString(attributeCategory)); // path parameter + if (attributeName != null) localVarPathParams.Add("attributeName", this.Configuration.ApiClient.ParameterToString(attributeName)); // path parameter + if (updateAttribute != null && updateAttribute.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(updateAttribute); // http body (model) parameter + } + else + { + localVarPostBody = updateAttribute; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateAttribute", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Updates contact attribute + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the existing attribute + /// Values to update an attribute + /// Task of void + public async System.Threading.Tasks.Task UpdateAttributeAsync (string attributeCategory, string attributeName, UpdateAttribute updateAttribute) + { + await UpdateAttributeAsyncWithHttpInfo(attributeCategory, attributeName, updateAttribute); + + } + + /// + /// Updates contact attribute + /// + /// Thrown when fails to make API call + /// Category of the attribute + /// Name of the existing attribute + /// Values to update an attribute + /// Task of ApiResponse + public async System.Threading.Tasks.Task> UpdateAttributeAsyncWithHttpInfo (string attributeCategory, string attributeName, UpdateAttribute updateAttribute) + { + // verify the required parameter 'attributeCategory' is set + if (attributeCategory == null) + throw new ApiException(400, "Missing required parameter 'attributeCategory' when calling ContactsApi->UpdateAttribute"); + // verify the required parameter 'attributeName' is set + if (attributeName == null) + throw new ApiException(400, "Missing required parameter 'attributeName' when calling ContactsApi->UpdateAttribute"); + // verify the required parameter 'updateAttribute' is set + if (updateAttribute == null) + throw new ApiException(400, "Missing required parameter 'updateAttribute' when calling ContactsApi->UpdateAttribute"); + + var localVarPath = "/contacts/attributes/{attributeCategory}/{attributeName}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (attributeCategory != null) localVarPathParams.Add("attributeCategory", this.Configuration.ApiClient.ParameterToString(attributeCategory)); // path parameter + if (attributeName != null) localVarPathParams.Add("attributeName", this.Configuration.ApiClient.ParameterToString(attributeName)); // path parameter + if (updateAttribute != null && updateAttribute.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(updateAttribute); // http body (model) parameter + } + else + { + localVarPostBody = updateAttribute; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateAttribute", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Updates a contact + /// + /// Thrown when fails to make API call + /// Email (urlencoded) of the contact + /// Values to update a contact + /// + public void UpdateContact (string email, UpdateContact updateContact) + { + UpdateContactWithHttpInfo(email, updateContact); + } + + /// + /// Updates a contact + /// + /// Thrown when fails to make API call + /// Email (urlencoded) of the contact + /// Values to update a contact + /// ApiResponse of Object(void) + public ApiResponse UpdateContactWithHttpInfo (string email, UpdateContact updateContact) + { + // verify the required parameter 'email' is set + if (email == null) + throw new ApiException(400, "Missing required parameter 'email' when calling ContactsApi->UpdateContact"); + // verify the required parameter 'updateContact' is set + if (updateContact == null) + throw new ApiException(400, "Missing required parameter 'updateContact' when calling ContactsApi->UpdateContact"); + + var localVarPath = "/contacts/{email}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (email != null) localVarPathParams.Add("email", this.Configuration.ApiClient.ParameterToString(email)); // path parameter + if (updateContact != null && updateContact.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(updateContact); // http body (model) parameter + } + else + { + localVarPostBody = updateContact; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateContact", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Updates a contact + /// + /// Thrown when fails to make API call + /// Email (urlencoded) of the contact + /// Values to update a contact + /// Task of void + public async System.Threading.Tasks.Task UpdateContactAsync (string email, UpdateContact updateContact) + { + await UpdateContactAsyncWithHttpInfo(email, updateContact); + + } + + /// + /// Updates a contact + /// + /// Thrown when fails to make API call + /// Email (urlencoded) of the contact + /// Values to update a contact + /// Task of ApiResponse + public async System.Threading.Tasks.Task> UpdateContactAsyncWithHttpInfo (string email, UpdateContact updateContact) + { + // verify the required parameter 'email' is set + if (email == null) + throw new ApiException(400, "Missing required parameter 'email' when calling ContactsApi->UpdateContact"); + // verify the required parameter 'updateContact' is set + if (updateContact == null) + throw new ApiException(400, "Missing required parameter 'updateContact' when calling ContactsApi->UpdateContact"); + + var localVarPath = "/contacts/{email}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (email != null) localVarPathParams.Add("email", this.Configuration.ApiClient.ParameterToString(email)); // path parameter + if (updateContact != null && updateContact.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(updateContact); // http body (model) parameter + } + else + { + localVarPostBody = updateContact; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateContact", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Update a contact folder + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Name of the folder + /// + public void UpdateFolder (long? folderId, CreateUpdateFolder updateFolder) + { + UpdateFolderWithHttpInfo(folderId, updateFolder); + } + + /// + /// Update a contact folder + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Name of the folder + /// ApiResponse of Object(void) + public ApiResponse UpdateFolderWithHttpInfo (long? folderId, CreateUpdateFolder updateFolder) + { + // verify the required parameter 'folderId' is set + if (folderId == null) + throw new ApiException(400, "Missing required parameter 'folderId' when calling ContactsApi->UpdateFolder"); + // verify the required parameter 'updateFolder' is set + if (updateFolder == null) + throw new ApiException(400, "Missing required parameter 'updateFolder' when calling ContactsApi->UpdateFolder"); + + var localVarPath = "/contacts/folders/{folderId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (folderId != null) localVarPathParams.Add("folderId", this.Configuration.ApiClient.ParameterToString(folderId)); // path parameter + if (updateFolder != null && updateFolder.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(updateFolder); // http body (model) parameter + } + else + { + localVarPostBody = updateFolder; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateFolder", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Update a contact folder + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Name of the folder + /// Task of void + public async System.Threading.Tasks.Task UpdateFolderAsync (long? folderId, CreateUpdateFolder updateFolder) + { + await UpdateFolderAsyncWithHttpInfo(folderId, updateFolder); + + } + + /// + /// Update a contact folder + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Name of the folder + /// Task of ApiResponse + public async System.Threading.Tasks.Task> UpdateFolderAsyncWithHttpInfo (long? folderId, CreateUpdateFolder updateFolder) + { + // verify the required parameter 'folderId' is set + if (folderId == null) + throw new ApiException(400, "Missing required parameter 'folderId' when calling ContactsApi->UpdateFolder"); + // verify the required parameter 'updateFolder' is set + if (updateFolder == null) + throw new ApiException(400, "Missing required parameter 'updateFolder' when calling ContactsApi->UpdateFolder"); + + var localVarPath = "/contacts/folders/{folderId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (folderId != null) localVarPathParams.Add("folderId", this.Configuration.ApiClient.ParameterToString(folderId)); // path parameter + if (updateFolder != null && updateFolder.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(updateFolder); // http body (model) parameter + } + else + { + localVarPostBody = updateFolder; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateFolder", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Update a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// Values to update a list + /// + public void UpdateList (long? listId, UpdateList updateList) + { + UpdateListWithHttpInfo(listId, updateList); + } + + /// + /// Update a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// Values to update a list + /// ApiResponse of Object(void) + public ApiResponse UpdateListWithHttpInfo (long? listId, UpdateList updateList) + { + // verify the required parameter 'listId' is set + if (listId == null) + throw new ApiException(400, "Missing required parameter 'listId' when calling ContactsApi->UpdateList"); + // verify the required parameter 'updateList' is set + if (updateList == null) + throw new ApiException(400, "Missing required parameter 'updateList' when calling ContactsApi->UpdateList"); + + var localVarPath = "/contacts/lists/{listId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (listId != null) localVarPathParams.Add("listId", this.Configuration.ApiClient.ParameterToString(listId)); // path parameter + if (updateList != null && updateList.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(updateList); // http body (model) parameter + } + else + { + localVarPostBody = updateList; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateList", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Update a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// Values to update a list + /// Task of void + public async System.Threading.Tasks.Task UpdateListAsync (long? listId, UpdateList updateList) + { + await UpdateListAsyncWithHttpInfo(listId, updateList); + + } + + /// + /// Update a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// Values to update a list + /// Task of ApiResponse + public async System.Threading.Tasks.Task> UpdateListAsyncWithHttpInfo (long? listId, UpdateList updateList) + { + // verify the required parameter 'listId' is set + if (listId == null) + throw new ApiException(400, "Missing required parameter 'listId' when calling ContactsApi->UpdateList"); + // verify the required parameter 'updateList' is set + if (updateList == null) + throw new ApiException(400, "Missing required parameter 'updateList' when calling ContactsApi->UpdateList"); + + var localVarPath = "/contacts/lists/{listId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (listId != null) localVarPathParams.Add("listId", this.Configuration.ApiClient.ParameterToString(listId)); // path parameter + if (updateList != null && updateList.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(updateList); // http body (model) parameter + } + else + { + localVarPostBody = updateList; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateList", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + } +} diff --git a/src/sib_api_v3_sdk/Api/EmailCampaignsApi.cs b/src/sib_api_v3_sdk/Api/EmailCampaignsApi.cs new file mode 100644 index 0000000..609de67 --- /dev/null +++ b/src/sib_api_v3_sdk/Api/EmailCampaignsApi.cs @@ -0,0 +1,2290 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using RestSharp; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace sib_api_v3_sdk.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IEmailCampaignsApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Create an email campaign + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Values to create a campaign + /// CreateModel + CreateModel CreateEmailCampaign (CreateEmailCampaign emailCampaigns); + + /// + /// Create an email campaign + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Values to create a campaign + /// ApiResponse of CreateModel + ApiResponse CreateEmailCampaignWithHttpInfo (CreateEmailCampaign emailCampaigns); + /// + /// Delete an email campaign + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the campaign + /// + void DeleteEmailCampaign (long? campaignId); + + /// + /// Delete an email campaign + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the campaign + /// ApiResponse of Object(void) + ApiResponse DeleteEmailCampaignWithHttpInfo (long? campaignId); + /// + /// Export the recipients of a campaign + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Values to send for a recipient export request (optional) + /// CreatedProcessId + CreatedProcessId EmailExportRecipients (long? campaignId, EmailExportRecipients recipientExport = null); + + /// + /// Export the recipients of a campaign + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Values to send for a recipient export request (optional) + /// ApiResponse of CreatedProcessId + ApiResponse EmailExportRecipientsWithHttpInfo (long? campaignId, EmailExportRecipients recipientExport = null); + /// + /// Get campaign informations + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// GetEmailCampaign + GetEmailCampaign GetEmailCampaign (long? campaignId); + + /// + /// Get campaign informations + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// ApiResponse of GetEmailCampaign + ApiResponse GetEmailCampaignWithHttpInfo (long? campaignId); + /// + /// Return all your created campaigns + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Filter on the type of the campaigns (optional) + /// Filter on the status of the campaign (optional) + /// Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + /// Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + /// Number of documents per page (optional, default to 500) + /// Index of the first document in the page (optional, default to 0) + /// GetEmailCampaigns + GetEmailCampaigns GetEmailCampaigns (string type = null, string status = null, DateTime? startDate = null, DateTime? endDate = null, long? limit = null, long? offset = null); + + /// + /// Return all your created campaigns + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Filter on the type of the campaigns (optional) + /// Filter on the status of the campaign (optional) + /// Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + /// Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + /// Number of documents per page (optional, default to 500) + /// Index of the first document in the page (optional, default to 0) + /// ApiResponse of GetEmailCampaigns + ApiResponse GetEmailCampaignsWithHttpInfo (string type = null, string status = null, DateTime? startDate = null, DateTime? endDate = null, long? limit = null, long? offset = null); + /// + /// Send an email campaign id of the campaign immediately + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// + void SendEmailCampaignNow (long? campaignId); + + /// + /// Send an email campaign id of the campaign immediately + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// ApiResponse of Object(void) + ApiResponse SendEmailCampaignNowWithHttpInfo (long? campaignId); + /// + /// Send the report of a campaigns + /// + /// + /// A PDF will be sent to the specified email addresses + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Values for send a report + /// + void SendReport (long? campaignId, SendReport sendReport); + + /// + /// Send the report of a campaigns + /// + /// + /// A PDF will be sent to the specified email addresses + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Values for send a report + /// ApiResponse of Object(void) + ApiResponse SendReportWithHttpInfo (long? campaignId, SendReport sendReport); + /// + /// Send an email campaign to your test list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// + /// + void SendTestEmail (long? campaignId, SendTestEmail emailTo); + + /// + /// Send an email campaign to your test list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// + /// ApiResponse of Object(void) + ApiResponse SendTestEmailWithHttpInfo (long? campaignId, SendTestEmail emailTo); + /// + /// Update a campaign status + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Status of the campaign + /// + void UpdateCampaignStatus (long? campaignId, UpdateCampaignStatus status); + + /// + /// Update a campaign status + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Status of the campaign + /// ApiResponse of Object(void) + ApiResponse UpdateCampaignStatusWithHttpInfo (long? campaignId, UpdateCampaignStatus status); + /// + /// Update a campaign + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Values to update a campaign + /// + void UpdateEmailCampaign (long? campaignId, UpdateEmailCampaign emailCampaign); + + /// + /// Update a campaign + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Values to update a campaign + /// ApiResponse of Object(void) + ApiResponse UpdateEmailCampaignWithHttpInfo (long? campaignId, UpdateEmailCampaign emailCampaign); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Create an email campaign + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Values to create a campaign + /// Task of CreateModel + System.Threading.Tasks.Task CreateEmailCampaignAsync (CreateEmailCampaign emailCampaigns); + + /// + /// Create an email campaign + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Values to create a campaign + /// Task of ApiResponse (CreateModel) + System.Threading.Tasks.Task> CreateEmailCampaignAsyncWithHttpInfo (CreateEmailCampaign emailCampaigns); + /// + /// Delete an email campaign + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the campaign + /// Task of void + System.Threading.Tasks.Task DeleteEmailCampaignAsync (long? campaignId); + + /// + /// Delete an email campaign + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the campaign + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteEmailCampaignAsyncWithHttpInfo (long? campaignId); + /// + /// Export the recipients of a campaign + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Values to send for a recipient export request (optional) + /// Task of CreatedProcessId + System.Threading.Tasks.Task EmailExportRecipientsAsync (long? campaignId, EmailExportRecipients recipientExport = null); + + /// + /// Export the recipients of a campaign + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Values to send for a recipient export request (optional) + /// Task of ApiResponse (CreatedProcessId) + System.Threading.Tasks.Task> EmailExportRecipientsAsyncWithHttpInfo (long? campaignId, EmailExportRecipients recipientExport = null); + /// + /// Get campaign informations + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Task of GetEmailCampaign + System.Threading.Tasks.Task GetEmailCampaignAsync (long? campaignId); + + /// + /// Get campaign informations + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Task of ApiResponse (GetEmailCampaign) + System.Threading.Tasks.Task> GetEmailCampaignAsyncWithHttpInfo (long? campaignId); + /// + /// Return all your created campaigns + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Filter on the type of the campaigns (optional) + /// Filter on the status of the campaign (optional) + /// Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + /// Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + /// Number of documents per page (optional, default to 500) + /// Index of the first document in the page (optional, default to 0) + /// Task of GetEmailCampaigns + System.Threading.Tasks.Task GetEmailCampaignsAsync (string type = null, string status = null, DateTime? startDate = null, DateTime? endDate = null, long? limit = null, long? offset = null); + + /// + /// Return all your created campaigns + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Filter on the type of the campaigns (optional) + /// Filter on the status of the campaign (optional) + /// Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + /// Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + /// Number of documents per page (optional, default to 500) + /// Index of the first document in the page (optional, default to 0) + /// Task of ApiResponse (GetEmailCampaigns) + System.Threading.Tasks.Task> GetEmailCampaignsAsyncWithHttpInfo (string type = null, string status = null, DateTime? startDate = null, DateTime? endDate = null, long? limit = null, long? offset = null); + /// + /// Send an email campaign id of the campaign immediately + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Task of void + System.Threading.Tasks.Task SendEmailCampaignNowAsync (long? campaignId); + + /// + /// Send an email campaign id of the campaign immediately + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Task of ApiResponse + System.Threading.Tasks.Task> SendEmailCampaignNowAsyncWithHttpInfo (long? campaignId); + /// + /// Send the report of a campaigns + /// + /// + /// A PDF will be sent to the specified email addresses + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Values for send a report + /// Task of void + System.Threading.Tasks.Task SendReportAsync (long? campaignId, SendReport sendReport); + + /// + /// Send the report of a campaigns + /// + /// + /// A PDF will be sent to the specified email addresses + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Values for send a report + /// Task of ApiResponse + System.Threading.Tasks.Task> SendReportAsyncWithHttpInfo (long? campaignId, SendReport sendReport); + /// + /// Send an email campaign to your test list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// + /// Task of void + System.Threading.Tasks.Task SendTestEmailAsync (long? campaignId, SendTestEmail emailTo); + + /// + /// Send an email campaign to your test list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// + /// Task of ApiResponse + System.Threading.Tasks.Task> SendTestEmailAsyncWithHttpInfo (long? campaignId, SendTestEmail emailTo); + /// + /// Update a campaign status + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Status of the campaign + /// Task of void + System.Threading.Tasks.Task UpdateCampaignStatusAsync (long? campaignId, UpdateCampaignStatus status); + + /// + /// Update a campaign status + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Status of the campaign + /// Task of ApiResponse + System.Threading.Tasks.Task> UpdateCampaignStatusAsyncWithHttpInfo (long? campaignId, UpdateCampaignStatus status); + /// + /// Update a campaign + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Values to update a campaign + /// Task of void + System.Threading.Tasks.Task UpdateEmailCampaignAsync (long? campaignId, UpdateEmailCampaign emailCampaign); + + /// + /// Update a campaign + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Values to update a campaign + /// Task of ApiResponse + System.Threading.Tasks.Task> UpdateEmailCampaignAsyncWithHttpInfo (long? campaignId, UpdateEmailCampaign emailCampaign); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class EmailCampaignsApi : IEmailCampaignsApi + { + private sib_api_v3_sdk.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public EmailCampaignsApi(String basePath) + { + this.Configuration = new sib_api_v3_sdk.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = sib_api_v3_sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public EmailCampaignsApi(sib_api_v3_sdk.Client.Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = sib_api_v3_sdk.Client.Configuration.Default; + else + this.Configuration = configuration; + + ExceptionFactory = sib_api_v3_sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + + /// + /// Sets the base path of the API client. + /// + /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] + public void SetBasePath(String basePath) + { + // do nothing + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public sib_api_v3_sdk.Client.Configuration Configuration {get; set;} + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public sib_api_v3_sdk.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public IDictionary DefaultHeader() + { + return new ReadOnlyDictionary(this.Configuration.DefaultHeader); + } + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + + /// + /// Create an email campaign + /// + /// Thrown when fails to make API call + /// Values to create a campaign + /// CreateModel + public CreateModel CreateEmailCampaign (CreateEmailCampaign emailCampaigns) + { + ApiResponse localVarResponse = CreateEmailCampaignWithHttpInfo(emailCampaigns); + return localVarResponse.Data; + } + + /// + /// Create an email campaign + /// + /// Thrown when fails to make API call + /// Values to create a campaign + /// ApiResponse of CreateModel + public ApiResponse< CreateModel > CreateEmailCampaignWithHttpInfo (CreateEmailCampaign emailCampaigns) + { + // verify the required parameter 'emailCampaigns' is set + if (emailCampaigns == null) + throw new ApiException(400, "Missing required parameter 'emailCampaigns' when calling EmailCampaignsApi->CreateEmailCampaign"); + + var localVarPath = "/emailCampaigns"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (emailCampaigns != null && emailCampaigns.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(emailCampaigns); // http body (model) parameter + } + else + { + localVarPostBody = emailCampaigns; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateEmailCampaign", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (CreateModel) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateModel))); + } + + /// + /// Create an email campaign + /// + /// Thrown when fails to make API call + /// Values to create a campaign + /// Task of CreateModel + public async System.Threading.Tasks.Task CreateEmailCampaignAsync (CreateEmailCampaign emailCampaigns) + { + ApiResponse localVarResponse = await CreateEmailCampaignAsyncWithHttpInfo(emailCampaigns); + return localVarResponse.Data; + + } + + /// + /// Create an email campaign + /// + /// Thrown when fails to make API call + /// Values to create a campaign + /// Task of ApiResponse (CreateModel) + public async System.Threading.Tasks.Task> CreateEmailCampaignAsyncWithHttpInfo (CreateEmailCampaign emailCampaigns) + { + // verify the required parameter 'emailCampaigns' is set + if (emailCampaigns == null) + throw new ApiException(400, "Missing required parameter 'emailCampaigns' when calling EmailCampaignsApi->CreateEmailCampaign"); + + var localVarPath = "/emailCampaigns"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (emailCampaigns != null && emailCampaigns.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(emailCampaigns); // http body (model) parameter + } + else + { + localVarPostBody = emailCampaigns; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateEmailCampaign", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (CreateModel) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateModel))); + } + + /// + /// Delete an email campaign + /// + /// Thrown when fails to make API call + /// id of the campaign + /// + public void DeleteEmailCampaign (long? campaignId) + { + DeleteEmailCampaignWithHttpInfo(campaignId); + } + + /// + /// Delete an email campaign + /// + /// Thrown when fails to make API call + /// id of the campaign + /// ApiResponse of Object(void) + public ApiResponse DeleteEmailCampaignWithHttpInfo (long? campaignId) + { + // verify the required parameter 'campaignId' is set + if (campaignId == null) + throw new ApiException(400, "Missing required parameter 'campaignId' when calling EmailCampaignsApi->DeleteEmailCampaign"); + + var localVarPath = "/emailCampaigns/{campaignId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (campaignId != null) localVarPathParams.Add("campaignId", this.Configuration.ApiClient.ParameterToString(campaignId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteEmailCampaign", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Delete an email campaign + /// + /// Thrown when fails to make API call + /// id of the campaign + /// Task of void + public async System.Threading.Tasks.Task DeleteEmailCampaignAsync (long? campaignId) + { + await DeleteEmailCampaignAsyncWithHttpInfo(campaignId); + + } + + /// + /// Delete an email campaign + /// + /// Thrown when fails to make API call + /// id of the campaign + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteEmailCampaignAsyncWithHttpInfo (long? campaignId) + { + // verify the required parameter 'campaignId' is set + if (campaignId == null) + throw new ApiException(400, "Missing required parameter 'campaignId' when calling EmailCampaignsApi->DeleteEmailCampaign"); + + var localVarPath = "/emailCampaigns/{campaignId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (campaignId != null) localVarPathParams.Add("campaignId", this.Configuration.ApiClient.ParameterToString(campaignId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteEmailCampaign", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Export the recipients of a campaign + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Values to send for a recipient export request (optional) + /// CreatedProcessId + public CreatedProcessId EmailExportRecipients (long? campaignId, EmailExportRecipients recipientExport = null) + { + ApiResponse localVarResponse = EmailExportRecipientsWithHttpInfo(campaignId, recipientExport); + return localVarResponse.Data; + } + + /// + /// Export the recipients of a campaign + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Values to send for a recipient export request (optional) + /// ApiResponse of CreatedProcessId + public ApiResponse< CreatedProcessId > EmailExportRecipientsWithHttpInfo (long? campaignId, EmailExportRecipients recipientExport = null) + { + // verify the required parameter 'campaignId' is set + if (campaignId == null) + throw new ApiException(400, "Missing required parameter 'campaignId' when calling EmailCampaignsApi->EmailExportRecipients"); + + var localVarPath = "/emailCampaigns/{campaignId}/exportRecipients"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (campaignId != null) localVarPathParams.Add("campaignId", this.Configuration.ApiClient.ParameterToString(campaignId)); // path parameter + if (recipientExport != null && recipientExport.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(recipientExport); // http body (model) parameter + } + else + { + localVarPostBody = recipientExport; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("EmailExportRecipients", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (CreatedProcessId) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreatedProcessId))); + } + + /// + /// Export the recipients of a campaign + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Values to send for a recipient export request (optional) + /// Task of CreatedProcessId + public async System.Threading.Tasks.Task EmailExportRecipientsAsync (long? campaignId, EmailExportRecipients recipientExport = null) + { + ApiResponse localVarResponse = await EmailExportRecipientsAsyncWithHttpInfo(campaignId, recipientExport); + return localVarResponse.Data; + + } + + /// + /// Export the recipients of a campaign + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Values to send for a recipient export request (optional) + /// Task of ApiResponse (CreatedProcessId) + public async System.Threading.Tasks.Task> EmailExportRecipientsAsyncWithHttpInfo (long? campaignId, EmailExportRecipients recipientExport = null) + { + // verify the required parameter 'campaignId' is set + if (campaignId == null) + throw new ApiException(400, "Missing required parameter 'campaignId' when calling EmailCampaignsApi->EmailExportRecipients"); + + var localVarPath = "/emailCampaigns/{campaignId}/exportRecipients"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (campaignId != null) localVarPathParams.Add("campaignId", this.Configuration.ApiClient.ParameterToString(campaignId)); // path parameter + if (recipientExport != null && recipientExport.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(recipientExport); // http body (model) parameter + } + else + { + localVarPostBody = recipientExport; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("EmailExportRecipients", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (CreatedProcessId) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreatedProcessId))); + } + + /// + /// Get campaign informations + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// GetEmailCampaign + public GetEmailCampaign GetEmailCampaign (long? campaignId) + { + ApiResponse localVarResponse = GetEmailCampaignWithHttpInfo(campaignId); + return localVarResponse.Data; + } + + /// + /// Get campaign informations + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// ApiResponse of GetEmailCampaign + public ApiResponse< GetEmailCampaign > GetEmailCampaignWithHttpInfo (long? campaignId) + { + // verify the required parameter 'campaignId' is set + if (campaignId == null) + throw new ApiException(400, "Missing required parameter 'campaignId' when calling EmailCampaignsApi->GetEmailCampaign"); + + var localVarPath = "/emailCampaigns/{campaignId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (campaignId != null) localVarPathParams.Add("campaignId", this.Configuration.ApiClient.ParameterToString(campaignId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetEmailCampaign", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetEmailCampaign) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetEmailCampaign))); + } + + /// + /// Get campaign informations + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Task of GetEmailCampaign + public async System.Threading.Tasks.Task GetEmailCampaignAsync (long? campaignId) + { + ApiResponse localVarResponse = await GetEmailCampaignAsyncWithHttpInfo(campaignId); + return localVarResponse.Data; + + } + + /// + /// Get campaign informations + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Task of ApiResponse (GetEmailCampaign) + public async System.Threading.Tasks.Task> GetEmailCampaignAsyncWithHttpInfo (long? campaignId) + { + // verify the required parameter 'campaignId' is set + if (campaignId == null) + throw new ApiException(400, "Missing required parameter 'campaignId' when calling EmailCampaignsApi->GetEmailCampaign"); + + var localVarPath = "/emailCampaigns/{campaignId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (campaignId != null) localVarPathParams.Add("campaignId", this.Configuration.ApiClient.ParameterToString(campaignId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetEmailCampaign", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetEmailCampaign) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetEmailCampaign))); + } + + /// + /// Return all your created campaigns + /// + /// Thrown when fails to make API call + /// Filter on the type of the campaigns (optional) + /// Filter on the status of the campaign (optional) + /// Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + /// Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + /// Number of documents per page (optional, default to 500) + /// Index of the first document in the page (optional, default to 0) + /// GetEmailCampaigns + public GetEmailCampaigns GetEmailCampaigns (string type = null, string status = null, DateTime? startDate = null, DateTime? endDate = null, long? limit = null, long? offset = null) + { + ApiResponse localVarResponse = GetEmailCampaignsWithHttpInfo(type, status, startDate, endDate, limit, offset); + return localVarResponse.Data; + } + + /// + /// Return all your created campaigns + /// + /// Thrown when fails to make API call + /// Filter on the type of the campaigns (optional) + /// Filter on the status of the campaign (optional) + /// Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + /// Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + /// Number of documents per page (optional, default to 500) + /// Index of the first document in the page (optional, default to 0) + /// ApiResponse of GetEmailCampaigns + public ApiResponse< GetEmailCampaigns > GetEmailCampaignsWithHttpInfo (string type = null, string status = null, DateTime? startDate = null, DateTime? endDate = null, long? limit = null, long? offset = null) + { + + var localVarPath = "/emailCampaigns"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (type != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "type", type)); // query parameter + if (status != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "status", status)); // query parameter + if (startDate != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "startDate", startDate)); // query parameter + if (endDate != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "endDate", endDate)); // query parameter + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (offset != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetEmailCampaigns", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetEmailCampaigns) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetEmailCampaigns))); + } + + /// + /// Return all your created campaigns + /// + /// Thrown when fails to make API call + /// Filter on the type of the campaigns (optional) + /// Filter on the status of the campaign (optional) + /// Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + /// Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + /// Number of documents per page (optional, default to 500) + /// Index of the first document in the page (optional, default to 0) + /// Task of GetEmailCampaigns + public async System.Threading.Tasks.Task GetEmailCampaignsAsync (string type = null, string status = null, DateTime? startDate = null, DateTime? endDate = null, long? limit = null, long? offset = null) + { + ApiResponse localVarResponse = await GetEmailCampaignsAsyncWithHttpInfo(type, status, startDate, endDate, limit, offset); + return localVarResponse.Data; + + } + + /// + /// Return all your created campaigns + /// + /// Thrown when fails to make API call + /// Filter on the type of the campaigns (optional) + /// Filter on the status of the campaign (optional) + /// Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + /// Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + /// Number of documents per page (optional, default to 500) + /// Index of the first document in the page (optional, default to 0) + /// Task of ApiResponse (GetEmailCampaigns) + public async System.Threading.Tasks.Task> GetEmailCampaignsAsyncWithHttpInfo (string type = null, string status = null, DateTime? startDate = null, DateTime? endDate = null, long? limit = null, long? offset = null) + { + + var localVarPath = "/emailCampaigns"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (type != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "type", type)); // query parameter + if (status != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "status", status)); // query parameter + if (startDate != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "startDate", startDate)); // query parameter + if (endDate != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "endDate", endDate)); // query parameter + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (offset != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetEmailCampaigns", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetEmailCampaigns) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetEmailCampaigns))); + } + + /// + /// Send an email campaign id of the campaign immediately + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// + public void SendEmailCampaignNow (long? campaignId) + { + SendEmailCampaignNowWithHttpInfo(campaignId); + } + + /// + /// Send an email campaign id of the campaign immediately + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// ApiResponse of Object(void) + public ApiResponse SendEmailCampaignNowWithHttpInfo (long? campaignId) + { + // verify the required parameter 'campaignId' is set + if (campaignId == null) + throw new ApiException(400, "Missing required parameter 'campaignId' when calling EmailCampaignsApi->SendEmailCampaignNow"); + + var localVarPath = "/emailCampaigns/{campaignId}/sendNow"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (campaignId != null) localVarPathParams.Add("campaignId", this.Configuration.ApiClient.ParameterToString(campaignId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("SendEmailCampaignNow", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Send an email campaign id of the campaign immediately + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Task of void + public async System.Threading.Tasks.Task SendEmailCampaignNowAsync (long? campaignId) + { + await SendEmailCampaignNowAsyncWithHttpInfo(campaignId); + + } + + /// + /// Send an email campaign id of the campaign immediately + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Task of ApiResponse + public async System.Threading.Tasks.Task> SendEmailCampaignNowAsyncWithHttpInfo (long? campaignId) + { + // verify the required parameter 'campaignId' is set + if (campaignId == null) + throw new ApiException(400, "Missing required parameter 'campaignId' when calling EmailCampaignsApi->SendEmailCampaignNow"); + + var localVarPath = "/emailCampaigns/{campaignId}/sendNow"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (campaignId != null) localVarPathParams.Add("campaignId", this.Configuration.ApiClient.ParameterToString(campaignId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("SendEmailCampaignNow", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Send the report of a campaigns A PDF will be sent to the specified email addresses + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Values for send a report + /// + public void SendReport (long? campaignId, SendReport sendReport) + { + SendReportWithHttpInfo(campaignId, sendReport); + } + + /// + /// Send the report of a campaigns A PDF will be sent to the specified email addresses + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Values for send a report + /// ApiResponse of Object(void) + public ApiResponse SendReportWithHttpInfo (long? campaignId, SendReport sendReport) + { + // verify the required parameter 'campaignId' is set + if (campaignId == null) + throw new ApiException(400, "Missing required parameter 'campaignId' when calling EmailCampaignsApi->SendReport"); + // verify the required parameter 'sendReport' is set + if (sendReport == null) + throw new ApiException(400, "Missing required parameter 'sendReport' when calling EmailCampaignsApi->SendReport"); + + var localVarPath = "/emailCampaigns/{campaignId}/sendReport"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (campaignId != null) localVarPathParams.Add("campaignId", this.Configuration.ApiClient.ParameterToString(campaignId)); // path parameter + if (sendReport != null && sendReport.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(sendReport); // http body (model) parameter + } + else + { + localVarPostBody = sendReport; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("SendReport", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Send the report of a campaigns A PDF will be sent to the specified email addresses + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Values for send a report + /// Task of void + public async System.Threading.Tasks.Task SendReportAsync (long? campaignId, SendReport sendReport) + { + await SendReportAsyncWithHttpInfo(campaignId, sendReport); + + } + + /// + /// Send the report of a campaigns A PDF will be sent to the specified email addresses + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Values for send a report + /// Task of ApiResponse + public async System.Threading.Tasks.Task> SendReportAsyncWithHttpInfo (long? campaignId, SendReport sendReport) + { + // verify the required parameter 'campaignId' is set + if (campaignId == null) + throw new ApiException(400, "Missing required parameter 'campaignId' when calling EmailCampaignsApi->SendReport"); + // verify the required parameter 'sendReport' is set + if (sendReport == null) + throw new ApiException(400, "Missing required parameter 'sendReport' when calling EmailCampaignsApi->SendReport"); + + var localVarPath = "/emailCampaigns/{campaignId}/sendReport"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (campaignId != null) localVarPathParams.Add("campaignId", this.Configuration.ApiClient.ParameterToString(campaignId)); // path parameter + if (sendReport != null && sendReport.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(sendReport); // http body (model) parameter + } + else + { + localVarPostBody = sendReport; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("SendReport", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Send an email campaign to your test list + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// + /// + public void SendTestEmail (long? campaignId, SendTestEmail emailTo) + { + SendTestEmailWithHttpInfo(campaignId, emailTo); + } + + /// + /// Send an email campaign to your test list + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// + /// ApiResponse of Object(void) + public ApiResponse SendTestEmailWithHttpInfo (long? campaignId, SendTestEmail emailTo) + { + // verify the required parameter 'campaignId' is set + if (campaignId == null) + throw new ApiException(400, "Missing required parameter 'campaignId' when calling EmailCampaignsApi->SendTestEmail"); + // verify the required parameter 'emailTo' is set + if (emailTo == null) + throw new ApiException(400, "Missing required parameter 'emailTo' when calling EmailCampaignsApi->SendTestEmail"); + + var localVarPath = "/emailCampaigns/{campaignId}/sendTest"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (campaignId != null) localVarPathParams.Add("campaignId", this.Configuration.ApiClient.ParameterToString(campaignId)); // path parameter + if (emailTo != null && emailTo.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(emailTo); // http body (model) parameter + } + else + { + localVarPostBody = emailTo; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("SendTestEmail", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Send an email campaign to your test list + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// + /// Task of void + public async System.Threading.Tasks.Task SendTestEmailAsync (long? campaignId, SendTestEmail emailTo) + { + await SendTestEmailAsyncWithHttpInfo(campaignId, emailTo); + + } + + /// + /// Send an email campaign to your test list + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// + /// Task of ApiResponse + public async System.Threading.Tasks.Task> SendTestEmailAsyncWithHttpInfo (long? campaignId, SendTestEmail emailTo) + { + // verify the required parameter 'campaignId' is set + if (campaignId == null) + throw new ApiException(400, "Missing required parameter 'campaignId' when calling EmailCampaignsApi->SendTestEmail"); + // verify the required parameter 'emailTo' is set + if (emailTo == null) + throw new ApiException(400, "Missing required parameter 'emailTo' when calling EmailCampaignsApi->SendTestEmail"); + + var localVarPath = "/emailCampaigns/{campaignId}/sendTest"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (campaignId != null) localVarPathParams.Add("campaignId", this.Configuration.ApiClient.ParameterToString(campaignId)); // path parameter + if (emailTo != null && emailTo.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(emailTo); // http body (model) parameter + } + else + { + localVarPostBody = emailTo; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("SendTestEmail", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Update a campaign status + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Status of the campaign + /// + public void UpdateCampaignStatus (long? campaignId, UpdateCampaignStatus status) + { + UpdateCampaignStatusWithHttpInfo(campaignId, status); + } + + /// + /// Update a campaign status + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Status of the campaign + /// ApiResponse of Object(void) + public ApiResponse UpdateCampaignStatusWithHttpInfo (long? campaignId, UpdateCampaignStatus status) + { + // verify the required parameter 'campaignId' is set + if (campaignId == null) + throw new ApiException(400, "Missing required parameter 'campaignId' when calling EmailCampaignsApi->UpdateCampaignStatus"); + // verify the required parameter 'status' is set + if (status == null) + throw new ApiException(400, "Missing required parameter 'status' when calling EmailCampaignsApi->UpdateCampaignStatus"); + + var localVarPath = "/emailCampaigns/{campaignId}/status"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (campaignId != null) localVarPathParams.Add("campaignId", this.Configuration.ApiClient.ParameterToString(campaignId)); // path parameter + if (status != null && status.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(status); // http body (model) parameter + } + else + { + localVarPostBody = status; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateCampaignStatus", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Update a campaign status + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Status of the campaign + /// Task of void + public async System.Threading.Tasks.Task UpdateCampaignStatusAsync (long? campaignId, UpdateCampaignStatus status) + { + await UpdateCampaignStatusAsyncWithHttpInfo(campaignId, status); + + } + + /// + /// Update a campaign status + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Status of the campaign + /// Task of ApiResponse + public async System.Threading.Tasks.Task> UpdateCampaignStatusAsyncWithHttpInfo (long? campaignId, UpdateCampaignStatus status) + { + // verify the required parameter 'campaignId' is set + if (campaignId == null) + throw new ApiException(400, "Missing required parameter 'campaignId' when calling EmailCampaignsApi->UpdateCampaignStatus"); + // verify the required parameter 'status' is set + if (status == null) + throw new ApiException(400, "Missing required parameter 'status' when calling EmailCampaignsApi->UpdateCampaignStatus"); + + var localVarPath = "/emailCampaigns/{campaignId}/status"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (campaignId != null) localVarPathParams.Add("campaignId", this.Configuration.ApiClient.ParameterToString(campaignId)); // path parameter + if (status != null && status.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(status); // http body (model) parameter + } + else + { + localVarPostBody = status; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateCampaignStatus", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Update a campaign + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Values to update a campaign + /// + public void UpdateEmailCampaign (long? campaignId, UpdateEmailCampaign emailCampaign) + { + UpdateEmailCampaignWithHttpInfo(campaignId, emailCampaign); + } + + /// + /// Update a campaign + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Values to update a campaign + /// ApiResponse of Object(void) + public ApiResponse UpdateEmailCampaignWithHttpInfo (long? campaignId, UpdateEmailCampaign emailCampaign) + { + // verify the required parameter 'campaignId' is set + if (campaignId == null) + throw new ApiException(400, "Missing required parameter 'campaignId' when calling EmailCampaignsApi->UpdateEmailCampaign"); + // verify the required parameter 'emailCampaign' is set + if (emailCampaign == null) + throw new ApiException(400, "Missing required parameter 'emailCampaign' when calling EmailCampaignsApi->UpdateEmailCampaign"); + + var localVarPath = "/emailCampaigns/{campaignId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (campaignId != null) localVarPathParams.Add("campaignId", this.Configuration.ApiClient.ParameterToString(campaignId)); // path parameter + if (emailCampaign != null && emailCampaign.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(emailCampaign); // http body (model) parameter + } + else + { + localVarPostBody = emailCampaign; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateEmailCampaign", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Update a campaign + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Values to update a campaign + /// Task of void + public async System.Threading.Tasks.Task UpdateEmailCampaignAsync (long? campaignId, UpdateEmailCampaign emailCampaign) + { + await UpdateEmailCampaignAsyncWithHttpInfo(campaignId, emailCampaign); + + } + + /// + /// Update a campaign + /// + /// Thrown when fails to make API call + /// Id of the campaign + /// Values to update a campaign + /// Task of ApiResponse + public async System.Threading.Tasks.Task> UpdateEmailCampaignAsyncWithHttpInfo (long? campaignId, UpdateEmailCampaign emailCampaign) + { + // verify the required parameter 'campaignId' is set + if (campaignId == null) + throw new ApiException(400, "Missing required parameter 'campaignId' when calling EmailCampaignsApi->UpdateEmailCampaign"); + // verify the required parameter 'emailCampaign' is set + if (emailCampaign == null) + throw new ApiException(400, "Missing required parameter 'emailCampaign' when calling EmailCampaignsApi->UpdateEmailCampaign"); + + var localVarPath = "/emailCampaigns/{campaignId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (campaignId != null) localVarPathParams.Add("campaignId", this.Configuration.ApiClient.ParameterToString(campaignId)); // path parameter + if (emailCampaign != null && emailCampaign.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(emailCampaign); // http body (model) parameter + } + else + { + localVarPostBody = emailCampaign; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateEmailCampaign", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + } +} diff --git a/src/sib_api_v3_sdk/Api/FoldersApi.cs b/src/sib_api_v3_sdk/Api/FoldersApi.cs new file mode 100644 index 0000000..8755d0e --- /dev/null +++ b/src/sib_api_v3_sdk/Api/FoldersApi.cs @@ -0,0 +1,1388 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using RestSharp; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace sib_api_v3_sdk.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IFoldersApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Create a folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Name of the folder + /// CreateModel + CreateModel CreateFolder (CreateUpdateFolder createFolder); + + /// + /// Create a folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Name of the folder + /// ApiResponse of CreateModel + ApiResponse CreateFolderWithHttpInfo (CreateUpdateFolder createFolder); + /// + /// Delete a folder (and all its lists) + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the folder + /// + void DeleteFolder (long? folderId); + + /// + /// Delete a folder (and all its lists) + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the folder + /// ApiResponse of Object(void) + ApiResponse DeleteFolderWithHttpInfo (long? folderId); + /// + /// Returns folder details + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the folder + /// GetFolder + GetFolder GetFolder (long? folderId); + + /// + /// Returns folder details + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the folder + /// ApiResponse of GetFolder + ApiResponse GetFolderWithHttpInfo (long? folderId); + /// + /// Get the lists in a folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// GetFolderLists + GetFolderLists GetFolderLists (long? folderId, long? limit = null, long? offset = null); + + /// + /// Get the lists in a folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// ApiResponse of GetFolderLists + ApiResponse GetFolderListsWithHttpInfo (long? folderId, long? limit = null, long? offset = null); + /// + /// Get all the folders + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number of documents per page + /// Index of the first document of the page + /// GetFolders + GetFolders GetFolders (long? limit, long? offset); + + /// + /// Get all the folders + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number of documents per page + /// Index of the first document of the page + /// ApiResponse of GetFolders + ApiResponse GetFoldersWithHttpInfo (long? limit, long? offset); + /// + /// Update a contact folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Name of the folder + /// + void UpdateFolder (long? folderId, CreateUpdateFolder updateFolder); + + /// + /// Update a contact folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Name of the folder + /// ApiResponse of Object(void) + ApiResponse UpdateFolderWithHttpInfo (long? folderId, CreateUpdateFolder updateFolder); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Create a folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Name of the folder + /// Task of CreateModel + System.Threading.Tasks.Task CreateFolderAsync (CreateUpdateFolder createFolder); + + /// + /// Create a folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Name of the folder + /// Task of ApiResponse (CreateModel) + System.Threading.Tasks.Task> CreateFolderAsyncWithHttpInfo (CreateUpdateFolder createFolder); + /// + /// Delete a folder (and all its lists) + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Task of void + System.Threading.Tasks.Task DeleteFolderAsync (long? folderId); + + /// + /// Delete a folder (and all its lists) + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteFolderAsyncWithHttpInfo (long? folderId); + /// + /// Returns folder details + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the folder + /// Task of GetFolder + System.Threading.Tasks.Task GetFolderAsync (long? folderId); + + /// + /// Returns folder details + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the folder + /// Task of ApiResponse (GetFolder) + System.Threading.Tasks.Task> GetFolderAsyncWithHttpInfo (long? folderId); + /// + /// Get the lists in a folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// Task of GetFolderLists + System.Threading.Tasks.Task GetFolderListsAsync (long? folderId, long? limit = null, long? offset = null); + + /// + /// Get the lists in a folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// Task of ApiResponse (GetFolderLists) + System.Threading.Tasks.Task> GetFolderListsAsyncWithHttpInfo (long? folderId, long? limit = null, long? offset = null); + /// + /// Get all the folders + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number of documents per page + /// Index of the first document of the page + /// Task of GetFolders + System.Threading.Tasks.Task GetFoldersAsync (long? limit, long? offset); + + /// + /// Get all the folders + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number of documents per page + /// Index of the first document of the page + /// Task of ApiResponse (GetFolders) + System.Threading.Tasks.Task> GetFoldersAsyncWithHttpInfo (long? limit, long? offset); + /// + /// Update a contact folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Name of the folder + /// Task of void + System.Threading.Tasks.Task UpdateFolderAsync (long? folderId, CreateUpdateFolder updateFolder); + + /// + /// Update a contact folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Name of the folder + /// Task of ApiResponse + System.Threading.Tasks.Task> UpdateFolderAsyncWithHttpInfo (long? folderId, CreateUpdateFolder updateFolder); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class FoldersApi : IFoldersApi + { + private sib_api_v3_sdk.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public FoldersApi(String basePath) + { + this.Configuration = new sib_api_v3_sdk.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = sib_api_v3_sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public FoldersApi(sib_api_v3_sdk.Client.Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = sib_api_v3_sdk.Client.Configuration.Default; + else + this.Configuration = configuration; + + ExceptionFactory = sib_api_v3_sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + + /// + /// Sets the base path of the API client. + /// + /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] + public void SetBasePath(String basePath) + { + // do nothing + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public sib_api_v3_sdk.Client.Configuration Configuration {get; set;} + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public sib_api_v3_sdk.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public IDictionary DefaultHeader() + { + return new ReadOnlyDictionary(this.Configuration.DefaultHeader); + } + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + + /// + /// Create a folder + /// + /// Thrown when fails to make API call + /// Name of the folder + /// CreateModel + public CreateModel CreateFolder (CreateUpdateFolder createFolder) + { + ApiResponse localVarResponse = CreateFolderWithHttpInfo(createFolder); + return localVarResponse.Data; + } + + /// + /// Create a folder + /// + /// Thrown when fails to make API call + /// Name of the folder + /// ApiResponse of CreateModel + public ApiResponse< CreateModel > CreateFolderWithHttpInfo (CreateUpdateFolder createFolder) + { + // verify the required parameter 'createFolder' is set + if (createFolder == null) + throw new ApiException(400, "Missing required parameter 'createFolder' when calling FoldersApi->CreateFolder"); + + var localVarPath = "/contacts/folders"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (createFolder != null && createFolder.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(createFolder); // http body (model) parameter + } + else + { + localVarPostBody = createFolder; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateFolder", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (CreateModel) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateModel))); + } + + /// + /// Create a folder + /// + /// Thrown when fails to make API call + /// Name of the folder + /// Task of CreateModel + public async System.Threading.Tasks.Task CreateFolderAsync (CreateUpdateFolder createFolder) + { + ApiResponse localVarResponse = await CreateFolderAsyncWithHttpInfo(createFolder); + return localVarResponse.Data; + + } + + /// + /// Create a folder + /// + /// Thrown when fails to make API call + /// Name of the folder + /// Task of ApiResponse (CreateModel) + public async System.Threading.Tasks.Task> CreateFolderAsyncWithHttpInfo (CreateUpdateFolder createFolder) + { + // verify the required parameter 'createFolder' is set + if (createFolder == null) + throw new ApiException(400, "Missing required parameter 'createFolder' when calling FoldersApi->CreateFolder"); + + var localVarPath = "/contacts/folders"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (createFolder != null && createFolder.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(createFolder); // http body (model) parameter + } + else + { + localVarPostBody = createFolder; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateFolder", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (CreateModel) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateModel))); + } + + /// + /// Delete a folder (and all its lists) + /// + /// Thrown when fails to make API call + /// Id of the folder + /// + public void DeleteFolder (long? folderId) + { + DeleteFolderWithHttpInfo(folderId); + } + + /// + /// Delete a folder (and all its lists) + /// + /// Thrown when fails to make API call + /// Id of the folder + /// ApiResponse of Object(void) + public ApiResponse DeleteFolderWithHttpInfo (long? folderId) + { + // verify the required parameter 'folderId' is set + if (folderId == null) + throw new ApiException(400, "Missing required parameter 'folderId' when calling FoldersApi->DeleteFolder"); + + var localVarPath = "/contacts/folders/{folderId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (folderId != null) localVarPathParams.Add("folderId", this.Configuration.ApiClient.ParameterToString(folderId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteFolder", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Delete a folder (and all its lists) + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Task of void + public async System.Threading.Tasks.Task DeleteFolderAsync (long? folderId) + { + await DeleteFolderAsyncWithHttpInfo(folderId); + + } + + /// + /// Delete a folder (and all its lists) + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteFolderAsyncWithHttpInfo (long? folderId) + { + // verify the required parameter 'folderId' is set + if (folderId == null) + throw new ApiException(400, "Missing required parameter 'folderId' when calling FoldersApi->DeleteFolder"); + + var localVarPath = "/contacts/folders/{folderId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (folderId != null) localVarPathParams.Add("folderId", this.Configuration.ApiClient.ParameterToString(folderId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteFolder", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Returns folder details + /// + /// Thrown when fails to make API call + /// id of the folder + /// GetFolder + public GetFolder GetFolder (long? folderId) + { + ApiResponse localVarResponse = GetFolderWithHttpInfo(folderId); + return localVarResponse.Data; + } + + /// + /// Returns folder details + /// + /// Thrown when fails to make API call + /// id of the folder + /// ApiResponse of GetFolder + public ApiResponse< GetFolder > GetFolderWithHttpInfo (long? folderId) + { + // verify the required parameter 'folderId' is set + if (folderId == null) + throw new ApiException(400, "Missing required parameter 'folderId' when calling FoldersApi->GetFolder"); + + var localVarPath = "/contacts/folders/{folderId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (folderId != null) localVarPathParams.Add("folderId", this.Configuration.ApiClient.ParameterToString(folderId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetFolder", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetFolder) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetFolder))); + } + + /// + /// Returns folder details + /// + /// Thrown when fails to make API call + /// id of the folder + /// Task of GetFolder + public async System.Threading.Tasks.Task GetFolderAsync (long? folderId) + { + ApiResponse localVarResponse = await GetFolderAsyncWithHttpInfo(folderId); + return localVarResponse.Data; + + } + + /// + /// Returns folder details + /// + /// Thrown when fails to make API call + /// id of the folder + /// Task of ApiResponse (GetFolder) + public async System.Threading.Tasks.Task> GetFolderAsyncWithHttpInfo (long? folderId) + { + // verify the required parameter 'folderId' is set + if (folderId == null) + throw new ApiException(400, "Missing required parameter 'folderId' when calling FoldersApi->GetFolder"); + + var localVarPath = "/contacts/folders/{folderId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (folderId != null) localVarPathParams.Add("folderId", this.Configuration.ApiClient.ParameterToString(folderId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetFolder", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetFolder) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetFolder))); + } + + /// + /// Get the lists in a folder + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// GetFolderLists + public GetFolderLists GetFolderLists (long? folderId, long? limit = null, long? offset = null) + { + ApiResponse localVarResponse = GetFolderListsWithHttpInfo(folderId, limit, offset); + return localVarResponse.Data; + } + + /// + /// Get the lists in a folder + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// ApiResponse of GetFolderLists + public ApiResponse< GetFolderLists > GetFolderListsWithHttpInfo (long? folderId, long? limit = null, long? offset = null) + { + // verify the required parameter 'folderId' is set + if (folderId == null) + throw new ApiException(400, "Missing required parameter 'folderId' when calling FoldersApi->GetFolderLists"); + + var localVarPath = "/contacts/folders/{folderId}/lists"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (folderId != null) localVarPathParams.Add("folderId", this.Configuration.ApiClient.ParameterToString(folderId)); // path parameter + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (offset != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetFolderLists", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetFolderLists) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetFolderLists))); + } + + /// + /// Get the lists in a folder + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// Task of GetFolderLists + public async System.Threading.Tasks.Task GetFolderListsAsync (long? folderId, long? limit = null, long? offset = null) + { + ApiResponse localVarResponse = await GetFolderListsAsyncWithHttpInfo(folderId, limit, offset); + return localVarResponse.Data; + + } + + /// + /// Get the lists in a folder + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// Task of ApiResponse (GetFolderLists) + public async System.Threading.Tasks.Task> GetFolderListsAsyncWithHttpInfo (long? folderId, long? limit = null, long? offset = null) + { + // verify the required parameter 'folderId' is set + if (folderId == null) + throw new ApiException(400, "Missing required parameter 'folderId' when calling FoldersApi->GetFolderLists"); + + var localVarPath = "/contacts/folders/{folderId}/lists"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (folderId != null) localVarPathParams.Add("folderId", this.Configuration.ApiClient.ParameterToString(folderId)); // path parameter + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (offset != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetFolderLists", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetFolderLists) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetFolderLists))); + } + + /// + /// Get all the folders + /// + /// Thrown when fails to make API call + /// Number of documents per page + /// Index of the first document of the page + /// GetFolders + public GetFolders GetFolders (long? limit, long? offset) + { + ApiResponse localVarResponse = GetFoldersWithHttpInfo(limit, offset); + return localVarResponse.Data; + } + + /// + /// Get all the folders + /// + /// Thrown when fails to make API call + /// Number of documents per page + /// Index of the first document of the page + /// ApiResponse of GetFolders + public ApiResponse< GetFolders > GetFoldersWithHttpInfo (long? limit, long? offset) + { + // verify the required parameter 'limit' is set + if (limit == null) + throw new ApiException(400, "Missing required parameter 'limit' when calling FoldersApi->GetFolders"); + // verify the required parameter 'offset' is set + if (offset == null) + throw new ApiException(400, "Missing required parameter 'offset' when calling FoldersApi->GetFolders"); + + var localVarPath = "/contacts/folders"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (offset != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetFolders", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetFolders) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetFolders))); + } + + /// + /// Get all the folders + /// + /// Thrown when fails to make API call + /// Number of documents per page + /// Index of the first document of the page + /// Task of GetFolders + public async System.Threading.Tasks.Task GetFoldersAsync (long? limit, long? offset) + { + ApiResponse localVarResponse = await GetFoldersAsyncWithHttpInfo(limit, offset); + return localVarResponse.Data; + + } + + /// + /// Get all the folders + /// + /// Thrown when fails to make API call + /// Number of documents per page + /// Index of the first document of the page + /// Task of ApiResponse (GetFolders) + public async System.Threading.Tasks.Task> GetFoldersAsyncWithHttpInfo (long? limit, long? offset) + { + // verify the required parameter 'limit' is set + if (limit == null) + throw new ApiException(400, "Missing required parameter 'limit' when calling FoldersApi->GetFolders"); + // verify the required parameter 'offset' is set + if (offset == null) + throw new ApiException(400, "Missing required parameter 'offset' when calling FoldersApi->GetFolders"); + + var localVarPath = "/contacts/folders"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (offset != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetFolders", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetFolders) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetFolders))); + } + + /// + /// Update a contact folder + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Name of the folder + /// + public void UpdateFolder (long? folderId, CreateUpdateFolder updateFolder) + { + UpdateFolderWithHttpInfo(folderId, updateFolder); + } + + /// + /// Update a contact folder + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Name of the folder + /// ApiResponse of Object(void) + public ApiResponse UpdateFolderWithHttpInfo (long? folderId, CreateUpdateFolder updateFolder) + { + // verify the required parameter 'folderId' is set + if (folderId == null) + throw new ApiException(400, "Missing required parameter 'folderId' when calling FoldersApi->UpdateFolder"); + // verify the required parameter 'updateFolder' is set + if (updateFolder == null) + throw new ApiException(400, "Missing required parameter 'updateFolder' when calling FoldersApi->UpdateFolder"); + + var localVarPath = "/contacts/folders/{folderId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (folderId != null) localVarPathParams.Add("folderId", this.Configuration.ApiClient.ParameterToString(folderId)); // path parameter + if (updateFolder != null && updateFolder.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(updateFolder); // http body (model) parameter + } + else + { + localVarPostBody = updateFolder; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateFolder", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Update a contact folder + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Name of the folder + /// Task of void + public async System.Threading.Tasks.Task UpdateFolderAsync (long? folderId, CreateUpdateFolder updateFolder) + { + await UpdateFolderAsyncWithHttpInfo(folderId, updateFolder); + + } + + /// + /// Update a contact folder + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Name of the folder + /// Task of ApiResponse + public async System.Threading.Tasks.Task> UpdateFolderAsyncWithHttpInfo (long? folderId, CreateUpdateFolder updateFolder) + { + // verify the required parameter 'folderId' is set + if (folderId == null) + throw new ApiException(400, "Missing required parameter 'folderId' when calling FoldersApi->UpdateFolder"); + // verify the required parameter 'updateFolder' is set + if (updateFolder == null) + throw new ApiException(400, "Missing required parameter 'updateFolder' when calling FoldersApi->UpdateFolder"); + + var localVarPath = "/contacts/folders/{folderId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (folderId != null) localVarPathParams.Add("folderId", this.Configuration.ApiClient.ParameterToString(folderId)); // path parameter + if (updateFolder != null && updateFolder.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(updateFolder); // http body (model) parameter + } + else + { + localVarPostBody = updateFolder; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateFolder", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + } +} diff --git a/src/sib_api_v3_sdk/Api/ListsApi.cs b/src/sib_api_v3_sdk/Api/ListsApi.cs new file mode 100644 index 0000000..52a614b --- /dev/null +++ b/src/sib_api_v3_sdk/Api/ListsApi.cs @@ -0,0 +1,2057 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using RestSharp; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace sib_api_v3_sdk.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IListsApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Add existing contacts to a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// Emails addresses of the contacts + /// PostContactInfo + PostContactInfo AddContactToList (long? listId, AddContactToList contactEmails); + + /// + /// Add existing contacts to a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// Emails addresses of the contacts + /// ApiResponse of PostContactInfo + ApiResponse AddContactToListWithHttpInfo (long? listId, AddContactToList contactEmails); + /// + /// Create a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Values to create a list + /// CreateModel + CreateModel CreateList (CreateList createList); + + /// + /// Create a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Values to create a list + /// ApiResponse of CreateModel + ApiResponse CreateListWithHttpInfo (CreateList createList); + /// + /// Delete a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// + void DeleteList (long? listId); + + /// + /// Delete a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// ApiResponse of Object(void) + ApiResponse DeleteListWithHttpInfo (long? listId); + /// + /// Get the contacts in a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// 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) + /// Number of documents per page (optional, default to 50) + /// Index of the first document of the page (optional, default to 0) + /// GetContacts + GetContacts GetContactsFromList (long? listId, DateTime? modifiedSince = null, long? limit = null, long? offset = null); + + /// + /// Get the contacts in a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// 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) + /// Number of documents per page (optional, default to 50) + /// Index of the first document of the page (optional, default to 0) + /// ApiResponse of GetContacts + ApiResponse GetContactsFromListWithHttpInfo (long? listId, DateTime? modifiedSince = null, long? limit = null, long? offset = null); + /// + /// Get the lists in a folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// GetFolderLists + GetFolderLists GetFolderLists (long? folderId, long? limit = null, long? offset = null); + + /// + /// Get the lists in a folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// ApiResponse of GetFolderLists + ApiResponse GetFolderListsWithHttpInfo (long? folderId, long? limit = null, long? offset = null); + /// + /// Get the details of a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// GetExtendedList + GetExtendedList GetList (long? listId); + + /// + /// Get the details of a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// ApiResponse of GetExtendedList + ApiResponse GetListWithHttpInfo (long? listId); + /// + /// Get all the lists + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// GetLists + GetLists GetLists (long? limit = null, long? offset = null); + + /// + /// Get all the lists + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// ApiResponse of GetLists + ApiResponse GetListsWithHttpInfo (long? limit = null, long? offset = null); + /// + /// Remove existing contacts from a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// Emails adresses of the contact + /// PostContactInfo + PostContactInfo RemoveContactFromList (long? listId, RemoveContactFromList contactEmails); + + /// + /// Remove existing contacts from a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// Emails adresses of the contact + /// ApiResponse of PostContactInfo + ApiResponse RemoveContactFromListWithHttpInfo (long? listId, RemoveContactFromList contactEmails); + /// + /// Update a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// Values to update a list + /// + void UpdateList (long? listId, UpdateList updateList); + + /// + /// Update a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// Values to update a list + /// ApiResponse of Object(void) + ApiResponse UpdateListWithHttpInfo (long? listId, UpdateList updateList); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Add existing contacts to a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// Emails addresses of the contacts + /// Task of PostContactInfo + System.Threading.Tasks.Task AddContactToListAsync (long? listId, AddContactToList contactEmails); + + /// + /// Add existing contacts to a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// Emails addresses of the contacts + /// Task of ApiResponse (PostContactInfo) + System.Threading.Tasks.Task> AddContactToListAsyncWithHttpInfo (long? listId, AddContactToList contactEmails); + /// + /// Create a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Values to create a list + /// Task of CreateModel + System.Threading.Tasks.Task CreateListAsync (CreateList createList); + + /// + /// Create a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Values to create a list + /// Task of ApiResponse (CreateModel) + System.Threading.Tasks.Task> CreateListAsyncWithHttpInfo (CreateList createList); + /// + /// Delete a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// Task of void + System.Threading.Tasks.Task DeleteListAsync (long? listId); + + /// + /// Delete a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteListAsyncWithHttpInfo (long? listId); + /// + /// Get the contacts in a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// 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) + /// Number of documents per page (optional, default to 50) + /// Index of the first document of the page (optional, default to 0) + /// Task of GetContacts + System.Threading.Tasks.Task GetContactsFromListAsync (long? listId, DateTime? modifiedSince = null, long? limit = null, long? offset = null); + + /// + /// Get the contacts in a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// 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) + /// Number of documents per page (optional, default to 50) + /// Index of the first document of the page (optional, default to 0) + /// Task of ApiResponse (GetContacts) + System.Threading.Tasks.Task> GetContactsFromListAsyncWithHttpInfo (long? listId, DateTime? modifiedSince = null, long? limit = null, long? offset = null); + /// + /// Get the lists in a folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// Task of GetFolderLists + System.Threading.Tasks.Task GetFolderListsAsync (long? folderId, long? limit = null, long? offset = null); + + /// + /// Get the lists in a folder + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// Task of ApiResponse (GetFolderLists) + System.Threading.Tasks.Task> GetFolderListsAsyncWithHttpInfo (long? folderId, long? limit = null, long? offset = null); + /// + /// Get the details of a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// Task of GetExtendedList + System.Threading.Tasks.Task GetListAsync (long? listId); + + /// + /// Get the details of a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// Task of ApiResponse (GetExtendedList) + System.Threading.Tasks.Task> GetListAsyncWithHttpInfo (long? listId); + /// + /// Get all the lists + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// Task of GetLists + System.Threading.Tasks.Task GetListsAsync (long? limit = null, long? offset = null); + + /// + /// Get all the lists + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// Task of ApiResponse (GetLists) + System.Threading.Tasks.Task> GetListsAsyncWithHttpInfo (long? limit = null, long? offset = null); + /// + /// Remove existing contacts from a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// Emails adresses of the contact + /// Task of PostContactInfo + System.Threading.Tasks.Task RemoveContactFromListAsync (long? listId, RemoveContactFromList contactEmails); + + /// + /// Remove existing contacts from a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// Emails adresses of the contact + /// Task of ApiResponse (PostContactInfo) + System.Threading.Tasks.Task> RemoveContactFromListAsyncWithHttpInfo (long? listId, RemoveContactFromList contactEmails); + /// + /// Update a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// Values to update a list + /// Task of void + System.Threading.Tasks.Task UpdateListAsync (long? listId, UpdateList updateList); + + /// + /// Update a list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the list + /// Values to update a list + /// Task of ApiResponse + System.Threading.Tasks.Task> UpdateListAsyncWithHttpInfo (long? listId, UpdateList updateList); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class ListsApi : IListsApi + { + private sib_api_v3_sdk.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public ListsApi(String basePath) + { + this.Configuration = new sib_api_v3_sdk.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = sib_api_v3_sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public ListsApi(sib_api_v3_sdk.Client.Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = sib_api_v3_sdk.Client.Configuration.Default; + else + this.Configuration = configuration; + + ExceptionFactory = sib_api_v3_sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + + /// + /// Sets the base path of the API client. + /// + /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] + public void SetBasePath(String basePath) + { + // do nothing + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public sib_api_v3_sdk.Client.Configuration Configuration {get; set;} + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public sib_api_v3_sdk.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public IDictionary DefaultHeader() + { + return new ReadOnlyDictionary(this.Configuration.DefaultHeader); + } + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + + /// + /// Add existing contacts to a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// Emails addresses of the contacts + /// PostContactInfo + public PostContactInfo AddContactToList (long? listId, AddContactToList contactEmails) + { + ApiResponse localVarResponse = AddContactToListWithHttpInfo(listId, contactEmails); + return localVarResponse.Data; + } + + /// + /// Add existing contacts to a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// Emails addresses of the contacts + /// ApiResponse of PostContactInfo + public ApiResponse< PostContactInfo > AddContactToListWithHttpInfo (long? listId, AddContactToList contactEmails) + { + // verify the required parameter 'listId' is set + if (listId == null) + throw new ApiException(400, "Missing required parameter 'listId' when calling ListsApi->AddContactToList"); + // verify the required parameter 'contactEmails' is set + if (contactEmails == null) + throw new ApiException(400, "Missing required parameter 'contactEmails' when calling ListsApi->AddContactToList"); + + var localVarPath = "/contacts/lists/{listId}/contacts/add"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (listId != null) localVarPathParams.Add("listId", this.Configuration.ApiClient.ParameterToString(listId)); // path parameter + if (contactEmails != null && contactEmails.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(contactEmails); // http body (model) parameter + } + else + { + localVarPostBody = contactEmails; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("AddContactToList", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (PostContactInfo) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostContactInfo))); + } + + /// + /// Add existing contacts to a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// Emails addresses of the contacts + /// Task of PostContactInfo + public async System.Threading.Tasks.Task AddContactToListAsync (long? listId, AddContactToList contactEmails) + { + ApiResponse localVarResponse = await AddContactToListAsyncWithHttpInfo(listId, contactEmails); + return localVarResponse.Data; + + } + + /// + /// Add existing contacts to a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// Emails addresses of the contacts + /// Task of ApiResponse (PostContactInfo) + public async System.Threading.Tasks.Task> AddContactToListAsyncWithHttpInfo (long? listId, AddContactToList contactEmails) + { + // verify the required parameter 'listId' is set + if (listId == null) + throw new ApiException(400, "Missing required parameter 'listId' when calling ListsApi->AddContactToList"); + // verify the required parameter 'contactEmails' is set + if (contactEmails == null) + throw new ApiException(400, "Missing required parameter 'contactEmails' when calling ListsApi->AddContactToList"); + + var localVarPath = "/contacts/lists/{listId}/contacts/add"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (listId != null) localVarPathParams.Add("listId", this.Configuration.ApiClient.ParameterToString(listId)); // path parameter + if (contactEmails != null && contactEmails.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(contactEmails); // http body (model) parameter + } + else + { + localVarPostBody = contactEmails; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("AddContactToList", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (PostContactInfo) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostContactInfo))); + } + + /// + /// Create a list + /// + /// Thrown when fails to make API call + /// Values to create a list + /// CreateModel + public CreateModel CreateList (CreateList createList) + { + ApiResponse localVarResponse = CreateListWithHttpInfo(createList); + return localVarResponse.Data; + } + + /// + /// Create a list + /// + /// Thrown when fails to make API call + /// Values to create a list + /// ApiResponse of CreateModel + public ApiResponse< CreateModel > CreateListWithHttpInfo (CreateList createList) + { + // verify the required parameter 'createList' is set + if (createList == null) + throw new ApiException(400, "Missing required parameter 'createList' when calling ListsApi->CreateList"); + + var localVarPath = "/contacts/lists"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (createList != null && createList.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(createList); // http body (model) parameter + } + else + { + localVarPostBody = createList; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateList", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (CreateModel) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateModel))); + } + + /// + /// Create a list + /// + /// Thrown when fails to make API call + /// Values to create a list + /// Task of CreateModel + public async System.Threading.Tasks.Task CreateListAsync (CreateList createList) + { + ApiResponse localVarResponse = await CreateListAsyncWithHttpInfo(createList); + return localVarResponse.Data; + + } + + /// + /// Create a list + /// + /// Thrown when fails to make API call + /// Values to create a list + /// Task of ApiResponse (CreateModel) + public async System.Threading.Tasks.Task> CreateListAsyncWithHttpInfo (CreateList createList) + { + // verify the required parameter 'createList' is set + if (createList == null) + throw new ApiException(400, "Missing required parameter 'createList' when calling ListsApi->CreateList"); + + var localVarPath = "/contacts/lists"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (createList != null && createList.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(createList); // http body (model) parameter + } + else + { + localVarPostBody = createList; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateList", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (CreateModel) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateModel))); + } + + /// + /// Delete a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// + public void DeleteList (long? listId) + { + DeleteListWithHttpInfo(listId); + } + + /// + /// Delete a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// ApiResponse of Object(void) + public ApiResponse DeleteListWithHttpInfo (long? listId) + { + // verify the required parameter 'listId' is set + if (listId == null) + throw new ApiException(400, "Missing required parameter 'listId' when calling ListsApi->DeleteList"); + + var localVarPath = "/contacts/lists/{listId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (listId != null) localVarPathParams.Add("listId", this.Configuration.ApiClient.ParameterToString(listId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteList", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Delete a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// Task of void + public async System.Threading.Tasks.Task DeleteListAsync (long? listId) + { + await DeleteListAsyncWithHttpInfo(listId); + + } + + /// + /// Delete a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteListAsyncWithHttpInfo (long? listId) + { + // verify the required parameter 'listId' is set + if (listId == null) + throw new ApiException(400, "Missing required parameter 'listId' when calling ListsApi->DeleteList"); + + var localVarPath = "/contacts/lists/{listId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (listId != null) localVarPathParams.Add("listId", this.Configuration.ApiClient.ParameterToString(listId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteList", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Get the contacts in a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// 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) + /// Number of documents per page (optional, default to 50) + /// Index of the first document of the page (optional, default to 0) + /// GetContacts + public GetContacts GetContactsFromList (long? listId, DateTime? modifiedSince = null, long? limit = null, long? offset = null) + { + ApiResponse localVarResponse = GetContactsFromListWithHttpInfo(listId, modifiedSince, limit, offset); + return localVarResponse.Data; + } + + /// + /// Get the contacts in a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// 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) + /// Number of documents per page (optional, default to 50) + /// Index of the first document of the page (optional, default to 0) + /// ApiResponse of GetContacts + public ApiResponse< GetContacts > GetContactsFromListWithHttpInfo (long? listId, DateTime? modifiedSince = null, long? limit = null, long? offset = null) + { + // verify the required parameter 'listId' is set + if (listId == null) + throw new ApiException(400, "Missing required parameter 'listId' when calling ListsApi->GetContactsFromList"); + + var localVarPath = "/contacts/lists/{listId}/contacts"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (listId != null) localVarPathParams.Add("listId", this.Configuration.ApiClient.ParameterToString(listId)); // path parameter + if (modifiedSince != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "modifiedSince", modifiedSince)); // query parameter + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (offset != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetContactsFromList", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetContacts) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetContacts))); + } + + /// + /// Get the contacts in a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// 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) + /// Number of documents per page (optional, default to 50) + /// Index of the first document of the page (optional, default to 0) + /// Task of GetContacts + public async System.Threading.Tasks.Task GetContactsFromListAsync (long? listId, DateTime? modifiedSince = null, long? limit = null, long? offset = null) + { + ApiResponse localVarResponse = await GetContactsFromListAsyncWithHttpInfo(listId, modifiedSince, limit, offset); + return localVarResponse.Data; + + } + + /// + /// Get the contacts in a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// 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) + /// Number of documents per page (optional, default to 50) + /// Index of the first document of the page (optional, default to 0) + /// Task of ApiResponse (GetContacts) + public async System.Threading.Tasks.Task> GetContactsFromListAsyncWithHttpInfo (long? listId, DateTime? modifiedSince = null, long? limit = null, long? offset = null) + { + // verify the required parameter 'listId' is set + if (listId == null) + throw new ApiException(400, "Missing required parameter 'listId' when calling ListsApi->GetContactsFromList"); + + var localVarPath = "/contacts/lists/{listId}/contacts"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (listId != null) localVarPathParams.Add("listId", this.Configuration.ApiClient.ParameterToString(listId)); // path parameter + if (modifiedSince != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "modifiedSince", modifiedSince)); // query parameter + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (offset != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetContactsFromList", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetContacts) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetContacts))); + } + + /// + /// Get the lists in a folder + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// GetFolderLists + public GetFolderLists GetFolderLists (long? folderId, long? limit = null, long? offset = null) + { + ApiResponse localVarResponse = GetFolderListsWithHttpInfo(folderId, limit, offset); + return localVarResponse.Data; + } + + /// + /// Get the lists in a folder + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// ApiResponse of GetFolderLists + public ApiResponse< GetFolderLists > GetFolderListsWithHttpInfo (long? folderId, long? limit = null, long? offset = null) + { + // verify the required parameter 'folderId' is set + if (folderId == null) + throw new ApiException(400, "Missing required parameter 'folderId' when calling ListsApi->GetFolderLists"); + + var localVarPath = "/contacts/folders/{folderId}/lists"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (folderId != null) localVarPathParams.Add("folderId", this.Configuration.ApiClient.ParameterToString(folderId)); // path parameter + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (offset != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetFolderLists", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetFolderLists) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetFolderLists))); + } + + /// + /// Get the lists in a folder + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// Task of GetFolderLists + public async System.Threading.Tasks.Task GetFolderListsAsync (long? folderId, long? limit = null, long? offset = null) + { + ApiResponse localVarResponse = await GetFolderListsAsyncWithHttpInfo(folderId, limit, offset); + return localVarResponse.Data; + + } + + /// + /// Get the lists in a folder + /// + /// Thrown when fails to make API call + /// Id of the folder + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// Task of ApiResponse (GetFolderLists) + public async System.Threading.Tasks.Task> GetFolderListsAsyncWithHttpInfo (long? folderId, long? limit = null, long? offset = null) + { + // verify the required parameter 'folderId' is set + if (folderId == null) + throw new ApiException(400, "Missing required parameter 'folderId' when calling ListsApi->GetFolderLists"); + + var localVarPath = "/contacts/folders/{folderId}/lists"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (folderId != null) localVarPathParams.Add("folderId", this.Configuration.ApiClient.ParameterToString(folderId)); // path parameter + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (offset != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetFolderLists", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetFolderLists) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetFolderLists))); + } + + /// + /// Get the details of a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// GetExtendedList + public GetExtendedList GetList (long? listId) + { + ApiResponse localVarResponse = GetListWithHttpInfo(listId); + return localVarResponse.Data; + } + + /// + /// Get the details of a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// ApiResponse of GetExtendedList + public ApiResponse< GetExtendedList > GetListWithHttpInfo (long? listId) + { + // verify the required parameter 'listId' is set + if (listId == null) + throw new ApiException(400, "Missing required parameter 'listId' when calling ListsApi->GetList"); + + var localVarPath = "/contacts/lists/{listId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (listId != null) localVarPathParams.Add("listId", this.Configuration.ApiClient.ParameterToString(listId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetList", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetExtendedList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetExtendedList))); + } + + /// + /// Get the details of a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// Task of GetExtendedList + public async System.Threading.Tasks.Task GetListAsync (long? listId) + { + ApiResponse localVarResponse = await GetListAsyncWithHttpInfo(listId); + return localVarResponse.Data; + + } + + /// + /// Get the details of a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// Task of ApiResponse (GetExtendedList) + public async System.Threading.Tasks.Task> GetListAsyncWithHttpInfo (long? listId) + { + // verify the required parameter 'listId' is set + if (listId == null) + throw new ApiException(400, "Missing required parameter 'listId' when calling ListsApi->GetList"); + + var localVarPath = "/contacts/lists/{listId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (listId != null) localVarPathParams.Add("listId", this.Configuration.ApiClient.ParameterToString(listId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetList", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetExtendedList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetExtendedList))); + } + + /// + /// Get all the lists + /// + /// Thrown when fails to make API call + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// GetLists + public GetLists GetLists (long? limit = null, long? offset = null) + { + ApiResponse localVarResponse = GetListsWithHttpInfo(limit, offset); + return localVarResponse.Data; + } + + /// + /// Get all the lists + /// + /// Thrown when fails to make API call + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// ApiResponse of GetLists + public ApiResponse< GetLists > GetListsWithHttpInfo (long? limit = null, long? offset = null) + { + + var localVarPath = "/contacts/lists"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (offset != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetLists", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetLists) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetLists))); + } + + /// + /// Get all the lists + /// + /// Thrown when fails to make API call + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// Task of GetLists + public async System.Threading.Tasks.Task GetListsAsync (long? limit = null, long? offset = null) + { + ApiResponse localVarResponse = await GetListsAsyncWithHttpInfo(limit, offset); + return localVarResponse.Data; + + } + + /// + /// Get all the lists + /// + /// Thrown when fails to make API call + /// Number of documents per page (optional, default to 10) + /// Index of the first document of the page (optional, default to 0) + /// Task of ApiResponse (GetLists) + public async System.Threading.Tasks.Task> GetListsAsyncWithHttpInfo (long? limit = null, long? offset = null) + { + + var localVarPath = "/contacts/lists"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (offset != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetLists", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetLists) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetLists))); + } + + /// + /// Remove existing contacts from a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// Emails adresses of the contact + /// PostContactInfo + public PostContactInfo RemoveContactFromList (long? listId, RemoveContactFromList contactEmails) + { + ApiResponse localVarResponse = RemoveContactFromListWithHttpInfo(listId, contactEmails); + return localVarResponse.Data; + } + + /// + /// Remove existing contacts from a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// Emails adresses of the contact + /// ApiResponse of PostContactInfo + public ApiResponse< PostContactInfo > RemoveContactFromListWithHttpInfo (long? listId, RemoveContactFromList contactEmails) + { + // verify the required parameter 'listId' is set + if (listId == null) + throw new ApiException(400, "Missing required parameter 'listId' when calling ListsApi->RemoveContactFromList"); + // verify the required parameter 'contactEmails' is set + if (contactEmails == null) + throw new ApiException(400, "Missing required parameter 'contactEmails' when calling ListsApi->RemoveContactFromList"); + + var localVarPath = "/contacts/lists/{listId}/contacts/remove"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (listId != null) localVarPathParams.Add("listId", this.Configuration.ApiClient.ParameterToString(listId)); // path parameter + if (contactEmails != null && contactEmails.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(contactEmails); // http body (model) parameter + } + else + { + localVarPostBody = contactEmails; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("RemoveContactFromList", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (PostContactInfo) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostContactInfo))); + } + + /// + /// Remove existing contacts from a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// Emails adresses of the contact + /// Task of PostContactInfo + public async System.Threading.Tasks.Task RemoveContactFromListAsync (long? listId, RemoveContactFromList contactEmails) + { + ApiResponse localVarResponse = await RemoveContactFromListAsyncWithHttpInfo(listId, contactEmails); + return localVarResponse.Data; + + } + + /// + /// Remove existing contacts from a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// Emails adresses of the contact + /// Task of ApiResponse (PostContactInfo) + public async System.Threading.Tasks.Task> RemoveContactFromListAsyncWithHttpInfo (long? listId, RemoveContactFromList contactEmails) + { + // verify the required parameter 'listId' is set + if (listId == null) + throw new ApiException(400, "Missing required parameter 'listId' when calling ListsApi->RemoveContactFromList"); + // verify the required parameter 'contactEmails' is set + if (contactEmails == null) + throw new ApiException(400, "Missing required parameter 'contactEmails' when calling ListsApi->RemoveContactFromList"); + + var localVarPath = "/contacts/lists/{listId}/contacts/remove"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (listId != null) localVarPathParams.Add("listId", this.Configuration.ApiClient.ParameterToString(listId)); // path parameter + if (contactEmails != null && contactEmails.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(contactEmails); // http body (model) parameter + } + else + { + localVarPostBody = contactEmails; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("RemoveContactFromList", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (PostContactInfo) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PostContactInfo))); + } + + /// + /// Update a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// Values to update a list + /// + public void UpdateList (long? listId, UpdateList updateList) + { + UpdateListWithHttpInfo(listId, updateList); + } + + /// + /// Update a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// Values to update a list + /// ApiResponse of Object(void) + public ApiResponse UpdateListWithHttpInfo (long? listId, UpdateList updateList) + { + // verify the required parameter 'listId' is set + if (listId == null) + throw new ApiException(400, "Missing required parameter 'listId' when calling ListsApi->UpdateList"); + // verify the required parameter 'updateList' is set + if (updateList == null) + throw new ApiException(400, "Missing required parameter 'updateList' when calling ListsApi->UpdateList"); + + var localVarPath = "/contacts/lists/{listId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (listId != null) localVarPathParams.Add("listId", this.Configuration.ApiClient.ParameterToString(listId)); // path parameter + if (updateList != null && updateList.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(updateList); // http body (model) parameter + } + else + { + localVarPostBody = updateList; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateList", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Update a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// Values to update a list + /// Task of void + public async System.Threading.Tasks.Task UpdateListAsync (long? listId, UpdateList updateList) + { + await UpdateListAsyncWithHttpInfo(listId, updateList); + + } + + /// + /// Update a list + /// + /// Thrown when fails to make API call + /// Id of the list + /// Values to update a list + /// Task of ApiResponse + public async System.Threading.Tasks.Task> UpdateListAsyncWithHttpInfo (long? listId, UpdateList updateList) + { + // verify the required parameter 'listId' is set + if (listId == null) + throw new ApiException(400, "Missing required parameter 'listId' when calling ListsApi->UpdateList"); + // verify the required parameter 'updateList' is set + if (updateList == null) + throw new ApiException(400, "Missing required parameter 'updateList' when calling ListsApi->UpdateList"); + + var localVarPath = "/contacts/lists/{listId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (listId != null) localVarPathParams.Add("listId", this.Configuration.ApiClient.ParameterToString(listId)); // path parameter + if (updateList != null && updateList.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(updateList); // http body (model) parameter + } + else + { + localVarPostBody = updateList; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateList", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + } +} diff --git a/src/sib_api_v3_sdk/Api/ProcessApi.cs b/src/sib_api_v3_sdk/Api/ProcessApi.cs new file mode 100644 index 0000000..69b9501 --- /dev/null +++ b/src/sib_api_v3_sdk/Api/ProcessApi.cs @@ -0,0 +1,528 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using RestSharp; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace sib_api_v3_sdk.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IProcessApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Return the informations for a process + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the process + /// GetProcess + GetProcess GetProcess (long? processId); + + /// + /// Return the informations for a process + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the process + /// ApiResponse of GetProcess + ApiResponse GetProcessWithHttpInfo (long? processId); + /// + /// Return all the processes for your account + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number limitation for the result returned (optional, default to 10) + /// Beginning point in the list to retrieve from. (optional, default to 0) + /// GetProcesses + GetProcesses GetProcesses (long? limit = null, long? offset = null); + + /// + /// Return all the processes for your account + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number limitation for the result returned (optional, default to 10) + /// Beginning point in the list to retrieve from. (optional, default to 0) + /// ApiResponse of GetProcesses + ApiResponse GetProcessesWithHttpInfo (long? limit = null, long? offset = null); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Return the informations for a process + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the process + /// Task of GetProcess + System.Threading.Tasks.Task GetProcessAsync (long? processId); + + /// + /// Return the informations for a process + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the process + /// Task of ApiResponse (GetProcess) + System.Threading.Tasks.Task> GetProcessAsyncWithHttpInfo (long? processId); + /// + /// Return all the processes for your account + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number limitation for the result returned (optional, default to 10) + /// Beginning point in the list to retrieve from. (optional, default to 0) + /// Task of GetProcesses + System.Threading.Tasks.Task GetProcessesAsync (long? limit = null, long? offset = null); + + /// + /// Return all the processes for your account + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number limitation for the result returned (optional, default to 10) + /// Beginning point in the list to retrieve from. (optional, default to 0) + /// Task of ApiResponse (GetProcesses) + System.Threading.Tasks.Task> GetProcessesAsyncWithHttpInfo (long? limit = null, long? offset = null); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class ProcessApi : IProcessApi + { + private sib_api_v3_sdk.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public ProcessApi(String basePath) + { + this.Configuration = new sib_api_v3_sdk.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = sib_api_v3_sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public ProcessApi(sib_api_v3_sdk.Client.Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = sib_api_v3_sdk.Client.Configuration.Default; + else + this.Configuration = configuration; + + ExceptionFactory = sib_api_v3_sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + + /// + /// Sets the base path of the API client. + /// + /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] + public void SetBasePath(String basePath) + { + // do nothing + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public sib_api_v3_sdk.Client.Configuration Configuration {get; set;} + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public sib_api_v3_sdk.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public IDictionary DefaultHeader() + { + return new ReadOnlyDictionary(this.Configuration.DefaultHeader); + } + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + + /// + /// Return the informations for a process + /// + /// Thrown when fails to make API call + /// Id of the process + /// GetProcess + public GetProcess GetProcess (long? processId) + { + ApiResponse localVarResponse = GetProcessWithHttpInfo(processId); + return localVarResponse.Data; + } + + /// + /// Return the informations for a process + /// + /// Thrown when fails to make API call + /// Id of the process + /// ApiResponse of GetProcess + public ApiResponse< GetProcess > GetProcessWithHttpInfo (long? processId) + { + // verify the required parameter 'processId' is set + if (processId == null) + throw new ApiException(400, "Missing required parameter 'processId' when calling ProcessApi->GetProcess"); + + var localVarPath = "/processes/{processId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (processId != null) localVarPathParams.Add("processId", this.Configuration.ApiClient.ParameterToString(processId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetProcess", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetProcess) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetProcess))); + } + + /// + /// Return the informations for a process + /// + /// Thrown when fails to make API call + /// Id of the process + /// Task of GetProcess + public async System.Threading.Tasks.Task GetProcessAsync (long? processId) + { + ApiResponse localVarResponse = await GetProcessAsyncWithHttpInfo(processId); + return localVarResponse.Data; + + } + + /// + /// Return the informations for a process + /// + /// Thrown when fails to make API call + /// Id of the process + /// Task of ApiResponse (GetProcess) + public async System.Threading.Tasks.Task> GetProcessAsyncWithHttpInfo (long? processId) + { + // verify the required parameter 'processId' is set + if (processId == null) + throw new ApiException(400, "Missing required parameter 'processId' when calling ProcessApi->GetProcess"); + + var localVarPath = "/processes/{processId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (processId != null) localVarPathParams.Add("processId", this.Configuration.ApiClient.ParameterToString(processId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetProcess", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetProcess) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetProcess))); + } + + /// + /// Return all the processes for your account + /// + /// Thrown when fails to make API call + /// Number limitation for the result returned (optional, default to 10) + /// Beginning point in the list to retrieve from. (optional, default to 0) + /// GetProcesses + public GetProcesses GetProcesses (long? limit = null, long? offset = null) + { + ApiResponse localVarResponse = GetProcessesWithHttpInfo(limit, offset); + return localVarResponse.Data; + } + + /// + /// Return all the processes for your account + /// + /// Thrown when fails to make API call + /// Number limitation for the result returned (optional, default to 10) + /// Beginning point in the list to retrieve from. (optional, default to 0) + /// ApiResponse of GetProcesses + public ApiResponse< GetProcesses > GetProcessesWithHttpInfo (long? limit = null, long? offset = null) + { + + var localVarPath = "/processes"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (offset != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetProcesses", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetProcesses) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetProcesses))); + } + + /// + /// Return all the processes for your account + /// + /// Thrown when fails to make API call + /// Number limitation for the result returned (optional, default to 10) + /// Beginning point in the list to retrieve from. (optional, default to 0) + /// Task of GetProcesses + public async System.Threading.Tasks.Task GetProcessesAsync (long? limit = null, long? offset = null) + { + ApiResponse localVarResponse = await GetProcessesAsyncWithHttpInfo(limit, offset); + return localVarResponse.Data; + + } + + /// + /// Return all the processes for your account + /// + /// Thrown when fails to make API call + /// Number limitation for the result returned (optional, default to 10) + /// Beginning point in the list to retrieve from. (optional, default to 0) + /// Task of ApiResponse (GetProcesses) + public async System.Threading.Tasks.Task> GetProcessesAsyncWithHttpInfo (long? limit = null, long? offset = null) + { + + var localVarPath = "/processes"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (offset != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetProcesses", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetProcesses) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetProcesses))); + } + + } +} diff --git a/src/sib_api_v3_sdk/Api/ResellerApi.cs b/src/sib_api_v3_sdk/Api/ResellerApi.cs new file mode 100644 index 0000000..dcb40e1 --- /dev/null +++ b/src/sib_api_v3_sdk/Api/ResellerApi.cs @@ -0,0 +1,2037 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using RestSharp; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace sib_api_v3_sdk.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IResellerApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Add Email and/or SMS credits to a specific child account + /// + /// + /// + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// Values to post to add credit to a specific child account + /// RemainingCreditModel + RemainingCreditModel AddCredits (string childAuthKey, AddCredits addCredits); + + /// + /// Add Email and/or SMS credits to a specific child account + /// + /// + /// + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// Values to post to add credit to a specific child account + /// ApiResponse of RemainingCreditModel + ApiResponse AddCreditsWithHttpInfo (string childAuthKey, AddCredits addCredits); + /// + /// Associate a dedicated IP to the child + /// + /// + /// + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// IP to associate + /// + void AssociateIpToChild (string childAuthKey, ManageIp ip); + + /// + /// Associate a dedicated IP to the child + /// + /// + /// + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// IP to associate + /// ApiResponse of Object(void) + ApiResponse AssociateIpToChildWithHttpInfo (string childAuthKey, ManageIp ip); + /// + /// Creates a reseller child + /// + /// + /// + /// + /// Thrown when fails to make API call + /// reseller child to add (optional) + /// CreateReseller + CreateReseller CreateResellerChild (CreateChild resellerChild = null); + + /// + /// Creates a reseller child + /// + /// + /// + /// + /// Thrown when fails to make API call + /// reseller child to add (optional) + /// ApiResponse of CreateReseller + ApiResponse CreateResellerChildWithHttpInfo (CreateChild resellerChild = null); + /// + /// Deletes a single reseller child based on the childAuthKey supplied + /// + /// + /// + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// + void DeleteResellerChild (string childAuthKey); + + /// + /// Deletes a single reseller child based on the childAuthKey supplied + /// + /// + /// + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// ApiResponse of Object(void) + ApiResponse DeleteResellerChildWithHttpInfo (string childAuthKey); + /// + /// Dissociate a dedicated IP to the child + /// + /// + /// + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// IP to dissociate + /// + void DissociateIpFromChild (string childAuthKey, ManageIp ip); + + /// + /// Dissociate a dedicated IP to the child + /// + /// + /// + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// IP to dissociate + /// ApiResponse of Object(void) + ApiResponse DissociateIpFromChildWithHttpInfo (string childAuthKey, ManageIp ip); + /// + /// Gets the info about a specific child account + /// + /// + /// + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// GetChildInfo + GetChildInfo GetChildInfo (string childAuthKey); + + /// + /// Gets the info about a specific child account + /// + /// + /// + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// ApiResponse of GetChildInfo + ApiResponse GetChildInfoWithHttpInfo (string childAuthKey); + /// + /// Gets the list of all reseller's children accounts + /// + /// + /// + /// + /// Thrown when fails to make API call + /// GetChildrenList + GetChildrenList GetResellerChilds (); + + /// + /// Gets the list of all reseller's children accounts + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ApiResponse of GetChildrenList + ApiResponse GetResellerChildsWithHttpInfo (); + /// + /// Remove Email and/or SMS credits from a specific child account + /// + /// + /// + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// Values to post to remove email or SMS credits from a specific child account + /// RemainingCreditModel + RemainingCreditModel RemoveCredits (string childAuthKey, RemoveCredits removeCredits); + + /// + /// Remove Email and/or SMS credits from a specific child account + /// + /// + /// + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// Values to post to remove email or SMS credits from a specific child account + /// ApiResponse of RemainingCreditModel + ApiResponse RemoveCreditsWithHttpInfo (string childAuthKey, RemoveCredits removeCredits); + /// + /// Updates infos of reseller's child based on the childAuthKey supplied + /// + /// + /// + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// values to update in child profile + /// + void UpdateResellerChild (string childAuthKey, UpdateChild resellerChild); + + /// + /// Updates infos of reseller's child based on the childAuthKey supplied + /// + /// + /// + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// values to update in child profile + /// ApiResponse of Object(void) + ApiResponse UpdateResellerChildWithHttpInfo (string childAuthKey, UpdateChild resellerChild); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Add Email and/or SMS credits to a specific child account + /// + /// + /// + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// Values to post to add credit to a specific child account + /// Task of RemainingCreditModel + System.Threading.Tasks.Task AddCreditsAsync (string childAuthKey, AddCredits addCredits); + + /// + /// Add Email and/or SMS credits to a specific child account + /// + /// + /// + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// Values to post to add credit to a specific child account + /// Task of ApiResponse (RemainingCreditModel) + System.Threading.Tasks.Task> AddCreditsAsyncWithHttpInfo (string childAuthKey, AddCredits addCredits); + /// + /// Associate a dedicated IP to the child + /// + /// + /// + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// IP to associate + /// Task of void + System.Threading.Tasks.Task AssociateIpToChildAsync (string childAuthKey, ManageIp ip); + + /// + /// Associate a dedicated IP to the child + /// + /// + /// + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// IP to associate + /// Task of ApiResponse + System.Threading.Tasks.Task> AssociateIpToChildAsyncWithHttpInfo (string childAuthKey, ManageIp ip); + /// + /// Creates a reseller child + /// + /// + /// + /// + /// Thrown when fails to make API call + /// reseller child to add (optional) + /// Task of CreateReseller + System.Threading.Tasks.Task CreateResellerChildAsync (CreateChild resellerChild = null); + + /// + /// Creates a reseller child + /// + /// + /// + /// + /// Thrown when fails to make API call + /// reseller child to add (optional) + /// Task of ApiResponse (CreateReseller) + System.Threading.Tasks.Task> CreateResellerChildAsyncWithHttpInfo (CreateChild resellerChild = null); + /// + /// Deletes a single reseller child based on the childAuthKey supplied + /// + /// + /// + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// Task of void + System.Threading.Tasks.Task DeleteResellerChildAsync (string childAuthKey); + + /// + /// Deletes a single reseller child based on the childAuthKey supplied + /// + /// + /// + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteResellerChildAsyncWithHttpInfo (string childAuthKey); + /// + /// Dissociate a dedicated IP to the child + /// + /// + /// + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// IP to dissociate + /// Task of void + System.Threading.Tasks.Task DissociateIpFromChildAsync (string childAuthKey, ManageIp ip); + + /// + /// Dissociate a dedicated IP to the child + /// + /// + /// + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// IP to dissociate + /// Task of ApiResponse + System.Threading.Tasks.Task> DissociateIpFromChildAsyncWithHttpInfo (string childAuthKey, ManageIp ip); + /// + /// Gets the info about a specific child account + /// + /// + /// + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// Task of GetChildInfo + System.Threading.Tasks.Task GetChildInfoAsync (string childAuthKey); + + /// + /// Gets the info about a specific child account + /// + /// + /// + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// Task of ApiResponse (GetChildInfo) + System.Threading.Tasks.Task> GetChildInfoAsyncWithHttpInfo (string childAuthKey); + /// + /// Gets the list of all reseller's children accounts + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Task of GetChildrenList + System.Threading.Tasks.Task GetResellerChildsAsync (); + + /// + /// Gets the list of all reseller's children accounts + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Task of ApiResponse (GetChildrenList) + System.Threading.Tasks.Task> GetResellerChildsAsyncWithHttpInfo (); + /// + /// Remove Email and/or SMS credits from a specific child account + /// + /// + /// + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// Values to post to remove email or SMS credits from a specific child account + /// Task of RemainingCreditModel + System.Threading.Tasks.Task RemoveCreditsAsync (string childAuthKey, RemoveCredits removeCredits); + + /// + /// Remove Email and/or SMS credits from a specific child account + /// + /// + /// + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// Values to post to remove email or SMS credits from a specific child account + /// Task of ApiResponse (RemainingCreditModel) + System.Threading.Tasks.Task> RemoveCreditsAsyncWithHttpInfo (string childAuthKey, RemoveCredits removeCredits); + /// + /// Updates infos of reseller's child based on the childAuthKey supplied + /// + /// + /// + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// values to update in child profile + /// Task of void + System.Threading.Tasks.Task UpdateResellerChildAsync (string childAuthKey, UpdateChild resellerChild); + + /// + /// Updates infos of reseller's child based on the childAuthKey supplied + /// + /// + /// + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// values to update in child profile + /// Task of ApiResponse + System.Threading.Tasks.Task> UpdateResellerChildAsyncWithHttpInfo (string childAuthKey, UpdateChild resellerChild); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class ResellerApi : IResellerApi + { + private sib_api_v3_sdk.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public ResellerApi(String basePath) + { + this.Configuration = new sib_api_v3_sdk.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = sib_api_v3_sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public ResellerApi(sib_api_v3_sdk.Client.Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = sib_api_v3_sdk.Client.Configuration.Default; + else + this.Configuration = configuration; + + ExceptionFactory = sib_api_v3_sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + + /// + /// Sets the base path of the API client. + /// + /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] + public void SetBasePath(String basePath) + { + // do nothing + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public sib_api_v3_sdk.Client.Configuration Configuration {get; set;} + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public sib_api_v3_sdk.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public IDictionary DefaultHeader() + { + return new ReadOnlyDictionary(this.Configuration.DefaultHeader); + } + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + + /// + /// Add Email and/or SMS credits to a specific child account + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// Values to post to add credit to a specific child account + /// RemainingCreditModel + public RemainingCreditModel AddCredits (string childAuthKey, AddCredits addCredits) + { + ApiResponse localVarResponse = AddCreditsWithHttpInfo(childAuthKey, addCredits); + return localVarResponse.Data; + } + + /// + /// Add Email and/or SMS credits to a specific child account + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// Values to post to add credit to a specific child account + /// ApiResponse of RemainingCreditModel + public ApiResponse< RemainingCreditModel > AddCreditsWithHttpInfo (string childAuthKey, AddCredits addCredits) + { + // verify the required parameter 'childAuthKey' is set + if (childAuthKey == null) + throw new ApiException(400, "Missing required parameter 'childAuthKey' when calling ResellerApi->AddCredits"); + // verify the required parameter 'addCredits' is set + if (addCredits == null) + throw new ApiException(400, "Missing required parameter 'addCredits' when calling ResellerApi->AddCredits"); + + var localVarPath = "/reseller/children/{childAuthKey}/credits/add"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (childAuthKey != null) localVarPathParams.Add("childAuthKey", this.Configuration.ApiClient.ParameterToString(childAuthKey)); // path parameter + if (addCredits != null && addCredits.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(addCredits); // http body (model) parameter + } + else + { + localVarPostBody = addCredits; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("AddCredits", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (RemainingCreditModel) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RemainingCreditModel))); + } + + /// + /// Add Email and/or SMS credits to a specific child account + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// Values to post to add credit to a specific child account + /// Task of RemainingCreditModel + public async System.Threading.Tasks.Task AddCreditsAsync (string childAuthKey, AddCredits addCredits) + { + ApiResponse localVarResponse = await AddCreditsAsyncWithHttpInfo(childAuthKey, addCredits); + return localVarResponse.Data; + + } + + /// + /// Add Email and/or SMS credits to a specific child account + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// Values to post to add credit to a specific child account + /// Task of ApiResponse (RemainingCreditModel) + public async System.Threading.Tasks.Task> AddCreditsAsyncWithHttpInfo (string childAuthKey, AddCredits addCredits) + { + // verify the required parameter 'childAuthKey' is set + if (childAuthKey == null) + throw new ApiException(400, "Missing required parameter 'childAuthKey' when calling ResellerApi->AddCredits"); + // verify the required parameter 'addCredits' is set + if (addCredits == null) + throw new ApiException(400, "Missing required parameter 'addCredits' when calling ResellerApi->AddCredits"); + + var localVarPath = "/reseller/children/{childAuthKey}/credits/add"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (childAuthKey != null) localVarPathParams.Add("childAuthKey", this.Configuration.ApiClient.ParameterToString(childAuthKey)); // path parameter + if (addCredits != null && addCredits.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(addCredits); // http body (model) parameter + } + else + { + localVarPostBody = addCredits; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("AddCredits", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (RemainingCreditModel) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RemainingCreditModel))); + } + + /// + /// Associate a dedicated IP to the child + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// IP to associate + /// + public void AssociateIpToChild (string childAuthKey, ManageIp ip) + { + AssociateIpToChildWithHttpInfo(childAuthKey, ip); + } + + /// + /// Associate a dedicated IP to the child + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// IP to associate + /// ApiResponse of Object(void) + public ApiResponse AssociateIpToChildWithHttpInfo (string childAuthKey, ManageIp ip) + { + // verify the required parameter 'childAuthKey' is set + if (childAuthKey == null) + throw new ApiException(400, "Missing required parameter 'childAuthKey' when calling ResellerApi->AssociateIpToChild"); + // verify the required parameter 'ip' is set + if (ip == null) + throw new ApiException(400, "Missing required parameter 'ip' when calling ResellerApi->AssociateIpToChild"); + + var localVarPath = "/reseller/children/{childAuthKey}/ips/associate"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (childAuthKey != null) localVarPathParams.Add("childAuthKey", this.Configuration.ApiClient.ParameterToString(childAuthKey)); // path parameter + if (ip != null && ip.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(ip); // http body (model) parameter + } + else + { + localVarPostBody = ip; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("AssociateIpToChild", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Associate a dedicated IP to the child + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// IP to associate + /// Task of void + public async System.Threading.Tasks.Task AssociateIpToChildAsync (string childAuthKey, ManageIp ip) + { + await AssociateIpToChildAsyncWithHttpInfo(childAuthKey, ip); + + } + + /// + /// Associate a dedicated IP to the child + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// IP to associate + /// Task of ApiResponse + public async System.Threading.Tasks.Task> AssociateIpToChildAsyncWithHttpInfo (string childAuthKey, ManageIp ip) + { + // verify the required parameter 'childAuthKey' is set + if (childAuthKey == null) + throw new ApiException(400, "Missing required parameter 'childAuthKey' when calling ResellerApi->AssociateIpToChild"); + // verify the required parameter 'ip' is set + if (ip == null) + throw new ApiException(400, "Missing required parameter 'ip' when calling ResellerApi->AssociateIpToChild"); + + var localVarPath = "/reseller/children/{childAuthKey}/ips/associate"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (childAuthKey != null) localVarPathParams.Add("childAuthKey", this.Configuration.ApiClient.ParameterToString(childAuthKey)); // path parameter + if (ip != null && ip.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(ip); // http body (model) parameter + } + else + { + localVarPostBody = ip; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("AssociateIpToChild", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Creates a reseller child + /// + /// Thrown when fails to make API call + /// reseller child to add (optional) + /// CreateReseller + public CreateReseller CreateResellerChild (CreateChild resellerChild = null) + { + ApiResponse localVarResponse = CreateResellerChildWithHttpInfo(resellerChild); + return localVarResponse.Data; + } + + /// + /// Creates a reseller child + /// + /// Thrown when fails to make API call + /// reseller child to add (optional) + /// ApiResponse of CreateReseller + public ApiResponse< CreateReseller > CreateResellerChildWithHttpInfo (CreateChild resellerChild = null) + { + + var localVarPath = "/reseller/children"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (resellerChild != null && resellerChild.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(resellerChild); // http body (model) parameter + } + else + { + localVarPostBody = resellerChild; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateResellerChild", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (CreateReseller) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateReseller))); + } + + /// + /// Creates a reseller child + /// + /// Thrown when fails to make API call + /// reseller child to add (optional) + /// Task of CreateReseller + public async System.Threading.Tasks.Task CreateResellerChildAsync (CreateChild resellerChild = null) + { + ApiResponse localVarResponse = await CreateResellerChildAsyncWithHttpInfo(resellerChild); + return localVarResponse.Data; + + } + + /// + /// Creates a reseller child + /// + /// Thrown when fails to make API call + /// reseller child to add (optional) + /// Task of ApiResponse (CreateReseller) + public async System.Threading.Tasks.Task> CreateResellerChildAsyncWithHttpInfo (CreateChild resellerChild = null) + { + + var localVarPath = "/reseller/children"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (resellerChild != null && resellerChild.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(resellerChild); // http body (model) parameter + } + else + { + localVarPostBody = resellerChild; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateResellerChild", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (CreateReseller) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateReseller))); + } + + /// + /// Deletes a single reseller child based on the childAuthKey supplied + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// + public void DeleteResellerChild (string childAuthKey) + { + DeleteResellerChildWithHttpInfo(childAuthKey); + } + + /// + /// Deletes a single reseller child based on the childAuthKey supplied + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// ApiResponse of Object(void) + public ApiResponse DeleteResellerChildWithHttpInfo (string childAuthKey) + { + // verify the required parameter 'childAuthKey' is set + if (childAuthKey == null) + throw new ApiException(400, "Missing required parameter 'childAuthKey' when calling ResellerApi->DeleteResellerChild"); + + var localVarPath = "/reseller/children/{childAuthKey}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (childAuthKey != null) localVarPathParams.Add("childAuthKey", this.Configuration.ApiClient.ParameterToString(childAuthKey)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteResellerChild", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Deletes a single reseller child based on the childAuthKey supplied + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// Task of void + public async System.Threading.Tasks.Task DeleteResellerChildAsync (string childAuthKey) + { + await DeleteResellerChildAsyncWithHttpInfo(childAuthKey); + + } + + /// + /// Deletes a single reseller child based on the childAuthKey supplied + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteResellerChildAsyncWithHttpInfo (string childAuthKey) + { + // verify the required parameter 'childAuthKey' is set + if (childAuthKey == null) + throw new ApiException(400, "Missing required parameter 'childAuthKey' when calling ResellerApi->DeleteResellerChild"); + + var localVarPath = "/reseller/children/{childAuthKey}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (childAuthKey != null) localVarPathParams.Add("childAuthKey", this.Configuration.ApiClient.ParameterToString(childAuthKey)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteResellerChild", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Dissociate a dedicated IP to the child + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// IP to dissociate + /// + public void DissociateIpFromChild (string childAuthKey, ManageIp ip) + { + DissociateIpFromChildWithHttpInfo(childAuthKey, ip); + } + + /// + /// Dissociate a dedicated IP to the child + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// IP to dissociate + /// ApiResponse of Object(void) + public ApiResponse DissociateIpFromChildWithHttpInfo (string childAuthKey, ManageIp ip) + { + // verify the required parameter 'childAuthKey' is set + if (childAuthKey == null) + throw new ApiException(400, "Missing required parameter 'childAuthKey' when calling ResellerApi->DissociateIpFromChild"); + // verify the required parameter 'ip' is set + if (ip == null) + throw new ApiException(400, "Missing required parameter 'ip' when calling ResellerApi->DissociateIpFromChild"); + + var localVarPath = "/reseller/children/{childAuthKey}/ips/dissociate"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (childAuthKey != null) localVarPathParams.Add("childAuthKey", this.Configuration.ApiClient.ParameterToString(childAuthKey)); // path parameter + if (ip != null && ip.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(ip); // http body (model) parameter + } + else + { + localVarPostBody = ip; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DissociateIpFromChild", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Dissociate a dedicated IP to the child + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// IP to dissociate + /// Task of void + public async System.Threading.Tasks.Task DissociateIpFromChildAsync (string childAuthKey, ManageIp ip) + { + await DissociateIpFromChildAsyncWithHttpInfo(childAuthKey, ip); + + } + + /// + /// Dissociate a dedicated IP to the child + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// IP to dissociate + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DissociateIpFromChildAsyncWithHttpInfo (string childAuthKey, ManageIp ip) + { + // verify the required parameter 'childAuthKey' is set + if (childAuthKey == null) + throw new ApiException(400, "Missing required parameter 'childAuthKey' when calling ResellerApi->DissociateIpFromChild"); + // verify the required parameter 'ip' is set + if (ip == null) + throw new ApiException(400, "Missing required parameter 'ip' when calling ResellerApi->DissociateIpFromChild"); + + var localVarPath = "/reseller/children/{childAuthKey}/ips/dissociate"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (childAuthKey != null) localVarPathParams.Add("childAuthKey", this.Configuration.ApiClient.ParameterToString(childAuthKey)); // path parameter + if (ip != null && ip.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(ip); // http body (model) parameter + } + else + { + localVarPostBody = ip; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DissociateIpFromChild", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Gets the info about a specific child account + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// GetChildInfo + public GetChildInfo GetChildInfo (string childAuthKey) + { + ApiResponse localVarResponse = GetChildInfoWithHttpInfo(childAuthKey); + return localVarResponse.Data; + } + + /// + /// Gets the info about a specific child account + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// ApiResponse of GetChildInfo + public ApiResponse< GetChildInfo > GetChildInfoWithHttpInfo (string childAuthKey) + { + // verify the required parameter 'childAuthKey' is set + if (childAuthKey == null) + throw new ApiException(400, "Missing required parameter 'childAuthKey' when calling ResellerApi->GetChildInfo"); + + var localVarPath = "/reseller/children/{childAuthKey}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (childAuthKey != null) localVarPathParams.Add("childAuthKey", this.Configuration.ApiClient.ParameterToString(childAuthKey)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetChildInfo", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetChildInfo) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetChildInfo))); + } + + /// + /// Gets the info about a specific child account + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// Task of GetChildInfo + public async System.Threading.Tasks.Task GetChildInfoAsync (string childAuthKey) + { + ApiResponse localVarResponse = await GetChildInfoAsyncWithHttpInfo(childAuthKey); + return localVarResponse.Data; + + } + + /// + /// Gets the info about a specific child account + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// Task of ApiResponse (GetChildInfo) + public async System.Threading.Tasks.Task> GetChildInfoAsyncWithHttpInfo (string childAuthKey) + { + // verify the required parameter 'childAuthKey' is set + if (childAuthKey == null) + throw new ApiException(400, "Missing required parameter 'childAuthKey' when calling ResellerApi->GetChildInfo"); + + var localVarPath = "/reseller/children/{childAuthKey}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (childAuthKey != null) localVarPathParams.Add("childAuthKey", this.Configuration.ApiClient.ParameterToString(childAuthKey)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetChildInfo", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetChildInfo) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetChildInfo))); + } + + /// + /// Gets the list of all reseller's children accounts + /// + /// Thrown when fails to make API call + /// GetChildrenList + public GetChildrenList GetResellerChilds () + { + ApiResponse localVarResponse = GetResellerChildsWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Gets the list of all reseller's children accounts + /// + /// Thrown when fails to make API call + /// ApiResponse of GetChildrenList + public ApiResponse< GetChildrenList > GetResellerChildsWithHttpInfo () + { + + var localVarPath = "/reseller/children"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetResellerChilds", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetChildrenList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetChildrenList))); + } + + /// + /// Gets the list of all reseller's children accounts + /// + /// Thrown when fails to make API call + /// Task of GetChildrenList + public async System.Threading.Tasks.Task GetResellerChildsAsync () + { + ApiResponse localVarResponse = await GetResellerChildsAsyncWithHttpInfo(); + return localVarResponse.Data; + + } + + /// + /// Gets the list of all reseller's children accounts + /// + /// Thrown when fails to make API call + /// Task of ApiResponse (GetChildrenList) + public async System.Threading.Tasks.Task> GetResellerChildsAsyncWithHttpInfo () + { + + var localVarPath = "/reseller/children"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetResellerChilds", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetChildrenList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetChildrenList))); + } + + /// + /// Remove Email and/or SMS credits from a specific child account + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// Values to post to remove email or SMS credits from a specific child account + /// RemainingCreditModel + public RemainingCreditModel RemoveCredits (string childAuthKey, RemoveCredits removeCredits) + { + ApiResponse localVarResponse = RemoveCreditsWithHttpInfo(childAuthKey, removeCredits); + return localVarResponse.Data; + } + + /// + /// Remove Email and/or SMS credits from a specific child account + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// Values to post to remove email or SMS credits from a specific child account + /// ApiResponse of RemainingCreditModel + public ApiResponse< RemainingCreditModel > RemoveCreditsWithHttpInfo (string childAuthKey, RemoveCredits removeCredits) + { + // verify the required parameter 'childAuthKey' is set + if (childAuthKey == null) + throw new ApiException(400, "Missing required parameter 'childAuthKey' when calling ResellerApi->RemoveCredits"); + // verify the required parameter 'removeCredits' is set + if (removeCredits == null) + throw new ApiException(400, "Missing required parameter 'removeCredits' when calling ResellerApi->RemoveCredits"); + + var localVarPath = "/reseller/children/{childAuthKey}/credits/remove"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (childAuthKey != null) localVarPathParams.Add("childAuthKey", this.Configuration.ApiClient.ParameterToString(childAuthKey)); // path parameter + if (removeCredits != null && removeCredits.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(removeCredits); // http body (model) parameter + } + else + { + localVarPostBody = removeCredits; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("RemoveCredits", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (RemainingCreditModel) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RemainingCreditModel))); + } + + /// + /// Remove Email and/or SMS credits from a specific child account + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// Values to post to remove email or SMS credits from a specific child account + /// Task of RemainingCreditModel + public async System.Threading.Tasks.Task RemoveCreditsAsync (string childAuthKey, RemoveCredits removeCredits) + { + ApiResponse localVarResponse = await RemoveCreditsAsyncWithHttpInfo(childAuthKey, removeCredits); + return localVarResponse.Data; + + } + + /// + /// Remove Email and/or SMS credits from a specific child account + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// Values to post to remove email or SMS credits from a specific child account + /// Task of ApiResponse (RemainingCreditModel) + public async System.Threading.Tasks.Task> RemoveCreditsAsyncWithHttpInfo (string childAuthKey, RemoveCredits removeCredits) + { + // verify the required parameter 'childAuthKey' is set + if (childAuthKey == null) + throw new ApiException(400, "Missing required parameter 'childAuthKey' when calling ResellerApi->RemoveCredits"); + // verify the required parameter 'removeCredits' is set + if (removeCredits == null) + throw new ApiException(400, "Missing required parameter 'removeCredits' when calling ResellerApi->RemoveCredits"); + + var localVarPath = "/reseller/children/{childAuthKey}/credits/remove"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (childAuthKey != null) localVarPathParams.Add("childAuthKey", this.Configuration.ApiClient.ParameterToString(childAuthKey)); // path parameter + if (removeCredits != null && removeCredits.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(removeCredits); // http body (model) parameter + } + else + { + localVarPostBody = removeCredits; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("RemoveCredits", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (RemainingCreditModel) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RemainingCreditModel))); + } + + /// + /// Updates infos of reseller's child based on the childAuthKey supplied + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// values to update in child profile + /// + public void UpdateResellerChild (string childAuthKey, UpdateChild resellerChild) + { + UpdateResellerChildWithHttpInfo(childAuthKey, resellerChild); + } + + /// + /// Updates infos of reseller's child based on the childAuthKey supplied + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// values to update in child profile + /// ApiResponse of Object(void) + public ApiResponse UpdateResellerChildWithHttpInfo (string childAuthKey, UpdateChild resellerChild) + { + // verify the required parameter 'childAuthKey' is set + if (childAuthKey == null) + throw new ApiException(400, "Missing required parameter 'childAuthKey' when calling ResellerApi->UpdateResellerChild"); + // verify the required parameter 'resellerChild' is set + if (resellerChild == null) + throw new ApiException(400, "Missing required parameter 'resellerChild' when calling ResellerApi->UpdateResellerChild"); + + var localVarPath = "/reseller/children/{childAuthKey}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (childAuthKey != null) localVarPathParams.Add("childAuthKey", this.Configuration.ApiClient.ParameterToString(childAuthKey)); // path parameter + if (resellerChild != null && resellerChild.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(resellerChild); // http body (model) parameter + } + else + { + localVarPostBody = resellerChild; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateResellerChild", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Updates infos of reseller's child based on the childAuthKey supplied + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// values to update in child profile + /// Task of void + public async System.Threading.Tasks.Task UpdateResellerChildAsync (string childAuthKey, UpdateChild resellerChild) + { + await UpdateResellerChildAsyncWithHttpInfo(childAuthKey, resellerChild); + + } + + /// + /// Updates infos of reseller's child based on the childAuthKey supplied + /// + /// Thrown when fails to make API call + /// auth key of reseller's child + /// values to update in child profile + /// Task of ApiResponse + public async System.Threading.Tasks.Task> UpdateResellerChildAsyncWithHttpInfo (string childAuthKey, UpdateChild resellerChild) + { + // verify the required parameter 'childAuthKey' is set + if (childAuthKey == null) + throw new ApiException(400, "Missing required parameter 'childAuthKey' when calling ResellerApi->UpdateResellerChild"); + // verify the required parameter 'resellerChild' is set + if (resellerChild == null) + throw new ApiException(400, "Missing required parameter 'resellerChild' when calling ResellerApi->UpdateResellerChild"); + + var localVarPath = "/reseller/children/{childAuthKey}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (childAuthKey != null) localVarPathParams.Add("childAuthKey", this.Configuration.ApiClient.ParameterToString(childAuthKey)); // path parameter + if (resellerChild != null && resellerChild.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(resellerChild); // http body (model) parameter + } + else + { + localVarPostBody = resellerChild; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateResellerChild", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + } +} diff --git a/src/sib_api_v3_sdk/Api/SMSCampaignsApi.cs b/src/sib_api_v3_sdk/Api/SMSCampaignsApi.cs new file mode 100644 index 0000000..4ba0b8e --- /dev/null +++ b/src/sib_api_v3_sdk/Api/SMSCampaignsApi.cs @@ -0,0 +1,2280 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using RestSharp; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace sib_api_v3_sdk.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ISMSCampaignsApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Creates an SMS campaign + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Values to create an SMS Campaign + /// CreateModel + CreateModel CreateSmsCampaign (CreateSmsCampaign createSmsCampaign); + + /// + /// Creates an SMS campaign + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Values to create an SMS Campaign + /// ApiResponse of CreateModel + ApiResponse CreateSmsCampaignWithHttpInfo (CreateSmsCampaign createSmsCampaign); + /// + /// Delete the SMS campaign + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the SMS campaign + /// + void DeleteSmsCampaign (long? campaignId); + + /// + /// Delete the SMS campaign + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the SMS campaign + /// ApiResponse of Object(void) + ApiResponse DeleteSmsCampaignWithHttpInfo (long? campaignId); + /// + /// Get an SMS campaign + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the SMS campaign + /// GetSmsCampaign + GetSmsCampaign GetSmsCampaign (long? campaignId); + + /// + /// Get an SMS campaign + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the SMS campaign + /// ApiResponse of GetSmsCampaign + ApiResponse GetSmsCampaignWithHttpInfo (long? campaignId); + /// + /// Returns the informations for all your created SMS campaigns + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Status of campaign. (optional) + /// Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + /// Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + /// Number limitation for the result returned (optional, default to 500) + /// Beginning point in the list to retrieve from. (optional, default to 0) + /// GetSmsCampaigns + GetSmsCampaigns GetSmsCampaigns (string status = null, DateTime? startDate = null, DateTime? endDate = null, long? limit = null, long? offset = null); + + /// + /// Returns the informations for all your created SMS campaigns + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Status of campaign. (optional) + /// Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + /// Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + /// Number limitation for the result returned (optional, default to 500) + /// Beginning point in the list to retrieve from. (optional, default to 0) + /// ApiResponse of GetSmsCampaigns + ApiResponse GetSmsCampaignsWithHttpInfo (string status = null, DateTime? startDate = null, DateTime? endDate = null, long? limit = null, long? offset = null); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// id of the campaign + /// Values to send for a recipient export request (optional) + /// CreatedProcessId + CreatedProcessId RequestSmsRecipientExport (long? campaignId, RequestSmsRecipientExport recipientExport = null); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// id of the campaign + /// Values to send for a recipient export request (optional) + /// ApiResponse of CreatedProcessId + ApiResponse RequestSmsRecipientExportWithHttpInfo (long? campaignId, RequestSmsRecipientExport recipientExport = null); + /// + /// Send your SMS campaign immediately + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the campaign + /// + void SendSmsCampaignNow (long? campaignId); + + /// + /// Send your SMS campaign immediately + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the campaign + /// ApiResponse of Object(void) + ApiResponse SendSmsCampaignNowWithHttpInfo (long? campaignId); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// id of the campaign + /// Values for send a report + /// + void SendSmsReport (long? campaignId, SendReport 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. + /// + /// Thrown when fails to make API call + /// id of the campaign + /// Values for send a report + /// ApiResponse of Object(void) + ApiResponse SendSmsReportWithHttpInfo (long? campaignId, SendReport sendReport); + /// + /// Send an SMS + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the SMS campaign + /// Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted + /// + void SendTestSms (long? campaignId, SendTestSms phoneNumber); + + /// + /// Send an SMS + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the SMS campaign + /// Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted + /// ApiResponse of Object(void) + ApiResponse SendTestSmsWithHttpInfo (long? campaignId, SendTestSms phoneNumber); + /// + /// Updates an SMS campaign + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the SMS campaign + /// Values to update an SMS Campaign + /// + void UpdateSmsCampaign (long? campaignId, UpdateSmsCampaign updateSmsCampaign); + + /// + /// Updates an SMS campaign + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the SMS campaign + /// Values to update an SMS Campaign + /// ApiResponse of Object(void) + ApiResponse UpdateSmsCampaignWithHttpInfo (long? campaignId, UpdateSmsCampaign updateSmsCampaign); + /// + /// Update the campaign status + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the campaign + /// Status of the campaign. + /// + void UpdateSmsCampaignStatus (long? campaignId, UpdateCampaignStatus status); + + /// + /// Update the campaign status + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the campaign + /// Status of the campaign. + /// ApiResponse of Object(void) + ApiResponse UpdateSmsCampaignStatusWithHttpInfo (long? campaignId, UpdateCampaignStatus status); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Creates an SMS campaign + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Values to create an SMS Campaign + /// Task of CreateModel + System.Threading.Tasks.Task CreateSmsCampaignAsync (CreateSmsCampaign createSmsCampaign); + + /// + /// Creates an SMS campaign + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Values to create an SMS Campaign + /// Task of ApiResponse (CreateModel) + System.Threading.Tasks.Task> CreateSmsCampaignAsyncWithHttpInfo (CreateSmsCampaign createSmsCampaign); + /// + /// Delete the SMS campaign + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the SMS campaign + /// Task of void + System.Threading.Tasks.Task DeleteSmsCampaignAsync (long? campaignId); + + /// + /// Delete the SMS campaign + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the SMS campaign + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteSmsCampaignAsyncWithHttpInfo (long? campaignId); + /// + /// Get an SMS campaign + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the SMS campaign + /// Task of GetSmsCampaign + System.Threading.Tasks.Task GetSmsCampaignAsync (long? campaignId); + + /// + /// Get an SMS campaign + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the SMS campaign + /// Task of ApiResponse (GetSmsCampaign) + System.Threading.Tasks.Task> GetSmsCampaignAsyncWithHttpInfo (long? campaignId); + /// + /// Returns the informations for all your created SMS campaigns + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Status of campaign. (optional) + /// Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + /// Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + /// Number limitation for the result returned (optional, default to 500) + /// Beginning point in the list to retrieve from. (optional, default to 0) + /// Task of GetSmsCampaigns + System.Threading.Tasks.Task GetSmsCampaignsAsync (string status = null, DateTime? startDate = null, DateTime? endDate = null, long? limit = null, long? offset = null); + + /// + /// Returns the informations for all your created SMS campaigns + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Status of campaign. (optional) + /// Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + /// Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + /// Number limitation for the result returned (optional, default to 500) + /// Beginning point in the list to retrieve from. (optional, default to 0) + /// Task of ApiResponse (GetSmsCampaigns) + System.Threading.Tasks.Task> GetSmsCampaignsAsyncWithHttpInfo (string status = null, DateTime? startDate = null, DateTime? endDate = null, long? limit = null, long? offset = null); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// id of the campaign + /// Values to send for a recipient export request (optional) + /// Task of CreatedProcessId + System.Threading.Tasks.Task RequestSmsRecipientExportAsync (long? campaignId, RequestSmsRecipientExport recipientExport = null); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// id of the campaign + /// Values to send for a recipient export request (optional) + /// Task of ApiResponse (CreatedProcessId) + System.Threading.Tasks.Task> RequestSmsRecipientExportAsyncWithHttpInfo (long? campaignId, RequestSmsRecipientExport recipientExport = null); + /// + /// Send your SMS campaign immediately + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the campaign + /// Task of void + System.Threading.Tasks.Task SendSmsCampaignNowAsync (long? campaignId); + + /// + /// Send your SMS campaign immediately + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the campaign + /// Task of ApiResponse + System.Threading.Tasks.Task> SendSmsCampaignNowAsyncWithHttpInfo (long? campaignId); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// id of the campaign + /// Values for send a report + /// Task of void + System.Threading.Tasks.Task SendSmsReportAsync (long? campaignId, SendReport 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. + /// + /// Thrown when fails to make API call + /// id of the campaign + /// Values for send a report + /// Task of ApiResponse + System.Threading.Tasks.Task> SendSmsReportAsyncWithHttpInfo (long? campaignId, SendReport sendReport); + /// + /// Send an SMS + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the SMS campaign + /// Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted + /// Task of void + System.Threading.Tasks.Task SendTestSmsAsync (long? campaignId, SendTestSms phoneNumber); + + /// + /// Send an SMS + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the SMS campaign + /// Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted + /// Task of ApiResponse + System.Threading.Tasks.Task> SendTestSmsAsyncWithHttpInfo (long? campaignId, SendTestSms phoneNumber); + /// + /// Updates an SMS campaign + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the SMS campaign + /// Values to update an SMS Campaign + /// Task of void + System.Threading.Tasks.Task UpdateSmsCampaignAsync (long? campaignId, UpdateSmsCampaign updateSmsCampaign); + + /// + /// Updates an SMS campaign + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the SMS campaign + /// Values to update an SMS Campaign + /// Task of ApiResponse + System.Threading.Tasks.Task> UpdateSmsCampaignAsyncWithHttpInfo (long? campaignId, UpdateSmsCampaign updateSmsCampaign); + /// + /// Update the campaign status + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the campaign + /// Status of the campaign. + /// Task of void + System.Threading.Tasks.Task UpdateSmsCampaignStatusAsync (long? campaignId, UpdateCampaignStatus status); + + /// + /// Update the campaign status + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the campaign + /// Status of the campaign. + /// Task of ApiResponse + System.Threading.Tasks.Task> UpdateSmsCampaignStatusAsyncWithHttpInfo (long? campaignId, UpdateCampaignStatus status); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class SMSCampaignsApi : ISMSCampaignsApi + { + private sib_api_v3_sdk.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public SMSCampaignsApi(String basePath) + { + this.Configuration = new sib_api_v3_sdk.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = sib_api_v3_sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public SMSCampaignsApi(sib_api_v3_sdk.Client.Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = sib_api_v3_sdk.Client.Configuration.Default; + else + this.Configuration = configuration; + + ExceptionFactory = sib_api_v3_sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + + /// + /// Sets the base path of the API client. + /// + /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] + public void SetBasePath(String basePath) + { + // do nothing + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public sib_api_v3_sdk.Client.Configuration Configuration {get; set;} + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public sib_api_v3_sdk.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public IDictionary DefaultHeader() + { + return new ReadOnlyDictionary(this.Configuration.DefaultHeader); + } + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + + /// + /// Creates an SMS campaign + /// + /// Thrown when fails to make API call + /// Values to create an SMS Campaign + /// CreateModel + public CreateModel CreateSmsCampaign (CreateSmsCampaign createSmsCampaign) + { + ApiResponse localVarResponse = CreateSmsCampaignWithHttpInfo(createSmsCampaign); + return localVarResponse.Data; + } + + /// + /// Creates an SMS campaign + /// + /// Thrown when fails to make API call + /// Values to create an SMS Campaign + /// ApiResponse of CreateModel + public ApiResponse< CreateModel > CreateSmsCampaignWithHttpInfo (CreateSmsCampaign createSmsCampaign) + { + // verify the required parameter 'createSmsCampaign' is set + if (createSmsCampaign == null) + throw new ApiException(400, "Missing required parameter 'createSmsCampaign' when calling SMSCampaignsApi->CreateSmsCampaign"); + + var localVarPath = "/smsCampaigns"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (createSmsCampaign != null && createSmsCampaign.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(createSmsCampaign); // http body (model) parameter + } + else + { + localVarPostBody = createSmsCampaign; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateSmsCampaign", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (CreateModel) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateModel))); + } + + /// + /// Creates an SMS campaign + /// + /// Thrown when fails to make API call + /// Values to create an SMS Campaign + /// Task of CreateModel + public async System.Threading.Tasks.Task CreateSmsCampaignAsync (CreateSmsCampaign createSmsCampaign) + { + ApiResponse localVarResponse = await CreateSmsCampaignAsyncWithHttpInfo(createSmsCampaign); + return localVarResponse.Data; + + } + + /// + /// Creates an SMS campaign + /// + /// Thrown when fails to make API call + /// Values to create an SMS Campaign + /// Task of ApiResponse (CreateModel) + public async System.Threading.Tasks.Task> CreateSmsCampaignAsyncWithHttpInfo (CreateSmsCampaign createSmsCampaign) + { + // verify the required parameter 'createSmsCampaign' is set + if (createSmsCampaign == null) + throw new ApiException(400, "Missing required parameter 'createSmsCampaign' when calling SMSCampaignsApi->CreateSmsCampaign"); + + var localVarPath = "/smsCampaigns"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (createSmsCampaign != null && createSmsCampaign.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(createSmsCampaign); // http body (model) parameter + } + else + { + localVarPostBody = createSmsCampaign; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateSmsCampaign", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (CreateModel) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateModel))); + } + + /// + /// Delete the SMS campaign + /// + /// Thrown when fails to make API call + /// id of the SMS campaign + /// + public void DeleteSmsCampaign (long? campaignId) + { + DeleteSmsCampaignWithHttpInfo(campaignId); + } + + /// + /// Delete the SMS campaign + /// + /// Thrown when fails to make API call + /// id of the SMS campaign + /// ApiResponse of Object(void) + public ApiResponse DeleteSmsCampaignWithHttpInfo (long? campaignId) + { + // verify the required parameter 'campaignId' is set + if (campaignId == null) + throw new ApiException(400, "Missing required parameter 'campaignId' when calling SMSCampaignsApi->DeleteSmsCampaign"); + + var localVarPath = "/smsCampaigns/{campaignId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (campaignId != null) localVarPathParams.Add("campaignId", this.Configuration.ApiClient.ParameterToString(campaignId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteSmsCampaign", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Delete the SMS campaign + /// + /// Thrown when fails to make API call + /// id of the SMS campaign + /// Task of void + public async System.Threading.Tasks.Task DeleteSmsCampaignAsync (long? campaignId) + { + await DeleteSmsCampaignAsyncWithHttpInfo(campaignId); + + } + + /// + /// Delete the SMS campaign + /// + /// Thrown when fails to make API call + /// id of the SMS campaign + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteSmsCampaignAsyncWithHttpInfo (long? campaignId) + { + // verify the required parameter 'campaignId' is set + if (campaignId == null) + throw new ApiException(400, "Missing required parameter 'campaignId' when calling SMSCampaignsApi->DeleteSmsCampaign"); + + var localVarPath = "/smsCampaigns/{campaignId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (campaignId != null) localVarPathParams.Add("campaignId", this.Configuration.ApiClient.ParameterToString(campaignId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteSmsCampaign", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Get an SMS campaign + /// + /// Thrown when fails to make API call + /// id of the SMS campaign + /// GetSmsCampaign + public GetSmsCampaign GetSmsCampaign (long? campaignId) + { + ApiResponse localVarResponse = GetSmsCampaignWithHttpInfo(campaignId); + return localVarResponse.Data; + } + + /// + /// Get an SMS campaign + /// + /// Thrown when fails to make API call + /// id of the SMS campaign + /// ApiResponse of GetSmsCampaign + public ApiResponse< GetSmsCampaign > GetSmsCampaignWithHttpInfo (long? campaignId) + { + // verify the required parameter 'campaignId' is set + if (campaignId == null) + throw new ApiException(400, "Missing required parameter 'campaignId' when calling SMSCampaignsApi->GetSmsCampaign"); + + var localVarPath = "/smsCampaigns/{campaignId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (campaignId != null) localVarPathParams.Add("campaignId", this.Configuration.ApiClient.ParameterToString(campaignId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetSmsCampaign", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetSmsCampaign) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSmsCampaign))); + } + + /// + /// Get an SMS campaign + /// + /// Thrown when fails to make API call + /// id of the SMS campaign + /// Task of GetSmsCampaign + public async System.Threading.Tasks.Task GetSmsCampaignAsync (long? campaignId) + { + ApiResponse localVarResponse = await GetSmsCampaignAsyncWithHttpInfo(campaignId); + return localVarResponse.Data; + + } + + /// + /// Get an SMS campaign + /// + /// Thrown when fails to make API call + /// id of the SMS campaign + /// Task of ApiResponse (GetSmsCampaign) + public async System.Threading.Tasks.Task> GetSmsCampaignAsyncWithHttpInfo (long? campaignId) + { + // verify the required parameter 'campaignId' is set + if (campaignId == null) + throw new ApiException(400, "Missing required parameter 'campaignId' when calling SMSCampaignsApi->GetSmsCampaign"); + + var localVarPath = "/smsCampaigns/{campaignId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (campaignId != null) localVarPathParams.Add("campaignId", this.Configuration.ApiClient.ParameterToString(campaignId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetSmsCampaign", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetSmsCampaign) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSmsCampaign))); + } + + /// + /// Returns the informations for all your created SMS campaigns + /// + /// Thrown when fails to make API call + /// Status of campaign. (optional) + /// Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + /// Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + /// Number limitation for the result returned (optional, default to 500) + /// Beginning point in the list to retrieve from. (optional, default to 0) + /// GetSmsCampaigns + public GetSmsCampaigns GetSmsCampaigns (string status = null, DateTime? startDate = null, DateTime? endDate = null, long? limit = null, long? offset = null) + { + ApiResponse localVarResponse = GetSmsCampaignsWithHttpInfo(status, startDate, endDate, limit, offset); + return localVarResponse.Data; + } + + /// + /// Returns the informations for all your created SMS campaigns + /// + /// Thrown when fails to make API call + /// Status of campaign. (optional) + /// Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + /// Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + /// Number limitation for the result returned (optional, default to 500) + /// Beginning point in the list to retrieve from. (optional, default to 0) + /// ApiResponse of GetSmsCampaigns + public ApiResponse< GetSmsCampaigns > GetSmsCampaignsWithHttpInfo (string status = null, DateTime? startDate = null, DateTime? endDate = null, long? limit = null, long? offset = null) + { + + var localVarPath = "/smsCampaigns"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (status != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "status", status)); // query parameter + if (startDate != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "startDate", startDate)); // query parameter + if (endDate != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "endDate", endDate)); // query parameter + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (offset != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetSmsCampaigns", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetSmsCampaigns) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSmsCampaigns))); + } + + /// + /// Returns the informations for all your created SMS campaigns + /// + /// Thrown when fails to make API call + /// Status of campaign. (optional) + /// Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + /// Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + /// Number limitation for the result returned (optional, default to 500) + /// Beginning point in the list to retrieve from. (optional, default to 0) + /// Task of GetSmsCampaigns + public async System.Threading.Tasks.Task GetSmsCampaignsAsync (string status = null, DateTime? startDate = null, DateTime? endDate = null, long? limit = null, long? offset = null) + { + ApiResponse localVarResponse = await GetSmsCampaignsAsyncWithHttpInfo(status, startDate, endDate, limit, offset); + return localVarResponse.Data; + + } + + /// + /// Returns the informations for all your created SMS campaigns + /// + /// Thrown when fails to make API call + /// Status of campaign. (optional) + /// Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + /// Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + /// Number limitation for the result returned (optional, default to 500) + /// Beginning point in the list to retrieve from. (optional, default to 0) + /// Task of ApiResponse (GetSmsCampaigns) + public async System.Threading.Tasks.Task> GetSmsCampaignsAsyncWithHttpInfo (string status = null, DateTime? startDate = null, DateTime? endDate = null, long? limit = null, long? offset = null) + { + + var localVarPath = "/smsCampaigns"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (status != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "status", status)); // query parameter + if (startDate != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "startDate", startDate)); // query parameter + if (endDate != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "endDate", endDate)); // query parameter + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (offset != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetSmsCampaigns", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetSmsCampaigns) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSmsCampaigns))); + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// id of the campaign + /// Values to send for a recipient export request (optional) + /// CreatedProcessId + public CreatedProcessId RequestSmsRecipientExport (long? campaignId, RequestSmsRecipientExport recipientExport = null) + { + ApiResponse localVarResponse = RequestSmsRecipientExportWithHttpInfo(campaignId, recipientExport); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// id of the campaign + /// Values to send for a recipient export request (optional) + /// ApiResponse of CreatedProcessId + public ApiResponse< CreatedProcessId > RequestSmsRecipientExportWithHttpInfo (long? campaignId, RequestSmsRecipientExport recipientExport = null) + { + // verify the required parameter 'campaignId' is set + if (campaignId == null) + throw new ApiException(400, "Missing required parameter 'campaignId' when calling SMSCampaignsApi->RequestSmsRecipientExport"); + + var localVarPath = "/smsCampaigns/{campaignId}/exportRecipients"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (campaignId != null) localVarPathParams.Add("campaignId", this.Configuration.ApiClient.ParameterToString(campaignId)); // path parameter + if (recipientExport != null && recipientExport.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(recipientExport); // http body (model) parameter + } + else + { + localVarPostBody = recipientExport; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("RequestSmsRecipientExport", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (CreatedProcessId) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreatedProcessId))); + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// id of the campaign + /// Values to send for a recipient export request (optional) + /// Task of CreatedProcessId + public async System.Threading.Tasks.Task RequestSmsRecipientExportAsync (long? campaignId, RequestSmsRecipientExport recipientExport = null) + { + ApiResponse localVarResponse = await RequestSmsRecipientExportAsyncWithHttpInfo(campaignId, recipientExport); + return localVarResponse.Data; + + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// id of the campaign + /// Values to send for a recipient export request (optional) + /// Task of ApiResponse (CreatedProcessId) + public async System.Threading.Tasks.Task> RequestSmsRecipientExportAsyncWithHttpInfo (long? campaignId, RequestSmsRecipientExport recipientExport = null) + { + // verify the required parameter 'campaignId' is set + if (campaignId == null) + throw new ApiException(400, "Missing required parameter 'campaignId' when calling SMSCampaignsApi->RequestSmsRecipientExport"); + + var localVarPath = "/smsCampaigns/{campaignId}/exportRecipients"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (campaignId != null) localVarPathParams.Add("campaignId", this.Configuration.ApiClient.ParameterToString(campaignId)); // path parameter + if (recipientExport != null && recipientExport.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(recipientExport); // http body (model) parameter + } + else + { + localVarPostBody = recipientExport; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("RequestSmsRecipientExport", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (CreatedProcessId) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreatedProcessId))); + } + + /// + /// Send your SMS campaign immediately + /// + /// Thrown when fails to make API call + /// id of the campaign + /// + public void SendSmsCampaignNow (long? campaignId) + { + SendSmsCampaignNowWithHttpInfo(campaignId); + } + + /// + /// Send your SMS campaign immediately + /// + /// Thrown when fails to make API call + /// id of the campaign + /// ApiResponse of Object(void) + public ApiResponse SendSmsCampaignNowWithHttpInfo (long? campaignId) + { + // verify the required parameter 'campaignId' is set + if (campaignId == null) + throw new ApiException(400, "Missing required parameter 'campaignId' when calling SMSCampaignsApi->SendSmsCampaignNow"); + + var localVarPath = "/smsCampaigns/{campaignId}/sendNow"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (campaignId != null) localVarPathParams.Add("campaignId", this.Configuration.ApiClient.ParameterToString(campaignId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("SendSmsCampaignNow", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Send your SMS campaign immediately + /// + /// Thrown when fails to make API call + /// id of the campaign + /// Task of void + public async System.Threading.Tasks.Task SendSmsCampaignNowAsync (long? campaignId) + { + await SendSmsCampaignNowAsyncWithHttpInfo(campaignId); + + } + + /// + /// Send your SMS campaign immediately + /// + /// Thrown when fails to make API call + /// id of the campaign + /// Task of ApiResponse + public async System.Threading.Tasks.Task> SendSmsCampaignNowAsyncWithHttpInfo (long? campaignId) + { + // verify the required parameter 'campaignId' is set + if (campaignId == null) + throw new ApiException(400, "Missing required parameter 'campaignId' when calling SMSCampaignsApi->SendSmsCampaignNow"); + + var localVarPath = "/smsCampaigns/{campaignId}/sendNow"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (campaignId != null) localVarPathParams.Add("campaignId", this.Configuration.ApiClient.ParameterToString(campaignId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("SendSmsCampaignNow", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// id of the campaign + /// Values for send a report + /// + public void SendSmsReport (long? campaignId, SendReport sendReport) + { + 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. + /// + /// Thrown when fails to make API call + /// id of the campaign + /// Values for send a report + /// ApiResponse of Object(void) + public ApiResponse SendSmsReportWithHttpInfo (long? campaignId, SendReport sendReport) + { + // verify the required parameter 'campaignId' is set + if (campaignId == null) + throw new ApiException(400, "Missing required parameter 'campaignId' when calling SMSCampaignsApi->SendSmsReport"); + // verify the required parameter 'sendReport' is set + if (sendReport == null) + throw new ApiException(400, "Missing required parameter 'sendReport' when calling SMSCampaignsApi->SendSmsReport"); + + var localVarPath = "/smsCampaigns/{campaignId}/sendReport"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (campaignId != null) localVarPathParams.Add("campaignId", this.Configuration.ApiClient.ParameterToString(campaignId)); // path parameter + if (sendReport != null && sendReport.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(sendReport); // http body (model) parameter + } + else + { + localVarPostBody = sendReport; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("SendSmsReport", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// id of the campaign + /// Values for send a report + /// Task of void + public async System.Threading.Tasks.Task SendSmsReportAsync (long? campaignId, SendReport sendReport) + { + await SendSmsReportAsyncWithHttpInfo(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. + /// + /// Thrown when fails to make API call + /// id of the campaign + /// Values for send a report + /// Task of ApiResponse + public async System.Threading.Tasks.Task> SendSmsReportAsyncWithHttpInfo (long? campaignId, SendReport sendReport) + { + // verify the required parameter 'campaignId' is set + if (campaignId == null) + throw new ApiException(400, "Missing required parameter 'campaignId' when calling SMSCampaignsApi->SendSmsReport"); + // verify the required parameter 'sendReport' is set + if (sendReport == null) + throw new ApiException(400, "Missing required parameter 'sendReport' when calling SMSCampaignsApi->SendSmsReport"); + + var localVarPath = "/smsCampaigns/{campaignId}/sendReport"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (campaignId != null) localVarPathParams.Add("campaignId", this.Configuration.ApiClient.ParameterToString(campaignId)); // path parameter + if (sendReport != null && sendReport.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(sendReport); // http body (model) parameter + } + else + { + localVarPostBody = sendReport; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("SendSmsReport", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Send an SMS + /// + /// Thrown when fails to make API call + /// Id of the SMS campaign + /// Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted + /// + public void SendTestSms (long? campaignId, SendTestSms phoneNumber) + { + SendTestSmsWithHttpInfo(campaignId, phoneNumber); + } + + /// + /// Send an SMS + /// + /// Thrown when fails to make API call + /// Id of the SMS campaign + /// Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted + /// ApiResponse of Object(void) + public ApiResponse SendTestSmsWithHttpInfo (long? campaignId, SendTestSms phoneNumber) + { + // verify the required parameter 'campaignId' is set + if (campaignId == null) + throw new ApiException(400, "Missing required parameter 'campaignId' when calling SMSCampaignsApi->SendTestSms"); + // verify the required parameter 'phoneNumber' is set + if (phoneNumber == null) + throw new ApiException(400, "Missing required parameter 'phoneNumber' when calling SMSCampaignsApi->SendTestSms"); + + var localVarPath = "/smsCampaigns/{campaignId}/sendTest"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (campaignId != null) localVarPathParams.Add("campaignId", this.Configuration.ApiClient.ParameterToString(campaignId)); // path parameter + if (phoneNumber != null && phoneNumber.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(phoneNumber); // http body (model) parameter + } + else + { + localVarPostBody = phoneNumber; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("SendTestSms", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Send an SMS + /// + /// Thrown when fails to make API call + /// Id of the SMS campaign + /// Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted + /// Task of void + public async System.Threading.Tasks.Task SendTestSmsAsync (long? campaignId, SendTestSms phoneNumber) + { + await SendTestSmsAsyncWithHttpInfo(campaignId, phoneNumber); + + } + + /// + /// Send an SMS + /// + /// Thrown when fails to make API call + /// Id of the SMS campaign + /// Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted + /// Task of ApiResponse + public async System.Threading.Tasks.Task> SendTestSmsAsyncWithHttpInfo (long? campaignId, SendTestSms phoneNumber) + { + // verify the required parameter 'campaignId' is set + if (campaignId == null) + throw new ApiException(400, "Missing required parameter 'campaignId' when calling SMSCampaignsApi->SendTestSms"); + // verify the required parameter 'phoneNumber' is set + if (phoneNumber == null) + throw new ApiException(400, "Missing required parameter 'phoneNumber' when calling SMSCampaignsApi->SendTestSms"); + + var localVarPath = "/smsCampaigns/{campaignId}/sendTest"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (campaignId != null) localVarPathParams.Add("campaignId", this.Configuration.ApiClient.ParameterToString(campaignId)); // path parameter + if (phoneNumber != null && phoneNumber.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(phoneNumber); // http body (model) parameter + } + else + { + localVarPostBody = phoneNumber; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("SendTestSms", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Updates an SMS campaign + /// + /// Thrown when fails to make API call + /// id of the SMS campaign + /// Values to update an SMS Campaign + /// + public void UpdateSmsCampaign (long? campaignId, UpdateSmsCampaign updateSmsCampaign) + { + UpdateSmsCampaignWithHttpInfo(campaignId, updateSmsCampaign); + } + + /// + /// Updates an SMS campaign + /// + /// Thrown when fails to make API call + /// id of the SMS campaign + /// Values to update an SMS Campaign + /// ApiResponse of Object(void) + public ApiResponse UpdateSmsCampaignWithHttpInfo (long? campaignId, UpdateSmsCampaign updateSmsCampaign) + { + // verify the required parameter 'campaignId' is set + if (campaignId == null) + throw new ApiException(400, "Missing required parameter 'campaignId' when calling SMSCampaignsApi->UpdateSmsCampaign"); + // verify the required parameter 'updateSmsCampaign' is set + if (updateSmsCampaign == null) + throw new ApiException(400, "Missing required parameter 'updateSmsCampaign' when calling SMSCampaignsApi->UpdateSmsCampaign"); + + var localVarPath = "/smsCampaigns/{campaignId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (campaignId != null) localVarPathParams.Add("campaignId", this.Configuration.ApiClient.ParameterToString(campaignId)); // path parameter + if (updateSmsCampaign != null && updateSmsCampaign.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(updateSmsCampaign); // http body (model) parameter + } + else + { + localVarPostBody = updateSmsCampaign; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateSmsCampaign", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Updates an SMS campaign + /// + /// Thrown when fails to make API call + /// id of the SMS campaign + /// Values to update an SMS Campaign + /// Task of void + public async System.Threading.Tasks.Task UpdateSmsCampaignAsync (long? campaignId, UpdateSmsCampaign updateSmsCampaign) + { + await UpdateSmsCampaignAsyncWithHttpInfo(campaignId, updateSmsCampaign); + + } + + /// + /// Updates an SMS campaign + /// + /// Thrown when fails to make API call + /// id of the SMS campaign + /// Values to update an SMS Campaign + /// Task of ApiResponse + public async System.Threading.Tasks.Task> UpdateSmsCampaignAsyncWithHttpInfo (long? campaignId, UpdateSmsCampaign updateSmsCampaign) + { + // verify the required parameter 'campaignId' is set + if (campaignId == null) + throw new ApiException(400, "Missing required parameter 'campaignId' when calling SMSCampaignsApi->UpdateSmsCampaign"); + // verify the required parameter 'updateSmsCampaign' is set + if (updateSmsCampaign == null) + throw new ApiException(400, "Missing required parameter 'updateSmsCampaign' when calling SMSCampaignsApi->UpdateSmsCampaign"); + + var localVarPath = "/smsCampaigns/{campaignId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (campaignId != null) localVarPathParams.Add("campaignId", this.Configuration.ApiClient.ParameterToString(campaignId)); // path parameter + if (updateSmsCampaign != null && updateSmsCampaign.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(updateSmsCampaign); // http body (model) parameter + } + else + { + localVarPostBody = updateSmsCampaign; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateSmsCampaign", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Update the campaign status + /// + /// Thrown when fails to make API call + /// id of the campaign + /// Status of the campaign. + /// + public void UpdateSmsCampaignStatus (long? campaignId, UpdateCampaignStatus status) + { + UpdateSmsCampaignStatusWithHttpInfo(campaignId, status); + } + + /// + /// Update the campaign status + /// + /// Thrown when fails to make API call + /// id of the campaign + /// Status of the campaign. + /// ApiResponse of Object(void) + public ApiResponse UpdateSmsCampaignStatusWithHttpInfo (long? campaignId, UpdateCampaignStatus status) + { + // verify the required parameter 'campaignId' is set + if (campaignId == null) + throw new ApiException(400, "Missing required parameter 'campaignId' when calling SMSCampaignsApi->UpdateSmsCampaignStatus"); + // verify the required parameter 'status' is set + if (status == null) + throw new ApiException(400, "Missing required parameter 'status' when calling SMSCampaignsApi->UpdateSmsCampaignStatus"); + + var localVarPath = "/smsCampaigns/{campaignId}/status"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (campaignId != null) localVarPathParams.Add("campaignId", this.Configuration.ApiClient.ParameterToString(campaignId)); // path parameter + if (status != null && status.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(status); // http body (model) parameter + } + else + { + localVarPostBody = status; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateSmsCampaignStatus", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Update the campaign status + /// + /// Thrown when fails to make API call + /// id of the campaign + /// Status of the campaign. + /// Task of void + public async System.Threading.Tasks.Task UpdateSmsCampaignStatusAsync (long? campaignId, UpdateCampaignStatus status) + { + await UpdateSmsCampaignStatusAsyncWithHttpInfo(campaignId, status); + + } + + /// + /// Update the campaign status + /// + /// Thrown when fails to make API call + /// id of the campaign + /// Status of the campaign. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> UpdateSmsCampaignStatusAsyncWithHttpInfo (long? campaignId, UpdateCampaignStatus status) + { + // verify the required parameter 'campaignId' is set + if (campaignId == null) + throw new ApiException(400, "Missing required parameter 'campaignId' when calling SMSCampaignsApi->UpdateSmsCampaignStatus"); + // verify the required parameter 'status' is set + if (status == null) + throw new ApiException(400, "Missing required parameter 'status' when calling SMSCampaignsApi->UpdateSmsCampaignStatus"); + + var localVarPath = "/smsCampaigns/{campaignId}/status"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (campaignId != null) localVarPathParams.Add("campaignId", this.Configuration.ApiClient.ParameterToString(campaignId)); // path parameter + if (status != null && status.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(status); // http body (model) parameter + } + else + { + localVarPostBody = status; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateSmsCampaignStatus", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + } +} diff --git a/src/sib_api_v3_sdk/Api/SMTPApi.cs b/src/sib_api_v3_sdk/Api/SMTPApi.cs new file mode 100644 index 0000000..73d0d79 --- /dev/null +++ b/src/sib_api_v3_sdk/Api/SMTPApi.cs @@ -0,0 +1,2778 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using RestSharp; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace sib_api_v3_sdk.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ISMTPApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Create an smtp template + /// + /// + /// + /// + /// Thrown when fails to make API call + /// values to update in smtp template + /// CreateModel + CreateModel CreateSmtpTemplate (CreateSmtpTemplate smtpTemplate); + + /// + /// Create an smtp template + /// + /// + /// + /// + /// Thrown when fails to make API call + /// values to update in smtp template + /// ApiResponse of CreateModel + ApiResponse CreateSmtpTemplateWithHttpInfo (CreateSmtpTemplate smtpTemplate); + /// + /// Delete hardbounces + /// + /// + /// Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures) + /// + /// Thrown when fails to make API call + /// values to delete hardbounces (optional) + /// + void DeleteHardbounces (DeleteHardbounces deleteHardbounces = null); + + /// + /// Delete hardbounces + /// + /// + /// Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures) + /// + /// Thrown when fails to make API call + /// values to delete hardbounces (optional) + /// ApiResponse of Object(void) + ApiResponse DeleteHardbouncesWithHttpInfo (DeleteHardbounces deleteHardbounces = null); + /// + /// Delete an inactive smtp template + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the template + /// + void DeleteSmtpTemplate (long? templateId); + + /// + /// Delete an inactive smtp template + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the template + /// ApiResponse of Object(void) + ApiResponse DeleteSmtpTemplateWithHttpInfo (long? templateId); + /// + /// Get your SMTP activity aggregated over a period of time + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + /// Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Tag of the emails (optional) + /// GetAggregatedReport + GetAggregatedReport GetAggregatedSmtpReport (string startDate = null, string endDate = null, int? days = null, string tag = null); + + /// + /// Get your SMTP activity aggregated over a period of time + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + /// Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Tag of the emails (optional) + /// ApiResponse of GetAggregatedReport + ApiResponse GetAggregatedSmtpReportWithHttpInfo (string startDate = null, string endDate = null, int? days = null, string tag = null); + /// + /// Get all your SMTP activity (unaggregated events) + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number limitation for the result returned (optional, default to 50) + /// Beginning point in the list to retrieve from. (optional, default to 0) + /// Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + /// Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Filter the report for a specific email addresses (optional) + /// Filter the report for a specific event type (optional) + /// Filter the report for tags (serialized and urlencoded array) (optional) + /// Filter on a specific message id (optional) + /// Filter on a specific template id (optional) + /// GetEmailEventReport + GetEmailEventReport GetEmailEventReport (long? limit = null, long? offset = null, string startDate = null, string endDate = null, int? days = null, string email = null, string _event = null, string tags = null, string messageId = null, long? templateId = null); + + /// + /// Get all your SMTP activity (unaggregated events) + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number limitation for the result returned (optional, default to 50) + /// Beginning point in the list to retrieve from. (optional, default to 0) + /// Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + /// Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Filter the report for a specific email addresses (optional) + /// Filter the report for a specific event type (optional) + /// Filter the report for tags (serialized and urlencoded array) (optional) + /// Filter on a specific message id (optional) + /// Filter on a specific template id (optional) + /// ApiResponse of GetEmailEventReport + ApiResponse GetEmailEventReportWithHttpInfo (long? limit = null, long? offset = null, string startDate = null, string endDate = null, int? days = null, string email = null, string _event = null, string tags = null, string messageId = null, long? templateId = null); + /// + /// Get your SMTP activity aggregated per day + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number of documents returned per page (optional, default to 50) + /// Index of the first document on the page (optional, default to 0) + /// Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) (optional) + /// Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) (optional) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Tag of the emails (optional) + /// GetReports + GetReports GetSmtpReport (long? limit = null, long? offset = null, string startDate = null, string endDate = null, int? days = null, string tag = null); + + /// + /// Get your SMTP activity aggregated per day + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number of documents returned per page (optional, default to 50) + /// Index of the first document on the page (optional, default to 0) + /// Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) (optional) + /// Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) (optional) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Tag of the emails (optional) + /// ApiResponse of GetReports + ApiResponse GetSmtpReportWithHttpInfo (long? limit = null, long? offset = null, string startDate = null, string endDate = null, int? days = null, string tag = null); + /// + /// Returns the template informations + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the template + /// GetSmtpTemplateOverview + GetSmtpTemplateOverview GetSmtpTemplate (long? templateId); + + /// + /// Returns the template informations + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the template + /// ApiResponse of GetSmtpTemplateOverview + ApiResponse GetSmtpTemplateWithHttpInfo (long? templateId); + /// + /// Get the list of SMTP templates + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Filter on the status of the template. Active = true, inactive = false (optional) + /// Number of documents returned per page (optional, default to 50) + /// Index of the first document in the page (optional, default to 0) + /// GetSmtpTemplates + GetSmtpTemplates GetSmtpTemplates (bool? templateStatus = null, long? limit = null, long? offset = null); + + /// + /// Get the list of SMTP templates + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Filter on the status of the template. Active = true, inactive = false (optional) + /// Number of documents returned per page (optional, default to 50) + /// Index of the first document in the page (optional, default to 0) + /// ApiResponse of GetSmtpTemplates + ApiResponse GetSmtpTemplatesWithHttpInfo (bool? templateStatus = null, long? limit = null, long? offset = null); + /// + /// Send a template + /// + /// + /// This endpoint is deprecated. Prefer v3/smtp/email instead. + /// + /// Thrown when fails to make API call + /// Id of the template + /// + /// SendTemplateEmail + SendTemplateEmail SendTemplate (long? templateId, SendEmail sendEmail); + + /// + /// Send a template + /// + /// + /// This endpoint is deprecated. Prefer v3/smtp/email instead. + /// + /// Thrown when fails to make API call + /// Id of the template + /// + /// ApiResponse of SendTemplateEmail + ApiResponse SendTemplateWithHttpInfo (long? templateId, SendEmail sendEmail); + /// + /// Send a template to your test list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the template + /// + /// + void SendTestTemplate (long? templateId, SendTestEmail sendTestEmail); + + /// + /// Send a template to your test list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the template + /// + /// ApiResponse of Object(void) + ApiResponse SendTestTemplateWithHttpInfo (long? templateId, SendTestEmail sendTestEmail); + /// + /// Send a transactional email + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Values to send a transactional email + /// CreateSmtpEmail + CreateSmtpEmail SendTransacEmail (SendSmtpEmail sendSmtpEmail); + + /// + /// Send a transactional email + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Values to send a transactional email + /// ApiResponse of CreateSmtpEmail + ApiResponse SendTransacEmailWithHttpInfo (SendSmtpEmail sendSmtpEmail); + /// + /// Updates an smtp templates + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the template + /// values to update in smtp template + /// + void UpdateSmtpTemplate (long? templateId, UpdateSmtpTemplate smtpTemplate); + + /// + /// Updates an smtp templates + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the template + /// values to update in smtp template + /// ApiResponse of Object(void) + ApiResponse UpdateSmtpTemplateWithHttpInfo (long? templateId, UpdateSmtpTemplate smtpTemplate); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Create an smtp template + /// + /// + /// + /// + /// Thrown when fails to make API call + /// values to update in smtp template + /// Task of CreateModel + System.Threading.Tasks.Task CreateSmtpTemplateAsync (CreateSmtpTemplate smtpTemplate); + + /// + /// Create an smtp template + /// + /// + /// + /// + /// Thrown when fails to make API call + /// values to update in smtp template + /// Task of ApiResponse (CreateModel) + System.Threading.Tasks.Task> CreateSmtpTemplateAsyncWithHttpInfo (CreateSmtpTemplate smtpTemplate); + /// + /// Delete hardbounces + /// + /// + /// Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures) + /// + /// Thrown when fails to make API call + /// values to delete hardbounces (optional) + /// Task of void + System.Threading.Tasks.Task DeleteHardbouncesAsync (DeleteHardbounces deleteHardbounces = null); + + /// + /// Delete hardbounces + /// + /// + /// Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures) + /// + /// Thrown when fails to make API call + /// values to delete hardbounces (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteHardbouncesAsyncWithHttpInfo (DeleteHardbounces deleteHardbounces = null); + /// + /// Delete an inactive smtp template + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the template + /// Task of void + System.Threading.Tasks.Task DeleteSmtpTemplateAsync (long? templateId); + + /// + /// Delete an inactive smtp template + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the template + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteSmtpTemplateAsyncWithHttpInfo (long? templateId); + /// + /// Get your SMTP activity aggregated over a period of time + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + /// Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Tag of the emails (optional) + /// Task of GetAggregatedReport + System.Threading.Tasks.Task GetAggregatedSmtpReportAsync (string startDate = null, string endDate = null, int? days = null, string tag = null); + + /// + /// Get your SMTP activity aggregated over a period of time + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + /// Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Tag of the emails (optional) + /// Task of ApiResponse (GetAggregatedReport) + System.Threading.Tasks.Task> GetAggregatedSmtpReportAsyncWithHttpInfo (string startDate = null, string endDate = null, int? days = null, string tag = null); + /// + /// Get all your SMTP activity (unaggregated events) + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number limitation for the result returned (optional, default to 50) + /// Beginning point in the list to retrieve from. (optional, default to 0) + /// Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + /// Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Filter the report for a specific email addresses (optional) + /// Filter the report for a specific event type (optional) + /// Filter the report for tags (serialized and urlencoded array) (optional) + /// Filter on a specific message id (optional) + /// Filter on a specific template id (optional) + /// Task of GetEmailEventReport + System.Threading.Tasks.Task GetEmailEventReportAsync (long? limit = null, long? offset = null, string startDate = null, string endDate = null, int? days = null, string email = null, string _event = null, string tags = null, string messageId = null, long? templateId = null); + + /// + /// Get all your SMTP activity (unaggregated events) + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number limitation for the result returned (optional, default to 50) + /// Beginning point in the list to retrieve from. (optional, default to 0) + /// Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + /// Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Filter the report for a specific email addresses (optional) + /// Filter the report for a specific event type (optional) + /// Filter the report for tags (serialized and urlencoded array) (optional) + /// Filter on a specific message id (optional) + /// Filter on a specific template id (optional) + /// Task of ApiResponse (GetEmailEventReport) + System.Threading.Tasks.Task> GetEmailEventReportAsyncWithHttpInfo (long? limit = null, long? offset = null, string startDate = null, string endDate = null, int? days = null, string email = null, string _event = null, string tags = null, string messageId = null, long? templateId = null); + /// + /// Get your SMTP activity aggregated per day + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number of documents returned per page (optional, default to 50) + /// Index of the first document on the page (optional, default to 0) + /// Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) (optional) + /// Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) (optional) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Tag of the emails (optional) + /// Task of GetReports + System.Threading.Tasks.Task GetSmtpReportAsync (long? limit = null, long? offset = null, string startDate = null, string endDate = null, int? days = null, string tag = null); + + /// + /// Get your SMTP activity aggregated per day + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number of documents returned per page (optional, default to 50) + /// Index of the first document on the page (optional, default to 0) + /// Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) (optional) + /// Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) (optional) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Tag of the emails (optional) + /// Task of ApiResponse (GetReports) + System.Threading.Tasks.Task> GetSmtpReportAsyncWithHttpInfo (long? limit = null, long? offset = null, string startDate = null, string endDate = null, int? days = null, string tag = null); + /// + /// Returns the template informations + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the template + /// Task of GetSmtpTemplateOverview + System.Threading.Tasks.Task GetSmtpTemplateAsync (long? templateId); + + /// + /// Returns the template informations + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the template + /// Task of ApiResponse (GetSmtpTemplateOverview) + System.Threading.Tasks.Task> GetSmtpTemplateAsyncWithHttpInfo (long? templateId); + /// + /// Get the list of SMTP templates + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Filter on the status of the template. Active = true, inactive = false (optional) + /// Number of documents returned per page (optional, default to 50) + /// Index of the first document in the page (optional, default to 0) + /// Task of GetSmtpTemplates + System.Threading.Tasks.Task GetSmtpTemplatesAsync (bool? templateStatus = null, long? limit = null, long? offset = null); + + /// + /// Get the list of SMTP templates + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Filter on the status of the template. Active = true, inactive = false (optional) + /// Number of documents returned per page (optional, default to 50) + /// Index of the first document in the page (optional, default to 0) + /// Task of ApiResponse (GetSmtpTemplates) + System.Threading.Tasks.Task> GetSmtpTemplatesAsyncWithHttpInfo (bool? templateStatus = null, long? limit = null, long? offset = null); + /// + /// Send a template + /// + /// + /// This endpoint is deprecated. Prefer v3/smtp/email instead. + /// + /// Thrown when fails to make API call + /// Id of the template + /// + /// Task of SendTemplateEmail + System.Threading.Tasks.Task SendTemplateAsync (long? templateId, SendEmail sendEmail); + + /// + /// Send a template + /// + /// + /// This endpoint is deprecated. Prefer v3/smtp/email instead. + /// + /// Thrown when fails to make API call + /// Id of the template + /// + /// Task of ApiResponse (SendTemplateEmail) + System.Threading.Tasks.Task> SendTemplateAsyncWithHttpInfo (long? templateId, SendEmail sendEmail); + /// + /// Send a template to your test list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the template + /// + /// Task of void + System.Threading.Tasks.Task SendTestTemplateAsync (long? templateId, SendTestEmail sendTestEmail); + + /// + /// Send a template to your test list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the template + /// + /// Task of ApiResponse + System.Threading.Tasks.Task> SendTestTemplateAsyncWithHttpInfo (long? templateId, SendTestEmail sendTestEmail); + /// + /// Send a transactional email + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Values to send a transactional email + /// Task of CreateSmtpEmail + System.Threading.Tasks.Task SendTransacEmailAsync (SendSmtpEmail sendSmtpEmail); + + /// + /// Send a transactional email + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Values to send a transactional email + /// Task of ApiResponse (CreateSmtpEmail) + System.Threading.Tasks.Task> SendTransacEmailAsyncWithHttpInfo (SendSmtpEmail sendSmtpEmail); + /// + /// Updates an smtp templates + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the template + /// values to update in smtp template + /// Task of void + System.Threading.Tasks.Task UpdateSmtpTemplateAsync (long? templateId, UpdateSmtpTemplate smtpTemplate); + + /// + /// Updates an smtp templates + /// + /// + /// + /// + /// Thrown when fails to make API call + /// id of the template + /// values to update in smtp template + /// Task of ApiResponse + System.Threading.Tasks.Task> UpdateSmtpTemplateAsyncWithHttpInfo (long? templateId, UpdateSmtpTemplate smtpTemplate); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class SMTPApi : ISMTPApi + { + private sib_api_v3_sdk.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public SMTPApi(String basePath) + { + this.Configuration = new sib_api_v3_sdk.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = sib_api_v3_sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public SMTPApi(sib_api_v3_sdk.Client.Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = sib_api_v3_sdk.Client.Configuration.Default; + else + this.Configuration = configuration; + + ExceptionFactory = sib_api_v3_sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + + /// + /// Sets the base path of the API client. + /// + /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] + public void SetBasePath(String basePath) + { + // do nothing + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public sib_api_v3_sdk.Client.Configuration Configuration {get; set;} + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public sib_api_v3_sdk.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public IDictionary DefaultHeader() + { + return new ReadOnlyDictionary(this.Configuration.DefaultHeader); + } + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + + /// + /// Create an smtp template + /// + /// Thrown when fails to make API call + /// values to update in smtp template + /// CreateModel + public CreateModel CreateSmtpTemplate (CreateSmtpTemplate smtpTemplate) + { + ApiResponse localVarResponse = CreateSmtpTemplateWithHttpInfo(smtpTemplate); + return localVarResponse.Data; + } + + /// + /// Create an smtp template + /// + /// Thrown when fails to make API call + /// values to update in smtp template + /// ApiResponse of CreateModel + public ApiResponse< CreateModel > CreateSmtpTemplateWithHttpInfo (CreateSmtpTemplate smtpTemplate) + { + // verify the required parameter 'smtpTemplate' is set + if (smtpTemplate == null) + throw new ApiException(400, "Missing required parameter 'smtpTemplate' when calling SMTPApi->CreateSmtpTemplate"); + + var localVarPath = "/smtp/templates"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (smtpTemplate != null && smtpTemplate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(smtpTemplate); // http body (model) parameter + } + else + { + localVarPostBody = smtpTemplate; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateSmtpTemplate", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (CreateModel) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateModel))); + } + + /// + /// Create an smtp template + /// + /// Thrown when fails to make API call + /// values to update in smtp template + /// Task of CreateModel + public async System.Threading.Tasks.Task CreateSmtpTemplateAsync (CreateSmtpTemplate smtpTemplate) + { + ApiResponse localVarResponse = await CreateSmtpTemplateAsyncWithHttpInfo(smtpTemplate); + return localVarResponse.Data; + + } + + /// + /// Create an smtp template + /// + /// Thrown when fails to make API call + /// values to update in smtp template + /// Task of ApiResponse (CreateModel) + public async System.Threading.Tasks.Task> CreateSmtpTemplateAsyncWithHttpInfo (CreateSmtpTemplate smtpTemplate) + { + // verify the required parameter 'smtpTemplate' is set + if (smtpTemplate == null) + throw new ApiException(400, "Missing required parameter 'smtpTemplate' when calling SMTPApi->CreateSmtpTemplate"); + + var localVarPath = "/smtp/templates"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (smtpTemplate != null && smtpTemplate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(smtpTemplate); // http body (model) parameter + } + else + { + localVarPostBody = smtpTemplate; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateSmtpTemplate", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (CreateModel) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateModel))); + } + + /// + /// Delete hardbounces Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures) + /// + /// Thrown when fails to make API call + /// values to delete hardbounces (optional) + /// + public void DeleteHardbounces (DeleteHardbounces deleteHardbounces = null) + { + DeleteHardbouncesWithHttpInfo(deleteHardbounces); + } + + /// + /// Delete hardbounces Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures) + /// + /// Thrown when fails to make API call + /// values to delete hardbounces (optional) + /// ApiResponse of Object(void) + public ApiResponse DeleteHardbouncesWithHttpInfo (DeleteHardbounces deleteHardbounces = null) + { + + var localVarPath = "/smtp/deleteHardbounces"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (deleteHardbounces != null && deleteHardbounces.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(deleteHardbounces); // http body (model) parameter + } + else + { + localVarPostBody = deleteHardbounces; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteHardbounces", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Delete hardbounces Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures) + /// + /// Thrown when fails to make API call + /// values to delete hardbounces (optional) + /// Task of void + public async System.Threading.Tasks.Task DeleteHardbouncesAsync (DeleteHardbounces deleteHardbounces = null) + { + await DeleteHardbouncesAsyncWithHttpInfo(deleteHardbounces); + + } + + /// + /// Delete hardbounces Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures) + /// + /// Thrown when fails to make API call + /// values to delete hardbounces (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteHardbouncesAsyncWithHttpInfo (DeleteHardbounces deleteHardbounces = null) + { + + var localVarPath = "/smtp/deleteHardbounces"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (deleteHardbounces != null && deleteHardbounces.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(deleteHardbounces); // http body (model) parameter + } + else + { + localVarPostBody = deleteHardbounces; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteHardbounces", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Delete an inactive smtp template + /// + /// Thrown when fails to make API call + /// id of the template + /// + public void DeleteSmtpTemplate (long? templateId) + { + DeleteSmtpTemplateWithHttpInfo(templateId); + } + + /// + /// Delete an inactive smtp template + /// + /// Thrown when fails to make API call + /// id of the template + /// ApiResponse of Object(void) + public ApiResponse DeleteSmtpTemplateWithHttpInfo (long? templateId) + { + // verify the required parameter 'templateId' is set + if (templateId == null) + throw new ApiException(400, "Missing required parameter 'templateId' when calling SMTPApi->DeleteSmtpTemplate"); + + var localVarPath = "/smtp/templates/{templateId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (templateId != null) localVarPathParams.Add("templateId", this.Configuration.ApiClient.ParameterToString(templateId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteSmtpTemplate", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Delete an inactive smtp template + /// + /// Thrown when fails to make API call + /// id of the template + /// Task of void + public async System.Threading.Tasks.Task DeleteSmtpTemplateAsync (long? templateId) + { + await DeleteSmtpTemplateAsyncWithHttpInfo(templateId); + + } + + /// + /// Delete an inactive smtp template + /// + /// Thrown when fails to make API call + /// id of the template + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteSmtpTemplateAsyncWithHttpInfo (long? templateId) + { + // verify the required parameter 'templateId' is set + if (templateId == null) + throw new ApiException(400, "Missing required parameter 'templateId' when calling SMTPApi->DeleteSmtpTemplate"); + + var localVarPath = "/smtp/templates/{templateId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (templateId != null) localVarPathParams.Add("templateId", this.Configuration.ApiClient.ParameterToString(templateId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteSmtpTemplate", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Get your SMTP activity aggregated over a period of time + /// + /// Thrown when fails to make API call + /// Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + /// Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Tag of the emails (optional) + /// GetAggregatedReport + public GetAggregatedReport GetAggregatedSmtpReport (string startDate = null, string endDate = null, int? days = null, string tag = null) + { + ApiResponse localVarResponse = GetAggregatedSmtpReportWithHttpInfo(startDate, endDate, days, tag); + return localVarResponse.Data; + } + + /// + /// Get your SMTP activity aggregated over a period of time + /// + /// Thrown when fails to make API call + /// Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + /// Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Tag of the emails (optional) + /// ApiResponse of GetAggregatedReport + public ApiResponse< GetAggregatedReport > GetAggregatedSmtpReportWithHttpInfo (string startDate = null, string endDate = null, int? days = null, string tag = null) + { + + var localVarPath = "/smtp/statistics/aggregatedReport"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (startDate != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "startDate", startDate)); // query parameter + if (endDate != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "endDate", endDate)); // query parameter + if (days != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "days", days)); // query parameter + if (tag != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "tag", tag)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetAggregatedSmtpReport", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetAggregatedReport) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetAggregatedReport))); + } + + /// + /// Get your SMTP activity aggregated over a period of time + /// + /// Thrown when fails to make API call + /// Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + /// Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Tag of the emails (optional) + /// Task of GetAggregatedReport + public async System.Threading.Tasks.Task GetAggregatedSmtpReportAsync (string startDate = null, string endDate = null, int? days = null, string tag = null) + { + ApiResponse localVarResponse = await GetAggregatedSmtpReportAsyncWithHttpInfo(startDate, endDate, days, tag); + return localVarResponse.Data; + + } + + /// + /// Get your SMTP activity aggregated over a period of time + /// + /// Thrown when fails to make API call + /// Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + /// Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Tag of the emails (optional) + /// Task of ApiResponse (GetAggregatedReport) + public async System.Threading.Tasks.Task> GetAggregatedSmtpReportAsyncWithHttpInfo (string startDate = null, string endDate = null, int? days = null, string tag = null) + { + + var localVarPath = "/smtp/statistics/aggregatedReport"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (startDate != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "startDate", startDate)); // query parameter + if (endDate != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "endDate", endDate)); // query parameter + if (days != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "days", days)); // query parameter + if (tag != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "tag", tag)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetAggregatedSmtpReport", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetAggregatedReport) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetAggregatedReport))); + } + + /// + /// Get all your SMTP activity (unaggregated events) + /// + /// Thrown when fails to make API call + /// Number limitation for the result returned (optional, default to 50) + /// Beginning point in the list to retrieve from. (optional, default to 0) + /// Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + /// Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Filter the report for a specific email addresses (optional) + /// Filter the report for a specific event type (optional) + /// Filter the report for tags (serialized and urlencoded array) (optional) + /// Filter on a specific message id (optional) + /// Filter on a specific template id (optional) + /// GetEmailEventReport + public GetEmailEventReport GetEmailEventReport (long? limit = null, long? offset = null, string startDate = null, string endDate = null, int? days = null, string email = null, string _event = null, string tags = null, string messageId = null, long? templateId = null) + { + ApiResponse localVarResponse = GetEmailEventReportWithHttpInfo(limit, offset, startDate, endDate, days, email, _event, tags, messageId, templateId); + return localVarResponse.Data; + } + + /// + /// Get all your SMTP activity (unaggregated events) + /// + /// Thrown when fails to make API call + /// Number limitation for the result returned (optional, default to 50) + /// Beginning point in the list to retrieve from. (optional, default to 0) + /// Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + /// Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Filter the report for a specific email addresses (optional) + /// Filter the report for a specific event type (optional) + /// Filter the report for tags (serialized and urlencoded array) (optional) + /// Filter on a specific message id (optional) + /// Filter on a specific template id (optional) + /// ApiResponse of GetEmailEventReport + public ApiResponse< GetEmailEventReport > GetEmailEventReportWithHttpInfo (long? limit = null, long? offset = null, string startDate = null, string endDate = null, int? days = null, string email = null, string _event = null, string tags = null, string messageId = null, long? templateId = null) + { + + var localVarPath = "/smtp/statistics/events"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (offset != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter + if (startDate != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "startDate", startDate)); // query parameter + if (endDate != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "endDate", endDate)); // query parameter + if (days != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "days", days)); // query parameter + if (email != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "email", email)); // query parameter + if (_event != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "event", _event)); // query parameter + if (tags != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "tags", tags)); // query parameter + if (messageId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "messageId", messageId)); // query parameter + if (templateId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "templateId", templateId)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetEmailEventReport", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetEmailEventReport) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetEmailEventReport))); + } + + /// + /// Get all your SMTP activity (unaggregated events) + /// + /// Thrown when fails to make API call + /// Number limitation for the result returned (optional, default to 50) + /// Beginning point in the list to retrieve from. (optional, default to 0) + /// Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + /// Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Filter the report for a specific email addresses (optional) + /// Filter the report for a specific event type (optional) + /// Filter the report for tags (serialized and urlencoded array) (optional) + /// Filter on a specific message id (optional) + /// Filter on a specific template id (optional) + /// Task of GetEmailEventReport + public async System.Threading.Tasks.Task GetEmailEventReportAsync (long? limit = null, long? offset = null, string startDate = null, string endDate = null, int? days = null, string email = null, string _event = null, string tags = null, string messageId = null, long? templateId = null) + { + ApiResponse localVarResponse = await GetEmailEventReportAsyncWithHttpInfo(limit, offset, startDate, endDate, days, email, _event, tags, messageId, templateId); + return localVarResponse.Data; + + } + + /// + /// Get all your SMTP activity (unaggregated events) + /// + /// Thrown when fails to make API call + /// Number limitation for the result returned (optional, default to 50) + /// Beginning point in the list to retrieve from. (optional, default to 0) + /// Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional) + /// Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Filter the report for a specific email addresses (optional) + /// Filter the report for a specific event type (optional) + /// Filter the report for tags (serialized and urlencoded array) (optional) + /// Filter on a specific message id (optional) + /// Filter on a specific template id (optional) + /// Task of ApiResponse (GetEmailEventReport) + public async System.Threading.Tasks.Task> GetEmailEventReportAsyncWithHttpInfo (long? limit = null, long? offset = null, string startDate = null, string endDate = null, int? days = null, string email = null, string _event = null, string tags = null, string messageId = null, long? templateId = null) + { + + var localVarPath = "/smtp/statistics/events"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (offset != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter + if (startDate != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "startDate", startDate)); // query parameter + if (endDate != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "endDate", endDate)); // query parameter + if (days != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "days", days)); // query parameter + if (email != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "email", email)); // query parameter + if (_event != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "event", _event)); // query parameter + if (tags != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "tags", tags)); // query parameter + if (messageId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "messageId", messageId)); // query parameter + if (templateId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "templateId", templateId)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetEmailEventReport", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetEmailEventReport) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetEmailEventReport))); + } + + /// + /// Get your SMTP activity aggregated per day + /// + /// Thrown when fails to make API call + /// Number of documents returned per page (optional, default to 50) + /// Index of the first document on the page (optional, default to 0) + /// Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) (optional) + /// Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) (optional) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Tag of the emails (optional) + /// GetReports + public GetReports GetSmtpReport (long? limit = null, long? offset = null, string startDate = null, string endDate = null, int? days = null, string tag = null) + { + ApiResponse localVarResponse = GetSmtpReportWithHttpInfo(limit, offset, startDate, endDate, days, tag); + return localVarResponse.Data; + } + + /// + /// Get your SMTP activity aggregated per day + /// + /// Thrown when fails to make API call + /// Number of documents returned per page (optional, default to 50) + /// Index of the first document on the page (optional, default to 0) + /// Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) (optional) + /// Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) (optional) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Tag of the emails (optional) + /// ApiResponse of GetReports + public ApiResponse< GetReports > GetSmtpReportWithHttpInfo (long? limit = null, long? offset = null, string startDate = null, string endDate = null, int? days = null, string tag = null) + { + + var localVarPath = "/smtp/statistics/reports"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (offset != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter + if (startDate != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "startDate", startDate)); // query parameter + if (endDate != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "endDate", endDate)); // query parameter + if (days != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "days", days)); // query parameter + if (tag != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "tag", tag)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetSmtpReport", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetReports) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetReports))); + } + + /// + /// Get your SMTP activity aggregated per day + /// + /// Thrown when fails to make API call + /// Number of documents returned per page (optional, default to 50) + /// Index of the first document on the page (optional, default to 0) + /// Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) (optional) + /// Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) (optional) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Tag of the emails (optional) + /// Task of GetReports + public async System.Threading.Tasks.Task GetSmtpReportAsync (long? limit = null, long? offset = null, string startDate = null, string endDate = null, int? days = null, string tag = null) + { + ApiResponse localVarResponse = await GetSmtpReportAsyncWithHttpInfo(limit, offset, startDate, endDate, days, tag); + return localVarResponse.Data; + + } + + /// + /// Get your SMTP activity aggregated per day + /// + /// Thrown when fails to make API call + /// Number of documents returned per page (optional, default to 50) + /// Index of the first document on the page (optional, default to 0) + /// Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) (optional) + /// Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) (optional) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Tag of the emails (optional) + /// Task of ApiResponse (GetReports) + public async System.Threading.Tasks.Task> GetSmtpReportAsyncWithHttpInfo (long? limit = null, long? offset = null, string startDate = null, string endDate = null, int? days = null, string tag = null) + { + + var localVarPath = "/smtp/statistics/reports"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (offset != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter + if (startDate != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "startDate", startDate)); // query parameter + if (endDate != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "endDate", endDate)); // query parameter + if (days != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "days", days)); // query parameter + if (tag != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "tag", tag)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetSmtpReport", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetReports) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetReports))); + } + + /// + /// Returns the template informations + /// + /// Thrown when fails to make API call + /// id of the template + /// GetSmtpTemplateOverview + public GetSmtpTemplateOverview GetSmtpTemplate (long? templateId) + { + ApiResponse localVarResponse = GetSmtpTemplateWithHttpInfo(templateId); + return localVarResponse.Data; + } + + /// + /// Returns the template informations + /// + /// Thrown when fails to make API call + /// id of the template + /// ApiResponse of GetSmtpTemplateOverview + public ApiResponse< GetSmtpTemplateOverview > GetSmtpTemplateWithHttpInfo (long? templateId) + { + // verify the required parameter 'templateId' is set + if (templateId == null) + throw new ApiException(400, "Missing required parameter 'templateId' when calling SMTPApi->GetSmtpTemplate"); + + var localVarPath = "/smtp/templates/{templateId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (templateId != null) localVarPathParams.Add("templateId", this.Configuration.ApiClient.ParameterToString(templateId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetSmtpTemplate", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetSmtpTemplateOverview) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSmtpTemplateOverview))); + } + + /// + /// Returns the template informations + /// + /// Thrown when fails to make API call + /// id of the template + /// Task of GetSmtpTemplateOverview + public async System.Threading.Tasks.Task GetSmtpTemplateAsync (long? templateId) + { + ApiResponse localVarResponse = await GetSmtpTemplateAsyncWithHttpInfo(templateId); + return localVarResponse.Data; + + } + + /// + /// Returns the template informations + /// + /// Thrown when fails to make API call + /// id of the template + /// Task of ApiResponse (GetSmtpTemplateOverview) + public async System.Threading.Tasks.Task> GetSmtpTemplateAsyncWithHttpInfo (long? templateId) + { + // verify the required parameter 'templateId' is set + if (templateId == null) + throw new ApiException(400, "Missing required parameter 'templateId' when calling SMTPApi->GetSmtpTemplate"); + + var localVarPath = "/smtp/templates/{templateId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (templateId != null) localVarPathParams.Add("templateId", this.Configuration.ApiClient.ParameterToString(templateId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetSmtpTemplate", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetSmtpTemplateOverview) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSmtpTemplateOverview))); + } + + /// + /// Get the list of SMTP templates + /// + /// Thrown when fails to make API call + /// Filter on the status of the template. Active = true, inactive = false (optional) + /// Number of documents returned per page (optional, default to 50) + /// Index of the first document in the page (optional, default to 0) + /// GetSmtpTemplates + public GetSmtpTemplates GetSmtpTemplates (bool? templateStatus = null, long? limit = null, long? offset = null) + { + ApiResponse localVarResponse = GetSmtpTemplatesWithHttpInfo(templateStatus, limit, offset); + return localVarResponse.Data; + } + + /// + /// Get the list of SMTP templates + /// + /// Thrown when fails to make API call + /// Filter on the status of the template. Active = true, inactive = false (optional) + /// Number of documents returned per page (optional, default to 50) + /// Index of the first document in the page (optional, default to 0) + /// ApiResponse of GetSmtpTemplates + public ApiResponse< GetSmtpTemplates > GetSmtpTemplatesWithHttpInfo (bool? templateStatus = null, long? limit = null, long? offset = null) + { + + var localVarPath = "/smtp/templates"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (templateStatus != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "templateStatus", templateStatus)); // query parameter + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (offset != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetSmtpTemplates", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetSmtpTemplates) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSmtpTemplates))); + } + + /// + /// Get the list of SMTP templates + /// + /// Thrown when fails to make API call + /// Filter on the status of the template. Active = true, inactive = false (optional) + /// Number of documents returned per page (optional, default to 50) + /// Index of the first document in the page (optional, default to 0) + /// Task of GetSmtpTemplates + public async System.Threading.Tasks.Task GetSmtpTemplatesAsync (bool? templateStatus = null, long? limit = null, long? offset = null) + { + ApiResponse localVarResponse = await GetSmtpTemplatesAsyncWithHttpInfo(templateStatus, limit, offset); + return localVarResponse.Data; + + } + + /// + /// Get the list of SMTP templates + /// + /// Thrown when fails to make API call + /// Filter on the status of the template. Active = true, inactive = false (optional) + /// Number of documents returned per page (optional, default to 50) + /// Index of the first document in the page (optional, default to 0) + /// Task of ApiResponse (GetSmtpTemplates) + public async System.Threading.Tasks.Task> GetSmtpTemplatesAsyncWithHttpInfo (bool? templateStatus = null, long? limit = null, long? offset = null) + { + + var localVarPath = "/smtp/templates"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (templateStatus != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "templateStatus", templateStatus)); // query parameter + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (offset != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetSmtpTemplates", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetSmtpTemplates) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSmtpTemplates))); + } + + /// + /// Send a template This endpoint is deprecated. Prefer v3/smtp/email instead. + /// + /// Thrown when fails to make API call + /// Id of the template + /// + /// SendTemplateEmail + public SendTemplateEmail SendTemplate (long? templateId, SendEmail sendEmail) + { + ApiResponse localVarResponse = SendTemplateWithHttpInfo(templateId, sendEmail); + return localVarResponse.Data; + } + + /// + /// Send a template This endpoint is deprecated. Prefer v3/smtp/email instead. + /// + /// Thrown when fails to make API call + /// Id of the template + /// + /// ApiResponse of SendTemplateEmail + public ApiResponse< SendTemplateEmail > SendTemplateWithHttpInfo (long? templateId, SendEmail sendEmail) + { + // verify the required parameter 'templateId' is set + if (templateId == null) + throw new ApiException(400, "Missing required parameter 'templateId' when calling SMTPApi->SendTemplate"); + // verify the required parameter 'sendEmail' is set + if (sendEmail == null) + throw new ApiException(400, "Missing required parameter 'sendEmail' when calling SMTPApi->SendTemplate"); + + var localVarPath = "/smtp/templates/{templateId}/send"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (templateId != null) localVarPathParams.Add("templateId", this.Configuration.ApiClient.ParameterToString(templateId)); // path parameter + if (sendEmail != null && sendEmail.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(sendEmail); // http body (model) parameter + } + else + { + localVarPostBody = sendEmail; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("SendTemplate", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (SendTemplateEmail) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(SendTemplateEmail))); + } + + /// + /// Send a template This endpoint is deprecated. Prefer v3/smtp/email instead. + /// + /// Thrown when fails to make API call + /// Id of the template + /// + /// Task of SendTemplateEmail + public async System.Threading.Tasks.Task SendTemplateAsync (long? templateId, SendEmail sendEmail) + { + ApiResponse localVarResponse = await SendTemplateAsyncWithHttpInfo(templateId, sendEmail); + return localVarResponse.Data; + + } + + /// + /// Send a template This endpoint is deprecated. Prefer v3/smtp/email instead. + /// + /// Thrown when fails to make API call + /// Id of the template + /// + /// Task of ApiResponse (SendTemplateEmail) + public async System.Threading.Tasks.Task> SendTemplateAsyncWithHttpInfo (long? templateId, SendEmail sendEmail) + { + // verify the required parameter 'templateId' is set + if (templateId == null) + throw new ApiException(400, "Missing required parameter 'templateId' when calling SMTPApi->SendTemplate"); + // verify the required parameter 'sendEmail' is set + if (sendEmail == null) + throw new ApiException(400, "Missing required parameter 'sendEmail' when calling SMTPApi->SendTemplate"); + + var localVarPath = "/smtp/templates/{templateId}/send"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (templateId != null) localVarPathParams.Add("templateId", this.Configuration.ApiClient.ParameterToString(templateId)); // path parameter + if (sendEmail != null && sendEmail.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(sendEmail); // http body (model) parameter + } + else + { + localVarPostBody = sendEmail; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("SendTemplate", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (SendTemplateEmail) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(SendTemplateEmail))); + } + + /// + /// Send a template to your test list + /// + /// Thrown when fails to make API call + /// Id of the template + /// + /// + public void SendTestTemplate (long? templateId, SendTestEmail sendTestEmail) + { + SendTestTemplateWithHttpInfo(templateId, sendTestEmail); + } + + /// + /// Send a template to your test list + /// + /// Thrown when fails to make API call + /// Id of the template + /// + /// ApiResponse of Object(void) + public ApiResponse SendTestTemplateWithHttpInfo (long? templateId, SendTestEmail sendTestEmail) + { + // verify the required parameter 'templateId' is set + if (templateId == null) + throw new ApiException(400, "Missing required parameter 'templateId' when calling SMTPApi->SendTestTemplate"); + // verify the required parameter 'sendTestEmail' is set + if (sendTestEmail == null) + throw new ApiException(400, "Missing required parameter 'sendTestEmail' when calling SMTPApi->SendTestTemplate"); + + var localVarPath = "/smtp/templates/{templateId}/sendTest"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (templateId != null) localVarPathParams.Add("templateId", this.Configuration.ApiClient.ParameterToString(templateId)); // path parameter + if (sendTestEmail != null && sendTestEmail.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(sendTestEmail); // http body (model) parameter + } + else + { + localVarPostBody = sendTestEmail; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("SendTestTemplate", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Send a template to your test list + /// + /// Thrown when fails to make API call + /// Id of the template + /// + /// Task of void + public async System.Threading.Tasks.Task SendTestTemplateAsync (long? templateId, SendTestEmail sendTestEmail) + { + await SendTestTemplateAsyncWithHttpInfo(templateId, sendTestEmail); + + } + + /// + /// Send a template to your test list + /// + /// Thrown when fails to make API call + /// Id of the template + /// + /// Task of ApiResponse + public async System.Threading.Tasks.Task> SendTestTemplateAsyncWithHttpInfo (long? templateId, SendTestEmail sendTestEmail) + { + // verify the required parameter 'templateId' is set + if (templateId == null) + throw new ApiException(400, "Missing required parameter 'templateId' when calling SMTPApi->SendTestTemplate"); + // verify the required parameter 'sendTestEmail' is set + if (sendTestEmail == null) + throw new ApiException(400, "Missing required parameter 'sendTestEmail' when calling SMTPApi->SendTestTemplate"); + + var localVarPath = "/smtp/templates/{templateId}/sendTest"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (templateId != null) localVarPathParams.Add("templateId", this.Configuration.ApiClient.ParameterToString(templateId)); // path parameter + if (sendTestEmail != null && sendTestEmail.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(sendTestEmail); // http body (model) parameter + } + else + { + localVarPostBody = sendTestEmail; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("SendTestTemplate", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Send a transactional email + /// + /// Thrown when fails to make API call + /// Values to send a transactional email + /// CreateSmtpEmail + public CreateSmtpEmail SendTransacEmail (SendSmtpEmail sendSmtpEmail) + { + ApiResponse localVarResponse = SendTransacEmailWithHttpInfo(sendSmtpEmail); + return localVarResponse.Data; + } + + /// + /// Send a transactional email + /// + /// Thrown when fails to make API call + /// Values to send a transactional email + /// ApiResponse of CreateSmtpEmail + public ApiResponse< CreateSmtpEmail > SendTransacEmailWithHttpInfo (SendSmtpEmail sendSmtpEmail) + { + // verify the required parameter 'sendSmtpEmail' is set + if (sendSmtpEmail == null) + throw new ApiException(400, "Missing required parameter 'sendSmtpEmail' when calling SMTPApi->SendTransacEmail"); + + var localVarPath = "/smtp/email"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (sendSmtpEmail != null && sendSmtpEmail.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(sendSmtpEmail); // http body (model) parameter + } + else + { + localVarPostBody = sendSmtpEmail; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("SendTransacEmail", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (CreateSmtpEmail) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateSmtpEmail))); + } + + /// + /// Send a transactional email + /// + /// Thrown when fails to make API call + /// Values to send a transactional email + /// Task of CreateSmtpEmail + public async System.Threading.Tasks.Task SendTransacEmailAsync (SendSmtpEmail sendSmtpEmail) + { + ApiResponse localVarResponse = await SendTransacEmailAsyncWithHttpInfo(sendSmtpEmail); + return localVarResponse.Data; + + } + + /// + /// Send a transactional email + /// + /// Thrown when fails to make API call + /// Values to send a transactional email + /// Task of ApiResponse (CreateSmtpEmail) + public async System.Threading.Tasks.Task> SendTransacEmailAsyncWithHttpInfo (SendSmtpEmail sendSmtpEmail) + { + // verify the required parameter 'sendSmtpEmail' is set + if (sendSmtpEmail == null) + throw new ApiException(400, "Missing required parameter 'sendSmtpEmail' when calling SMTPApi->SendTransacEmail"); + + var localVarPath = "/smtp/email"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (sendSmtpEmail != null && sendSmtpEmail.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(sendSmtpEmail); // http body (model) parameter + } + else + { + localVarPostBody = sendSmtpEmail; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("SendTransacEmail", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (CreateSmtpEmail) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateSmtpEmail))); + } + + /// + /// Updates an smtp templates + /// + /// Thrown when fails to make API call + /// id of the template + /// values to update in smtp template + /// + public void UpdateSmtpTemplate (long? templateId, UpdateSmtpTemplate smtpTemplate) + { + UpdateSmtpTemplateWithHttpInfo(templateId, smtpTemplate); + } + + /// + /// Updates an smtp templates + /// + /// Thrown when fails to make API call + /// id of the template + /// values to update in smtp template + /// ApiResponse of Object(void) + public ApiResponse UpdateSmtpTemplateWithHttpInfo (long? templateId, UpdateSmtpTemplate smtpTemplate) + { + // verify the required parameter 'templateId' is set + if (templateId == null) + throw new ApiException(400, "Missing required parameter 'templateId' when calling SMTPApi->UpdateSmtpTemplate"); + // verify the required parameter 'smtpTemplate' is set + if (smtpTemplate == null) + throw new ApiException(400, "Missing required parameter 'smtpTemplate' when calling SMTPApi->UpdateSmtpTemplate"); + + var localVarPath = "/smtp/templates/{templateId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (templateId != null) localVarPathParams.Add("templateId", this.Configuration.ApiClient.ParameterToString(templateId)); // path parameter + if (smtpTemplate != null && smtpTemplate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(smtpTemplate); // http body (model) parameter + } + else + { + localVarPostBody = smtpTemplate; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateSmtpTemplate", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Updates an smtp templates + /// + /// Thrown when fails to make API call + /// id of the template + /// values to update in smtp template + /// Task of void + public async System.Threading.Tasks.Task UpdateSmtpTemplateAsync (long? templateId, UpdateSmtpTemplate smtpTemplate) + { + await UpdateSmtpTemplateAsyncWithHttpInfo(templateId, smtpTemplate); + + } + + /// + /// Updates an smtp templates + /// + /// Thrown when fails to make API call + /// id of the template + /// values to update in smtp template + /// Task of ApiResponse + public async System.Threading.Tasks.Task> UpdateSmtpTemplateAsyncWithHttpInfo (long? templateId, UpdateSmtpTemplate smtpTemplate) + { + // verify the required parameter 'templateId' is set + if (templateId == null) + throw new ApiException(400, "Missing required parameter 'templateId' when calling SMTPApi->UpdateSmtpTemplate"); + // verify the required parameter 'smtpTemplate' is set + if (smtpTemplate == null) + throw new ApiException(400, "Missing required parameter 'smtpTemplate' when calling SMTPApi->UpdateSmtpTemplate"); + + var localVarPath = "/smtp/templates/{templateId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (templateId != null) localVarPathParams.Add("templateId", this.Configuration.ApiClient.ParameterToString(templateId)); // path parameter + if (smtpTemplate != null && smtpTemplate.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(smtpTemplate); // http body (model) parameter + } + else + { + localVarPostBody = smtpTemplate; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateSmtpTemplate", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + } +} diff --git a/src/sib_api_v3_sdk/Api/SendersApi.cs b/src/sib_api_v3_sdk/Api/SendersApi.cs new file mode 100644 index 0000000..513eb43 --- /dev/null +++ b/src/sib_api_v3_sdk/Api/SendersApi.cs @@ -0,0 +1,1328 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using RestSharp; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace sib_api_v3_sdk.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ISendersApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Create a new sender + /// + /// + /// + /// + /// Thrown when fails to make API call + /// sender's name (optional) + /// CreateSenderModel + CreateSenderModel CreateSender (CreateSender sender = null); + + /// + /// Create a new sender + /// + /// + /// + /// + /// Thrown when fails to make API call + /// sender's name (optional) + /// ApiResponse of CreateSenderModel + ApiResponse CreateSenderWithHttpInfo (CreateSender sender = null); + /// + /// Delete a sender + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the sender + /// + void DeleteSender (long? senderId); + + /// + /// Delete a sender + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the sender + /// ApiResponse of Object(void) + ApiResponse DeleteSenderWithHttpInfo (long? senderId); + /// + /// Return all the dedicated IPs for your account + /// + /// + /// + /// + /// Thrown when fails to make API call + /// GetIps + GetIps GetIps (); + + /// + /// Return all the dedicated IPs for your account + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ApiResponse of GetIps + ApiResponse GetIpsWithHttpInfo (); + /// + /// Return all the dedicated IPs for a sender + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the sender + /// GetIpsFromSender + GetIpsFromSender GetIpsFromSender (long? senderId); + + /// + /// Return all the dedicated IPs for a sender + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the sender + /// ApiResponse of GetIpsFromSender + ApiResponse GetIpsFromSenderWithHttpInfo (long? senderId); + /// + /// Get the list of all your senders + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Filter your senders for a specific ip (available for dedicated IP usage only) (optional) + /// Filter your senders for a specific domain (optional) + /// GetSendersList + GetSendersList GetSenders (string ip = null, string domain = null); + + /// + /// Get the list of all your senders + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Filter your senders for a specific ip (available for dedicated IP usage only) (optional) + /// Filter your senders for a specific domain (optional) + /// ApiResponse of GetSendersList + ApiResponse GetSendersWithHttpInfo (string ip = null, string domain = null); + /// + /// Update a sender + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the sender + /// sender's name (optional) + /// + void UpdateSender (long? senderId, UpdateSender sender = null); + + /// + /// Update a sender + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the sender + /// sender's name (optional) + /// ApiResponse of Object(void) + ApiResponse UpdateSenderWithHttpInfo (long? senderId, UpdateSender sender = null); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Create a new sender + /// + /// + /// + /// + /// Thrown when fails to make API call + /// sender's name (optional) + /// Task of CreateSenderModel + System.Threading.Tasks.Task CreateSenderAsync (CreateSender sender = null); + + /// + /// Create a new sender + /// + /// + /// + /// + /// Thrown when fails to make API call + /// sender's name (optional) + /// Task of ApiResponse (CreateSenderModel) + System.Threading.Tasks.Task> CreateSenderAsyncWithHttpInfo (CreateSender sender = null); + /// + /// Delete a sender + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the sender + /// Task of void + System.Threading.Tasks.Task DeleteSenderAsync (long? senderId); + + /// + /// Delete a sender + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the sender + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteSenderAsyncWithHttpInfo (long? senderId); + /// + /// Return all the dedicated IPs for your account + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Task of GetIps + System.Threading.Tasks.Task GetIpsAsync (); + + /// + /// Return all the dedicated IPs for your account + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Task of ApiResponse (GetIps) + System.Threading.Tasks.Task> GetIpsAsyncWithHttpInfo (); + /// + /// Return all the dedicated IPs for a sender + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the sender + /// Task of GetIpsFromSender + System.Threading.Tasks.Task GetIpsFromSenderAsync (long? senderId); + + /// + /// Return all the dedicated IPs for a sender + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the sender + /// Task of ApiResponse (GetIpsFromSender) + System.Threading.Tasks.Task> GetIpsFromSenderAsyncWithHttpInfo (long? senderId); + /// + /// Get the list of all your senders + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Filter your senders for a specific ip (available for dedicated IP usage only) (optional) + /// Filter your senders for a specific domain (optional) + /// Task of GetSendersList + System.Threading.Tasks.Task GetSendersAsync (string ip = null, string domain = null); + + /// + /// Get the list of all your senders + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Filter your senders for a specific ip (available for dedicated IP usage only) (optional) + /// Filter your senders for a specific domain (optional) + /// Task of ApiResponse (GetSendersList) + System.Threading.Tasks.Task> GetSendersAsyncWithHttpInfo (string ip = null, string domain = null); + /// + /// Update a sender + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the sender + /// sender's name (optional) + /// Task of void + System.Threading.Tasks.Task UpdateSenderAsync (long? senderId, UpdateSender sender = null); + + /// + /// Update a sender + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the sender + /// sender's name (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> UpdateSenderAsyncWithHttpInfo (long? senderId, UpdateSender sender = null); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class SendersApi : ISendersApi + { + private sib_api_v3_sdk.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public SendersApi(String basePath) + { + this.Configuration = new sib_api_v3_sdk.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = sib_api_v3_sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public SendersApi(sib_api_v3_sdk.Client.Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = sib_api_v3_sdk.Client.Configuration.Default; + else + this.Configuration = configuration; + + ExceptionFactory = sib_api_v3_sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + + /// + /// Sets the base path of the API client. + /// + /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] + public void SetBasePath(String basePath) + { + // do nothing + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public sib_api_v3_sdk.Client.Configuration Configuration {get; set;} + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public sib_api_v3_sdk.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public IDictionary DefaultHeader() + { + return new ReadOnlyDictionary(this.Configuration.DefaultHeader); + } + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + + /// + /// Create a new sender + /// + /// Thrown when fails to make API call + /// sender's name (optional) + /// CreateSenderModel + public CreateSenderModel CreateSender (CreateSender sender = null) + { + ApiResponse localVarResponse = CreateSenderWithHttpInfo(sender); + return localVarResponse.Data; + } + + /// + /// Create a new sender + /// + /// Thrown when fails to make API call + /// sender's name (optional) + /// ApiResponse of CreateSenderModel + public ApiResponse< CreateSenderModel > CreateSenderWithHttpInfo (CreateSender sender = null) + { + + var localVarPath = "/senders"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (sender != null && sender.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(sender); // http body (model) parameter + } + else + { + localVarPostBody = sender; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateSender", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (CreateSenderModel) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateSenderModel))); + } + + /// + /// Create a new sender + /// + /// Thrown when fails to make API call + /// sender's name (optional) + /// Task of CreateSenderModel + public async System.Threading.Tasks.Task CreateSenderAsync (CreateSender sender = null) + { + ApiResponse localVarResponse = await CreateSenderAsyncWithHttpInfo(sender); + return localVarResponse.Data; + + } + + /// + /// Create a new sender + /// + /// Thrown when fails to make API call + /// sender's name (optional) + /// Task of ApiResponse (CreateSenderModel) + public async System.Threading.Tasks.Task> CreateSenderAsyncWithHttpInfo (CreateSender sender = null) + { + + var localVarPath = "/senders"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (sender != null && sender.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(sender); // http body (model) parameter + } + else + { + localVarPostBody = sender; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateSender", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (CreateSenderModel) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateSenderModel))); + } + + /// + /// Delete a sender + /// + /// Thrown when fails to make API call + /// Id of the sender + /// + public void DeleteSender (long? senderId) + { + DeleteSenderWithHttpInfo(senderId); + } + + /// + /// Delete a sender + /// + /// Thrown when fails to make API call + /// Id of the sender + /// ApiResponse of Object(void) + public ApiResponse DeleteSenderWithHttpInfo (long? senderId) + { + // verify the required parameter 'senderId' is set + if (senderId == null) + throw new ApiException(400, "Missing required parameter 'senderId' when calling SendersApi->DeleteSender"); + + var localVarPath = "/senders/{senderId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (senderId != null) localVarPathParams.Add("senderId", this.Configuration.ApiClient.ParameterToString(senderId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteSender", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Delete a sender + /// + /// Thrown when fails to make API call + /// Id of the sender + /// Task of void + public async System.Threading.Tasks.Task DeleteSenderAsync (long? senderId) + { + await DeleteSenderAsyncWithHttpInfo(senderId); + + } + + /// + /// Delete a sender + /// + /// Thrown when fails to make API call + /// Id of the sender + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteSenderAsyncWithHttpInfo (long? senderId) + { + // verify the required parameter 'senderId' is set + if (senderId == null) + throw new ApiException(400, "Missing required parameter 'senderId' when calling SendersApi->DeleteSender"); + + var localVarPath = "/senders/{senderId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (senderId != null) localVarPathParams.Add("senderId", this.Configuration.ApiClient.ParameterToString(senderId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteSender", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Return all the dedicated IPs for your account + /// + /// Thrown when fails to make API call + /// GetIps + public GetIps GetIps () + { + ApiResponse localVarResponse = GetIpsWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Return all the dedicated IPs for your account + /// + /// Thrown when fails to make API call + /// ApiResponse of GetIps + public ApiResponse< GetIps > GetIpsWithHttpInfo () + { + + var localVarPath = "/senders/ips"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetIps", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetIps) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetIps))); + } + + /// + /// Return all the dedicated IPs for your account + /// + /// Thrown when fails to make API call + /// Task of GetIps + public async System.Threading.Tasks.Task GetIpsAsync () + { + ApiResponse localVarResponse = await GetIpsAsyncWithHttpInfo(); + return localVarResponse.Data; + + } + + /// + /// Return all the dedicated IPs for your account + /// + /// Thrown when fails to make API call + /// Task of ApiResponse (GetIps) + public async System.Threading.Tasks.Task> GetIpsAsyncWithHttpInfo () + { + + var localVarPath = "/senders/ips"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetIps", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetIps) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetIps))); + } + + /// + /// Return all the dedicated IPs for a sender + /// + /// Thrown when fails to make API call + /// Id of the sender + /// GetIpsFromSender + public GetIpsFromSender GetIpsFromSender (long? senderId) + { + ApiResponse localVarResponse = GetIpsFromSenderWithHttpInfo(senderId); + return localVarResponse.Data; + } + + /// + /// Return all the dedicated IPs for a sender + /// + /// Thrown when fails to make API call + /// Id of the sender + /// ApiResponse of GetIpsFromSender + public ApiResponse< GetIpsFromSender > GetIpsFromSenderWithHttpInfo (long? senderId) + { + // verify the required parameter 'senderId' is set + if (senderId == null) + throw new ApiException(400, "Missing required parameter 'senderId' when calling SendersApi->GetIpsFromSender"); + + var localVarPath = "/senders/{senderId}/ips"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (senderId != null) localVarPathParams.Add("senderId", this.Configuration.ApiClient.ParameterToString(senderId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetIpsFromSender", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetIpsFromSender) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetIpsFromSender))); + } + + /// + /// Return all the dedicated IPs for a sender + /// + /// Thrown when fails to make API call + /// Id of the sender + /// Task of GetIpsFromSender + public async System.Threading.Tasks.Task GetIpsFromSenderAsync (long? senderId) + { + ApiResponse localVarResponse = await GetIpsFromSenderAsyncWithHttpInfo(senderId); + return localVarResponse.Data; + + } + + /// + /// Return all the dedicated IPs for a sender + /// + /// Thrown when fails to make API call + /// Id of the sender + /// Task of ApiResponse (GetIpsFromSender) + public async System.Threading.Tasks.Task> GetIpsFromSenderAsyncWithHttpInfo (long? senderId) + { + // verify the required parameter 'senderId' is set + if (senderId == null) + throw new ApiException(400, "Missing required parameter 'senderId' when calling SendersApi->GetIpsFromSender"); + + var localVarPath = "/senders/{senderId}/ips"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (senderId != null) localVarPathParams.Add("senderId", this.Configuration.ApiClient.ParameterToString(senderId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetIpsFromSender", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetIpsFromSender) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetIpsFromSender))); + } + + /// + /// Get the list of all your senders + /// + /// Thrown when fails to make API call + /// Filter your senders for a specific ip (available for dedicated IP usage only) (optional) + /// Filter your senders for a specific domain (optional) + /// GetSendersList + public GetSendersList GetSenders (string ip = null, string domain = null) + { + ApiResponse localVarResponse = GetSendersWithHttpInfo(ip, domain); + return localVarResponse.Data; + } + + /// + /// Get the list of all your senders + /// + /// Thrown when fails to make API call + /// Filter your senders for a specific ip (available for dedicated IP usage only) (optional) + /// Filter your senders for a specific domain (optional) + /// ApiResponse of GetSendersList + public ApiResponse< GetSendersList > GetSendersWithHttpInfo (string ip = null, string domain = null) + { + + var localVarPath = "/senders"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (ip != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "ip", ip)); // query parameter + if (domain != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "domain", domain)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetSenders", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetSendersList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSendersList))); + } + + /// + /// Get the list of all your senders + /// + /// Thrown when fails to make API call + /// Filter your senders for a specific ip (available for dedicated IP usage only) (optional) + /// Filter your senders for a specific domain (optional) + /// Task of GetSendersList + public async System.Threading.Tasks.Task GetSendersAsync (string ip = null, string domain = null) + { + ApiResponse localVarResponse = await GetSendersAsyncWithHttpInfo(ip, domain); + return localVarResponse.Data; + + } + + /// + /// Get the list of all your senders + /// + /// Thrown when fails to make API call + /// Filter your senders for a specific ip (available for dedicated IP usage only) (optional) + /// Filter your senders for a specific domain (optional) + /// Task of ApiResponse (GetSendersList) + public async System.Threading.Tasks.Task> GetSendersAsyncWithHttpInfo (string ip = null, string domain = null) + { + + var localVarPath = "/senders"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (ip != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "ip", ip)); // query parameter + if (domain != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "domain", domain)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetSenders", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetSendersList) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSendersList))); + } + + /// + /// Update a sender + /// + /// Thrown when fails to make API call + /// Id of the sender + /// sender's name (optional) + /// + public void UpdateSender (long? senderId, UpdateSender sender = null) + { + UpdateSenderWithHttpInfo(senderId, sender); + } + + /// + /// Update a sender + /// + /// Thrown when fails to make API call + /// Id of the sender + /// sender's name (optional) + /// ApiResponse of Object(void) + public ApiResponse UpdateSenderWithHttpInfo (long? senderId, UpdateSender sender = null) + { + // verify the required parameter 'senderId' is set + if (senderId == null) + throw new ApiException(400, "Missing required parameter 'senderId' when calling SendersApi->UpdateSender"); + + var localVarPath = "/senders/{senderId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (senderId != null) localVarPathParams.Add("senderId", this.Configuration.ApiClient.ParameterToString(senderId)); // path parameter + if (sender != null && sender.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(sender); // http body (model) parameter + } + else + { + localVarPostBody = sender; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateSender", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Update a sender + /// + /// Thrown when fails to make API call + /// Id of the sender + /// sender's name (optional) + /// Task of void + public async System.Threading.Tasks.Task UpdateSenderAsync (long? senderId, UpdateSender sender = null) + { + await UpdateSenderAsyncWithHttpInfo(senderId, sender); + + } + + /// + /// Update a sender + /// + /// Thrown when fails to make API call + /// Id of the sender + /// sender's name (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> UpdateSenderAsyncWithHttpInfo (long? senderId, UpdateSender sender = null) + { + // verify the required parameter 'senderId' is set + if (senderId == null) + throw new ApiException(400, "Missing required parameter 'senderId' when calling SendersApi->UpdateSender"); + + var localVarPath = "/senders/{senderId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (senderId != null) localVarPathParams.Add("senderId", this.Configuration.ApiClient.ParameterToString(senderId)); // path parameter + if (sender != null && sender.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(sender); // http body (model) parameter + } + else + { + localVarPostBody = sender; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateSender", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + } +} diff --git a/src/sib_api_v3_sdk/Api/TransactionalSMSApi.cs b/src/sib_api_v3_sdk/Api/TransactionalSMSApi.cs new file mode 100644 index 0000000..8624247 --- /dev/null +++ b/src/sib_api_v3_sdk/Api/TransactionalSMSApi.cs @@ -0,0 +1,1044 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using RestSharp; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace sib_api_v3_sdk.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ITransactionalSMSApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Get all the SMS activity (unaggregated events) + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number of documents per page (optional, default to 50) + /// Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + /// Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + /// Index of the first document of the page (optional, default to 0) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Filter the report for a specific phone number (optional) + /// Filter the report for specific events (optional) + /// Filter the report for specific tags passed as a serialized urlencoded array (optional) + /// GetSmsEventReport + GetSmsEventReport GetSmsEvents (long? limit = null, string startDate = null, string endDate = null, long? offset = null, int? days = null, string phoneNumber = null, string _event = null, string tags = null); + + /// + /// Get all the SMS activity (unaggregated events) + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number of documents per page (optional, default to 50) + /// Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + /// Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + /// Index of the first document of the page (optional, default to 0) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Filter the report for a specific phone number (optional) + /// Filter the report for specific events (optional) + /// Filter the report for specific tags passed as a serialized urlencoded array (optional) + /// ApiResponse of GetSmsEventReport + ApiResponse GetSmsEventsWithHttpInfo (long? limit = null, string startDate = null, string endDate = null, long? offset = null, int? days = null, string phoneNumber = null, string _event = null, string tags = null); + /// + /// Get your SMS activity aggregated over a period of time + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + /// Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + /// Number of days in the past including today (positive integer). Not compatible with startDate and endDate (optional) + /// Filter on a tag (optional) + /// GetTransacAggregatedSmsReport + GetTransacAggregatedSmsReport GetTransacAggregatedSmsReport (string startDate = null, string endDate = null, int? days = null, string tag = null); + + /// + /// Get your SMS activity aggregated over a period of time + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + /// Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + /// Number of days in the past including today (positive integer). Not compatible with startDate and endDate (optional) + /// Filter on a tag (optional) + /// ApiResponse of GetTransacAggregatedSmsReport + ApiResponse GetTransacAggregatedSmsReportWithHttpInfo (string startDate = null, string endDate = null, int? days = null, string tag = null); + /// + /// Get your SMS activity aggregated per day + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + /// Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Filter on a tag (optional) + /// GetTransacSmsReport + GetTransacSmsReport GetTransacSmsReport (string startDate = null, string endDate = null, int? days = null, string tag = null); + + /// + /// Get your SMS activity aggregated per day + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + /// Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Filter on a tag (optional) + /// ApiResponse of GetTransacSmsReport + ApiResponse GetTransacSmsReportWithHttpInfo (string startDate = null, string endDate = null, int? days = null, string tag = null); + /// + /// Send the SMS campaign to the specified mobile number + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Values to send a transactional SMS + /// SendSms + SendSms SendTransacSms (SendTransacSms sendTransacSms); + + /// + /// Send the SMS campaign to the specified mobile number + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Values to send a transactional SMS + /// ApiResponse of SendSms + ApiResponse SendTransacSmsWithHttpInfo (SendTransacSms sendTransacSms); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Get all the SMS activity (unaggregated events) + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number of documents per page (optional, default to 50) + /// Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + /// Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + /// Index of the first document of the page (optional, default to 0) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Filter the report for a specific phone number (optional) + /// Filter the report for specific events (optional) + /// Filter the report for specific tags passed as a serialized urlencoded array (optional) + /// Task of GetSmsEventReport + System.Threading.Tasks.Task GetSmsEventsAsync (long? limit = null, string startDate = null, string endDate = null, long? offset = null, int? days = null, string phoneNumber = null, string _event = null, string tags = null); + + /// + /// Get all the SMS activity (unaggregated events) + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Number of documents per page (optional, default to 50) + /// Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + /// Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + /// Index of the first document of the page (optional, default to 0) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Filter the report for a specific phone number (optional) + /// Filter the report for specific events (optional) + /// Filter the report for specific tags passed as a serialized urlencoded array (optional) + /// Task of ApiResponse (GetSmsEventReport) + System.Threading.Tasks.Task> GetSmsEventsAsyncWithHttpInfo (long? limit = null, string startDate = null, string endDate = null, long? offset = null, int? days = null, string phoneNumber = null, string _event = null, string tags = null); + /// + /// Get your SMS activity aggregated over a period of time + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + /// Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + /// Number of days in the past including today (positive integer). Not compatible with startDate and endDate (optional) + /// Filter on a tag (optional) + /// Task of GetTransacAggregatedSmsReport + System.Threading.Tasks.Task GetTransacAggregatedSmsReportAsync (string startDate = null, string endDate = null, int? days = null, string tag = null); + + /// + /// Get your SMS activity aggregated over a period of time + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + /// Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + /// Number of days in the past including today (positive integer). Not compatible with startDate and endDate (optional) + /// Filter on a tag (optional) + /// Task of ApiResponse (GetTransacAggregatedSmsReport) + System.Threading.Tasks.Task> GetTransacAggregatedSmsReportAsyncWithHttpInfo (string startDate = null, string endDate = null, int? days = null, string tag = null); + /// + /// Get your SMS activity aggregated per day + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + /// Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Filter on a tag (optional) + /// Task of GetTransacSmsReport + System.Threading.Tasks.Task GetTransacSmsReportAsync (string startDate = null, string endDate = null, int? days = null, string tag = null); + + /// + /// Get your SMS activity aggregated per day + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + /// Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Filter on a tag (optional) + /// Task of ApiResponse (GetTransacSmsReport) + System.Threading.Tasks.Task> GetTransacSmsReportAsyncWithHttpInfo (string startDate = null, string endDate = null, int? days = null, string tag = null); + /// + /// Send the SMS campaign to the specified mobile number + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Values to send a transactional SMS + /// Task of SendSms + System.Threading.Tasks.Task SendTransacSmsAsync (SendTransacSms sendTransacSms); + + /// + /// Send the SMS campaign to the specified mobile number + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Values to send a transactional SMS + /// Task of ApiResponse (SendSms) + System.Threading.Tasks.Task> SendTransacSmsAsyncWithHttpInfo (SendTransacSms sendTransacSms); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class TransactionalSMSApi : ITransactionalSMSApi + { + private sib_api_v3_sdk.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public TransactionalSMSApi(String basePath) + { + this.Configuration = new sib_api_v3_sdk.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = sib_api_v3_sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public TransactionalSMSApi(sib_api_v3_sdk.Client.Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = sib_api_v3_sdk.Client.Configuration.Default; + else + this.Configuration = configuration; + + ExceptionFactory = sib_api_v3_sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + + /// + /// Sets the base path of the API client. + /// + /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] + public void SetBasePath(String basePath) + { + // do nothing + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public sib_api_v3_sdk.Client.Configuration Configuration {get; set;} + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public sib_api_v3_sdk.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public IDictionary DefaultHeader() + { + return new ReadOnlyDictionary(this.Configuration.DefaultHeader); + } + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + + /// + /// Get all the SMS activity (unaggregated events) + /// + /// Thrown when fails to make API call + /// Number of documents per page (optional, default to 50) + /// Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + /// Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + /// Index of the first document of the page (optional, default to 0) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Filter the report for a specific phone number (optional) + /// Filter the report for specific events (optional) + /// Filter the report for specific tags passed as a serialized urlencoded array (optional) + /// GetSmsEventReport + public GetSmsEventReport GetSmsEvents (long? limit = null, string startDate = null, string endDate = null, long? offset = null, int? days = null, string phoneNumber = null, string _event = null, string tags = null) + { + ApiResponse localVarResponse = GetSmsEventsWithHttpInfo(limit, startDate, endDate, offset, days, phoneNumber, _event, tags); + return localVarResponse.Data; + } + + /// + /// Get all the SMS activity (unaggregated events) + /// + /// Thrown when fails to make API call + /// Number of documents per page (optional, default to 50) + /// Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + /// Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + /// Index of the first document of the page (optional, default to 0) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Filter the report for a specific phone number (optional) + /// Filter the report for specific events (optional) + /// Filter the report for specific tags passed as a serialized urlencoded array (optional) + /// ApiResponse of GetSmsEventReport + public ApiResponse< GetSmsEventReport > GetSmsEventsWithHttpInfo (long? limit = null, string startDate = null, string endDate = null, long? offset = null, int? days = null, string phoneNumber = null, string _event = null, string tags = null) + { + + var localVarPath = "/transactionalSMS/statistics/events"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (startDate != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "startDate", startDate)); // query parameter + if (endDate != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "endDate", endDate)); // query parameter + if (offset != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter + if (days != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "days", days)); // query parameter + if (phoneNumber != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "phoneNumber", phoneNumber)); // query parameter + if (_event != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "event", _event)); // query parameter + if (tags != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "tags", tags)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetSmsEvents", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetSmsEventReport) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSmsEventReport))); + } + + /// + /// Get all the SMS activity (unaggregated events) + /// + /// Thrown when fails to make API call + /// Number of documents per page (optional, default to 50) + /// Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + /// Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + /// Index of the first document of the page (optional, default to 0) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Filter the report for a specific phone number (optional) + /// Filter the report for specific events (optional) + /// Filter the report for specific tags passed as a serialized urlencoded array (optional) + /// Task of GetSmsEventReport + public async System.Threading.Tasks.Task GetSmsEventsAsync (long? limit = null, string startDate = null, string endDate = null, long? offset = null, int? days = null, string phoneNumber = null, string _event = null, string tags = null) + { + ApiResponse localVarResponse = await GetSmsEventsAsyncWithHttpInfo(limit, startDate, endDate, offset, days, phoneNumber, _event, tags); + return localVarResponse.Data; + + } + + /// + /// Get all the SMS activity (unaggregated events) + /// + /// Thrown when fails to make API call + /// Number of documents per page (optional, default to 50) + /// Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + /// Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + /// Index of the first document of the page (optional, default to 0) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Filter the report for a specific phone number (optional) + /// Filter the report for specific events (optional) + /// Filter the report for specific tags passed as a serialized urlencoded array (optional) + /// Task of ApiResponse (GetSmsEventReport) + public async System.Threading.Tasks.Task> GetSmsEventsAsyncWithHttpInfo (long? limit = null, string startDate = null, string endDate = null, long? offset = null, int? days = null, string phoneNumber = null, string _event = null, string tags = null) + { + + var localVarPath = "/transactionalSMS/statistics/events"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (startDate != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "startDate", startDate)); // query parameter + if (endDate != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "endDate", endDate)); // query parameter + if (offset != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "offset", offset)); // query parameter + if (days != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "days", days)); // query parameter + if (phoneNumber != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "phoneNumber", phoneNumber)); // query parameter + if (_event != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "event", _event)); // query parameter + if (tags != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "tags", tags)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetSmsEvents", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetSmsEventReport) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSmsEventReport))); + } + + /// + /// Get your SMS activity aggregated over a period of time + /// + /// Thrown when fails to make API call + /// Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + /// Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + /// Number of days in the past including today (positive integer). Not compatible with startDate and endDate (optional) + /// Filter on a tag (optional) + /// GetTransacAggregatedSmsReport + public GetTransacAggregatedSmsReport GetTransacAggregatedSmsReport (string startDate = null, string endDate = null, int? days = null, string tag = null) + { + ApiResponse localVarResponse = GetTransacAggregatedSmsReportWithHttpInfo(startDate, endDate, days, tag); + return localVarResponse.Data; + } + + /// + /// Get your SMS activity aggregated over a period of time + /// + /// Thrown when fails to make API call + /// Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + /// Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + /// Number of days in the past including today (positive integer). Not compatible with startDate and endDate (optional) + /// Filter on a tag (optional) + /// ApiResponse of GetTransacAggregatedSmsReport + public ApiResponse< GetTransacAggregatedSmsReport > GetTransacAggregatedSmsReportWithHttpInfo (string startDate = null, string endDate = null, int? days = null, string tag = null) + { + + var localVarPath = "/transactionalSMS/statistics/aggregatedReport"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (startDate != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "startDate", startDate)); // query parameter + if (endDate != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "endDate", endDate)); // query parameter + if (days != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "days", days)); // query parameter + if (tag != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "tag", tag)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetTransacAggregatedSmsReport", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetTransacAggregatedSmsReport) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetTransacAggregatedSmsReport))); + } + + /// + /// Get your SMS activity aggregated over a period of time + /// + /// Thrown when fails to make API call + /// Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + /// Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + /// Number of days in the past including today (positive integer). Not compatible with startDate and endDate (optional) + /// Filter on a tag (optional) + /// Task of GetTransacAggregatedSmsReport + public async System.Threading.Tasks.Task GetTransacAggregatedSmsReportAsync (string startDate = null, string endDate = null, int? days = null, string tag = null) + { + ApiResponse localVarResponse = await GetTransacAggregatedSmsReportAsyncWithHttpInfo(startDate, endDate, days, tag); + return localVarResponse.Data; + + } + + /// + /// Get your SMS activity aggregated over a period of time + /// + /// Thrown when fails to make API call + /// Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + /// Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + /// Number of days in the past including today (positive integer). Not compatible with startDate and endDate (optional) + /// Filter on a tag (optional) + /// Task of ApiResponse (GetTransacAggregatedSmsReport) + public async System.Threading.Tasks.Task> GetTransacAggregatedSmsReportAsyncWithHttpInfo (string startDate = null, string endDate = null, int? days = null, string tag = null) + { + + var localVarPath = "/transactionalSMS/statistics/aggregatedReport"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (startDate != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "startDate", startDate)); // query parameter + if (endDate != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "endDate", endDate)); // query parameter + if (days != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "days", days)); // query parameter + if (tag != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "tag", tag)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetTransacAggregatedSmsReport", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetTransacAggregatedSmsReport) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetTransacAggregatedSmsReport))); + } + + /// + /// Get your SMS activity aggregated per day + /// + /// Thrown when fails to make API call + /// Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + /// Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Filter on a tag (optional) + /// GetTransacSmsReport + public GetTransacSmsReport GetTransacSmsReport (string startDate = null, string endDate = null, int? days = null, string tag = null) + { + ApiResponse localVarResponse = GetTransacSmsReportWithHttpInfo(startDate, endDate, days, tag); + return localVarResponse.Data; + } + + /// + /// Get your SMS activity aggregated per day + /// + /// Thrown when fails to make API call + /// Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + /// Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Filter on a tag (optional) + /// ApiResponse of GetTransacSmsReport + public ApiResponse< GetTransacSmsReport > GetTransacSmsReportWithHttpInfo (string startDate = null, string endDate = null, int? days = null, string tag = null) + { + + var localVarPath = "/transactionalSMS/statistics/reports"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (startDate != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "startDate", startDate)); // query parameter + if (endDate != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "endDate", endDate)); // query parameter + if (days != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "days", days)); // query parameter + if (tag != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "tag", tag)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetTransacSmsReport", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetTransacSmsReport) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetTransacSmsReport))); + } + + /// + /// Get your SMS activity aggregated per day + /// + /// Thrown when fails to make API call + /// Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + /// Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Filter on a tag (optional) + /// Task of GetTransacSmsReport + public async System.Threading.Tasks.Task GetTransacSmsReportAsync (string startDate = null, string endDate = null, int? days = null, string tag = null) + { + ApiResponse localVarResponse = await GetTransacSmsReportAsyncWithHttpInfo(startDate, endDate, days, tag); + return localVarResponse.Data; + + } + + /// + /// Get your SMS activity aggregated per day + /// + /// Thrown when fails to make API call + /// Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report (optional) + /// Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report (optional) + /// Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' (optional) + /// Filter on a tag (optional) + /// Task of ApiResponse (GetTransacSmsReport) + public async System.Threading.Tasks.Task> GetTransacSmsReportAsyncWithHttpInfo (string startDate = null, string endDate = null, int? days = null, string tag = null) + { + + var localVarPath = "/transactionalSMS/statistics/reports"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (startDate != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "startDate", startDate)); // query parameter + if (endDate != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "endDate", endDate)); // query parameter + if (days != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "days", days)); // query parameter + if (tag != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "tag", tag)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetTransacSmsReport", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetTransacSmsReport) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetTransacSmsReport))); + } + + /// + /// Send the SMS campaign to the specified mobile number + /// + /// Thrown when fails to make API call + /// Values to send a transactional SMS + /// SendSms + public SendSms SendTransacSms (SendTransacSms sendTransacSms) + { + ApiResponse localVarResponse = SendTransacSmsWithHttpInfo(sendTransacSms); + return localVarResponse.Data; + } + + /// + /// Send the SMS campaign to the specified mobile number + /// + /// Thrown when fails to make API call + /// Values to send a transactional SMS + /// ApiResponse of SendSms + public ApiResponse< SendSms > SendTransacSmsWithHttpInfo (SendTransacSms sendTransacSms) + { + // verify the required parameter 'sendTransacSms' is set + if (sendTransacSms == null) + throw new ApiException(400, "Missing required parameter 'sendTransacSms' when calling TransactionalSMSApi->SendTransacSms"); + + var localVarPath = "/transactionalSMS/sms"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (sendTransacSms != null && sendTransacSms.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(sendTransacSms); // http body (model) parameter + } + else + { + localVarPostBody = sendTransacSms; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("SendTransacSms", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (SendSms) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(SendSms))); + } + + /// + /// Send the SMS campaign to the specified mobile number + /// + /// Thrown when fails to make API call + /// Values to send a transactional SMS + /// Task of SendSms + public async System.Threading.Tasks.Task SendTransacSmsAsync (SendTransacSms sendTransacSms) + { + ApiResponse localVarResponse = await SendTransacSmsAsyncWithHttpInfo(sendTransacSms); + return localVarResponse.Data; + + } + + /// + /// Send the SMS campaign to the specified mobile number + /// + /// Thrown when fails to make API call + /// Values to send a transactional SMS + /// Task of ApiResponse (SendSms) + public async System.Threading.Tasks.Task> SendTransacSmsAsyncWithHttpInfo (SendTransacSms sendTransacSms) + { + // verify the required parameter 'sendTransacSms' is set + if (sendTransacSms == null) + throw new ApiException(400, "Missing required parameter 'sendTransacSms' when calling TransactionalSMSApi->SendTransacSms"); + + var localVarPath = "/transactionalSMS/sms"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (sendTransacSms != null && sendTransacSms.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(sendTransacSms); // http body (model) parameter + } + else + { + localVarPostBody = sendTransacSms; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("SendTransacSms", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (SendSms) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(SendSms))); + } + + } +} diff --git a/src/sib_api_v3_sdk/Api/WebhooksApi.cs b/src/sib_api_v3_sdk/Api/WebhooksApi.cs new file mode 100644 index 0000000..58b31e3 --- /dev/null +++ b/src/sib_api_v3_sdk/Api/WebhooksApi.cs @@ -0,0 +1,1149 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using RestSharp; +using sib_api_v3_sdk.Client; +using sib_api_v3_sdk.Model; + +namespace sib_api_v3_sdk.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IWebhooksApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Create a webhook + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Values to create a webhook + /// CreateModel + CreateModel CreateWebhook (CreateWebhook createWebhook); + + /// + /// Create a webhook + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Values to create a webhook + /// ApiResponse of CreateModel + ApiResponse CreateWebhookWithHttpInfo (CreateWebhook createWebhook); + /// + /// Delete a webhook + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the webhook + /// + void DeleteWebhook (long? webhookId); + + /// + /// Delete a webhook + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the webhook + /// ApiResponse of Object(void) + ApiResponse DeleteWebhookWithHttpInfo (long? webhookId); + /// + /// Get a webhook details + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the webhook + /// GetWebhook + GetWebhook GetWebhook (long? webhookId); + + /// + /// Get a webhook details + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the webhook + /// ApiResponse of GetWebhook + ApiResponse GetWebhookWithHttpInfo (long? webhookId); + /// + /// Get all webhooks + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Filter on webhook type (optional, default to transactional) + /// GetWebhooks + GetWebhooks GetWebhooks (string type = null); + + /// + /// Get all webhooks + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Filter on webhook type (optional, default to transactional) + /// ApiResponse of GetWebhooks + ApiResponse GetWebhooksWithHttpInfo (string type = null); + /// + /// Update a webhook + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the webhook + /// Values to update a webhook + /// + void UpdateWebhook (long? webhookId, UpdateWebhook updateWebhook); + + /// + /// Update a webhook + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the webhook + /// Values to update a webhook + /// ApiResponse of Object(void) + ApiResponse UpdateWebhookWithHttpInfo (long? webhookId, UpdateWebhook updateWebhook); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Create a webhook + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Values to create a webhook + /// Task of CreateModel + System.Threading.Tasks.Task CreateWebhookAsync (CreateWebhook createWebhook); + + /// + /// Create a webhook + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Values to create a webhook + /// Task of ApiResponse (CreateModel) + System.Threading.Tasks.Task> CreateWebhookAsyncWithHttpInfo (CreateWebhook createWebhook); + /// + /// Delete a webhook + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the webhook + /// Task of void + System.Threading.Tasks.Task DeleteWebhookAsync (long? webhookId); + + /// + /// Delete a webhook + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the webhook + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteWebhookAsyncWithHttpInfo (long? webhookId); + /// + /// Get a webhook details + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the webhook + /// Task of GetWebhook + System.Threading.Tasks.Task GetWebhookAsync (long? webhookId); + + /// + /// Get a webhook details + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the webhook + /// Task of ApiResponse (GetWebhook) + System.Threading.Tasks.Task> GetWebhookAsyncWithHttpInfo (long? webhookId); + /// + /// Get all webhooks + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Filter on webhook type (optional, default to transactional) + /// Task of GetWebhooks + System.Threading.Tasks.Task GetWebhooksAsync (string type = null); + + /// + /// Get all webhooks + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Filter on webhook type (optional, default to transactional) + /// Task of ApiResponse (GetWebhooks) + System.Threading.Tasks.Task> GetWebhooksAsyncWithHttpInfo (string type = null); + /// + /// Update a webhook + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the webhook + /// Values to update a webhook + /// Task of void + System.Threading.Tasks.Task UpdateWebhookAsync (long? webhookId, UpdateWebhook updateWebhook); + + /// + /// Update a webhook + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Id of the webhook + /// Values to update a webhook + /// Task of ApiResponse + System.Threading.Tasks.Task> UpdateWebhookAsyncWithHttpInfo (long? webhookId, UpdateWebhook updateWebhook); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class WebhooksApi : IWebhooksApi + { + private sib_api_v3_sdk.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public WebhooksApi(String basePath) + { + this.Configuration = new sib_api_v3_sdk.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = sib_api_v3_sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public WebhooksApi(sib_api_v3_sdk.Client.Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = sib_api_v3_sdk.Client.Configuration.Default; + else + this.Configuration = configuration; + + ExceptionFactory = sib_api_v3_sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + + /// + /// Sets the base path of the API client. + /// + /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] + public void SetBasePath(String basePath) + { + // do nothing + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public sib_api_v3_sdk.Client.Configuration Configuration {get; set;} + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public sib_api_v3_sdk.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public IDictionary DefaultHeader() + { + return new ReadOnlyDictionary(this.Configuration.DefaultHeader); + } + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + + /// + /// Create a webhook + /// + /// Thrown when fails to make API call + /// Values to create a webhook + /// CreateModel + public CreateModel CreateWebhook (CreateWebhook createWebhook) + { + ApiResponse localVarResponse = CreateWebhookWithHttpInfo(createWebhook); + return localVarResponse.Data; + } + + /// + /// Create a webhook + /// + /// Thrown when fails to make API call + /// Values to create a webhook + /// ApiResponse of CreateModel + public ApiResponse< CreateModel > CreateWebhookWithHttpInfo (CreateWebhook createWebhook) + { + // verify the required parameter 'createWebhook' is set + if (createWebhook == null) + throw new ApiException(400, "Missing required parameter 'createWebhook' when calling WebhooksApi->CreateWebhook"); + + var localVarPath = "/webhooks"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (createWebhook != null && createWebhook.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(createWebhook); // http body (model) parameter + } + else + { + localVarPostBody = createWebhook; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateWebhook", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (CreateModel) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateModel))); + } + + /// + /// Create a webhook + /// + /// Thrown when fails to make API call + /// Values to create a webhook + /// Task of CreateModel + public async System.Threading.Tasks.Task CreateWebhookAsync (CreateWebhook createWebhook) + { + ApiResponse localVarResponse = await CreateWebhookAsyncWithHttpInfo(createWebhook); + return localVarResponse.Data; + + } + + /// + /// Create a webhook + /// + /// Thrown when fails to make API call + /// Values to create a webhook + /// Task of ApiResponse (CreateModel) + public async System.Threading.Tasks.Task> CreateWebhookAsyncWithHttpInfo (CreateWebhook createWebhook) + { + // verify the required parameter 'createWebhook' is set + if (createWebhook == null) + throw new ApiException(400, "Missing required parameter 'createWebhook' when calling WebhooksApi->CreateWebhook"); + + var localVarPath = "/webhooks"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (createWebhook != null && createWebhook.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(createWebhook); // http body (model) parameter + } + else + { + localVarPostBody = createWebhook; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateWebhook", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (CreateModel) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateModel))); + } + + /// + /// Delete a webhook + /// + /// Thrown when fails to make API call + /// Id of the webhook + /// + public void DeleteWebhook (long? webhookId) + { + DeleteWebhookWithHttpInfo(webhookId); + } + + /// + /// Delete a webhook + /// + /// Thrown when fails to make API call + /// Id of the webhook + /// ApiResponse of Object(void) + public ApiResponse DeleteWebhookWithHttpInfo (long? webhookId) + { + // verify the required parameter 'webhookId' is set + if (webhookId == null) + throw new ApiException(400, "Missing required parameter 'webhookId' when calling WebhooksApi->DeleteWebhook"); + + var localVarPath = "/webhooks/{webhookId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (webhookId != null) localVarPathParams.Add("webhookId", this.Configuration.ApiClient.ParameterToString(webhookId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteWebhook", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Delete a webhook + /// + /// Thrown when fails to make API call + /// Id of the webhook + /// Task of void + public async System.Threading.Tasks.Task DeleteWebhookAsync (long? webhookId) + { + await DeleteWebhookAsyncWithHttpInfo(webhookId); + + } + + /// + /// Delete a webhook + /// + /// Thrown when fails to make API call + /// Id of the webhook + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteWebhookAsyncWithHttpInfo (long? webhookId) + { + // verify the required parameter 'webhookId' is set + if (webhookId == null) + throw new ApiException(400, "Missing required parameter 'webhookId' when calling WebhooksApi->DeleteWebhook"); + + var localVarPath = "/webhooks/{webhookId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (webhookId != null) localVarPathParams.Add("webhookId", this.Configuration.ApiClient.ParameterToString(webhookId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteWebhook", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Get a webhook details + /// + /// Thrown when fails to make API call + /// Id of the webhook + /// GetWebhook + public GetWebhook GetWebhook (long? webhookId) + { + ApiResponse localVarResponse = GetWebhookWithHttpInfo(webhookId); + return localVarResponse.Data; + } + + /// + /// Get a webhook details + /// + /// Thrown when fails to make API call + /// Id of the webhook + /// ApiResponse of GetWebhook + public ApiResponse< GetWebhook > GetWebhookWithHttpInfo (long? webhookId) + { + // verify the required parameter 'webhookId' is set + if (webhookId == null) + throw new ApiException(400, "Missing required parameter 'webhookId' when calling WebhooksApi->GetWebhook"); + + var localVarPath = "/webhooks/{webhookId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (webhookId != null) localVarPathParams.Add("webhookId", this.Configuration.ApiClient.ParameterToString(webhookId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetWebhook", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetWebhook) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetWebhook))); + } + + /// + /// Get a webhook details + /// + /// Thrown when fails to make API call + /// Id of the webhook + /// Task of GetWebhook + public async System.Threading.Tasks.Task GetWebhookAsync (long? webhookId) + { + ApiResponse localVarResponse = await GetWebhookAsyncWithHttpInfo(webhookId); + return localVarResponse.Data; + + } + + /// + /// Get a webhook details + /// + /// Thrown when fails to make API call + /// Id of the webhook + /// Task of ApiResponse (GetWebhook) + public async System.Threading.Tasks.Task> GetWebhookAsyncWithHttpInfo (long? webhookId) + { + // verify the required parameter 'webhookId' is set + if (webhookId == null) + throw new ApiException(400, "Missing required parameter 'webhookId' when calling WebhooksApi->GetWebhook"); + + var localVarPath = "/webhooks/{webhookId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (webhookId != null) localVarPathParams.Add("webhookId", this.Configuration.ApiClient.ParameterToString(webhookId)); // path parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetWebhook", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetWebhook) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetWebhook))); + } + + /// + /// Get all webhooks + /// + /// Thrown when fails to make API call + /// Filter on webhook type (optional, default to transactional) + /// GetWebhooks + public GetWebhooks GetWebhooks (string type = null) + { + ApiResponse localVarResponse = GetWebhooksWithHttpInfo(type); + return localVarResponse.Data; + } + + /// + /// Get all webhooks + /// + /// Thrown when fails to make API call + /// Filter on webhook type (optional, default to transactional) + /// ApiResponse of GetWebhooks + public ApiResponse< GetWebhooks > GetWebhooksWithHttpInfo (string type = null) + { + + var localVarPath = "/webhooks"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (type != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "type", type)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetWebhooks", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetWebhooks) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetWebhooks))); + } + + /// + /// Get all webhooks + /// + /// Thrown when fails to make API call + /// Filter on webhook type (optional, default to transactional) + /// Task of GetWebhooks + public async System.Threading.Tasks.Task GetWebhooksAsync (string type = null) + { + ApiResponse localVarResponse = await GetWebhooksAsyncWithHttpInfo(type); + return localVarResponse.Data; + + } + + /// + /// Get all webhooks + /// + /// Thrown when fails to make API call + /// Filter on webhook type (optional, default to transactional) + /// Task of ApiResponse (GetWebhooks) + public async System.Threading.Tasks.Task> GetWebhooksAsyncWithHttpInfo (string type = null) + { + + var localVarPath = "/webhooks"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (type != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "type", type)); // query parameter + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetWebhooks", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (GetWebhooks) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetWebhooks))); + } + + /// + /// Update a webhook + /// + /// Thrown when fails to make API call + /// Id of the webhook + /// Values to update a webhook + /// + public void UpdateWebhook (long? webhookId, UpdateWebhook updateWebhook) + { + UpdateWebhookWithHttpInfo(webhookId, updateWebhook); + } + + /// + /// Update a webhook + /// + /// Thrown when fails to make API call + /// Id of the webhook + /// Values to update a webhook + /// ApiResponse of Object(void) + public ApiResponse UpdateWebhookWithHttpInfo (long? webhookId, UpdateWebhook updateWebhook) + { + // verify the required parameter 'webhookId' is set + if (webhookId == null) + throw new ApiException(400, "Missing required parameter 'webhookId' when calling WebhooksApi->UpdateWebhook"); + // verify the required parameter 'updateWebhook' is set + if (updateWebhook == null) + throw new ApiException(400, "Missing required parameter 'updateWebhook' when calling WebhooksApi->UpdateWebhook"); + + var localVarPath = "/webhooks/{webhookId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (webhookId != null) localVarPathParams.Add("webhookId", this.Configuration.ApiClient.ParameterToString(webhookId)); // path parameter + if (updateWebhook != null && updateWebhook.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(updateWebhook); // http body (model) parameter + } + else + { + localVarPostBody = updateWebhook; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateWebhook", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + /// + /// Update a webhook + /// + /// Thrown when fails to make API call + /// Id of the webhook + /// Values to update a webhook + /// Task of void + public async System.Threading.Tasks.Task UpdateWebhookAsync (long? webhookId, UpdateWebhook updateWebhook) + { + await UpdateWebhookAsyncWithHttpInfo(webhookId, updateWebhook); + + } + + /// + /// Update a webhook + /// + /// Thrown when fails to make API call + /// Id of the webhook + /// Values to update a webhook + /// Task of ApiResponse + public async System.Threading.Tasks.Task> UpdateWebhookAsyncWithHttpInfo (long? webhookId, UpdateWebhook updateWebhook) + { + // verify the required parameter 'webhookId' is set + if (webhookId == null) + throw new ApiException(400, "Missing required parameter 'webhookId' when calling WebhooksApi->UpdateWebhook"); + // verify the required parameter 'updateWebhook' is set + if (updateWebhook == null) + throw new ApiException(400, "Missing required parameter 'updateWebhook' when calling WebhooksApi->UpdateWebhook"); + + var localVarPath = "/webhooks/{webhookId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (webhookId != null) localVarPathParams.Add("webhookId", this.Configuration.ApiClient.ParameterToString(webhookId)); // path parameter + if (updateWebhook != null && updateWebhook.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(updateWebhook); // http body (model) parameter + } + else + { + localVarPostBody = updateWebhook; // byte array + } + + // authentication (api-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api-key"))) + { + localVarHeaderParams["api-key"] = this.Configuration.GetApiKeyWithPrefix("api-key"); + } + // authentication (partner-key) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("partner-key"))) + { + localVarHeaderParams["partner-key"] = this.Configuration.GetApiKeyWithPrefix("partner-key"); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateWebhook", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + null); + } + + } +} diff --git a/src/sib_api_v3_sdk/Client/ApiClient.cs b/src/sib_api_v3_sdk/Client/ApiClient.cs new file mode 100644 index 0000000..c91d5cb --- /dev/null +++ b/src/sib_api_v3_sdk/Client/ApiClient.cs @@ -0,0 +1,530 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Text.RegularExpressions; +using System.IO; +using System.Web; +using System.Linq; +using System.Net; +using System.Text; +using Newtonsoft.Json; +using RestSharp; + +namespace sib_api_v3_sdk.Client +{ + /// + /// API client is mainly responsible for making the HTTP call to the API backend. + /// + public partial class ApiClient + { + private JsonSerializerSettings serializerSettings = new JsonSerializerSettings + { + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor + }; + + /// + /// Allows for extending request processing for generated code. + /// + /// The RestSharp request object + partial void InterceptRequest(IRestRequest request); + + /// + /// Allows for extending response processing for generated code. + /// + /// The RestSharp request object + /// The RestSharp response object + partial void InterceptResponse(IRestRequest request, IRestResponse response); + + /// + /// Initializes a new instance of the class + /// with default configuration. + /// + public ApiClient() + { + Configuration = sib_api_v3_sdk.Client.Configuration.Default; + RestClient = new RestClient("https://api.sendinblue.com/v3"); + } + + /// + /// Initializes a new instance of the class + /// with default base path (https://api.sendinblue.com/v3). + /// + /// An instance of Configuration. + public ApiClient(Configuration config) + { + Configuration = config ?? sib_api_v3_sdk.Client.Configuration.Default; + + RestClient = new RestClient(Configuration.BasePath); + } + + /// + /// Initializes a new instance of the class + /// with default configuration. + /// + /// The base path. + public ApiClient(String basePath = "https://api.sendinblue.com/v3") + { + if (String.IsNullOrEmpty(basePath)) + throw new ArgumentException("basePath cannot be empty"); + + RestClient = new RestClient(basePath); + Configuration = Client.Configuration.Default; + } + + /// + /// Gets or sets the default API client for making HTTP calls. + /// + /// The default API client. + [Obsolete("ApiClient.Default is deprecated, please use 'Configuration.Default.ApiClient' instead.")] + public static ApiClient Default; + + /// + /// Gets or sets an instance of the IReadableConfiguration. + /// + /// An instance of the IReadableConfiguration. + /// + /// helps us to avoid modifying possibly global + /// configuration values from within a given client. It does not guarantee thread-safety + /// of the instance in any way. + /// + public IReadableConfiguration Configuration { get; set; } + + /// + /// Gets or sets the RestClient. + /// + /// An instance of the RestClient + public RestClient RestClient { get; set; } + + // Creates and sets up a RestRequest prior to a call. + private RestRequest PrepareRequest( + String path, RestSharp.Method method, List> queryParams, Object postBody, + Dictionary headerParams, Dictionary formParams, + Dictionary fileParams, Dictionary pathParams, + String contentType) + { + var request = new RestRequest(path, method); + + // add path parameter, if any + foreach(var param in pathParams) + request.AddParameter(param.Key, param.Value, ParameterType.UrlSegment); + + // add header parameter, if any + foreach(var param in headerParams) + request.AddHeader(param.Key, param.Value); + + // add query parameter, if any + foreach(var param in queryParams) + request.AddQueryParameter(param.Key, param.Value); + + // add form parameter, if any + foreach(var param in formParams) + request.AddParameter(param.Key, param.Value); + + // add file parameter, if any + foreach(var param in fileParams) + { + request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentType); + } + + if (postBody != null) // http body (model or byte[]) parameter + { + request.AddParameter(contentType, postBody, ParameterType.RequestBody); + } + + return request; + } + + /// + /// Makes the HTTP request (Sync). + /// + /// URL path. + /// HTTP method. + /// Query parameters. + /// HTTP body (POST request). + /// Header parameters. + /// Form parameters. + /// File parameters. + /// Path parameters. + /// Content Type of the request + /// Object + public Object CallApi( + String path, RestSharp.Method method, List> queryParams, Object postBody, + Dictionary headerParams, Dictionary formParams, + Dictionary fileParams, Dictionary pathParams, + String contentType) + { + var request = PrepareRequest( + path, method, queryParams, postBody, headerParams, formParams, fileParams, + pathParams, contentType); + + // set timeout + + RestClient.Timeout = Configuration.Timeout; + // set user agent + RestClient.UserAgent = Configuration.UserAgent; + + InterceptRequest(request); + var response = RestClient.Execute(request); + InterceptResponse(request, response); + + return (Object) response; + } + /// + /// Makes the asynchronous HTTP request. + /// + /// URL path. + /// HTTP method. + /// Query parameters. + /// HTTP body (POST request). + /// Header parameters. + /// Form parameters. + /// File parameters. + /// Path parameters. + /// Content type. + /// The Task instance. + public async System.Threading.Tasks.Task CallApiAsync( + String path, RestSharp.Method method, List> queryParams, Object postBody, + Dictionary headerParams, Dictionary formParams, + Dictionary fileParams, Dictionary pathParams, + String contentType) + { + var request = PrepareRequest( + path, method, queryParams, postBody, headerParams, formParams, fileParams, + pathParams, contentType); + InterceptRequest(request); + var response = await RestClient.ExecuteTaskAsync(request); + InterceptResponse(request, response); + return (Object)response; + } + + /// + /// Escape string (url-encoded). + /// + /// String to be escaped. + /// Escaped string. + public string EscapeString(string str) + { + return UrlEncode(str); + } + + /// + /// Create FileParameter based on Stream. + /// + /// Parameter name. + /// Input stream. + /// FileParameter. + public FileParameter ParameterToFile(string name, Stream stream) + { + if (stream is FileStream) + return FileParameter.Create(name, ReadAsBytes(stream), Path.GetFileName(((FileStream)stream).Name)); + else + return FileParameter.Create(name, ReadAsBytes(stream), "no_file_name_provided"); + } + + /// + /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. + /// If parameter is a list, join the list with ",". + /// Otherwise just return the string. + /// + /// The parameter (header, path, query, form). + /// Formatted string. + public string ParameterToString(object obj) + { + if (obj is DateTime) + // Return a formatted date string - Can be customized with Configuration.DateTimeFormat + // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") + // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 + // For example: 2009-06-15T13:45:30.0000000 + return ((DateTime)obj).ToString (Configuration.DateTimeFormat); + else if (obj is DateTimeOffset) + // Return a formatted date string - Can be customized with Configuration.DateTimeFormat + // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") + // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 + // For example: 2009-06-15T13:45:30.0000000 + return ((DateTimeOffset)obj).ToString (Configuration.DateTimeFormat); + else if (obj is IList) + { + var flattenedString = new StringBuilder(); + foreach (var param in (IList)obj) + { + if (flattenedString.Length > 0) + flattenedString.Append(","); + flattenedString.Append(param); + } + return flattenedString.ToString(); + } + else + return Convert.ToString (obj); + } + + /// + /// Deserialize the JSON string into a proper object. + /// + /// The HTTP response. + /// Object type. + /// Object representation of the JSON string. + public object Deserialize(IRestResponse response, Type type) + { + IList headers = response.Headers; + if (type == typeof(byte[])) // return byte array + { + return response.RawBytes; + } + + // TODO: ? if (type.IsAssignableFrom(typeof(Stream))) + if (type == typeof(Stream)) + { + if (headers != null) + { + var filePath = String.IsNullOrEmpty(Configuration.TempFolderPath) + ? Path.GetTempPath() + : Configuration.TempFolderPath; + var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$"); + foreach (var header in headers) + { + var match = regex.Match(header.ToString()); + if (match.Success) + { + string fileName = filePath + SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); + File.WriteAllBytes(fileName, response.RawBytes); + return new FileStream(fileName, FileMode.Open); + } + } + } + var stream = new MemoryStream(response.RawBytes); + return stream; + } + + if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object + { + return DateTime.Parse(response.Content, null, System.Globalization.DateTimeStyles.RoundtripKind); + } + + if (type == typeof(String) || type.Name.StartsWith("System.Nullable")) // return primitive type + { + return ConvertType(response.Content, type); + } + + // at this point, it must be a model (json) + try + { + return JsonConvert.DeserializeObject(response.Content, type, serializerSettings); + } + catch (Exception e) + { + throw new ApiException(500, e.Message); + } + } + + /// + /// Serialize an input (model) into JSON string + /// + /// Object. + /// JSON string. + public String Serialize(object obj) + { + try + { + return obj != null ? JsonConvert.SerializeObject(obj) : null; + } + catch (Exception e) + { + throw new ApiException(500, e.Message); + } + } + + /// + ///Check if the given MIME is a JSON MIME. + ///JSON MIME examples: + /// application/json + /// application/json; charset=UTF8 + /// APPLICATION/JSON + /// application/vnd.company+json + /// + /// MIME + /// Returns True if MIME type is json. + public bool IsJsonMime(String mime) + { + var jsonRegex = new Regex("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"); + return mime != null && (jsonRegex.IsMatch(mime) || mime.Equals("application/json-patch+json")); + } + + /// + /// Select the Content-Type header's value from the given content-type array: + /// if JSON type exists in the given array, use it; + /// otherwise use the first one defined in 'consumes' + /// + /// The Content-Type array to select from. + /// The Content-Type header to use. + public String SelectHeaderContentType(String[] contentTypes) + { + if (contentTypes.Length == 0) + return "application/json"; + + foreach (var contentType in contentTypes) + { + if (IsJsonMime(contentType.ToLower())) + return contentType; + } + + return contentTypes[0]; // use the first content type specified in 'consumes' + } + + /// + /// 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) + /// + /// The accepts array to select from. + /// The Accept header to use. + public String SelectHeaderAccept(String[] accepts) + { + if (accepts.Length == 0) + return null; + + if (accepts.Contains("application/json", StringComparer.OrdinalIgnoreCase)) + return "application/json"; + + return String.Join(",", accepts); + } + + /// + /// Encode string in base64 format. + /// + /// String to be encoded. + /// Encoded string. + public static string Base64Encode(string text) + { + return System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); + } + + /// + /// Dynamically cast the object into target type. + /// + /// Object to be casted + /// Target type + /// Casted object + public static dynamic ConvertType(dynamic fromObject, Type toObject) + { + return Convert.ChangeType(fromObject, toObject); + } + + /// + /// Convert stream to byte array + /// + /// Input stream to be converted + /// Byte array + public static byte[] ReadAsBytes(Stream inputStream) + { + byte[] buf = new byte[16*1024]; + using (MemoryStream ms = new MemoryStream()) + { + int count; + while ((count = inputStream.Read(buf, 0, buf.Length)) > 0) + { + ms.Write(buf, 0, count); + } + return ms.ToArray(); + } + } + + /// + /// URL encode a string + /// Credit/Ref: https://github.com/restsharp/RestSharp/blob/master/RestSharp/Extensions/StringExtensions.cs#L50 + /// + /// String to be URL encoded + /// Byte array + public static string UrlEncode(string input) + { + const int maxLength = 32766; + + if (input == null) + { + throw new ArgumentNullException("input"); + } + + if (input.Length <= maxLength) + { + return Uri.EscapeDataString(input); + } + + StringBuilder sb = new StringBuilder(input.Length * 2); + int index = 0; + + while (index < input.Length) + { + int length = Math.Min(input.Length - index, maxLength); + string subString = input.Substring(index, length); + + sb.Append(Uri.EscapeDataString(subString)); + index += subString.Length; + } + + return sb.ToString(); + } + + /// + /// Sanitize filename by removing the path + /// + /// Filename + /// Filename + public static string SanitizeFilename(string filename) + { + Match match = Regex.Match(filename, @".*[/\\](.*)$"); + + if (match.Success) + { + return match.Groups[1].Value; + } + else + { + return filename; + } + } + + /// + /// Convert params to key/value pairs. + /// Use collectionFormat to properly format lists and collections. + /// + /// Key name. + /// Value object. + /// A list of KeyValuePairs + public IEnumerable> ParameterToKeyValuePairs(string collectionFormat, string name, object value) + { + var parameters = new List>(); + + if (IsCollection(value) && collectionFormat == "multi") + { + var valueCollection = value as IEnumerable; + parameters.AddRange(from object item in valueCollection select new KeyValuePair(name, ParameterToString(item))); + } + else + { + parameters.Add(new KeyValuePair(name, ParameterToString(value))); + } + + return parameters; + } + + /// + /// Check if generic object is a collection. + /// + /// + /// True if object is a collection type + private static bool IsCollection(object value) + { + return value is IList || value is ICollection; + } + } +} diff --git a/src/sib_api_v3_sdk/Client/ApiException.cs b/src/sib_api_v3_sdk/Client/ApiException.cs new file mode 100644 index 0000000..16913b5 --- /dev/null +++ b/src/sib_api_v3_sdk/Client/ApiException.cs @@ -0,0 +1,60 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; + +namespace sib_api_v3_sdk.Client +{ + /// + /// API Exception + /// + public class ApiException : Exception + { + /// + /// Gets or sets the error code (HTTP status code) + /// + /// The error code (HTTP status code). + public int ErrorCode { get; set; } + + /// + /// Gets or sets the error content (body json object) + /// + /// The error content (Http response body). + public dynamic ErrorContent { get; private set; } + + /// + /// Initializes a new instance of the class. + /// + public ApiException() {} + + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// Error message. + public ApiException(int errorCode, string message) : base(message) + { + this.ErrorCode = errorCode; + } + + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// Error message. + /// Error content. + public ApiException(int errorCode, string message, dynamic errorContent = null) : base(message) + { + this.ErrorCode = errorCode; + this.ErrorContent = errorContent; + } + } + +} diff --git a/src/sib_api_v3_sdk/Client/ApiResponse.cs b/src/sib_api_v3_sdk/Client/ApiResponse.cs new file mode 100644 index 0000000..307128e --- /dev/null +++ b/src/sib_api_v3_sdk/Client/ApiResponse.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Collections.Generic; + +namespace sib_api_v3_sdk.Client +{ + /// + /// API Response + /// + public class ApiResponse + { + /// + /// Gets or sets the status code (HTTP status code) + /// + /// The status code. + public int StatusCode { get; private set; } + + /// + /// Gets or sets the HTTP headers + /// + /// HTTP headers + public IDictionary Headers { get; private set; } + + /// + /// Gets or sets the data (parsed HTTP body) + /// + /// The data. + public T Data { get; private set; } + + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// HTTP headers. + /// Data (parsed HTTP body) + public ApiResponse(int statusCode, IDictionary headers, T data) + { + this.StatusCode= statusCode; + this.Headers = headers; + this.Data = data; + } + + } + +} diff --git a/src/sib_api_v3_sdk/Client/Configuration.cs b/src/sib_api_v3_sdk/Client/Configuration.cs new file mode 100644 index 0000000..92a3895 --- /dev/null +++ b/src/sib_api_v3_sdk/Client/Configuration.cs @@ -0,0 +1,453 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Reflection; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; + +namespace sib_api_v3_sdk.Client +{ + /// + /// Represents a set of configuration settings + /// + public class Configuration : IReadableConfiguration + { + #region Constants + + /// + /// Version of the package. + /// + /// Version of the package. + public const string Version = "1.0.0"; + + /// + /// Identifier for ISO 8601 DateTime Format + /// + /// See https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 for more information. + // ReSharper disable once InconsistentNaming + public const string ISO8601_DATETIME_FORMAT = "o"; + + #endregion Constants + + #region Static Members + + private static readonly object GlobalConfigSync = new { }; + private static Configuration _globalConfiguration; + + /// + /// Default creation of exceptions for a given method name and response object + /// + public static readonly ExceptionFactory DefaultExceptionFactory = (methodName, response) => + { + var status = (int)response.StatusCode; + if (status >= 400) + { + return new ApiException(status, + string.Format("Error calling {0}: {1}", methodName, response.Content), + response.Content); + } + if (status == 0) + { + return new ApiException(status, + string.Format("Error calling {0}: {1}", methodName, response.ErrorMessage), response.ErrorMessage); + } + return null; + }; + + /// + /// Gets or sets the default Configuration. + /// + /// Configuration. + public static Configuration Default + { + get { return _globalConfiguration; } + set + { + lock (GlobalConfigSync) + { + _globalConfiguration = value; + } + } + } + + #endregion Static Members + + #region Private Members + + /// + /// Gets or sets the API key based on the authentication name. + /// + /// The API key. + private IDictionary _apiKey = null; + + /// + /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. + /// + /// The prefix of the API key. + private IDictionary _apiKeyPrefix = null; + + private string _dateTimeFormat = ISO8601_DATETIME_FORMAT; + private string _tempFolderPath = Path.GetTempPath(); + + #endregion Private Members + + #region Constructors + + static Configuration() + { + _globalConfiguration = new GlobalConfiguration(); + } + + /// + /// Initializes a new instance of the class + /// + public Configuration() + { + UserAgent = "Swagger-Codegen/1.0.0/csharp"; + BasePath = "https://api.sendinblue.com/v3"; + DefaultHeader = new ConcurrentDictionary(); + ApiKey = new ConcurrentDictionary(); + ApiKeyPrefix = new ConcurrentDictionary(); + + // Setting Timeout has side effects (forces ApiClient creation). + Timeout = 100000; + } + + /// + /// Initializes a new instance of the class + /// + public Configuration( + IDictionary defaultHeader, + IDictionary apiKey, + IDictionary apiKeyPrefix, + string basePath = "https://api.sendinblue.com/v3") : this() + { + if (string.IsNullOrWhiteSpace(basePath)) + throw new ArgumentException("The provided basePath is invalid.", "basePath"); + if (defaultHeader == null) + throw new ArgumentNullException("defaultHeader"); + if (apiKey == null) + throw new ArgumentNullException("apiKey"); + if (apiKeyPrefix == null) + throw new ArgumentNullException("apiKeyPrefix"); + + BasePath = basePath; + + foreach (var keyValuePair in defaultHeader) + { + DefaultHeader.Add(keyValuePair); + } + + foreach (var keyValuePair in apiKey) + { + ApiKey.Add(keyValuePair); + } + + foreach (var keyValuePair in apiKeyPrefix) + { + ApiKeyPrefix.Add(keyValuePair); + } + } + + /// + /// Initializes a new instance of the class with different settings + /// + /// Api client + /// Dictionary of default HTTP header + /// Username + /// Password + /// accessToken + /// Dictionary of API key + /// Dictionary of API key prefix + /// Temp folder path + /// DateTime format string + /// HTTP connection timeout (in milliseconds) + /// HTTP user agent + [Obsolete("Use explicit object construction and setting of properties.", true)] + public Configuration( + // ReSharper disable UnusedParameter.Local + ApiClient apiClient = null, + IDictionary defaultHeader = null, + string username = null, + string password = null, + string accessToken = null, + IDictionary apiKey = null, + IDictionary apiKeyPrefix = null, + string tempFolderPath = null, + string dateTimeFormat = null, + int timeout = 100000, + string userAgent = "Swagger-Codegen/1.0.0/csharp" + // ReSharper restore UnusedParameter.Local + ) + { + + } + + /// + /// Initializes a new instance of the Configuration class. + /// + /// Api client. + [Obsolete("This constructor caused unexpected sharing of static data. It is no longer supported.", true)] + // ReSharper disable once UnusedParameter.Local + public Configuration(ApiClient apiClient) + { + + } + + #endregion Constructors + + + #region Properties + + private ApiClient _apiClient = null; + /// + /// Gets an instance of an ApiClient for this configuration + /// + public virtual ApiClient ApiClient + { + get + { + if (_apiClient == null) _apiClient = CreateApiClient(); + return _apiClient; + } + } + + private String _basePath = null; + /// + /// Gets or sets the base path for API access. + /// + public virtual string BasePath { + get { return _basePath; } + set { + _basePath = value; + // pass-through to ApiClient if it's set. + if(_apiClient != null) { + _apiClient.RestClient.BaseUrl = new Uri(_basePath); + } + } + } + + /// + /// Gets or sets the default header. + /// + public virtual IDictionary DefaultHeader { get; set; } + + /// + /// Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds. + /// + public virtual int Timeout + { + + get { return ApiClient.RestClient.Timeout; } + set { ApiClient.RestClient.Timeout = value; } + } + + /// + /// Gets or sets the HTTP user agent. + /// + /// Http user agent. + public virtual string UserAgent { get; set; } + + /// + /// Gets or sets the username (HTTP basic authentication). + /// + /// The username. + public virtual string Username { get; set; } + + /// + /// Gets or sets the password (HTTP basic authentication). + /// + /// The password. + public virtual string Password { get; set; } + + /// + /// Gets the API key with prefix. + /// + /// API key identifier (authentication scheme). + /// API key with prefix. + public string GetApiKeyWithPrefix(string apiKeyIdentifier) + { + var apiKeyValue = ""; + ApiKey.TryGetValue (apiKeyIdentifier, out apiKeyValue); + var apiKeyPrefix = ""; + if (ApiKeyPrefix.TryGetValue (apiKeyIdentifier, out apiKeyPrefix)) + return apiKeyPrefix + " " + apiKeyValue; + else + return apiKeyValue; + } + + /// + /// Gets or sets the access token for OAuth2 authentication. + /// + /// The access token. + public virtual string AccessToken { get; set; } + + /// + /// Gets or sets the temporary folder path to store the files downloaded from the server. + /// + /// Folder path. + public virtual string TempFolderPath + { + get { return _tempFolderPath; } + + set + { + if (string.IsNullOrEmpty(value)) + { + // Possible breaking change since swagger-codegen 2.2.1, enforce a valid temporary path on set. + _tempFolderPath = Path.GetTempPath(); + return; + } + + // create the directory if it does not exist + if (!Directory.Exists(value)) + { + Directory.CreateDirectory(value); + } + + // check if the path contains directory separator at the end + if (value[value.Length - 1] == Path.DirectorySeparatorChar) + { + _tempFolderPath = value; + } + else + { + _tempFolderPath = value + Path.DirectorySeparatorChar; + } + } + } + + /// + /// Gets or sets the the date time format used when serializing in the ApiClient + /// By default, it's set to ISO 8601 - "o", for others see: + /// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx + /// and https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx + /// No validation is done to ensure that the string you're providing is valid + /// + /// The DateTimeFormat string + public virtual string DateTimeFormat + { + get { return _dateTimeFormat; } + set + { + if (string.IsNullOrEmpty(value)) + { + // Never allow a blank or null string, go back to the default + _dateTimeFormat = ISO8601_DATETIME_FORMAT; + return; + } + + // Caution, no validation when you choose date time format other than ISO 8601 + // Take a look at the above links + _dateTimeFormat = value; + } + } + + /// + /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. + /// + /// The prefix of the API key. + public virtual IDictionary ApiKeyPrefix + { + get { return _apiKeyPrefix; } + set + { + if (value == null) + { + throw new InvalidOperationException("ApiKeyPrefix collection may not be null."); + } + _apiKeyPrefix = value; + } + } + + /// + /// Gets or sets the API key based on the authentication name. + /// + /// The API key. + public virtual IDictionary ApiKey + { + get { return _apiKey; } + set + { + if (value == null) + { + throw new InvalidOperationException("ApiKey collection may not be null."); + } + _apiKey = value; + } + } + + #endregion Properties + + #region Methods + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + public void AddDefaultHeader(string key, string value) + { + DefaultHeader[key] = value; + } + + /// + /// Creates a new based on this instance. + /// + /// + public ApiClient CreateApiClient() + { + return new ApiClient(BasePath) { Configuration = this }; + } + + + /// + /// Returns a string with essential information for debugging. + /// + public static String ToDebugReport() + { + String report = "C# SDK (sib_api_v3_sdk) Debug Report:\n"; + report += " OS: " + System.Environment.OSVersion + "\n"; + report += " .NET Framework Version: " + System.Environment.Version + "\n"; + report += " Version of the API: 3.0.0\n"; + report += " SDK Package Version: 1.0.0\n"; + + return report; + } + + /// + /// Add Api Key Header. + /// + /// Api Key name. + /// Api Key value. + /// + public void AddApiKey(string key, string value) + { + ApiKey[key] = value; + } + + /// + /// Sets the API key prefix. + /// + /// Api Key name. + /// Api Key value. + public void AddApiKeyPrefix(string key, string value) + { + ApiKeyPrefix[key] = value; + } + + #endregion Methods + } +} diff --git a/src/sib_api_v3_sdk/Client/ExceptionFactory.cs b/src/sib_api_v3_sdk/Client/ExceptionFactory.cs new file mode 100644 index 0000000..a10a73f --- /dev/null +++ b/src/sib_api_v3_sdk/Client/ExceptionFactory.cs @@ -0,0 +1,24 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using System; +using RestSharp; + +namespace sib_api_v3_sdk.Client +{ + /// + /// A delegate to ExceptionFactory method + /// + /// Method name + /// Response + /// Exceptions + public delegate Exception ExceptionFactory(string methodName, IRestResponse response); +} diff --git a/src/sib_api_v3_sdk/Client/GlobalConfiguration.cs b/src/sib_api_v3_sdk/Client/GlobalConfiguration.cs new file mode 100644 index 0000000..932d669 --- /dev/null +++ b/src/sib_api_v3_sdk/Client/GlobalConfiguration.cs @@ -0,0 +1,34 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using System; +using System.Reflection; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading; + +namespace sib_api_v3_sdk.Client +{ + /// + /// provides a compile-time extension point for globally configuring + /// API Clients. + /// + /// + /// A customized implementation via partial class may reside in another file and may + /// be excluded from automatic generation via a .swagger-codegen-ignore file. + /// + public partial class GlobalConfiguration : Configuration + { + + } +} \ No newline at end of file diff --git a/src/sib_api_v3_sdk/Client/IApiAccessor.cs b/src/sib_api_v3_sdk/Client/IApiAccessor.cs new file mode 100644 index 0000000..3000cb7 --- /dev/null +++ b/src/sib_api_v3_sdk/Client/IApiAccessor.cs @@ -0,0 +1,42 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using RestSharp; + +namespace sib_api_v3_sdk.Client +{ + /// + /// Represents configuration aspects required to interact with the API endpoints. + /// + public interface IApiAccessor + { + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + Configuration Configuration {get; set;} + + /// + /// Gets the base path of the API client. + /// + /// The base path + String GetBasePath(); + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + ExceptionFactory ExceptionFactory { get; set; } + } +} diff --git a/src/sib_api_v3_sdk/Client/IReadableConfiguration.cs b/src/sib_api_v3_sdk/Client/IReadableConfiguration.cs new file mode 100644 index 0000000..3f2bf99 --- /dev/null +++ b/src/sib_api_v3_sdk/Client/IReadableConfiguration.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using System.Collections.Generic; + +namespace sib_api_v3_sdk.Client +{ + /// + /// Represents a readable-only configuration contract. + /// + public interface IReadableConfiguration + { + /// + /// Gets the access token. + /// + /// Access token. + string AccessToken { get; } + + /// + /// Gets the API key. + /// + /// API key. + IDictionary ApiKey { get; } + + /// + /// Gets the API key prefix. + /// + /// API key prefix. + IDictionary ApiKeyPrefix { get; } + + /// + /// Gets the base path. + /// + /// Base path. + string BasePath { get; } + + /// + /// Gets the date time format. + /// + /// Date time foramt. + string DateTimeFormat { get; } + + /// + /// Gets the default header. + /// + /// Default header. + IDictionary DefaultHeader { get; } + + /// + /// Gets the temp folder path. + /// + /// Temp folder path. + string TempFolderPath { get; } + + /// + /// Gets the HTTP connection timeout (in milliseconds) + /// + /// HTTP connection timeout. + int Timeout { get; } + + /// + /// Gets the user agent. + /// + /// User agent. + string UserAgent { get; } + + /// + /// Gets the username. + /// + /// Username. + string Username { get; } + + /// + /// Gets the password. + /// + /// Password. + string Password { get; } + + /// + /// Gets the API key with prefix. + /// + /// API key identifier (authentication scheme). + /// API key with prefix. + string GetApiKeyWithPrefix(string apiKeyIdentifier); + } +} diff --git a/src/sib_api_v3_sdk/Client/SwaggerDateConverter.cs b/src/sib_api_v3_sdk/Client/SwaggerDateConverter.cs new file mode 100644 index 0000000..eb938eb --- /dev/null +++ b/src/sib_api_v3_sdk/Client/SwaggerDateConverter.cs @@ -0,0 +1,30 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using Newtonsoft.Json.Converters; + +namespace sib_api_v3_sdk.Client +{ + /// + /// Formatter for 'date' swagger formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types + /// + public class SwaggerDateConverter : IsoDateTimeConverter + { + /// + /// Initializes a new instance of the class. + /// + public SwaggerDateConverter() + { + // full-date = date-fullyear "-" date-month "-" date-mday + DateTimeFormat = "yyyy-MM-dd"; + } + } +} diff --git a/src/sib_api_v3_sdk/Model/AddContactToList.cs b/src/sib_api_v3_sdk/Model/AddContactToList.cs new file mode 100644 index 0000000..c5af879 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/AddContactToList.cs @@ -0,0 +1,125 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// AddContactToList + /// + [DataContract] + public partial class AddContactToList : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Emails to add to a list. + public AddContactToList(List emails = default(List)) + { + this.Emails = emails; + } + + /// + /// Emails to add to a list + /// + /// Emails to add to a list + [DataMember(Name="emails", EmitDefaultValue=false)] + public List Emails { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AddContactToList {\n"); + sb.Append(" Emails: ").Append(Emails).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as AddContactToList); + } + + /// + /// Returns true if AddContactToList instances are equal + /// + /// Instance of AddContactToList to be compared + /// Boolean + public bool Equals(AddContactToList input) + { + if (input == null) + return false; + + return + ( + this.Emails == input.Emails || + this.Emails != null && + this.Emails.SequenceEqual(input.Emails) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Emails != null) + hashCode = hashCode * 59 + this.Emails.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/AddCredits.cs b/src/sib_api_v3_sdk/Model/AddCredits.cs new file mode 100644 index 0000000..094e674 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/AddCredits.cs @@ -0,0 +1,142 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// AddCredits + /// + [DataContract] + public partial class AddCredits : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Required if email credits are empty. SMS credits to be added to the child account. + /// Required if sms credits are empty. Email credits to be added to the child account. + public AddCredits(long? sms = default(long?), long? email = default(long?)) + { + this.Sms = sms; + this.Email = email; + } + + /// + /// Required if email credits are empty. SMS credits to be added to the child account + /// + /// Required if email credits are empty. SMS credits to be added to the child account + [DataMember(Name="sms", EmitDefaultValue=false)] + public long? Sms { get; set; } + + /// + /// Required if sms credits are empty. Email credits to be added to the child account + /// + /// Required if sms credits are empty. Email credits to be added to the child account + [DataMember(Name="email", EmitDefaultValue=false)] + public long? Email { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AddCredits {\n"); + sb.Append(" Sms: ").Append(Sms).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as AddCredits); + } + + /// + /// Returns true if AddCredits instances are equal + /// + /// Instance of AddCredits to be compared + /// Boolean + public bool Equals(AddCredits input) + { + if (input == null) + return false; + + return + ( + this.Sms == input.Sms || + (this.Sms != null && + this.Sms.Equals(input.Sms)) + ) && + ( + this.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Sms != null) + hashCode = hashCode * 59 + this.Sms.GetHashCode(); + if (this.Email != null) + hashCode = hashCode * 59 + this.Email.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/CreateAttribute.cs b/src/sib_api_v3_sdk/Model/CreateAttribute.cs new file mode 100644 index 0000000..8556cef --- /dev/null +++ b/src/sib_api_v3_sdk/Model/CreateAttribute.cs @@ -0,0 +1,204 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// CreateAttribute + /// + [DataContract] + public partial class CreateAttribute : IEquatable, IValidatableObject + { + /// + /// Type of the attribute. Use only if the attribute's category is 'normal', 'category' or 'transactional' ( type 'boolean' is only available if the category is 'normal' attribute, type 'id' is only available if the category is 'transactional' attribute & type 'category' is only available if the category is 'category' attribute ) + /// + /// Type of the attribute. Use only if the attribute's category is 'normal', 'category' or 'transactional' ( type 'boolean' is only available if the category is 'normal' attribute, type 'id' is only available if the category is 'transactional' attribute & type 'category' is only available if the category is 'category' attribute ) + [JsonConverter(typeof(StringEnumConverter))] + public enum TypeEnum + { + + /// + /// Enum Text for value: text + /// + [EnumMember(Value = "text")] + Text = 1, + + /// + /// Enum Date for value: date + /// + [EnumMember(Value = "date")] + Date = 2, + + /// + /// Enum Float for value: float + /// + [EnumMember(Value = "float")] + Float = 3, + + /// + /// Enum Boolean for value: boolean + /// + [EnumMember(Value = "boolean")] + Boolean = 4, + + /// + /// Enum Id for value: id + /// + [EnumMember(Value = "id")] + Id = 5, + + /// + /// Enum Category for value: category + /// + [EnumMember(Value = "category")] + Category = 6 + } + + /// + /// Type of the attribute. Use only if the attribute's category is 'normal', 'category' or 'transactional' ( type 'boolean' is only available if the category is 'normal' attribute, type 'id' is only available if the category is 'transactional' attribute & type 'category' is only available if the category is 'category' attribute ) + /// + /// Type of the attribute. Use only if the attribute's category is 'normal', 'category' or 'transactional' ( type 'boolean' is only available if the category is 'normal' attribute, type 'id' is only available if the category is 'transactional' attribute & type 'category' is only available if the category is 'category' attribute ) + [DataMember(Name="type", EmitDefaultValue=false)] + public TypeEnum? Type { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// Value of the attribute. Use only if the attribute's category is 'calculated' or 'global'. + /// List of values and labels that the attribute can take. Use only if the attribute's category is \"category\". For example, [{'value':1, 'label':'male'}, {'value':2, 'label':'female'}]. + /// Type of the attribute. Use only if the attribute's category is 'normal', 'category' or 'transactional' ( type 'boolean' is only available if the category is 'normal' attribute, type 'id' is only available if the category is 'transactional' attribute & type 'category' is only available if the category is 'category' attribute ). + public CreateAttribute(string value = default(string), List enumeration = default(List), TypeEnum? type = default(TypeEnum?)) + { + this.Value = value; + this.Enumeration = enumeration; + this.Type = type; + } + + /// + /// Value of the attribute. Use only if the attribute's category is 'calculated' or 'global' + /// + /// Value of the attribute. Use only if the attribute's category is 'calculated' or 'global' + [DataMember(Name="value", EmitDefaultValue=false)] + public string Value { get; set; } + + /// + /// List of values and labels that the attribute can take. Use only if the attribute's category is \"category\". For example, [{'value':1, 'label':'male'}, {'value':2, 'label':'female'}] + /// + /// List of values and labels that the attribute can take. Use only if the attribute's category is \"category\". For example, [{'value':1, 'label':'male'}, {'value':2, 'label':'female'}] + [DataMember(Name="enumeration", EmitDefaultValue=false)] + public List Enumeration { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateAttribute {\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" Enumeration: ").Append(Enumeration).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateAttribute); + } + + /// + /// Returns true if CreateAttribute instances are equal + /// + /// Instance of CreateAttribute to be compared + /// Boolean + public bool Equals(CreateAttribute input) + { + if (input == null) + return false; + + return + ( + this.Value == input.Value || + (this.Value != null && + this.Value.Equals(input.Value)) + ) && + ( + this.Enumeration == input.Enumeration || + this.Enumeration != null && + this.Enumeration.SequenceEqual(input.Enumeration) + ) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Value != null) + hashCode = hashCode * 59 + this.Value.GetHashCode(); + if (this.Enumeration != null) + hashCode = hashCode * 59 + this.Enumeration.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/CreateAttributeEnumeration.cs b/src/sib_api_v3_sdk/Model/CreateAttributeEnumeration.cs new file mode 100644 index 0000000..559819e --- /dev/null +++ b/src/sib_api_v3_sdk/Model/CreateAttributeEnumeration.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// CreateAttributeEnumeration + /// + [DataContract] + public partial class CreateAttributeEnumeration : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CreateAttributeEnumeration() { } + /// + /// Initializes a new instance of the class. + /// + /// Id of the value (required). + /// Label of the value (required). + public CreateAttributeEnumeration(int? value = default(int?), string label = default(string)) + { + // to ensure "value" is required (not null) + if (value == null) + { + throw new InvalidDataException("value is a required property for CreateAttributeEnumeration and cannot be null"); + } + else + { + this.Value = value; + } + // to ensure "label" is required (not null) + if (label == null) + { + throw new InvalidDataException("label is a required property for CreateAttributeEnumeration and cannot be null"); + } + else + { + this.Label = label; + } + } + + /// + /// Id of the value + /// + /// Id of the value + [DataMember(Name="value", EmitDefaultValue=false)] + public int? Value { get; set; } + + /// + /// Label of the value + /// + /// Label of the value + [DataMember(Name="label", EmitDefaultValue=false)] + public string Label { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateAttributeEnumeration {\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" Label: ").Append(Label).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateAttributeEnumeration); + } + + /// + /// Returns true if CreateAttributeEnumeration instances are equal + /// + /// Instance of CreateAttributeEnumeration to be compared + /// Boolean + public bool Equals(CreateAttributeEnumeration input) + { + if (input == null) + return false; + + return + ( + this.Value == input.Value || + (this.Value != null && + this.Value.Equals(input.Value)) + ) && + ( + this.Label == input.Label || + (this.Label != null && + this.Label.Equals(input.Label)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Value != null) + hashCode = hashCode * 59 + this.Value.GetHashCode(); + if (this.Label != null) + hashCode = hashCode * 59 + this.Label.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/CreateChild.cs b/src/sib_api_v3_sdk/Model/CreateChild.cs new file mode 100644 index 0000000..9a33639 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/CreateChild.cs @@ -0,0 +1,238 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// CreateChild + /// + [DataContract] + public partial class CreateChild : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CreateChild() { } + /// + /// Initializes a new instance of the class. + /// + /// Email address to create the child account (required). + /// First name to use to create the child account (required). + /// Last name to use to create the child account (required). + /// Company name to use to create the child account (required). + /// Password for the child account to login (required). + public CreateChild(string email = default(string), string firstName = default(string), string lastName = default(string), string companyName = default(string), string password = default(string)) + { + // to ensure "email" is required (not null) + if (email == null) + { + throw new InvalidDataException("email is a required property for CreateChild and cannot be null"); + } + else + { + this.Email = email; + } + // to ensure "firstName" is required (not null) + if (firstName == null) + { + throw new InvalidDataException("firstName is a required property for CreateChild and cannot be null"); + } + else + { + this.FirstName = firstName; + } + // to ensure "lastName" is required (not null) + if (lastName == null) + { + throw new InvalidDataException("lastName is a required property for CreateChild and cannot be null"); + } + else + { + this.LastName = lastName; + } + // to ensure "companyName" is required (not null) + if (companyName == null) + { + throw new InvalidDataException("companyName is a required property for CreateChild and cannot be null"); + } + else + { + this.CompanyName = companyName; + } + // to ensure "password" is required (not null) + if (password == null) + { + throw new InvalidDataException("password is a required property for CreateChild and cannot be null"); + } + else + { + this.Password = password; + } + } + + /// + /// Email address to create the child account + /// + /// Email address to create the child account + [DataMember(Name="email", EmitDefaultValue=false)] + public string Email { get; set; } + + /// + /// First name to use to create the child account + /// + /// First name to use to create the child account + [DataMember(Name="firstName", EmitDefaultValue=false)] + public string FirstName { get; set; } + + /// + /// Last name to use to create the child account + /// + /// Last name to use to create the child account + [DataMember(Name="lastName", EmitDefaultValue=false)] + public string LastName { get; set; } + + /// + /// Company name to use to create the child account + /// + /// Company name to use to create the child account + [DataMember(Name="companyName", EmitDefaultValue=false)] + public string CompanyName { get; set; } + + /// + /// Password for the child account to login + /// + /// Password for the child account to login + [DataMember(Name="password", EmitDefaultValue=false)] + public string Password { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateChild {\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" FirstName: ").Append(FirstName).Append("\n"); + sb.Append(" LastName: ").Append(LastName).Append("\n"); + sb.Append(" CompanyName: ").Append(CompanyName).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateChild); + } + + /// + /// Returns true if CreateChild instances are equal + /// + /// Instance of CreateChild to be compared + /// Boolean + public bool Equals(CreateChild input) + { + if (input == null) + return false; + + return + ( + this.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ) && + ( + this.FirstName == input.FirstName || + (this.FirstName != null && + this.FirstName.Equals(input.FirstName)) + ) && + ( + this.LastName == input.LastName || + (this.LastName != null && + this.LastName.Equals(input.LastName)) + ) && + ( + this.CompanyName == input.CompanyName || + (this.CompanyName != null && + this.CompanyName.Equals(input.CompanyName)) + ) && + ( + this.Password == input.Password || + (this.Password != null && + this.Password.Equals(input.Password)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Email != null) + hashCode = hashCode * 59 + this.Email.GetHashCode(); + if (this.FirstName != null) + hashCode = hashCode * 59 + this.FirstName.GetHashCode(); + if (this.LastName != null) + hashCode = hashCode * 59 + this.LastName.GetHashCode(); + if (this.CompanyName != null) + hashCode = hashCode * 59 + this.CompanyName.GetHashCode(); + if (this.Password != null) + hashCode = hashCode * 59 + this.Password.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/CreateContact.cs b/src/sib_api_v3_sdk/Model/CreateContact.cs new file mode 100644 index 0000000..907ec01 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/CreateContact.cs @@ -0,0 +1,235 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// CreateContact + /// + [DataContract] + public partial class CreateContact : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Email address of the user. Mandatory if \"sms\" field is not passed in \"attributes\" parameter'. + /// Pass the set of attributes and their values. These attributes must be present in your SendinBlue account. For eg. {'FNAME':'Elly', 'LNAME':'Roger'}. + /// Set this field to blacklist the contact for emails (emailBlacklisted = true). + /// Set this field to blacklist the contact for SMS (smsBlacklisted = true). + /// Ids of the lists to add the contact to. + /// Facilitate to update the existing contact in the same request (updateEnabled = true) (default to false). + /// SMTP forbidden sender for contact. Use only for email Contact ( only available if updateEnabled = true ). + public CreateContact(string email = default(string), Object attributes = default(Object), bool? emailBlacklisted = default(bool?), bool? smsBlacklisted = default(bool?), List listIds = default(List), bool? updateEnabled = false, List smtpBlacklistSender = default(List)) + { + this.Email = email; + this.Attributes = attributes; + this.EmailBlacklisted = emailBlacklisted; + this.SmsBlacklisted = smsBlacklisted; + this.ListIds = listIds; + // use default value if no "updateEnabled" provided + if (updateEnabled == null) + { + this.UpdateEnabled = false; + } + else + { + this.UpdateEnabled = updateEnabled; + } + this.SmtpBlacklistSender = smtpBlacklistSender; + } + + /// + /// Email address of the user. Mandatory if \"sms\" field is not passed in \"attributes\" parameter' + /// + /// Email address of the user. Mandatory if \"sms\" field is not passed in \"attributes\" parameter' + [DataMember(Name="email", EmitDefaultValue=false)] + public string Email { get; set; } + + /// + /// Pass the set of attributes and their values. These attributes must be present in your SendinBlue account. For eg. {'FNAME':'Elly', 'LNAME':'Roger'} + /// + /// Pass the set of attributes and their values. These attributes must be present in your SendinBlue account. For eg. {'FNAME':'Elly', 'LNAME':'Roger'} + [DataMember(Name="attributes", EmitDefaultValue=false)] + public Object Attributes { get; set; } + + /// + /// Set this field to blacklist the contact for emails (emailBlacklisted = true) + /// + /// Set this field to blacklist the contact for emails (emailBlacklisted = true) + [DataMember(Name="emailBlacklisted", EmitDefaultValue=false)] + public bool? EmailBlacklisted { get; set; } + + /// + /// Set this field to blacklist the contact for SMS (smsBlacklisted = true) + /// + /// Set this field to blacklist the contact for SMS (smsBlacklisted = true) + [DataMember(Name="smsBlacklisted", EmitDefaultValue=false)] + public bool? SmsBlacklisted { get; set; } + + /// + /// Ids of the lists to add the contact to + /// + /// Ids of the lists to add the contact to + [DataMember(Name="listIds", EmitDefaultValue=false)] + public List ListIds { get; set; } + + /// + /// Facilitate to update the existing contact in the same request (updateEnabled = true) + /// + /// Facilitate to update the existing contact in the same request (updateEnabled = true) + [DataMember(Name="updateEnabled", EmitDefaultValue=false)] + public bool? UpdateEnabled { get; set; } + + /// + /// SMTP forbidden sender for contact. Use only for email Contact ( only available if updateEnabled = true ) + /// + /// SMTP forbidden sender for contact. Use only for email Contact ( only available if updateEnabled = true ) + [DataMember(Name="smtpBlacklistSender", EmitDefaultValue=false)] + public List SmtpBlacklistSender { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateContact {\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" Attributes: ").Append(Attributes).Append("\n"); + sb.Append(" EmailBlacklisted: ").Append(EmailBlacklisted).Append("\n"); + sb.Append(" SmsBlacklisted: ").Append(SmsBlacklisted).Append("\n"); + sb.Append(" ListIds: ").Append(ListIds).Append("\n"); + sb.Append(" UpdateEnabled: ").Append(UpdateEnabled).Append("\n"); + sb.Append(" SmtpBlacklistSender: ").Append(SmtpBlacklistSender).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateContact); + } + + /// + /// Returns true if CreateContact instances are equal + /// + /// Instance of CreateContact to be compared + /// Boolean + public bool Equals(CreateContact input) + { + if (input == null) + return false; + + return + ( + this.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ) && + ( + this.Attributes == input.Attributes || + (this.Attributes != null && + this.Attributes.Equals(input.Attributes)) + ) && + ( + this.EmailBlacklisted == input.EmailBlacklisted || + (this.EmailBlacklisted != null && + this.EmailBlacklisted.Equals(input.EmailBlacklisted)) + ) && + ( + this.SmsBlacklisted == input.SmsBlacklisted || + (this.SmsBlacklisted != null && + this.SmsBlacklisted.Equals(input.SmsBlacklisted)) + ) && + ( + this.ListIds == input.ListIds || + this.ListIds != null && + this.ListIds.SequenceEqual(input.ListIds) + ) && + ( + this.UpdateEnabled == input.UpdateEnabled || + (this.UpdateEnabled != null && + this.UpdateEnabled.Equals(input.UpdateEnabled)) + ) && + ( + this.SmtpBlacklistSender == input.SmtpBlacklistSender || + this.SmtpBlacklistSender != null && + this.SmtpBlacklistSender.SequenceEqual(input.SmtpBlacklistSender) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Email != null) + hashCode = hashCode * 59 + this.Email.GetHashCode(); + if (this.Attributes != null) + hashCode = hashCode * 59 + this.Attributes.GetHashCode(); + if (this.EmailBlacklisted != null) + hashCode = hashCode * 59 + this.EmailBlacklisted.GetHashCode(); + if (this.SmsBlacklisted != null) + hashCode = hashCode * 59 + this.SmsBlacklisted.GetHashCode(); + if (this.ListIds != null) + hashCode = hashCode * 59 + this.ListIds.GetHashCode(); + if (this.UpdateEnabled != null) + hashCode = hashCode * 59 + this.UpdateEnabled.GetHashCode(); + if (this.SmtpBlacklistSender != null) + hashCode = hashCode * 59 + this.SmtpBlacklistSender.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/CreateEmailCampaign.cs b/src/sib_api_v3_sdk/Model/CreateEmailCampaign.cs new file mode 100644 index 0000000..92bb98a --- /dev/null +++ b/src/sib_api_v3_sdk/Model/CreateEmailCampaign.cs @@ -0,0 +1,621 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// CreateEmailCampaign + /// + [DataContract] + public partial class CreateEmailCampaign : IEquatable, IValidatableObject + { + /// + /// Choose the metrics that will determinate the winning version. Mandatory if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerCriteria' is ignored if passed + /// + /// Choose the metrics that will determinate the winning version. Mandatory if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerCriteria' is ignored if passed + [JsonConverter(typeof(StringEnumConverter))] + public enum WinnerCriteriaEnum + { + + /// + /// Enum Open for value: open + /// + [EnumMember(Value = "open")] + Open = 1, + + /// + /// Enum Click for value: click + /// + [EnumMember(Value = "click")] + Click = 2 + } + + /// + /// Choose the metrics that will determinate the winning version. Mandatory if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerCriteria' is ignored if passed + /// + /// Choose the metrics that will determinate the winning version. Mandatory if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerCriteria' is ignored if passed + [DataMember(Name="winnerCriteria", EmitDefaultValue=false)] + public WinnerCriteriaEnum? WinnerCriteria { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CreateEmailCampaign() { } + /// + /// Initializes a new instance of the class. + /// + /// Tag of the campaign. + /// sender (required). + /// Name of the campaign (required). + /// Mandatory if htmlUrl and templateId are empty. Body of the message (HTML). + /// Mandatory if htmlContent and templateId are empty. Url to the message (HTML). + /// Mandatory if htmlContent and htmlUrl are empty. Id of the SMTP template with status 'active'. Used to copy only its content fetched from htmlContent/htmlUrl to an email campaign for RSS feature.. + /// Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part).. + /// Subject of the campaign. Mandatory if abTesting is false. Ignored if abTesting is true.. + /// Email on which the campaign recipients will be able to reply to. + /// To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization. + /// recipients. + /// 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. + /// 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 (default to false). + /// Use true to enable the mirror link. + /// Footer of the email campaign. + /// Header of the email campaign. + /// Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed. + /// Pass the set of attributes to customize the type classic campaign. For example, {'FNAME':'Joe', 'LNAME':'Doe'}. Only available if 'type' is 'classic'. It's considered only if campaign is in New Template Language format. The New Template Language is dependent on the values of 'subject', 'htmlContent/htmlUrl', 'sender.name' & 'toField'. + /// Set this to true if you want to send your campaign at best time. (default to false). + /// Status of A/B Test. abTesting = false means it is disabled, & abTesting = true means it is enabled. 'subjectA', 'subjectB', 'splitRule', 'winnerCriteria' & 'winnerDelay' will be considered when abTesting is set to true. 'subjectA' & 'subjectB' are mandatory together & 'subject' if passed is ignored. Can be set to true only if 'sendAtBestTime' is 'false'. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B (default to false). + /// Subject A of the campaign. Mandatory if abTesting = true. subjectA & subjectB should have unique value. + /// Subject B of the campaign. Mandatory if abTesting = true. subjectA & subjectB should have unique value. + /// Add the size of your test groups. Mandatory if abTesting = true & 'recipients' is passed. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else. + /// Choose the metrics that will determinate the winning version. Mandatory if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerCriteria' is ignored if passed. + /// Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. Mandatory if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerDelay' is ignored if passed. + public CreateEmailCampaign(string tag = default(string), CreateEmailCampaignSender sender = default(CreateEmailCampaignSender), string name = default(string), string htmlContent = default(string), string htmlUrl = default(string), long? templateId = default(long?), DateTime? scheduledAt = default(DateTime?), string subject = default(string), string replyTo = default(string), string toField = default(string), CreateEmailCampaignRecipients recipients = default(CreateEmailCampaignRecipients), string attachmentUrl = default(string), bool? inlineImageActivation = false, bool? mirrorActive = default(bool?), string footer = default(string), string header = default(string), string utmCampaign = default(string), Object _params = default(Object), bool? sendAtBestTime = false, bool? abTesting = false, string subjectA = default(string), string subjectB = default(string), long? splitRule = default(long?), WinnerCriteriaEnum? winnerCriteria = default(WinnerCriteriaEnum?), long? winnerDelay = default(long?)) + { + // to ensure "sender" is required (not null) + if (sender == null) + { + throw new InvalidDataException("sender is a required property for CreateEmailCampaign and cannot be null"); + } + else + { + this.Sender = sender; + } + // to ensure "name" is required (not null) + if (name == null) + { + throw new InvalidDataException("name is a required property for CreateEmailCampaign and cannot be null"); + } + else + { + this.Name = name; + } + this.Tag = tag; + this.HtmlContent = htmlContent; + this.HtmlUrl = htmlUrl; + this.TemplateId = templateId; + this.ScheduledAt = scheduledAt; + this.Subject = subject; + this.ReplyTo = replyTo; + this.ToField = toField; + this.Recipients = recipients; + this.AttachmentUrl = attachmentUrl; + // use default value if no "inlineImageActivation" provided + if (inlineImageActivation == null) + { + this.InlineImageActivation = false; + } + else + { + this.InlineImageActivation = inlineImageActivation; + } + this.MirrorActive = mirrorActive; + this.Footer = footer; + this.Header = header; + this.UtmCampaign = utmCampaign; + this.Params = _params; + // use default value if no "sendAtBestTime" provided + if (sendAtBestTime == null) + { + this.SendAtBestTime = false; + } + else + { + this.SendAtBestTime = sendAtBestTime; + } + // use default value if no "abTesting" provided + if (abTesting == null) + { + this.AbTesting = false; + } + else + { + this.AbTesting = abTesting; + } + this.SubjectA = subjectA; + this.SubjectB = subjectB; + this.SplitRule = splitRule; + this.WinnerCriteria = winnerCriteria; + this.WinnerDelay = winnerDelay; + } + + /// + /// Tag of the campaign + /// + /// Tag of the campaign + [DataMember(Name="tag", EmitDefaultValue=false)] + public string Tag { get; set; } + + /// + /// Gets or Sets Sender + /// + [DataMember(Name="sender", EmitDefaultValue=false)] + public CreateEmailCampaignSender Sender { get; set; } + + /// + /// Name of the campaign + /// + /// Name of the campaign + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Mandatory if htmlUrl and templateId are empty. Body of the message (HTML) + /// + /// Mandatory if htmlUrl and templateId are empty. Body of the message (HTML) + [DataMember(Name="htmlContent", EmitDefaultValue=false)] + public string HtmlContent { get; set; } + + /// + /// Mandatory if htmlContent and templateId are empty. Url to the message (HTML) + /// + /// Mandatory if htmlContent and templateId are empty. Url to the message (HTML) + [DataMember(Name="htmlUrl", EmitDefaultValue=false)] + public string HtmlUrl { get; set; } + + /// + /// Mandatory if htmlContent and htmlUrl are empty. Id of the SMTP template with status 'active'. Used to copy only its content fetched from htmlContent/htmlUrl to an email campaign for RSS feature. + /// + /// Mandatory if htmlContent and htmlUrl are empty. Id of the SMTP template with status 'active'. Used to copy only its content fetched from htmlContent/htmlUrl to an email campaign for RSS feature. + [DataMember(Name="templateId", EmitDefaultValue=false)] + public long? TemplateId { get; set; } + + /// + /// Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part). + /// + /// Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part). + [DataMember(Name="scheduledAt", EmitDefaultValue=false)] + public DateTime? ScheduledAt { get; set; } + + /// + /// Subject of the campaign. Mandatory if abTesting is false. Ignored if abTesting is true. + /// + /// Subject of the campaign. Mandatory if abTesting is false. Ignored if abTesting is true. + [DataMember(Name="subject", EmitDefaultValue=false)] + public string Subject { get; set; } + + /// + /// Email on which the campaign recipients will be able to reply to + /// + /// Email on which the campaign recipients will be able to reply to + [DataMember(Name="replyTo", EmitDefaultValue=false)] + public string ReplyTo { get; set; } + + /// + /// To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization + /// + /// To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization + [DataMember(Name="toField", EmitDefaultValue=false)] + public string ToField { get; set; } + + /// + /// Gets or Sets Recipients + /// + [DataMember(Name="recipients", EmitDefaultValue=false)] + public CreateEmailCampaignRecipients Recipients { get; set; } + + /// + /// 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 + /// + /// 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 + [DataMember(Name="attachmentUrl", EmitDefaultValue=false)] + public string AttachmentUrl { get; set; } + + /// + /// 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 + /// + /// 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 + [DataMember(Name="inlineImageActivation", EmitDefaultValue=false)] + public bool? InlineImageActivation { get; set; } + + /// + /// Use true to enable the mirror link + /// + /// Use true to enable the mirror link + [DataMember(Name="mirrorActive", EmitDefaultValue=false)] + public bool? MirrorActive { get; set; } + + /// + /// Footer of the email campaign + /// + /// Footer of the email campaign + [DataMember(Name="footer", EmitDefaultValue=false)] + public string Footer { get; set; } + + /// + /// Header of the email campaign + /// + /// Header of the email campaign + [DataMember(Name="header", EmitDefaultValue=false)] + public string Header { get; set; } + + /// + /// Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed + /// + /// Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed + [DataMember(Name="utmCampaign", EmitDefaultValue=false)] + public string UtmCampaign { get; set; } + + /// + /// Pass the set of attributes to customize the type classic campaign. For example, {'FNAME':'Joe', 'LNAME':'Doe'}. Only available if 'type' is 'classic'. It's considered only if campaign is in New Template Language format. The New Template Language is dependent on the values of 'subject', 'htmlContent/htmlUrl', 'sender.name' & 'toField' + /// + /// Pass the set of attributes to customize the type classic campaign. For example, {'FNAME':'Joe', 'LNAME':'Doe'}. Only available if 'type' is 'classic'. It's considered only if campaign is in New Template Language format. The New Template Language is dependent on the values of 'subject', 'htmlContent/htmlUrl', 'sender.name' & 'toField' + [DataMember(Name="params", EmitDefaultValue=false)] + public Object Params { get; set; } + + /// + /// Set this to true if you want to send your campaign at best time. + /// + /// Set this to true if you want to send your campaign at best time. + [DataMember(Name="sendAtBestTime", EmitDefaultValue=false)] + public bool? SendAtBestTime { get; set; } + + /// + /// Status of A/B Test. abTesting = false means it is disabled, & abTesting = true means it is enabled. 'subjectA', 'subjectB', 'splitRule', 'winnerCriteria' & 'winnerDelay' will be considered when abTesting is set to true. 'subjectA' & 'subjectB' are mandatory together & 'subject' if passed is ignored. Can be set to true only if 'sendAtBestTime' is 'false'. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B + /// + /// Status of A/B Test. abTesting = false means it is disabled, & abTesting = true means it is enabled. 'subjectA', 'subjectB', 'splitRule', 'winnerCriteria' & 'winnerDelay' will be considered when abTesting is set to true. 'subjectA' & 'subjectB' are mandatory together & 'subject' if passed is ignored. Can be set to true only if 'sendAtBestTime' is 'false'. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B + [DataMember(Name="abTesting", EmitDefaultValue=false)] + public bool? AbTesting { get; set; } + + /// + /// Subject A of the campaign. Mandatory if abTesting = true. subjectA & subjectB should have unique value + /// + /// Subject A of the campaign. Mandatory if abTesting = true. subjectA & subjectB should have unique value + [DataMember(Name="subjectA", EmitDefaultValue=false)] + public string SubjectA { get; set; } + + /// + /// Subject B of the campaign. Mandatory if abTesting = true. subjectA & subjectB should have unique value + /// + /// Subject B of the campaign. Mandatory if abTesting = true. subjectA & subjectB should have unique value + [DataMember(Name="subjectB", EmitDefaultValue=false)] + public string SubjectB { get; set; } + + /// + /// Add the size of your test groups. Mandatory if abTesting = true & 'recipients' is passed. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else + /// + /// Add the size of your test groups. Mandatory if abTesting = true & 'recipients' is passed. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else + [DataMember(Name="splitRule", EmitDefaultValue=false)] + public long? SplitRule { get; set; } + + + /// + /// Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. Mandatory if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerDelay' is ignored if passed + /// + /// Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. Mandatory if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerDelay' is ignored if passed + [DataMember(Name="winnerDelay", EmitDefaultValue=false)] + public long? WinnerDelay { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateEmailCampaign {\n"); + sb.Append(" Tag: ").Append(Tag).Append("\n"); + sb.Append(" Sender: ").Append(Sender).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" HtmlContent: ").Append(HtmlContent).Append("\n"); + sb.Append(" HtmlUrl: ").Append(HtmlUrl).Append("\n"); + sb.Append(" TemplateId: ").Append(TemplateId).Append("\n"); + sb.Append(" ScheduledAt: ").Append(ScheduledAt).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" ReplyTo: ").Append(ReplyTo).Append("\n"); + sb.Append(" ToField: ").Append(ToField).Append("\n"); + sb.Append(" Recipients: ").Append(Recipients).Append("\n"); + sb.Append(" AttachmentUrl: ").Append(AttachmentUrl).Append("\n"); + sb.Append(" InlineImageActivation: ").Append(InlineImageActivation).Append("\n"); + sb.Append(" MirrorActive: ").Append(MirrorActive).Append("\n"); + sb.Append(" Footer: ").Append(Footer).Append("\n"); + sb.Append(" Header: ").Append(Header).Append("\n"); + sb.Append(" UtmCampaign: ").Append(UtmCampaign).Append("\n"); + sb.Append(" Params: ").Append(Params).Append("\n"); + sb.Append(" SendAtBestTime: ").Append(SendAtBestTime).Append("\n"); + sb.Append(" AbTesting: ").Append(AbTesting).Append("\n"); + sb.Append(" SubjectA: ").Append(SubjectA).Append("\n"); + sb.Append(" SubjectB: ").Append(SubjectB).Append("\n"); + sb.Append(" SplitRule: ").Append(SplitRule).Append("\n"); + sb.Append(" WinnerCriteria: ").Append(WinnerCriteria).Append("\n"); + sb.Append(" WinnerDelay: ").Append(WinnerDelay).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateEmailCampaign); + } + + /// + /// Returns true if CreateEmailCampaign instances are equal + /// + /// Instance of CreateEmailCampaign to be compared + /// Boolean + public bool Equals(CreateEmailCampaign input) + { + if (input == null) + return false; + + return + ( + this.Tag == input.Tag || + (this.Tag != null && + this.Tag.Equals(input.Tag)) + ) && + ( + this.Sender == input.Sender || + (this.Sender != null && + this.Sender.Equals(input.Sender)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.HtmlContent == input.HtmlContent || + (this.HtmlContent != null && + this.HtmlContent.Equals(input.HtmlContent)) + ) && + ( + this.HtmlUrl == input.HtmlUrl || + (this.HtmlUrl != null && + this.HtmlUrl.Equals(input.HtmlUrl)) + ) && + ( + this.TemplateId == input.TemplateId || + (this.TemplateId != null && + this.TemplateId.Equals(input.TemplateId)) + ) && + ( + this.ScheduledAt == input.ScheduledAt || + (this.ScheduledAt != null && + this.ScheduledAt.Equals(input.ScheduledAt)) + ) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && + ( + this.ReplyTo == input.ReplyTo || + (this.ReplyTo != null && + this.ReplyTo.Equals(input.ReplyTo)) + ) && + ( + this.ToField == input.ToField || + (this.ToField != null && + this.ToField.Equals(input.ToField)) + ) && + ( + this.Recipients == input.Recipients || + (this.Recipients != null && + this.Recipients.Equals(input.Recipients)) + ) && + ( + this.AttachmentUrl == input.AttachmentUrl || + (this.AttachmentUrl != null && + this.AttachmentUrl.Equals(input.AttachmentUrl)) + ) && + ( + this.InlineImageActivation == input.InlineImageActivation || + (this.InlineImageActivation != null && + this.InlineImageActivation.Equals(input.InlineImageActivation)) + ) && + ( + this.MirrorActive == input.MirrorActive || + (this.MirrorActive != null && + this.MirrorActive.Equals(input.MirrorActive)) + ) && + ( + this.Footer == input.Footer || + (this.Footer != null && + this.Footer.Equals(input.Footer)) + ) && + ( + this.Header == input.Header || + (this.Header != null && + this.Header.Equals(input.Header)) + ) && + ( + this.UtmCampaign == input.UtmCampaign || + (this.UtmCampaign != null && + this.UtmCampaign.Equals(input.UtmCampaign)) + ) && + ( + this.Params == input.Params || + (this.Params != null && + this.Params.Equals(input.Params)) + ) && + ( + this.SendAtBestTime == input.SendAtBestTime || + (this.SendAtBestTime != null && + this.SendAtBestTime.Equals(input.SendAtBestTime)) + ) && + ( + this.AbTesting == input.AbTesting || + (this.AbTesting != null && + this.AbTesting.Equals(input.AbTesting)) + ) && + ( + this.SubjectA == input.SubjectA || + (this.SubjectA != null && + this.SubjectA.Equals(input.SubjectA)) + ) && + ( + this.SubjectB == input.SubjectB || + (this.SubjectB != null && + this.SubjectB.Equals(input.SubjectB)) + ) && + ( + this.SplitRule == input.SplitRule || + (this.SplitRule != null && + this.SplitRule.Equals(input.SplitRule)) + ) && + ( + this.WinnerCriteria == input.WinnerCriteria || + (this.WinnerCriteria != null && + this.WinnerCriteria.Equals(input.WinnerCriteria)) + ) && + ( + this.WinnerDelay == input.WinnerDelay || + (this.WinnerDelay != null && + this.WinnerDelay.Equals(input.WinnerDelay)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Tag != null) + hashCode = hashCode * 59 + this.Tag.GetHashCode(); + if (this.Sender != null) + hashCode = hashCode * 59 + this.Sender.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.HtmlContent != null) + hashCode = hashCode * 59 + this.HtmlContent.GetHashCode(); + if (this.HtmlUrl != null) + hashCode = hashCode * 59 + this.HtmlUrl.GetHashCode(); + if (this.TemplateId != null) + hashCode = hashCode * 59 + this.TemplateId.GetHashCode(); + if (this.ScheduledAt != null) + hashCode = hashCode * 59 + this.ScheduledAt.GetHashCode(); + if (this.Subject != null) + hashCode = hashCode * 59 + this.Subject.GetHashCode(); + if (this.ReplyTo != null) + hashCode = hashCode * 59 + this.ReplyTo.GetHashCode(); + if (this.ToField != null) + hashCode = hashCode * 59 + this.ToField.GetHashCode(); + if (this.Recipients != null) + hashCode = hashCode * 59 + this.Recipients.GetHashCode(); + if (this.AttachmentUrl != null) + hashCode = hashCode * 59 + this.AttachmentUrl.GetHashCode(); + if (this.InlineImageActivation != null) + hashCode = hashCode * 59 + this.InlineImageActivation.GetHashCode(); + if (this.MirrorActive != null) + hashCode = hashCode * 59 + this.MirrorActive.GetHashCode(); + if (this.Footer != null) + hashCode = hashCode * 59 + this.Footer.GetHashCode(); + if (this.Header != null) + hashCode = hashCode * 59 + this.Header.GetHashCode(); + if (this.UtmCampaign != null) + hashCode = hashCode * 59 + this.UtmCampaign.GetHashCode(); + if (this.Params != null) + hashCode = hashCode * 59 + this.Params.GetHashCode(); + if (this.SendAtBestTime != null) + hashCode = hashCode * 59 + this.SendAtBestTime.GetHashCode(); + if (this.AbTesting != null) + hashCode = hashCode * 59 + this.AbTesting.GetHashCode(); + if (this.SubjectA != null) + hashCode = hashCode * 59 + this.SubjectA.GetHashCode(); + if (this.SubjectB != null) + hashCode = hashCode * 59 + this.SubjectB.GetHashCode(); + if (this.SplitRule != null) + hashCode = hashCode * 59 + this.SplitRule.GetHashCode(); + if (this.WinnerCriteria != null) + hashCode = hashCode * 59 + this.WinnerCriteria.GetHashCode(); + if (this.WinnerDelay != null) + hashCode = hashCode * 59 + this.WinnerDelay.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + // SplitRule (long?) maximum + if(this.SplitRule > (long?)50) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SplitRule, must be a value less than or equal to 50.", new [] { "SplitRule" }); + } + + // SplitRule (long?) minimum + if(this.SplitRule < (long?)1) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SplitRule, must be a value greater than or equal to 1.", new [] { "SplitRule" }); + } + + // WinnerDelay (long?) maximum + if(this.WinnerDelay > (long?)168) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for WinnerDelay, must be a value less than or equal to 168.", new [] { "WinnerDelay" }); + } + + // WinnerDelay (long?) minimum + if(this.WinnerDelay < (long?)1) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for WinnerDelay, must be a value greater than or equal to 1.", new [] { "WinnerDelay" }); + } + + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/CreateEmailCampaignRecipients.cs b/src/sib_api_v3_sdk/Model/CreateEmailCampaignRecipients.cs new file mode 100644 index 0000000..2c6876e --- /dev/null +++ b/src/sib_api_v3_sdk/Model/CreateEmailCampaignRecipients.cs @@ -0,0 +1,142 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// List ids to include/exclude from campaign + /// + [DataContract] + public partial class CreateEmailCampaignRecipients : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// List ids to exclude from the campaign. + /// Mandatory if scheduledAt is not empty. List Ids to send the campaign to. + public CreateEmailCampaignRecipients(List exclusionListIds = default(List), List listIds = default(List)) + { + this.ExclusionListIds = exclusionListIds; + this.ListIds = listIds; + } + + /// + /// List ids to exclude from the campaign + /// + /// List ids to exclude from the campaign + [DataMember(Name="exclusionListIds", EmitDefaultValue=false)] + public List ExclusionListIds { get; set; } + + /// + /// Mandatory if scheduledAt is not empty. List Ids to send the campaign to + /// + /// Mandatory if scheduledAt is not empty. List Ids to send the campaign to + [DataMember(Name="listIds", EmitDefaultValue=false)] + public List ListIds { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateEmailCampaignRecipients {\n"); + sb.Append(" ExclusionListIds: ").Append(ExclusionListIds).Append("\n"); + sb.Append(" ListIds: ").Append(ListIds).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateEmailCampaignRecipients); + } + + /// + /// Returns true if CreateEmailCampaignRecipients instances are equal + /// + /// Instance of CreateEmailCampaignRecipients to be compared + /// Boolean + public bool Equals(CreateEmailCampaignRecipients input) + { + if (input == null) + return false; + + return + ( + this.ExclusionListIds == input.ExclusionListIds || + this.ExclusionListIds != null && + this.ExclusionListIds.SequenceEqual(input.ExclusionListIds) + ) && + ( + this.ListIds == input.ListIds || + this.ListIds != null && + this.ListIds.SequenceEqual(input.ListIds) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ExclusionListIds != null) + hashCode = hashCode * 59 + this.ExclusionListIds.GetHashCode(); + if (this.ListIds != null) + hashCode = hashCode * 59 + this.ListIds.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/CreateEmailCampaignSender.cs b/src/sib_api_v3_sdk/Model/CreateEmailCampaignSender.cs new file mode 100644 index 0000000..5c3134b --- /dev/null +++ b/src/sib_api_v3_sdk/Model/CreateEmailCampaignSender.cs @@ -0,0 +1,155 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// Sender details including email and name (optional). For example {'name':'xyz' , 'email':'example@abc.com'} + /// + [DataContract] + public partial class CreateEmailCampaignSender : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CreateEmailCampaignSender() { } + /// + /// Initializes a new instance of the class. + /// + /// Sender Name. + /// Sender email (required). + public CreateEmailCampaignSender(string name = default(string), string email = default(string)) + { + // to ensure "email" is required (not null) + if (email == null) + { + throw new InvalidDataException("email is a required property for CreateEmailCampaignSender and cannot be null"); + } + else + { + this.Email = email; + } + this.Name = name; + } + + /// + /// Sender Name + /// + /// Sender Name + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Sender email + /// + /// Sender email + [DataMember(Name="email", EmitDefaultValue=false)] + public string Email { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateEmailCampaignSender {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateEmailCampaignSender); + } + + /// + /// Returns true if CreateEmailCampaignSender instances are equal + /// + /// Instance of CreateEmailCampaignSender to be compared + /// Boolean + public bool Equals(CreateEmailCampaignSender input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Email != null) + hashCode = hashCode * 59 + this.Email.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/CreateList.cs b/src/sib_api_v3_sdk/Model/CreateList.cs new file mode 100644 index 0000000..9a0fc81 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/CreateList.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// CreateList + /// + [DataContract] + public partial class CreateList : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CreateList() { } + /// + /// Initializes a new instance of the class. + /// + /// Name of the list (required). + /// Id of the parent folder in which this list is to be created (required). + public CreateList(string name = default(string), long? folderId = default(long?)) + { + // to ensure "name" is required (not null) + if (name == null) + { + throw new InvalidDataException("name is a required property for CreateList and cannot be null"); + } + else + { + this.Name = name; + } + // to ensure "folderId" is required (not null) + if (folderId == null) + { + throw new InvalidDataException("folderId is a required property for CreateList and cannot be null"); + } + else + { + this.FolderId = folderId; + } + } + + /// + /// Name of the list + /// + /// Name of the list + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Id of the parent folder in which this list is to be created + /// + /// Id of the parent folder in which this list is to be created + [DataMember(Name="folderId", EmitDefaultValue=false)] + public long? FolderId { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateList {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" FolderId: ").Append(FolderId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateList); + } + + /// + /// Returns true if CreateList instances are equal + /// + /// Instance of CreateList to be compared + /// Boolean + public bool Equals(CreateList input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.FolderId == input.FolderId || + (this.FolderId != null && + this.FolderId.Equals(input.FolderId)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.FolderId != null) + hashCode = hashCode * 59 + this.FolderId.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/CreateModel.cs b/src/sib_api_v3_sdk/Model/CreateModel.cs new file mode 100644 index 0000000..ee3630e --- /dev/null +++ b/src/sib_api_v3_sdk/Model/CreateModel.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// CreateModel + /// + [DataContract] + public partial class CreateModel : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CreateModel() { } + /// + /// Initializes a new instance of the class. + /// + /// ID of the object created (required). + public CreateModel(long? id = default(long?)) + { + // to ensure "id" is required (not null) + if (id == null) + { + throw new InvalidDataException("id is a required property for CreateModel and cannot be null"); + } + else + { + this.Id = id; + } + } + + /// + /// ID of the object created + /// + /// ID of the object created + [DataMember(Name="id", EmitDefaultValue=false)] + public long? Id { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateModel {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateModel); + } + + /// + /// Returns true if CreateModel instances are equal + /// + /// Instance of CreateModel to be compared + /// Boolean + public bool Equals(CreateModel input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/CreateReseller.cs b/src/sib_api_v3_sdk/Model/CreateReseller.cs new file mode 100644 index 0000000..7a54594 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/CreateReseller.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// CreateReseller + /// + [DataContract] + public partial class CreateReseller : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CreateReseller() { } + /// + /// Initializes a new instance of the class. + /// + /// AuthKey of Reseller child created (required). + public CreateReseller(string authKey = default(string)) + { + // to ensure "authKey" is required (not null) + if (authKey == null) + { + throw new InvalidDataException("authKey is a required property for CreateReseller and cannot be null"); + } + else + { + this.AuthKey = authKey; + } + } + + /// + /// AuthKey of Reseller child created + /// + /// AuthKey of Reseller child created + [DataMember(Name="authKey", EmitDefaultValue=false)] + public string AuthKey { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateReseller {\n"); + sb.Append(" AuthKey: ").Append(AuthKey).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateReseller); + } + + /// + /// Returns true if CreateReseller instances are equal + /// + /// Instance of CreateReseller to be compared + /// Boolean + public bool Equals(CreateReseller input) + { + if (input == null) + return false; + + return + ( + this.AuthKey == input.AuthKey || + (this.AuthKey != null && + this.AuthKey.Equals(input.AuthKey)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.AuthKey != null) + hashCode = hashCode * 59 + this.AuthKey.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/CreateSender.cs b/src/sib_api_v3_sdk/Model/CreateSender.cs new file mode 100644 index 0000000..15564ee --- /dev/null +++ b/src/sib_api_v3_sdk/Model/CreateSender.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// CreateSender + /// + [DataContract] + public partial class CreateSender : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CreateSender() { } + /// + /// Initializes a new instance of the class. + /// + /// From Name to use for the sender (required). + /// From Email to use for the sender (required). + /// Mandatory in case of dedicated IP, IPs to associate to the sender. + public CreateSender(string name = default(string), string email = default(string), List ips = default(List)) + { + // to ensure "name" is required (not null) + if (name == null) + { + throw new InvalidDataException("name is a required property for CreateSender and cannot be null"); + } + else + { + this.Name = name; + } + // to ensure "email" is required (not null) + if (email == null) + { + throw new InvalidDataException("email is a required property for CreateSender and cannot be null"); + } + else + { + this.Email = email; + } + this.Ips = ips; + } + + /// + /// From Name to use for the sender + /// + /// From Name to use for the sender + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// From Email to use for the sender + /// + /// From Email to use for the sender + [DataMember(Name="email", EmitDefaultValue=false)] + public string Email { get; set; } + + /// + /// Mandatory in case of dedicated IP, IPs to associate to the sender + /// + /// Mandatory in case of dedicated IP, IPs to associate to the sender + [DataMember(Name="ips", EmitDefaultValue=false)] + public List Ips { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateSender {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" Ips: ").Append(Ips).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateSender); + } + + /// + /// Returns true if CreateSender instances are equal + /// + /// Instance of CreateSender to be compared + /// Boolean + public bool Equals(CreateSender input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ) && + ( + this.Ips == input.Ips || + this.Ips != null && + this.Ips.SequenceEqual(input.Ips) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Email != null) + hashCode = hashCode * 59 + this.Email.GetHashCode(); + if (this.Ips != null) + hashCode = hashCode * 59 + this.Ips.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/CreateSenderIps.cs b/src/sib_api_v3_sdk/Model/CreateSenderIps.cs new file mode 100644 index 0000000..9e2cead --- /dev/null +++ b/src/sib_api_v3_sdk/Model/CreateSenderIps.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// CreateSenderIps + /// + [DataContract] + public partial class CreateSenderIps : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CreateSenderIps() { } + /// + /// Initializes a new instance of the class. + /// + /// Dedicated IP available in your account (required). + /// Domain of the IP (required). + /// 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 CreateSenderIps(string ip = default(string), string domain = default(string), long? weight = default(long?)) + { + // to ensure "ip" is required (not null) + if (ip == null) + { + throw new InvalidDataException("ip is a required property for CreateSenderIps and cannot be null"); + } + else + { + this.Ip = ip; + } + // to ensure "domain" is required (not null) + if (domain == null) + { + throw new InvalidDataException("domain is a required property for CreateSenderIps and cannot be null"); + } + else + { + this.Domain = domain; + } + this.Weight = weight; + } + + /// + /// Dedicated IP available in your account + /// + /// Dedicated IP available in your account + [DataMember(Name="ip", EmitDefaultValue=false)] + public string Ip { get; set; } + + /// + /// Domain of the IP + /// + /// Domain of the IP + [DataMember(Name="domain", EmitDefaultValue=false)] + public string Domain { get; set; } + + /// + /// 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. + /// + /// 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. + [DataMember(Name="weight", EmitDefaultValue=false)] + public long? Weight { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateSenderIps {\n"); + sb.Append(" Ip: ").Append(Ip).Append("\n"); + sb.Append(" Domain: ").Append(Domain).Append("\n"); + sb.Append(" Weight: ").Append(Weight).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateSenderIps); + } + + /// + /// Returns true if CreateSenderIps instances are equal + /// + /// Instance of CreateSenderIps to be compared + /// Boolean + public bool Equals(CreateSenderIps input) + { + if (input == null) + return false; + + return + ( + this.Ip == input.Ip || + (this.Ip != null && + this.Ip.Equals(input.Ip)) + ) && + ( + this.Domain == input.Domain || + (this.Domain != null && + this.Domain.Equals(input.Domain)) + ) && + ( + this.Weight == input.Weight || + (this.Weight != null && + this.Weight.Equals(input.Weight)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Ip != null) + hashCode = hashCode * 59 + this.Ip.GetHashCode(); + if (this.Domain != null) + hashCode = hashCode * 59 + this.Domain.GetHashCode(); + if (this.Weight != null) + hashCode = hashCode * 59 + this.Weight.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + // Weight (long?) maximum + if(this.Weight > (long?)100) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Weight, must be a value less than or equal to 100.", new [] { "Weight" }); + } + + // Weight (long?) minimum + if(this.Weight < (long?)1) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Weight, must be a value greater than or equal to 1.", new [] { "Weight" }); + } + + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/CreateSenderModel.cs b/src/sib_api_v3_sdk/Model/CreateSenderModel.cs new file mode 100644 index 0000000..067485c --- /dev/null +++ b/src/sib_api_v3_sdk/Model/CreateSenderModel.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// CreateSenderModel + /// + [DataContract] + public partial class CreateSenderModel : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CreateSenderModel() { } + /// + /// Initializes a new instance of the class. + /// + /// ID of the Sender created (required). + /// Status of SPF configuration for the sender (true = SPF not well configured, false = SPF well configured). + /// Status of DKIM configuration for the sender (true = DKIM not well configured, false = DKIM well configured). + public CreateSenderModel(long? id = default(long?), bool? spfError = default(bool?), bool? dkimError = default(bool?)) + { + // to ensure "id" is required (not null) + if (id == null) + { + throw new InvalidDataException("id is a required property for CreateSenderModel and cannot be null"); + } + else + { + this.Id = id; + } + this.SpfError = spfError; + this.DkimError = dkimError; + } + + /// + /// ID of the Sender created + /// + /// ID of the Sender created + [DataMember(Name="id", EmitDefaultValue=false)] + public long? Id { get; set; } + + /// + /// Status of SPF configuration for the sender (true = SPF not well configured, false = SPF well configured) + /// + /// Status of SPF configuration for the sender (true = SPF not well configured, false = SPF well configured) + [DataMember(Name="spfError", EmitDefaultValue=false)] + public bool? SpfError { get; set; } + + /// + /// Status of DKIM configuration for the sender (true = DKIM not well configured, false = DKIM well configured) + /// + /// Status of DKIM configuration for the sender (true = DKIM not well configured, false = DKIM well configured) + [DataMember(Name="dkimError", EmitDefaultValue=false)] + public bool? DkimError { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateSenderModel {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" SpfError: ").Append(SpfError).Append("\n"); + sb.Append(" DkimError: ").Append(DkimError).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateSenderModel); + } + + /// + /// Returns true if CreateSenderModel instances are equal + /// + /// Instance of CreateSenderModel to be compared + /// Boolean + public bool Equals(CreateSenderModel input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.SpfError == input.SpfError || + (this.SpfError != null && + this.SpfError.Equals(input.SpfError)) + ) && + ( + this.DkimError == input.DkimError || + (this.DkimError != null && + this.DkimError.Equals(input.DkimError)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.SpfError != null) + hashCode = hashCode * 59 + this.SpfError.GetHashCode(); + if (this.DkimError != null) + hashCode = hashCode * 59 + this.DkimError.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/CreateSmsCampaign.cs b/src/sib_api_v3_sdk/Model/CreateSmsCampaign.cs new file mode 100644 index 0000000..b7d0ad7 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/CreateSmsCampaign.cs @@ -0,0 +1,227 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// CreateSmsCampaign + /// + [DataContract] + public partial class CreateSmsCampaign : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CreateSmsCampaign() { } + /// + /// Initializes a new instance of the class. + /// + /// Name of the campaign (required). + /// Name of the sender. The number of characters is limited to 11 (required). + /// 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 (required). + /// recipients. + /// 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 CreateSmsCampaign(string name = default(string), string sender = default(string), string content = default(string), CreateSmsCampaignRecipients recipients = default(CreateSmsCampaignRecipients), DateTime? scheduledAt = default(DateTime?)) + { + // to ensure "name" is required (not null) + if (name == null) + { + throw new InvalidDataException("name is a required property for CreateSmsCampaign and cannot be null"); + } + else + { + this.Name = name; + } + // to ensure "sender" is required (not null) + if (sender == null) + { + throw new InvalidDataException("sender is a required property for CreateSmsCampaign and cannot be null"); + } + else + { + this.Sender = sender; + } + // to ensure "content" is required (not null) + if (content == null) + { + throw new InvalidDataException("content is a required property for CreateSmsCampaign and cannot be null"); + } + else + { + this.Content = content; + } + this.Recipients = recipients; + this.ScheduledAt = scheduledAt; + } + + /// + /// Name of the campaign + /// + /// Name of the campaign + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Name of the sender. The number of characters is limited to 11 + /// + /// Name of the sender. The number of characters is limited to 11 + [DataMember(Name="sender", EmitDefaultValue=false)] + public string Sender { get; set; } + + /// + /// 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 + /// + /// 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 + [DataMember(Name="content", EmitDefaultValue=false)] + public string Content { get; set; } + + /// + /// Gets or Sets Recipients + /// + [DataMember(Name="recipients", EmitDefaultValue=false)] + public CreateSmsCampaignRecipients Recipients { get; set; } + + /// + /// 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. + /// + /// 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. + [DataMember(Name="scheduledAt", EmitDefaultValue=false)] + public DateTime? ScheduledAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateSmsCampaign {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Sender: ").Append(Sender).Append("\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Recipients: ").Append(Recipients).Append("\n"); + sb.Append(" ScheduledAt: ").Append(ScheduledAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateSmsCampaign); + } + + /// + /// Returns true if CreateSmsCampaign instances are equal + /// + /// Instance of CreateSmsCampaign to be compared + /// Boolean + public bool Equals(CreateSmsCampaign input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Sender == input.Sender || + (this.Sender != null && + this.Sender.Equals(input.Sender)) + ) && + ( + this.Content == input.Content || + (this.Content != null && + this.Content.Equals(input.Content)) + ) && + ( + this.Recipients == input.Recipients || + (this.Recipients != null && + this.Recipients.Equals(input.Recipients)) + ) && + ( + this.ScheduledAt == input.ScheduledAt || + (this.ScheduledAt != null && + this.ScheduledAt.Equals(input.ScheduledAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Sender != null) + hashCode = hashCode * 59 + this.Sender.GetHashCode(); + if (this.Content != null) + hashCode = hashCode * 59 + this.Content.GetHashCode(); + if (this.Recipients != null) + hashCode = hashCode * 59 + this.Recipients.GetHashCode(); + if (this.ScheduledAt != null) + hashCode = hashCode * 59 + this.ScheduledAt.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + // Sender (string) maxLength + if(this.Sender != null && this.Sender.Length > 11) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Sender, length must be less than 11.", new [] { "Sender" }); + } + + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/CreateSmsCampaignRecipients.cs b/src/sib_api_v3_sdk/Model/CreateSmsCampaignRecipients.cs new file mode 100644 index 0000000..d8bf53e --- /dev/null +++ b/src/sib_api_v3_sdk/Model/CreateSmsCampaignRecipients.cs @@ -0,0 +1,155 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// CreateSmsCampaignRecipients + /// + [DataContract] + public partial class CreateSmsCampaignRecipients : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CreateSmsCampaignRecipients() { } + /// + /// Initializes a new instance of the class. + /// + /// Lists Ids to send the campaign to. REQUIRED if scheduledAt is not empty (required). + /// List ids which have to be excluded from a campaign. + public CreateSmsCampaignRecipients(List listIds = default(List), List exclusionListIds = default(List)) + { + // to ensure "listIds" is required (not null) + if (listIds == null) + { + throw new InvalidDataException("listIds is a required property for CreateSmsCampaignRecipients and cannot be null"); + } + else + { + this.ListIds = listIds; + } + this.ExclusionListIds = exclusionListIds; + } + + /// + /// Lists Ids to send the campaign to. REQUIRED if scheduledAt is not empty + /// + /// Lists Ids to send the campaign to. REQUIRED if scheduledAt is not empty + [DataMember(Name="listIds", EmitDefaultValue=false)] + public List ListIds { get; set; } + + /// + /// List ids which have to be excluded from a campaign + /// + /// List ids which have to be excluded from a campaign + [DataMember(Name="exclusionListIds", EmitDefaultValue=false)] + public List ExclusionListIds { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateSmsCampaignRecipients {\n"); + sb.Append(" ListIds: ").Append(ListIds).Append("\n"); + sb.Append(" ExclusionListIds: ").Append(ExclusionListIds).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateSmsCampaignRecipients); + } + + /// + /// Returns true if CreateSmsCampaignRecipients instances are equal + /// + /// Instance of CreateSmsCampaignRecipients to be compared + /// Boolean + public bool Equals(CreateSmsCampaignRecipients input) + { + if (input == null) + return false; + + return + ( + this.ListIds == input.ListIds || + this.ListIds != null && + this.ListIds.SequenceEqual(input.ListIds) + ) && + ( + this.ExclusionListIds == input.ExclusionListIds || + this.ExclusionListIds != null && + this.ExclusionListIds.SequenceEqual(input.ExclusionListIds) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ListIds != null) + hashCode = hashCode * 59 + this.ListIds.GetHashCode(); + if (this.ExclusionListIds != null) + hashCode = hashCode * 59 + this.ExclusionListIds.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/CreateSmtpEmail.cs b/src/sib_api_v3_sdk/Model/CreateSmtpEmail.cs new file mode 100644 index 0000000..5fb5e3e --- /dev/null +++ b/src/sib_api_v3_sdk/Model/CreateSmtpEmail.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// CreateSmtpEmail + /// + [DataContract] + public partial class CreateSmtpEmail : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CreateSmtpEmail() { } + /// + /// Initializes a new instance of the class. + /// + /// Message ID of the SMTP Email sent (required). + public CreateSmtpEmail(string messageId = default(string)) + { + // to ensure "messageId" is required (not null) + if (messageId == null) + { + throw new InvalidDataException("messageId is a required property for CreateSmtpEmail and cannot be null"); + } + else + { + this.MessageId = messageId; + } + } + + /// + /// Message ID of the SMTP Email sent + /// + /// Message ID of the SMTP Email sent + [DataMember(Name="messageId", EmitDefaultValue=false)] + public string MessageId { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateSmtpEmail {\n"); + sb.Append(" MessageId: ").Append(MessageId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateSmtpEmail); + } + + /// + /// Returns true if CreateSmtpEmail instances are equal + /// + /// Instance of CreateSmtpEmail to be compared + /// Boolean + public bool Equals(CreateSmtpEmail input) + { + if (input == null) + return false; + + return + ( + this.MessageId == input.MessageId || + (this.MessageId != null && + this.MessageId.Equals(input.MessageId)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.MessageId != null) + hashCode = hashCode * 59 + this.MessageId.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/CreateSmtpTemplate.cs b/src/sib_api_v3_sdk/Model/CreateSmtpTemplate.cs new file mode 100644 index 0000000..0b68bc2 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/CreateSmtpTemplate.cs @@ -0,0 +1,306 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// CreateSmtpTemplate + /// + [DataContract] + public partial class CreateSmtpTemplate : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CreateSmtpTemplate() { } + /// + /// Initializes a new instance of the class. + /// + /// Tag of the template. + /// sender (required). + /// Name of the template (required). + /// Body of the message (HTML version). The field must have more than 10 characters. REQUIRED if htmlUrl is empty. + /// Url which contents the body of the email message. REQUIRED if htmlContent is empty. + /// Subject of the template (required). + /// Email on which campaign recipients will be able to reply to. + /// To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization. + /// 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. + /// Status of template. isActive = true means template is active and isActive = false means template is inactive. + public CreateSmtpTemplate(string tag = default(string), CreateSmtpTemplateSender sender = default(CreateSmtpTemplateSender), string templateName = default(string), string htmlContent = default(string), string htmlUrl = default(string), string subject = default(string), string replyTo = default(string), string toField = default(string), string attachmentUrl = default(string), bool? isActive = default(bool?)) + { + // to ensure "sender" is required (not null) + if (sender == null) + { + throw new InvalidDataException("sender is a required property for CreateSmtpTemplate and cannot be null"); + } + else + { + this.Sender = sender; + } + // to ensure "templateName" is required (not null) + if (templateName == null) + { + throw new InvalidDataException("templateName is a required property for CreateSmtpTemplate and cannot be null"); + } + else + { + this.TemplateName = templateName; + } + // to ensure "subject" is required (not null) + if (subject == null) + { + throw new InvalidDataException("subject is a required property for CreateSmtpTemplate and cannot be null"); + } + else + { + this.Subject = subject; + } + this.Tag = tag; + this.HtmlContent = htmlContent; + this.HtmlUrl = htmlUrl; + this.ReplyTo = replyTo; + this.ToField = toField; + this.AttachmentUrl = attachmentUrl; + this.IsActive = isActive; + } + + /// + /// Tag of the template + /// + /// Tag of the template + [DataMember(Name="tag", EmitDefaultValue=false)] + public string Tag { get; set; } + + /// + /// Gets or Sets Sender + /// + [DataMember(Name="sender", EmitDefaultValue=false)] + public CreateSmtpTemplateSender Sender { get; set; } + + /// + /// Name of the template + /// + /// Name of the template + [DataMember(Name="templateName", EmitDefaultValue=false)] + public string TemplateName { get; set; } + + /// + /// Body of the message (HTML version). The field must have more than 10 characters. REQUIRED if htmlUrl is empty + /// + /// Body of the message (HTML version). The field must have more than 10 characters. REQUIRED if htmlUrl is empty + [DataMember(Name="htmlContent", EmitDefaultValue=false)] + public string HtmlContent { get; set; } + + /// + /// Url which contents the body of the email message. REQUIRED if htmlContent is empty + /// + /// Url which contents the body of the email message. REQUIRED if htmlContent is empty + [DataMember(Name="htmlUrl", EmitDefaultValue=false)] + public string HtmlUrl { get; set; } + + /// + /// Subject of the template + /// + /// Subject of the template + [DataMember(Name="subject", EmitDefaultValue=false)] + public string Subject { get; set; } + + /// + /// Email on which campaign recipients will be able to reply to + /// + /// Email on which campaign recipients will be able to reply to + [DataMember(Name="replyTo", EmitDefaultValue=false)] + public string ReplyTo { get; set; } + + /// + /// To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization + /// + /// To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization + [DataMember(Name="toField", EmitDefaultValue=false)] + public string ToField { get; set; } + + /// + /// 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 + /// + /// 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 + [DataMember(Name="attachmentUrl", EmitDefaultValue=false)] + public string AttachmentUrl { get; set; } + + /// + /// Status of template. isActive = true means template is active and isActive = false means template is inactive + /// + /// Status of template. isActive = true means template is active and isActive = false means template is inactive + [DataMember(Name="isActive", EmitDefaultValue=false)] + public bool? IsActive { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateSmtpTemplate {\n"); + sb.Append(" Tag: ").Append(Tag).Append("\n"); + sb.Append(" Sender: ").Append(Sender).Append("\n"); + sb.Append(" TemplateName: ").Append(TemplateName).Append("\n"); + sb.Append(" HtmlContent: ").Append(HtmlContent).Append("\n"); + sb.Append(" HtmlUrl: ").Append(HtmlUrl).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" ReplyTo: ").Append(ReplyTo).Append("\n"); + sb.Append(" ToField: ").Append(ToField).Append("\n"); + sb.Append(" AttachmentUrl: ").Append(AttachmentUrl).Append("\n"); + sb.Append(" IsActive: ").Append(IsActive).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateSmtpTemplate); + } + + /// + /// Returns true if CreateSmtpTemplate instances are equal + /// + /// Instance of CreateSmtpTemplate to be compared + /// Boolean + public bool Equals(CreateSmtpTemplate input) + { + if (input == null) + return false; + + return + ( + this.Tag == input.Tag || + (this.Tag != null && + this.Tag.Equals(input.Tag)) + ) && + ( + this.Sender == input.Sender || + (this.Sender != null && + this.Sender.Equals(input.Sender)) + ) && + ( + this.TemplateName == input.TemplateName || + (this.TemplateName != null && + this.TemplateName.Equals(input.TemplateName)) + ) && + ( + this.HtmlContent == input.HtmlContent || + (this.HtmlContent != null && + this.HtmlContent.Equals(input.HtmlContent)) + ) && + ( + this.HtmlUrl == input.HtmlUrl || + (this.HtmlUrl != null && + this.HtmlUrl.Equals(input.HtmlUrl)) + ) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && + ( + this.ReplyTo == input.ReplyTo || + (this.ReplyTo != null && + this.ReplyTo.Equals(input.ReplyTo)) + ) && + ( + this.ToField == input.ToField || + (this.ToField != null && + this.ToField.Equals(input.ToField)) + ) && + ( + this.AttachmentUrl == input.AttachmentUrl || + (this.AttachmentUrl != null && + this.AttachmentUrl.Equals(input.AttachmentUrl)) + ) && + ( + this.IsActive == input.IsActive || + (this.IsActive != null && + this.IsActive.Equals(input.IsActive)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Tag != null) + hashCode = hashCode * 59 + this.Tag.GetHashCode(); + if (this.Sender != null) + hashCode = hashCode * 59 + this.Sender.GetHashCode(); + if (this.TemplateName != null) + hashCode = hashCode * 59 + this.TemplateName.GetHashCode(); + if (this.HtmlContent != null) + hashCode = hashCode * 59 + this.HtmlContent.GetHashCode(); + if (this.HtmlUrl != null) + hashCode = hashCode * 59 + this.HtmlUrl.GetHashCode(); + if (this.Subject != null) + hashCode = hashCode * 59 + this.Subject.GetHashCode(); + if (this.ReplyTo != null) + hashCode = hashCode * 59 + this.ReplyTo.GetHashCode(); + if (this.ToField != null) + hashCode = hashCode * 59 + this.ToField.GetHashCode(); + if (this.AttachmentUrl != null) + hashCode = hashCode * 59 + this.AttachmentUrl.GetHashCode(); + if (this.IsActive != null) + hashCode = hashCode * 59 + this.IsActive.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/CreateSmtpTemplateSender.cs b/src/sib_api_v3_sdk/Model/CreateSmtpTemplateSender.cs new file mode 100644 index 0000000..6fbdec8 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/CreateSmtpTemplateSender.cs @@ -0,0 +1,155 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// Sender details including email and name (optional). For example {'name':'xyz' , 'email':'example@abc.com'} + /// + [DataContract] + public partial class CreateSmtpTemplateSender : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CreateSmtpTemplateSender() { } + /// + /// Initializes a new instance of the class. + /// + /// Name of the sender. If not passed, will be set to default. + /// Email of the sender (required). + public CreateSmtpTemplateSender(string name = default(string), string email = default(string)) + { + // to ensure "email" is required (not null) + if (email == null) + { + throw new InvalidDataException("email is a required property for CreateSmtpTemplateSender and cannot be null"); + } + else + { + this.Email = email; + } + this.Name = name; + } + + /// + /// Name of the sender. If not passed, will be set to default + /// + /// Name of the sender. If not passed, will be set to default + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Email of the sender + /// + /// Email of the sender + [DataMember(Name="email", EmitDefaultValue=false)] + public string Email { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateSmtpTemplateSender {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateSmtpTemplateSender); + } + + /// + /// Returns true if CreateSmtpTemplateSender instances are equal + /// + /// Instance of CreateSmtpTemplateSender to be compared + /// Boolean + public bool Equals(CreateSmtpTemplateSender input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Email != null) + hashCode = hashCode * 59 + this.Email.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/CreateUpdateContactModel.cs b/src/sib_api_v3_sdk/Model/CreateUpdateContactModel.cs new file mode 100644 index 0000000..209eb43 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/CreateUpdateContactModel.cs @@ -0,0 +1,125 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// CreateUpdateContactModel + /// + [DataContract] + public partial class CreateUpdateContactModel : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// ID of the contact when a new contact is created. + public CreateUpdateContactModel(long? id = default(long?)) + { + this.Id = id; + } + + /// + /// ID of the contact when a new contact is created + /// + /// ID of the contact when a new contact is created + [DataMember(Name="id", EmitDefaultValue=false)] + public long? Id { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateUpdateContactModel {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateUpdateContactModel); + } + + /// + /// Returns true if CreateUpdateContactModel instances are equal + /// + /// Instance of CreateUpdateContactModel to be compared + /// Boolean + public bool Equals(CreateUpdateContactModel input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/CreateUpdateFolder.cs b/src/sib_api_v3_sdk/Model/CreateUpdateFolder.cs new file mode 100644 index 0000000..6d2b980 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/CreateUpdateFolder.cs @@ -0,0 +1,125 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// CreateUpdateFolder + /// + [DataContract] + public partial class CreateUpdateFolder : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Name of the folder. + public CreateUpdateFolder(string name = default(string)) + { + this.Name = name; + } + + /// + /// Name of the folder + /// + /// Name of the folder + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateUpdateFolder {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateUpdateFolder); + } + + /// + /// Returns true if CreateUpdateFolder instances are equal + /// + /// Instance of CreateUpdateFolder to be compared + /// Boolean + public bool Equals(CreateUpdateFolder input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/CreateWebhook.cs b/src/sib_api_v3_sdk/Model/CreateWebhook.cs new file mode 100644 index 0000000..adcdba9 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/CreateWebhook.cs @@ -0,0 +1,313 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// CreateWebhook + /// + [DataContract] + public partial class CreateWebhook : IEquatable, IValidatableObject + { + /// + /// Defines Events + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum EventsEnum + { + + /// + /// Enum HardBounce for value: hardBounce + /// + [EnumMember(Value = "hardBounce")] + HardBounce = 1, + + /// + /// Enum SoftBounce for value: softBounce + /// + [EnumMember(Value = "softBounce")] + SoftBounce = 2, + + /// + /// Enum Blocked for value: blocked + /// + [EnumMember(Value = "blocked")] + Blocked = 3, + + /// + /// Enum Spam for value: spam + /// + [EnumMember(Value = "spam")] + Spam = 4, + + /// + /// Enum Delivered for value: delivered + /// + [EnumMember(Value = "delivered")] + Delivered = 5, + + /// + /// Enum Request for value: request + /// + [EnumMember(Value = "request")] + Request = 6, + + /// + /// Enum Click for value: click + /// + [EnumMember(Value = "click")] + Click = 7, + + /// + /// Enum Invalid for value: invalid + /// + [EnumMember(Value = "invalid")] + Invalid = 8, + + /// + /// Enum Deferred for value: deferred + /// + [EnumMember(Value = "deferred")] + Deferred = 9, + + /// + /// Enum Opened for value: opened + /// + [EnumMember(Value = "opened")] + Opened = 10, + + /// + /// Enum UniqueOpened for value: uniqueOpened + /// + [EnumMember(Value = "uniqueOpened")] + UniqueOpened = 11, + + /// + /// Enum Unsubscribed for value: unsubscribed + /// + [EnumMember(Value = "unsubscribed")] + Unsubscribed = 12, + + /// + /// Enum ListAddition for value: listAddition + /// + [EnumMember(Value = "listAddition")] + ListAddition = 13 + } + + + /// + /// 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 + /// + /// 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 + [DataMember(Name="events", EmitDefaultValue=false)] + public List Events { get; set; } + /// + /// Type of the webhook + /// + /// Type of the webhook + [JsonConverter(typeof(StringEnumConverter))] + public enum TypeEnum + { + + /// + /// Enum Transactional for value: transactional + /// + [EnumMember(Value = "transactional")] + Transactional = 1, + + /// + /// Enum Marketing for value: marketing + /// + [EnumMember(Value = "marketing")] + Marketing = 2 + } + + /// + /// Type of the webhook + /// + /// Type of the webhook + [DataMember(Name="type", EmitDefaultValue=false)] + public TypeEnum? Type { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CreateWebhook() { } + /// + /// Initializes a new instance of the class. + /// + /// URL of the webhook (required). + /// Description of the webhook. + /// 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 (required). + /// Type of the webhook (default to TypeEnum.Transactional). + public CreateWebhook(string url = default(string), string description = default(string), List events = default(List), TypeEnum? type = TypeEnum.Transactional) + { + // to ensure "url" is required (not null) + if (url == null) + { + throw new InvalidDataException("url is a required property for CreateWebhook and cannot be null"); + } + else + { + this.Url = url; + } + // to ensure "events" is required (not null) + if (events == null) + { + throw new InvalidDataException("events is a required property for CreateWebhook and cannot be null"); + } + else + { + this.Events = events; + } + this.Description = description; + // use default value if no "type" provided + if (type == null) + { + this.Type = TypeEnum.Transactional; + } + else + { + this.Type = type; + } + } + + /// + /// URL of the webhook + /// + /// URL of the webhook + [DataMember(Name="url", EmitDefaultValue=false)] + public string Url { get; set; } + + /// + /// Description of the webhook + /// + /// Description of the webhook + [DataMember(Name="description", EmitDefaultValue=false)] + public string Description { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateWebhook {\n"); + sb.Append(" Url: ").Append(Url).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Events: ").Append(Events).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateWebhook); + } + + /// + /// Returns true if CreateWebhook instances are equal + /// + /// Instance of CreateWebhook to be compared + /// Boolean + public bool Equals(CreateWebhook input) + { + if (input == null) + return false; + + return + ( + this.Url == input.Url || + (this.Url != null && + this.Url.Equals(input.Url)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && + ( + this.Events == input.Events || + this.Events != null && + this.Events.SequenceEqual(input.Events) + ) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Url != null) + hashCode = hashCode * 59 + this.Url.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + if (this.Events != null) + hashCode = hashCode * 59 + this.Events.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/CreatedProcessId.cs b/src/sib_api_v3_sdk/Model/CreatedProcessId.cs new file mode 100644 index 0000000..1a2fdb7 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/CreatedProcessId.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// CreatedProcessId + /// + [DataContract] + public partial class CreatedProcessId : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CreatedProcessId() { } + /// + /// Initializes a new instance of the class. + /// + /// Id of the process created (required). + public CreatedProcessId(long? processId = default(long?)) + { + // to ensure "processId" is required (not null) + if (processId == null) + { + throw new InvalidDataException("processId is a required property for CreatedProcessId and cannot be null"); + } + else + { + this.ProcessId = processId; + } + } + + /// + /// Id of the process created + /// + /// Id of the process created + [DataMember(Name="processId", EmitDefaultValue=false)] + public long? ProcessId { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreatedProcessId {\n"); + sb.Append(" ProcessId: ").Append(ProcessId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreatedProcessId); + } + + /// + /// Returns true if CreatedProcessId instances are equal + /// + /// Instance of CreatedProcessId to be compared + /// Boolean + public bool Equals(CreatedProcessId input) + { + if (input == null) + return false; + + return + ( + this.ProcessId == input.ProcessId || + (this.ProcessId != null && + this.ProcessId.Equals(input.ProcessId)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ProcessId != null) + hashCode = hashCode * 59 + this.ProcessId.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/DeleteHardbounces.cs b/src/sib_api_v3_sdk/Model/DeleteHardbounces.cs new file mode 100644 index 0000000..374a548 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/DeleteHardbounces.cs @@ -0,0 +1,159 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// DeleteHardbounces + /// + [DataContract] + public partial class DeleteHardbounces : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Starting date (YYYY-MM-DD) of the time period for deletion. The hardbounces occurred after this date will be deleted. Must be less than or equal to the endDate. + /// Ending date (YYYY-MM-DD) of the time period for deletion. The hardbounces until this date will be deleted. Must be greater than or equal to the startDate. + /// Target a specific email address. + public DeleteHardbounces(string startDate = default(string), string endDate = default(string), string contactEmail = default(string)) + { + this.StartDate = startDate; + this.EndDate = endDate; + this.ContactEmail = contactEmail; + } + + /// + /// Starting date (YYYY-MM-DD) of the time period for deletion. The hardbounces occurred after this date will be deleted. Must be less than or equal to the endDate + /// + /// Starting date (YYYY-MM-DD) of the time period for deletion. The hardbounces occurred after this date will be deleted. Must be less than or equal to the endDate + [DataMember(Name="startDate", EmitDefaultValue=false)] + public string StartDate { get; set; } + + /// + /// Ending date (YYYY-MM-DD) of the time period for deletion. The hardbounces until this date will be deleted. Must be greater than or equal to the startDate + /// + /// Ending date (YYYY-MM-DD) of the time period for deletion. The hardbounces until this date will be deleted. Must be greater than or equal to the startDate + [DataMember(Name="endDate", EmitDefaultValue=false)] + public string EndDate { get; set; } + + /// + /// Target a specific email address + /// + /// Target a specific email address + [DataMember(Name="contactEmail", EmitDefaultValue=false)] + public string ContactEmail { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class DeleteHardbounces {\n"); + sb.Append(" StartDate: ").Append(StartDate).Append("\n"); + sb.Append(" EndDate: ").Append(EndDate).Append("\n"); + sb.Append(" ContactEmail: ").Append(ContactEmail).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as DeleteHardbounces); + } + + /// + /// Returns true if DeleteHardbounces instances are equal + /// + /// Instance of DeleteHardbounces to be compared + /// Boolean + public bool Equals(DeleteHardbounces input) + { + if (input == null) + return false; + + return + ( + this.StartDate == input.StartDate || + (this.StartDate != null && + this.StartDate.Equals(input.StartDate)) + ) && + ( + this.EndDate == input.EndDate || + (this.EndDate != null && + this.EndDate.Equals(input.EndDate)) + ) && + ( + this.ContactEmail == input.ContactEmail || + (this.ContactEmail != null && + this.ContactEmail.Equals(input.ContactEmail)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.StartDate != null) + hashCode = hashCode * 59 + this.StartDate.GetHashCode(); + if (this.EndDate != null) + hashCode = hashCode * 59 + this.EndDate.GetHashCode(); + if (this.ContactEmail != null) + hashCode = hashCode * 59 + this.ContactEmail.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/EmailExportRecipients.cs b/src/sib_api_v3_sdk/Model/EmailExportRecipients.cs new file mode 100644 index 0000000..c6bf4b9 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/EmailExportRecipients.cs @@ -0,0 +1,212 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// EmailExportRecipients + /// + [DataContract] + public partial class EmailExportRecipients : IEquatable, IValidatableObject + { + /// + /// Type of recipients to export for a campaign + /// + /// Type of recipients to export for a campaign + [JsonConverter(typeof(StringEnumConverter))] + public enum RecipientsTypeEnum + { + + /// + /// Enum All for value: all + /// + [EnumMember(Value = "all")] + All = 1, + + /// + /// Enum NonClickers for value: nonClickers + /// + [EnumMember(Value = "nonClickers")] + NonClickers = 2, + + /// + /// Enum NonOpeners for value: nonOpeners + /// + [EnumMember(Value = "nonOpeners")] + NonOpeners = 3, + + /// + /// Enum Clickers for value: clickers + /// + [EnumMember(Value = "clickers")] + Clickers = 4, + + /// + /// Enum Openers for value: openers + /// + [EnumMember(Value = "openers")] + Openers = 5, + + /// + /// Enum SoftBounces for value: softBounces + /// + [EnumMember(Value = "softBounces")] + SoftBounces = 6, + + /// + /// Enum HardBounces for value: hardBounces + /// + [EnumMember(Value = "hardBounces")] + HardBounces = 7, + + /// + /// Enum Unsubscribed for value: unsubscribed + /// + [EnumMember(Value = "unsubscribed")] + Unsubscribed = 8 + } + + /// + /// Type of recipients to export for a campaign + /// + /// Type of recipients to export for a campaign + [DataMember(Name="recipientsType", EmitDefaultValue=false)] + public RecipientsTypeEnum RecipientsType { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected EmailExportRecipients() { } + /// + /// Initializes a new instance of the class. + /// + /// Webhook called once the export process is finished. + /// Type of recipients to export for a campaign (required). + public EmailExportRecipients(string notifyURL = default(string), RecipientsTypeEnum recipientsType = default(RecipientsTypeEnum)) + { + // to ensure "recipientsType" is required (not null) + if (recipientsType == null) + { + throw new InvalidDataException("recipientsType is a required property for EmailExportRecipients and cannot be null"); + } + else + { + this.RecipientsType = recipientsType; + } + this.NotifyURL = notifyURL; + } + + /// + /// Webhook called once the export process is finished + /// + /// Webhook called once the export process is finished + [DataMember(Name="notifyURL", EmitDefaultValue=false)] + public string NotifyURL { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class EmailExportRecipients {\n"); + sb.Append(" NotifyURL: ").Append(NotifyURL).Append("\n"); + sb.Append(" RecipientsType: ").Append(RecipientsType).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as EmailExportRecipients); + } + + /// + /// Returns true if EmailExportRecipients instances are equal + /// + /// Instance of EmailExportRecipients to be compared + /// Boolean + public bool Equals(EmailExportRecipients input) + { + if (input == null) + return false; + + return + ( + this.NotifyURL == input.NotifyURL || + (this.NotifyURL != null && + this.NotifyURL.Equals(input.NotifyURL)) + ) && + ( + this.RecipientsType == input.RecipientsType || + (this.RecipientsType != null && + this.RecipientsType.Equals(input.RecipientsType)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.NotifyURL != null) + hashCode = hashCode * 59 + this.NotifyURL.GetHashCode(); + if (this.RecipientsType != null) + hashCode = hashCode * 59 + this.RecipientsType.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/ErrorModel.cs b/src/sib_api_v3_sdk/Model/ErrorModel.cs new file mode 100644 index 0000000..9bce31a --- /dev/null +++ b/src/sib_api_v3_sdk/Model/ErrorModel.cs @@ -0,0 +1,262 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// ErrorModel + /// + [DataContract] + public partial class ErrorModel : IEquatable, IValidatableObject + { + /// + /// Error code displayed in case of a failure + /// + /// Error code displayed in case of a failure + [JsonConverter(typeof(StringEnumConverter))] + public enum CodeEnum + { + + /// + /// Enum Invalidparameter for value: invalid_parameter + /// + [EnumMember(Value = "invalid_parameter")] + Invalidparameter = 1, + + /// + /// Enum Missingparameter for value: missing_parameter + /// + [EnumMember(Value = "missing_parameter")] + Missingparameter = 2, + + /// + /// Enum Outofrange for value: out_of_range + /// + [EnumMember(Value = "out_of_range")] + Outofrange = 3, + + /// + /// Enum Campaignprocessing for value: campaign_processing + /// + [EnumMember(Value = "campaign_processing")] + Campaignprocessing = 4, + + /// + /// Enum Campaignsent for value: campaign_sent + /// + [EnumMember(Value = "campaign_sent")] + Campaignsent = 5, + + /// + /// Enum Documentnotfound for value: document_not_found + /// + [EnumMember(Value = "document_not_found")] + Documentnotfound = 6, + + /// + /// Enum Resellerpermissiondenied for value: reseller_permission_denied + /// + [EnumMember(Value = "reseller_permission_denied")] + Resellerpermissiondenied = 7, + + /// + /// Enum Notenoughcredits for value: not_enough_credits + /// + [EnumMember(Value = "not_enough_credits")] + Notenoughcredits = 8, + + /// + /// Enum Permissiondenied for value: permission_denied + /// + [EnumMember(Value = "permission_denied")] + Permissiondenied = 9, + + /// + /// Enum Duplicateparameter for value: duplicate_parameter + /// + [EnumMember(Value = "duplicate_parameter")] + Duplicateparameter = 10, + + /// + /// Enum Duplicaterequest for value: duplicate_request + /// + [EnumMember(Value = "duplicate_request")] + Duplicaterequest = 11, + + /// + /// Enum Methodnotallowed for value: method_not_allowed + /// + [EnumMember(Value = "method_not_allowed")] + Methodnotallowed = 12, + + /// + /// Enum Unauthorized for value: unauthorized + /// + [EnumMember(Value = "unauthorized")] + Unauthorized = 13, + + /// + /// Enum Accountundervalidation for value: account_under_validation + /// + [EnumMember(Value = "account_under_validation")] + Accountundervalidation = 14, + + /// + /// Enum Notacceptable for value: not_acceptable + /// + [EnumMember(Value = "not_acceptable")] + Notacceptable = 15 + } + + /// + /// Error code displayed in case of a failure + /// + /// Error code displayed in case of a failure + [DataMember(Name="code", EmitDefaultValue=false)] + public CodeEnum Code { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ErrorModel() { } + /// + /// Initializes a new instance of the class. + /// + /// Error code displayed in case of a failure (required). + /// Readable message associated to the failure (required). + public ErrorModel(CodeEnum code = default(CodeEnum), string message = default(string)) + { + // to ensure "code" is required (not null) + if (code == null) + { + throw new InvalidDataException("code is a required property for ErrorModel and cannot be null"); + } + else + { + this.Code = code; + } + // to ensure "message" is required (not null) + if (message == null) + { + throw new InvalidDataException("message is a required property for ErrorModel and cannot be null"); + } + else + { + this.Message = message; + } + } + + + /// + /// Readable message associated to the failure + /// + /// Readable message associated to the failure + [DataMember(Name="message", EmitDefaultValue=false)] + public string Message { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ErrorModel {\n"); + sb.Append(" Code: ").Append(Code).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ErrorModel); + } + + /// + /// Returns true if ErrorModel instances are equal + /// + /// Instance of ErrorModel to be compared + /// Boolean + public bool Equals(ErrorModel input) + { + if (input == null) + return false; + + return + ( + this.Code == input.Code || + (this.Code != null && + this.Code.Equals(input.Code)) + ) && + ( + this.Message == input.Message || + (this.Message != null && + this.Message.Equals(input.Message)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Code != null) + hashCode = hashCode * 59 + this.Code.GetHashCode(); + if (this.Message != null) + hashCode = hashCode * 59 + this.Message.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetAccount.cs b/src/sib_api_v3_sdk/Model/GetAccount.cs new file mode 100644 index 0000000..3df052c --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetAccount.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetAccount + /// + [DataContract] + public partial class GetAccount : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetAccount() { } + /// + /// Initializes a new instance of the class. + /// + /// Login Email (required). + /// First Name (required). + /// Last Name (required). + /// Name of the company (required). + /// address (required). + /// Information about your plans and credits (required). + /// relay (required). + /// marketingAutomation. + public GetAccount(string email = default(string), string firstName = default(string), string lastName = default(string), string companyName = default(string), GetExtendedClientAddress address = default(GetExtendedClientAddress), List plan = default(List), GetAccountRelay relay = default(GetAccountRelay), GetAccountMarketingAutomation marketingAutomation = default(GetAccountMarketingAutomation)) + { + // to ensure "email" is required (not null) + if (email == null) + { + throw new InvalidDataException("email is a required property for GetAccount and cannot be null"); + } + else + { + this.Email = email; + } + // to ensure "firstName" is required (not null) + if (firstName == null) + { + throw new InvalidDataException("firstName is a required property for GetAccount and cannot be null"); + } + else + { + this.FirstName = firstName; + } + // to ensure "lastName" is required (not null) + if (lastName == null) + { + throw new InvalidDataException("lastName is a required property for GetAccount and cannot be null"); + } + else + { + this.LastName = lastName; + } + // to ensure "companyName" is required (not null) + if (companyName == null) + { + throw new InvalidDataException("companyName is a required property for GetAccount and cannot be null"); + } + else + { + this.CompanyName = companyName; + } + // to ensure "address" is required (not null) + if (address == null) + { + throw new InvalidDataException("address is a required property for GetAccount and cannot be null"); + } + else + { + this.Address = address; + } + // to ensure "plan" is required (not null) + if (plan == null) + { + throw new InvalidDataException("plan is a required property for GetAccount and cannot be null"); + } + else + { + this.Plan = plan; + } + // to ensure "relay" is required (not null) + if (relay == null) + { + throw new InvalidDataException("relay is a required property for GetAccount and cannot be null"); + } + else + { + this.Relay = relay; + } + this.MarketingAutomation = marketingAutomation; + } + + /// + /// Login Email + /// + /// Login Email + [DataMember(Name="email", EmitDefaultValue=false)] + public string Email { get; set; } + + /// + /// First Name + /// + /// First Name + [DataMember(Name="firstName", EmitDefaultValue=false)] + public string FirstName { get; set; } + + /// + /// Last Name + /// + /// Last Name + [DataMember(Name="lastName", EmitDefaultValue=false)] + public string LastName { get; set; } + + /// + /// Name of the company + /// + /// Name of the company + [DataMember(Name="companyName", EmitDefaultValue=false)] + public string CompanyName { get; set; } + + /// + /// Gets or Sets Address + /// + [DataMember(Name="address", EmitDefaultValue=false)] + public GetExtendedClientAddress Address { get; set; } + + /// + /// Information about your plans and credits + /// + /// Information about your plans and credits + [DataMember(Name="plan", EmitDefaultValue=false)] + public List Plan { get; set; } + + /// + /// Gets or Sets Relay + /// + [DataMember(Name="relay", EmitDefaultValue=false)] + public GetAccountRelay Relay { get; set; } + + /// + /// Gets or Sets MarketingAutomation + /// + [DataMember(Name="marketingAutomation", EmitDefaultValue=false)] + public GetAccountMarketingAutomation MarketingAutomation { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetAccount {\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" FirstName: ").Append(FirstName).Append("\n"); + sb.Append(" LastName: ").Append(LastName).Append("\n"); + sb.Append(" CompanyName: ").Append(CompanyName).Append("\n"); + sb.Append(" Address: ").Append(Address).Append("\n"); + sb.Append(" Plan: ").Append(Plan).Append("\n"); + sb.Append(" Relay: ").Append(Relay).Append("\n"); + sb.Append(" MarketingAutomation: ").Append(MarketingAutomation).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetAccount); + } + + /// + /// Returns true if GetAccount instances are equal + /// + /// Instance of GetAccount to be compared + /// Boolean + public bool Equals(GetAccount input) + { + if (input == null) + return false; + + return + ( + this.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ) && + ( + this.FirstName == input.FirstName || + (this.FirstName != null && + this.FirstName.Equals(input.FirstName)) + ) && + ( + this.LastName == input.LastName || + (this.LastName != null && + this.LastName.Equals(input.LastName)) + ) && + ( + this.CompanyName == input.CompanyName || + (this.CompanyName != null && + this.CompanyName.Equals(input.CompanyName)) + ) && + ( + this.Address == input.Address || + (this.Address != null && + this.Address.Equals(input.Address)) + ) && + ( + this.Plan == input.Plan || + this.Plan != null && + this.Plan.SequenceEqual(input.Plan) + ) && + ( + this.Relay == input.Relay || + (this.Relay != null && + this.Relay.Equals(input.Relay)) + ) && + ( + this.MarketingAutomation == input.MarketingAutomation || + (this.MarketingAutomation != null && + this.MarketingAutomation.Equals(input.MarketingAutomation)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Email != null) + hashCode = hashCode * 59 + this.Email.GetHashCode(); + if (this.FirstName != null) + hashCode = hashCode * 59 + this.FirstName.GetHashCode(); + if (this.LastName != null) + hashCode = hashCode * 59 + this.LastName.GetHashCode(); + if (this.CompanyName != null) + hashCode = hashCode * 59 + this.CompanyName.GetHashCode(); + if (this.Address != null) + hashCode = hashCode * 59 + this.Address.GetHashCode(); + if (this.Plan != null) + hashCode = hashCode * 59 + this.Plan.GetHashCode(); + if (this.Relay != null) + hashCode = hashCode * 59 + this.Relay.GetHashCode(); + if (this.MarketingAutomation != null) + hashCode = hashCode * 59 + this.MarketingAutomation.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetAccountMarketingAutomation.cs b/src/sib_api_v3_sdk/Model/GetAccountMarketingAutomation.cs new file mode 100644 index 0000000..d84a045 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetAccountMarketingAutomation.cs @@ -0,0 +1,155 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetAccountMarketingAutomation + /// + [DataContract] + public partial class GetAccountMarketingAutomation : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetAccountMarketingAutomation() { } + /// + /// Initializes a new instance of the class. + /// + /// Marketing Automation Tracker ID. + /// Status of Marketing Automation Plateform activation for your account (true=enabled, false=disabled) (required). + public GetAccountMarketingAutomation(string key = default(string), bool? enabled = default(bool?)) + { + // to ensure "enabled" is required (not null) + if (enabled == null) + { + throw new InvalidDataException("enabled is a required property for GetAccountMarketingAutomation and cannot be null"); + } + else + { + this.Enabled = enabled; + } + this.Key = key; + } + + /// + /// Marketing Automation Tracker ID + /// + /// Marketing Automation Tracker ID + [DataMember(Name="key", EmitDefaultValue=false)] + public string Key { get; set; } + + /// + /// Status of Marketing Automation Plateform activation for your account (true=enabled, false=disabled) + /// + /// Status of Marketing Automation Plateform activation for your account (true=enabled, false=disabled) + [DataMember(Name="enabled", EmitDefaultValue=false)] + public bool? Enabled { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetAccountMarketingAutomation {\n"); + sb.Append(" Key: ").Append(Key).Append("\n"); + sb.Append(" Enabled: ").Append(Enabled).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetAccountMarketingAutomation); + } + + /// + /// Returns true if GetAccountMarketingAutomation instances are equal + /// + /// Instance of GetAccountMarketingAutomation to be compared + /// Boolean + public bool Equals(GetAccountMarketingAutomation input) + { + if (input == null) + return false; + + return + ( + this.Key == input.Key || + (this.Key != null && + this.Key.Equals(input.Key)) + ) && + ( + this.Enabled == input.Enabled || + (this.Enabled != null && + this.Enabled.Equals(input.Enabled)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Key != null) + hashCode = hashCode * 59 + this.Key.GetHashCode(); + if (this.Enabled != null) + hashCode = hashCode * 59 + this.Enabled.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetAccountPlan.cs b/src/sib_api_v3_sdk/Model/GetAccountPlan.cs new file mode 100644 index 0000000..20ba0ea --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetAccountPlan.cs @@ -0,0 +1,295 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetAccountPlan + /// + [DataContract] + public partial class GetAccountPlan : IEquatable, IValidatableObject + { + /// + /// Displays the plan type of the user + /// + /// Displays the plan type of the user + [JsonConverter(typeof(StringEnumConverter))] + public enum TypeEnum + { + + /// + /// Enum PayAsYouGo for value: payAsYouGo + /// + [EnumMember(Value = "payAsYouGo")] + PayAsYouGo = 1, + + /// + /// Enum Free for value: free + /// + [EnumMember(Value = "free")] + Free = 2, + + /// + /// Enum Subscription for value: subscription + /// + [EnumMember(Value = "subscription")] + Subscription = 3, + + /// + /// Enum Sms for value: sms + /// + [EnumMember(Value = "sms")] + Sms = 4, + + /// + /// Enum Reseller for value: reseller + /// + [EnumMember(Value = "reseller")] + Reseller = 5 + } + + /// + /// Displays the plan type of the user + /// + /// Displays the plan type of the user + [DataMember(Name="type", EmitDefaultValue=false)] + public TypeEnum Type { get; set; } + /// + /// This is the type of the credit, \"Send Limit\" is one of the possible types of credit of a user. \"Send Limit\" implies the total number of emails you can send to the subscribers in your account. + /// + /// This is the type of the credit, \"Send Limit\" is one of the possible types of credit of a user. \"Send Limit\" implies the total number of emails you can send to the subscribers in your account. + [JsonConverter(typeof(StringEnumConverter))] + public enum CreditsTypeEnum + { + + /// + /// Enum SendLimit for value: sendLimit + /// + [EnumMember(Value = "sendLimit")] + SendLimit = 1 + } + + /// + /// This is the type of the credit, \"Send Limit\" is one of the possible types of credit of a user. \"Send Limit\" implies the total number of emails you can send to the subscribers in your account. + /// + /// This is the type of the credit, \"Send Limit\" is one of the possible types of credit of a user. \"Send Limit\" implies the total number of emails you can send to the subscribers in your account. + [DataMember(Name="creditsType", EmitDefaultValue=false)] + public CreditsTypeEnum CreditsType { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetAccountPlan() { } + /// + /// Initializes a new instance of the class. + /// + /// Displays the plan type of the user (required). + /// This is the type of the credit, \"Send Limit\" is one of the possible types of credit of a user. \"Send Limit\" implies the total number of emails you can send to the subscribers in your account. (required). + /// Remaining credits of the user (required). + /// Date of the period from which the plan will start (only available for \"subscription\" and \"reseller\" plan type). + /// Date of the period from which the plan will end (only available for \"subscription\" and \"reseller\" plan type). + /// Only in case of reseller account. It implies the total number of child accounts you can add to your account.. + public GetAccountPlan(TypeEnum type = default(TypeEnum), CreditsTypeEnum creditsType = default(CreditsTypeEnum), float? credits = default(float?), DateTime? startDate = default(DateTime?), DateTime? endDate = default(DateTime?), int? userLimit = default(int?)) + { + // to ensure "type" is required (not null) + if (type == null) + { + throw new InvalidDataException("type is a required property for GetAccountPlan and cannot be null"); + } + else + { + this.Type = type; + } + // to ensure "creditsType" is required (not null) + if (creditsType == null) + { + throw new InvalidDataException("creditsType is a required property for GetAccountPlan and cannot be null"); + } + else + { + this.CreditsType = creditsType; + } + // to ensure "credits" is required (not null) + if (credits == null) + { + throw new InvalidDataException("credits is a required property for GetAccountPlan and cannot be null"); + } + else + { + this.Credits = credits; + } + this.StartDate = startDate; + this.EndDate = endDate; + this.UserLimit = userLimit; + } + + + + /// + /// Remaining credits of the user + /// + /// Remaining credits of the user + [DataMember(Name="credits", EmitDefaultValue=false)] + public float? Credits { get; set; } + + /// + /// Date of the period from which the plan will start (only available for \"subscription\" and \"reseller\" plan type) + /// + /// Date of the period from which the plan will start (only available for \"subscription\" and \"reseller\" plan type) + [DataMember(Name="startDate", EmitDefaultValue=false)] + [JsonConverter(typeof(SwaggerDateConverter))] + public DateTime? StartDate { get; set; } + + /// + /// Date of the period from which the plan will end (only available for \"subscription\" and \"reseller\" plan type) + /// + /// Date of the period from which the plan will end (only available for \"subscription\" and \"reseller\" plan type) + [DataMember(Name="endDate", EmitDefaultValue=false)] + [JsonConverter(typeof(SwaggerDateConverter))] + public DateTime? EndDate { get; set; } + + /// + /// Only in case of reseller account. It implies the total number of child accounts you can add to your account. + /// + /// Only in case of reseller account. It implies the total number of child accounts you can add to your account. + [DataMember(Name="userLimit", EmitDefaultValue=false)] + public int? UserLimit { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetAccountPlan {\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" CreditsType: ").Append(CreditsType).Append("\n"); + sb.Append(" Credits: ").Append(Credits).Append("\n"); + sb.Append(" StartDate: ").Append(StartDate).Append("\n"); + sb.Append(" EndDate: ").Append(EndDate).Append("\n"); + sb.Append(" UserLimit: ").Append(UserLimit).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetAccountPlan); + } + + /// + /// Returns true if GetAccountPlan instances are equal + /// + /// Instance of GetAccountPlan to be compared + /// Boolean + public bool Equals(GetAccountPlan input) + { + if (input == null) + return false; + + return + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && + ( + this.CreditsType == input.CreditsType || + (this.CreditsType != null && + this.CreditsType.Equals(input.CreditsType)) + ) && + ( + this.Credits == input.Credits || + (this.Credits != null && + this.Credits.Equals(input.Credits)) + ) && + ( + this.StartDate == input.StartDate || + (this.StartDate != null && + this.StartDate.Equals(input.StartDate)) + ) && + ( + this.EndDate == input.EndDate || + (this.EndDate != null && + this.EndDate.Equals(input.EndDate)) + ) && + ( + this.UserLimit == input.UserLimit || + (this.UserLimit != null && + this.UserLimit.Equals(input.UserLimit)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.CreditsType != null) + hashCode = hashCode * 59 + this.CreditsType.GetHashCode(); + if (this.Credits != null) + hashCode = hashCode * 59 + this.Credits.GetHashCode(); + if (this.StartDate != null) + hashCode = hashCode * 59 + this.StartDate.GetHashCode(); + if (this.EndDate != null) + hashCode = hashCode * 59 + this.EndDate.GetHashCode(); + if (this.UserLimit != null) + hashCode = hashCode * 59 + this.UserLimit.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetAccountRelay.cs b/src/sib_api_v3_sdk/Model/GetAccountRelay.cs new file mode 100644 index 0000000..9bb477c --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetAccountRelay.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// Information about your SMTP account + /// + [DataContract] + public partial class GetAccountRelay : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetAccountRelay() { } + /// + /// Initializes a new instance of the class. + /// + /// Status of your SMTP Account (true=Enabled, false=Disabled) (required). + /// data (required). + public GetAccountRelay(bool? enabled = default(bool?), GetAccountRelayData data = default(GetAccountRelayData)) + { + // to ensure "enabled" is required (not null) + if (enabled == null) + { + throw new InvalidDataException("enabled is a required property for GetAccountRelay and cannot be null"); + } + else + { + this.Enabled = enabled; + } + // to ensure "data" is required (not null) + if (data == null) + { + throw new InvalidDataException("data is a required property for GetAccountRelay and cannot be null"); + } + else + { + this.Data = data; + } + } + + /// + /// Status of your SMTP Account (true=Enabled, false=Disabled) + /// + /// Status of your SMTP Account (true=Enabled, false=Disabled) + [DataMember(Name="enabled", EmitDefaultValue=false)] + public bool? Enabled { get; set; } + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public GetAccountRelayData Data { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetAccountRelay {\n"); + sb.Append(" Enabled: ").Append(Enabled).Append("\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetAccountRelay); + } + + /// + /// Returns true if GetAccountRelay instances are equal + /// + /// Instance of GetAccountRelay to be compared + /// Boolean + public bool Equals(GetAccountRelay input) + { + if (input == null) + return false; + + return + ( + this.Enabled == input.Enabled || + (this.Enabled != null && + this.Enabled.Equals(input.Enabled)) + ) && + ( + this.Data == input.Data || + (this.Data != null && + this.Data.Equals(input.Data)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Enabled != null) + hashCode = hashCode * 59 + this.Enabled.GetHashCode(); + if (this.Data != null) + hashCode = hashCode * 59 + this.Data.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetAccountRelayData.cs b/src/sib_api_v3_sdk/Model/GetAccountRelayData.cs new file mode 100644 index 0000000..a89569d --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetAccountRelayData.cs @@ -0,0 +1,188 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// Data regarding the SMTP account + /// + [DataContract] + public partial class GetAccountRelayData : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetAccountRelayData() { } + /// + /// Initializes a new instance of the class. + /// + /// Email to use as login on SMTP (required). + /// URL of the SMTP Relay (required). + /// Port used for SMTP Relay (required). + public GetAccountRelayData(string userName = default(string), string relay = default(string), int? port = default(int?)) + { + // to ensure "userName" is required (not null) + if (userName == null) + { + throw new InvalidDataException("userName is a required property for GetAccountRelayData and cannot be null"); + } + else + { + this.UserName = userName; + } + // to ensure "relay" is required (not null) + if (relay == null) + { + throw new InvalidDataException("relay is a required property for GetAccountRelayData and cannot be null"); + } + else + { + this.Relay = relay; + } + // to ensure "port" is required (not null) + if (port == null) + { + throw new InvalidDataException("port is a required property for GetAccountRelayData and cannot be null"); + } + else + { + this.Port = port; + } + } + + /// + /// Email to use as login on SMTP + /// + /// Email to use as login on SMTP + [DataMember(Name="userName", EmitDefaultValue=false)] + public string UserName { get; set; } + + /// + /// URL of the SMTP Relay + /// + /// URL of the SMTP Relay + [DataMember(Name="relay", EmitDefaultValue=false)] + public string Relay { get; set; } + + /// + /// Port used for SMTP Relay + /// + /// Port used for SMTP Relay + [DataMember(Name="port", EmitDefaultValue=false)] + public int? Port { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetAccountRelayData {\n"); + sb.Append(" UserName: ").Append(UserName).Append("\n"); + sb.Append(" Relay: ").Append(Relay).Append("\n"); + sb.Append(" Port: ").Append(Port).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetAccountRelayData); + } + + /// + /// Returns true if GetAccountRelayData instances are equal + /// + /// Instance of GetAccountRelayData to be compared + /// Boolean + public bool Equals(GetAccountRelayData input) + { + if (input == null) + return false; + + return + ( + this.UserName == input.UserName || + (this.UserName != null && + this.UserName.Equals(input.UserName)) + ) && + ( + this.Relay == input.Relay || + (this.Relay != null && + this.Relay.Equals(input.Relay)) + ) && + ( + this.Port == input.Port || + (this.Port != null && + this.Port.Equals(input.Port)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.UserName != null) + hashCode = hashCode * 59 + this.UserName.GetHashCode(); + if (this.Relay != null) + hashCode = hashCode * 59 + this.Relay.GetHashCode(); + if (this.Port != null) + hashCode = hashCode * 59 + this.Port.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetAggregatedReport.cs b/src/sib_api_v3_sdk/Model/GetAggregatedReport.cs new file mode 100644 index 0000000..bd92467 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetAggregatedReport.cs @@ -0,0 +1,438 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetAggregatedReport + /// + [DataContract] + public partial class GetAggregatedReport : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetAggregatedReport() { } + /// + /// Initializes a new instance of the class. + /// + /// Time frame of the report (required). + /// Number of requests for the timeframe (required). + /// Number of delivered emails for the timeframe (required). + /// Number of hardbounces for the timeframe (required). + /// Number of softbounces for the timeframe (required). + /// Number of clicks for the timeframe (required). + /// Number of unique clicks for the timeframe (required). + /// Number of openings for the timeframe (required). + /// Number of unique openings for the timeframe (required). + /// Number of complaint (spam report) for the timeframe (required). + /// Number of blocked contact emails for the timeframe (required). + /// Number of invalid emails for the timeframe (required). + /// Number of unsubscribed emails for the timeframe (required). + public GetAggregatedReport(string range = default(string), long? requests = default(long?), long? delivered = default(long?), long? hardBounces = default(long?), long? softBounces = default(long?), long? clicks = default(long?), long? uniqueClicks = default(long?), long? opens = default(long?), long? uniqueOpens = default(long?), long? spamReports = default(long?), long? blocked = default(long?), long? invalid = default(long?), long? unsubscribed = default(long?)) + { + // to ensure "range" is required (not null) + if (range == null) + { + throw new InvalidDataException("range is a required property for GetAggregatedReport and cannot be null"); + } + else + { + this.Range = range; + } + // to ensure "requests" is required (not null) + if (requests == null) + { + throw new InvalidDataException("requests is a required property for GetAggregatedReport and cannot be null"); + } + else + { + this.Requests = requests; + } + // to ensure "delivered" is required (not null) + if (delivered == null) + { + throw new InvalidDataException("delivered is a required property for GetAggregatedReport and cannot be null"); + } + else + { + this.Delivered = delivered; + } + // to ensure "hardBounces" is required (not null) + if (hardBounces == null) + { + throw new InvalidDataException("hardBounces is a required property for GetAggregatedReport and cannot be null"); + } + else + { + this.HardBounces = hardBounces; + } + // to ensure "softBounces" is required (not null) + if (softBounces == null) + { + throw new InvalidDataException("softBounces is a required property for GetAggregatedReport and cannot be null"); + } + else + { + this.SoftBounces = softBounces; + } + // to ensure "clicks" is required (not null) + if (clicks == null) + { + throw new InvalidDataException("clicks is a required property for GetAggregatedReport and cannot be null"); + } + else + { + this.Clicks = clicks; + } + // to ensure "uniqueClicks" is required (not null) + if (uniqueClicks == null) + { + throw new InvalidDataException("uniqueClicks is a required property for GetAggregatedReport and cannot be null"); + } + else + { + this.UniqueClicks = uniqueClicks; + } + // to ensure "opens" is required (not null) + if (opens == null) + { + throw new InvalidDataException("opens is a required property for GetAggregatedReport and cannot be null"); + } + else + { + this.Opens = opens; + } + // to ensure "uniqueOpens" is required (not null) + if (uniqueOpens == null) + { + throw new InvalidDataException("uniqueOpens is a required property for GetAggregatedReport and cannot be null"); + } + else + { + this.UniqueOpens = uniqueOpens; + } + // to ensure "spamReports" is required (not null) + if (spamReports == null) + { + throw new InvalidDataException("spamReports is a required property for GetAggregatedReport and cannot be null"); + } + else + { + this.SpamReports = spamReports; + } + // to ensure "blocked" is required (not null) + if (blocked == null) + { + throw new InvalidDataException("blocked is a required property for GetAggregatedReport and cannot be null"); + } + else + { + this.Blocked = blocked; + } + // to ensure "invalid" is required (not null) + if (invalid == null) + { + throw new InvalidDataException("invalid is a required property for GetAggregatedReport and cannot be null"); + } + else + { + this.Invalid = invalid; + } + // to ensure "unsubscribed" is required (not null) + if (unsubscribed == null) + { + throw new InvalidDataException("unsubscribed is a required property for GetAggregatedReport and cannot be null"); + } + else + { + this.Unsubscribed = unsubscribed; + } + } + + /// + /// Time frame of the report + /// + /// Time frame of the report + [DataMember(Name="range", EmitDefaultValue=false)] + public string Range { get; set; } + + /// + /// Number of requests for the timeframe + /// + /// Number of requests for the timeframe + [DataMember(Name="requests", EmitDefaultValue=false)] + public long? Requests { get; set; } + + /// + /// Number of delivered emails for the timeframe + /// + /// Number of delivered emails for the timeframe + [DataMember(Name="delivered", EmitDefaultValue=false)] + public long? Delivered { get; set; } + + /// + /// Number of hardbounces for the timeframe + /// + /// Number of hardbounces for the timeframe + [DataMember(Name="hardBounces", EmitDefaultValue=false)] + public long? HardBounces { get; set; } + + /// + /// Number of softbounces for the timeframe + /// + /// Number of softbounces for the timeframe + [DataMember(Name="softBounces", EmitDefaultValue=false)] + public long? SoftBounces { get; set; } + + /// + /// Number of clicks for the timeframe + /// + /// Number of clicks for the timeframe + [DataMember(Name="clicks", EmitDefaultValue=false)] + public long? Clicks { get; set; } + + /// + /// Number of unique clicks for the timeframe + /// + /// Number of unique clicks for the timeframe + [DataMember(Name="uniqueClicks", EmitDefaultValue=false)] + public long? UniqueClicks { get; set; } + + /// + /// Number of openings for the timeframe + /// + /// Number of openings for the timeframe + [DataMember(Name="opens", EmitDefaultValue=false)] + public long? Opens { get; set; } + + /// + /// Number of unique openings for the timeframe + /// + /// Number of unique openings for the timeframe + [DataMember(Name="uniqueOpens", EmitDefaultValue=false)] + public long? UniqueOpens { get; set; } + + /// + /// Number of complaint (spam report) for the timeframe + /// + /// Number of complaint (spam report) for the timeframe + [DataMember(Name="spamReports", EmitDefaultValue=false)] + public long? SpamReports { get; set; } + + /// + /// Number of blocked contact emails for the timeframe + /// + /// Number of blocked contact emails for the timeframe + [DataMember(Name="blocked", EmitDefaultValue=false)] + public long? Blocked { get; set; } + + /// + /// Number of invalid emails for the timeframe + /// + /// Number of invalid emails for the timeframe + [DataMember(Name="invalid", EmitDefaultValue=false)] + public long? Invalid { get; set; } + + /// + /// Number of unsubscribed emails for the timeframe + /// + /// Number of unsubscribed emails for the timeframe + [DataMember(Name="unsubscribed", EmitDefaultValue=false)] + public long? Unsubscribed { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetAggregatedReport {\n"); + sb.Append(" Range: ").Append(Range).Append("\n"); + sb.Append(" Requests: ").Append(Requests).Append("\n"); + sb.Append(" Delivered: ").Append(Delivered).Append("\n"); + sb.Append(" HardBounces: ").Append(HardBounces).Append("\n"); + sb.Append(" SoftBounces: ").Append(SoftBounces).Append("\n"); + sb.Append(" Clicks: ").Append(Clicks).Append("\n"); + sb.Append(" UniqueClicks: ").Append(UniqueClicks).Append("\n"); + sb.Append(" Opens: ").Append(Opens).Append("\n"); + sb.Append(" UniqueOpens: ").Append(UniqueOpens).Append("\n"); + sb.Append(" SpamReports: ").Append(SpamReports).Append("\n"); + sb.Append(" Blocked: ").Append(Blocked).Append("\n"); + sb.Append(" Invalid: ").Append(Invalid).Append("\n"); + sb.Append(" Unsubscribed: ").Append(Unsubscribed).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetAggregatedReport); + } + + /// + /// Returns true if GetAggregatedReport instances are equal + /// + /// Instance of GetAggregatedReport to be compared + /// Boolean + public bool Equals(GetAggregatedReport input) + { + if (input == null) + return false; + + return + ( + this.Range == input.Range || + (this.Range != null && + this.Range.Equals(input.Range)) + ) && + ( + this.Requests == input.Requests || + (this.Requests != null && + this.Requests.Equals(input.Requests)) + ) && + ( + this.Delivered == input.Delivered || + (this.Delivered != null && + this.Delivered.Equals(input.Delivered)) + ) && + ( + this.HardBounces == input.HardBounces || + (this.HardBounces != null && + this.HardBounces.Equals(input.HardBounces)) + ) && + ( + this.SoftBounces == input.SoftBounces || + (this.SoftBounces != null && + this.SoftBounces.Equals(input.SoftBounces)) + ) && + ( + this.Clicks == input.Clicks || + (this.Clicks != null && + this.Clicks.Equals(input.Clicks)) + ) && + ( + this.UniqueClicks == input.UniqueClicks || + (this.UniqueClicks != null && + this.UniqueClicks.Equals(input.UniqueClicks)) + ) && + ( + this.Opens == input.Opens || + (this.Opens != null && + this.Opens.Equals(input.Opens)) + ) && + ( + this.UniqueOpens == input.UniqueOpens || + (this.UniqueOpens != null && + this.UniqueOpens.Equals(input.UniqueOpens)) + ) && + ( + this.SpamReports == input.SpamReports || + (this.SpamReports != null && + this.SpamReports.Equals(input.SpamReports)) + ) && + ( + this.Blocked == input.Blocked || + (this.Blocked != null && + this.Blocked.Equals(input.Blocked)) + ) && + ( + this.Invalid == input.Invalid || + (this.Invalid != null && + this.Invalid.Equals(input.Invalid)) + ) && + ( + this.Unsubscribed == input.Unsubscribed || + (this.Unsubscribed != null && + this.Unsubscribed.Equals(input.Unsubscribed)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Range != null) + hashCode = hashCode * 59 + this.Range.GetHashCode(); + if (this.Requests != null) + hashCode = hashCode * 59 + this.Requests.GetHashCode(); + if (this.Delivered != null) + hashCode = hashCode * 59 + this.Delivered.GetHashCode(); + if (this.HardBounces != null) + hashCode = hashCode * 59 + this.HardBounces.GetHashCode(); + if (this.SoftBounces != null) + hashCode = hashCode * 59 + this.SoftBounces.GetHashCode(); + if (this.Clicks != null) + hashCode = hashCode * 59 + this.Clicks.GetHashCode(); + if (this.UniqueClicks != null) + hashCode = hashCode * 59 + this.UniqueClicks.GetHashCode(); + if (this.Opens != null) + hashCode = hashCode * 59 + this.Opens.GetHashCode(); + if (this.UniqueOpens != null) + hashCode = hashCode * 59 + this.UniqueOpens.GetHashCode(); + if (this.SpamReports != null) + hashCode = hashCode * 59 + this.SpamReports.GetHashCode(); + if (this.Blocked != null) + hashCode = hashCode * 59 + this.Blocked.GetHashCode(); + if (this.Invalid != null) + hashCode = hashCode * 59 + this.Invalid.GetHashCode(); + if (this.Unsubscribed != null) + hashCode = hashCode * 59 + this.Unsubscribed.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetAttributes.cs b/src/sib_api_v3_sdk/Model/GetAttributes.cs new file mode 100644 index 0000000..3479e46 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetAttributes.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetAttributes + /// + [DataContract] + public partial class GetAttributes : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetAttributes() { } + /// + /// Initializes a new instance of the class. + /// + /// Listing of available contact attributes in your account (required). + public GetAttributes(List attributes = default(List)) + { + // to ensure "attributes" is required (not null) + if (attributes == null) + { + throw new InvalidDataException("attributes is a required property for GetAttributes and cannot be null"); + } + else + { + this.Attributes = attributes; + } + } + + /// + /// Listing of available contact attributes in your account + /// + /// Listing of available contact attributes in your account + [DataMember(Name="attributes", EmitDefaultValue=false)] + public List Attributes { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetAttributes {\n"); + sb.Append(" Attributes: ").Append(Attributes).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetAttributes); + } + + /// + /// Returns true if GetAttributes instances are equal + /// + /// Instance of GetAttributes to be compared + /// Boolean + public bool Equals(GetAttributes input) + { + if (input == null) + return false; + + return + ( + this.Attributes == input.Attributes || + this.Attributes != null && + this.Attributes.SequenceEqual(input.Attributes) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Attributes != null) + hashCode = hashCode * 59 + this.Attributes.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetAttributesAttributes.cs b/src/sib_api_v3_sdk/Model/GetAttributesAttributes.cs new file mode 100644 index 0000000..2ca5a90 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetAttributesAttributes.cs @@ -0,0 +1,292 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetAttributesAttributes + /// + [DataContract] + public partial class GetAttributesAttributes : IEquatable, IValidatableObject + { + /// + /// Category of the attribute + /// + /// Category of the attribute + [JsonConverter(typeof(StringEnumConverter))] + public enum CategoryEnum + { + + /// + /// Enum Normal for value: normal + /// + [EnumMember(Value = "normal")] + Normal = 1, + + /// + /// Enum Transactional for value: transactional + /// + [EnumMember(Value = "transactional")] + Transactional = 2, + + /// + /// Enum Category for value: category + /// + [EnumMember(Value = "category")] + Category = 3, + + /// + /// Enum Calculated for value: calculated + /// + [EnumMember(Value = "calculated")] + Calculated = 4, + + /// + /// Enum Global for value: global + /// + [EnumMember(Value = "global")] + Global = 5 + } + + /// + /// Category of the attribute + /// + /// Category of the attribute + [DataMember(Name="category", EmitDefaultValue=false)] + public CategoryEnum Category { get; set; } + /// + /// Type of the attribute + /// + /// Type of the attribute + [JsonConverter(typeof(StringEnumConverter))] + public enum TypeEnum + { + + /// + /// Enum Text for value: text + /// + [EnumMember(Value = "text")] + Text = 1, + + /// + /// Enum Date for value: date + /// + [EnumMember(Value = "date")] + Date = 2, + + /// + /// Enum Float for value: float + /// + [EnumMember(Value = "float")] + Float = 3, + + /// + /// Enum Id for value: id + /// + [EnumMember(Value = "id")] + Id = 4, + + /// + /// Enum Boolean for value: boolean + /// + [EnumMember(Value = "boolean")] + Boolean = 5 + } + + /// + /// Type of the attribute + /// + /// Type of the attribute + [DataMember(Name="type", EmitDefaultValue=false)] + public TypeEnum? Type { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetAttributesAttributes() { } + /// + /// Initializes a new instance of the class. + /// + /// Name of the attribute (required). + /// Category of the attribute (required). + /// Type of the attribute. + /// Parameter only available for \"category\" type attributes.. + /// Calculated value formula. + public GetAttributesAttributes(string name = default(string), CategoryEnum category = default(CategoryEnum), TypeEnum? type = default(TypeEnum?), List enumeration = default(List), string calculatedValue = default(string)) + { + // to ensure "name" is required (not null) + if (name == null) + { + throw new InvalidDataException("name is a required property for GetAttributesAttributes and cannot be null"); + } + else + { + this.Name = name; + } + // to ensure "category" is required (not null) + if (category == null) + { + throw new InvalidDataException("category is a required property for GetAttributesAttributes and cannot be null"); + } + else + { + this.Category = category; + } + this.Type = type; + this.Enumeration = enumeration; + this.CalculatedValue = calculatedValue; + } + + /// + /// Name of the attribute + /// + /// Name of the attribute + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + + + /// + /// Parameter only available for \"category\" type attributes. + /// + /// Parameter only available for \"category\" type attributes. + [DataMember(Name="enumeration", EmitDefaultValue=false)] + public List Enumeration { get; set; } + + /// + /// Calculated value formula + /// + /// Calculated value formula + [DataMember(Name="calculatedValue", EmitDefaultValue=false)] + public string CalculatedValue { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetAttributesAttributes {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Category: ").Append(Category).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Enumeration: ").Append(Enumeration).Append("\n"); + sb.Append(" CalculatedValue: ").Append(CalculatedValue).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetAttributesAttributes); + } + + /// + /// Returns true if GetAttributesAttributes instances are equal + /// + /// Instance of GetAttributesAttributes to be compared + /// Boolean + public bool Equals(GetAttributesAttributes input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Category == input.Category || + (this.Category != null && + this.Category.Equals(input.Category)) + ) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && + ( + this.Enumeration == input.Enumeration || + this.Enumeration != null && + this.Enumeration.SequenceEqual(input.Enumeration) + ) && + ( + this.CalculatedValue == input.CalculatedValue || + (this.CalculatedValue != null && + this.CalculatedValue.Equals(input.CalculatedValue)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Category != null) + hashCode = hashCode * 59 + this.Category.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.Enumeration != null) + hashCode = hashCode * 59 + this.Enumeration.GetHashCode(); + if (this.CalculatedValue != null) + hashCode = hashCode * 59 + this.CalculatedValue.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetAttributesEnumeration.cs b/src/sib_api_v3_sdk/Model/GetAttributesEnumeration.cs new file mode 100644 index 0000000..d5124c1 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetAttributesEnumeration.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetAttributesEnumeration + /// + [DataContract] + public partial class GetAttributesEnumeration : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetAttributesEnumeration() { } + /// + /// Initializes a new instance of the class. + /// + /// ID of Value of the \"category\" type attribute (required). + /// Label of the \"category\" type attribute (required). + public GetAttributesEnumeration(long? value = default(long?), string label = default(string)) + { + // to ensure "value" is required (not null) + if (value == null) + { + throw new InvalidDataException("value is a required property for GetAttributesEnumeration and cannot be null"); + } + else + { + this.Value = value; + } + // to ensure "label" is required (not null) + if (label == null) + { + throw new InvalidDataException("label is a required property for GetAttributesEnumeration and cannot be null"); + } + else + { + this.Label = label; + } + } + + /// + /// ID of Value of the \"category\" type attribute + /// + /// ID of Value of the \"category\" type attribute + [DataMember(Name="value", EmitDefaultValue=false)] + public long? Value { get; set; } + + /// + /// Label of the \"category\" type attribute + /// + /// Label of the \"category\" type attribute + [DataMember(Name="label", EmitDefaultValue=false)] + public string Label { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetAttributesEnumeration {\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" Label: ").Append(Label).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetAttributesEnumeration); + } + + /// + /// Returns true if GetAttributesEnumeration instances are equal + /// + /// Instance of GetAttributesEnumeration to be compared + /// Boolean + public bool Equals(GetAttributesEnumeration input) + { + if (input == null) + return false; + + return + ( + this.Value == input.Value || + (this.Value != null && + this.Value.Equals(input.Value)) + ) && + ( + this.Label == input.Label || + (this.Label != null && + this.Label.Equals(input.Label)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Value != null) + hashCode = hashCode * 59 + this.Value.GetHashCode(); + if (this.Label != null) + hashCode = hashCode * 59 + this.Label.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetCampaignOverview.cs b/src/sib_api_v3_sdk/Model/GetCampaignOverview.cs new file mode 100644 index 0000000..dea1619 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetCampaignOverview.cs @@ -0,0 +1,432 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetCampaignOverview + /// + [DataContract] + public partial class GetCampaignOverview : IEquatable, IValidatableObject + { + /// + /// Type of campaign + /// + /// Type of campaign + [JsonConverter(typeof(StringEnumConverter))] + public enum TypeEnum + { + + /// + /// Enum Classic for value: classic + /// + [EnumMember(Value = "classic")] + Classic = 1, + + /// + /// Enum Trigger for value: trigger + /// + [EnumMember(Value = "trigger")] + Trigger = 2 + } + + /// + /// Type of campaign + /// + /// Type of campaign + [DataMember(Name="type", EmitDefaultValue=false)] + public TypeEnum Type { get; set; } + /// + /// Status of the campaign + /// + /// Status of the campaign + [JsonConverter(typeof(StringEnumConverter))] + public enum StatusEnum + { + + /// + /// Enum Draft for value: draft + /// + [EnumMember(Value = "draft")] + Draft = 1, + + /// + /// Enum Sent for value: sent + /// + [EnumMember(Value = "sent")] + Sent = 2, + + /// + /// Enum Archive for value: archive + /// + [EnumMember(Value = "archive")] + Archive = 3, + + /// + /// Enum Queued for value: queued + /// + [EnumMember(Value = "queued")] + Queued = 4, + + /// + /// Enum Suspended for value: suspended + /// + [EnumMember(Value = "suspended")] + Suspended = 5, + + /// + /// Enum Inprocess for value: in_process + /// + [EnumMember(Value = "in_process")] + Inprocess = 6 + } + + /// + /// Status of the campaign + /// + /// Status of the campaign + [DataMember(Name="status", EmitDefaultValue=false)] + public StatusEnum Status { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetCampaignOverview() { } + /// + /// Initializes a new instance of the class. + /// + /// ID of the campaign (required). + /// Name of the campaign (required). + /// Subject of the campaign. Only available if `abTesting` flag of the campaign is `false`. + /// Type of campaign (required). + /// Status of the campaign (required). + /// UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ). + /// Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled.. + /// Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true`. + /// Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true`. + /// The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true`. + /// Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true`. + /// The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true`. + /// It is true if you have chosen to send your campaign at best time, otherwise it is false. + public GetCampaignOverview(long? id = default(long?), string name = default(string), string subject = default(string), TypeEnum type = default(TypeEnum), StatusEnum status = default(StatusEnum), DateTime? scheduledAt = default(DateTime?), bool? abTesting = default(bool?), string subjectA = default(string), string subjectB = default(string), int? splitRule = default(int?), string winnerCriteria = default(string), int? winnerDelay = default(int?), bool? sendAtBestTime = default(bool?)) + { + // to ensure "id" is required (not null) + if (id == null) + { + throw new InvalidDataException("id is a required property for GetCampaignOverview and cannot be null"); + } + else + { + this.Id = id; + } + // to ensure "name" is required (not null) + if (name == null) + { + throw new InvalidDataException("name is a required property for GetCampaignOverview and cannot be null"); + } + else + { + this.Name = name; + } + // to ensure "type" is required (not null) + if (type == null) + { + throw new InvalidDataException("type is a required property for GetCampaignOverview and cannot be null"); + } + else + { + this.Type = type; + } + // to ensure "status" is required (not null) + if (status == null) + { + throw new InvalidDataException("status is a required property for GetCampaignOverview and cannot be null"); + } + else + { + this.Status = status; + } + this.Subject = subject; + this.ScheduledAt = scheduledAt; + this.AbTesting = abTesting; + this.SubjectA = subjectA; + this.SubjectB = subjectB; + this.SplitRule = splitRule; + this.WinnerCriteria = winnerCriteria; + this.WinnerDelay = winnerDelay; + this.SendAtBestTime = sendAtBestTime; + } + + /// + /// ID of the campaign + /// + /// ID of the campaign + [DataMember(Name="id", EmitDefaultValue=false)] + public long? Id { get; set; } + + /// + /// Name of the campaign + /// + /// Name of the campaign + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Subject of the campaign. Only available if `abTesting` flag of the campaign is `false` + /// + /// Subject of the campaign. Only available if `abTesting` flag of the campaign is `false` + [DataMember(Name="subject", EmitDefaultValue=false)] + public string Subject { get; set; } + + + + /// + /// UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) + /// + /// UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) + [DataMember(Name="scheduledAt", EmitDefaultValue=false)] + public DateTime? ScheduledAt { get; set; } + + /// + /// Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled. + /// + /// Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled. + [DataMember(Name="abTesting", EmitDefaultValue=false)] + public bool? AbTesting { get; set; } + + /// + /// Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` + /// + /// Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` + [DataMember(Name="subjectA", EmitDefaultValue=false)] + public string SubjectA { get; set; } + + /// + /// Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` + /// + /// Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` + [DataMember(Name="subjectB", EmitDefaultValue=false)] + public string SubjectB { get; set; } + + /// + /// The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true` + /// + /// The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true` + [DataMember(Name="splitRule", EmitDefaultValue=false)] + public int? SplitRule { get; set; } + + /// + /// Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true` + /// + /// Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true` + [DataMember(Name="winnerCriteria", EmitDefaultValue=false)] + public string WinnerCriteria { get; set; } + + /// + /// The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true` + /// + /// The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true` + [DataMember(Name="winnerDelay", EmitDefaultValue=false)] + public int? WinnerDelay { get; set; } + + /// + /// It is true if you have chosen to send your campaign at best time, otherwise it is false + /// + /// It is true if you have chosen to send your campaign at best time, otherwise it is false + [DataMember(Name="sendAtBestTime", EmitDefaultValue=false)] + public bool? SendAtBestTime { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetCampaignOverview {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" ScheduledAt: ").Append(ScheduledAt).Append("\n"); + sb.Append(" AbTesting: ").Append(AbTesting).Append("\n"); + sb.Append(" SubjectA: ").Append(SubjectA).Append("\n"); + sb.Append(" SubjectB: ").Append(SubjectB).Append("\n"); + sb.Append(" SplitRule: ").Append(SplitRule).Append("\n"); + sb.Append(" WinnerCriteria: ").Append(WinnerCriteria).Append("\n"); + sb.Append(" WinnerDelay: ").Append(WinnerDelay).Append("\n"); + sb.Append(" SendAtBestTime: ").Append(SendAtBestTime).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetCampaignOverview); + } + + /// + /// Returns true if GetCampaignOverview instances are equal + /// + /// Instance of GetCampaignOverview to be compared + /// Boolean + public bool Equals(GetCampaignOverview input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ) && + ( + this.ScheduledAt == input.ScheduledAt || + (this.ScheduledAt != null && + this.ScheduledAt.Equals(input.ScheduledAt)) + ) && + ( + this.AbTesting == input.AbTesting || + (this.AbTesting != null && + this.AbTesting.Equals(input.AbTesting)) + ) && + ( + this.SubjectA == input.SubjectA || + (this.SubjectA != null && + this.SubjectA.Equals(input.SubjectA)) + ) && + ( + this.SubjectB == input.SubjectB || + (this.SubjectB != null && + this.SubjectB.Equals(input.SubjectB)) + ) && + ( + this.SplitRule == input.SplitRule || + (this.SplitRule != null && + this.SplitRule.Equals(input.SplitRule)) + ) && + ( + this.WinnerCriteria == input.WinnerCriteria || + (this.WinnerCriteria != null && + this.WinnerCriteria.Equals(input.WinnerCriteria)) + ) && + ( + this.WinnerDelay == input.WinnerDelay || + (this.WinnerDelay != null && + this.WinnerDelay.Equals(input.WinnerDelay)) + ) && + ( + this.SendAtBestTime == input.SendAtBestTime || + (this.SendAtBestTime != null && + this.SendAtBestTime.Equals(input.SendAtBestTime)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Subject != null) + hashCode = hashCode * 59 + this.Subject.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + if (this.ScheduledAt != null) + hashCode = hashCode * 59 + this.ScheduledAt.GetHashCode(); + if (this.AbTesting != null) + hashCode = hashCode * 59 + this.AbTesting.GetHashCode(); + if (this.SubjectA != null) + hashCode = hashCode * 59 + this.SubjectA.GetHashCode(); + if (this.SubjectB != null) + hashCode = hashCode * 59 + this.SubjectB.GetHashCode(); + if (this.SplitRule != null) + hashCode = hashCode * 59 + this.SplitRule.GetHashCode(); + if (this.WinnerCriteria != null) + hashCode = hashCode * 59 + this.WinnerCriteria.GetHashCode(); + if (this.WinnerDelay != null) + hashCode = hashCode * 59 + this.WinnerDelay.GetHashCode(); + if (this.SendAtBestTime != null) + hashCode = hashCode * 59 + this.SendAtBestTime.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetCampaignRecipients.cs b/src/sib_api_v3_sdk/Model/GetCampaignRecipients.cs new file mode 100644 index 0000000..62d3369 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetCampaignRecipients.cs @@ -0,0 +1,161 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetCampaignRecipients + /// + [DataContract] + public partial class GetCampaignRecipients : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetCampaignRecipients() { } + /// + /// Initializes a new instance of the class. + /// + /// lists (required). + /// exclusionLists (required). + public GetCampaignRecipients(List lists = default(List), List exclusionLists = default(List)) + { + // to ensure "lists" is required (not null) + if (lists == null) + { + throw new InvalidDataException("lists is a required property for GetCampaignRecipients and cannot be null"); + } + else + { + this.Lists = lists; + } + // to ensure "exclusionLists" is required (not null) + if (exclusionLists == null) + { + throw new InvalidDataException("exclusionLists is a required property for GetCampaignRecipients and cannot be null"); + } + else + { + this.ExclusionLists = exclusionLists; + } + } + + /// + /// Gets or Sets Lists + /// + [DataMember(Name="lists", EmitDefaultValue=false)] + public List Lists { get; set; } + + /// + /// Gets or Sets ExclusionLists + /// + [DataMember(Name="exclusionLists", EmitDefaultValue=false)] + public List ExclusionLists { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetCampaignRecipients {\n"); + sb.Append(" Lists: ").Append(Lists).Append("\n"); + sb.Append(" ExclusionLists: ").Append(ExclusionLists).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetCampaignRecipients); + } + + /// + /// Returns true if GetCampaignRecipients instances are equal + /// + /// Instance of GetCampaignRecipients to be compared + /// Boolean + public bool Equals(GetCampaignRecipients input) + { + if (input == null) + return false; + + return + ( + this.Lists == input.Lists || + this.Lists != null && + this.Lists.SequenceEqual(input.Lists) + ) && + ( + this.ExclusionLists == input.ExclusionLists || + this.ExclusionLists != null && + this.ExclusionLists.SequenceEqual(input.ExclusionLists) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Lists != null) + hashCode = hashCode * 59 + this.Lists.GetHashCode(); + if (this.ExclusionLists != null) + hashCode = hashCode * 59 + this.ExclusionLists.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetCampaignStats.cs b/src/sib_api_v3_sdk/Model/GetCampaignStats.cs new file mode 100644 index 0000000..1c1195c --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetCampaignStats.cs @@ -0,0 +1,397 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetCampaignStats + /// + [DataContract] + public partial class GetCampaignStats : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetCampaignStats() { } + /// + /// Initializes a new instance of the class. + /// + /// List Id of email campaign (only in case of get email campaign(s)(not for global stats)). + /// Number of unique clicks for the campaign (required). + /// Number of total clicks for the campaign (required). + /// Number of complaints (Spam reports) for the campaign (required). + /// Number of delivered emails for the campaign (required). + /// Number of sent emails for the campaign (required). + /// Number of softbounce for the campaign (required). + /// Number of harbounce for the campaign (required). + /// Number of unique openings for the campaign (required). + /// Number of unsubscription for the campaign (required). + /// Number of openings for the campaign (required). + /// Number of deferred emails for the campaign. + public GetCampaignStats(long? listId = default(long?), long? uniqueClicks = default(long?), long? clickers = default(long?), long? complaints = default(long?), long? delivered = default(long?), long? sent = default(long?), long? softBounces = default(long?), long? hardBounces = default(long?), long? uniqueViews = default(long?), long? unsubscriptions = default(long?), long? viewed = default(long?), long? deferred = default(long?)) + { + // to ensure "uniqueClicks" is required (not null) + if (uniqueClicks == null) + { + throw new InvalidDataException("uniqueClicks is a required property for GetCampaignStats and cannot be null"); + } + else + { + this.UniqueClicks = uniqueClicks; + } + // to ensure "clickers" is required (not null) + if (clickers == null) + { + throw new InvalidDataException("clickers is a required property for GetCampaignStats and cannot be null"); + } + else + { + this.Clickers = clickers; + } + // to ensure "complaints" is required (not null) + if (complaints == null) + { + throw new InvalidDataException("complaints is a required property for GetCampaignStats and cannot be null"); + } + else + { + this.Complaints = complaints; + } + // to ensure "delivered" is required (not null) + if (delivered == null) + { + throw new InvalidDataException("delivered is a required property for GetCampaignStats and cannot be null"); + } + else + { + this.Delivered = delivered; + } + // to ensure "sent" is required (not null) + if (sent == null) + { + throw new InvalidDataException("sent is a required property for GetCampaignStats and cannot be null"); + } + else + { + this.Sent = sent; + } + // to ensure "softBounces" is required (not null) + if (softBounces == null) + { + throw new InvalidDataException("softBounces is a required property for GetCampaignStats and cannot be null"); + } + else + { + this.SoftBounces = softBounces; + } + // to ensure "hardBounces" is required (not null) + if (hardBounces == null) + { + throw new InvalidDataException("hardBounces is a required property for GetCampaignStats and cannot be null"); + } + else + { + this.HardBounces = hardBounces; + } + // to ensure "uniqueViews" is required (not null) + if (uniqueViews == null) + { + throw new InvalidDataException("uniqueViews is a required property for GetCampaignStats and cannot be null"); + } + else + { + this.UniqueViews = uniqueViews; + } + // to ensure "unsubscriptions" is required (not null) + if (unsubscriptions == null) + { + throw new InvalidDataException("unsubscriptions is a required property for GetCampaignStats and cannot be null"); + } + else + { + this.Unsubscriptions = unsubscriptions; + } + // to ensure "viewed" is required (not null) + if (viewed == null) + { + throw new InvalidDataException("viewed is a required property for GetCampaignStats and cannot be null"); + } + else + { + this.Viewed = viewed; + } + this.ListId = listId; + this.Deferred = deferred; + } + + /// + /// List Id of email campaign (only in case of get email campaign(s)(not for global stats)) + /// + /// List Id of email campaign (only in case of get email campaign(s)(not for global stats)) + [DataMember(Name="listId", EmitDefaultValue=false)] + public long? ListId { get; set; } + + /// + /// Number of unique clicks for the campaign + /// + /// Number of unique clicks for the campaign + [DataMember(Name="uniqueClicks", EmitDefaultValue=false)] + public long? UniqueClicks { get; set; } + + /// + /// Number of total clicks for the campaign + /// + /// Number of total clicks for the campaign + [DataMember(Name="clickers", EmitDefaultValue=false)] + public long? Clickers { get; set; } + + /// + /// Number of complaints (Spam reports) for the campaign + /// + /// Number of complaints (Spam reports) for the campaign + [DataMember(Name="complaints", EmitDefaultValue=false)] + public long? Complaints { get; set; } + + /// + /// Number of delivered emails for the campaign + /// + /// Number of delivered emails for the campaign + [DataMember(Name="delivered", EmitDefaultValue=false)] + public long? Delivered { get; set; } + + /// + /// Number of sent emails for the campaign + /// + /// Number of sent emails for the campaign + [DataMember(Name="sent", EmitDefaultValue=false)] + public long? Sent { get; set; } + + /// + /// Number of softbounce for the campaign + /// + /// Number of softbounce for the campaign + [DataMember(Name="softBounces", EmitDefaultValue=false)] + public long? SoftBounces { get; set; } + + /// + /// Number of harbounce for the campaign + /// + /// Number of harbounce for the campaign + [DataMember(Name="hardBounces", EmitDefaultValue=false)] + public long? HardBounces { get; set; } + + /// + /// Number of unique openings for the campaign + /// + /// Number of unique openings for the campaign + [DataMember(Name="uniqueViews", EmitDefaultValue=false)] + public long? UniqueViews { get; set; } + + /// + /// Number of unsubscription for the campaign + /// + /// Number of unsubscription for the campaign + [DataMember(Name="unsubscriptions", EmitDefaultValue=false)] + public long? Unsubscriptions { get; set; } + + /// + /// Number of openings for the campaign + /// + /// Number of openings for the campaign + [DataMember(Name="viewed", EmitDefaultValue=false)] + public long? Viewed { get; set; } + + /// + /// Number of deferred emails for the campaign + /// + /// Number of deferred emails for the campaign + [DataMember(Name="deferred", EmitDefaultValue=false)] + public long? Deferred { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetCampaignStats {\n"); + sb.Append(" ListId: ").Append(ListId).Append("\n"); + sb.Append(" UniqueClicks: ").Append(UniqueClicks).Append("\n"); + sb.Append(" Clickers: ").Append(Clickers).Append("\n"); + sb.Append(" Complaints: ").Append(Complaints).Append("\n"); + sb.Append(" Delivered: ").Append(Delivered).Append("\n"); + sb.Append(" Sent: ").Append(Sent).Append("\n"); + sb.Append(" SoftBounces: ").Append(SoftBounces).Append("\n"); + sb.Append(" HardBounces: ").Append(HardBounces).Append("\n"); + sb.Append(" UniqueViews: ").Append(UniqueViews).Append("\n"); + sb.Append(" Unsubscriptions: ").Append(Unsubscriptions).Append("\n"); + sb.Append(" Viewed: ").Append(Viewed).Append("\n"); + sb.Append(" Deferred: ").Append(Deferred).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetCampaignStats); + } + + /// + /// Returns true if GetCampaignStats instances are equal + /// + /// Instance of GetCampaignStats to be compared + /// Boolean + public bool Equals(GetCampaignStats input) + { + if (input == null) + return false; + + return + ( + this.ListId == input.ListId || + (this.ListId != null && + this.ListId.Equals(input.ListId)) + ) && + ( + this.UniqueClicks == input.UniqueClicks || + (this.UniqueClicks != null && + this.UniqueClicks.Equals(input.UniqueClicks)) + ) && + ( + this.Clickers == input.Clickers || + (this.Clickers != null && + this.Clickers.Equals(input.Clickers)) + ) && + ( + this.Complaints == input.Complaints || + (this.Complaints != null && + this.Complaints.Equals(input.Complaints)) + ) && + ( + this.Delivered == input.Delivered || + (this.Delivered != null && + this.Delivered.Equals(input.Delivered)) + ) && + ( + this.Sent == input.Sent || + (this.Sent != null && + this.Sent.Equals(input.Sent)) + ) && + ( + this.SoftBounces == input.SoftBounces || + (this.SoftBounces != null && + this.SoftBounces.Equals(input.SoftBounces)) + ) && + ( + this.HardBounces == input.HardBounces || + (this.HardBounces != null && + this.HardBounces.Equals(input.HardBounces)) + ) && + ( + this.UniqueViews == input.UniqueViews || + (this.UniqueViews != null && + this.UniqueViews.Equals(input.UniqueViews)) + ) && + ( + this.Unsubscriptions == input.Unsubscriptions || + (this.Unsubscriptions != null && + this.Unsubscriptions.Equals(input.Unsubscriptions)) + ) && + ( + this.Viewed == input.Viewed || + (this.Viewed != null && + this.Viewed.Equals(input.Viewed)) + ) && + ( + this.Deferred == input.Deferred || + (this.Deferred != null && + this.Deferred.Equals(input.Deferred)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ListId != null) + hashCode = hashCode * 59 + this.ListId.GetHashCode(); + if (this.UniqueClicks != null) + hashCode = hashCode * 59 + this.UniqueClicks.GetHashCode(); + if (this.Clickers != null) + hashCode = hashCode * 59 + this.Clickers.GetHashCode(); + if (this.Complaints != null) + hashCode = hashCode * 59 + this.Complaints.GetHashCode(); + if (this.Delivered != null) + hashCode = hashCode * 59 + this.Delivered.GetHashCode(); + if (this.Sent != null) + hashCode = hashCode * 59 + this.Sent.GetHashCode(); + if (this.SoftBounces != null) + hashCode = hashCode * 59 + this.SoftBounces.GetHashCode(); + if (this.HardBounces != null) + hashCode = hashCode * 59 + this.HardBounces.GetHashCode(); + if (this.UniqueViews != null) + hashCode = hashCode * 59 + this.UniqueViews.GetHashCode(); + if (this.Unsubscriptions != null) + hashCode = hashCode * 59 + this.Unsubscriptions.GetHashCode(); + if (this.Viewed != null) + hashCode = hashCode * 59 + this.Viewed.GetHashCode(); + if (this.Deferred != null) + hashCode = hashCode * 59 + this.Deferred.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetChildInfo.cs b/src/sib_api_v3_sdk/Model/GetChildInfo.cs new file mode 100644 index 0000000..a96f8b2 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetChildInfo.cs @@ -0,0 +1,303 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetChildInfo + /// + [DataContract] + public partial class GetChildInfo : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetChildInfo() { } + /// + /// Initializes a new instance of the class. + /// + /// Login Email (required). + /// First Name (required). + /// Last Name (required). + /// Name of the company (required). + /// credits. + /// statistics. + /// The encrypted password of child account (required). + /// IP(s) associated to a child account user. + /// apiKeys. + public GetChildInfo(string email = default(string), string firstName = default(string), string lastName = default(string), string companyName = default(string), GetChildInfoCredits credits = default(GetChildInfoCredits), GetChildInfoStatistics statistics = default(GetChildInfoStatistics), string password = default(string), List ips = default(List), GetChildInfoApiKeys apiKeys = default(GetChildInfoApiKeys)) + { + // to ensure "email" is required (not null) + if (email == null) + { + throw new InvalidDataException("email is a required property for GetChildInfo and cannot be null"); + } + else + { + this.Email = email; + } + // to ensure "firstName" is required (not null) + if (firstName == null) + { + throw new InvalidDataException("firstName is a required property for GetChildInfo and cannot be null"); + } + else + { + this.FirstName = firstName; + } + // to ensure "lastName" is required (not null) + if (lastName == null) + { + throw new InvalidDataException("lastName is a required property for GetChildInfo and cannot be null"); + } + else + { + this.LastName = lastName; + } + // to ensure "companyName" is required (not null) + if (companyName == null) + { + throw new InvalidDataException("companyName is a required property for GetChildInfo and cannot be null"); + } + else + { + this.CompanyName = companyName; + } + // to ensure "password" is required (not null) + if (password == null) + { + throw new InvalidDataException("password is a required property for GetChildInfo and cannot be null"); + } + else + { + this.Password = password; + } + this.Credits = credits; + this.Statistics = statistics; + this.Ips = ips; + this.ApiKeys = apiKeys; + } + + /// + /// Login Email + /// + /// Login Email + [DataMember(Name="email", EmitDefaultValue=false)] + public string Email { get; set; } + + /// + /// First Name + /// + /// First Name + [DataMember(Name="firstName", EmitDefaultValue=false)] + public string FirstName { get; set; } + + /// + /// Last Name + /// + /// Last Name + [DataMember(Name="lastName", EmitDefaultValue=false)] + public string LastName { get; set; } + + /// + /// Name of the company + /// + /// Name of the company + [DataMember(Name="companyName", EmitDefaultValue=false)] + public string CompanyName { get; set; } + + /// + /// Gets or Sets Credits + /// + [DataMember(Name="credits", EmitDefaultValue=false)] + public GetChildInfoCredits Credits { get; set; } + + /// + /// Gets or Sets Statistics + /// + [DataMember(Name="statistics", EmitDefaultValue=false)] + public GetChildInfoStatistics Statistics { get; set; } + + /// + /// The encrypted password of child account + /// + /// The encrypted password of child account + [DataMember(Name="password", EmitDefaultValue=false)] + public string Password { get; set; } + + /// + /// IP(s) associated to a child account user + /// + /// IP(s) associated to a child account user + [DataMember(Name="ips", EmitDefaultValue=false)] + public List Ips { get; set; } + + /// + /// Gets or Sets ApiKeys + /// + [DataMember(Name="apiKeys", EmitDefaultValue=false)] + public GetChildInfoApiKeys ApiKeys { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetChildInfo {\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" FirstName: ").Append(FirstName).Append("\n"); + sb.Append(" LastName: ").Append(LastName).Append("\n"); + sb.Append(" CompanyName: ").Append(CompanyName).Append("\n"); + sb.Append(" Credits: ").Append(Credits).Append("\n"); + sb.Append(" Statistics: ").Append(Statistics).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append(" Ips: ").Append(Ips).Append("\n"); + sb.Append(" ApiKeys: ").Append(ApiKeys).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetChildInfo); + } + + /// + /// Returns true if GetChildInfo instances are equal + /// + /// Instance of GetChildInfo to be compared + /// Boolean + public bool Equals(GetChildInfo input) + { + if (input == null) + return false; + + return + ( + this.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ) && + ( + this.FirstName == input.FirstName || + (this.FirstName != null && + this.FirstName.Equals(input.FirstName)) + ) && + ( + this.LastName == input.LastName || + (this.LastName != null && + this.LastName.Equals(input.LastName)) + ) && + ( + this.CompanyName == input.CompanyName || + (this.CompanyName != null && + this.CompanyName.Equals(input.CompanyName)) + ) && + ( + this.Credits == input.Credits || + (this.Credits != null && + this.Credits.Equals(input.Credits)) + ) && + ( + this.Statistics == input.Statistics || + (this.Statistics != null && + this.Statistics.Equals(input.Statistics)) + ) && + ( + this.Password == input.Password || + (this.Password != null && + this.Password.Equals(input.Password)) + ) && + ( + this.Ips == input.Ips || + this.Ips != null && + this.Ips.SequenceEqual(input.Ips) + ) && + ( + this.ApiKeys == input.ApiKeys || + (this.ApiKeys != null && + this.ApiKeys.Equals(input.ApiKeys)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Email != null) + hashCode = hashCode * 59 + this.Email.GetHashCode(); + if (this.FirstName != null) + hashCode = hashCode * 59 + this.FirstName.GetHashCode(); + if (this.LastName != null) + hashCode = hashCode * 59 + this.LastName.GetHashCode(); + if (this.CompanyName != null) + hashCode = hashCode * 59 + this.CompanyName.GetHashCode(); + if (this.Credits != null) + hashCode = hashCode * 59 + this.Credits.GetHashCode(); + if (this.Statistics != null) + hashCode = hashCode * 59 + this.Statistics.GetHashCode(); + if (this.Password != null) + hashCode = hashCode * 59 + this.Password.GetHashCode(); + if (this.Ips != null) + hashCode = hashCode * 59 + this.Ips.GetHashCode(); + if (this.ApiKeys != null) + hashCode = hashCode * 59 + this.ApiKeys.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetChildInfoApiKeys.cs b/src/sib_api_v3_sdk/Model/GetChildInfoApiKeys.cs new file mode 100644 index 0000000..24c07d8 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetChildInfoApiKeys.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// API Keys associated to child account + /// + [DataContract] + public partial class GetChildInfoApiKeys : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetChildInfoApiKeys() { } + /// + /// Initializes a new instance of the class. + /// + /// v2 (required). + /// v3. + public GetChildInfoApiKeys(List v2 = default(List), List v3 = default(List)) + { + // to ensure "v2" is required (not null) + if (v2 == null) + { + throw new InvalidDataException("v2 is a required property for GetChildInfoApiKeys and cannot be null"); + } + else + { + this.V2 = v2; + } + this.V3 = v3; + } + + /// + /// Gets or Sets V2 + /// + [DataMember(Name="v2", EmitDefaultValue=false)] + public List V2 { get; set; } + + /// + /// Gets or Sets V3 + /// + [DataMember(Name="v3", EmitDefaultValue=false)] + public List V3 { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetChildInfoApiKeys {\n"); + sb.Append(" V2: ").Append(V2).Append("\n"); + sb.Append(" V3: ").Append(V3).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetChildInfoApiKeys); + } + + /// + /// Returns true if GetChildInfoApiKeys instances are equal + /// + /// Instance of GetChildInfoApiKeys to be compared + /// Boolean + public bool Equals(GetChildInfoApiKeys input) + { + if (input == null) + return false; + + return + ( + this.V2 == input.V2 || + this.V2 != null && + this.V2.SequenceEqual(input.V2) + ) && + ( + this.V3 == input.V3 || + this.V3 != null && + this.V3.SequenceEqual(input.V3) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.V2 != null) + hashCode = hashCode * 59 + this.V2.GetHashCode(); + if (this.V3 != null) + hashCode = hashCode * 59 + this.V3.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetChildInfoApiKeysV2.cs b/src/sib_api_v3_sdk/Model/GetChildInfoApiKeysV2.cs new file mode 100644 index 0000000..dd64ae1 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetChildInfoApiKeysV2.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetChildInfoApiKeysV2 + /// + [DataContract] + public partial class GetChildInfoApiKeysV2 : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetChildInfoApiKeysV2() { } + /// + /// Initializes a new instance of the class. + /// + /// Name of the key for version 2 (required). + /// API Key for version 2 (required). + public GetChildInfoApiKeysV2(string name = default(string), string key = default(string)) + { + // to ensure "name" is required (not null) + if (name == null) + { + throw new InvalidDataException("name is a required property for GetChildInfoApiKeysV2 and cannot be null"); + } + else + { + this.Name = name; + } + // to ensure "key" is required (not null) + if (key == null) + { + throw new InvalidDataException("key is a required property for GetChildInfoApiKeysV2 and cannot be null"); + } + else + { + this.Key = key; + } + } + + /// + /// Name of the key for version 2 + /// + /// Name of the key for version 2 + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// API Key for version 2 + /// + /// API Key for version 2 + [DataMember(Name="key", EmitDefaultValue=false)] + public string Key { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetChildInfoApiKeysV2 {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Key: ").Append(Key).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetChildInfoApiKeysV2); + } + + /// + /// Returns true if GetChildInfoApiKeysV2 instances are equal + /// + /// Instance of GetChildInfoApiKeysV2 to be compared + /// Boolean + public bool Equals(GetChildInfoApiKeysV2 input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Key == input.Key || + (this.Key != null && + this.Key.Equals(input.Key)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Key != null) + hashCode = hashCode * 59 + this.Key.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetChildInfoApiKeysV3.cs b/src/sib_api_v3_sdk/Model/GetChildInfoApiKeysV3.cs new file mode 100644 index 0000000..47fee1a --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetChildInfoApiKeysV3.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetChildInfoApiKeysV3 + /// + [DataContract] + public partial class GetChildInfoApiKeysV3 : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetChildInfoApiKeysV3() { } + /// + /// Initializes a new instance of the class. + /// + /// Name of the key for version 3 (required). + /// API Key for version 3 (required). + public GetChildInfoApiKeysV3(string name = default(string), string key = default(string)) + { + // to ensure "name" is required (not null) + if (name == null) + { + throw new InvalidDataException("name is a required property for GetChildInfoApiKeysV3 and cannot be null"); + } + else + { + this.Name = name; + } + // to ensure "key" is required (not null) + if (key == null) + { + throw new InvalidDataException("key is a required property for GetChildInfoApiKeysV3 and cannot be null"); + } + else + { + this.Key = key; + } + } + + /// + /// Name of the key for version 3 + /// + /// Name of the key for version 3 + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// API Key for version 3 + /// + /// API Key for version 3 + [DataMember(Name="key", EmitDefaultValue=false)] + public string Key { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetChildInfoApiKeysV3 {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Key: ").Append(Key).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetChildInfoApiKeysV3); + } + + /// + /// Returns true if GetChildInfoApiKeysV3 instances are equal + /// + /// Instance of GetChildInfoApiKeysV3 to be compared + /// Boolean + public bool Equals(GetChildInfoApiKeysV3 input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Key == input.Key || + (this.Key != null && + this.Key.Equals(input.Key)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Key != null) + hashCode = hashCode * 59 + this.Key.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetChildInfoCredits.cs b/src/sib_api_v3_sdk/Model/GetChildInfoCredits.cs new file mode 100644 index 0000000..9e7c167 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetChildInfoCredits.cs @@ -0,0 +1,142 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// Credits available for your child + /// + [DataContract] + public partial class GetChildInfoCredits : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Email credits available for your child. + /// SMS credits available for your child. + public GetChildInfoCredits(long? emailCredits = default(long?), long? smsCredits = default(long?)) + { + this.EmailCredits = emailCredits; + this.SmsCredits = smsCredits; + } + + /// + /// Email credits available for your child + /// + /// Email credits available for your child + [DataMember(Name="emailCredits", EmitDefaultValue=false)] + public long? EmailCredits { get; set; } + + /// + /// SMS credits available for your child + /// + /// SMS credits available for your child + [DataMember(Name="smsCredits", EmitDefaultValue=false)] + public long? SmsCredits { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetChildInfoCredits {\n"); + sb.Append(" EmailCredits: ").Append(EmailCredits).Append("\n"); + sb.Append(" SmsCredits: ").Append(SmsCredits).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetChildInfoCredits); + } + + /// + /// Returns true if GetChildInfoCredits instances are equal + /// + /// Instance of GetChildInfoCredits to be compared + /// Boolean + public bool Equals(GetChildInfoCredits input) + { + if (input == null) + return false; + + return + ( + this.EmailCredits == input.EmailCredits || + (this.EmailCredits != null && + this.EmailCredits.Equals(input.EmailCredits)) + ) && + ( + this.SmsCredits == input.SmsCredits || + (this.SmsCredits != null && + this.SmsCredits.Equals(input.SmsCredits)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.EmailCredits != null) + hashCode = hashCode * 59 + this.EmailCredits.GetHashCode(); + if (this.SmsCredits != null) + hashCode = hashCode * 59 + this.SmsCredits.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetChildInfoStatistics.cs b/src/sib_api_v3_sdk/Model/GetChildInfoStatistics.cs new file mode 100644 index 0000000..14e8b80 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetChildInfoStatistics.cs @@ -0,0 +1,159 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// Statistics about your child account activity + /// + [DataContract] + public partial class GetChildInfoStatistics : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Overall emails sent for the previous month. + /// Overall emails sent for current month. + /// Overall emails sent for since the account exists. + public GetChildInfoStatistics(long? previousMonthTotalSent = default(long?), long? currentMonthTotalSent = default(long?), long? totalSent = default(long?)) + { + this.PreviousMonthTotalSent = previousMonthTotalSent; + this.CurrentMonthTotalSent = currentMonthTotalSent; + this.TotalSent = totalSent; + } + + /// + /// Overall emails sent for the previous month + /// + /// Overall emails sent for the previous month + [DataMember(Name="previousMonthTotalSent", EmitDefaultValue=false)] + public long? PreviousMonthTotalSent { get; set; } + + /// + /// Overall emails sent for current month + /// + /// Overall emails sent for current month + [DataMember(Name="currentMonthTotalSent", EmitDefaultValue=false)] + public long? CurrentMonthTotalSent { get; set; } + + /// + /// Overall emails sent for since the account exists + /// + /// Overall emails sent for since the account exists + [DataMember(Name="totalSent", EmitDefaultValue=false)] + public long? TotalSent { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetChildInfoStatistics {\n"); + sb.Append(" PreviousMonthTotalSent: ").Append(PreviousMonthTotalSent).Append("\n"); + sb.Append(" CurrentMonthTotalSent: ").Append(CurrentMonthTotalSent).Append("\n"); + sb.Append(" TotalSent: ").Append(TotalSent).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetChildInfoStatistics); + } + + /// + /// Returns true if GetChildInfoStatistics instances are equal + /// + /// Instance of GetChildInfoStatistics to be compared + /// Boolean + public bool Equals(GetChildInfoStatistics input) + { + if (input == null) + return false; + + return + ( + this.PreviousMonthTotalSent == input.PreviousMonthTotalSent || + (this.PreviousMonthTotalSent != null && + this.PreviousMonthTotalSent.Equals(input.PreviousMonthTotalSent)) + ) && + ( + this.CurrentMonthTotalSent == input.CurrentMonthTotalSent || + (this.CurrentMonthTotalSent != null && + this.CurrentMonthTotalSent.Equals(input.CurrentMonthTotalSent)) + ) && + ( + this.TotalSent == input.TotalSent || + (this.TotalSent != null && + this.TotalSent.Equals(input.TotalSent)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.PreviousMonthTotalSent != null) + hashCode = hashCode * 59 + this.PreviousMonthTotalSent.GetHashCode(); + if (this.CurrentMonthTotalSent != null) + hashCode = hashCode * 59 + this.CurrentMonthTotalSent.GetHashCode(); + if (this.TotalSent != null) + hashCode = hashCode * 59 + this.TotalSent.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetChildrenList.cs b/src/sib_api_v3_sdk/Model/GetChildrenList.cs new file mode 100644 index 0000000..7ca0027 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetChildrenList.cs @@ -0,0 +1,125 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetChildrenList + /// + [DataContract] + public partial class GetChildrenList : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Your children's account information. + public GetChildrenList(List children = default(List)) + { + this.Children = children; + } + + /// + /// Your children's account information + /// + /// Your children's account information + [DataMember(Name="children", EmitDefaultValue=false)] + public List Children { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetChildrenList {\n"); + sb.Append(" Children: ").Append(Children).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetChildrenList); + } + + /// + /// Returns true if GetChildrenList instances are equal + /// + /// Instance of GetChildrenList to be compared + /// Boolean + public bool Equals(GetChildrenList input) + { + if (input == null) + return false; + + return + ( + this.Children == input.Children || + this.Children != null && + this.Children.SequenceEqual(input.Children) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Children != null) + hashCode = hashCode * 59 + this.Children.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetClient.cs b/src/sib_api_v3_sdk/Model/GetClient.cs new file mode 100644 index 0000000..a6071c5 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetClient.cs @@ -0,0 +1,213 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetClient + /// + [DataContract] + public partial class GetClient : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetClient() { } + /// + /// Initializes a new instance of the class. + /// + /// Login Email (required). + /// First Name (required). + /// Last Name (required). + /// Name of the company (required). + public GetClient(string email = default(string), string firstName = default(string), string lastName = default(string), string companyName = default(string)) + { + // to ensure "email" is required (not null) + if (email == null) + { + throw new InvalidDataException("email is a required property for GetClient and cannot be null"); + } + else + { + this.Email = email; + } + // to ensure "firstName" is required (not null) + if (firstName == null) + { + throw new InvalidDataException("firstName is a required property for GetClient and cannot be null"); + } + else + { + this.FirstName = firstName; + } + // to ensure "lastName" is required (not null) + if (lastName == null) + { + throw new InvalidDataException("lastName is a required property for GetClient and cannot be null"); + } + else + { + this.LastName = lastName; + } + // to ensure "companyName" is required (not null) + if (companyName == null) + { + throw new InvalidDataException("companyName is a required property for GetClient and cannot be null"); + } + else + { + this.CompanyName = companyName; + } + } + + /// + /// Login Email + /// + /// Login Email + [DataMember(Name="email", EmitDefaultValue=false)] + public string Email { get; set; } + + /// + /// First Name + /// + /// First Name + [DataMember(Name="firstName", EmitDefaultValue=false)] + public string FirstName { get; set; } + + /// + /// Last Name + /// + /// Last Name + [DataMember(Name="lastName", EmitDefaultValue=false)] + public string LastName { get; set; } + + /// + /// Name of the company + /// + /// Name of the company + [DataMember(Name="companyName", EmitDefaultValue=false)] + public string CompanyName { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetClient {\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" FirstName: ").Append(FirstName).Append("\n"); + sb.Append(" LastName: ").Append(LastName).Append("\n"); + sb.Append(" CompanyName: ").Append(CompanyName).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetClient); + } + + /// + /// Returns true if GetClient instances are equal + /// + /// Instance of GetClient to be compared + /// Boolean + public bool Equals(GetClient input) + { + if (input == null) + return false; + + return + ( + this.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ) && + ( + this.FirstName == input.FirstName || + (this.FirstName != null && + this.FirstName.Equals(input.FirstName)) + ) && + ( + this.LastName == input.LastName || + (this.LastName != null && + this.LastName.Equals(input.LastName)) + ) && + ( + this.CompanyName == input.CompanyName || + (this.CompanyName != null && + this.CompanyName.Equals(input.CompanyName)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Email != null) + hashCode = hashCode * 59 + this.Email.GetHashCode(); + if (this.FirstName != null) + hashCode = hashCode * 59 + this.FirstName.GetHashCode(); + if (this.LastName != null) + hashCode = hashCode * 59 + this.LastName.GetHashCode(); + if (this.CompanyName != null) + hashCode = hashCode * 59 + this.CompanyName.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetContactCampaignStats.cs b/src/sib_api_v3_sdk/Model/GetContactCampaignStats.cs new file mode 100644 index 0000000..db09fde --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetContactCampaignStats.cs @@ -0,0 +1,236 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// Campaign Statistics for the contact + /// + [DataContract] + public partial class GetContactCampaignStats : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// messagesSent. + /// hardBounces. + /// softBounces. + /// complaints. + /// unsubscriptions. + /// opened. + /// clicked. + /// transacAttributes. + public GetContactCampaignStats(List messagesSent = default(List), List hardBounces = default(List), List softBounces = default(List), List complaints = default(List), GetContactCampaignStatsUnsubscriptions unsubscriptions = default(GetContactCampaignStatsUnsubscriptions), List opened = default(List), List clicked = default(List), List transacAttributes = default(List)) + { + this.MessagesSent = messagesSent; + this.HardBounces = hardBounces; + this.SoftBounces = softBounces; + this.Complaints = complaints; + this.Unsubscriptions = unsubscriptions; + this.Opened = opened; + this.Clicked = clicked; + this.TransacAttributes = transacAttributes; + } + + /// + /// Gets or Sets MessagesSent + /// + [DataMember(Name="messagesSent", EmitDefaultValue=false)] + public List MessagesSent { get; set; } + + /// + /// Gets or Sets HardBounces + /// + [DataMember(Name="hardBounces", EmitDefaultValue=false)] + public List HardBounces { get; set; } + + /// + /// Gets or Sets SoftBounces + /// + [DataMember(Name="softBounces", EmitDefaultValue=false)] + public List SoftBounces { get; set; } + + /// + /// Gets or Sets Complaints + /// + [DataMember(Name="complaints", EmitDefaultValue=false)] + public List Complaints { get; set; } + + /// + /// Gets or Sets Unsubscriptions + /// + [DataMember(Name="unsubscriptions", EmitDefaultValue=false)] + public GetContactCampaignStatsUnsubscriptions Unsubscriptions { get; set; } + + /// + /// Gets or Sets Opened + /// + [DataMember(Name="opened", EmitDefaultValue=false)] + public List Opened { get; set; } + + /// + /// Gets or Sets Clicked + /// + [DataMember(Name="clicked", EmitDefaultValue=false)] + public List Clicked { get; set; } + + /// + /// Gets or Sets TransacAttributes + /// + [DataMember(Name="transacAttributes", EmitDefaultValue=false)] + public List TransacAttributes { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetContactCampaignStats {\n"); + sb.Append(" MessagesSent: ").Append(MessagesSent).Append("\n"); + sb.Append(" HardBounces: ").Append(HardBounces).Append("\n"); + sb.Append(" SoftBounces: ").Append(SoftBounces).Append("\n"); + sb.Append(" Complaints: ").Append(Complaints).Append("\n"); + sb.Append(" Unsubscriptions: ").Append(Unsubscriptions).Append("\n"); + sb.Append(" Opened: ").Append(Opened).Append("\n"); + sb.Append(" Clicked: ").Append(Clicked).Append("\n"); + sb.Append(" TransacAttributes: ").Append(TransacAttributes).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetContactCampaignStats); + } + + /// + /// Returns true if GetContactCampaignStats instances are equal + /// + /// Instance of GetContactCampaignStats to be compared + /// Boolean + public bool Equals(GetContactCampaignStats input) + { + if (input == null) + return false; + + return + ( + this.MessagesSent == input.MessagesSent || + this.MessagesSent != null && + this.MessagesSent.SequenceEqual(input.MessagesSent) + ) && + ( + this.HardBounces == input.HardBounces || + this.HardBounces != null && + this.HardBounces.SequenceEqual(input.HardBounces) + ) && + ( + this.SoftBounces == input.SoftBounces || + this.SoftBounces != null && + this.SoftBounces.SequenceEqual(input.SoftBounces) + ) && + ( + this.Complaints == input.Complaints || + this.Complaints != null && + this.Complaints.SequenceEqual(input.Complaints) + ) && + ( + this.Unsubscriptions == input.Unsubscriptions || + (this.Unsubscriptions != null && + this.Unsubscriptions.Equals(input.Unsubscriptions)) + ) && + ( + this.Opened == input.Opened || + this.Opened != null && + this.Opened.SequenceEqual(input.Opened) + ) && + ( + this.Clicked == input.Clicked || + this.Clicked != null && + this.Clicked.SequenceEqual(input.Clicked) + ) && + ( + this.TransacAttributes == input.TransacAttributes || + this.TransacAttributes != null && + this.TransacAttributes.SequenceEqual(input.TransacAttributes) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.MessagesSent != null) + hashCode = hashCode * 59 + this.MessagesSent.GetHashCode(); + if (this.HardBounces != null) + hashCode = hashCode * 59 + this.HardBounces.GetHashCode(); + if (this.SoftBounces != null) + hashCode = hashCode * 59 + this.SoftBounces.GetHashCode(); + if (this.Complaints != null) + hashCode = hashCode * 59 + this.Complaints.GetHashCode(); + if (this.Unsubscriptions != null) + hashCode = hashCode * 59 + this.Unsubscriptions.GetHashCode(); + if (this.Opened != null) + hashCode = hashCode * 59 + this.Opened.GetHashCode(); + if (this.Clicked != null) + hashCode = hashCode * 59 + this.Clicked.GetHashCode(); + if (this.TransacAttributes != null) + hashCode = hashCode * 59 + this.TransacAttributes.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetContactCampaignStatsClicked.cs b/src/sib_api_v3_sdk/Model/GetContactCampaignStatsClicked.cs new file mode 100644 index 0000000..11f54d9 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetContactCampaignStatsClicked.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetContactCampaignStatsClicked + /// + [DataContract] + public partial class GetContactCampaignStatsClicked : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetContactCampaignStatsClicked() { } + /// + /// Initializes a new instance of the class. + /// + /// ID of the campaign which generated the event (required). + /// links (required). + public GetContactCampaignStatsClicked(long? campaignId = default(long?), List links = default(List)) + { + // to ensure "campaignId" is required (not null) + if (campaignId == null) + { + throw new InvalidDataException("campaignId is a required property for GetContactCampaignStatsClicked and cannot be null"); + } + else + { + this.CampaignId = campaignId; + } + // to ensure "links" is required (not null) + if (links == null) + { + throw new InvalidDataException("links is a required property for GetContactCampaignStatsClicked and cannot be null"); + } + else + { + this.Links = links; + } + } + + /// + /// ID of the campaign which generated the event + /// + /// ID of the campaign which generated the event + [DataMember(Name="campaignId", EmitDefaultValue=false)] + public long? CampaignId { get; set; } + + /// + /// Gets or Sets Links + /// + [DataMember(Name="links", EmitDefaultValue=false)] + public List Links { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetContactCampaignStatsClicked {\n"); + sb.Append(" CampaignId: ").Append(CampaignId).Append("\n"); + sb.Append(" Links: ").Append(Links).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetContactCampaignStatsClicked); + } + + /// + /// Returns true if GetContactCampaignStatsClicked instances are equal + /// + /// Instance of GetContactCampaignStatsClicked to be compared + /// Boolean + public bool Equals(GetContactCampaignStatsClicked input) + { + if (input == null) + return false; + + return + ( + this.CampaignId == input.CampaignId || + (this.CampaignId != null && + this.CampaignId.Equals(input.CampaignId)) + ) && + ( + this.Links == input.Links || + this.Links != null && + this.Links.SequenceEqual(input.Links) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.CampaignId != null) + hashCode = hashCode * 59 + this.CampaignId.GetHashCode(); + if (this.Links != null) + hashCode = hashCode * 59 + this.Links.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetContactCampaignStatsOpened.cs b/src/sib_api_v3_sdk/Model/GetContactCampaignStatsOpened.cs new file mode 100644 index 0000000..208081a --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetContactCampaignStatsOpened.cs @@ -0,0 +1,213 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetContactCampaignStatsOpened + /// + [DataContract] + public partial class GetContactCampaignStatsOpened : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetContactCampaignStatsOpened() { } + /// + /// Initializes a new instance of the class. + /// + /// ID of the campaign which generated the event (required). + /// Number of openings of the campaign (required). + /// UTC date-time of the event (required). + /// IP from which the user has opened the campaign (required). + public GetContactCampaignStatsOpened(long? campaignId = default(long?), long? count = default(long?), DateTime? eventTime = default(DateTime?), string ip = default(string)) + { + // to ensure "campaignId" is required (not null) + if (campaignId == null) + { + throw new InvalidDataException("campaignId is a required property for GetContactCampaignStatsOpened and cannot be null"); + } + else + { + this.CampaignId = campaignId; + } + // to ensure "count" is required (not null) + if (count == null) + { + throw new InvalidDataException("count is a required property for GetContactCampaignStatsOpened and cannot be null"); + } + else + { + this.Count = count; + } + // to ensure "eventTime" is required (not null) + if (eventTime == null) + { + throw new InvalidDataException("eventTime is a required property for GetContactCampaignStatsOpened and cannot be null"); + } + else + { + this.EventTime = eventTime; + } + // to ensure "ip" is required (not null) + if (ip == null) + { + throw new InvalidDataException("ip is a required property for GetContactCampaignStatsOpened and cannot be null"); + } + else + { + this.Ip = ip; + } + } + + /// + /// ID of the campaign which generated the event + /// + /// ID of the campaign which generated the event + [DataMember(Name="campaignId", EmitDefaultValue=false)] + public long? CampaignId { get; set; } + + /// + /// Number of openings of the campaign + /// + /// Number of openings of the campaign + [DataMember(Name="count", EmitDefaultValue=false)] + public long? Count { get; set; } + + /// + /// UTC date-time of the event + /// + /// UTC date-time of the event + [DataMember(Name="eventTime", EmitDefaultValue=false)] + public DateTime? EventTime { get; set; } + + /// + /// IP from which the user has opened the campaign + /// + /// IP from which the user has opened the campaign + [DataMember(Name="ip", EmitDefaultValue=false)] + public string Ip { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetContactCampaignStatsOpened {\n"); + sb.Append(" CampaignId: ").Append(CampaignId).Append("\n"); + sb.Append(" Count: ").Append(Count).Append("\n"); + sb.Append(" EventTime: ").Append(EventTime).Append("\n"); + sb.Append(" Ip: ").Append(Ip).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetContactCampaignStatsOpened); + } + + /// + /// Returns true if GetContactCampaignStatsOpened instances are equal + /// + /// Instance of GetContactCampaignStatsOpened to be compared + /// Boolean + public bool Equals(GetContactCampaignStatsOpened input) + { + if (input == null) + return false; + + return + ( + this.CampaignId == input.CampaignId || + (this.CampaignId != null && + this.CampaignId.Equals(input.CampaignId)) + ) && + ( + this.Count == input.Count || + (this.Count != null && + this.Count.Equals(input.Count)) + ) && + ( + this.EventTime == input.EventTime || + (this.EventTime != null && + this.EventTime.Equals(input.EventTime)) + ) && + ( + this.Ip == input.Ip || + (this.Ip != null && + this.Ip.Equals(input.Ip)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.CampaignId != null) + hashCode = hashCode * 59 + this.CampaignId.GetHashCode(); + if (this.Count != null) + hashCode = hashCode * 59 + this.Count.GetHashCode(); + if (this.EventTime != null) + hashCode = hashCode * 59 + this.EventTime.GetHashCode(); + if (this.Ip != null) + hashCode = hashCode * 59 + this.Ip.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetContactCampaignStatsTransacAttributes.cs b/src/sib_api_v3_sdk/Model/GetContactCampaignStatsTransacAttributes.cs new file mode 100644 index 0000000..0e43d86 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetContactCampaignStatsTransacAttributes.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetContactCampaignStatsTransacAttributes + /// + [DataContract] + public partial class GetContactCampaignStatsTransacAttributes : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetContactCampaignStatsTransacAttributes() { } + /// + /// Initializes a new instance of the class. + /// + /// Date of the order (required). + /// Price of the order (required). + /// ID of the order (required). + public GetContactCampaignStatsTransacAttributes(DateTime? orderDate = default(DateTime?), float? orderPrice = default(float?), long? orderId = default(long?)) + { + // to ensure "orderDate" is required (not null) + if (orderDate == null) + { + throw new InvalidDataException("orderDate is a required property for GetContactCampaignStatsTransacAttributes and cannot be null"); + } + else + { + this.OrderDate = orderDate; + } + // to ensure "orderPrice" is required (not null) + if (orderPrice == null) + { + throw new InvalidDataException("orderPrice is a required property for GetContactCampaignStatsTransacAttributes and cannot be null"); + } + else + { + this.OrderPrice = orderPrice; + } + // to ensure "orderId" is required (not null) + if (orderId == null) + { + throw new InvalidDataException("orderId is a required property for GetContactCampaignStatsTransacAttributes and cannot be null"); + } + else + { + this.OrderId = orderId; + } + } + + /// + /// Date of the order + /// + /// Date of the order + [DataMember(Name="orderDate", EmitDefaultValue=false)] + [JsonConverter(typeof(SwaggerDateConverter))] + public DateTime? OrderDate { get; set; } + + /// + /// Price of the order + /// + /// Price of the order + [DataMember(Name="orderPrice", EmitDefaultValue=false)] + public float? OrderPrice { get; set; } + + /// + /// ID of the order + /// + /// ID of the order + [DataMember(Name="orderId", EmitDefaultValue=false)] + public long? OrderId { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetContactCampaignStatsTransacAttributes {\n"); + sb.Append(" OrderDate: ").Append(OrderDate).Append("\n"); + sb.Append(" OrderPrice: ").Append(OrderPrice).Append("\n"); + sb.Append(" OrderId: ").Append(OrderId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetContactCampaignStatsTransacAttributes); + } + + /// + /// Returns true if GetContactCampaignStatsTransacAttributes instances are equal + /// + /// Instance of GetContactCampaignStatsTransacAttributes to be compared + /// Boolean + public bool Equals(GetContactCampaignStatsTransacAttributes input) + { + if (input == null) + return false; + + return + ( + this.OrderDate == input.OrderDate || + (this.OrderDate != null && + this.OrderDate.Equals(input.OrderDate)) + ) && + ( + this.OrderPrice == input.OrderPrice || + (this.OrderPrice != null && + this.OrderPrice.Equals(input.OrderPrice)) + ) && + ( + this.OrderId == input.OrderId || + (this.OrderId != null && + this.OrderId.Equals(input.OrderId)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.OrderDate != null) + hashCode = hashCode * 59 + this.OrderDate.GetHashCode(); + if (this.OrderPrice != null) + hashCode = hashCode * 59 + this.OrderPrice.GetHashCode(); + if (this.OrderId != null) + hashCode = hashCode * 59 + this.OrderId.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetContactCampaignStatsUnsubscriptions.cs b/src/sib_api_v3_sdk/Model/GetContactCampaignStatsUnsubscriptions.cs new file mode 100644 index 0000000..a7fd489 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetContactCampaignStatsUnsubscriptions.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetContactCampaignStatsUnsubscriptions + /// + [DataContract] + public partial class GetContactCampaignStatsUnsubscriptions : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetContactCampaignStatsUnsubscriptions() { } + /// + /// Initializes a new instance of the class. + /// + /// Contact has unsubscribed via the unsubscription link in the email (required). + /// Contact has been unsubscribed from the administrator (required). + public GetContactCampaignStatsUnsubscriptions(List userUnsubscription = default(List), List adminUnsubscription = default(List)) + { + // to ensure "userUnsubscription" is required (not null) + if (userUnsubscription == null) + { + throw new InvalidDataException("userUnsubscription is a required property for GetContactCampaignStatsUnsubscriptions and cannot be null"); + } + else + { + this.UserUnsubscription = userUnsubscription; + } + // to ensure "adminUnsubscription" is required (not null) + if (adminUnsubscription == null) + { + throw new InvalidDataException("adminUnsubscription is a required property for GetContactCampaignStatsUnsubscriptions and cannot be null"); + } + else + { + this.AdminUnsubscription = adminUnsubscription; + } + } + + /// + /// Contact has unsubscribed via the unsubscription link in the email + /// + /// Contact has unsubscribed via the unsubscription link in the email + [DataMember(Name="userUnsubscription", EmitDefaultValue=false)] + public List UserUnsubscription { get; set; } + + /// + /// Contact has been unsubscribed from the administrator + /// + /// Contact has been unsubscribed from the administrator + [DataMember(Name="adminUnsubscription", EmitDefaultValue=false)] + public List AdminUnsubscription { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetContactCampaignStatsUnsubscriptions {\n"); + sb.Append(" UserUnsubscription: ").Append(UserUnsubscription).Append("\n"); + sb.Append(" AdminUnsubscription: ").Append(AdminUnsubscription).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetContactCampaignStatsUnsubscriptions); + } + + /// + /// Returns true if GetContactCampaignStatsUnsubscriptions instances are equal + /// + /// Instance of GetContactCampaignStatsUnsubscriptions to be compared + /// Boolean + public bool Equals(GetContactCampaignStatsUnsubscriptions input) + { + if (input == null) + return false; + + return + ( + this.UserUnsubscription == input.UserUnsubscription || + this.UserUnsubscription != null && + this.UserUnsubscription.SequenceEqual(input.UserUnsubscription) + ) && + ( + this.AdminUnsubscription == input.AdminUnsubscription || + this.AdminUnsubscription != null && + this.AdminUnsubscription.SequenceEqual(input.AdminUnsubscription) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.UserUnsubscription != null) + hashCode = hashCode * 59 + this.UserUnsubscription.GetHashCode(); + if (this.AdminUnsubscription != null) + hashCode = hashCode * 59 + this.AdminUnsubscription.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetContactDetails.cs b/src/sib_api_v3_sdk/Model/GetContactDetails.cs new file mode 100644 index 0000000..e9d544b --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetContactDetails.cs @@ -0,0 +1,328 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetContactDetails + /// + [DataContract] + public partial class GetContactDetails : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetContactDetails() { } + /// + /// Initializes a new instance of the class. + /// + /// Email address of the contact for which you requested the details (required). + /// ID of the contact for which you requested the details (required). + /// Blacklist status for email campaigns (true=blacklisted, false=not blacklisted) (required). + /// Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted) (required). + /// Creation UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) (required). + /// Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) (required). + /// listIds (required). + /// listUnsubscribed. + /// Set of attributes of the contact (required). + public GetContactDetails(string email = default(string), long? id = default(long?), bool? emailBlacklisted = default(bool?), bool? smsBlacklisted = default(bool?), DateTime? createdAt = default(DateTime?), DateTime? modifiedAt = default(DateTime?), List listIds = default(List), List listUnsubscribed = default(List), Object attributes = default(Object)) + { + // to ensure "email" is required (not null) + if (email == null) + { + throw new InvalidDataException("email is a required property for GetContactDetails and cannot be null"); + } + else + { + this.Email = email; + } + // to ensure "id" is required (not null) + if (id == null) + { + throw new InvalidDataException("id is a required property for GetContactDetails and cannot be null"); + } + else + { + this.Id = id; + } + // to ensure "emailBlacklisted" is required (not null) + if (emailBlacklisted == null) + { + throw new InvalidDataException("emailBlacklisted is a required property for GetContactDetails and cannot be null"); + } + else + { + this.EmailBlacklisted = emailBlacklisted; + } + // to ensure "smsBlacklisted" is required (not null) + if (smsBlacklisted == null) + { + throw new InvalidDataException("smsBlacklisted is a required property for GetContactDetails and cannot be null"); + } + else + { + this.SmsBlacklisted = smsBlacklisted; + } + // to ensure "createdAt" is required (not null) + if (createdAt == null) + { + throw new InvalidDataException("createdAt is a required property for GetContactDetails and cannot be null"); + } + else + { + this.CreatedAt = createdAt; + } + // to ensure "modifiedAt" is required (not null) + if (modifiedAt == null) + { + throw new InvalidDataException("modifiedAt is a required property for GetContactDetails and cannot be null"); + } + else + { + this.ModifiedAt = modifiedAt; + } + // to ensure "listIds" is required (not null) + if (listIds == null) + { + throw new InvalidDataException("listIds is a required property for GetContactDetails and cannot be null"); + } + else + { + this.ListIds = listIds; + } + // to ensure "attributes" is required (not null) + if (attributes == null) + { + throw new InvalidDataException("attributes is a required property for GetContactDetails and cannot be null"); + } + else + { + this.Attributes = attributes; + } + this.ListUnsubscribed = listUnsubscribed; + } + + /// + /// Email address of the contact for which you requested the details + /// + /// Email address of the contact for which you requested the details + [DataMember(Name="email", EmitDefaultValue=false)] + public string Email { get; set; } + + /// + /// ID of the contact for which you requested the details + /// + /// ID of the contact for which you requested the details + [DataMember(Name="id", EmitDefaultValue=false)] + public long? Id { get; set; } + + /// + /// Blacklist status for email campaigns (true=blacklisted, false=not blacklisted) + /// + /// Blacklist status for email campaigns (true=blacklisted, false=not blacklisted) + [DataMember(Name="emailBlacklisted", EmitDefaultValue=false)] + public bool? EmailBlacklisted { get; set; } + + /// + /// Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted) + /// + /// Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted) + [DataMember(Name="smsBlacklisted", EmitDefaultValue=false)] + public bool? SmsBlacklisted { get; set; } + + /// + /// Creation UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) + /// + /// Creation UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) + [DataMember(Name="createdAt", EmitDefaultValue=false)] + public DateTime? CreatedAt { get; set; } + + /// + /// Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) + /// + /// Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) + [DataMember(Name="modifiedAt", EmitDefaultValue=false)] + public DateTime? ModifiedAt { get; set; } + + /// + /// Gets or Sets ListIds + /// + [DataMember(Name="listIds", EmitDefaultValue=false)] + public List ListIds { get; set; } + + /// + /// Gets or Sets ListUnsubscribed + /// + [DataMember(Name="listUnsubscribed", EmitDefaultValue=false)] + public List ListUnsubscribed { get; set; } + + /// + /// Set of attributes of the contact + /// + /// Set of attributes of the contact + [DataMember(Name="attributes", EmitDefaultValue=false)] + public Object Attributes { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetContactDetails {\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" EmailBlacklisted: ").Append(EmailBlacklisted).Append("\n"); + sb.Append(" SmsBlacklisted: ").Append(SmsBlacklisted).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ModifiedAt: ").Append(ModifiedAt).Append("\n"); + sb.Append(" ListIds: ").Append(ListIds).Append("\n"); + sb.Append(" ListUnsubscribed: ").Append(ListUnsubscribed).Append("\n"); + sb.Append(" Attributes: ").Append(Attributes).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetContactDetails); + } + + /// + /// Returns true if GetContactDetails instances are equal + /// + /// Instance of GetContactDetails to be compared + /// Boolean + public bool Equals(GetContactDetails input) + { + if (input == null) + return false; + + return + ( + this.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ) && + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.EmailBlacklisted == input.EmailBlacklisted || + (this.EmailBlacklisted != null && + this.EmailBlacklisted.Equals(input.EmailBlacklisted)) + ) && + ( + this.SmsBlacklisted == input.SmsBlacklisted || + (this.SmsBlacklisted != null && + this.SmsBlacklisted.Equals(input.SmsBlacklisted)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.ModifiedAt == input.ModifiedAt || + (this.ModifiedAt != null && + this.ModifiedAt.Equals(input.ModifiedAt)) + ) && + ( + this.ListIds == input.ListIds || + this.ListIds != null && + this.ListIds.SequenceEqual(input.ListIds) + ) && + ( + this.ListUnsubscribed == input.ListUnsubscribed || + this.ListUnsubscribed != null && + this.ListUnsubscribed.SequenceEqual(input.ListUnsubscribed) + ) && + ( + this.Attributes == input.Attributes || + (this.Attributes != null && + this.Attributes.Equals(input.Attributes)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Email != null) + hashCode = hashCode * 59 + this.Email.GetHashCode(); + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.EmailBlacklisted != null) + hashCode = hashCode * 59 + this.EmailBlacklisted.GetHashCode(); + if (this.SmsBlacklisted != null) + hashCode = hashCode * 59 + this.SmsBlacklisted.GetHashCode(); + if (this.CreatedAt != null) + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); + if (this.ModifiedAt != null) + hashCode = hashCode * 59 + this.ModifiedAt.GetHashCode(); + if (this.ListIds != null) + hashCode = hashCode * 59 + this.ListIds.GetHashCode(); + if (this.ListUnsubscribed != null) + hashCode = hashCode * 59 + this.ListUnsubscribed.GetHashCode(); + if (this.Attributes != null) + hashCode = hashCode * 59 + this.Attributes.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetContacts.cs b/src/sib_api_v3_sdk/Model/GetContacts.cs new file mode 100644 index 0000000..9b3d5ea --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetContacts.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetContacts + /// + [DataContract] + public partial class GetContacts : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetContacts() { } + /// + /// Initializes a new instance of the class. + /// + /// contacts (required). + /// Number of contacts (required). + public GetContacts(List contacts = default(List), long? count = default(long?)) + { + // to ensure "contacts" is required (not null) + if (contacts == null) + { + throw new InvalidDataException("contacts is a required property for GetContacts and cannot be null"); + } + else + { + this.Contacts = contacts; + } + // to ensure "count" is required (not null) + if (count == null) + { + throw new InvalidDataException("count is a required property for GetContacts and cannot be null"); + } + else + { + this.Count = count; + } + } + + /// + /// Gets or Sets Contacts + /// + [DataMember(Name="contacts", EmitDefaultValue=false)] + public List Contacts { get; set; } + + /// + /// Number of contacts + /// + /// Number of contacts + [DataMember(Name="count", EmitDefaultValue=false)] + public long? Count { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetContacts {\n"); + sb.Append(" Contacts: ").Append(Contacts).Append("\n"); + sb.Append(" Count: ").Append(Count).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetContacts); + } + + /// + /// Returns true if GetContacts instances are equal + /// + /// Instance of GetContacts to be compared + /// Boolean + public bool Equals(GetContacts input) + { + if (input == null) + return false; + + return + ( + this.Contacts == input.Contacts || + this.Contacts != null && + this.Contacts.SequenceEqual(input.Contacts) + ) && + ( + this.Count == input.Count || + (this.Count != null && + this.Count.Equals(input.Count)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Contacts != null) + hashCode = hashCode * 59 + this.Contacts.GetHashCode(); + if (this.Count != null) + hashCode = hashCode * 59 + this.Count.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetEmailCampaign.cs b/src/sib_api_v3_sdk/Model/GetEmailCampaign.cs new file mode 100644 index 0000000..48ab886 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetEmailCampaign.cs @@ -0,0 +1,814 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetEmailCampaign + /// + [DataContract] + public partial class GetEmailCampaign : IEquatable, IValidatableObject + { + /// + /// Type of campaign + /// + /// Type of campaign + [JsonConverter(typeof(StringEnumConverter))] + public enum TypeEnum + { + + /// + /// Enum Classic for value: classic + /// + [EnumMember(Value = "classic")] + Classic = 1, + + /// + /// Enum Trigger for value: trigger + /// + [EnumMember(Value = "trigger")] + Trigger = 2 + } + + /// + /// Type of campaign + /// + /// Type of campaign + [DataMember(Name="type", EmitDefaultValue=false)] + public TypeEnum Type { get; set; } + /// + /// Status of the campaign + /// + /// Status of the campaign + [JsonConverter(typeof(StringEnumConverter))] + public enum StatusEnum + { + + /// + /// Enum Draft for value: draft + /// + [EnumMember(Value = "draft")] + Draft = 1, + + /// + /// Enum Sent for value: sent + /// + [EnumMember(Value = "sent")] + Sent = 2, + + /// + /// Enum Archive for value: archive + /// + [EnumMember(Value = "archive")] + Archive = 3, + + /// + /// Enum Queued for value: queued + /// + [EnumMember(Value = "queued")] + Queued = 4, + + /// + /// Enum Suspended for value: suspended + /// + [EnumMember(Value = "suspended")] + Suspended = 5, + + /// + /// Enum Inprocess for value: in_process + /// + [EnumMember(Value = "in_process")] + Inprocess = 6 + } + + /// + /// Status of the campaign + /// + /// Status of the campaign + [DataMember(Name="status", EmitDefaultValue=false)] + public StatusEnum Status { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetEmailCampaign() { } + /// + /// Initializes a new instance of the class. + /// + /// ID of the campaign (required). + /// Name of the campaign (required). + /// Subject of the campaign. Only available if `abTesting` flag of the campaign is `false`. + /// Type of campaign (required). + /// Status of the campaign (required). + /// UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ). + /// Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled.. + /// Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true`. + /// Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true`. + /// The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true`. + /// Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true`. + /// The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true`. + /// It is true if you have chosen to send your campaign at best time, otherwise it is false. + /// Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) (required). + /// Header of the campaign (required). + /// Footer of the campaign (required). + /// sender (required). + /// Email defined as the \"Reply to\" of the campaign (required). + /// Customisation of the \"to\" field of the campaign (required). + /// HTML content of the campaign (required). + /// Link to share the campaign on social medias. + /// Tag of the campaign (required). + /// Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) (required). + /// UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) (required). + /// Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email.. + /// Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign. + /// 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. + /// Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent'. + /// recipients (required). + /// statistics (required). + public GetEmailCampaign(long? id = default(long?), string name = default(string), string subject = default(string), TypeEnum type = default(TypeEnum), StatusEnum status = default(StatusEnum), DateTime? scheduledAt = default(DateTime?), bool? abTesting = default(bool?), string subjectA = default(string), string subjectB = default(string), int? splitRule = default(int?), string winnerCriteria = default(string), int? winnerDelay = default(int?), bool? sendAtBestTime = default(bool?), bool? testSent = default(bool?), string header = default(string), string footer = default(string), GetExtendedCampaignOverviewSender sender = default(GetExtendedCampaignOverviewSender), string replyTo = default(string), string toField = default(string), string htmlContent = default(string), string shareLink = default(string), string tag = default(string), DateTime? createdAt = default(DateTime?), DateTime? modifiedAt = default(DateTime?), bool? inlineImageActivation = default(bool?), bool? mirrorActive = default(bool?), bool? recurring = default(bool?), DateTime? sentDate = default(DateTime?), Object recipients = default(Object), Object statistics = default(Object)) + { + // to ensure "id" is required (not null) + if (id == null) + { + throw new InvalidDataException("id is a required property for GetEmailCampaign and cannot be null"); + } + else + { + this.Id = id; + } + // to ensure "name" is required (not null) + if (name == null) + { + throw new InvalidDataException("name is a required property for GetEmailCampaign and cannot be null"); + } + else + { + this.Name = name; + } + // to ensure "type" is required (not null) + if (type == null) + { + throw new InvalidDataException("type is a required property for GetEmailCampaign and cannot be null"); + } + else + { + this.Type = type; + } + // to ensure "status" is required (not null) + if (status == null) + { + throw new InvalidDataException("status is a required property for GetEmailCampaign and cannot be null"); + } + else + { + this.Status = status; + } + // to ensure "testSent" is required (not null) + if (testSent == null) + { + throw new InvalidDataException("testSent is a required property for GetEmailCampaign and cannot be null"); + } + else + { + this.TestSent = testSent; + } + // to ensure "header" is required (not null) + if (header == null) + { + throw new InvalidDataException("header is a required property for GetEmailCampaign and cannot be null"); + } + else + { + this.Header = header; + } + // to ensure "footer" is required (not null) + if (footer == null) + { + throw new InvalidDataException("footer is a required property for GetEmailCampaign and cannot be null"); + } + else + { + this.Footer = footer; + } + // to ensure "sender" is required (not null) + if (sender == null) + { + throw new InvalidDataException("sender is a required property for GetEmailCampaign and cannot be null"); + } + else + { + this.Sender = sender; + } + // to ensure "replyTo" is required (not null) + if (replyTo == null) + { + throw new InvalidDataException("replyTo is a required property for GetEmailCampaign and cannot be null"); + } + else + { + this.ReplyTo = replyTo; + } + // to ensure "toField" is required (not null) + if (toField == null) + { + throw new InvalidDataException("toField is a required property for GetEmailCampaign and cannot be null"); + } + else + { + this.ToField = toField; + } + // to ensure "htmlContent" is required (not null) + if (htmlContent == null) + { + throw new InvalidDataException("htmlContent is a required property for GetEmailCampaign and cannot be null"); + } + else + { + this.HtmlContent = htmlContent; + } + // to ensure "tag" is required (not null) + if (tag == null) + { + throw new InvalidDataException("tag is a required property for GetEmailCampaign and cannot be null"); + } + else + { + this.Tag = tag; + } + // to ensure "createdAt" is required (not null) + if (createdAt == null) + { + throw new InvalidDataException("createdAt is a required property for GetEmailCampaign and cannot be null"); + } + else + { + this.CreatedAt = createdAt; + } + // to ensure "modifiedAt" is required (not null) + if (modifiedAt == null) + { + throw new InvalidDataException("modifiedAt is a required property for GetEmailCampaign and cannot be null"); + } + else + { + this.ModifiedAt = modifiedAt; + } + // to ensure "recipients" is required (not null) + if (recipients == null) + { + throw new InvalidDataException("recipients is a required property for GetEmailCampaign and cannot be null"); + } + else + { + this.Recipients = recipients; + } + // to ensure "statistics" is required (not null) + if (statistics == null) + { + throw new InvalidDataException("statistics is a required property for GetEmailCampaign and cannot be null"); + } + else + { + this.Statistics = statistics; + } + this.Subject = subject; + this.ScheduledAt = scheduledAt; + this.AbTesting = abTesting; + this.SubjectA = subjectA; + this.SubjectB = subjectB; + this.SplitRule = splitRule; + this.WinnerCriteria = winnerCriteria; + this.WinnerDelay = winnerDelay; + this.SendAtBestTime = sendAtBestTime; + this.ShareLink = shareLink; + this.InlineImageActivation = inlineImageActivation; + this.MirrorActive = mirrorActive; + this.Recurring = recurring; + this.SentDate = sentDate; + } + + /// + /// ID of the campaign + /// + /// ID of the campaign + [DataMember(Name="id", EmitDefaultValue=false)] + public long? Id { get; set; } + + /// + /// Name of the campaign + /// + /// Name of the campaign + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Subject of the campaign. Only available if `abTesting` flag of the campaign is `false` + /// + /// Subject of the campaign. Only available if `abTesting` flag of the campaign is `false` + [DataMember(Name="subject", EmitDefaultValue=false)] + public string Subject { get; set; } + + + + /// + /// UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) + /// + /// UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) + [DataMember(Name="scheduledAt", EmitDefaultValue=false)] + public DateTime? ScheduledAt { get; set; } + + /// + /// Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled. + /// + /// Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled. + [DataMember(Name="abTesting", EmitDefaultValue=false)] + public bool? AbTesting { get; set; } + + /// + /// Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` + /// + /// Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` + [DataMember(Name="subjectA", EmitDefaultValue=false)] + public string SubjectA { get; set; } + + /// + /// Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` + /// + /// Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` + [DataMember(Name="subjectB", EmitDefaultValue=false)] + public string SubjectB { get; set; } + + /// + /// The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true` + /// + /// The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true` + [DataMember(Name="splitRule", EmitDefaultValue=false)] + public int? SplitRule { get; set; } + + /// + /// Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true` + /// + /// Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true` + [DataMember(Name="winnerCriteria", EmitDefaultValue=false)] + public string WinnerCriteria { get; set; } + + /// + /// The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true` + /// + /// The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true` + [DataMember(Name="winnerDelay", EmitDefaultValue=false)] + public int? WinnerDelay { get; set; } + + /// + /// It is true if you have chosen to send your campaign at best time, otherwise it is false + /// + /// It is true if you have chosen to send your campaign at best time, otherwise it is false + [DataMember(Name="sendAtBestTime", EmitDefaultValue=false)] + public bool? SendAtBestTime { get; set; } + + /// + /// Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) + /// + /// Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) + [DataMember(Name="testSent", EmitDefaultValue=false)] + public bool? TestSent { get; set; } + + /// + /// Header of the campaign + /// + /// Header of the campaign + [DataMember(Name="header", EmitDefaultValue=false)] + public string Header { get; set; } + + /// + /// Footer of the campaign + /// + /// Footer of the campaign + [DataMember(Name="footer", EmitDefaultValue=false)] + public string Footer { get; set; } + + /// + /// Gets or Sets Sender + /// + [DataMember(Name="sender", EmitDefaultValue=false)] + public GetExtendedCampaignOverviewSender Sender { get; set; } + + /// + /// Email defined as the \"Reply to\" of the campaign + /// + /// Email defined as the \"Reply to\" of the campaign + [DataMember(Name="replyTo", EmitDefaultValue=false)] + public string ReplyTo { get; set; } + + /// + /// Customisation of the \"to\" field of the campaign + /// + /// Customisation of the \"to\" field of the campaign + [DataMember(Name="toField", EmitDefaultValue=false)] + public string ToField { get; set; } + + /// + /// HTML content of the campaign + /// + /// HTML content of the campaign + [DataMember(Name="htmlContent", EmitDefaultValue=false)] + public string HtmlContent { get; set; } + + /// + /// Link to share the campaign on social medias + /// + /// Link to share the campaign on social medias + [DataMember(Name="shareLink", EmitDefaultValue=false)] + public string ShareLink { get; set; } + + /// + /// Tag of the campaign + /// + /// Tag of the campaign + [DataMember(Name="tag", EmitDefaultValue=false)] + public string Tag { get; set; } + + /// + /// Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + /// + /// Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + [DataMember(Name="createdAt", EmitDefaultValue=false)] + public DateTime? CreatedAt { get; set; } + + /// + /// UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + /// + /// UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + [DataMember(Name="modifiedAt", EmitDefaultValue=false)] + public DateTime? ModifiedAt { get; set; } + + /// + /// Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. + /// + /// Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. + [DataMember(Name="inlineImageActivation", EmitDefaultValue=false)] + public bool? InlineImageActivation { get; set; } + + /// + /// Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign + /// + /// Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign + [DataMember(Name="mirrorActive", EmitDefaultValue=false)] + public bool? MirrorActive { get; set; } + + /// + /// 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 + /// + /// 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 + [DataMember(Name="recurring", EmitDefaultValue=false)] + public bool? Recurring { get; set; } + + /// + /// Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent' + /// + /// Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent' + [DataMember(Name="sentDate", EmitDefaultValue=false)] + public DateTime? SentDate { get; set; } + + /// + /// Gets or Sets Recipients + /// + [DataMember(Name="recipients", EmitDefaultValue=false)] + public Object Recipients { get; set; } + + /// + /// Gets or Sets Statistics + /// + [DataMember(Name="statistics", EmitDefaultValue=false)] + public Object Statistics { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetEmailCampaign {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" ScheduledAt: ").Append(ScheduledAt).Append("\n"); + sb.Append(" AbTesting: ").Append(AbTesting).Append("\n"); + sb.Append(" SubjectA: ").Append(SubjectA).Append("\n"); + sb.Append(" SubjectB: ").Append(SubjectB).Append("\n"); + sb.Append(" SplitRule: ").Append(SplitRule).Append("\n"); + sb.Append(" WinnerCriteria: ").Append(WinnerCriteria).Append("\n"); + sb.Append(" WinnerDelay: ").Append(WinnerDelay).Append("\n"); + sb.Append(" SendAtBestTime: ").Append(SendAtBestTime).Append("\n"); + sb.Append(" TestSent: ").Append(TestSent).Append("\n"); + sb.Append(" Header: ").Append(Header).Append("\n"); + sb.Append(" Footer: ").Append(Footer).Append("\n"); + sb.Append(" Sender: ").Append(Sender).Append("\n"); + sb.Append(" ReplyTo: ").Append(ReplyTo).Append("\n"); + sb.Append(" ToField: ").Append(ToField).Append("\n"); + sb.Append(" HtmlContent: ").Append(HtmlContent).Append("\n"); + sb.Append(" ShareLink: ").Append(ShareLink).Append("\n"); + sb.Append(" Tag: ").Append(Tag).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ModifiedAt: ").Append(ModifiedAt).Append("\n"); + sb.Append(" InlineImageActivation: ").Append(InlineImageActivation).Append("\n"); + sb.Append(" MirrorActive: ").Append(MirrorActive).Append("\n"); + sb.Append(" Recurring: ").Append(Recurring).Append("\n"); + sb.Append(" SentDate: ").Append(SentDate).Append("\n"); + sb.Append(" Recipients: ").Append(Recipients).Append("\n"); + sb.Append(" Statistics: ").Append(Statistics).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetEmailCampaign); + } + + /// + /// Returns true if GetEmailCampaign instances are equal + /// + /// Instance of GetEmailCampaign to be compared + /// Boolean + public bool Equals(GetEmailCampaign input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ) && + ( + this.ScheduledAt == input.ScheduledAt || + (this.ScheduledAt != null && + this.ScheduledAt.Equals(input.ScheduledAt)) + ) && + ( + this.AbTesting == input.AbTesting || + (this.AbTesting != null && + this.AbTesting.Equals(input.AbTesting)) + ) && + ( + this.SubjectA == input.SubjectA || + (this.SubjectA != null && + this.SubjectA.Equals(input.SubjectA)) + ) && + ( + this.SubjectB == input.SubjectB || + (this.SubjectB != null && + this.SubjectB.Equals(input.SubjectB)) + ) && + ( + this.SplitRule == input.SplitRule || + (this.SplitRule != null && + this.SplitRule.Equals(input.SplitRule)) + ) && + ( + this.WinnerCriteria == input.WinnerCriteria || + (this.WinnerCriteria != null && + this.WinnerCriteria.Equals(input.WinnerCriteria)) + ) && + ( + this.WinnerDelay == input.WinnerDelay || + (this.WinnerDelay != null && + this.WinnerDelay.Equals(input.WinnerDelay)) + ) && + ( + this.SendAtBestTime == input.SendAtBestTime || + (this.SendAtBestTime != null && + this.SendAtBestTime.Equals(input.SendAtBestTime)) + ) && + ( + this.TestSent == input.TestSent || + (this.TestSent != null && + this.TestSent.Equals(input.TestSent)) + ) && + ( + this.Header == input.Header || + (this.Header != null && + this.Header.Equals(input.Header)) + ) && + ( + this.Footer == input.Footer || + (this.Footer != null && + this.Footer.Equals(input.Footer)) + ) && + ( + this.Sender == input.Sender || + (this.Sender != null && + this.Sender.Equals(input.Sender)) + ) && + ( + this.ReplyTo == input.ReplyTo || + (this.ReplyTo != null && + this.ReplyTo.Equals(input.ReplyTo)) + ) && + ( + this.ToField == input.ToField || + (this.ToField != null && + this.ToField.Equals(input.ToField)) + ) && + ( + this.HtmlContent == input.HtmlContent || + (this.HtmlContent != null && + this.HtmlContent.Equals(input.HtmlContent)) + ) && + ( + this.ShareLink == input.ShareLink || + (this.ShareLink != null && + this.ShareLink.Equals(input.ShareLink)) + ) && + ( + this.Tag == input.Tag || + (this.Tag != null && + this.Tag.Equals(input.Tag)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.ModifiedAt == input.ModifiedAt || + (this.ModifiedAt != null && + this.ModifiedAt.Equals(input.ModifiedAt)) + ) && + ( + this.InlineImageActivation == input.InlineImageActivation || + (this.InlineImageActivation != null && + this.InlineImageActivation.Equals(input.InlineImageActivation)) + ) && + ( + this.MirrorActive == input.MirrorActive || + (this.MirrorActive != null && + this.MirrorActive.Equals(input.MirrorActive)) + ) && + ( + this.Recurring == input.Recurring || + (this.Recurring != null && + this.Recurring.Equals(input.Recurring)) + ) && + ( + this.SentDate == input.SentDate || + (this.SentDate != null && + this.SentDate.Equals(input.SentDate)) + ) && + ( + this.Recipients == input.Recipients || + (this.Recipients != null && + this.Recipients.Equals(input.Recipients)) + ) && + ( + this.Statistics == input.Statistics || + (this.Statistics != null && + this.Statistics.Equals(input.Statistics)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Subject != null) + hashCode = hashCode * 59 + this.Subject.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + if (this.ScheduledAt != null) + hashCode = hashCode * 59 + this.ScheduledAt.GetHashCode(); + if (this.AbTesting != null) + hashCode = hashCode * 59 + this.AbTesting.GetHashCode(); + if (this.SubjectA != null) + hashCode = hashCode * 59 + this.SubjectA.GetHashCode(); + if (this.SubjectB != null) + hashCode = hashCode * 59 + this.SubjectB.GetHashCode(); + if (this.SplitRule != null) + hashCode = hashCode * 59 + this.SplitRule.GetHashCode(); + if (this.WinnerCriteria != null) + hashCode = hashCode * 59 + this.WinnerCriteria.GetHashCode(); + if (this.WinnerDelay != null) + hashCode = hashCode * 59 + this.WinnerDelay.GetHashCode(); + if (this.SendAtBestTime != null) + hashCode = hashCode * 59 + this.SendAtBestTime.GetHashCode(); + if (this.TestSent != null) + hashCode = hashCode * 59 + this.TestSent.GetHashCode(); + if (this.Header != null) + hashCode = hashCode * 59 + this.Header.GetHashCode(); + if (this.Footer != null) + hashCode = hashCode * 59 + this.Footer.GetHashCode(); + if (this.Sender != null) + hashCode = hashCode * 59 + this.Sender.GetHashCode(); + if (this.ReplyTo != null) + hashCode = hashCode * 59 + this.ReplyTo.GetHashCode(); + if (this.ToField != null) + hashCode = hashCode * 59 + this.ToField.GetHashCode(); + if (this.HtmlContent != null) + hashCode = hashCode * 59 + this.HtmlContent.GetHashCode(); + if (this.ShareLink != null) + hashCode = hashCode * 59 + this.ShareLink.GetHashCode(); + if (this.Tag != null) + hashCode = hashCode * 59 + this.Tag.GetHashCode(); + if (this.CreatedAt != null) + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); + if (this.ModifiedAt != null) + hashCode = hashCode * 59 + this.ModifiedAt.GetHashCode(); + if (this.InlineImageActivation != null) + hashCode = hashCode * 59 + this.InlineImageActivation.GetHashCode(); + if (this.MirrorActive != null) + hashCode = hashCode * 59 + this.MirrorActive.GetHashCode(); + if (this.Recurring != null) + hashCode = hashCode * 59 + this.Recurring.GetHashCode(); + if (this.SentDate != null) + hashCode = hashCode * 59 + this.SentDate.GetHashCode(); + if (this.Recipients != null) + hashCode = hashCode * 59 + this.Recipients.GetHashCode(); + if (this.Statistics != null) + hashCode = hashCode * 59 + this.Statistics.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetEmailCampaigns.cs b/src/sib_api_v3_sdk/Model/GetEmailCampaigns.cs new file mode 100644 index 0000000..24dc243 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetEmailCampaigns.cs @@ -0,0 +1,154 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetEmailCampaigns + /// + [DataContract] + public partial class GetEmailCampaigns : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetEmailCampaigns() { } + /// + /// Initializes a new instance of the class. + /// + /// campaigns. + /// Number of Email campaigns retrieved (required). + public GetEmailCampaigns(List campaigns = default(List), long? count = default(long?)) + { + // to ensure "count" is required (not null) + if (count == null) + { + throw new InvalidDataException("count is a required property for GetEmailCampaigns and cannot be null"); + } + else + { + this.Count = count; + } + this.Campaigns = campaigns; + } + + /// + /// Gets or Sets Campaigns + /// + [DataMember(Name="campaigns", EmitDefaultValue=false)] + public List Campaigns { get; set; } + + /// + /// Number of Email campaigns retrieved + /// + /// Number of Email campaigns retrieved + [DataMember(Name="count", EmitDefaultValue=false)] + public long? Count { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetEmailCampaigns {\n"); + sb.Append(" Campaigns: ").Append(Campaigns).Append("\n"); + sb.Append(" Count: ").Append(Count).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetEmailCampaigns); + } + + /// + /// Returns true if GetEmailCampaigns instances are equal + /// + /// Instance of GetEmailCampaigns to be compared + /// Boolean + public bool Equals(GetEmailCampaigns input) + { + if (input == null) + return false; + + return + ( + this.Campaigns == input.Campaigns || + this.Campaigns != null && + this.Campaigns.SequenceEqual(input.Campaigns) + ) && + ( + this.Count == input.Count || + (this.Count != null && + this.Count.Equals(input.Count)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Campaigns != null) + hashCode = hashCode * 59 + this.Campaigns.GetHashCode(); + if (this.Count != null) + hashCode = hashCode * 59 + this.Count.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetEmailEventReport.cs b/src/sib_api_v3_sdk/Model/GetEmailEventReport.cs new file mode 100644 index 0000000..6e2e540 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetEmailEventReport.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetEmailEventReport + /// + [DataContract] + public partial class GetEmailEventReport : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// events. + public GetEmailEventReport(List events = default(List)) + { + this.Events = events; + } + + /// + /// Gets or Sets Events + /// + [DataMember(Name="events", EmitDefaultValue=false)] + public List Events { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetEmailEventReport {\n"); + sb.Append(" Events: ").Append(Events).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetEmailEventReport); + } + + /// + /// Returns true if GetEmailEventReport instances are equal + /// + /// Instance of GetEmailEventReport to be compared + /// Boolean + public bool Equals(GetEmailEventReport input) + { + if (input == null) + return false; + + return + ( + this.Events == input.Events || + this.Events != null && + this.Events.SequenceEqual(input.Events) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Events != null) + hashCode = hashCode * 59 + this.Events.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetEmailEventReportEvents.cs b/src/sib_api_v3_sdk/Model/GetEmailEventReportEvents.cs new file mode 100644 index 0000000..8927149 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetEmailEventReportEvents.cs @@ -0,0 +1,396 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetEmailEventReportEvents + /// + [DataContract] + public partial class GetEmailEventReportEvents : IEquatable, IValidatableObject + { + /// + /// Event which occurred + /// + /// Event which occurred + [JsonConverter(typeof(StringEnumConverter))] + public enum EventEnum + { + + /// + /// Enum Bounces for value: bounces + /// + [EnumMember(Value = "bounces")] + Bounces = 1, + + /// + /// Enum HardBounces for value: hardBounces + /// + [EnumMember(Value = "hardBounces")] + HardBounces = 2, + + /// + /// Enum SoftBounces for value: softBounces + /// + [EnumMember(Value = "softBounces")] + SoftBounces = 3, + + /// + /// Enum Delivered for value: delivered + /// + [EnumMember(Value = "delivered")] + Delivered = 4, + + /// + /// Enum Spam for value: spam + /// + [EnumMember(Value = "spam")] + Spam = 5, + + /// + /// Enum Requests for value: requests + /// + [EnumMember(Value = "requests")] + Requests = 6, + + /// + /// Enum Opened for value: opened + /// + [EnumMember(Value = "opened")] + Opened = 7, + + /// + /// Enum Clicks for value: clicks + /// + [EnumMember(Value = "clicks")] + Clicks = 8, + + /// + /// Enum Invalid for value: invalid + /// + [EnumMember(Value = "invalid")] + Invalid = 9, + + /// + /// Enum Deferred for value: deferred + /// + [EnumMember(Value = "deferred")] + Deferred = 10, + + /// + /// Enum Blocked for value: blocked + /// + [EnumMember(Value = "blocked")] + Blocked = 11, + + /// + /// Enum Unsubscribed for value: unsubscribed + /// + [EnumMember(Value = "unsubscribed")] + Unsubscribed = 12 + } + + /// + /// Event which occurred + /// + /// Event which occurred + [DataMember(Name="event", EmitDefaultValue=false)] + public EventEnum Event { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetEmailEventReportEvents() { } + /// + /// Initializes a new instance of the class. + /// + /// Email address which generates the event (required). + /// UTC date-time on which the event has been generated (required). + /// Subject of the event. + /// Message ID which generated the event (required). + /// Event which occurred (required). + /// Reason of bounce (only available if the event is hardbounce or softbounce). + /// Tag of the email which generated the event. + /// IP from which the user has opened the email or clicked on the link (only available if the event is opened or clicks). + /// The link which is sent to the user (only available if the event is requests or opened or clicks). + /// Sender email from which the emails are sent. + public GetEmailEventReportEvents(string email = default(string), DateTime? date = default(DateTime?), string subject = default(string), string messageId = default(string), EventEnum _event = default(EventEnum), string reason = default(string), string tag = default(string), string ip = default(string), string link = default(string), string from = default(string)) + { + // to ensure "email" is required (not null) + if (email == null) + { + throw new InvalidDataException("email is a required property for GetEmailEventReportEvents and cannot be null"); + } + else + { + this.Email = email; + } + // to ensure "date" is required (not null) + if (date == null) + { + throw new InvalidDataException("date is a required property for GetEmailEventReportEvents and cannot be null"); + } + else + { + this.Date = date; + } + // to ensure "messageId" is required (not null) + if (messageId == null) + { + throw new InvalidDataException("messageId is a required property for GetEmailEventReportEvents and cannot be null"); + } + else + { + this.MessageId = messageId; + } + // to ensure "_event" is required (not null) + if (_event == null) + { + throw new InvalidDataException("_event is a required property for GetEmailEventReportEvents and cannot be null"); + } + else + { + this.Event = _event; + } + this.Subject = subject; + this.Reason = reason; + this.Tag = tag; + this.Ip = ip; + this.Link = link; + this.From = from; + } + + /// + /// Email address which generates the event + /// + /// Email address which generates the event + [DataMember(Name="email", EmitDefaultValue=false)] + public string Email { get; set; } + + /// + /// UTC date-time on which the event has been generated + /// + /// UTC date-time on which the event has been generated + [DataMember(Name="date", EmitDefaultValue=false)] + public DateTime? Date { get; set; } + + /// + /// Subject of the event + /// + /// Subject of the event + [DataMember(Name="subject", EmitDefaultValue=false)] + public string Subject { get; set; } + + /// + /// Message ID which generated the event + /// + /// Message ID which generated the event + [DataMember(Name="messageId", EmitDefaultValue=false)] + public string MessageId { get; set; } + + + /// + /// Reason of bounce (only available if the event is hardbounce or softbounce) + /// + /// Reason of bounce (only available if the event is hardbounce or softbounce) + [DataMember(Name="reason", EmitDefaultValue=false)] + public string Reason { get; set; } + + /// + /// Tag of the email which generated the event + /// + /// Tag of the email which generated the event + [DataMember(Name="tag", EmitDefaultValue=false)] + public string Tag { get; set; } + + /// + /// IP from which the user has opened the email or clicked on the link (only available if the event is opened or clicks) + /// + /// IP from which the user has opened the email or clicked on the link (only available if the event is opened or clicks) + [DataMember(Name="ip", EmitDefaultValue=false)] + public string Ip { get; set; } + + /// + /// The link which is sent to the user (only available if the event is requests or opened or clicks) + /// + /// The link which is sent to the user (only available if the event is requests or opened or clicks) + [DataMember(Name="link", EmitDefaultValue=false)] + public string Link { get; set; } + + /// + /// Sender email from which the emails are sent + /// + /// Sender email from which the emails are sent + [DataMember(Name="from", EmitDefaultValue=false)] + public string From { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetEmailEventReportEvents {\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" Date: ").Append(Date).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" MessageId: ").Append(MessageId).Append("\n"); + sb.Append(" Event: ").Append(Event).Append("\n"); + sb.Append(" Reason: ").Append(Reason).Append("\n"); + sb.Append(" Tag: ").Append(Tag).Append("\n"); + sb.Append(" Ip: ").Append(Ip).Append("\n"); + sb.Append(" Link: ").Append(Link).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetEmailEventReportEvents); + } + + /// + /// Returns true if GetEmailEventReportEvents instances are equal + /// + /// Instance of GetEmailEventReportEvents to be compared + /// Boolean + public bool Equals(GetEmailEventReportEvents input) + { + if (input == null) + return false; + + return + ( + this.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ) && + ( + this.Date == input.Date || + (this.Date != null && + this.Date.Equals(input.Date)) + ) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && + ( + this.MessageId == input.MessageId || + (this.MessageId != null && + this.MessageId.Equals(input.MessageId)) + ) && + ( + this.Event == input.Event || + (this.Event != null && + this.Event.Equals(input.Event)) + ) && + ( + this.Reason == input.Reason || + (this.Reason != null && + this.Reason.Equals(input.Reason)) + ) && + ( + this.Tag == input.Tag || + (this.Tag != null && + this.Tag.Equals(input.Tag)) + ) && + ( + this.Ip == input.Ip || + (this.Ip != null && + this.Ip.Equals(input.Ip)) + ) && + ( + this.Link == input.Link || + (this.Link != null && + this.Link.Equals(input.Link)) + ) && + ( + this.From == input.From || + (this.From != null && + this.From.Equals(input.From)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Email != null) + hashCode = hashCode * 59 + this.Email.GetHashCode(); + if (this.Date != null) + hashCode = hashCode * 59 + this.Date.GetHashCode(); + if (this.Subject != null) + hashCode = hashCode * 59 + this.Subject.GetHashCode(); + if (this.MessageId != null) + hashCode = hashCode * 59 + this.MessageId.GetHashCode(); + if (this.Event != null) + hashCode = hashCode * 59 + this.Event.GetHashCode(); + if (this.Reason != null) + hashCode = hashCode * 59 + this.Reason.GetHashCode(); + if (this.Tag != null) + hashCode = hashCode * 59 + this.Tag.GetHashCode(); + if (this.Ip != null) + hashCode = hashCode * 59 + this.Ip.GetHashCode(); + if (this.Link != null) + hashCode = hashCode * 59 + this.Link.GetHashCode(); + if (this.From != null) + hashCode = hashCode * 59 + this.From.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetExtendedCampaignOverview.cs b/src/sib_api_v3_sdk/Model/GetExtendedCampaignOverview.cs new file mode 100644 index 0000000..28b3e5a --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetExtendedCampaignOverview.cs @@ -0,0 +1,766 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetExtendedCampaignOverview + /// + [DataContract] + public partial class GetExtendedCampaignOverview : IEquatable, IValidatableObject + { + /// + /// Type of campaign + /// + /// Type of campaign + [JsonConverter(typeof(StringEnumConverter))] + public enum TypeEnum + { + + /// + /// Enum Classic for value: classic + /// + [EnumMember(Value = "classic")] + Classic = 1, + + /// + /// Enum Trigger for value: trigger + /// + [EnumMember(Value = "trigger")] + Trigger = 2 + } + + /// + /// Type of campaign + /// + /// Type of campaign + [DataMember(Name="type", EmitDefaultValue=false)] + public TypeEnum Type { get; set; } + /// + /// Status of the campaign + /// + /// Status of the campaign + [JsonConverter(typeof(StringEnumConverter))] + public enum StatusEnum + { + + /// + /// Enum Draft for value: draft + /// + [EnumMember(Value = "draft")] + Draft = 1, + + /// + /// Enum Sent for value: sent + /// + [EnumMember(Value = "sent")] + Sent = 2, + + /// + /// Enum Archive for value: archive + /// + [EnumMember(Value = "archive")] + Archive = 3, + + /// + /// Enum Queued for value: queued + /// + [EnumMember(Value = "queued")] + Queued = 4, + + /// + /// Enum Suspended for value: suspended + /// + [EnumMember(Value = "suspended")] + Suspended = 5, + + /// + /// Enum Inprocess for value: in_process + /// + [EnumMember(Value = "in_process")] + Inprocess = 6 + } + + /// + /// Status of the campaign + /// + /// Status of the campaign + [DataMember(Name="status", EmitDefaultValue=false)] + public StatusEnum Status { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetExtendedCampaignOverview() { } + /// + /// Initializes a new instance of the class. + /// + /// ID of the campaign (required). + /// Name of the campaign (required). + /// Subject of the campaign. Only available if `abTesting` flag of the campaign is `false`. + /// Type of campaign (required). + /// Status of the campaign (required). + /// UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ). + /// Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled.. + /// Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true`. + /// Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true`. + /// The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true`. + /// Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true`. + /// The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true`. + /// It is true if you have chosen to send your campaign at best time, otherwise it is false. + /// Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) (required). + /// Header of the campaign (required). + /// Footer of the campaign (required). + /// sender (required). + /// Email defined as the \"Reply to\" of the campaign (required). + /// Customisation of the \"to\" field of the campaign (required). + /// HTML content of the campaign (required). + /// Link to share the campaign on social medias. + /// Tag of the campaign (required). + /// Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) (required). + /// UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) (required). + /// Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email.. + /// Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign. + /// 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. + /// Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent'. + public GetExtendedCampaignOverview(long? id = default(long?), string name = default(string), string subject = default(string), TypeEnum type = default(TypeEnum), StatusEnum status = default(StatusEnum), DateTime? scheduledAt = default(DateTime?), bool? abTesting = default(bool?), string subjectA = default(string), string subjectB = default(string), int? splitRule = default(int?), string winnerCriteria = default(string), int? winnerDelay = default(int?), bool? sendAtBestTime = default(bool?), bool? testSent = default(bool?), string header = default(string), string footer = default(string), GetExtendedCampaignOverviewSender sender = default(GetExtendedCampaignOverviewSender), string replyTo = default(string), string toField = default(string), string htmlContent = default(string), string shareLink = default(string), string tag = default(string), DateTime? createdAt = default(DateTime?), DateTime? modifiedAt = default(DateTime?), bool? inlineImageActivation = default(bool?), bool? mirrorActive = default(bool?), bool? recurring = default(bool?), DateTime? sentDate = default(DateTime?)) + { + // to ensure "id" is required (not null) + if (id == null) + { + throw new InvalidDataException("id is a required property for GetExtendedCampaignOverview and cannot be null"); + } + else + { + this.Id = id; + } + // to ensure "name" is required (not null) + if (name == null) + { + throw new InvalidDataException("name is a required property for GetExtendedCampaignOverview and cannot be null"); + } + else + { + this.Name = name; + } + // to ensure "type" is required (not null) + if (type == null) + { + throw new InvalidDataException("type is a required property for GetExtendedCampaignOverview and cannot be null"); + } + else + { + this.Type = type; + } + // to ensure "status" is required (not null) + if (status == null) + { + throw new InvalidDataException("status is a required property for GetExtendedCampaignOverview and cannot be null"); + } + else + { + this.Status = status; + } + // to ensure "testSent" is required (not null) + if (testSent == null) + { + throw new InvalidDataException("testSent is a required property for GetExtendedCampaignOverview and cannot be null"); + } + else + { + this.TestSent = testSent; + } + // to ensure "header" is required (not null) + if (header == null) + { + throw new InvalidDataException("header is a required property for GetExtendedCampaignOverview and cannot be null"); + } + else + { + this.Header = header; + } + // to ensure "footer" is required (not null) + if (footer == null) + { + throw new InvalidDataException("footer is a required property for GetExtendedCampaignOverview and cannot be null"); + } + else + { + this.Footer = footer; + } + // to ensure "sender" is required (not null) + if (sender == null) + { + throw new InvalidDataException("sender is a required property for GetExtendedCampaignOverview and cannot be null"); + } + else + { + this.Sender = sender; + } + // to ensure "replyTo" is required (not null) + if (replyTo == null) + { + throw new InvalidDataException("replyTo is a required property for GetExtendedCampaignOverview and cannot be null"); + } + else + { + this.ReplyTo = replyTo; + } + // to ensure "toField" is required (not null) + if (toField == null) + { + throw new InvalidDataException("toField is a required property for GetExtendedCampaignOverview and cannot be null"); + } + else + { + this.ToField = toField; + } + // to ensure "htmlContent" is required (not null) + if (htmlContent == null) + { + throw new InvalidDataException("htmlContent is a required property for GetExtendedCampaignOverview and cannot be null"); + } + else + { + this.HtmlContent = htmlContent; + } + // to ensure "tag" is required (not null) + if (tag == null) + { + throw new InvalidDataException("tag is a required property for GetExtendedCampaignOverview and cannot be null"); + } + else + { + this.Tag = tag; + } + // to ensure "createdAt" is required (not null) + if (createdAt == null) + { + throw new InvalidDataException("createdAt is a required property for GetExtendedCampaignOverview and cannot be null"); + } + else + { + this.CreatedAt = createdAt; + } + // to ensure "modifiedAt" is required (not null) + if (modifiedAt == null) + { + throw new InvalidDataException("modifiedAt is a required property for GetExtendedCampaignOverview and cannot be null"); + } + else + { + this.ModifiedAt = modifiedAt; + } + this.Subject = subject; + this.ScheduledAt = scheduledAt; + this.AbTesting = abTesting; + this.SubjectA = subjectA; + this.SubjectB = subjectB; + this.SplitRule = splitRule; + this.WinnerCriteria = winnerCriteria; + this.WinnerDelay = winnerDelay; + this.SendAtBestTime = sendAtBestTime; + this.ShareLink = shareLink; + this.InlineImageActivation = inlineImageActivation; + this.MirrorActive = mirrorActive; + this.Recurring = recurring; + this.SentDate = sentDate; + } + + /// + /// ID of the campaign + /// + /// ID of the campaign + [DataMember(Name="id", EmitDefaultValue=false)] + public long? Id { get; set; } + + /// + /// Name of the campaign + /// + /// Name of the campaign + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Subject of the campaign. Only available if `abTesting` flag of the campaign is `false` + /// + /// Subject of the campaign. Only available if `abTesting` flag of the campaign is `false` + [DataMember(Name="subject", EmitDefaultValue=false)] + public string Subject { get; set; } + + + + /// + /// UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) + /// + /// UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) + [DataMember(Name="scheduledAt", EmitDefaultValue=false)] + public DateTime? ScheduledAt { get; set; } + + /// + /// Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled. + /// + /// Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled. + [DataMember(Name="abTesting", EmitDefaultValue=false)] + public bool? AbTesting { get; set; } + + /// + /// Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` + /// + /// Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` + [DataMember(Name="subjectA", EmitDefaultValue=false)] + public string SubjectA { get; set; } + + /// + /// Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` + /// + /// Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` + [DataMember(Name="subjectB", EmitDefaultValue=false)] + public string SubjectB { get; set; } + + /// + /// The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true` + /// + /// The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true` + [DataMember(Name="splitRule", EmitDefaultValue=false)] + public int? SplitRule { get; set; } + + /// + /// Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true` + /// + /// Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true` + [DataMember(Name="winnerCriteria", EmitDefaultValue=false)] + public string WinnerCriteria { get; set; } + + /// + /// The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true` + /// + /// The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true` + [DataMember(Name="winnerDelay", EmitDefaultValue=false)] + public int? WinnerDelay { get; set; } + + /// + /// It is true if you have chosen to send your campaign at best time, otherwise it is false + /// + /// It is true if you have chosen to send your campaign at best time, otherwise it is false + [DataMember(Name="sendAtBestTime", EmitDefaultValue=false)] + public bool? SendAtBestTime { get; set; } + + /// + /// Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) + /// + /// Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) + [DataMember(Name="testSent", EmitDefaultValue=false)] + public bool? TestSent { get; set; } + + /// + /// Header of the campaign + /// + /// Header of the campaign + [DataMember(Name="header", EmitDefaultValue=false)] + public string Header { get; set; } + + /// + /// Footer of the campaign + /// + /// Footer of the campaign + [DataMember(Name="footer", EmitDefaultValue=false)] + public string Footer { get; set; } + + /// + /// Gets or Sets Sender + /// + [DataMember(Name="sender", EmitDefaultValue=false)] + public GetExtendedCampaignOverviewSender Sender { get; set; } + + /// + /// Email defined as the \"Reply to\" of the campaign + /// + /// Email defined as the \"Reply to\" of the campaign + [DataMember(Name="replyTo", EmitDefaultValue=false)] + public string ReplyTo { get; set; } + + /// + /// Customisation of the \"to\" field of the campaign + /// + /// Customisation of the \"to\" field of the campaign + [DataMember(Name="toField", EmitDefaultValue=false)] + public string ToField { get; set; } + + /// + /// HTML content of the campaign + /// + /// HTML content of the campaign + [DataMember(Name="htmlContent", EmitDefaultValue=false)] + public string HtmlContent { get; set; } + + /// + /// Link to share the campaign on social medias + /// + /// Link to share the campaign on social medias + [DataMember(Name="shareLink", EmitDefaultValue=false)] + public string ShareLink { get; set; } + + /// + /// Tag of the campaign + /// + /// Tag of the campaign + [DataMember(Name="tag", EmitDefaultValue=false)] + public string Tag { get; set; } + + /// + /// Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + /// + /// Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + [DataMember(Name="createdAt", EmitDefaultValue=false)] + public DateTime? CreatedAt { get; set; } + + /// + /// UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + /// + /// UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + [DataMember(Name="modifiedAt", EmitDefaultValue=false)] + public DateTime? ModifiedAt { get; set; } + + /// + /// Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. + /// + /// Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. + [DataMember(Name="inlineImageActivation", EmitDefaultValue=false)] + public bool? InlineImageActivation { get; set; } + + /// + /// Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign + /// + /// Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign + [DataMember(Name="mirrorActive", EmitDefaultValue=false)] + public bool? MirrorActive { get; set; } + + /// + /// 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 + /// + /// 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 + [DataMember(Name="recurring", EmitDefaultValue=false)] + public bool? Recurring { get; set; } + + /// + /// Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent' + /// + /// Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent' + [DataMember(Name="sentDate", EmitDefaultValue=false)] + public DateTime? SentDate { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetExtendedCampaignOverview {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" ScheduledAt: ").Append(ScheduledAt).Append("\n"); + sb.Append(" AbTesting: ").Append(AbTesting).Append("\n"); + sb.Append(" SubjectA: ").Append(SubjectA).Append("\n"); + sb.Append(" SubjectB: ").Append(SubjectB).Append("\n"); + sb.Append(" SplitRule: ").Append(SplitRule).Append("\n"); + sb.Append(" WinnerCriteria: ").Append(WinnerCriteria).Append("\n"); + sb.Append(" WinnerDelay: ").Append(WinnerDelay).Append("\n"); + sb.Append(" SendAtBestTime: ").Append(SendAtBestTime).Append("\n"); + sb.Append(" TestSent: ").Append(TestSent).Append("\n"); + sb.Append(" Header: ").Append(Header).Append("\n"); + sb.Append(" Footer: ").Append(Footer).Append("\n"); + sb.Append(" Sender: ").Append(Sender).Append("\n"); + sb.Append(" ReplyTo: ").Append(ReplyTo).Append("\n"); + sb.Append(" ToField: ").Append(ToField).Append("\n"); + sb.Append(" HtmlContent: ").Append(HtmlContent).Append("\n"); + sb.Append(" ShareLink: ").Append(ShareLink).Append("\n"); + sb.Append(" Tag: ").Append(Tag).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ModifiedAt: ").Append(ModifiedAt).Append("\n"); + sb.Append(" InlineImageActivation: ").Append(InlineImageActivation).Append("\n"); + sb.Append(" MirrorActive: ").Append(MirrorActive).Append("\n"); + sb.Append(" Recurring: ").Append(Recurring).Append("\n"); + sb.Append(" SentDate: ").Append(SentDate).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetExtendedCampaignOverview); + } + + /// + /// Returns true if GetExtendedCampaignOverview instances are equal + /// + /// Instance of GetExtendedCampaignOverview to be compared + /// Boolean + public bool Equals(GetExtendedCampaignOverview input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ) && + ( + this.ScheduledAt == input.ScheduledAt || + (this.ScheduledAt != null && + this.ScheduledAt.Equals(input.ScheduledAt)) + ) && + ( + this.AbTesting == input.AbTesting || + (this.AbTesting != null && + this.AbTesting.Equals(input.AbTesting)) + ) && + ( + this.SubjectA == input.SubjectA || + (this.SubjectA != null && + this.SubjectA.Equals(input.SubjectA)) + ) && + ( + this.SubjectB == input.SubjectB || + (this.SubjectB != null && + this.SubjectB.Equals(input.SubjectB)) + ) && + ( + this.SplitRule == input.SplitRule || + (this.SplitRule != null && + this.SplitRule.Equals(input.SplitRule)) + ) && + ( + this.WinnerCriteria == input.WinnerCriteria || + (this.WinnerCriteria != null && + this.WinnerCriteria.Equals(input.WinnerCriteria)) + ) && + ( + this.WinnerDelay == input.WinnerDelay || + (this.WinnerDelay != null && + this.WinnerDelay.Equals(input.WinnerDelay)) + ) && + ( + this.SendAtBestTime == input.SendAtBestTime || + (this.SendAtBestTime != null && + this.SendAtBestTime.Equals(input.SendAtBestTime)) + ) && + ( + this.TestSent == input.TestSent || + (this.TestSent != null && + this.TestSent.Equals(input.TestSent)) + ) && + ( + this.Header == input.Header || + (this.Header != null && + this.Header.Equals(input.Header)) + ) && + ( + this.Footer == input.Footer || + (this.Footer != null && + this.Footer.Equals(input.Footer)) + ) && + ( + this.Sender == input.Sender || + (this.Sender != null && + this.Sender.Equals(input.Sender)) + ) && + ( + this.ReplyTo == input.ReplyTo || + (this.ReplyTo != null && + this.ReplyTo.Equals(input.ReplyTo)) + ) && + ( + this.ToField == input.ToField || + (this.ToField != null && + this.ToField.Equals(input.ToField)) + ) && + ( + this.HtmlContent == input.HtmlContent || + (this.HtmlContent != null && + this.HtmlContent.Equals(input.HtmlContent)) + ) && + ( + this.ShareLink == input.ShareLink || + (this.ShareLink != null && + this.ShareLink.Equals(input.ShareLink)) + ) && + ( + this.Tag == input.Tag || + (this.Tag != null && + this.Tag.Equals(input.Tag)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.ModifiedAt == input.ModifiedAt || + (this.ModifiedAt != null && + this.ModifiedAt.Equals(input.ModifiedAt)) + ) && + ( + this.InlineImageActivation == input.InlineImageActivation || + (this.InlineImageActivation != null && + this.InlineImageActivation.Equals(input.InlineImageActivation)) + ) && + ( + this.MirrorActive == input.MirrorActive || + (this.MirrorActive != null && + this.MirrorActive.Equals(input.MirrorActive)) + ) && + ( + this.Recurring == input.Recurring || + (this.Recurring != null && + this.Recurring.Equals(input.Recurring)) + ) && + ( + this.SentDate == input.SentDate || + (this.SentDate != null && + this.SentDate.Equals(input.SentDate)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Subject != null) + hashCode = hashCode * 59 + this.Subject.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + if (this.ScheduledAt != null) + hashCode = hashCode * 59 + this.ScheduledAt.GetHashCode(); + if (this.AbTesting != null) + hashCode = hashCode * 59 + this.AbTesting.GetHashCode(); + if (this.SubjectA != null) + hashCode = hashCode * 59 + this.SubjectA.GetHashCode(); + if (this.SubjectB != null) + hashCode = hashCode * 59 + this.SubjectB.GetHashCode(); + if (this.SplitRule != null) + hashCode = hashCode * 59 + this.SplitRule.GetHashCode(); + if (this.WinnerCriteria != null) + hashCode = hashCode * 59 + this.WinnerCriteria.GetHashCode(); + if (this.WinnerDelay != null) + hashCode = hashCode * 59 + this.WinnerDelay.GetHashCode(); + if (this.SendAtBestTime != null) + hashCode = hashCode * 59 + this.SendAtBestTime.GetHashCode(); + if (this.TestSent != null) + hashCode = hashCode * 59 + this.TestSent.GetHashCode(); + if (this.Header != null) + hashCode = hashCode * 59 + this.Header.GetHashCode(); + if (this.Footer != null) + hashCode = hashCode * 59 + this.Footer.GetHashCode(); + if (this.Sender != null) + hashCode = hashCode * 59 + this.Sender.GetHashCode(); + if (this.ReplyTo != null) + hashCode = hashCode * 59 + this.ReplyTo.GetHashCode(); + if (this.ToField != null) + hashCode = hashCode * 59 + this.ToField.GetHashCode(); + if (this.HtmlContent != null) + hashCode = hashCode * 59 + this.HtmlContent.GetHashCode(); + if (this.ShareLink != null) + hashCode = hashCode * 59 + this.ShareLink.GetHashCode(); + if (this.Tag != null) + hashCode = hashCode * 59 + this.Tag.GetHashCode(); + if (this.CreatedAt != null) + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); + if (this.ModifiedAt != null) + hashCode = hashCode * 59 + this.ModifiedAt.GetHashCode(); + if (this.InlineImageActivation != null) + hashCode = hashCode * 59 + this.InlineImageActivation.GetHashCode(); + if (this.MirrorActive != null) + hashCode = hashCode * 59 + this.MirrorActive.GetHashCode(); + if (this.Recurring != null) + hashCode = hashCode * 59 + this.Recurring.GetHashCode(); + if (this.SentDate != null) + hashCode = hashCode * 59 + this.SentDate.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetExtendedCampaignOverviewSender.cs b/src/sib_api_v3_sdk/Model/GetExtendedCampaignOverviewSender.cs new file mode 100644 index 0000000..b453b0e --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetExtendedCampaignOverviewSender.cs @@ -0,0 +1,142 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetExtendedCampaignOverviewSender + /// + [DataContract] + public partial class GetExtendedCampaignOverviewSender : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Sender name of the campaign. + /// Sender email of the campaign. + public GetExtendedCampaignOverviewSender(string name = default(string), string email = default(string)) + { + this.Name = name; + this.Email = email; + } + + /// + /// Sender name of the campaign + /// + /// Sender name of the campaign + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Sender email of the campaign + /// + /// Sender email of the campaign + [DataMember(Name="email", EmitDefaultValue=false)] + public string Email { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetExtendedCampaignOverviewSender {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetExtendedCampaignOverviewSender); + } + + /// + /// Returns true if GetExtendedCampaignOverviewSender instances are equal + /// + /// Instance of GetExtendedCampaignOverviewSender to be compared + /// Boolean + public bool Equals(GetExtendedCampaignOverviewSender input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Email != null) + hashCode = hashCode * 59 + this.Email.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetExtendedCampaignStats.cs b/src/sib_api_v3_sdk/Model/GetExtendedCampaignStats.cs new file mode 100644 index 0000000..9b69a8a --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetExtendedCampaignStats.cs @@ -0,0 +1,262 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetExtendedCampaignStats + /// + [DataContract] + public partial class GetExtendedCampaignStats : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetExtendedCampaignStats() { } + /// + /// Initializes a new instance of the class. + /// + /// Overall statistics of the campaign (required). + /// List-wise statistics of the campaign. (required). + /// Number of clicks on mirror link (required). + /// Number of remaning emails to send (required). + /// Statistics about the number of clicks for the links (required). + /// statsByDomain (required). + public GetExtendedCampaignStats(Object globalStats = default(Object), List campaignStats = default(List), long? mirrorClick = default(long?), long? remaining = default(long?), Object linksStats = default(Object), GetStatsByDomain statsByDomain = default(GetStatsByDomain)) + { + // to ensure "globalStats" is required (not null) + if (globalStats == null) + { + throw new InvalidDataException("globalStats is a required property for GetExtendedCampaignStats and cannot be null"); + } + else + { + this.GlobalStats = globalStats; + } + // to ensure "campaignStats" is required (not null) + if (campaignStats == null) + { + throw new InvalidDataException("campaignStats is a required property for GetExtendedCampaignStats and cannot be null"); + } + else + { + this.CampaignStats = campaignStats; + } + // to ensure "mirrorClick" is required (not null) + if (mirrorClick == null) + { + throw new InvalidDataException("mirrorClick is a required property for GetExtendedCampaignStats and cannot be null"); + } + else + { + this.MirrorClick = mirrorClick; + } + // to ensure "remaining" is required (not null) + if (remaining == null) + { + throw new InvalidDataException("remaining is a required property for GetExtendedCampaignStats and cannot be null"); + } + else + { + this.Remaining = remaining; + } + // to ensure "linksStats" is required (not null) + if (linksStats == null) + { + throw new InvalidDataException("linksStats is a required property for GetExtendedCampaignStats and cannot be null"); + } + else + { + this.LinksStats = linksStats; + } + // to ensure "statsByDomain" is required (not null) + if (statsByDomain == null) + { + throw new InvalidDataException("statsByDomain is a required property for GetExtendedCampaignStats and cannot be null"); + } + else + { + this.StatsByDomain = statsByDomain; + } + } + + /// + /// Overall statistics of the campaign + /// + /// Overall statistics of the campaign + [DataMember(Name="globalStats", EmitDefaultValue=false)] + public Object GlobalStats { get; set; } + + /// + /// List-wise statistics of the campaign. + /// + /// List-wise statistics of the campaign. + [DataMember(Name="campaignStats", EmitDefaultValue=false)] + public List CampaignStats { get; set; } + + /// + /// Number of clicks on mirror link + /// + /// Number of clicks on mirror link + [DataMember(Name="mirrorClick", EmitDefaultValue=false)] + public long? MirrorClick { get; set; } + + /// + /// Number of remaning emails to send + /// + /// Number of remaning emails to send + [DataMember(Name="remaining", EmitDefaultValue=false)] + public long? Remaining { get; set; } + + /// + /// Statistics about the number of clicks for the links + /// + /// Statistics about the number of clicks for the links + [DataMember(Name="linksStats", EmitDefaultValue=false)] + public Object LinksStats { get; set; } + + /// + /// Gets or Sets StatsByDomain + /// + [DataMember(Name="statsByDomain", EmitDefaultValue=false)] + public GetStatsByDomain StatsByDomain { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetExtendedCampaignStats {\n"); + sb.Append(" GlobalStats: ").Append(GlobalStats).Append("\n"); + sb.Append(" CampaignStats: ").Append(CampaignStats).Append("\n"); + sb.Append(" MirrorClick: ").Append(MirrorClick).Append("\n"); + sb.Append(" Remaining: ").Append(Remaining).Append("\n"); + sb.Append(" LinksStats: ").Append(LinksStats).Append("\n"); + sb.Append(" StatsByDomain: ").Append(StatsByDomain).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetExtendedCampaignStats); + } + + /// + /// Returns true if GetExtendedCampaignStats instances are equal + /// + /// Instance of GetExtendedCampaignStats to be compared + /// Boolean + public bool Equals(GetExtendedCampaignStats input) + { + if (input == null) + return false; + + return + ( + this.GlobalStats == input.GlobalStats || + (this.GlobalStats != null && + this.GlobalStats.Equals(input.GlobalStats)) + ) && + ( + this.CampaignStats == input.CampaignStats || + this.CampaignStats != null && + this.CampaignStats.SequenceEqual(input.CampaignStats) + ) && + ( + this.MirrorClick == input.MirrorClick || + (this.MirrorClick != null && + this.MirrorClick.Equals(input.MirrorClick)) + ) && + ( + this.Remaining == input.Remaining || + (this.Remaining != null && + this.Remaining.Equals(input.Remaining)) + ) && + ( + this.LinksStats == input.LinksStats || + (this.LinksStats != null && + this.LinksStats.Equals(input.LinksStats)) + ) && + ( + this.StatsByDomain == input.StatsByDomain || + (this.StatsByDomain != null && + this.StatsByDomain.Equals(input.StatsByDomain)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.GlobalStats != null) + hashCode = hashCode * 59 + this.GlobalStats.GetHashCode(); + if (this.CampaignStats != null) + hashCode = hashCode * 59 + this.CampaignStats.GetHashCode(); + if (this.MirrorClick != null) + hashCode = hashCode * 59 + this.MirrorClick.GetHashCode(); + if (this.Remaining != null) + hashCode = hashCode * 59 + this.Remaining.GetHashCode(); + if (this.LinksStats != null) + hashCode = hashCode * 59 + this.LinksStats.GetHashCode(); + if (this.StatsByDomain != null) + hashCode = hashCode * 59 + this.StatsByDomain.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetExtendedClient.cs b/src/sib_api_v3_sdk/Model/GetExtendedClient.cs new file mode 100644 index 0000000..377a65e --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetExtendedClient.cs @@ -0,0 +1,237 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetExtendedClient + /// + [DataContract] + public partial class GetExtendedClient : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetExtendedClient() { } + /// + /// Initializes a new instance of the class. + /// + /// Login Email (required). + /// First Name (required). + /// Last Name (required). + /// Name of the company (required). + /// address (required). + public GetExtendedClient(string email = default(string), string firstName = default(string), string lastName = default(string), string companyName = default(string), GetExtendedClientAddress address = default(GetExtendedClientAddress)) + { + // to ensure "email" is required (not null) + if (email == null) + { + throw new InvalidDataException("email is a required property for GetExtendedClient and cannot be null"); + } + else + { + this.Email = email; + } + // to ensure "firstName" is required (not null) + if (firstName == null) + { + throw new InvalidDataException("firstName is a required property for GetExtendedClient and cannot be null"); + } + else + { + this.FirstName = firstName; + } + // to ensure "lastName" is required (not null) + if (lastName == null) + { + throw new InvalidDataException("lastName is a required property for GetExtendedClient and cannot be null"); + } + else + { + this.LastName = lastName; + } + // to ensure "companyName" is required (not null) + if (companyName == null) + { + throw new InvalidDataException("companyName is a required property for GetExtendedClient and cannot be null"); + } + else + { + this.CompanyName = companyName; + } + // to ensure "address" is required (not null) + if (address == null) + { + throw new InvalidDataException("address is a required property for GetExtendedClient and cannot be null"); + } + else + { + this.Address = address; + } + } + + /// + /// Login Email + /// + /// Login Email + [DataMember(Name="email", EmitDefaultValue=false)] + public string Email { get; set; } + + /// + /// First Name + /// + /// First Name + [DataMember(Name="firstName", EmitDefaultValue=false)] + public string FirstName { get; set; } + + /// + /// Last Name + /// + /// Last Name + [DataMember(Name="lastName", EmitDefaultValue=false)] + public string LastName { get; set; } + + /// + /// Name of the company + /// + /// Name of the company + [DataMember(Name="companyName", EmitDefaultValue=false)] + public string CompanyName { get; set; } + + /// + /// Gets or Sets Address + /// + [DataMember(Name="address", EmitDefaultValue=false)] + public GetExtendedClientAddress Address { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetExtendedClient {\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" FirstName: ").Append(FirstName).Append("\n"); + sb.Append(" LastName: ").Append(LastName).Append("\n"); + sb.Append(" CompanyName: ").Append(CompanyName).Append("\n"); + sb.Append(" Address: ").Append(Address).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetExtendedClient); + } + + /// + /// Returns true if GetExtendedClient instances are equal + /// + /// Instance of GetExtendedClient to be compared + /// Boolean + public bool Equals(GetExtendedClient input) + { + if (input == null) + return false; + + return + ( + this.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ) && + ( + this.FirstName == input.FirstName || + (this.FirstName != null && + this.FirstName.Equals(input.FirstName)) + ) && + ( + this.LastName == input.LastName || + (this.LastName != null && + this.LastName.Equals(input.LastName)) + ) && + ( + this.CompanyName == input.CompanyName || + (this.CompanyName != null && + this.CompanyName.Equals(input.CompanyName)) + ) && + ( + this.Address == input.Address || + (this.Address != null && + this.Address.Equals(input.Address)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Email != null) + hashCode = hashCode * 59 + this.Email.GetHashCode(); + if (this.FirstName != null) + hashCode = hashCode * 59 + this.FirstName.GetHashCode(); + if (this.LastName != null) + hashCode = hashCode * 59 + this.LastName.GetHashCode(); + if (this.CompanyName != null) + hashCode = hashCode * 59 + this.CompanyName.GetHashCode(); + if (this.Address != null) + hashCode = hashCode * 59 + this.Address.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetExtendedClientAddress.cs b/src/sib_api_v3_sdk/Model/GetExtendedClientAddress.cs new file mode 100644 index 0000000..d8bbb82 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetExtendedClientAddress.cs @@ -0,0 +1,213 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// Address informations + /// + [DataContract] + public partial class GetExtendedClientAddress : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetExtendedClientAddress() { } + /// + /// Initializes a new instance of the class. + /// + /// Street information (required). + /// City information (required). + /// Zip Code information (required). + /// Country information (required). + public GetExtendedClientAddress(string street = default(string), string city = default(string), string zipCode = default(string), string country = default(string)) + { + // to ensure "street" is required (not null) + if (street == null) + { + throw new InvalidDataException("street is a required property for GetExtendedClientAddress and cannot be null"); + } + else + { + this.Street = street; + } + // to ensure "city" is required (not null) + if (city == null) + { + throw new InvalidDataException("city is a required property for GetExtendedClientAddress and cannot be null"); + } + else + { + this.City = city; + } + // to ensure "zipCode" is required (not null) + if (zipCode == null) + { + throw new InvalidDataException("zipCode is a required property for GetExtendedClientAddress and cannot be null"); + } + else + { + this.ZipCode = zipCode; + } + // to ensure "country" is required (not null) + if (country == null) + { + throw new InvalidDataException("country is a required property for GetExtendedClientAddress and cannot be null"); + } + else + { + this.Country = country; + } + } + + /// + /// Street information + /// + /// Street information + [DataMember(Name="street", EmitDefaultValue=false)] + public string Street { get; set; } + + /// + /// City information + /// + /// City information + [DataMember(Name="city", EmitDefaultValue=false)] + public string City { get; set; } + + /// + /// Zip Code information + /// + /// Zip Code information + [DataMember(Name="zipCode", EmitDefaultValue=false)] + public string ZipCode { get; set; } + + /// + /// Country information + /// + /// Country information + [DataMember(Name="country", EmitDefaultValue=false)] + public string Country { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetExtendedClientAddress {\n"); + sb.Append(" Street: ").Append(Street).Append("\n"); + sb.Append(" City: ").Append(City).Append("\n"); + sb.Append(" ZipCode: ").Append(ZipCode).Append("\n"); + sb.Append(" Country: ").Append(Country).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetExtendedClientAddress); + } + + /// + /// Returns true if GetExtendedClientAddress instances are equal + /// + /// Instance of GetExtendedClientAddress to be compared + /// Boolean + public bool Equals(GetExtendedClientAddress input) + { + if (input == null) + return false; + + return + ( + this.Street == input.Street || + (this.Street != null && + this.Street.Equals(input.Street)) + ) && + ( + this.City == input.City || + (this.City != null && + this.City.Equals(input.City)) + ) && + ( + this.ZipCode == input.ZipCode || + (this.ZipCode != null && + this.ZipCode.Equals(input.ZipCode)) + ) && + ( + this.Country == input.Country || + (this.Country != null && + this.Country.Equals(input.Country)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Street != null) + hashCode = hashCode * 59 + this.Street.GetHashCode(); + if (this.City != null) + hashCode = hashCode * 59 + this.City.GetHashCode(); + if (this.ZipCode != null) + hashCode = hashCode * 59 + this.ZipCode.GetHashCode(); + if (this.Country != null) + hashCode = hashCode * 59 + this.Country.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetExtendedContactDetails.cs b/src/sib_api_v3_sdk/Model/GetExtendedContactDetails.cs new file mode 100644 index 0000000..edab65a --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetExtendedContactDetails.cs @@ -0,0 +1,352 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetExtendedContactDetails + /// + [DataContract] + public partial class GetExtendedContactDetails : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetExtendedContactDetails() { } + /// + /// Initializes a new instance of the class. + /// + /// Email address of the contact for which you requested the details (required). + /// ID of the contact for which you requested the details (required). + /// Blacklist status for email campaigns (true=blacklisted, false=not blacklisted) (required). + /// Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted) (required). + /// Creation UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) (required). + /// Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) (required). + /// listIds (required). + /// listUnsubscribed. + /// Set of attributes of the contact (required). + /// statistics (required). + public GetExtendedContactDetails(string email = default(string), long? id = default(long?), bool? emailBlacklisted = default(bool?), bool? smsBlacklisted = default(bool?), DateTime? createdAt = default(DateTime?), DateTime? modifiedAt = default(DateTime?), List listIds = default(List), List listUnsubscribed = default(List), Object attributes = default(Object), GetExtendedContactDetailsStatistics statistics = default(GetExtendedContactDetailsStatistics)) + { + // to ensure "email" is required (not null) + if (email == null) + { + throw new InvalidDataException("email is a required property for GetExtendedContactDetails and cannot be null"); + } + else + { + this.Email = email; + } + // to ensure "id" is required (not null) + if (id == null) + { + throw new InvalidDataException("id is a required property for GetExtendedContactDetails and cannot be null"); + } + else + { + this.Id = id; + } + // to ensure "emailBlacklisted" is required (not null) + if (emailBlacklisted == null) + { + throw new InvalidDataException("emailBlacklisted is a required property for GetExtendedContactDetails and cannot be null"); + } + else + { + this.EmailBlacklisted = emailBlacklisted; + } + // to ensure "smsBlacklisted" is required (not null) + if (smsBlacklisted == null) + { + throw new InvalidDataException("smsBlacklisted is a required property for GetExtendedContactDetails and cannot be null"); + } + else + { + this.SmsBlacklisted = smsBlacklisted; + } + // to ensure "createdAt" is required (not null) + if (createdAt == null) + { + throw new InvalidDataException("createdAt is a required property for GetExtendedContactDetails and cannot be null"); + } + else + { + this.CreatedAt = createdAt; + } + // to ensure "modifiedAt" is required (not null) + if (modifiedAt == null) + { + throw new InvalidDataException("modifiedAt is a required property for GetExtendedContactDetails and cannot be null"); + } + else + { + this.ModifiedAt = modifiedAt; + } + // to ensure "listIds" is required (not null) + if (listIds == null) + { + throw new InvalidDataException("listIds is a required property for GetExtendedContactDetails and cannot be null"); + } + else + { + this.ListIds = listIds; + } + // to ensure "attributes" is required (not null) + if (attributes == null) + { + throw new InvalidDataException("attributes is a required property for GetExtendedContactDetails and cannot be null"); + } + else + { + this.Attributes = attributes; + } + // to ensure "statistics" is required (not null) + if (statistics == null) + { + throw new InvalidDataException("statistics is a required property for GetExtendedContactDetails and cannot be null"); + } + else + { + this.Statistics = statistics; + } + this.ListUnsubscribed = listUnsubscribed; + } + + /// + /// Email address of the contact for which you requested the details + /// + /// Email address of the contact for which you requested the details + [DataMember(Name="email", EmitDefaultValue=false)] + public string Email { get; set; } + + /// + /// ID of the contact for which you requested the details + /// + /// ID of the contact for which you requested the details + [DataMember(Name="id", EmitDefaultValue=false)] + public long? Id { get; set; } + + /// + /// Blacklist status for email campaigns (true=blacklisted, false=not blacklisted) + /// + /// Blacklist status for email campaigns (true=blacklisted, false=not blacklisted) + [DataMember(Name="emailBlacklisted", EmitDefaultValue=false)] + public bool? EmailBlacklisted { get; set; } + + /// + /// Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted) + /// + /// Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted) + [DataMember(Name="smsBlacklisted", EmitDefaultValue=false)] + public bool? SmsBlacklisted { get; set; } + + /// + /// Creation UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) + /// + /// Creation UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) + [DataMember(Name="createdAt", EmitDefaultValue=false)] + public DateTime? CreatedAt { get; set; } + + /// + /// Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) + /// + /// Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) + [DataMember(Name="modifiedAt", EmitDefaultValue=false)] + public DateTime? ModifiedAt { get; set; } + + /// + /// Gets or Sets ListIds + /// + [DataMember(Name="listIds", EmitDefaultValue=false)] + public List ListIds { get; set; } + + /// + /// Gets or Sets ListUnsubscribed + /// + [DataMember(Name="listUnsubscribed", EmitDefaultValue=false)] + public List ListUnsubscribed { get; set; } + + /// + /// Set of attributes of the contact + /// + /// Set of attributes of the contact + [DataMember(Name="attributes", EmitDefaultValue=false)] + public Object Attributes { get; set; } + + /// + /// Gets or Sets Statistics + /// + [DataMember(Name="statistics", EmitDefaultValue=false)] + public GetExtendedContactDetailsStatistics Statistics { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetExtendedContactDetails {\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" EmailBlacklisted: ").Append(EmailBlacklisted).Append("\n"); + sb.Append(" SmsBlacklisted: ").Append(SmsBlacklisted).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ModifiedAt: ").Append(ModifiedAt).Append("\n"); + sb.Append(" ListIds: ").Append(ListIds).Append("\n"); + sb.Append(" ListUnsubscribed: ").Append(ListUnsubscribed).Append("\n"); + sb.Append(" Attributes: ").Append(Attributes).Append("\n"); + sb.Append(" Statistics: ").Append(Statistics).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetExtendedContactDetails); + } + + /// + /// Returns true if GetExtendedContactDetails instances are equal + /// + /// Instance of GetExtendedContactDetails to be compared + /// Boolean + public bool Equals(GetExtendedContactDetails input) + { + if (input == null) + return false; + + return + ( + this.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ) && + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.EmailBlacklisted == input.EmailBlacklisted || + (this.EmailBlacklisted != null && + this.EmailBlacklisted.Equals(input.EmailBlacklisted)) + ) && + ( + this.SmsBlacklisted == input.SmsBlacklisted || + (this.SmsBlacklisted != null && + this.SmsBlacklisted.Equals(input.SmsBlacklisted)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.ModifiedAt == input.ModifiedAt || + (this.ModifiedAt != null && + this.ModifiedAt.Equals(input.ModifiedAt)) + ) && + ( + this.ListIds == input.ListIds || + this.ListIds != null && + this.ListIds.SequenceEqual(input.ListIds) + ) && + ( + this.ListUnsubscribed == input.ListUnsubscribed || + this.ListUnsubscribed != null && + this.ListUnsubscribed.SequenceEqual(input.ListUnsubscribed) + ) && + ( + this.Attributes == input.Attributes || + (this.Attributes != null && + this.Attributes.Equals(input.Attributes)) + ) && + ( + this.Statistics == input.Statistics || + (this.Statistics != null && + this.Statistics.Equals(input.Statistics)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Email != null) + hashCode = hashCode * 59 + this.Email.GetHashCode(); + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.EmailBlacklisted != null) + hashCode = hashCode * 59 + this.EmailBlacklisted.GetHashCode(); + if (this.SmsBlacklisted != null) + hashCode = hashCode * 59 + this.SmsBlacklisted.GetHashCode(); + if (this.CreatedAt != null) + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); + if (this.ModifiedAt != null) + hashCode = hashCode * 59 + this.ModifiedAt.GetHashCode(); + if (this.ListIds != null) + hashCode = hashCode * 59 + this.ListIds.GetHashCode(); + if (this.ListUnsubscribed != null) + hashCode = hashCode * 59 + this.ListUnsubscribed.GetHashCode(); + if (this.Attributes != null) + hashCode = hashCode * 59 + this.Attributes.GetHashCode(); + if (this.Statistics != null) + hashCode = hashCode * 59 + this.Statistics.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetExtendedContactDetailsStatistics.cs b/src/sib_api_v3_sdk/Model/GetExtendedContactDetailsStatistics.cs new file mode 100644 index 0000000..273507a --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetExtendedContactDetailsStatistics.cs @@ -0,0 +1,243 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// Campaign statistics of the contact + /// + [DataContract] + public partial class GetExtendedContactDetailsStatistics : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Listing of the sent campaign for the contact. + /// Listing of the hardbounes generated by the contact. + /// Listing of the softbounes generated by the contact. + /// Listing of the complaints generated by the contact. + /// unsubscriptions. + /// Listing of the openings generated by the contact. + /// Listing of the clicks generated by the contact. + /// Listing of the transactional attributes for the contact. + public GetExtendedContactDetailsStatistics(List messagesSent = default(List), List hardBounces = default(List), List softBounces = default(List), List complaints = default(List), GetExtendedContactDetailsStatisticsUnsubscriptions unsubscriptions = default(GetExtendedContactDetailsStatisticsUnsubscriptions), List opened = default(List), List clicked = default(List), List transacAttributes = default(List)) + { + this.MessagesSent = messagesSent; + this.HardBounces = hardBounces; + this.SoftBounces = softBounces; + this.Complaints = complaints; + this.Unsubscriptions = unsubscriptions; + this.Opened = opened; + this.Clicked = clicked; + this.TransacAttributes = transacAttributes; + } + + /// + /// Listing of the sent campaign for the contact + /// + /// Listing of the sent campaign for the contact + [DataMember(Name="messagesSent", EmitDefaultValue=false)] + public List MessagesSent { get; set; } + + /// + /// Listing of the hardbounes generated by the contact + /// + /// Listing of the hardbounes generated by the contact + [DataMember(Name="hardBounces", EmitDefaultValue=false)] + public List HardBounces { get; set; } + + /// + /// Listing of the softbounes generated by the contact + /// + /// Listing of the softbounes generated by the contact + [DataMember(Name="softBounces", EmitDefaultValue=false)] + public List SoftBounces { get; set; } + + /// + /// Listing of the complaints generated by the contact + /// + /// Listing of the complaints generated by the contact + [DataMember(Name="complaints", EmitDefaultValue=false)] + public List Complaints { get; set; } + + /// + /// Gets or Sets Unsubscriptions + /// + [DataMember(Name="unsubscriptions", EmitDefaultValue=false)] + public GetExtendedContactDetailsStatisticsUnsubscriptions Unsubscriptions { get; set; } + + /// + /// Listing of the openings generated by the contact + /// + /// Listing of the openings generated by the contact + [DataMember(Name="opened", EmitDefaultValue=false)] + public List Opened { get; set; } + + /// + /// Listing of the clicks generated by the contact + /// + /// Listing of the clicks generated by the contact + [DataMember(Name="clicked", EmitDefaultValue=false)] + public List Clicked { get; set; } + + /// + /// Listing of the transactional attributes for the contact + /// + /// Listing of the transactional attributes for the contact + [DataMember(Name="transacAttributes", EmitDefaultValue=false)] + public List TransacAttributes { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetExtendedContactDetailsStatistics {\n"); + sb.Append(" MessagesSent: ").Append(MessagesSent).Append("\n"); + sb.Append(" HardBounces: ").Append(HardBounces).Append("\n"); + sb.Append(" SoftBounces: ").Append(SoftBounces).Append("\n"); + sb.Append(" Complaints: ").Append(Complaints).Append("\n"); + sb.Append(" Unsubscriptions: ").Append(Unsubscriptions).Append("\n"); + sb.Append(" Opened: ").Append(Opened).Append("\n"); + sb.Append(" Clicked: ").Append(Clicked).Append("\n"); + sb.Append(" TransacAttributes: ").Append(TransacAttributes).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetExtendedContactDetailsStatistics); + } + + /// + /// Returns true if GetExtendedContactDetailsStatistics instances are equal + /// + /// Instance of GetExtendedContactDetailsStatistics to be compared + /// Boolean + public bool Equals(GetExtendedContactDetailsStatistics input) + { + if (input == null) + return false; + + return + ( + this.MessagesSent == input.MessagesSent || + this.MessagesSent != null && + this.MessagesSent.SequenceEqual(input.MessagesSent) + ) && + ( + this.HardBounces == input.HardBounces || + this.HardBounces != null && + this.HardBounces.SequenceEqual(input.HardBounces) + ) && + ( + this.SoftBounces == input.SoftBounces || + this.SoftBounces != null && + this.SoftBounces.SequenceEqual(input.SoftBounces) + ) && + ( + this.Complaints == input.Complaints || + this.Complaints != null && + this.Complaints.SequenceEqual(input.Complaints) + ) && + ( + this.Unsubscriptions == input.Unsubscriptions || + (this.Unsubscriptions != null && + this.Unsubscriptions.Equals(input.Unsubscriptions)) + ) && + ( + this.Opened == input.Opened || + this.Opened != null && + this.Opened.SequenceEqual(input.Opened) + ) && + ( + this.Clicked == input.Clicked || + this.Clicked != null && + this.Clicked.SequenceEqual(input.Clicked) + ) && + ( + this.TransacAttributes == input.TransacAttributes || + this.TransacAttributes != null && + this.TransacAttributes.SequenceEqual(input.TransacAttributes) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.MessagesSent != null) + hashCode = hashCode * 59 + this.MessagesSent.GetHashCode(); + if (this.HardBounces != null) + hashCode = hashCode * 59 + this.HardBounces.GetHashCode(); + if (this.SoftBounces != null) + hashCode = hashCode * 59 + this.SoftBounces.GetHashCode(); + if (this.Complaints != null) + hashCode = hashCode * 59 + this.Complaints.GetHashCode(); + if (this.Unsubscriptions != null) + hashCode = hashCode * 59 + this.Unsubscriptions.GetHashCode(); + if (this.Opened != null) + hashCode = hashCode * 59 + this.Opened.GetHashCode(); + if (this.Clicked != null) + hashCode = hashCode * 59 + this.Clicked.GetHashCode(); + if (this.TransacAttributes != null) + hashCode = hashCode * 59 + this.TransacAttributes.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetExtendedContactDetailsStatisticsClicked.cs b/src/sib_api_v3_sdk/Model/GetExtendedContactDetailsStatisticsClicked.cs new file mode 100644 index 0000000..af47d10 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetExtendedContactDetailsStatisticsClicked.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetExtendedContactDetailsStatisticsClicked + /// + [DataContract] + public partial class GetExtendedContactDetailsStatisticsClicked : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetExtendedContactDetailsStatisticsClicked() { } + /// + /// Initializes a new instance of the class. + /// + /// ID of the campaign which generated the event (required). + /// Listing of the clicked links for the campaign (required). + public GetExtendedContactDetailsStatisticsClicked(long? campaignId = default(long?), List links = default(List)) + { + // to ensure "campaignId" is required (not null) + if (campaignId == null) + { + throw new InvalidDataException("campaignId is a required property for GetExtendedContactDetailsStatisticsClicked and cannot be null"); + } + else + { + this.CampaignId = campaignId; + } + // to ensure "links" is required (not null) + if (links == null) + { + throw new InvalidDataException("links is a required property for GetExtendedContactDetailsStatisticsClicked and cannot be null"); + } + else + { + this.Links = links; + } + } + + /// + /// ID of the campaign which generated the event + /// + /// ID of the campaign which generated the event + [DataMember(Name="campaignId", EmitDefaultValue=false)] + public long? CampaignId { get; set; } + + /// + /// Listing of the clicked links for the campaign + /// + /// Listing of the clicked links for the campaign + [DataMember(Name="links", EmitDefaultValue=false)] + public List Links { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetExtendedContactDetailsStatisticsClicked {\n"); + sb.Append(" CampaignId: ").Append(CampaignId).Append("\n"); + sb.Append(" Links: ").Append(Links).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetExtendedContactDetailsStatisticsClicked); + } + + /// + /// Returns true if GetExtendedContactDetailsStatisticsClicked instances are equal + /// + /// Instance of GetExtendedContactDetailsStatisticsClicked to be compared + /// Boolean + public bool Equals(GetExtendedContactDetailsStatisticsClicked input) + { + if (input == null) + return false; + + return + ( + this.CampaignId == input.CampaignId || + (this.CampaignId != null && + this.CampaignId.Equals(input.CampaignId)) + ) && + ( + this.Links == input.Links || + this.Links != null && + this.Links.SequenceEqual(input.Links) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.CampaignId != null) + hashCode = hashCode * 59 + this.CampaignId.GetHashCode(); + if (this.Links != null) + hashCode = hashCode * 59 + this.Links.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetExtendedContactDetailsStatisticsLinks.cs b/src/sib_api_v3_sdk/Model/GetExtendedContactDetailsStatisticsLinks.cs new file mode 100644 index 0000000..ee4878e --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetExtendedContactDetailsStatisticsLinks.cs @@ -0,0 +1,213 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetExtendedContactDetailsStatisticsLinks + /// + [DataContract] + public partial class GetExtendedContactDetailsStatisticsLinks : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetExtendedContactDetailsStatisticsLinks() { } + /// + /// Initializes a new instance of the class. + /// + /// Number of clicks on this link for the campaign (required). + /// UTC date-time of the event (required). + /// IP from which the user has clicked on the link (required). + /// URL of the clicked link (required). + public GetExtendedContactDetailsStatisticsLinks(long? count = default(long?), DateTime? eventTime = default(DateTime?), string ip = default(string), string url = default(string)) + { + // to ensure "count" is required (not null) + if (count == null) + { + throw new InvalidDataException("count is a required property for GetExtendedContactDetailsStatisticsLinks and cannot be null"); + } + else + { + this.Count = count; + } + // to ensure "eventTime" is required (not null) + if (eventTime == null) + { + throw new InvalidDataException("eventTime is a required property for GetExtendedContactDetailsStatisticsLinks and cannot be null"); + } + else + { + this.EventTime = eventTime; + } + // to ensure "ip" is required (not null) + if (ip == null) + { + throw new InvalidDataException("ip is a required property for GetExtendedContactDetailsStatisticsLinks and cannot be null"); + } + else + { + this.Ip = ip; + } + // to ensure "url" is required (not null) + if (url == null) + { + throw new InvalidDataException("url is a required property for GetExtendedContactDetailsStatisticsLinks and cannot be null"); + } + else + { + this.Url = url; + } + } + + /// + /// Number of clicks on this link for the campaign + /// + /// Number of clicks on this link for the campaign + [DataMember(Name="count", EmitDefaultValue=false)] + public long? Count { get; set; } + + /// + /// UTC date-time of the event + /// + /// UTC date-time of the event + [DataMember(Name="eventTime", EmitDefaultValue=false)] + public DateTime? EventTime { get; set; } + + /// + /// IP from which the user has clicked on the link + /// + /// IP from which the user has clicked on the link + [DataMember(Name="ip", EmitDefaultValue=false)] + public string Ip { get; set; } + + /// + /// URL of the clicked link + /// + /// URL of the clicked link + [DataMember(Name="url", EmitDefaultValue=false)] + public string Url { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetExtendedContactDetailsStatisticsLinks {\n"); + sb.Append(" Count: ").Append(Count).Append("\n"); + sb.Append(" EventTime: ").Append(EventTime).Append("\n"); + sb.Append(" Ip: ").Append(Ip).Append("\n"); + sb.Append(" Url: ").Append(Url).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetExtendedContactDetailsStatisticsLinks); + } + + /// + /// Returns true if GetExtendedContactDetailsStatisticsLinks instances are equal + /// + /// Instance of GetExtendedContactDetailsStatisticsLinks to be compared + /// Boolean + public bool Equals(GetExtendedContactDetailsStatisticsLinks input) + { + if (input == null) + return false; + + return + ( + this.Count == input.Count || + (this.Count != null && + this.Count.Equals(input.Count)) + ) && + ( + this.EventTime == input.EventTime || + (this.EventTime != null && + this.EventTime.Equals(input.EventTime)) + ) && + ( + this.Ip == input.Ip || + (this.Ip != null && + this.Ip.Equals(input.Ip)) + ) && + ( + this.Url == input.Url || + (this.Url != null && + this.Url.Equals(input.Url)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Count != null) + hashCode = hashCode * 59 + this.Count.GetHashCode(); + if (this.EventTime != null) + hashCode = hashCode * 59 + this.EventTime.GetHashCode(); + if (this.Ip != null) + hashCode = hashCode * 59 + this.Ip.GetHashCode(); + if (this.Url != null) + hashCode = hashCode * 59 + this.Url.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetExtendedContactDetailsStatisticsMessagesSent.cs b/src/sib_api_v3_sdk/Model/GetExtendedContactDetailsStatisticsMessagesSent.cs new file mode 100644 index 0000000..7a2dca2 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetExtendedContactDetailsStatisticsMessagesSent.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetExtendedContactDetailsStatisticsMessagesSent + /// + [DataContract] + public partial class GetExtendedContactDetailsStatisticsMessagesSent : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetExtendedContactDetailsStatisticsMessagesSent() { } + /// + /// Initializes a new instance of the class. + /// + /// ID of the campaign which generated the event (required). + /// UTC date-time of the event (required). + public GetExtendedContactDetailsStatisticsMessagesSent(long? campaignId = default(long?), DateTime? eventTime = default(DateTime?)) + { + // to ensure "campaignId" is required (not null) + if (campaignId == null) + { + throw new InvalidDataException("campaignId is a required property for GetExtendedContactDetailsStatisticsMessagesSent and cannot be null"); + } + else + { + this.CampaignId = campaignId; + } + // to ensure "eventTime" is required (not null) + if (eventTime == null) + { + throw new InvalidDataException("eventTime is a required property for GetExtendedContactDetailsStatisticsMessagesSent and cannot be null"); + } + else + { + this.EventTime = eventTime; + } + } + + /// + /// ID of the campaign which generated the event + /// + /// ID of the campaign which generated the event + [DataMember(Name="campaignId", EmitDefaultValue=false)] + public long? CampaignId { get; set; } + + /// + /// UTC date-time of the event + /// + /// UTC date-time of the event + [DataMember(Name="eventTime", EmitDefaultValue=false)] + public DateTime? EventTime { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetExtendedContactDetailsStatisticsMessagesSent {\n"); + sb.Append(" CampaignId: ").Append(CampaignId).Append("\n"); + sb.Append(" EventTime: ").Append(EventTime).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetExtendedContactDetailsStatisticsMessagesSent); + } + + /// + /// Returns true if GetExtendedContactDetailsStatisticsMessagesSent instances are equal + /// + /// Instance of GetExtendedContactDetailsStatisticsMessagesSent to be compared + /// Boolean + public bool Equals(GetExtendedContactDetailsStatisticsMessagesSent input) + { + if (input == null) + return false; + + return + ( + this.CampaignId == input.CampaignId || + (this.CampaignId != null && + this.CampaignId.Equals(input.CampaignId)) + ) && + ( + this.EventTime == input.EventTime || + (this.EventTime != null && + this.EventTime.Equals(input.EventTime)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.CampaignId != null) + hashCode = hashCode * 59 + this.CampaignId.GetHashCode(); + if (this.EventTime != null) + hashCode = hashCode * 59 + this.EventTime.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetExtendedContactDetailsStatisticsOpened.cs b/src/sib_api_v3_sdk/Model/GetExtendedContactDetailsStatisticsOpened.cs new file mode 100644 index 0000000..7a9733e --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetExtendedContactDetailsStatisticsOpened.cs @@ -0,0 +1,213 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetExtendedContactDetailsStatisticsOpened + /// + [DataContract] + public partial class GetExtendedContactDetailsStatisticsOpened : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetExtendedContactDetailsStatisticsOpened() { } + /// + /// Initializes a new instance of the class. + /// + /// ID of the campaign which generated the event (required). + /// Number of openings for the campaign (required). + /// UTC date-time of the event (required). + /// IP from which the user has opened the email (required). + public GetExtendedContactDetailsStatisticsOpened(long? campaignId = default(long?), long? count = default(long?), DateTime? eventTime = default(DateTime?), string ip = default(string)) + { + // to ensure "campaignId" is required (not null) + if (campaignId == null) + { + throw new InvalidDataException("campaignId is a required property for GetExtendedContactDetailsStatisticsOpened and cannot be null"); + } + else + { + this.CampaignId = campaignId; + } + // to ensure "count" is required (not null) + if (count == null) + { + throw new InvalidDataException("count is a required property for GetExtendedContactDetailsStatisticsOpened and cannot be null"); + } + else + { + this.Count = count; + } + // to ensure "eventTime" is required (not null) + if (eventTime == null) + { + throw new InvalidDataException("eventTime is a required property for GetExtendedContactDetailsStatisticsOpened and cannot be null"); + } + else + { + this.EventTime = eventTime; + } + // to ensure "ip" is required (not null) + if (ip == null) + { + throw new InvalidDataException("ip is a required property for GetExtendedContactDetailsStatisticsOpened and cannot be null"); + } + else + { + this.Ip = ip; + } + } + + /// + /// ID of the campaign which generated the event + /// + /// ID of the campaign which generated the event + [DataMember(Name="campaignId", EmitDefaultValue=false)] + public long? CampaignId { get; set; } + + /// + /// Number of openings for the campaign + /// + /// Number of openings for the campaign + [DataMember(Name="count", EmitDefaultValue=false)] + public long? Count { get; set; } + + /// + /// UTC date-time of the event + /// + /// UTC date-time of the event + [DataMember(Name="eventTime", EmitDefaultValue=false)] + public DateTime? EventTime { get; set; } + + /// + /// IP from which the user has opened the email + /// + /// IP from which the user has opened the email + [DataMember(Name="ip", EmitDefaultValue=false)] + public string Ip { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetExtendedContactDetailsStatisticsOpened {\n"); + sb.Append(" CampaignId: ").Append(CampaignId).Append("\n"); + sb.Append(" Count: ").Append(Count).Append("\n"); + sb.Append(" EventTime: ").Append(EventTime).Append("\n"); + sb.Append(" Ip: ").Append(Ip).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetExtendedContactDetailsStatisticsOpened); + } + + /// + /// Returns true if GetExtendedContactDetailsStatisticsOpened instances are equal + /// + /// Instance of GetExtendedContactDetailsStatisticsOpened to be compared + /// Boolean + public bool Equals(GetExtendedContactDetailsStatisticsOpened input) + { + if (input == null) + return false; + + return + ( + this.CampaignId == input.CampaignId || + (this.CampaignId != null && + this.CampaignId.Equals(input.CampaignId)) + ) && + ( + this.Count == input.Count || + (this.Count != null && + this.Count.Equals(input.Count)) + ) && + ( + this.EventTime == input.EventTime || + (this.EventTime != null && + this.EventTime.Equals(input.EventTime)) + ) && + ( + this.Ip == input.Ip || + (this.Ip != null && + this.Ip.Equals(input.Ip)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.CampaignId != null) + hashCode = hashCode * 59 + this.CampaignId.GetHashCode(); + if (this.Count != null) + hashCode = hashCode * 59 + this.Count.GetHashCode(); + if (this.EventTime != null) + hashCode = hashCode * 59 + this.EventTime.GetHashCode(); + if (this.Ip != null) + hashCode = hashCode * 59 + this.Ip.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetExtendedContactDetailsStatisticsUnsubscriptions.cs b/src/sib_api_v3_sdk/Model/GetExtendedContactDetailsStatisticsUnsubscriptions.cs new file mode 100644 index 0000000..18434b8 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetExtendedContactDetailsStatisticsUnsubscriptions.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// Listing of the unsubscription for the contact + /// + [DataContract] + public partial class GetExtendedContactDetailsStatisticsUnsubscriptions : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetExtendedContactDetailsStatisticsUnsubscriptions() { } + /// + /// Initializes a new instance of the class. + /// + /// Contact unsubscribe via unsubscription link in a campaign (required). + /// Contact has been unsubscribed from the administrator (required). + public GetExtendedContactDetailsStatisticsUnsubscriptions(List userUnsubscription = default(List), List adminUnsubscription = default(List)) + { + // to ensure "userUnsubscription" is required (not null) + if (userUnsubscription == null) + { + throw new InvalidDataException("userUnsubscription is a required property for GetExtendedContactDetailsStatisticsUnsubscriptions and cannot be null"); + } + else + { + this.UserUnsubscription = userUnsubscription; + } + // to ensure "adminUnsubscription" is required (not null) + if (adminUnsubscription == null) + { + throw new InvalidDataException("adminUnsubscription is a required property for GetExtendedContactDetailsStatisticsUnsubscriptions and cannot be null"); + } + else + { + this.AdminUnsubscription = adminUnsubscription; + } + } + + /// + /// Contact unsubscribe via unsubscription link in a campaign + /// + /// Contact unsubscribe via unsubscription link in a campaign + [DataMember(Name="userUnsubscription", EmitDefaultValue=false)] + public List UserUnsubscription { get; set; } + + /// + /// Contact has been unsubscribed from the administrator + /// + /// Contact has been unsubscribed from the administrator + [DataMember(Name="adminUnsubscription", EmitDefaultValue=false)] + public List AdminUnsubscription { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetExtendedContactDetailsStatisticsUnsubscriptions {\n"); + sb.Append(" UserUnsubscription: ").Append(UserUnsubscription).Append("\n"); + sb.Append(" AdminUnsubscription: ").Append(AdminUnsubscription).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetExtendedContactDetailsStatisticsUnsubscriptions); + } + + /// + /// Returns true if GetExtendedContactDetailsStatisticsUnsubscriptions instances are equal + /// + /// Instance of GetExtendedContactDetailsStatisticsUnsubscriptions to be compared + /// Boolean + public bool Equals(GetExtendedContactDetailsStatisticsUnsubscriptions input) + { + if (input == null) + return false; + + return + ( + this.UserUnsubscription == input.UserUnsubscription || + this.UserUnsubscription != null && + this.UserUnsubscription.SequenceEqual(input.UserUnsubscription) + ) && + ( + this.AdminUnsubscription == input.AdminUnsubscription || + this.AdminUnsubscription != null && + this.AdminUnsubscription.SequenceEqual(input.AdminUnsubscription) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.UserUnsubscription != null) + hashCode = hashCode * 59 + this.UserUnsubscription.GetHashCode(); + if (this.AdminUnsubscription != null) + hashCode = hashCode * 59 + this.AdminUnsubscription.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.cs b/src/sib_api_v3_sdk/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.cs new file mode 100644 index 0000000..f3e0355 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription + /// + [DataContract] + public partial class GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription() { } + /// + /// Initializes a new instance of the class. + /// + /// UTC date-time of the event (required). + /// IP from which the user has been unsubscribed (required). + public GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription(DateTime? eventTime = default(DateTime?), string ip = default(string)) + { + // to ensure "eventTime" is required (not null) + if (eventTime == null) + { + throw new InvalidDataException("eventTime is a required property for GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription and cannot be null"); + } + else + { + this.EventTime = eventTime; + } + // to ensure "ip" is required (not null) + if (ip == null) + { + throw new InvalidDataException("ip is a required property for GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription and cannot be null"); + } + else + { + this.Ip = ip; + } + } + + /// + /// UTC date-time of the event + /// + /// UTC date-time of the event + [DataMember(Name="eventTime", EmitDefaultValue=false)] + public DateTime? EventTime { get; set; } + + /// + /// IP from which the user has been unsubscribed + /// + /// IP from which the user has been unsubscribed + [DataMember(Name="ip", EmitDefaultValue=false)] + public string Ip { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription {\n"); + sb.Append(" EventTime: ").Append(EventTime).Append("\n"); + sb.Append(" Ip: ").Append(Ip).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription); + } + + /// + /// Returns true if GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription instances are equal + /// + /// Instance of GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription to be compared + /// Boolean + public bool Equals(GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription input) + { + if (input == null) + return false; + + return + ( + this.EventTime == input.EventTime || + (this.EventTime != null && + this.EventTime.Equals(input.EventTime)) + ) && + ( + this.Ip == input.Ip || + (this.Ip != null && + this.Ip.Equals(input.Ip)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.EventTime != null) + hashCode = hashCode * 59 + this.EventTime.GetHashCode(); + if (this.Ip != null) + hashCode = hashCode * 59 + this.Ip.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.cs b/src/sib_api_v3_sdk/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.cs new file mode 100644 index 0000000..6236259 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.cs @@ -0,0 +1,188 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription + /// + [DataContract] + public partial class GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription() { } + /// + /// Initializes a new instance of the class. + /// + /// ID of the campaign which generated the event (required). + /// UTC date-time of the event (required). + /// IP from which the user has unsubscribed (required). + public GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription(long? campaignId = default(long?), DateTime? eventTime = default(DateTime?), string ip = default(string)) + { + // to ensure "campaignId" is required (not null) + if (campaignId == null) + { + throw new InvalidDataException("campaignId is a required property for GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription and cannot be null"); + } + else + { + this.CampaignId = campaignId; + } + // to ensure "eventTime" is required (not null) + if (eventTime == null) + { + throw new InvalidDataException("eventTime is a required property for GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription and cannot be null"); + } + else + { + this.EventTime = eventTime; + } + // to ensure "ip" is required (not null) + if (ip == null) + { + throw new InvalidDataException("ip is a required property for GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription and cannot be null"); + } + else + { + this.Ip = ip; + } + } + + /// + /// ID of the campaign which generated the event + /// + /// ID of the campaign which generated the event + [DataMember(Name="campaignId", EmitDefaultValue=false)] + public long? CampaignId { get; set; } + + /// + /// UTC date-time of the event + /// + /// UTC date-time of the event + [DataMember(Name="eventTime", EmitDefaultValue=false)] + public DateTime? EventTime { get; set; } + + /// + /// IP from which the user has unsubscribed + /// + /// IP from which the user has unsubscribed + [DataMember(Name="ip", EmitDefaultValue=false)] + public string Ip { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription {\n"); + sb.Append(" CampaignId: ").Append(CampaignId).Append("\n"); + sb.Append(" EventTime: ").Append(EventTime).Append("\n"); + sb.Append(" Ip: ").Append(Ip).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription); + } + + /// + /// Returns true if GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription instances are equal + /// + /// Instance of GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription to be compared + /// Boolean + public bool Equals(GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription input) + { + if (input == null) + return false; + + return + ( + this.CampaignId == input.CampaignId || + (this.CampaignId != null && + this.CampaignId.Equals(input.CampaignId)) + ) && + ( + this.EventTime == input.EventTime || + (this.EventTime != null && + this.EventTime.Equals(input.EventTime)) + ) && + ( + this.Ip == input.Ip || + (this.Ip != null && + this.Ip.Equals(input.Ip)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.CampaignId != null) + hashCode = hashCode * 59 + this.CampaignId.GetHashCode(); + if (this.EventTime != null) + hashCode = hashCode * 59 + this.EventTime.GetHashCode(); + if (this.Ip != null) + hashCode = hashCode * 59 + this.Ip.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetExtendedList.cs b/src/sib_api_v3_sdk/Model/GetExtendedList.cs new file mode 100644 index 0000000..561aa51 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetExtendedList.cs @@ -0,0 +1,296 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetExtendedList + /// + [DataContract] + public partial class GetExtendedList : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetExtendedList() { } + /// + /// Initializes a new instance of the class. + /// + /// ID of the list (required). + /// Name of the list (required). + /// Number of blacklisted contacts in the list (required). + /// Number of contacts in the list (required). + /// ID of the folder (required). + /// Creation UTC date-time of the list (YYYY-MM-DDTHH:mm:ss.SSSZ) (required). + /// campaignStats. + /// Status telling if the list is dynamic or not (true=dynamic, false=not dynamic). + public GetExtendedList(long? id = default(long?), string name = default(string), long? totalBlacklisted = default(long?), long? totalSubscribers = default(long?), long? folderId = default(long?), DateTime? createdAt = default(DateTime?), List campaignStats = default(List), bool? dynamicList = default(bool?)) + { + // to ensure "id" is required (not null) + if (id == null) + { + throw new InvalidDataException("id is a required property for GetExtendedList and cannot be null"); + } + else + { + this.Id = id; + } + // to ensure "name" is required (not null) + if (name == null) + { + throw new InvalidDataException("name is a required property for GetExtendedList and cannot be null"); + } + else + { + this.Name = name; + } + // to ensure "totalBlacklisted" is required (not null) + if (totalBlacklisted == null) + { + throw new InvalidDataException("totalBlacklisted is a required property for GetExtendedList and cannot be null"); + } + else + { + this.TotalBlacklisted = totalBlacklisted; + } + // to ensure "totalSubscribers" is required (not null) + if (totalSubscribers == null) + { + throw new InvalidDataException("totalSubscribers is a required property for GetExtendedList and cannot be null"); + } + else + { + this.TotalSubscribers = totalSubscribers; + } + // to ensure "folderId" is required (not null) + if (folderId == null) + { + throw new InvalidDataException("folderId is a required property for GetExtendedList and cannot be null"); + } + else + { + this.FolderId = folderId; + } + // to ensure "createdAt" is required (not null) + if (createdAt == null) + { + throw new InvalidDataException("createdAt is a required property for GetExtendedList and cannot be null"); + } + else + { + this.CreatedAt = createdAt; + } + this.CampaignStats = campaignStats; + this.DynamicList = dynamicList; + } + + /// + /// ID of the list + /// + /// ID of the list + [DataMember(Name="id", EmitDefaultValue=false)] + public long? Id { get; set; } + + /// + /// Name of the list + /// + /// Name of the list + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Number of blacklisted contacts in the list + /// + /// Number of blacklisted contacts in the list + [DataMember(Name="totalBlacklisted", EmitDefaultValue=false)] + public long? TotalBlacklisted { get; set; } + + /// + /// Number of contacts in the list + /// + /// Number of contacts in the list + [DataMember(Name="totalSubscribers", EmitDefaultValue=false)] + public long? TotalSubscribers { get; set; } + + /// + /// ID of the folder + /// + /// ID of the folder + [DataMember(Name="folderId", EmitDefaultValue=false)] + public long? FolderId { get; set; } + + /// + /// Creation UTC date-time of the list (YYYY-MM-DDTHH:mm:ss.SSSZ) + /// + /// Creation UTC date-time of the list (YYYY-MM-DDTHH:mm:ss.SSSZ) + [DataMember(Name="createdAt", EmitDefaultValue=false)] + public DateTime? CreatedAt { get; set; } + + /// + /// Gets or Sets CampaignStats + /// + [DataMember(Name="campaignStats", EmitDefaultValue=false)] + public List CampaignStats { get; set; } + + /// + /// Status telling if the list is dynamic or not (true=dynamic, false=not dynamic) + /// + /// Status telling if the list is dynamic or not (true=dynamic, false=not dynamic) + [DataMember(Name="dynamicList", EmitDefaultValue=false)] + public bool? DynamicList { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetExtendedList {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" TotalBlacklisted: ").Append(TotalBlacklisted).Append("\n"); + sb.Append(" TotalSubscribers: ").Append(TotalSubscribers).Append("\n"); + sb.Append(" FolderId: ").Append(FolderId).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" CampaignStats: ").Append(CampaignStats).Append("\n"); + sb.Append(" DynamicList: ").Append(DynamicList).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetExtendedList); + } + + /// + /// Returns true if GetExtendedList instances are equal + /// + /// Instance of GetExtendedList to be compared + /// Boolean + public bool Equals(GetExtendedList input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.TotalBlacklisted == input.TotalBlacklisted || + (this.TotalBlacklisted != null && + this.TotalBlacklisted.Equals(input.TotalBlacklisted)) + ) && + ( + this.TotalSubscribers == input.TotalSubscribers || + (this.TotalSubscribers != null && + this.TotalSubscribers.Equals(input.TotalSubscribers)) + ) && + ( + this.FolderId == input.FolderId || + (this.FolderId != null && + this.FolderId.Equals(input.FolderId)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.CampaignStats == input.CampaignStats || + this.CampaignStats != null && + this.CampaignStats.SequenceEqual(input.CampaignStats) + ) && + ( + this.DynamicList == input.DynamicList || + (this.DynamicList != null && + this.DynamicList.Equals(input.DynamicList)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.TotalBlacklisted != null) + hashCode = hashCode * 59 + this.TotalBlacklisted.GetHashCode(); + if (this.TotalSubscribers != null) + hashCode = hashCode * 59 + this.TotalSubscribers.GetHashCode(); + if (this.FolderId != null) + hashCode = hashCode * 59 + this.FolderId.GetHashCode(); + if (this.CreatedAt != null) + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); + if (this.CampaignStats != null) + hashCode = hashCode * 59 + this.CampaignStats.GetHashCode(); + if (this.DynamicList != null) + hashCode = hashCode * 59 + this.DynamicList.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetExtendedListCampaignStats.cs b/src/sib_api_v3_sdk/Model/GetExtendedListCampaignStats.cs new file mode 100644 index 0000000..3a00bab --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetExtendedListCampaignStats.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetExtendedListCampaignStats + /// + [DataContract] + public partial class GetExtendedListCampaignStats : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetExtendedListCampaignStats() { } + /// + /// Initializes a new instance of the class. + /// + /// ID of the campaign (required). + /// stats (required). + public GetExtendedListCampaignStats(long? campaignId = default(long?), GetCampaignStats stats = default(GetCampaignStats)) + { + // to ensure "campaignId" is required (not null) + if (campaignId == null) + { + throw new InvalidDataException("campaignId is a required property for GetExtendedListCampaignStats and cannot be null"); + } + else + { + this.CampaignId = campaignId; + } + // to ensure "stats" is required (not null) + if (stats == null) + { + throw new InvalidDataException("stats is a required property for GetExtendedListCampaignStats and cannot be null"); + } + else + { + this.Stats = stats; + } + } + + /// + /// ID of the campaign + /// + /// ID of the campaign + [DataMember(Name="campaignId", EmitDefaultValue=false)] + public long? CampaignId { get; set; } + + /// + /// Gets or Sets Stats + /// + [DataMember(Name="stats", EmitDefaultValue=false)] + public GetCampaignStats Stats { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetExtendedListCampaignStats {\n"); + sb.Append(" CampaignId: ").Append(CampaignId).Append("\n"); + sb.Append(" Stats: ").Append(Stats).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetExtendedListCampaignStats); + } + + /// + /// Returns true if GetExtendedListCampaignStats instances are equal + /// + /// Instance of GetExtendedListCampaignStats to be compared + /// Boolean + public bool Equals(GetExtendedListCampaignStats input) + { + if (input == null) + return false; + + return + ( + this.CampaignId == input.CampaignId || + (this.CampaignId != null && + this.CampaignId.Equals(input.CampaignId)) + ) && + ( + this.Stats == input.Stats || + (this.Stats != null && + this.Stats.Equals(input.Stats)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.CampaignId != null) + hashCode = hashCode * 59 + this.CampaignId.GetHashCode(); + if (this.Stats != null) + hashCode = hashCode * 59 + this.Stats.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetFolder.cs b/src/sib_api_v3_sdk/Model/GetFolder.cs new file mode 100644 index 0000000..e4bc6e1 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetFolder.cs @@ -0,0 +1,238 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetFolder + /// + [DataContract] + public partial class GetFolder : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetFolder() { } + /// + /// Initializes a new instance of the class. + /// + /// ID of the folder (required). + /// Name of the folder (required). + /// Number of blacklisted contacts in the folder (required). + /// Number of contacts in the folder (required). + /// Number of unique contacts in the folder (required). + public GetFolder(long? id = default(long?), string name = default(string), long? totalBlacklisted = default(long?), long? totalSubscribers = default(long?), long? uniqueSubscribers = default(long?)) + { + // to ensure "id" is required (not null) + if (id == null) + { + throw new InvalidDataException("id is a required property for GetFolder and cannot be null"); + } + else + { + this.Id = id; + } + // to ensure "name" is required (not null) + if (name == null) + { + throw new InvalidDataException("name is a required property for GetFolder and cannot be null"); + } + else + { + this.Name = name; + } + // to ensure "totalBlacklisted" is required (not null) + if (totalBlacklisted == null) + { + throw new InvalidDataException("totalBlacklisted is a required property for GetFolder and cannot be null"); + } + else + { + this.TotalBlacklisted = totalBlacklisted; + } + // to ensure "totalSubscribers" is required (not null) + if (totalSubscribers == null) + { + throw new InvalidDataException("totalSubscribers is a required property for GetFolder and cannot be null"); + } + else + { + this.TotalSubscribers = totalSubscribers; + } + // to ensure "uniqueSubscribers" is required (not null) + if (uniqueSubscribers == null) + { + throw new InvalidDataException("uniqueSubscribers is a required property for GetFolder and cannot be null"); + } + else + { + this.UniqueSubscribers = uniqueSubscribers; + } + } + + /// + /// ID of the folder + /// + /// ID of the folder + [DataMember(Name="id", EmitDefaultValue=false)] + public long? Id { get; set; } + + /// + /// Name of the folder + /// + /// Name of the folder + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Number of blacklisted contacts in the folder + /// + /// Number of blacklisted contacts in the folder + [DataMember(Name="totalBlacklisted", EmitDefaultValue=false)] + public long? TotalBlacklisted { get; set; } + + /// + /// Number of contacts in the folder + /// + /// Number of contacts in the folder + [DataMember(Name="totalSubscribers", EmitDefaultValue=false)] + public long? TotalSubscribers { get; set; } + + /// + /// Number of unique contacts in the folder + /// + /// Number of unique contacts in the folder + [DataMember(Name="uniqueSubscribers", EmitDefaultValue=false)] + public long? UniqueSubscribers { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetFolder {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" TotalBlacklisted: ").Append(TotalBlacklisted).Append("\n"); + sb.Append(" TotalSubscribers: ").Append(TotalSubscribers).Append("\n"); + sb.Append(" UniqueSubscribers: ").Append(UniqueSubscribers).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetFolder); + } + + /// + /// Returns true if GetFolder instances are equal + /// + /// Instance of GetFolder to be compared + /// Boolean + public bool Equals(GetFolder input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.TotalBlacklisted == input.TotalBlacklisted || + (this.TotalBlacklisted != null && + this.TotalBlacklisted.Equals(input.TotalBlacklisted)) + ) && + ( + this.TotalSubscribers == input.TotalSubscribers || + (this.TotalSubscribers != null && + this.TotalSubscribers.Equals(input.TotalSubscribers)) + ) && + ( + this.UniqueSubscribers == input.UniqueSubscribers || + (this.UniqueSubscribers != null && + this.UniqueSubscribers.Equals(input.UniqueSubscribers)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.TotalBlacklisted != null) + hashCode = hashCode * 59 + this.TotalBlacklisted.GetHashCode(); + if (this.TotalSubscribers != null) + hashCode = hashCode * 59 + this.TotalSubscribers.GetHashCode(); + if (this.UniqueSubscribers != null) + hashCode = hashCode * 59 + this.UniqueSubscribers.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetFolderLists.cs b/src/sib_api_v3_sdk/Model/GetFolderLists.cs new file mode 100644 index 0000000..4fbd2e5 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetFolderLists.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetFolderLists + /// + [DataContract] + public partial class GetFolderLists : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetFolderLists() { } + /// + /// Initializes a new instance of the class. + /// + /// lists (required). + /// Number of lists in the folder (required). + public GetFolderLists(List lists = default(List), long? count = default(long?)) + { + // to ensure "lists" is required (not null) + if (lists == null) + { + throw new InvalidDataException("lists is a required property for GetFolderLists and cannot be null"); + } + else + { + this.Lists = lists; + } + // to ensure "count" is required (not null) + if (count == null) + { + throw new InvalidDataException("count is a required property for GetFolderLists and cannot be null"); + } + else + { + this.Count = count; + } + } + + /// + /// Gets or Sets Lists + /// + [DataMember(Name="lists", EmitDefaultValue=false)] + public List Lists { get; set; } + + /// + /// Number of lists in the folder + /// + /// Number of lists in the folder + [DataMember(Name="count", EmitDefaultValue=false)] + public long? Count { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetFolderLists {\n"); + sb.Append(" Lists: ").Append(Lists).Append("\n"); + sb.Append(" Count: ").Append(Count).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetFolderLists); + } + + /// + /// Returns true if GetFolderLists instances are equal + /// + /// Instance of GetFolderLists to be compared + /// Boolean + public bool Equals(GetFolderLists input) + { + if (input == null) + return false; + + return + ( + this.Lists == input.Lists || + this.Lists != null && + this.Lists.SequenceEqual(input.Lists) + ) && + ( + this.Count == input.Count || + (this.Count != null && + this.Count.Equals(input.Count)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Lists != null) + hashCode = hashCode * 59 + this.Lists.GetHashCode(); + if (this.Count != null) + hashCode = hashCode * 59 + this.Count.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetFolders.cs b/src/sib_api_v3_sdk/Model/GetFolders.cs new file mode 100644 index 0000000..0befaad --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetFolders.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetFolders + /// + [DataContract] + public partial class GetFolders : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// folders. + /// Number of folders available in your account. + public GetFolders(List folders = default(List), long? count = default(long?)) + { + this.Folders = folders; + this.Count = count; + } + + /// + /// Gets or Sets Folders + /// + [DataMember(Name="folders", EmitDefaultValue=false)] + public List Folders { get; set; } + + /// + /// Number of folders available in your account + /// + /// Number of folders available in your account + [DataMember(Name="count", EmitDefaultValue=false)] + public long? Count { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetFolders {\n"); + sb.Append(" Folders: ").Append(Folders).Append("\n"); + sb.Append(" Count: ").Append(Count).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetFolders); + } + + /// + /// Returns true if GetFolders instances are equal + /// + /// Instance of GetFolders to be compared + /// Boolean + public bool Equals(GetFolders input) + { + if (input == null) + return false; + + return + ( + this.Folders == input.Folders || + this.Folders != null && + this.Folders.SequenceEqual(input.Folders) + ) && + ( + this.Count == input.Count || + (this.Count != null && + this.Count.Equals(input.Count)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Folders != null) + hashCode = hashCode * 59 + this.Folders.GetHashCode(); + if (this.Count != null) + hashCode = hashCode * 59 + this.Count.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetIp.cs b/src/sib_api_v3_sdk/Model/GetIp.cs new file mode 100644 index 0000000..6889470 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetIp.cs @@ -0,0 +1,213 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetIp + /// + [DataContract] + public partial class GetIp : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetIp() { } + /// + /// Initializes a new instance of the class. + /// + /// ID of the dedicated IP (required). + /// Dedicated IP (required). + /// Status of the IP (true=active, false=inactive) (required). + /// Domain associated to the IP (required). + public GetIp(long? id = default(long?), string ip = default(string), bool? active = default(bool?), string domain = default(string)) + { + // to ensure "id" is required (not null) + if (id == null) + { + throw new InvalidDataException("id is a required property for GetIp and cannot be null"); + } + else + { + this.Id = id; + } + // to ensure "ip" is required (not null) + if (ip == null) + { + throw new InvalidDataException("ip is a required property for GetIp and cannot be null"); + } + else + { + this.Ip = ip; + } + // to ensure "active" is required (not null) + if (active == null) + { + throw new InvalidDataException("active is a required property for GetIp and cannot be null"); + } + else + { + this.Active = active; + } + // to ensure "domain" is required (not null) + if (domain == null) + { + throw new InvalidDataException("domain is a required property for GetIp and cannot be null"); + } + else + { + this.Domain = domain; + } + } + + /// + /// ID of the dedicated IP + /// + /// ID of the dedicated IP + [DataMember(Name="id", EmitDefaultValue=false)] + public long? Id { get; set; } + + /// + /// Dedicated IP + /// + /// Dedicated IP + [DataMember(Name="ip", EmitDefaultValue=false)] + public string Ip { get; set; } + + /// + /// Status of the IP (true=active, false=inactive) + /// + /// Status of the IP (true=active, false=inactive) + [DataMember(Name="active", EmitDefaultValue=false)] + public bool? Active { get; set; } + + /// + /// Domain associated to the IP + /// + /// Domain associated to the IP + [DataMember(Name="domain", EmitDefaultValue=false)] + public string Domain { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetIp {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Ip: ").Append(Ip).Append("\n"); + sb.Append(" Active: ").Append(Active).Append("\n"); + sb.Append(" Domain: ").Append(Domain).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetIp); + } + + /// + /// Returns true if GetIp instances are equal + /// + /// Instance of GetIp to be compared + /// Boolean + public bool Equals(GetIp input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Ip == input.Ip || + (this.Ip != null && + this.Ip.Equals(input.Ip)) + ) && + ( + this.Active == input.Active || + (this.Active != null && + this.Active.Equals(input.Active)) + ) && + ( + this.Domain == input.Domain || + (this.Domain != null && + this.Domain.Equals(input.Domain)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Ip != null) + hashCode = hashCode * 59 + this.Ip.GetHashCode(); + if (this.Active != null) + hashCode = hashCode * 59 + this.Active.GetHashCode(); + if (this.Domain != null) + hashCode = hashCode * 59 + this.Domain.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetIpFromSender.cs b/src/sib_api_v3_sdk/Model/GetIpFromSender.cs new file mode 100644 index 0000000..aa0e50e --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetIpFromSender.cs @@ -0,0 +1,213 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetIpFromSender + /// + [DataContract] + public partial class GetIpFromSender : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetIpFromSender() { } + /// + /// Initializes a new instance of the class. + /// + /// ID of the dedicated IP (required). + /// Dedicated IP (required). + /// Domain associated to the IP (required). + /// Weight of the IP (required). + public GetIpFromSender(long? id = default(long?), string ip = default(string), string domain = default(string), long? weight = default(long?)) + { + // to ensure "id" is required (not null) + if (id == null) + { + throw new InvalidDataException("id is a required property for GetIpFromSender and cannot be null"); + } + else + { + this.Id = id; + } + // to ensure "ip" is required (not null) + if (ip == null) + { + throw new InvalidDataException("ip is a required property for GetIpFromSender and cannot be null"); + } + else + { + this.Ip = ip; + } + // to ensure "domain" is required (not null) + if (domain == null) + { + throw new InvalidDataException("domain is a required property for GetIpFromSender and cannot be null"); + } + else + { + this.Domain = domain; + } + // to ensure "weight" is required (not null) + if (weight == null) + { + throw new InvalidDataException("weight is a required property for GetIpFromSender and cannot be null"); + } + else + { + this.Weight = weight; + } + } + + /// + /// ID of the dedicated IP + /// + /// ID of the dedicated IP + [DataMember(Name="id", EmitDefaultValue=false)] + public long? Id { get; set; } + + /// + /// Dedicated IP + /// + /// Dedicated IP + [DataMember(Name="ip", EmitDefaultValue=false)] + public string Ip { get; set; } + + /// + /// Domain associated to the IP + /// + /// Domain associated to the IP + [DataMember(Name="domain", EmitDefaultValue=false)] + public string Domain { get; set; } + + /// + /// Weight of the IP + /// + /// Weight of the IP + [DataMember(Name="weight", EmitDefaultValue=false)] + public long? Weight { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetIpFromSender {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Ip: ").Append(Ip).Append("\n"); + sb.Append(" Domain: ").Append(Domain).Append("\n"); + sb.Append(" Weight: ").Append(Weight).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetIpFromSender); + } + + /// + /// Returns true if GetIpFromSender instances are equal + /// + /// Instance of GetIpFromSender to be compared + /// Boolean + public bool Equals(GetIpFromSender input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Ip == input.Ip || + (this.Ip != null && + this.Ip.Equals(input.Ip)) + ) && + ( + this.Domain == input.Domain || + (this.Domain != null && + this.Domain.Equals(input.Domain)) + ) && + ( + this.Weight == input.Weight || + (this.Weight != null && + this.Weight.Equals(input.Weight)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Ip != null) + hashCode = hashCode * 59 + this.Ip.GetHashCode(); + if (this.Domain != null) + hashCode = hashCode * 59 + this.Domain.GetHashCode(); + if (this.Weight != null) + hashCode = hashCode * 59 + this.Weight.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetIps.cs b/src/sib_api_v3_sdk/Model/GetIps.cs new file mode 100644 index 0000000..c426155 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetIps.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetIps + /// + [DataContract] + public partial class GetIps : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetIps() { } + /// + /// Initializes a new instance of the class. + /// + /// Dedicated IP(s) available on your account (required). + public GetIps(List ips = default(List)) + { + // to ensure "ips" is required (not null) + if (ips == null) + { + throw new InvalidDataException("ips is a required property for GetIps and cannot be null"); + } + else + { + this.Ips = ips; + } + } + + /// + /// Dedicated IP(s) available on your account + /// + /// Dedicated IP(s) available on your account + [DataMember(Name="ips", EmitDefaultValue=false)] + public List Ips { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetIps {\n"); + sb.Append(" Ips: ").Append(Ips).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetIps); + } + + /// + /// Returns true if GetIps instances are equal + /// + /// Instance of GetIps to be compared + /// Boolean + public bool Equals(GetIps input) + { + if (input == null) + return false; + + return + ( + this.Ips == input.Ips || + this.Ips != null && + this.Ips.SequenceEqual(input.Ips) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Ips != null) + hashCode = hashCode * 59 + this.Ips.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetIpsFromSender.cs b/src/sib_api_v3_sdk/Model/GetIpsFromSender.cs new file mode 100644 index 0000000..158c32c --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetIpsFromSender.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetIpsFromSender + /// + [DataContract] + public partial class GetIpsFromSender : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetIpsFromSender() { } + /// + /// Initializes a new instance of the class. + /// + /// Dedicated IP(s) linked to a sender (required). + public GetIpsFromSender(List ips = default(List)) + { + // to ensure "ips" is required (not null) + if (ips == null) + { + throw new InvalidDataException("ips is a required property for GetIpsFromSender and cannot be null"); + } + else + { + this.Ips = ips; + } + } + + /// + /// Dedicated IP(s) linked to a sender + /// + /// Dedicated IP(s) linked to a sender + [DataMember(Name="ips", EmitDefaultValue=false)] + public List Ips { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetIpsFromSender {\n"); + sb.Append(" Ips: ").Append(Ips).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetIpsFromSender); + } + + /// + /// Returns true if GetIpsFromSender instances are equal + /// + /// Instance of GetIpsFromSender to be compared + /// Boolean + public bool Equals(GetIpsFromSender input) + { + if (input == null) + return false; + + return + ( + this.Ips == input.Ips || + this.Ips != null && + this.Ips.SequenceEqual(input.Ips) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Ips != null) + hashCode = hashCode * 59 + this.Ips.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetList.cs b/src/sib_api_v3_sdk/Model/GetList.cs new file mode 100644 index 0000000..183b177 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetList.cs @@ -0,0 +1,213 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetList + /// + [DataContract] + public partial class GetList : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetList() { } + /// + /// Initializes a new instance of the class. + /// + /// ID of the list (required). + /// Name of the list (required). + /// Number of blacklisted contacts in the list (required). + /// Number of contacts in the list (required). + public GetList(long? id = default(long?), string name = default(string), long? totalBlacklisted = default(long?), long? totalSubscribers = default(long?)) + { + // to ensure "id" is required (not null) + if (id == null) + { + throw new InvalidDataException("id is a required property for GetList and cannot be null"); + } + else + { + this.Id = id; + } + // to ensure "name" is required (not null) + if (name == null) + { + throw new InvalidDataException("name is a required property for GetList and cannot be null"); + } + else + { + this.Name = name; + } + // to ensure "totalBlacklisted" is required (not null) + if (totalBlacklisted == null) + { + throw new InvalidDataException("totalBlacklisted is a required property for GetList and cannot be null"); + } + else + { + this.TotalBlacklisted = totalBlacklisted; + } + // to ensure "totalSubscribers" is required (not null) + if (totalSubscribers == null) + { + throw new InvalidDataException("totalSubscribers is a required property for GetList and cannot be null"); + } + else + { + this.TotalSubscribers = totalSubscribers; + } + } + + /// + /// ID of the list + /// + /// ID of the list + [DataMember(Name="id", EmitDefaultValue=false)] + public long? Id { get; set; } + + /// + /// Name of the list + /// + /// Name of the list + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Number of blacklisted contacts in the list + /// + /// Number of blacklisted contacts in the list + [DataMember(Name="totalBlacklisted", EmitDefaultValue=false)] + public long? TotalBlacklisted { get; set; } + + /// + /// Number of contacts in the list + /// + /// Number of contacts in the list + [DataMember(Name="totalSubscribers", EmitDefaultValue=false)] + public long? TotalSubscribers { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetList {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" TotalBlacklisted: ").Append(TotalBlacklisted).Append("\n"); + sb.Append(" TotalSubscribers: ").Append(TotalSubscribers).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetList); + } + + /// + /// Returns true if GetList instances are equal + /// + /// Instance of GetList to be compared + /// Boolean + public bool Equals(GetList input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.TotalBlacklisted == input.TotalBlacklisted || + (this.TotalBlacklisted != null && + this.TotalBlacklisted.Equals(input.TotalBlacklisted)) + ) && + ( + this.TotalSubscribers == input.TotalSubscribers || + (this.TotalSubscribers != null && + this.TotalSubscribers.Equals(input.TotalSubscribers)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.TotalBlacklisted != null) + hashCode = hashCode * 59 + this.TotalBlacklisted.GetHashCode(); + if (this.TotalSubscribers != null) + hashCode = hashCode * 59 + this.TotalSubscribers.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetLists.cs b/src/sib_api_v3_sdk/Model/GetLists.cs new file mode 100644 index 0000000..2e61a03 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetLists.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetLists + /// + [DataContract] + public partial class GetLists : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetLists() { } + /// + /// Initializes a new instance of the class. + /// + /// Listing of all the lists available in your account (required). + /// Number of lists in your account (required). + public GetLists(List lists = default(List), long? count = default(long?)) + { + // to ensure "lists" is required (not null) + if (lists == null) + { + throw new InvalidDataException("lists is a required property for GetLists and cannot be null"); + } + else + { + this.Lists = lists; + } + // to ensure "count" is required (not null) + if (count == null) + { + throw new InvalidDataException("count is a required property for GetLists and cannot be null"); + } + else + { + this.Count = count; + } + } + + /// + /// Listing of all the lists available in your account + /// + /// Listing of all the lists available in your account + [DataMember(Name="lists", EmitDefaultValue=false)] + public List Lists { get; set; } + + /// + /// Number of lists in your account + /// + /// Number of lists in your account + [DataMember(Name="count", EmitDefaultValue=false)] + public long? Count { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetLists {\n"); + sb.Append(" Lists: ").Append(Lists).Append("\n"); + sb.Append(" Count: ").Append(Count).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetLists); + } + + /// + /// Returns true if GetLists instances are equal + /// + /// Instance of GetLists to be compared + /// Boolean + public bool Equals(GetLists input) + { + if (input == null) + return false; + + return + ( + this.Lists == input.Lists || + this.Lists != null && + this.Lists.SequenceEqual(input.Lists) + ) && + ( + this.Count == input.Count || + (this.Count != null && + this.Count.Equals(input.Count)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Lists != null) + hashCode = hashCode * 59 + this.Lists.GetHashCode(); + if (this.Count != null) + hashCode = hashCode * 59 + this.Count.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetProcess.cs b/src/sib_api_v3_sdk/Model/GetProcess.cs new file mode 100644 index 0000000..0b49c51 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetProcess.cs @@ -0,0 +1,232 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetProcess + /// + [DataContract] + public partial class GetProcess : IEquatable, IValidatableObject + { + /// + /// Status of the process + /// + /// Status of the process + [JsonConverter(typeof(StringEnumConverter))] + public enum StatusEnum + { + + /// + /// Enum Queued for value: queued + /// + [EnumMember(Value = "queued")] + Queued = 1, + + /// + /// Enum Inprocess for value: in_process + /// + [EnumMember(Value = "in_process")] + Inprocess = 2, + + /// + /// Enum Completed for value: completed + /// + [EnumMember(Value = "completed")] + Completed = 3 + } + + /// + /// Status of the process + /// + /// Status of the process + [DataMember(Name="status", EmitDefaultValue=false)] + public StatusEnum Status { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetProcess() { } + /// + /// Initializes a new instance of the class. + /// + /// Id of the process (required). + /// Status of the process (required). + /// Process name (required). + /// URL on which send export the of contacts once the process is completed. + public GetProcess(long? id = default(long?), StatusEnum status = default(StatusEnum), string name = default(string), string exportUrl = default(string)) + { + // to ensure "id" is required (not null) + if (id == null) + { + throw new InvalidDataException("id is a required property for GetProcess and cannot be null"); + } + else + { + this.Id = id; + } + // to ensure "status" is required (not null) + if (status == null) + { + throw new InvalidDataException("status is a required property for GetProcess and cannot be null"); + } + else + { + this.Status = status; + } + // to ensure "name" is required (not null) + if (name == null) + { + throw new InvalidDataException("name is a required property for GetProcess and cannot be null"); + } + else + { + this.Name = name; + } + this.ExportUrl = exportUrl; + } + + /// + /// Id of the process + /// + /// Id of the process + [DataMember(Name="id", EmitDefaultValue=false)] + public long? Id { get; set; } + + + /// + /// Process name + /// + /// Process name + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// URL on which send export the of contacts once the process is completed + /// + /// URL on which send export the of contacts once the process is completed + [DataMember(Name="export_url", EmitDefaultValue=false)] + public string ExportUrl { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetProcess {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" ExportUrl: ").Append(ExportUrl).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetProcess); + } + + /// + /// Returns true if GetProcess instances are equal + /// + /// Instance of GetProcess to be compared + /// Boolean + public bool Equals(GetProcess input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.ExportUrl == input.ExportUrl || + (this.ExportUrl != null && + this.ExportUrl.Equals(input.ExportUrl)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.ExportUrl != null) + hashCode = hashCode * 59 + this.ExportUrl.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetProcesses.cs b/src/sib_api_v3_sdk/Model/GetProcesses.cs new file mode 100644 index 0000000..15fe353 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetProcesses.cs @@ -0,0 +1,155 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetProcesses + /// + [DataContract] + public partial class GetProcesses : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetProcesses() { } + /// + /// Initializes a new instance of the class. + /// + /// List of processes available on your account. + /// Number of processes available on your account (required). + public GetProcesses(List processes = default(List), long? count = default(long?)) + { + // to ensure "count" is required (not null) + if (count == null) + { + throw new InvalidDataException("count is a required property for GetProcesses and cannot be null"); + } + else + { + this.Count = count; + } + this.Processes = processes; + } + + /// + /// List of processes available on your account + /// + /// List of processes available on your account + [DataMember(Name="processes", EmitDefaultValue=false)] + public List Processes { get; set; } + + /// + /// Number of processes available on your account + /// + /// Number of processes available on your account + [DataMember(Name="count", EmitDefaultValue=false)] + public long? Count { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetProcesses {\n"); + sb.Append(" Processes: ").Append(Processes).Append("\n"); + sb.Append(" Count: ").Append(Count).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetProcesses); + } + + /// + /// Returns true if GetProcesses instances are equal + /// + /// Instance of GetProcesses to be compared + /// Boolean + public bool Equals(GetProcesses input) + { + if (input == null) + return false; + + return + ( + this.Processes == input.Processes || + this.Processes != null && + this.Processes.SequenceEqual(input.Processes) + ) && + ( + this.Count == input.Count || + (this.Count != null && + this.Count.Equals(input.Count)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Processes != null) + hashCode = hashCode * 59 + this.Processes.GetHashCode(); + if (this.Count != null) + hashCode = hashCode * 59 + this.Count.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetReports.cs b/src/sib_api_v3_sdk/Model/GetReports.cs new file mode 100644 index 0000000..2b98119 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetReports.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetReports + /// + [DataContract] + public partial class GetReports : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// reports. + public GetReports(List reports = default(List)) + { + this.Reports = reports; + } + + /// + /// Gets or Sets Reports + /// + [DataMember(Name="reports", EmitDefaultValue=false)] + public List Reports { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetReports {\n"); + sb.Append(" Reports: ").Append(Reports).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetReports); + } + + /// + /// Returns true if GetReports instances are equal + /// + /// Instance of GetReports to be compared + /// Boolean + public bool Equals(GetReports input) + { + if (input == null) + return false; + + return + ( + this.Reports == input.Reports || + this.Reports != null && + this.Reports.SequenceEqual(input.Reports) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Reports != null) + hashCode = hashCode * 59 + this.Reports.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetReportsReports.cs b/src/sib_api_v3_sdk/Model/GetReportsReports.cs new file mode 100644 index 0000000..f6d2c39 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetReportsReports.cs @@ -0,0 +1,439 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetReportsReports + /// + [DataContract] + public partial class GetReportsReports : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetReportsReports() { } + /// + /// Initializes a new instance of the class. + /// + /// Date of the statistics (required). + /// Number of requests for the date (required). + /// Number of delivered emails for the date (required). + /// Number of hardbounces for the date (required). + /// Number of softbounces for the date (required). + /// Number of clicks for the date (required). + /// Number of unique clicks for the date (required). + /// Number of openings for the date (required). + /// Number of unique openings for the date (required). + /// Number of complaints (spam reports) for the date (required). + /// Number of blocked emails for the date (required). + /// Number of invalid emails for the date (required). + /// Number of unsubscribed emails for the date (required). + public GetReportsReports(DateTime? date = default(DateTime?), long? requests = default(long?), long? delivered = default(long?), long? hardBounces = default(long?), long? softBounces = default(long?), long? clicks = default(long?), long? uniqueClicks = default(long?), long? opens = default(long?), long? uniqueOpens = default(long?), long? spamReports = default(long?), long? blocked = default(long?), long? invalid = default(long?), long? unsubscribed = default(long?)) + { + // to ensure "date" is required (not null) + if (date == null) + { + throw new InvalidDataException("date is a required property for GetReportsReports and cannot be null"); + } + else + { + this.Date = date; + } + // to ensure "requests" is required (not null) + if (requests == null) + { + throw new InvalidDataException("requests is a required property for GetReportsReports and cannot be null"); + } + else + { + this.Requests = requests; + } + // to ensure "delivered" is required (not null) + if (delivered == null) + { + throw new InvalidDataException("delivered is a required property for GetReportsReports and cannot be null"); + } + else + { + this.Delivered = delivered; + } + // to ensure "hardBounces" is required (not null) + if (hardBounces == null) + { + throw new InvalidDataException("hardBounces is a required property for GetReportsReports and cannot be null"); + } + else + { + this.HardBounces = hardBounces; + } + // to ensure "softBounces" is required (not null) + if (softBounces == null) + { + throw new InvalidDataException("softBounces is a required property for GetReportsReports and cannot be null"); + } + else + { + this.SoftBounces = softBounces; + } + // to ensure "clicks" is required (not null) + if (clicks == null) + { + throw new InvalidDataException("clicks is a required property for GetReportsReports and cannot be null"); + } + else + { + this.Clicks = clicks; + } + // to ensure "uniqueClicks" is required (not null) + if (uniqueClicks == null) + { + throw new InvalidDataException("uniqueClicks is a required property for GetReportsReports and cannot be null"); + } + else + { + this.UniqueClicks = uniqueClicks; + } + // to ensure "opens" is required (not null) + if (opens == null) + { + throw new InvalidDataException("opens is a required property for GetReportsReports and cannot be null"); + } + else + { + this.Opens = opens; + } + // to ensure "uniqueOpens" is required (not null) + if (uniqueOpens == null) + { + throw new InvalidDataException("uniqueOpens is a required property for GetReportsReports and cannot be null"); + } + else + { + this.UniqueOpens = uniqueOpens; + } + // to ensure "spamReports" is required (not null) + if (spamReports == null) + { + throw new InvalidDataException("spamReports is a required property for GetReportsReports and cannot be null"); + } + else + { + this.SpamReports = spamReports; + } + // to ensure "blocked" is required (not null) + if (blocked == null) + { + throw new InvalidDataException("blocked is a required property for GetReportsReports and cannot be null"); + } + else + { + this.Blocked = blocked; + } + // to ensure "invalid" is required (not null) + if (invalid == null) + { + throw new InvalidDataException("invalid is a required property for GetReportsReports and cannot be null"); + } + else + { + this.Invalid = invalid; + } + // to ensure "unsubscribed" is required (not null) + if (unsubscribed == null) + { + throw new InvalidDataException("unsubscribed is a required property for GetReportsReports and cannot be null"); + } + else + { + this.Unsubscribed = unsubscribed; + } + } + + /// + /// Date of the statistics + /// + /// Date of the statistics + [DataMember(Name="date", EmitDefaultValue=false)] + [JsonConverter(typeof(SwaggerDateConverter))] + public DateTime? Date { get; set; } + + /// + /// Number of requests for the date + /// + /// Number of requests for the date + [DataMember(Name="requests", EmitDefaultValue=false)] + public long? Requests { get; set; } + + /// + /// Number of delivered emails for the date + /// + /// Number of delivered emails for the date + [DataMember(Name="delivered", EmitDefaultValue=false)] + public long? Delivered { get; set; } + + /// + /// Number of hardbounces for the date + /// + /// Number of hardbounces for the date + [DataMember(Name="hardBounces", EmitDefaultValue=false)] + public long? HardBounces { get; set; } + + /// + /// Number of softbounces for the date + /// + /// Number of softbounces for the date + [DataMember(Name="softBounces", EmitDefaultValue=false)] + public long? SoftBounces { get; set; } + + /// + /// Number of clicks for the date + /// + /// Number of clicks for the date + [DataMember(Name="clicks", EmitDefaultValue=false)] + public long? Clicks { get; set; } + + /// + /// Number of unique clicks for the date + /// + /// Number of unique clicks for the date + [DataMember(Name="uniqueClicks", EmitDefaultValue=false)] + public long? UniqueClicks { get; set; } + + /// + /// Number of openings for the date + /// + /// Number of openings for the date + [DataMember(Name="opens", EmitDefaultValue=false)] + public long? Opens { get; set; } + + /// + /// Number of unique openings for the date + /// + /// Number of unique openings for the date + [DataMember(Name="uniqueOpens", EmitDefaultValue=false)] + public long? UniqueOpens { get; set; } + + /// + /// Number of complaints (spam reports) for the date + /// + /// Number of complaints (spam reports) for the date + [DataMember(Name="spamReports", EmitDefaultValue=false)] + public long? SpamReports { get; set; } + + /// + /// Number of blocked emails for the date + /// + /// Number of blocked emails for the date + [DataMember(Name="blocked", EmitDefaultValue=false)] + public long? Blocked { get; set; } + + /// + /// Number of invalid emails for the date + /// + /// Number of invalid emails for the date + [DataMember(Name="invalid", EmitDefaultValue=false)] + public long? Invalid { get; set; } + + /// + /// Number of unsubscribed emails for the date + /// + /// Number of unsubscribed emails for the date + [DataMember(Name="unsubscribed", EmitDefaultValue=false)] + public long? Unsubscribed { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetReportsReports {\n"); + sb.Append(" Date: ").Append(Date).Append("\n"); + sb.Append(" Requests: ").Append(Requests).Append("\n"); + sb.Append(" Delivered: ").Append(Delivered).Append("\n"); + sb.Append(" HardBounces: ").Append(HardBounces).Append("\n"); + sb.Append(" SoftBounces: ").Append(SoftBounces).Append("\n"); + sb.Append(" Clicks: ").Append(Clicks).Append("\n"); + sb.Append(" UniqueClicks: ").Append(UniqueClicks).Append("\n"); + sb.Append(" Opens: ").Append(Opens).Append("\n"); + sb.Append(" UniqueOpens: ").Append(UniqueOpens).Append("\n"); + sb.Append(" SpamReports: ").Append(SpamReports).Append("\n"); + sb.Append(" Blocked: ").Append(Blocked).Append("\n"); + sb.Append(" Invalid: ").Append(Invalid).Append("\n"); + sb.Append(" Unsubscribed: ").Append(Unsubscribed).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetReportsReports); + } + + /// + /// Returns true if GetReportsReports instances are equal + /// + /// Instance of GetReportsReports to be compared + /// Boolean + public bool Equals(GetReportsReports input) + { + if (input == null) + return false; + + return + ( + this.Date == input.Date || + (this.Date != null && + this.Date.Equals(input.Date)) + ) && + ( + this.Requests == input.Requests || + (this.Requests != null && + this.Requests.Equals(input.Requests)) + ) && + ( + this.Delivered == input.Delivered || + (this.Delivered != null && + this.Delivered.Equals(input.Delivered)) + ) && + ( + this.HardBounces == input.HardBounces || + (this.HardBounces != null && + this.HardBounces.Equals(input.HardBounces)) + ) && + ( + this.SoftBounces == input.SoftBounces || + (this.SoftBounces != null && + this.SoftBounces.Equals(input.SoftBounces)) + ) && + ( + this.Clicks == input.Clicks || + (this.Clicks != null && + this.Clicks.Equals(input.Clicks)) + ) && + ( + this.UniqueClicks == input.UniqueClicks || + (this.UniqueClicks != null && + this.UniqueClicks.Equals(input.UniqueClicks)) + ) && + ( + this.Opens == input.Opens || + (this.Opens != null && + this.Opens.Equals(input.Opens)) + ) && + ( + this.UniqueOpens == input.UniqueOpens || + (this.UniqueOpens != null && + this.UniqueOpens.Equals(input.UniqueOpens)) + ) && + ( + this.SpamReports == input.SpamReports || + (this.SpamReports != null && + this.SpamReports.Equals(input.SpamReports)) + ) && + ( + this.Blocked == input.Blocked || + (this.Blocked != null && + this.Blocked.Equals(input.Blocked)) + ) && + ( + this.Invalid == input.Invalid || + (this.Invalid != null && + this.Invalid.Equals(input.Invalid)) + ) && + ( + this.Unsubscribed == input.Unsubscribed || + (this.Unsubscribed != null && + this.Unsubscribed.Equals(input.Unsubscribed)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Date != null) + hashCode = hashCode * 59 + this.Date.GetHashCode(); + if (this.Requests != null) + hashCode = hashCode * 59 + this.Requests.GetHashCode(); + if (this.Delivered != null) + hashCode = hashCode * 59 + this.Delivered.GetHashCode(); + if (this.HardBounces != null) + hashCode = hashCode * 59 + this.HardBounces.GetHashCode(); + if (this.SoftBounces != null) + hashCode = hashCode * 59 + this.SoftBounces.GetHashCode(); + if (this.Clicks != null) + hashCode = hashCode * 59 + this.Clicks.GetHashCode(); + if (this.UniqueClicks != null) + hashCode = hashCode * 59 + this.UniqueClicks.GetHashCode(); + if (this.Opens != null) + hashCode = hashCode * 59 + this.Opens.GetHashCode(); + if (this.UniqueOpens != null) + hashCode = hashCode * 59 + this.UniqueOpens.GetHashCode(); + if (this.SpamReports != null) + hashCode = hashCode * 59 + this.SpamReports.GetHashCode(); + if (this.Blocked != null) + hashCode = hashCode * 59 + this.Blocked.GetHashCode(); + if (this.Invalid != null) + hashCode = hashCode * 59 + this.Invalid.GetHashCode(); + if (this.Unsubscribed != null) + hashCode = hashCode * 59 + this.Unsubscribed.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetSendersList.cs b/src/sib_api_v3_sdk/Model/GetSendersList.cs new file mode 100644 index 0000000..6294f8b --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetSendersList.cs @@ -0,0 +1,125 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetSendersList + /// + [DataContract] + public partial class GetSendersList : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// List of the senders available in your account. + public GetSendersList(List senders = default(List)) + { + this.Senders = senders; + } + + /// + /// List of the senders available in your account + /// + /// List of the senders available in your account + [DataMember(Name="senders", EmitDefaultValue=false)] + public List Senders { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetSendersList {\n"); + sb.Append(" Senders: ").Append(Senders).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetSendersList); + } + + /// + /// Returns true if GetSendersList instances are equal + /// + /// Instance of GetSendersList to be compared + /// Boolean + public bool Equals(GetSendersList input) + { + if (input == null) + return false; + + return + ( + this.Senders == input.Senders || + this.Senders != null && + this.Senders.SequenceEqual(input.Senders) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Senders != null) + hashCode = hashCode * 59 + this.Senders.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetSendersListIps.cs b/src/sib_api_v3_sdk/Model/GetSendersListIps.cs new file mode 100644 index 0000000..1b997d0 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetSendersListIps.cs @@ -0,0 +1,188 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetSendersListIps + /// + [DataContract] + public partial class GetSendersListIps : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetSendersListIps() { } + /// + /// Initializes a new instance of the class. + /// + /// Dedicated IP available in your account (required). + /// Domain of the IP (required). + /// Weight of the IP for this sender (required). + public GetSendersListIps(string ip = default(string), string domain = default(string), long? weight = default(long?)) + { + // to ensure "ip" is required (not null) + if (ip == null) + { + throw new InvalidDataException("ip is a required property for GetSendersListIps and cannot be null"); + } + else + { + this.Ip = ip; + } + // to ensure "domain" is required (not null) + if (domain == null) + { + throw new InvalidDataException("domain is a required property for GetSendersListIps and cannot be null"); + } + else + { + this.Domain = domain; + } + // to ensure "weight" is required (not null) + if (weight == null) + { + throw new InvalidDataException("weight is a required property for GetSendersListIps and cannot be null"); + } + else + { + this.Weight = weight; + } + } + + /// + /// Dedicated IP available in your account + /// + /// Dedicated IP available in your account + [DataMember(Name="ip", EmitDefaultValue=false)] + public string Ip { get; set; } + + /// + /// Domain of the IP + /// + /// Domain of the IP + [DataMember(Name="domain", EmitDefaultValue=false)] + public string Domain { get; set; } + + /// + /// Weight of the IP for this sender + /// + /// Weight of the IP for this sender + [DataMember(Name="weight", EmitDefaultValue=false)] + public long? Weight { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetSendersListIps {\n"); + sb.Append(" Ip: ").Append(Ip).Append("\n"); + sb.Append(" Domain: ").Append(Domain).Append("\n"); + sb.Append(" Weight: ").Append(Weight).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetSendersListIps); + } + + /// + /// Returns true if GetSendersListIps instances are equal + /// + /// Instance of GetSendersListIps to be compared + /// Boolean + public bool Equals(GetSendersListIps input) + { + if (input == null) + return false; + + return + ( + this.Ip == input.Ip || + (this.Ip != null && + this.Ip.Equals(input.Ip)) + ) && + ( + this.Domain == input.Domain || + (this.Domain != null && + this.Domain.Equals(input.Domain)) + ) && + ( + this.Weight == input.Weight || + (this.Weight != null && + this.Weight.Equals(input.Weight)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Ip != null) + hashCode = hashCode * 59 + this.Ip.GetHashCode(); + if (this.Domain != null) + hashCode = hashCode * 59 + this.Domain.GetHashCode(); + if (this.Weight != null) + hashCode = hashCode * 59 + this.Weight.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetSendersListSenders.cs b/src/sib_api_v3_sdk/Model/GetSendersListSenders.cs new file mode 100644 index 0000000..ca7e7f6 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetSendersListSenders.cs @@ -0,0 +1,230 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetSendersListSenders + /// + [DataContract] + public partial class GetSendersListSenders : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetSendersListSenders() { } + /// + /// Initializes a new instance of the class. + /// + /// Id of the sender (required). + /// From Name associated to the sender (required). + /// From Email associated to the sender (required). + /// Status of sender (true=activated, false=deactivated) (required). + /// List of dedicated IP(s) available in the account. This data is displayed only for dedicated IPs. + public GetSendersListSenders(long? id = default(long?), string name = default(string), string email = default(string), bool? active = default(bool?), List ips = default(List)) + { + // to ensure "id" is required (not null) + if (id == null) + { + throw new InvalidDataException("id is a required property for GetSendersListSenders and cannot be null"); + } + else + { + this.Id = id; + } + // to ensure "name" is required (not null) + if (name == null) + { + throw new InvalidDataException("name is a required property for GetSendersListSenders and cannot be null"); + } + else + { + this.Name = name; + } + // to ensure "email" is required (not null) + if (email == null) + { + throw new InvalidDataException("email is a required property for GetSendersListSenders and cannot be null"); + } + else + { + this.Email = email; + } + // to ensure "active" is required (not null) + if (active == null) + { + throw new InvalidDataException("active is a required property for GetSendersListSenders and cannot be null"); + } + else + { + this.Active = active; + } + this.Ips = ips; + } + + /// + /// Id of the sender + /// + /// Id of the sender + [DataMember(Name="id", EmitDefaultValue=false)] + public long? Id { get; set; } + + /// + /// From Name associated to the sender + /// + /// From Name associated to the sender + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// From Email associated to the sender + /// + /// From Email associated to the sender + [DataMember(Name="email", EmitDefaultValue=false)] + public string Email { get; set; } + + /// + /// Status of sender (true=activated, false=deactivated) + /// + /// Status of sender (true=activated, false=deactivated) + [DataMember(Name="active", EmitDefaultValue=false)] + public bool? Active { get; set; } + + /// + /// List of dedicated IP(s) available in the account. This data is displayed only for dedicated IPs + /// + /// List of dedicated IP(s) available in the account. This data is displayed only for dedicated IPs + [DataMember(Name="ips", EmitDefaultValue=false)] + public List Ips { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetSendersListSenders {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" Active: ").Append(Active).Append("\n"); + sb.Append(" Ips: ").Append(Ips).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetSendersListSenders); + } + + /// + /// Returns true if GetSendersListSenders instances are equal + /// + /// Instance of GetSendersListSenders to be compared + /// Boolean + public bool Equals(GetSendersListSenders input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ) && + ( + this.Active == input.Active || + (this.Active != null && + this.Active.Equals(input.Active)) + ) && + ( + this.Ips == input.Ips || + this.Ips != null && + this.Ips.SequenceEqual(input.Ips) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Email != null) + hashCode = hashCode * 59 + this.Email.GetHashCode(); + if (this.Active != null) + hashCode = hashCode * 59 + this.Active.GetHashCode(); + if (this.Ips != null) + hashCode = hashCode * 59 + this.Ips.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetSmsCampaign.cs b/src/sib_api_v3_sdk/Model/GetSmsCampaign.cs new file mode 100644 index 0000000..97c1eef --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetSmsCampaign.cs @@ -0,0 +1,406 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetSmsCampaign + /// + [DataContract] + public partial class GetSmsCampaign : IEquatable, IValidatableObject + { + /// + /// Status of the SMS Campaign + /// + /// Status of the SMS Campaign + [JsonConverter(typeof(StringEnumConverter))] + public enum StatusEnum + { + + /// + /// Enum Draft for value: draft + /// + [EnumMember(Value = "draft")] + Draft = 1, + + /// + /// Enum Sent for value: sent + /// + [EnumMember(Value = "sent")] + Sent = 2, + + /// + /// Enum Archive for value: archive + /// + [EnumMember(Value = "archive")] + Archive = 3, + + /// + /// Enum Queued for value: queued + /// + [EnumMember(Value = "queued")] + Queued = 4, + + /// + /// Enum Suspended for value: suspended + /// + [EnumMember(Value = "suspended")] + Suspended = 5, + + /// + /// Enum InProcess for value: inProcess + /// + [EnumMember(Value = "inProcess")] + InProcess = 6 + } + + /// + /// Status of the SMS Campaign + /// + /// Status of the SMS Campaign + [DataMember(Name="status", EmitDefaultValue=false)] + public StatusEnum Status { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetSmsCampaign() { } + /// + /// Initializes a new instance of the class. + /// + /// ID of the SMS Campaign (required). + /// Name of the SMS Campaign (required). + /// Status of the SMS Campaign (required). + /// Content of the SMS Campaign (required). + /// UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format (required). + /// Sender of the SMS Campaign (required). + /// Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) (required). + /// UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) (required). + /// recipients (required). + /// statistics (required). + public GetSmsCampaign(long? id = default(long?), string name = default(string), StatusEnum status = default(StatusEnum), string content = default(string), DateTime? scheduledAt = default(DateTime?), string sender = default(string), DateTime? createdAt = default(DateTime?), DateTime? modifiedAt = default(DateTime?), Object recipients = default(Object), Object statistics = default(Object)) + { + // to ensure "id" is required (not null) + if (id == null) + { + throw new InvalidDataException("id is a required property for GetSmsCampaign and cannot be null"); + } + else + { + this.Id = id; + } + // to ensure "name" is required (not null) + if (name == null) + { + throw new InvalidDataException("name is a required property for GetSmsCampaign and cannot be null"); + } + else + { + this.Name = name; + } + // to ensure "status" is required (not null) + if (status == null) + { + throw new InvalidDataException("status is a required property for GetSmsCampaign and cannot be null"); + } + else + { + this.Status = status; + } + // to ensure "content" is required (not null) + if (content == null) + { + throw new InvalidDataException("content is a required property for GetSmsCampaign and cannot be null"); + } + else + { + this.Content = content; + } + // to ensure "scheduledAt" is required (not null) + if (scheduledAt == null) + { + throw new InvalidDataException("scheduledAt is a required property for GetSmsCampaign and cannot be null"); + } + else + { + this.ScheduledAt = scheduledAt; + } + // to ensure "sender" is required (not null) + if (sender == null) + { + throw new InvalidDataException("sender is a required property for GetSmsCampaign and cannot be null"); + } + else + { + this.Sender = sender; + } + // to ensure "createdAt" is required (not null) + if (createdAt == null) + { + throw new InvalidDataException("createdAt is a required property for GetSmsCampaign and cannot be null"); + } + else + { + this.CreatedAt = createdAt; + } + // to ensure "modifiedAt" is required (not null) + if (modifiedAt == null) + { + throw new InvalidDataException("modifiedAt is a required property for GetSmsCampaign and cannot be null"); + } + else + { + this.ModifiedAt = modifiedAt; + } + // to ensure "recipients" is required (not null) + if (recipients == null) + { + throw new InvalidDataException("recipients is a required property for GetSmsCampaign and cannot be null"); + } + else + { + this.Recipients = recipients; + } + // to ensure "statistics" is required (not null) + if (statistics == null) + { + throw new InvalidDataException("statistics is a required property for GetSmsCampaign and cannot be null"); + } + else + { + this.Statistics = statistics; + } + } + + /// + /// ID of the SMS Campaign + /// + /// ID of the SMS Campaign + [DataMember(Name="id", EmitDefaultValue=false)] + public long? Id { get; set; } + + /// + /// Name of the SMS Campaign + /// + /// Name of the SMS Campaign + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + + /// + /// Content of the SMS Campaign + /// + /// Content of the SMS Campaign + [DataMember(Name="content", EmitDefaultValue=false)] + public string Content { get; set; } + + /// + /// UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format + /// + /// UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format + [DataMember(Name="scheduledAt", EmitDefaultValue=false)] + public DateTime? ScheduledAt { get; set; } + + /// + /// Sender of the SMS Campaign + /// + /// Sender of the SMS Campaign + [DataMember(Name="sender", EmitDefaultValue=false)] + public string Sender { get; set; } + + /// + /// Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + /// + /// Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + [DataMember(Name="createdAt", EmitDefaultValue=false)] + public DateTime? CreatedAt { get; set; } + + /// + /// UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + /// + /// UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + [DataMember(Name="modifiedAt", EmitDefaultValue=false)] + public DateTime? ModifiedAt { get; set; } + + /// + /// Gets or Sets Recipients + /// + [DataMember(Name="recipients", EmitDefaultValue=false)] + public Object Recipients { get; set; } + + /// + /// Gets or Sets Statistics + /// + [DataMember(Name="statistics", EmitDefaultValue=false)] + public Object Statistics { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetSmsCampaign {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" ScheduledAt: ").Append(ScheduledAt).Append("\n"); + sb.Append(" Sender: ").Append(Sender).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ModifiedAt: ").Append(ModifiedAt).Append("\n"); + sb.Append(" Recipients: ").Append(Recipients).Append("\n"); + sb.Append(" Statistics: ").Append(Statistics).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetSmsCampaign); + } + + /// + /// Returns true if GetSmsCampaign instances are equal + /// + /// Instance of GetSmsCampaign to be compared + /// Boolean + public bool Equals(GetSmsCampaign input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ) && + ( + this.Content == input.Content || + (this.Content != null && + this.Content.Equals(input.Content)) + ) && + ( + this.ScheduledAt == input.ScheduledAt || + (this.ScheduledAt != null && + this.ScheduledAt.Equals(input.ScheduledAt)) + ) && + ( + this.Sender == input.Sender || + (this.Sender != null && + this.Sender.Equals(input.Sender)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.ModifiedAt == input.ModifiedAt || + (this.ModifiedAt != null && + this.ModifiedAt.Equals(input.ModifiedAt)) + ) && + ( + this.Recipients == input.Recipients || + (this.Recipients != null && + this.Recipients.Equals(input.Recipients)) + ) && + ( + this.Statistics == input.Statistics || + (this.Statistics != null && + this.Statistics.Equals(input.Statistics)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + if (this.Content != null) + hashCode = hashCode * 59 + this.Content.GetHashCode(); + if (this.ScheduledAt != null) + hashCode = hashCode * 59 + this.ScheduledAt.GetHashCode(); + if (this.Sender != null) + hashCode = hashCode * 59 + this.Sender.GetHashCode(); + if (this.CreatedAt != null) + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); + if (this.ModifiedAt != null) + hashCode = hashCode * 59 + this.ModifiedAt.GetHashCode(); + if (this.Recipients != null) + hashCode = hashCode * 59 + this.Recipients.GetHashCode(); + if (this.Statistics != null) + hashCode = hashCode * 59 + this.Statistics.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetSmsCampaignOverview.cs b/src/sib_api_v3_sdk/Model/GetSmsCampaignOverview.cs new file mode 100644 index 0000000..13239a9 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetSmsCampaignOverview.cs @@ -0,0 +1,358 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetSmsCampaignOverview + /// + [DataContract] + public partial class GetSmsCampaignOverview : IEquatable, IValidatableObject + { + /// + /// Status of the SMS Campaign + /// + /// Status of the SMS Campaign + [JsonConverter(typeof(StringEnumConverter))] + public enum StatusEnum + { + + /// + /// Enum Draft for value: draft + /// + [EnumMember(Value = "draft")] + Draft = 1, + + /// + /// Enum Sent for value: sent + /// + [EnumMember(Value = "sent")] + Sent = 2, + + /// + /// Enum Archive for value: archive + /// + [EnumMember(Value = "archive")] + Archive = 3, + + /// + /// Enum Queued for value: queued + /// + [EnumMember(Value = "queued")] + Queued = 4, + + /// + /// Enum Suspended for value: suspended + /// + [EnumMember(Value = "suspended")] + Suspended = 5, + + /// + /// Enum InProcess for value: inProcess + /// + [EnumMember(Value = "inProcess")] + InProcess = 6 + } + + /// + /// Status of the SMS Campaign + /// + /// Status of the SMS Campaign + [DataMember(Name="status", EmitDefaultValue=false)] + public StatusEnum Status { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetSmsCampaignOverview() { } + /// + /// Initializes a new instance of the class. + /// + /// ID of the SMS Campaign (required). + /// Name of the SMS Campaign (required). + /// Status of the SMS Campaign (required). + /// Content of the SMS Campaign (required). + /// UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format (required). + /// Sender of the SMS Campaign (required). + /// Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) (required). + /// UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) (required). + public GetSmsCampaignOverview(long? id = default(long?), string name = default(string), StatusEnum status = default(StatusEnum), string content = default(string), DateTime? scheduledAt = default(DateTime?), string sender = default(string), DateTime? createdAt = default(DateTime?), DateTime? modifiedAt = default(DateTime?)) + { + // to ensure "id" is required (not null) + if (id == null) + { + throw new InvalidDataException("id is a required property for GetSmsCampaignOverview and cannot be null"); + } + else + { + this.Id = id; + } + // to ensure "name" is required (not null) + if (name == null) + { + throw new InvalidDataException("name is a required property for GetSmsCampaignOverview and cannot be null"); + } + else + { + this.Name = name; + } + // to ensure "status" is required (not null) + if (status == null) + { + throw new InvalidDataException("status is a required property for GetSmsCampaignOverview and cannot be null"); + } + else + { + this.Status = status; + } + // to ensure "content" is required (not null) + if (content == null) + { + throw new InvalidDataException("content is a required property for GetSmsCampaignOverview and cannot be null"); + } + else + { + this.Content = content; + } + // to ensure "scheduledAt" is required (not null) + if (scheduledAt == null) + { + throw new InvalidDataException("scheduledAt is a required property for GetSmsCampaignOverview and cannot be null"); + } + else + { + this.ScheduledAt = scheduledAt; + } + // to ensure "sender" is required (not null) + if (sender == null) + { + throw new InvalidDataException("sender is a required property for GetSmsCampaignOverview and cannot be null"); + } + else + { + this.Sender = sender; + } + // to ensure "createdAt" is required (not null) + if (createdAt == null) + { + throw new InvalidDataException("createdAt is a required property for GetSmsCampaignOverview and cannot be null"); + } + else + { + this.CreatedAt = createdAt; + } + // to ensure "modifiedAt" is required (not null) + if (modifiedAt == null) + { + throw new InvalidDataException("modifiedAt is a required property for GetSmsCampaignOverview and cannot be null"); + } + else + { + this.ModifiedAt = modifiedAt; + } + } + + /// + /// ID of the SMS Campaign + /// + /// ID of the SMS Campaign + [DataMember(Name="id", EmitDefaultValue=false)] + public long? Id { get; set; } + + /// + /// Name of the SMS Campaign + /// + /// Name of the SMS Campaign + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + + /// + /// Content of the SMS Campaign + /// + /// Content of the SMS Campaign + [DataMember(Name="content", EmitDefaultValue=false)] + public string Content { get; set; } + + /// + /// UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format + /// + /// UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format + [DataMember(Name="scheduledAt", EmitDefaultValue=false)] + public DateTime? ScheduledAt { get; set; } + + /// + /// Sender of the SMS Campaign + /// + /// Sender of the SMS Campaign + [DataMember(Name="sender", EmitDefaultValue=false)] + public string Sender { get; set; } + + /// + /// Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + /// + /// Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + [DataMember(Name="createdAt", EmitDefaultValue=false)] + public DateTime? CreatedAt { get; set; } + + /// + /// UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + /// + /// UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) + [DataMember(Name="modifiedAt", EmitDefaultValue=false)] + public DateTime? ModifiedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetSmsCampaignOverview {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" ScheduledAt: ").Append(ScheduledAt).Append("\n"); + sb.Append(" Sender: ").Append(Sender).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ModifiedAt: ").Append(ModifiedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetSmsCampaignOverview); + } + + /// + /// Returns true if GetSmsCampaignOverview instances are equal + /// + /// Instance of GetSmsCampaignOverview to be compared + /// Boolean + public bool Equals(GetSmsCampaignOverview input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ) && + ( + this.Content == input.Content || + (this.Content != null && + this.Content.Equals(input.Content)) + ) && + ( + this.ScheduledAt == input.ScheduledAt || + (this.ScheduledAt != null && + this.ScheduledAt.Equals(input.ScheduledAt)) + ) && + ( + this.Sender == input.Sender || + (this.Sender != null && + this.Sender.Equals(input.Sender)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.ModifiedAt == input.ModifiedAt || + (this.ModifiedAt != null && + this.ModifiedAt.Equals(input.ModifiedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + if (this.Content != null) + hashCode = hashCode * 59 + this.Content.GetHashCode(); + if (this.ScheduledAt != null) + hashCode = hashCode * 59 + this.ScheduledAt.GetHashCode(); + if (this.Sender != null) + hashCode = hashCode * 59 + this.Sender.GetHashCode(); + if (this.CreatedAt != null) + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); + if (this.ModifiedAt != null) + hashCode = hashCode * 59 + this.ModifiedAt.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetSmsCampaignStats.cs b/src/sib_api_v3_sdk/Model/GetSmsCampaignStats.cs new file mode 100644 index 0000000..6a68c9c --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetSmsCampaignStats.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetSmsCampaignStats + /// + [DataContract] + public partial class GetSmsCampaignStats : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetSmsCampaignStats() { } + /// + /// Initializes a new instance of the class. + /// + /// Number of delivered SMS (required). + /// Number of sent SMS (required). + /// Number of processing SMS (required). + /// Number of softbounced SMS (required). + /// Number of hardbounced SMS (required). + /// Number of unsubscription SMS (required). + /// Number of replies to the SMS (required). + public GetSmsCampaignStats(long? delivered = default(long?), long? sent = default(long?), long? processing = default(long?), long? softBounces = default(long?), long? hardBounces = default(long?), long? unsubscriptions = default(long?), long? answered = default(long?)) + { + // to ensure "delivered" is required (not null) + if (delivered == null) + { + throw new InvalidDataException("delivered is a required property for GetSmsCampaignStats and cannot be null"); + } + else + { + this.Delivered = delivered; + } + // to ensure "sent" is required (not null) + if (sent == null) + { + throw new InvalidDataException("sent is a required property for GetSmsCampaignStats and cannot be null"); + } + else + { + this.Sent = sent; + } + // to ensure "processing" is required (not null) + if (processing == null) + { + throw new InvalidDataException("processing is a required property for GetSmsCampaignStats and cannot be null"); + } + else + { + this.Processing = processing; + } + // to ensure "softBounces" is required (not null) + if (softBounces == null) + { + throw new InvalidDataException("softBounces is a required property for GetSmsCampaignStats and cannot be null"); + } + else + { + this.SoftBounces = softBounces; + } + // to ensure "hardBounces" is required (not null) + if (hardBounces == null) + { + throw new InvalidDataException("hardBounces is a required property for GetSmsCampaignStats and cannot be null"); + } + else + { + this.HardBounces = hardBounces; + } + // to ensure "unsubscriptions" is required (not null) + if (unsubscriptions == null) + { + throw new InvalidDataException("unsubscriptions is a required property for GetSmsCampaignStats and cannot be null"); + } + else + { + this.Unsubscriptions = unsubscriptions; + } + // to ensure "answered" is required (not null) + if (answered == null) + { + throw new InvalidDataException("answered is a required property for GetSmsCampaignStats and cannot be null"); + } + else + { + this.Answered = answered; + } + } + + /// + /// Number of delivered SMS + /// + /// Number of delivered SMS + [DataMember(Name="delivered", EmitDefaultValue=false)] + public long? Delivered { get; set; } + + /// + /// Number of sent SMS + /// + /// Number of sent SMS + [DataMember(Name="sent", EmitDefaultValue=false)] + public long? Sent { get; set; } + + /// + /// Number of processing SMS + /// + /// Number of processing SMS + [DataMember(Name="processing", EmitDefaultValue=false)] + public long? Processing { get; set; } + + /// + /// Number of softbounced SMS + /// + /// Number of softbounced SMS + [DataMember(Name="softBounces", EmitDefaultValue=false)] + public long? SoftBounces { get; set; } + + /// + /// Number of hardbounced SMS + /// + /// Number of hardbounced SMS + [DataMember(Name="hardBounces", EmitDefaultValue=false)] + public long? HardBounces { get; set; } + + /// + /// Number of unsubscription SMS + /// + /// Number of unsubscription SMS + [DataMember(Name="unsubscriptions", EmitDefaultValue=false)] + public long? Unsubscriptions { get; set; } + + /// + /// Number of replies to the SMS + /// + /// Number of replies to the SMS + [DataMember(Name="answered", EmitDefaultValue=false)] + public long? Answered { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetSmsCampaignStats {\n"); + sb.Append(" Delivered: ").Append(Delivered).Append("\n"); + sb.Append(" Sent: ").Append(Sent).Append("\n"); + sb.Append(" Processing: ").Append(Processing).Append("\n"); + sb.Append(" SoftBounces: ").Append(SoftBounces).Append("\n"); + sb.Append(" HardBounces: ").Append(HardBounces).Append("\n"); + sb.Append(" Unsubscriptions: ").Append(Unsubscriptions).Append("\n"); + sb.Append(" Answered: ").Append(Answered).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetSmsCampaignStats); + } + + /// + /// Returns true if GetSmsCampaignStats instances are equal + /// + /// Instance of GetSmsCampaignStats to be compared + /// Boolean + public bool Equals(GetSmsCampaignStats input) + { + if (input == null) + return false; + + return + ( + this.Delivered == input.Delivered || + (this.Delivered != null && + this.Delivered.Equals(input.Delivered)) + ) && + ( + this.Sent == input.Sent || + (this.Sent != null && + this.Sent.Equals(input.Sent)) + ) && + ( + this.Processing == input.Processing || + (this.Processing != null && + this.Processing.Equals(input.Processing)) + ) && + ( + this.SoftBounces == input.SoftBounces || + (this.SoftBounces != null && + this.SoftBounces.Equals(input.SoftBounces)) + ) && + ( + this.HardBounces == input.HardBounces || + (this.HardBounces != null && + this.HardBounces.Equals(input.HardBounces)) + ) && + ( + this.Unsubscriptions == input.Unsubscriptions || + (this.Unsubscriptions != null && + this.Unsubscriptions.Equals(input.Unsubscriptions)) + ) && + ( + this.Answered == input.Answered || + (this.Answered != null && + this.Answered.Equals(input.Answered)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Delivered != null) + hashCode = hashCode * 59 + this.Delivered.GetHashCode(); + if (this.Sent != null) + hashCode = hashCode * 59 + this.Sent.GetHashCode(); + if (this.Processing != null) + hashCode = hashCode * 59 + this.Processing.GetHashCode(); + if (this.SoftBounces != null) + hashCode = hashCode * 59 + this.SoftBounces.GetHashCode(); + if (this.HardBounces != null) + hashCode = hashCode * 59 + this.HardBounces.GetHashCode(); + if (this.Unsubscriptions != null) + hashCode = hashCode * 59 + this.Unsubscriptions.GetHashCode(); + if (this.Answered != null) + hashCode = hashCode * 59 + this.Answered.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetSmsCampaigns.cs b/src/sib_api_v3_sdk/Model/GetSmsCampaigns.cs new file mode 100644 index 0000000..18d14c6 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetSmsCampaigns.cs @@ -0,0 +1,154 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetSmsCampaigns + /// + [DataContract] + public partial class GetSmsCampaigns : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetSmsCampaigns() { } + /// + /// Initializes a new instance of the class. + /// + /// campaigns. + /// Number of SMS campaigns retrieved (required). + public GetSmsCampaigns(List campaigns = default(List), long? count = default(long?)) + { + // to ensure "count" is required (not null) + if (count == null) + { + throw new InvalidDataException("count is a required property for GetSmsCampaigns and cannot be null"); + } + else + { + this.Count = count; + } + this.Campaigns = campaigns; + } + + /// + /// Gets or Sets Campaigns + /// + [DataMember(Name="campaigns", EmitDefaultValue=false)] + public List Campaigns { get; set; } + + /// + /// Number of SMS campaigns retrieved + /// + /// Number of SMS campaigns retrieved + [DataMember(Name="count", EmitDefaultValue=false)] + public long? Count { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetSmsCampaigns {\n"); + sb.Append(" Campaigns: ").Append(Campaigns).Append("\n"); + sb.Append(" Count: ").Append(Count).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetSmsCampaigns); + } + + /// + /// Returns true if GetSmsCampaigns instances are equal + /// + /// Instance of GetSmsCampaigns to be compared + /// Boolean + public bool Equals(GetSmsCampaigns input) + { + if (input == null) + return false; + + return + ( + this.Campaigns == input.Campaigns || + this.Campaigns != null && + this.Campaigns.SequenceEqual(input.Campaigns) + ) && + ( + this.Count == input.Count || + (this.Count != null && + this.Count.Equals(input.Count)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Campaigns != null) + hashCode = hashCode * 59 + this.Campaigns.GetHashCode(); + if (this.Count != null) + hashCode = hashCode * 59 + this.Count.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetSmsEventReport.cs b/src/sib_api_v3_sdk/Model/GetSmsEventReport.cs new file mode 100644 index 0000000..0dc366c --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetSmsEventReport.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetSmsEventReport + /// + [DataContract] + public partial class GetSmsEventReport : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// events. + public GetSmsEventReport(List events = default(List)) + { + this.Events = events; + } + + /// + /// Gets or Sets Events + /// + [DataMember(Name="events", EmitDefaultValue=false)] + public List Events { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetSmsEventReport {\n"); + sb.Append(" Events: ").Append(Events).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetSmsEventReport); + } + + /// + /// Returns true if GetSmsEventReport instances are equal + /// + /// Instance of GetSmsEventReport to be compared + /// Boolean + public bool Equals(GetSmsEventReport input) + { + if (input == null) + return false; + + return + ( + this.Events == input.Events || + this.Events != null && + this.Events.SequenceEqual(input.Events) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Events != null) + hashCode = hashCode * 59 + this.Events.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetSmsEventReportEvents.cs b/src/sib_api_v3_sdk/Model/GetSmsEventReportEvents.cs new file mode 100644 index 0000000..048d323 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetSmsEventReportEvents.cs @@ -0,0 +1,326 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetSmsEventReportEvents + /// + [DataContract] + public partial class GetSmsEventReportEvents : IEquatable, IValidatableObject + { + /// + /// Event which occurred + /// + /// Event which occurred + [JsonConverter(typeof(StringEnumConverter))] + public enum EventEnum + { + + /// + /// Enum Bounces for value: bounces + /// + [EnumMember(Value = "bounces")] + Bounces = 1, + + /// + /// Enum HardBounces for value: hardBounces + /// + [EnumMember(Value = "hardBounces")] + HardBounces = 2, + + /// + /// Enum SoftBounces for value: softBounces + /// + [EnumMember(Value = "softBounces")] + SoftBounces = 3, + + /// + /// Enum Delivered for value: delivered + /// + [EnumMember(Value = "delivered")] + Delivered = 4, + + /// + /// Enum Sent for value: sent + /// + [EnumMember(Value = "sent")] + Sent = 5, + + /// + /// Enum Accepted for value: accepted + /// + [EnumMember(Value = "accepted")] + Accepted = 6, + + /// + /// Enum Unsubscription for value: unsubscription + /// + [EnumMember(Value = "unsubscription")] + Unsubscription = 7, + + /// + /// Enum Replies for value: replies + /// + [EnumMember(Value = "replies")] + Replies = 8, + + /// + /// Enum Blocked for value: blocked + /// + [EnumMember(Value = "blocked")] + Blocked = 9 + } + + /// + /// Event which occurred + /// + /// Event which occurred + [DataMember(Name="event", EmitDefaultValue=false)] + public EventEnum Event { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetSmsEventReportEvents() { } + /// + /// Initializes a new instance of the class. + /// + /// Phone number which has generated the event (required). + /// UTC date-time on which the event has been generated (required). + /// Message ID which generated the event (required). + /// Event which occurred (required). + /// Reason of bounce (only available if the event is hardbounce or softbounce). + /// reply. + /// Tag of the SMS which generated the event. + public GetSmsEventReportEvents(string phoneNumber = default(string), DateTime? date = default(DateTime?), string messageId = default(string), EventEnum _event = default(EventEnum), string reason = default(string), string reply = default(string), string tag = default(string)) + { + // to ensure "phoneNumber" is required (not null) + if (phoneNumber == null) + { + throw new InvalidDataException("phoneNumber is a required property for GetSmsEventReportEvents and cannot be null"); + } + else + { + this.PhoneNumber = phoneNumber; + } + // to ensure "date" is required (not null) + if (date == null) + { + throw new InvalidDataException("date is a required property for GetSmsEventReportEvents and cannot be null"); + } + else + { + this.Date = date; + } + // to ensure "messageId" is required (not null) + if (messageId == null) + { + throw new InvalidDataException("messageId is a required property for GetSmsEventReportEvents and cannot be null"); + } + else + { + this.MessageId = messageId; + } + // to ensure "_event" is required (not null) + if (_event == null) + { + throw new InvalidDataException("_event is a required property for GetSmsEventReportEvents and cannot be null"); + } + else + { + this.Event = _event; + } + this.Reason = reason; + this.Reply = reply; + this.Tag = tag; + } + + /// + /// Phone number which has generated the event + /// + /// Phone number which has generated the event + [DataMember(Name="phoneNumber", EmitDefaultValue=false)] + public string PhoneNumber { get; set; } + + /// + /// UTC date-time on which the event has been generated + /// + /// UTC date-time on which the event has been generated + [DataMember(Name="date", EmitDefaultValue=false)] + public DateTime? Date { get; set; } + + /// + /// Message ID which generated the event + /// + /// Message ID which generated the event + [DataMember(Name="messageId", EmitDefaultValue=false)] + public string MessageId { get; set; } + + + /// + /// Reason of bounce (only available if the event is hardbounce or softbounce) + /// + /// Reason of bounce (only available if the event is hardbounce or softbounce) + [DataMember(Name="reason", EmitDefaultValue=false)] + public string Reason { get; set; } + + /// + /// Gets or Sets Reply + /// + [DataMember(Name="reply", EmitDefaultValue=false)] + public string Reply { get; set; } + + /// + /// Tag of the SMS which generated the event + /// + /// Tag of the SMS which generated the event + [DataMember(Name="tag", EmitDefaultValue=false)] + public string Tag { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetSmsEventReportEvents {\n"); + sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); + sb.Append(" Date: ").Append(Date).Append("\n"); + sb.Append(" MessageId: ").Append(MessageId).Append("\n"); + sb.Append(" Event: ").Append(Event).Append("\n"); + sb.Append(" Reason: ").Append(Reason).Append("\n"); + sb.Append(" Reply: ").Append(Reply).Append("\n"); + sb.Append(" Tag: ").Append(Tag).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetSmsEventReportEvents); + } + + /// + /// Returns true if GetSmsEventReportEvents instances are equal + /// + /// Instance of GetSmsEventReportEvents to be compared + /// Boolean + public bool Equals(GetSmsEventReportEvents input) + { + if (input == null) + return false; + + return + ( + this.PhoneNumber == input.PhoneNumber || + (this.PhoneNumber != null && + this.PhoneNumber.Equals(input.PhoneNumber)) + ) && + ( + this.Date == input.Date || + (this.Date != null && + this.Date.Equals(input.Date)) + ) && + ( + this.MessageId == input.MessageId || + (this.MessageId != null && + this.MessageId.Equals(input.MessageId)) + ) && + ( + this.Event == input.Event || + (this.Event != null && + this.Event.Equals(input.Event)) + ) && + ( + this.Reason == input.Reason || + (this.Reason != null && + this.Reason.Equals(input.Reason)) + ) && + ( + this.Reply == input.Reply || + (this.Reply != null && + this.Reply.Equals(input.Reply)) + ) && + ( + this.Tag == input.Tag || + (this.Tag != null && + this.Tag.Equals(input.Tag)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.PhoneNumber != null) + hashCode = hashCode * 59 + this.PhoneNumber.GetHashCode(); + if (this.Date != null) + hashCode = hashCode * 59 + this.Date.GetHashCode(); + if (this.MessageId != null) + hashCode = hashCode * 59 + this.MessageId.GetHashCode(); + if (this.Event != null) + hashCode = hashCode * 59 + this.Event.GetHashCode(); + if (this.Reason != null) + hashCode = hashCode * 59 + this.Reason.GetHashCode(); + if (this.Reply != null) + hashCode = hashCode * 59 + this.Reply.GetHashCode(); + if (this.Tag != null) + hashCode = hashCode * 59 + this.Tag.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetSmtpTemplateOverview.cs b/src/sib_api_v3_sdk/Model/GetSmtpTemplateOverview.cs new file mode 100644 index 0000000..353a8b5 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetSmtpTemplateOverview.cs @@ -0,0 +1,412 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetSmtpTemplateOverview + /// + [DataContract] + public partial class GetSmtpTemplateOverview : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetSmtpTemplateOverview() { } + /// + /// Initializes a new instance of the class. + /// + /// ID of the template (required). + /// Name of the template (required). + /// Subject of the template (required). + /// Status of template (true=active, false=inactive) (required). + /// Status of test sending for the template (true=test email has been sent, false=test email has not been sent) (required). + /// sender (required). + /// Email defined as the \"Reply to\" for the template (required). + /// Customisation of the \"to\" field for the template (required). + /// Tag of the template (required). + /// HTML content of the template (required). + /// Creation UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ) (required). + /// Last modification UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ) (required). + public GetSmtpTemplateOverview(long? id = default(long?), string name = default(string), string subject = default(string), bool? isActive = default(bool?), bool? testSent = default(bool?), GetSmtpTemplateOverviewSender sender = default(GetSmtpTemplateOverviewSender), string replyTo = default(string), string toField = default(string), string tag = default(string), string htmlContent = default(string), DateTime? createdAt = default(DateTime?), DateTime? modifiedAt = default(DateTime?)) + { + // to ensure "id" is required (not null) + if (id == null) + { + throw new InvalidDataException("id is a required property for GetSmtpTemplateOverview and cannot be null"); + } + else + { + this.Id = id; + } + // to ensure "name" is required (not null) + if (name == null) + { + throw new InvalidDataException("name is a required property for GetSmtpTemplateOverview and cannot be null"); + } + else + { + this.Name = name; + } + // to ensure "subject" is required (not null) + if (subject == null) + { + throw new InvalidDataException("subject is a required property for GetSmtpTemplateOverview and cannot be null"); + } + else + { + this.Subject = subject; + } + // to ensure "isActive" is required (not null) + if (isActive == null) + { + throw new InvalidDataException("isActive is a required property for GetSmtpTemplateOverview and cannot be null"); + } + else + { + this.IsActive = isActive; + } + // to ensure "testSent" is required (not null) + if (testSent == null) + { + throw new InvalidDataException("testSent is a required property for GetSmtpTemplateOverview and cannot be null"); + } + else + { + this.TestSent = testSent; + } + // to ensure "sender" is required (not null) + if (sender == null) + { + throw new InvalidDataException("sender is a required property for GetSmtpTemplateOverview and cannot be null"); + } + else + { + this.Sender = sender; + } + // to ensure "replyTo" is required (not null) + if (replyTo == null) + { + throw new InvalidDataException("replyTo is a required property for GetSmtpTemplateOverview and cannot be null"); + } + else + { + this.ReplyTo = replyTo; + } + // to ensure "toField" is required (not null) + if (toField == null) + { + throw new InvalidDataException("toField is a required property for GetSmtpTemplateOverview and cannot be null"); + } + else + { + this.ToField = toField; + } + // to ensure "tag" is required (not null) + if (tag == null) + { + throw new InvalidDataException("tag is a required property for GetSmtpTemplateOverview and cannot be null"); + } + else + { + this.Tag = tag; + } + // to ensure "htmlContent" is required (not null) + if (htmlContent == null) + { + throw new InvalidDataException("htmlContent is a required property for GetSmtpTemplateOverview and cannot be null"); + } + else + { + this.HtmlContent = htmlContent; + } + // to ensure "createdAt" is required (not null) + if (createdAt == null) + { + throw new InvalidDataException("createdAt is a required property for GetSmtpTemplateOverview and cannot be null"); + } + else + { + this.CreatedAt = createdAt; + } + // to ensure "modifiedAt" is required (not null) + if (modifiedAt == null) + { + throw new InvalidDataException("modifiedAt is a required property for GetSmtpTemplateOverview and cannot be null"); + } + else + { + this.ModifiedAt = modifiedAt; + } + } + + /// + /// ID of the template + /// + /// ID of the template + [DataMember(Name="id", EmitDefaultValue=false)] + public long? Id { get; set; } + + /// + /// Name of the template + /// + /// Name of the template + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Subject of the template + /// + /// Subject of the template + [DataMember(Name="subject", EmitDefaultValue=false)] + public string Subject { get; set; } + + /// + /// Status of template (true=active, false=inactive) + /// + /// Status of template (true=active, false=inactive) + [DataMember(Name="isActive", EmitDefaultValue=false)] + public bool? IsActive { get; set; } + + /// + /// Status of test sending for the template (true=test email has been sent, false=test email has not been sent) + /// + /// Status of test sending for the template (true=test email has been sent, false=test email has not been sent) + [DataMember(Name="testSent", EmitDefaultValue=false)] + public bool? TestSent { get; set; } + + /// + /// Gets or Sets Sender + /// + [DataMember(Name="sender", EmitDefaultValue=false)] + public GetSmtpTemplateOverviewSender Sender { get; set; } + + /// + /// Email defined as the \"Reply to\" for the template + /// + /// Email defined as the \"Reply to\" for the template + [DataMember(Name="replyTo", EmitDefaultValue=false)] + public string ReplyTo { get; set; } + + /// + /// Customisation of the \"to\" field for the template + /// + /// Customisation of the \"to\" field for the template + [DataMember(Name="toField", EmitDefaultValue=false)] + public string ToField { get; set; } + + /// + /// Tag of the template + /// + /// Tag of the template + [DataMember(Name="tag", EmitDefaultValue=false)] + public string Tag { get; set; } + + /// + /// HTML content of the template + /// + /// HTML content of the template + [DataMember(Name="htmlContent", EmitDefaultValue=false)] + public string HtmlContent { get; set; } + + /// + /// Creation UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ) + /// + /// Creation UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ) + [DataMember(Name="createdAt", EmitDefaultValue=false)] + public DateTime? CreatedAt { get; set; } + + /// + /// Last modification UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ) + /// + /// Last modification UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ) + [DataMember(Name="modifiedAt", EmitDefaultValue=false)] + public DateTime? ModifiedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetSmtpTemplateOverview {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" IsActive: ").Append(IsActive).Append("\n"); + sb.Append(" TestSent: ").Append(TestSent).Append("\n"); + sb.Append(" Sender: ").Append(Sender).Append("\n"); + sb.Append(" ReplyTo: ").Append(ReplyTo).Append("\n"); + sb.Append(" ToField: ").Append(ToField).Append("\n"); + sb.Append(" Tag: ").Append(Tag).Append("\n"); + sb.Append(" HtmlContent: ").Append(HtmlContent).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ModifiedAt: ").Append(ModifiedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetSmtpTemplateOverview); + } + + /// + /// Returns true if GetSmtpTemplateOverview instances are equal + /// + /// Instance of GetSmtpTemplateOverview to be compared + /// Boolean + public bool Equals(GetSmtpTemplateOverview input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && + ( + this.IsActive == input.IsActive || + (this.IsActive != null && + this.IsActive.Equals(input.IsActive)) + ) && + ( + this.TestSent == input.TestSent || + (this.TestSent != null && + this.TestSent.Equals(input.TestSent)) + ) && + ( + this.Sender == input.Sender || + (this.Sender != null && + this.Sender.Equals(input.Sender)) + ) && + ( + this.ReplyTo == input.ReplyTo || + (this.ReplyTo != null && + this.ReplyTo.Equals(input.ReplyTo)) + ) && + ( + this.ToField == input.ToField || + (this.ToField != null && + this.ToField.Equals(input.ToField)) + ) && + ( + this.Tag == input.Tag || + (this.Tag != null && + this.Tag.Equals(input.Tag)) + ) && + ( + this.HtmlContent == input.HtmlContent || + (this.HtmlContent != null && + this.HtmlContent.Equals(input.HtmlContent)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.ModifiedAt == input.ModifiedAt || + (this.ModifiedAt != null && + this.ModifiedAt.Equals(input.ModifiedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Subject != null) + hashCode = hashCode * 59 + this.Subject.GetHashCode(); + if (this.IsActive != null) + hashCode = hashCode * 59 + this.IsActive.GetHashCode(); + if (this.TestSent != null) + hashCode = hashCode * 59 + this.TestSent.GetHashCode(); + if (this.Sender != null) + hashCode = hashCode * 59 + this.Sender.GetHashCode(); + if (this.ReplyTo != null) + hashCode = hashCode * 59 + this.ReplyTo.GetHashCode(); + if (this.ToField != null) + hashCode = hashCode * 59 + this.ToField.GetHashCode(); + if (this.Tag != null) + hashCode = hashCode * 59 + this.Tag.GetHashCode(); + if (this.HtmlContent != null) + hashCode = hashCode * 59 + this.HtmlContent.GetHashCode(); + if (this.CreatedAt != null) + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); + if (this.ModifiedAt != null) + hashCode = hashCode * 59 + this.ModifiedAt.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetSmtpTemplateOverviewSender.cs b/src/sib_api_v3_sdk/Model/GetSmtpTemplateOverviewSender.cs new file mode 100644 index 0000000..25eb79a --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetSmtpTemplateOverviewSender.cs @@ -0,0 +1,142 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetSmtpTemplateOverviewSender + /// + [DataContract] + public partial class GetSmtpTemplateOverviewSender : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// From email for the template. + /// From email for the template. + public GetSmtpTemplateOverviewSender(string name = default(string), string email = default(string)) + { + this.Name = name; + this.Email = email; + } + + /// + /// From email for the template + /// + /// From email for the template + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// From email for the template + /// + /// From email for the template + [DataMember(Name="email", EmitDefaultValue=false)] + public string Email { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetSmtpTemplateOverviewSender {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetSmtpTemplateOverviewSender); + } + + /// + /// Returns true if GetSmtpTemplateOverviewSender instances are equal + /// + /// Instance of GetSmtpTemplateOverviewSender to be compared + /// Boolean + public bool Equals(GetSmtpTemplateOverviewSender input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Email != null) + hashCode = hashCode * 59 + this.Email.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetSmtpTemplates.cs b/src/sib_api_v3_sdk/Model/GetSmtpTemplates.cs new file mode 100644 index 0000000..b41422d --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetSmtpTemplates.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetSmtpTemplates + /// + [DataContract] + public partial class GetSmtpTemplates : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Count of smtp templates. + /// templates. + public GetSmtpTemplates(long? count = default(long?), List templates = default(List)) + { + this.Count = count; + this.Templates = templates; + } + + /// + /// Count of smtp templates + /// + /// Count of smtp templates + [DataMember(Name="count", EmitDefaultValue=false)] + public long? Count { get; set; } + + /// + /// Gets or Sets Templates + /// + [DataMember(Name="templates", EmitDefaultValue=false)] + public List Templates { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetSmtpTemplates {\n"); + sb.Append(" Count: ").Append(Count).Append("\n"); + sb.Append(" Templates: ").Append(Templates).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetSmtpTemplates); + } + + /// + /// Returns true if GetSmtpTemplates instances are equal + /// + /// Instance of GetSmtpTemplates to be compared + /// Boolean + public bool Equals(GetSmtpTemplates input) + { + if (input == null) + return false; + + return + ( + this.Count == input.Count || + (this.Count != null && + this.Count.Equals(input.Count)) + ) && + ( + this.Templates == input.Templates || + this.Templates != null && + this.Templates.SequenceEqual(input.Templates) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Count != null) + hashCode = hashCode * 59 + this.Count.GetHashCode(); + if (this.Templates != null) + hashCode = hashCode * 59 + this.Templates.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetStatsByDomain.cs b/src/sib_api_v3_sdk/Model/GetStatsByDomain.cs new file mode 100644 index 0000000..1e81e1b --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetStatsByDomain.cs @@ -0,0 +1,110 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetStatsByDomain + /// + [DataContract] + public partial class GetStatsByDomain : Dictionary, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + public GetStatsByDomain() : base() + { + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetStatsByDomain {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetStatsByDomain); + } + + /// + /// Returns true if GetStatsByDomain instances are equal + /// + /// Instance of GetStatsByDomain to be compared + /// Boolean + public bool Equals(GetStatsByDomain input) + { + if (input == null) + return false; + + return base.Equals(input); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetTransacAggregatedSmsReport.cs b/src/sib_api_v3_sdk/Model/GetTransacAggregatedSmsReport.cs new file mode 100644 index 0000000..b9ef255 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetTransacAggregatedSmsReport.cs @@ -0,0 +1,363 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetTransacAggregatedSmsReport + /// + [DataContract] + public partial class GetTransacAggregatedSmsReport : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetTransacAggregatedSmsReport() { } + /// + /// Initializes a new instance of the class. + /// + /// Time frame of the report (required). + /// Number of requests for the timeframe (required). + /// Number of delivered SMS for the timeframe (required). + /// Number of hardbounces for the timeframe (required). + /// Number of softbounces for the timeframe (required). + /// Number of blocked contact for the timeframe (required). + /// Number of unsubscription for the timeframe (required). + /// Number of answered SMS for the timeframe (required). + /// Number of accepted for the timeframe (required). + /// Number of rejected for the timeframe (required). + public GetTransacAggregatedSmsReport(string range = default(string), long? requests = default(long?), long? delivered = default(long?), long? hardBounces = default(long?), long? softBounces = default(long?), long? blocked = default(long?), long? unsubscribed = default(long?), long? replied = default(long?), long? accepted = default(long?), long? rejected = default(long?)) + { + // to ensure "range" is required (not null) + if (range == null) + { + throw new InvalidDataException("range is a required property for GetTransacAggregatedSmsReport and cannot be null"); + } + else + { + this.Range = range; + } + // to ensure "requests" is required (not null) + if (requests == null) + { + throw new InvalidDataException("requests is a required property for GetTransacAggregatedSmsReport and cannot be null"); + } + else + { + this.Requests = requests; + } + // to ensure "delivered" is required (not null) + if (delivered == null) + { + throw new InvalidDataException("delivered is a required property for GetTransacAggregatedSmsReport and cannot be null"); + } + else + { + this.Delivered = delivered; + } + // to ensure "hardBounces" is required (not null) + if (hardBounces == null) + { + throw new InvalidDataException("hardBounces is a required property for GetTransacAggregatedSmsReport and cannot be null"); + } + else + { + this.HardBounces = hardBounces; + } + // to ensure "softBounces" is required (not null) + if (softBounces == null) + { + throw new InvalidDataException("softBounces is a required property for GetTransacAggregatedSmsReport and cannot be null"); + } + else + { + this.SoftBounces = softBounces; + } + // to ensure "blocked" is required (not null) + if (blocked == null) + { + throw new InvalidDataException("blocked is a required property for GetTransacAggregatedSmsReport and cannot be null"); + } + else + { + this.Blocked = blocked; + } + // to ensure "unsubscribed" is required (not null) + if (unsubscribed == null) + { + throw new InvalidDataException("unsubscribed is a required property for GetTransacAggregatedSmsReport and cannot be null"); + } + else + { + this.Unsubscribed = unsubscribed; + } + // to ensure "replied" is required (not null) + if (replied == null) + { + throw new InvalidDataException("replied is a required property for GetTransacAggregatedSmsReport and cannot be null"); + } + else + { + this.Replied = replied; + } + // to ensure "accepted" is required (not null) + if (accepted == null) + { + throw new InvalidDataException("accepted is a required property for GetTransacAggregatedSmsReport and cannot be null"); + } + else + { + this.Accepted = accepted; + } + // to ensure "rejected" is required (not null) + if (rejected == null) + { + throw new InvalidDataException("rejected is a required property for GetTransacAggregatedSmsReport and cannot be null"); + } + else + { + this.Rejected = rejected; + } + } + + /// + /// Time frame of the report + /// + /// Time frame of the report + [DataMember(Name="range", EmitDefaultValue=false)] + public string Range { get; set; } + + /// + /// Number of requests for the timeframe + /// + /// Number of requests for the timeframe + [DataMember(Name="requests", EmitDefaultValue=false)] + public long? Requests { get; set; } + + /// + /// Number of delivered SMS for the timeframe + /// + /// Number of delivered SMS for the timeframe + [DataMember(Name="delivered", EmitDefaultValue=false)] + public long? Delivered { get; set; } + + /// + /// Number of hardbounces for the timeframe + /// + /// Number of hardbounces for the timeframe + [DataMember(Name="hardBounces", EmitDefaultValue=false)] + public long? HardBounces { get; set; } + + /// + /// Number of softbounces for the timeframe + /// + /// Number of softbounces for the timeframe + [DataMember(Name="softBounces", EmitDefaultValue=false)] + public long? SoftBounces { get; set; } + + /// + /// Number of blocked contact for the timeframe + /// + /// Number of blocked contact for the timeframe + [DataMember(Name="blocked", EmitDefaultValue=false)] + public long? Blocked { get; set; } + + /// + /// Number of unsubscription for the timeframe + /// + /// Number of unsubscription for the timeframe + [DataMember(Name="unsubscribed", EmitDefaultValue=false)] + public long? Unsubscribed { get; set; } + + /// + /// Number of answered SMS for the timeframe + /// + /// Number of answered SMS for the timeframe + [DataMember(Name="replied", EmitDefaultValue=false)] + public long? Replied { get; set; } + + /// + /// Number of accepted for the timeframe + /// + /// Number of accepted for the timeframe + [DataMember(Name="accepted", EmitDefaultValue=false)] + public long? Accepted { get; set; } + + /// + /// Number of rejected for the timeframe + /// + /// Number of rejected for the timeframe + [DataMember(Name="rejected", EmitDefaultValue=false)] + public long? Rejected { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetTransacAggregatedSmsReport {\n"); + sb.Append(" Range: ").Append(Range).Append("\n"); + sb.Append(" Requests: ").Append(Requests).Append("\n"); + sb.Append(" Delivered: ").Append(Delivered).Append("\n"); + sb.Append(" HardBounces: ").Append(HardBounces).Append("\n"); + sb.Append(" SoftBounces: ").Append(SoftBounces).Append("\n"); + sb.Append(" Blocked: ").Append(Blocked).Append("\n"); + sb.Append(" Unsubscribed: ").Append(Unsubscribed).Append("\n"); + sb.Append(" Replied: ").Append(Replied).Append("\n"); + sb.Append(" Accepted: ").Append(Accepted).Append("\n"); + sb.Append(" Rejected: ").Append(Rejected).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetTransacAggregatedSmsReport); + } + + /// + /// Returns true if GetTransacAggregatedSmsReport instances are equal + /// + /// Instance of GetTransacAggregatedSmsReport to be compared + /// Boolean + public bool Equals(GetTransacAggregatedSmsReport input) + { + if (input == null) + return false; + + return + ( + this.Range == input.Range || + (this.Range != null && + this.Range.Equals(input.Range)) + ) && + ( + this.Requests == input.Requests || + (this.Requests != null && + this.Requests.Equals(input.Requests)) + ) && + ( + this.Delivered == input.Delivered || + (this.Delivered != null && + this.Delivered.Equals(input.Delivered)) + ) && + ( + this.HardBounces == input.HardBounces || + (this.HardBounces != null && + this.HardBounces.Equals(input.HardBounces)) + ) && + ( + this.SoftBounces == input.SoftBounces || + (this.SoftBounces != null && + this.SoftBounces.Equals(input.SoftBounces)) + ) && + ( + this.Blocked == input.Blocked || + (this.Blocked != null && + this.Blocked.Equals(input.Blocked)) + ) && + ( + this.Unsubscribed == input.Unsubscribed || + (this.Unsubscribed != null && + this.Unsubscribed.Equals(input.Unsubscribed)) + ) && + ( + this.Replied == input.Replied || + (this.Replied != null && + this.Replied.Equals(input.Replied)) + ) && + ( + this.Accepted == input.Accepted || + (this.Accepted != null && + this.Accepted.Equals(input.Accepted)) + ) && + ( + this.Rejected == input.Rejected || + (this.Rejected != null && + this.Rejected.Equals(input.Rejected)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Range != null) + hashCode = hashCode * 59 + this.Range.GetHashCode(); + if (this.Requests != null) + hashCode = hashCode * 59 + this.Requests.GetHashCode(); + if (this.Delivered != null) + hashCode = hashCode * 59 + this.Delivered.GetHashCode(); + if (this.HardBounces != null) + hashCode = hashCode * 59 + this.HardBounces.GetHashCode(); + if (this.SoftBounces != null) + hashCode = hashCode * 59 + this.SoftBounces.GetHashCode(); + if (this.Blocked != null) + hashCode = hashCode * 59 + this.Blocked.GetHashCode(); + if (this.Unsubscribed != null) + hashCode = hashCode * 59 + this.Unsubscribed.GetHashCode(); + if (this.Replied != null) + hashCode = hashCode * 59 + this.Replied.GetHashCode(); + if (this.Accepted != null) + hashCode = hashCode * 59 + this.Accepted.GetHashCode(); + if (this.Rejected != null) + hashCode = hashCode * 59 + this.Rejected.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetTransacSmsReport.cs b/src/sib_api_v3_sdk/Model/GetTransacSmsReport.cs new file mode 100644 index 0000000..0a48cd7 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetTransacSmsReport.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetTransacSmsReport + /// + [DataContract] + public partial class GetTransacSmsReport : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// reports. + public GetTransacSmsReport(List reports = default(List)) + { + this.Reports = reports; + } + + /// + /// Gets or Sets Reports + /// + [DataMember(Name="reports", EmitDefaultValue=false)] + public List Reports { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetTransacSmsReport {\n"); + sb.Append(" Reports: ").Append(Reports).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetTransacSmsReport); + } + + /// + /// Returns true if GetTransacSmsReport instances are equal + /// + /// Instance of GetTransacSmsReport to be compared + /// Boolean + public bool Equals(GetTransacSmsReport input) + { + if (input == null) + return false; + + return + ( + this.Reports == input.Reports || + this.Reports != null && + this.Reports.SequenceEqual(input.Reports) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Reports != null) + hashCode = hashCode * 59 + this.Reports.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetTransacSmsReportReports.cs b/src/sib_api_v3_sdk/Model/GetTransacSmsReportReports.cs new file mode 100644 index 0000000..5daadff --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetTransacSmsReportReports.cs @@ -0,0 +1,364 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetTransacSmsReportReports + /// + [DataContract] + public partial class GetTransacSmsReportReports : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetTransacSmsReportReports() { } + /// + /// Initializes a new instance of the class. + /// + /// Date for which statistics are retrieved (required). + /// Number of requests for the date (required). + /// Number of delivered SMS for the date (required). + /// Number of hardbounces for the date (required). + /// Number of softbounces for the date (required). + /// Number of blocked contact for the date (required). + /// Number of unsubscription for the date (required). + /// Number of answered SMS for the date (required). + /// Number of accepted for the date (required). + /// Number of rejected for the date (required). + public GetTransacSmsReportReports(DateTime? date = default(DateTime?), long? requests = default(long?), long? delivered = default(long?), long? hardBounces = default(long?), long? softBounces = default(long?), long? blocked = default(long?), long? unsubscribed = default(long?), long? replied = default(long?), long? accepted = default(long?), long? rejected = default(long?)) + { + // to ensure "date" is required (not null) + if (date == null) + { + throw new InvalidDataException("date is a required property for GetTransacSmsReportReports and cannot be null"); + } + else + { + this.Date = date; + } + // to ensure "requests" is required (not null) + if (requests == null) + { + throw new InvalidDataException("requests is a required property for GetTransacSmsReportReports and cannot be null"); + } + else + { + this.Requests = requests; + } + // to ensure "delivered" is required (not null) + if (delivered == null) + { + throw new InvalidDataException("delivered is a required property for GetTransacSmsReportReports and cannot be null"); + } + else + { + this.Delivered = delivered; + } + // to ensure "hardBounces" is required (not null) + if (hardBounces == null) + { + throw new InvalidDataException("hardBounces is a required property for GetTransacSmsReportReports and cannot be null"); + } + else + { + this.HardBounces = hardBounces; + } + // to ensure "softBounces" is required (not null) + if (softBounces == null) + { + throw new InvalidDataException("softBounces is a required property for GetTransacSmsReportReports and cannot be null"); + } + else + { + this.SoftBounces = softBounces; + } + // to ensure "blocked" is required (not null) + if (blocked == null) + { + throw new InvalidDataException("blocked is a required property for GetTransacSmsReportReports and cannot be null"); + } + else + { + this.Blocked = blocked; + } + // to ensure "unsubscribed" is required (not null) + if (unsubscribed == null) + { + throw new InvalidDataException("unsubscribed is a required property for GetTransacSmsReportReports and cannot be null"); + } + else + { + this.Unsubscribed = unsubscribed; + } + // to ensure "replied" is required (not null) + if (replied == null) + { + throw new InvalidDataException("replied is a required property for GetTransacSmsReportReports and cannot be null"); + } + else + { + this.Replied = replied; + } + // to ensure "accepted" is required (not null) + if (accepted == null) + { + throw new InvalidDataException("accepted is a required property for GetTransacSmsReportReports and cannot be null"); + } + else + { + this.Accepted = accepted; + } + // to ensure "rejected" is required (not null) + if (rejected == null) + { + throw new InvalidDataException("rejected is a required property for GetTransacSmsReportReports and cannot be null"); + } + else + { + this.Rejected = rejected; + } + } + + /// + /// Date for which statistics are retrieved + /// + /// Date for which statistics are retrieved + [DataMember(Name="date", EmitDefaultValue=false)] + [JsonConverter(typeof(SwaggerDateConverter))] + public DateTime? Date { get; set; } + + /// + /// Number of requests for the date + /// + /// Number of requests for the date + [DataMember(Name="requests", EmitDefaultValue=false)] + public long? Requests { get; set; } + + /// + /// Number of delivered SMS for the date + /// + /// Number of delivered SMS for the date + [DataMember(Name="delivered", EmitDefaultValue=false)] + public long? Delivered { get; set; } + + /// + /// Number of hardbounces for the date + /// + /// Number of hardbounces for the date + [DataMember(Name="hardBounces", EmitDefaultValue=false)] + public long? HardBounces { get; set; } + + /// + /// Number of softbounces for the date + /// + /// Number of softbounces for the date + [DataMember(Name="softBounces", EmitDefaultValue=false)] + public long? SoftBounces { get; set; } + + /// + /// Number of blocked contact for the date + /// + /// Number of blocked contact for the date + [DataMember(Name="blocked", EmitDefaultValue=false)] + public long? Blocked { get; set; } + + /// + /// Number of unsubscription for the date + /// + /// Number of unsubscription for the date + [DataMember(Name="unsubscribed", EmitDefaultValue=false)] + public long? Unsubscribed { get; set; } + + /// + /// Number of answered SMS for the date + /// + /// Number of answered SMS for the date + [DataMember(Name="replied", EmitDefaultValue=false)] + public long? Replied { get; set; } + + /// + /// Number of accepted for the date + /// + /// Number of accepted for the date + [DataMember(Name="accepted", EmitDefaultValue=false)] + public long? Accepted { get; set; } + + /// + /// Number of rejected for the date + /// + /// Number of rejected for the date + [DataMember(Name="rejected", EmitDefaultValue=false)] + public long? Rejected { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetTransacSmsReportReports {\n"); + sb.Append(" Date: ").Append(Date).Append("\n"); + sb.Append(" Requests: ").Append(Requests).Append("\n"); + sb.Append(" Delivered: ").Append(Delivered).Append("\n"); + sb.Append(" HardBounces: ").Append(HardBounces).Append("\n"); + sb.Append(" SoftBounces: ").Append(SoftBounces).Append("\n"); + sb.Append(" Blocked: ").Append(Blocked).Append("\n"); + sb.Append(" Unsubscribed: ").Append(Unsubscribed).Append("\n"); + sb.Append(" Replied: ").Append(Replied).Append("\n"); + sb.Append(" Accepted: ").Append(Accepted).Append("\n"); + sb.Append(" Rejected: ").Append(Rejected).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetTransacSmsReportReports); + } + + /// + /// Returns true if GetTransacSmsReportReports instances are equal + /// + /// Instance of GetTransacSmsReportReports to be compared + /// Boolean + public bool Equals(GetTransacSmsReportReports input) + { + if (input == null) + return false; + + return + ( + this.Date == input.Date || + (this.Date != null && + this.Date.Equals(input.Date)) + ) && + ( + this.Requests == input.Requests || + (this.Requests != null && + this.Requests.Equals(input.Requests)) + ) && + ( + this.Delivered == input.Delivered || + (this.Delivered != null && + this.Delivered.Equals(input.Delivered)) + ) && + ( + this.HardBounces == input.HardBounces || + (this.HardBounces != null && + this.HardBounces.Equals(input.HardBounces)) + ) && + ( + this.SoftBounces == input.SoftBounces || + (this.SoftBounces != null && + this.SoftBounces.Equals(input.SoftBounces)) + ) && + ( + this.Blocked == input.Blocked || + (this.Blocked != null && + this.Blocked.Equals(input.Blocked)) + ) && + ( + this.Unsubscribed == input.Unsubscribed || + (this.Unsubscribed != null && + this.Unsubscribed.Equals(input.Unsubscribed)) + ) && + ( + this.Replied == input.Replied || + (this.Replied != null && + this.Replied.Equals(input.Replied)) + ) && + ( + this.Accepted == input.Accepted || + (this.Accepted != null && + this.Accepted.Equals(input.Accepted)) + ) && + ( + this.Rejected == input.Rejected || + (this.Rejected != null && + this.Rejected.Equals(input.Rejected)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Date != null) + hashCode = hashCode * 59 + this.Date.GetHashCode(); + if (this.Requests != null) + hashCode = hashCode * 59 + this.Requests.GetHashCode(); + if (this.Delivered != null) + hashCode = hashCode * 59 + this.Delivered.GetHashCode(); + if (this.HardBounces != null) + hashCode = hashCode * 59 + this.HardBounces.GetHashCode(); + if (this.SoftBounces != null) + hashCode = hashCode * 59 + this.SoftBounces.GetHashCode(); + if (this.Blocked != null) + hashCode = hashCode * 59 + this.Blocked.GetHashCode(); + if (this.Unsubscribed != null) + hashCode = hashCode * 59 + this.Unsubscribed.GetHashCode(); + if (this.Replied != null) + hashCode = hashCode * 59 + this.Replied.GetHashCode(); + if (this.Accepted != null) + hashCode = hashCode * 59 + this.Accepted.GetHashCode(); + if (this.Rejected != null) + hashCode = hashCode * 59 + this.Rejected.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetWebhook.cs b/src/sib_api_v3_sdk/Model/GetWebhook.cs new file mode 100644 index 0000000..c99c9c3 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetWebhook.cs @@ -0,0 +1,308 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetWebhook + /// + [DataContract] + public partial class GetWebhook : IEquatable, IValidatableObject + { + /// + /// Type of webhook (marketing or transac) + /// + /// Type of webhook (marketing or transac) + [JsonConverter(typeof(StringEnumConverter))] + public enum TypeEnum + { + + /// + /// Enum Marketing for value: marketing + /// + [EnumMember(Value = "marketing")] + Marketing = 1, + + /// + /// Enum Transac for value: transac + /// + [EnumMember(Value = "transac")] + Transac = 2 + } + + /// + /// Type of webhook (marketing or transac) + /// + /// Type of webhook (marketing or transac) + [DataMember(Name="type", EmitDefaultValue=false)] + public TypeEnum Type { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetWebhook() { } + /// + /// Initializes a new instance of the class. + /// + /// URL of the webhook (required). + /// ID of the webhook (required). + /// Description of the webhook (required). + /// events (required). + /// Type of webhook (marketing or transac) (required). + /// Creation UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) (required). + /// Last modification UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) (required). + public GetWebhook(string url = default(string), long? id = default(long?), string description = default(string), List events = default(List), TypeEnum type = default(TypeEnum), DateTime? createdAt = default(DateTime?), DateTime? modifiedAt = default(DateTime?)) + { + // to ensure "url" is required (not null) + if (url == null) + { + throw new InvalidDataException("url is a required property for GetWebhook and cannot be null"); + } + else + { + this.Url = url; + } + // to ensure "id" is required (not null) + if (id == null) + { + throw new InvalidDataException("id is a required property for GetWebhook and cannot be null"); + } + else + { + this.Id = id; + } + // to ensure "description" is required (not null) + if (description == null) + { + throw new InvalidDataException("description is a required property for GetWebhook and cannot be null"); + } + else + { + this.Description = description; + } + // to ensure "events" is required (not null) + if (events == null) + { + throw new InvalidDataException("events is a required property for GetWebhook and cannot be null"); + } + else + { + this.Events = events; + } + // to ensure "type" is required (not null) + if (type == null) + { + throw new InvalidDataException("type is a required property for GetWebhook and cannot be null"); + } + else + { + this.Type = type; + } + // to ensure "createdAt" is required (not null) + if (createdAt == null) + { + throw new InvalidDataException("createdAt is a required property for GetWebhook and cannot be null"); + } + else + { + this.CreatedAt = createdAt; + } + // to ensure "modifiedAt" is required (not null) + if (modifiedAt == null) + { + throw new InvalidDataException("modifiedAt is a required property for GetWebhook and cannot be null"); + } + else + { + this.ModifiedAt = modifiedAt; + } + } + + /// + /// URL of the webhook + /// + /// URL of the webhook + [DataMember(Name="url", EmitDefaultValue=false)] + public string Url { get; set; } + + /// + /// ID of the webhook + /// + /// ID of the webhook + [DataMember(Name="id", EmitDefaultValue=false)] + public long? Id { get; set; } + + /// + /// Description of the webhook + /// + /// Description of the webhook + [DataMember(Name="description", EmitDefaultValue=false)] + public string Description { get; set; } + + /// + /// Gets or Sets Events + /// + [DataMember(Name="events", EmitDefaultValue=false)] + public List Events { get; set; } + + + /// + /// Creation UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) + /// + /// Creation UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) + [DataMember(Name="createdAt", EmitDefaultValue=false)] + public DateTime? CreatedAt { get; set; } + + /// + /// Last modification UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) + /// + /// Last modification UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) + [DataMember(Name="modifiedAt", EmitDefaultValue=false)] + public DateTime? ModifiedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetWebhook {\n"); + sb.Append(" Url: ").Append(Url).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Events: ").Append(Events).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ModifiedAt: ").Append(ModifiedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetWebhook); + } + + /// + /// Returns true if GetWebhook instances are equal + /// + /// Instance of GetWebhook to be compared + /// Boolean + public bool Equals(GetWebhook input) + { + if (input == null) + return false; + + return + ( + this.Url == input.Url || + (this.Url != null && + this.Url.Equals(input.Url)) + ) && + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && + ( + this.Events == input.Events || + this.Events != null && + this.Events.SequenceEqual(input.Events) + ) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.ModifiedAt == input.ModifiedAt || + (this.ModifiedAt != null && + this.ModifiedAt.Equals(input.ModifiedAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Url != null) + hashCode = hashCode * 59 + this.Url.GetHashCode(); + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + if (this.Events != null) + hashCode = hashCode * 59 + this.Events.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.CreatedAt != null) + hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); + if (this.ModifiedAt != null) + hashCode = hashCode * 59 + this.ModifiedAt.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/GetWebhooks.cs b/src/sib_api_v3_sdk/Model/GetWebhooks.cs new file mode 100644 index 0000000..464e0c4 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/GetWebhooks.cs @@ -0,0 +1,137 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// GetWebhooks + /// + [DataContract] + public partial class GetWebhooks : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GetWebhooks() { } + /// + /// Initializes a new instance of the class. + /// + /// webhooks (required). + public GetWebhooks(List webhooks = default(List)) + { + // to ensure "webhooks" is required (not null) + if (webhooks == null) + { + throw new InvalidDataException("webhooks is a required property for GetWebhooks and cannot be null"); + } + else + { + this.Webhooks = webhooks; + } + } + + /// + /// Gets or Sets Webhooks + /// + [DataMember(Name="webhooks", EmitDefaultValue=false)] + public List Webhooks { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GetWebhooks {\n"); + sb.Append(" Webhooks: ").Append(Webhooks).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GetWebhooks); + } + + /// + /// Returns true if GetWebhooks instances are equal + /// + /// Instance of GetWebhooks to be compared + /// Boolean + public bool Equals(GetWebhooks input) + { + if (input == null) + return false; + + return + ( + this.Webhooks == input.Webhooks || + this.Webhooks != null && + this.Webhooks.SequenceEqual(input.Webhooks) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Webhooks != null) + hashCode = hashCode * 59 + this.Webhooks.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/ManageIp.cs b/src/sib_api_v3_sdk/Model/ManageIp.cs new file mode 100644 index 0000000..eed2510 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/ManageIp.cs @@ -0,0 +1,125 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// ManageIp + /// + [DataContract] + public partial class ManageIp : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Dedicated ID. + public ManageIp(string ip = default(string)) + { + this.Ip = ip; + } + + /// + /// Dedicated ID + /// + /// Dedicated ID + [DataMember(Name="ip", EmitDefaultValue=false)] + public string Ip { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ManageIp {\n"); + sb.Append(" Ip: ").Append(Ip).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ManageIp); + } + + /// + /// Returns true if ManageIp instances are equal + /// + /// Instance of ManageIp to be compared + /// Boolean + public bool Equals(ManageIp input) + { + if (input == null) + return false; + + return + ( + this.Ip == input.Ip || + (this.Ip != null && + this.Ip.Equals(input.Ip)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Ip != null) + hashCode = hashCode * 59 + this.Ip.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/PostContactInfo.cs b/src/sib_api_v3_sdk/Model/PostContactInfo.cs new file mode 100644 index 0000000..2056787 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/PostContactInfo.cs @@ -0,0 +1,137 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// PostContactInfo + /// + [DataContract] + public partial class PostContactInfo : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected PostContactInfo() { } + /// + /// Initializes a new instance of the class. + /// + /// contacts (required). + public PostContactInfo(PostContactInfoContacts contacts = default(PostContactInfoContacts)) + { + // to ensure "contacts" is required (not null) + if (contacts == null) + { + throw new InvalidDataException("contacts is a required property for PostContactInfo and cannot be null"); + } + else + { + this.Contacts = contacts; + } + } + + /// + /// Gets or Sets Contacts + /// + [DataMember(Name="contacts", EmitDefaultValue=false)] + public PostContactInfoContacts Contacts { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PostContactInfo {\n"); + sb.Append(" Contacts: ").Append(Contacts).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PostContactInfo); + } + + /// + /// Returns true if PostContactInfo instances are equal + /// + /// Instance of PostContactInfo to be compared + /// Boolean + public bool Equals(PostContactInfo input) + { + if (input == null) + return false; + + return + ( + this.Contacts == input.Contacts || + (this.Contacts != null && + this.Contacts.Equals(input.Contacts)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Contacts != null) + hashCode = hashCode * 59 + this.Contacts.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/PostContactInfoContacts.cs b/src/sib_api_v3_sdk/Model/PostContactInfoContacts.cs new file mode 100644 index 0000000..24d076f --- /dev/null +++ b/src/sib_api_v3_sdk/Model/PostContactInfoContacts.cs @@ -0,0 +1,157 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// PostContactInfoContacts + /// + [DataContract] + public partial class PostContactInfoContacts : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// success. + /// failure. + /// Displays the count of total number of contacts removed from list when user opts for \"all\" option.. + public PostContactInfoContacts(List success = default(List), List failure = default(List), long? total = default(long?)) + { + this.Success = success; + this.Failure = failure; + this.Total = total; + } + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public List Success { get; set; } + + /// + /// Gets or Sets Failure + /// + [DataMember(Name="failure", EmitDefaultValue=false)] + public List Failure { get; set; } + + /// + /// Displays the count of total number of contacts removed from list when user opts for \"all\" option. + /// + /// Displays the count of total number of contacts removed from list when user opts for \"all\" option. + [DataMember(Name="total", EmitDefaultValue=false)] + public long? Total { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PostContactInfoContacts {\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + sb.Append(" Failure: ").Append(Failure).Append("\n"); + sb.Append(" Total: ").Append(Total).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PostContactInfoContacts); + } + + /// + /// Returns true if PostContactInfoContacts instances are equal + /// + /// Instance of PostContactInfoContacts to be compared + /// Boolean + public bool Equals(PostContactInfoContacts input) + { + if (input == null) + return false; + + return + ( + this.Success == input.Success || + this.Success != null && + this.Success.SequenceEqual(input.Success) + ) && + ( + this.Failure == input.Failure || + this.Failure != null && + this.Failure.SequenceEqual(input.Failure) + ) && + ( + this.Total == input.Total || + (this.Total != null && + this.Total.Equals(input.Total)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Success != null) + hashCode = hashCode * 59 + this.Success.GetHashCode(); + if (this.Failure != null) + hashCode = hashCode * 59 + this.Failure.GetHashCode(); + if (this.Total != null) + hashCode = hashCode * 59 + this.Total.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/PostSendFailed.cs b/src/sib_api_v3_sdk/Model/PostSendFailed.cs new file mode 100644 index 0000000..47f7f0c --- /dev/null +++ b/src/sib_api_v3_sdk/Model/PostSendFailed.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// PostSendFailed + /// + [DataContract] + public partial class PostSendFailed : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected PostSendFailed() { } + /// + /// Initializes a new instance of the class. + /// + /// Response code (required). + /// Response message (required). + /// unexistingEmails. + /// withoutListEmails. + /// blackListedEmails. + public PostSendFailed(long? code = default(long?), string message = default(string), List unexistingEmails = default(List), List withoutListEmails = default(List), List blackListedEmails = default(List)) + { + // to ensure "code" is required (not null) + if (code == null) + { + throw new InvalidDataException("code is a required property for PostSendFailed and cannot be null"); + } + else + { + this.Code = code; + } + // to ensure "message" is required (not null) + if (message == null) + { + throw new InvalidDataException("message is a required property for PostSendFailed and cannot be null"); + } + else + { + this.Message = message; + } + this.UnexistingEmails = unexistingEmails; + this.WithoutListEmails = withoutListEmails; + this.BlackListedEmails = blackListedEmails; + } + + /// + /// Response code + /// + /// Response code + [DataMember(Name="code", EmitDefaultValue=false)] + public long? Code { get; set; } + + /// + /// Response message + /// + /// Response message + [DataMember(Name="message", EmitDefaultValue=false)] + public string Message { get; set; } + + /// + /// Gets or Sets UnexistingEmails + /// + [DataMember(Name="unexistingEmails", EmitDefaultValue=false)] + public List UnexistingEmails { get; set; } + + /// + /// Gets or Sets WithoutListEmails + /// + [DataMember(Name="withoutListEmails", EmitDefaultValue=false)] + public List WithoutListEmails { get; set; } + + /// + /// Gets or Sets BlackListedEmails + /// + [DataMember(Name="blackListedEmails", EmitDefaultValue=false)] + public List BlackListedEmails { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PostSendFailed {\n"); + sb.Append(" Code: ").Append(Code).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" UnexistingEmails: ").Append(UnexistingEmails).Append("\n"); + sb.Append(" WithoutListEmails: ").Append(WithoutListEmails).Append("\n"); + sb.Append(" BlackListedEmails: ").Append(BlackListedEmails).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PostSendFailed); + } + + /// + /// Returns true if PostSendFailed instances are equal + /// + /// Instance of PostSendFailed to be compared + /// Boolean + public bool Equals(PostSendFailed input) + { + if (input == null) + return false; + + return + ( + this.Code == input.Code || + (this.Code != null && + this.Code.Equals(input.Code)) + ) && + ( + this.Message == input.Message || + (this.Message != null && + this.Message.Equals(input.Message)) + ) && + ( + this.UnexistingEmails == input.UnexistingEmails || + this.UnexistingEmails != null && + this.UnexistingEmails.SequenceEqual(input.UnexistingEmails) + ) && + ( + this.WithoutListEmails == input.WithoutListEmails || + this.WithoutListEmails != null && + this.WithoutListEmails.SequenceEqual(input.WithoutListEmails) + ) && + ( + this.BlackListedEmails == input.BlackListedEmails || + this.BlackListedEmails != null && + this.BlackListedEmails.SequenceEqual(input.BlackListedEmails) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Code != null) + hashCode = hashCode * 59 + this.Code.GetHashCode(); + if (this.Message != null) + hashCode = hashCode * 59 + this.Message.GetHashCode(); + if (this.UnexistingEmails != null) + hashCode = hashCode * 59 + this.UnexistingEmails.GetHashCode(); + if (this.WithoutListEmails != null) + hashCode = hashCode * 59 + this.WithoutListEmails.GetHashCode(); + if (this.BlackListedEmails != null) + hashCode = hashCode * 59 + this.BlackListedEmails.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/PostSendSmsTestFailed.cs b/src/sib_api_v3_sdk/Model/PostSendSmsTestFailed.cs new file mode 100644 index 0000000..25210c5 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/PostSendSmsTestFailed.cs @@ -0,0 +1,195 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// PostSendSmsTestFailed + /// + [DataContract] + public partial class PostSendSmsTestFailed : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected PostSendSmsTestFailed() { } + /// + /// Initializes a new instance of the class. + /// + /// Response code (required). + /// Response message (required). + /// unexistingSms. + /// withoutListSms. + public PostSendSmsTestFailed(long? code = default(long?), string message = default(string), List unexistingSms = default(List), List withoutListSms = default(List)) + { + // to ensure "code" is required (not null) + if (code == null) + { + throw new InvalidDataException("code is a required property for PostSendSmsTestFailed and cannot be null"); + } + else + { + this.Code = code; + } + // to ensure "message" is required (not null) + if (message == null) + { + throw new InvalidDataException("message is a required property for PostSendSmsTestFailed and cannot be null"); + } + else + { + this.Message = message; + } + this.UnexistingSms = unexistingSms; + this.WithoutListSms = withoutListSms; + } + + /// + /// Response code + /// + /// Response code + [DataMember(Name="code", EmitDefaultValue=false)] + public long? Code { get; set; } + + /// + /// Response message + /// + /// Response message + [DataMember(Name="message", EmitDefaultValue=false)] + public string Message { get; set; } + + /// + /// Gets or Sets UnexistingSms + /// + [DataMember(Name="unexistingSms", EmitDefaultValue=false)] + public List UnexistingSms { get; set; } + + /// + /// Gets or Sets WithoutListSms + /// + [DataMember(Name="withoutListSms", EmitDefaultValue=false)] + public List WithoutListSms { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PostSendSmsTestFailed {\n"); + sb.Append(" Code: ").Append(Code).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" UnexistingSms: ").Append(UnexistingSms).Append("\n"); + sb.Append(" WithoutListSms: ").Append(WithoutListSms).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PostSendSmsTestFailed); + } + + /// + /// Returns true if PostSendSmsTestFailed instances are equal + /// + /// Instance of PostSendSmsTestFailed to be compared + /// Boolean + public bool Equals(PostSendSmsTestFailed input) + { + if (input == null) + return false; + + return + ( + this.Code == input.Code || + (this.Code != null && + this.Code.Equals(input.Code)) + ) && + ( + this.Message == input.Message || + (this.Message != null && + this.Message.Equals(input.Message)) + ) && + ( + this.UnexistingSms == input.UnexistingSms || + this.UnexistingSms != null && + this.UnexistingSms.SequenceEqual(input.UnexistingSms) + ) && + ( + this.WithoutListSms == input.WithoutListSms || + this.WithoutListSms != null && + this.WithoutListSms.SequenceEqual(input.WithoutListSms) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Code != null) + hashCode = hashCode * 59 + this.Code.GetHashCode(); + if (this.Message != null) + hashCode = hashCode * 59 + this.Message.GetHashCode(); + if (this.UnexistingSms != null) + hashCode = hashCode * 59 + this.UnexistingSms.GetHashCode(); + if (this.WithoutListSms != null) + hashCode = hashCode * 59 + this.WithoutListSms.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/RemainingCreditModel.cs b/src/sib_api_v3_sdk/Model/RemainingCreditModel.cs new file mode 100644 index 0000000..8ef48c8 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/RemainingCreditModel.cs @@ -0,0 +1,161 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// RemainingCreditModel + /// + [DataContract] + public partial class RemainingCreditModel : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RemainingCreditModel() { } + /// + /// Initializes a new instance of the class. + /// + /// child (required). + /// reseller (required). + public RemainingCreditModel(RemainingCreditModelChild child = default(RemainingCreditModelChild), RemainingCreditModelReseller reseller = default(RemainingCreditModelReseller)) + { + // to ensure "child" is required (not null) + if (child == null) + { + throw new InvalidDataException("child is a required property for RemainingCreditModel and cannot be null"); + } + else + { + this.Child = child; + } + // to ensure "reseller" is required (not null) + if (reseller == null) + { + throw new InvalidDataException("reseller is a required property for RemainingCreditModel and cannot be null"); + } + else + { + this.Reseller = reseller; + } + } + + /// + /// Gets or Sets Child + /// + [DataMember(Name="child", EmitDefaultValue=false)] + public RemainingCreditModelChild Child { get; set; } + + /// + /// Gets or Sets Reseller + /// + [DataMember(Name="reseller", EmitDefaultValue=false)] + public RemainingCreditModelReseller Reseller { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class RemainingCreditModel {\n"); + sb.Append(" Child: ").Append(Child).Append("\n"); + sb.Append(" Reseller: ").Append(Reseller).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as RemainingCreditModel); + } + + /// + /// Returns true if RemainingCreditModel instances are equal + /// + /// Instance of RemainingCreditModel to be compared + /// Boolean + public bool Equals(RemainingCreditModel input) + { + if (input == null) + return false; + + return + ( + this.Child == input.Child || + (this.Child != null && + this.Child.Equals(input.Child)) + ) && + ( + this.Reseller == input.Reseller || + (this.Reseller != null && + this.Reseller.Equals(input.Reseller)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Child != null) + hashCode = hashCode * 59 + this.Child.GetHashCode(); + if (this.Reseller != null) + hashCode = hashCode * 59 + this.Reseller.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/RemainingCreditModelChild.cs b/src/sib_api_v3_sdk/Model/RemainingCreditModelChild.cs new file mode 100644 index 0000000..488afd4 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/RemainingCreditModelChild.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// Credits remaining for child account + /// + [DataContract] + public partial class RemainingCreditModelChild : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RemainingCreditModelChild() { } + /// + /// Initializes a new instance of the class. + /// + /// SMS Credits remaining for child account (required). + /// Email Credits remaining for child account (required). + public RemainingCreditModelChild(long? sms = default(long?), long? email = default(long?)) + { + // to ensure "sms" is required (not null) + if (sms == null) + { + throw new InvalidDataException("sms is a required property for RemainingCreditModelChild and cannot be null"); + } + else + { + this.Sms = sms; + } + // to ensure "email" is required (not null) + if (email == null) + { + throw new InvalidDataException("email is a required property for RemainingCreditModelChild and cannot be null"); + } + else + { + this.Email = email; + } + } + + /// + /// SMS Credits remaining for child account + /// + /// SMS Credits remaining for child account + [DataMember(Name="sms", EmitDefaultValue=false)] + public long? Sms { get; set; } + + /// + /// Email Credits remaining for child account + /// + /// Email Credits remaining for child account + [DataMember(Name="email", EmitDefaultValue=false)] + public long? Email { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class RemainingCreditModelChild {\n"); + sb.Append(" Sms: ").Append(Sms).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as RemainingCreditModelChild); + } + + /// + /// Returns true if RemainingCreditModelChild instances are equal + /// + /// Instance of RemainingCreditModelChild to be compared + /// Boolean + public bool Equals(RemainingCreditModelChild input) + { + if (input == null) + return false; + + return + ( + this.Sms == input.Sms || + (this.Sms != null && + this.Sms.Equals(input.Sms)) + ) && + ( + this.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Sms != null) + hashCode = hashCode * 59 + this.Sms.GetHashCode(); + if (this.Email != null) + hashCode = hashCode * 59 + this.Email.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/RemainingCreditModelReseller.cs b/src/sib_api_v3_sdk/Model/RemainingCreditModelReseller.cs new file mode 100644 index 0000000..8a8ad24 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/RemainingCreditModelReseller.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// RemainingCreditModelReseller + /// + [DataContract] + public partial class RemainingCreditModelReseller : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RemainingCreditModelReseller() { } + /// + /// Initializes a new instance of the class. + /// + /// SMS Credits remaining for reseller account (required). + /// Email Credits remaining for reseller account (required). + public RemainingCreditModelReseller(long? sms = default(long?), long? email = default(long?)) + { + // to ensure "sms" is required (not null) + if (sms == null) + { + throw new InvalidDataException("sms is a required property for RemainingCreditModelReseller and cannot be null"); + } + else + { + this.Sms = sms; + } + // to ensure "email" is required (not null) + if (email == null) + { + throw new InvalidDataException("email is a required property for RemainingCreditModelReseller and cannot be null"); + } + else + { + this.Email = email; + } + } + + /// + /// SMS Credits remaining for reseller account + /// + /// SMS Credits remaining for reseller account + [DataMember(Name="sms", EmitDefaultValue=false)] + public long? Sms { get; set; } + + /// + /// Email Credits remaining for reseller account + /// + /// Email Credits remaining for reseller account + [DataMember(Name="email", EmitDefaultValue=false)] + public long? Email { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class RemainingCreditModelReseller {\n"); + sb.Append(" Sms: ").Append(Sms).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as RemainingCreditModelReseller); + } + + /// + /// Returns true if RemainingCreditModelReseller instances are equal + /// + /// Instance of RemainingCreditModelReseller to be compared + /// Boolean + public bool Equals(RemainingCreditModelReseller input) + { + if (input == null) + return false; + + return + ( + this.Sms == input.Sms || + (this.Sms != null && + this.Sms.Equals(input.Sms)) + ) && + ( + this.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Sms != null) + hashCode = hashCode * 59 + this.Sms.GetHashCode(); + if (this.Email != null) + hashCode = hashCode * 59 + this.Email.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/RemoveContactFromList.cs b/src/sib_api_v3_sdk/Model/RemoveContactFromList.cs new file mode 100644 index 0000000..ec85e9e --- /dev/null +++ b/src/sib_api_v3_sdk/Model/RemoveContactFromList.cs @@ -0,0 +1,142 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// RemoveContactFromList + /// + [DataContract] + public partial class RemoveContactFromList : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Required if 'all' is false. Emails to remove from a list. + /// Required if 'emails' is empty. Remove all existing contacts from a list. + public RemoveContactFromList(List emails = default(List), bool? all = default(bool?)) + { + this.Emails = emails; + this.All = all; + } + + /// + /// Required if 'all' is false. Emails to remove from a list + /// + /// Required if 'all' is false. Emails to remove from a list + [DataMember(Name="emails", EmitDefaultValue=false)] + public List Emails { get; set; } + + /// + /// Required if 'emails' is empty. Remove all existing contacts from a list + /// + /// Required if 'emails' is empty. Remove all existing contacts from a list + [DataMember(Name="all", EmitDefaultValue=false)] + public bool? All { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class RemoveContactFromList {\n"); + sb.Append(" Emails: ").Append(Emails).Append("\n"); + sb.Append(" All: ").Append(All).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as RemoveContactFromList); + } + + /// + /// Returns true if RemoveContactFromList instances are equal + /// + /// Instance of RemoveContactFromList to be compared + /// Boolean + public bool Equals(RemoveContactFromList input) + { + if (input == null) + return false; + + return + ( + this.Emails == input.Emails || + this.Emails != null && + this.Emails.SequenceEqual(input.Emails) + ) && + ( + this.All == input.All || + (this.All != null && + this.All.Equals(input.All)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Emails != null) + hashCode = hashCode * 59 + this.Emails.GetHashCode(); + if (this.All != null) + hashCode = hashCode * 59 + this.All.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/RemoveCredits.cs b/src/sib_api_v3_sdk/Model/RemoveCredits.cs new file mode 100644 index 0000000..4c04d81 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/RemoveCredits.cs @@ -0,0 +1,142 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// RemoveCredits + /// + [DataContract] + public partial class RemoveCredits : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Required if email credits are empty. SMS credits to be removed from the child account. + /// Required if sms credits are empty. Email credits to be removed from the child account. + public RemoveCredits(long? sms = default(long?), long? email = default(long?)) + { + this.Sms = sms; + this.Email = email; + } + + /// + /// Required if email credits are empty. SMS credits to be removed from the child account + /// + /// Required if email credits are empty. SMS credits to be removed from the child account + [DataMember(Name="sms", EmitDefaultValue=false)] + public long? Sms { get; set; } + + /// + /// Required if sms credits are empty. Email credits to be removed from the child account + /// + /// Required if sms credits are empty. Email credits to be removed from the child account + [DataMember(Name="email", EmitDefaultValue=false)] + public long? Email { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class RemoveCredits {\n"); + sb.Append(" Sms: ").Append(Sms).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as RemoveCredits); + } + + /// + /// Returns true if RemoveCredits instances are equal + /// + /// Instance of RemoveCredits to be compared + /// Boolean + public bool Equals(RemoveCredits input) + { + if (input == null) + return false; + + return + ( + this.Sms == input.Sms || + (this.Sms != null && + this.Sms.Equals(input.Sms)) + ) && + ( + this.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Sms != null) + hashCode = hashCode * 59 + this.Sms.GetHashCode(); + if (this.Email != null) + hashCode = hashCode * 59 + this.Email.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/RequestContactExport.cs b/src/sib_api_v3_sdk/Model/RequestContactExport.cs new file mode 100644 index 0000000..32a3cee --- /dev/null +++ b/src/sib_api_v3_sdk/Model/RequestContactExport.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// RequestContactExport + /// + [DataContract] + public partial class RequestContactExport : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RequestContactExport() { } + /// + /// Initializes a new instance of the class. + /// + /// List of all the attributes that you want to export. These attributes must be present in your contact database. For example, ['fname', 'lname', 'email'].. + /// Set the filter for the contacts to be exported. For example, {'blacklisted':true} will export all the blacklisted contacts. (required). + /// Webhook that will be called once the export process is finished. + public RequestContactExport(List exportAttributes = default(List), Object contactFilter = default(Object), string notifyUrl = default(string)) + { + // to ensure "contactFilter" is required (not null) + if (contactFilter == null) + { + throw new InvalidDataException("contactFilter is a required property for RequestContactExport and cannot be null"); + } + else + { + this.ContactFilter = contactFilter; + } + this.ExportAttributes = exportAttributes; + this.NotifyUrl = notifyUrl; + } + + /// + /// List of all the attributes that you want to export. These attributes must be present in your contact database. For example, ['fname', 'lname', 'email']. + /// + /// List of all the attributes that you want to export. These attributes must be present in your contact database. For example, ['fname', 'lname', 'email']. + [DataMember(Name="exportAttributes", EmitDefaultValue=false)] + public List ExportAttributes { get; set; } + + /// + /// Set the filter for the contacts to be exported. For example, {'blacklisted':true} will export all the blacklisted contacts. + /// + /// Set the filter for the contacts to be exported. For example, {'blacklisted':true} will export all the blacklisted contacts. + [DataMember(Name="contactFilter", EmitDefaultValue=false)] + public Object ContactFilter { get; set; } + + /// + /// Webhook that will be called once the export process is finished + /// + /// Webhook that will be called once the export process is finished + [DataMember(Name="notifyUrl", EmitDefaultValue=false)] + public string NotifyUrl { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class RequestContactExport {\n"); + sb.Append(" ExportAttributes: ").Append(ExportAttributes).Append("\n"); + sb.Append(" ContactFilter: ").Append(ContactFilter).Append("\n"); + sb.Append(" NotifyUrl: ").Append(NotifyUrl).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as RequestContactExport); + } + + /// + /// Returns true if RequestContactExport instances are equal + /// + /// Instance of RequestContactExport to be compared + /// Boolean + public bool Equals(RequestContactExport input) + { + if (input == null) + return false; + + return + ( + this.ExportAttributes == input.ExportAttributes || + this.ExportAttributes != null && + this.ExportAttributes.SequenceEqual(input.ExportAttributes) + ) && + ( + this.ContactFilter == input.ContactFilter || + (this.ContactFilter != null && + this.ContactFilter.Equals(input.ContactFilter)) + ) && + ( + this.NotifyUrl == input.NotifyUrl || + (this.NotifyUrl != null && + this.NotifyUrl.Equals(input.NotifyUrl)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ExportAttributes != null) + hashCode = hashCode * 59 + this.ExportAttributes.GetHashCode(); + if (this.ContactFilter != null) + hashCode = hashCode * 59 + this.ContactFilter.GetHashCode(); + if (this.NotifyUrl != null) + hashCode = hashCode * 59 + this.NotifyUrl.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/RequestContactImport.cs b/src/sib_api_v3_sdk/Model/RequestContactImport.cs new file mode 100644 index 0000000..0d5156b --- /dev/null +++ b/src/sib_api_v3_sdk/Model/RequestContactImport.cs @@ -0,0 +1,292 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// RequestContactImport + /// + [DataContract] + public partial class RequestContactImport : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Mandatory if fileBody is not defined. URL of the file to be imported (no local file). Possible file formats: .txt, .csv. + /// Mandatory if fileUrl is not defined. CSV content to be imported. Use semicolon to separate multiple attributes. + /// Mandatory if newList is not defined. Ids of the lists in which the contacts shall be imported. For example, [2, 4, 7].. + /// URL that will be called once the export process is finished. + /// newList. + /// To blacklist all the contacts for email (default to false). + /// To blacklist all the contacts for sms (default to false). + /// To facilitate the choice to update the existing contacts (default to true). + /// To facilitate the choice to erase any attribute of the existing contacts with empty value. emptyContactsAttributes = true means the empty fields in your import will erase any attribute that currently contain data in SendinBlue, & emptyContactsAttributes = false means the empty fields will not affect your existing data ( only available if `updateExistingContacts` set to true ) (default to false). + public RequestContactImport(string fileUrl = default(string), string fileBody = default(string), List listIds = default(List), string notifyUrl = default(string), RequestContactImportNewList newList = default(RequestContactImportNewList), bool? emailBlacklist = false, bool? smsBlacklist = false, bool? updateExistingContacts = true, bool? emptyContactsAttributes = false) + { + this.FileUrl = fileUrl; + this.FileBody = fileBody; + this.ListIds = listIds; + this.NotifyUrl = notifyUrl; + this.NewList = newList; + // use default value if no "emailBlacklist" provided + if (emailBlacklist == null) + { + this.EmailBlacklist = false; + } + else + { + this.EmailBlacklist = emailBlacklist; + } + // use default value if no "smsBlacklist" provided + if (smsBlacklist == null) + { + this.SmsBlacklist = false; + } + else + { + this.SmsBlacklist = smsBlacklist; + } + // use default value if no "updateExistingContacts" provided + if (updateExistingContacts == null) + { + this.UpdateExistingContacts = true; + } + else + { + this.UpdateExistingContacts = updateExistingContacts; + } + // use default value if no "emptyContactsAttributes" provided + if (emptyContactsAttributes == null) + { + this.EmptyContactsAttributes = false; + } + else + { + this.EmptyContactsAttributes = emptyContactsAttributes; + } + } + + /// + /// Mandatory if fileBody is not defined. URL of the file to be imported (no local file). Possible file formats: .txt, .csv + /// + /// Mandatory if fileBody is not defined. URL of the file to be imported (no local file). Possible file formats: .txt, .csv + [DataMember(Name="fileUrl", EmitDefaultValue=false)] + public string FileUrl { get; set; } + + /// + /// Mandatory if fileUrl is not defined. CSV content to be imported. Use semicolon to separate multiple attributes + /// + /// Mandatory if fileUrl is not defined. CSV content to be imported. Use semicolon to separate multiple attributes + [DataMember(Name="fileBody", EmitDefaultValue=false)] + public string FileBody { get; set; } + + /// + /// Mandatory if newList is not defined. Ids of the lists in which the contacts shall be imported. For example, [2, 4, 7]. + /// + /// Mandatory if newList is not defined. Ids of the lists in which the contacts shall be imported. For example, [2, 4, 7]. + [DataMember(Name="listIds", EmitDefaultValue=false)] + public List ListIds { get; set; } + + /// + /// URL that will be called once the export process is finished + /// + /// URL that will be called once the export process is finished + [DataMember(Name="notifyUrl", EmitDefaultValue=false)] + public string NotifyUrl { get; set; } + + /// + /// Gets or Sets NewList + /// + [DataMember(Name="newList", EmitDefaultValue=false)] + public RequestContactImportNewList NewList { get; set; } + + /// + /// To blacklist all the contacts for email + /// + /// To blacklist all the contacts for email + [DataMember(Name="emailBlacklist", EmitDefaultValue=false)] + public bool? EmailBlacklist { get; set; } + + /// + /// To blacklist all the contacts for sms + /// + /// To blacklist all the contacts for sms + [DataMember(Name="smsBlacklist", EmitDefaultValue=false)] + public bool? SmsBlacklist { get; set; } + + /// + /// To facilitate the choice to update the existing contacts + /// + /// To facilitate the choice to update the existing contacts + [DataMember(Name="updateExistingContacts", EmitDefaultValue=false)] + public bool? UpdateExistingContacts { get; set; } + + /// + /// To facilitate the choice to erase any attribute of the existing contacts with empty value. emptyContactsAttributes = true means the empty fields in your import will erase any attribute that currently contain data in SendinBlue, & emptyContactsAttributes = false means the empty fields will not affect your existing data ( only available if `updateExistingContacts` set to true ) + /// + /// To facilitate the choice to erase any attribute of the existing contacts with empty value. emptyContactsAttributes = true means the empty fields in your import will erase any attribute that currently contain data in SendinBlue, & emptyContactsAttributes = false means the empty fields will not affect your existing data ( only available if `updateExistingContacts` set to true ) + [DataMember(Name="emptyContactsAttributes", EmitDefaultValue=false)] + public bool? EmptyContactsAttributes { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class RequestContactImport {\n"); + sb.Append(" FileUrl: ").Append(FileUrl).Append("\n"); + sb.Append(" FileBody: ").Append(FileBody).Append("\n"); + sb.Append(" ListIds: ").Append(ListIds).Append("\n"); + sb.Append(" NotifyUrl: ").Append(NotifyUrl).Append("\n"); + sb.Append(" NewList: ").Append(NewList).Append("\n"); + sb.Append(" EmailBlacklist: ").Append(EmailBlacklist).Append("\n"); + sb.Append(" SmsBlacklist: ").Append(SmsBlacklist).Append("\n"); + sb.Append(" UpdateExistingContacts: ").Append(UpdateExistingContacts).Append("\n"); + sb.Append(" EmptyContactsAttributes: ").Append(EmptyContactsAttributes).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as RequestContactImport); + } + + /// + /// Returns true if RequestContactImport instances are equal + /// + /// Instance of RequestContactImport to be compared + /// Boolean + public bool Equals(RequestContactImport input) + { + if (input == null) + return false; + + return + ( + this.FileUrl == input.FileUrl || + (this.FileUrl != null && + this.FileUrl.Equals(input.FileUrl)) + ) && + ( + this.FileBody == input.FileBody || + (this.FileBody != null && + this.FileBody.Equals(input.FileBody)) + ) && + ( + this.ListIds == input.ListIds || + this.ListIds != null && + this.ListIds.SequenceEqual(input.ListIds) + ) && + ( + this.NotifyUrl == input.NotifyUrl || + (this.NotifyUrl != null && + this.NotifyUrl.Equals(input.NotifyUrl)) + ) && + ( + this.NewList == input.NewList || + (this.NewList != null && + this.NewList.Equals(input.NewList)) + ) && + ( + this.EmailBlacklist == input.EmailBlacklist || + (this.EmailBlacklist != null && + this.EmailBlacklist.Equals(input.EmailBlacklist)) + ) && + ( + this.SmsBlacklist == input.SmsBlacklist || + (this.SmsBlacklist != null && + this.SmsBlacklist.Equals(input.SmsBlacklist)) + ) && + ( + this.UpdateExistingContacts == input.UpdateExistingContacts || + (this.UpdateExistingContacts != null && + this.UpdateExistingContacts.Equals(input.UpdateExistingContacts)) + ) && + ( + this.EmptyContactsAttributes == input.EmptyContactsAttributes || + (this.EmptyContactsAttributes != null && + this.EmptyContactsAttributes.Equals(input.EmptyContactsAttributes)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.FileUrl != null) + hashCode = hashCode * 59 + this.FileUrl.GetHashCode(); + if (this.FileBody != null) + hashCode = hashCode * 59 + this.FileBody.GetHashCode(); + if (this.ListIds != null) + hashCode = hashCode * 59 + this.ListIds.GetHashCode(); + if (this.NotifyUrl != null) + hashCode = hashCode * 59 + this.NotifyUrl.GetHashCode(); + if (this.NewList != null) + hashCode = hashCode * 59 + this.NewList.GetHashCode(); + if (this.EmailBlacklist != null) + hashCode = hashCode * 59 + this.EmailBlacklist.GetHashCode(); + if (this.SmsBlacklist != null) + hashCode = hashCode * 59 + this.SmsBlacklist.GetHashCode(); + if (this.UpdateExistingContacts != null) + hashCode = hashCode * 59 + this.UpdateExistingContacts.GetHashCode(); + if (this.EmptyContactsAttributes != null) + hashCode = hashCode * 59 + this.EmptyContactsAttributes.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/RequestContactImportNewList.cs b/src/sib_api_v3_sdk/Model/RequestContactImportNewList.cs new file mode 100644 index 0000000..7513936 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/RequestContactImportNewList.cs @@ -0,0 +1,142 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// To create a new list and import the contacts into it, pass the listName and an optional folderId. + /// + [DataContract] + public partial class RequestContactImportNewList : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// List with listName will be created first and users will be imported in it (Mandatory if listIds is empty).. + /// Id of the folder where this new list shall be created (Mandatory if listName is not empty).. + public RequestContactImportNewList(string listName = default(string), long? folderId = default(long?)) + { + this.ListName = listName; + this.FolderId = folderId; + } + + /// + /// List with listName will be created first and users will be imported in it (Mandatory if listIds is empty). + /// + /// List with listName will be created first and users will be imported in it (Mandatory if listIds is empty). + [DataMember(Name="listName", EmitDefaultValue=false)] + public string ListName { get; set; } + + /// + /// Id of the folder where this new list shall be created (Mandatory if listName is not empty). + /// + /// Id of the folder where this new list shall be created (Mandatory if listName is not empty). + [DataMember(Name="folderId", EmitDefaultValue=false)] + public long? FolderId { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class RequestContactImportNewList {\n"); + sb.Append(" ListName: ").Append(ListName).Append("\n"); + sb.Append(" FolderId: ").Append(FolderId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as RequestContactImportNewList); + } + + /// + /// Returns true if RequestContactImportNewList instances are equal + /// + /// Instance of RequestContactImportNewList to be compared + /// Boolean + public bool Equals(RequestContactImportNewList input) + { + if (input == null) + return false; + + return + ( + this.ListName == input.ListName || + (this.ListName != null && + this.ListName.Equals(input.ListName)) + ) && + ( + this.FolderId == input.FolderId || + (this.FolderId != null && + this.FolderId.Equals(input.FolderId)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ListName != null) + hashCode = hashCode * 59 + this.ListName.GetHashCode(); + if (this.FolderId != null) + hashCode = hashCode * 59 + this.FolderId.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/RequestSmsRecipientExport.cs b/src/sib_api_v3_sdk/Model/RequestSmsRecipientExport.cs new file mode 100644 index 0000000..741d4d7 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/RequestSmsRecipientExport.cs @@ -0,0 +1,200 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// RequestSmsRecipientExport + /// + [DataContract] + public partial class RequestSmsRecipientExport : IEquatable, IValidatableObject + { + /// + /// Filter the recipients based on how they interacted with the campaign + /// + /// Filter the recipients based on how they interacted with the campaign + [JsonConverter(typeof(StringEnumConverter))] + public enum RecipientsTypeEnum + { + + /// + /// Enum All for value: all + /// + [EnumMember(Value = "all")] + All = 1, + + /// + /// Enum Delivered for value: delivered + /// + [EnumMember(Value = "delivered")] + Delivered = 2, + + /// + /// Enum Answered for value: answered + /// + [EnumMember(Value = "answered")] + Answered = 3, + + /// + /// Enum SoftBounces for value: softBounces + /// + [EnumMember(Value = "softBounces")] + SoftBounces = 4, + + /// + /// Enum HardBounces for value: hardBounces + /// + [EnumMember(Value = "hardBounces")] + HardBounces = 5, + + /// + /// Enum Unsubscribed for value: unsubscribed + /// + [EnumMember(Value = "unsubscribed")] + Unsubscribed = 6 + } + + /// + /// Filter the recipients based on how they interacted with the campaign + /// + /// Filter the recipients based on how they interacted with the campaign + [DataMember(Name="recipientsType", EmitDefaultValue=false)] + public RecipientsTypeEnum RecipientsType { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RequestSmsRecipientExport() { } + /// + /// Initializes a new instance of the class. + /// + /// URL that will be called once the export process is finished. + /// Filter the recipients based on how they interacted with the campaign (required). + public RequestSmsRecipientExport(string notifyURL = default(string), RecipientsTypeEnum recipientsType = default(RecipientsTypeEnum)) + { + // to ensure "recipientsType" is required (not null) + if (recipientsType == null) + { + throw new InvalidDataException("recipientsType is a required property for RequestSmsRecipientExport and cannot be null"); + } + else + { + this.RecipientsType = recipientsType; + } + this.NotifyURL = notifyURL; + } + + /// + /// URL that will be called once the export process is finished + /// + /// URL that will be called once the export process is finished + [DataMember(Name="notifyURL", EmitDefaultValue=false)] + public string NotifyURL { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class RequestSmsRecipientExport {\n"); + sb.Append(" NotifyURL: ").Append(NotifyURL).Append("\n"); + sb.Append(" RecipientsType: ").Append(RecipientsType).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as RequestSmsRecipientExport); + } + + /// + /// Returns true if RequestSmsRecipientExport instances are equal + /// + /// Instance of RequestSmsRecipientExport to be compared + /// Boolean + public bool Equals(RequestSmsRecipientExport input) + { + if (input == null) + return false; + + return + ( + this.NotifyURL == input.NotifyURL || + (this.NotifyURL != null && + this.NotifyURL.Equals(input.NotifyURL)) + ) && + ( + this.RecipientsType == input.RecipientsType || + (this.RecipientsType != null && + this.RecipientsType.Equals(input.RecipientsType)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.NotifyURL != null) + hashCode = hashCode * 59 + this.NotifyURL.GetHashCode(); + if (this.RecipientsType != null) + hashCode = hashCode * 59 + this.RecipientsType.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/SendEmail.cs b/src/sib_api_v3_sdk/Model/SendEmail.cs new file mode 100644 index 0000000..d99db4d --- /dev/null +++ b/src/sib_api_v3_sdk/Model/SendEmail.cs @@ -0,0 +1,274 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// SendEmail + /// + [DataContract] + public partial class SendEmail : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SendEmail() { } + /// + /// Initializes a new instance of the class. + /// + /// List of the email addresses of the recipients. For example, ['abc@example.com', 'asd@example.com']. (required). + /// List of the email addresses of the recipients in bcc. + /// List of the email addresses of the recipients in cc. + /// Email address which shall be used by campaign recipients to reply back. + /// 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. + /// Pass the list of content (base64 encoded) and name of the attachment. For example, [{'content':'base64 encoded content 1', 'name':'attcahment1'}, {'content':'base64 encoded content 2', 'name':'attcahment2'}].. + /// Pass the set of headers that shall be sent along the mail headers in the original email. 'sender.ip' header can be set (only for dedicated ip users) to mention the IP to be used for sending transactional emails. For example, {'Content-Type':'text/html', 'charset':'iso-8859-1', 'sender.ip':'1.2.3.4'}. + /// Pass the set of attributes to customize the template. For example, {'FNAME':'Joe', 'LNAME':'Doe'}. + /// Tag your emails to find them more easily. + public SendEmail(List emailTo = default(List), List emailBcc = default(List), List emailCc = default(List), string replyTo = default(string), string attachmentUrl = default(string), List attachment = default(List), Object headers = default(Object), Object attributes = default(Object), List tags = default(List)) + { + // to ensure "emailTo" is required (not null) + if (emailTo == null) + { + throw new InvalidDataException("emailTo is a required property for SendEmail and cannot be null"); + } + else + { + this.EmailTo = emailTo; + } + this.EmailBcc = emailBcc; + this.EmailCc = emailCc; + this.ReplyTo = replyTo; + this.AttachmentUrl = attachmentUrl; + this.Attachment = attachment; + this.Headers = headers; + this.Attributes = attributes; + this.Tags = tags; + } + + /// + /// List of the email addresses of the recipients. For example, ['abc@example.com', 'asd@example.com']. + /// + /// List of the email addresses of the recipients. For example, ['abc@example.com', 'asd@example.com']. + [DataMember(Name="emailTo", EmitDefaultValue=false)] + public List EmailTo { get; set; } + + /// + /// List of the email addresses of the recipients in bcc + /// + /// List of the email addresses of the recipients in bcc + [DataMember(Name="emailBcc", EmitDefaultValue=false)] + public List EmailBcc { get; set; } + + /// + /// List of the email addresses of the recipients in cc + /// + /// List of the email addresses of the recipients in cc + [DataMember(Name="emailCc", EmitDefaultValue=false)] + public List EmailCc { get; set; } + + /// + /// Email address which shall be used by campaign recipients to reply back + /// + /// Email address which shall be used by campaign recipients to reply back + [DataMember(Name="replyTo", EmitDefaultValue=false)] + public string ReplyTo { get; set; } + + /// + /// 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 + /// + /// 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 + [DataMember(Name="attachmentUrl", EmitDefaultValue=false)] + public string AttachmentUrl { get; set; } + + /// + /// Pass the list of content (base64 encoded) and name of the attachment. For example, [{'content':'base64 encoded content 1', 'name':'attcahment1'}, {'content':'base64 encoded content 2', 'name':'attcahment2'}]. + /// + /// Pass the list of content (base64 encoded) and name of the attachment. For example, [{'content':'base64 encoded content 1', 'name':'attcahment1'}, {'content':'base64 encoded content 2', 'name':'attcahment2'}]. + [DataMember(Name="attachment", EmitDefaultValue=false)] + public List Attachment { get; set; } + + /// + /// Pass the set of headers that shall be sent along the mail headers in the original email. 'sender.ip' header can be set (only for dedicated ip users) to mention the IP to be used for sending transactional emails. For example, {'Content-Type':'text/html', 'charset':'iso-8859-1', 'sender.ip':'1.2.3.4'} + /// + /// Pass the set of headers that shall be sent along the mail headers in the original email. 'sender.ip' header can be set (only for dedicated ip users) to mention the IP to be used for sending transactional emails. For example, {'Content-Type':'text/html', 'charset':'iso-8859-1', 'sender.ip':'1.2.3.4'} + [DataMember(Name="headers", EmitDefaultValue=false)] + public Object Headers { get; set; } + + /// + /// Pass the set of attributes to customize the template. For example, {'FNAME':'Joe', 'LNAME':'Doe'} + /// + /// Pass the set of attributes to customize the template. For example, {'FNAME':'Joe', 'LNAME':'Doe'} + [DataMember(Name="attributes", EmitDefaultValue=false)] + public Object Attributes { get; set; } + + /// + /// Tag your emails to find them more easily + /// + /// Tag your emails to find them more easily + [DataMember(Name="tags", EmitDefaultValue=false)] + public List Tags { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class SendEmail {\n"); + sb.Append(" EmailTo: ").Append(EmailTo).Append("\n"); + sb.Append(" EmailBcc: ").Append(EmailBcc).Append("\n"); + sb.Append(" EmailCc: ").Append(EmailCc).Append("\n"); + sb.Append(" ReplyTo: ").Append(ReplyTo).Append("\n"); + sb.Append(" AttachmentUrl: ").Append(AttachmentUrl).Append("\n"); + sb.Append(" Attachment: ").Append(Attachment).Append("\n"); + sb.Append(" Headers: ").Append(Headers).Append("\n"); + sb.Append(" Attributes: ").Append(Attributes).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SendEmail); + } + + /// + /// Returns true if SendEmail instances are equal + /// + /// Instance of SendEmail to be compared + /// Boolean + public bool Equals(SendEmail input) + { + if (input == null) + return false; + + return + ( + this.EmailTo == input.EmailTo || + this.EmailTo != null && + this.EmailTo.SequenceEqual(input.EmailTo) + ) && + ( + this.EmailBcc == input.EmailBcc || + this.EmailBcc != null && + this.EmailBcc.SequenceEqual(input.EmailBcc) + ) && + ( + this.EmailCc == input.EmailCc || + this.EmailCc != null && + this.EmailCc.SequenceEqual(input.EmailCc) + ) && + ( + this.ReplyTo == input.ReplyTo || + (this.ReplyTo != null && + this.ReplyTo.Equals(input.ReplyTo)) + ) && + ( + this.AttachmentUrl == input.AttachmentUrl || + (this.AttachmentUrl != null && + this.AttachmentUrl.Equals(input.AttachmentUrl)) + ) && + ( + this.Attachment == input.Attachment || + this.Attachment != null && + this.Attachment.SequenceEqual(input.Attachment) + ) && + ( + this.Headers == input.Headers || + (this.Headers != null && + this.Headers.Equals(input.Headers)) + ) && + ( + this.Attributes == input.Attributes || + (this.Attributes != null && + this.Attributes.Equals(input.Attributes)) + ) && + ( + this.Tags == input.Tags || + this.Tags != null && + this.Tags.SequenceEqual(input.Tags) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.EmailTo != null) + hashCode = hashCode * 59 + this.EmailTo.GetHashCode(); + if (this.EmailBcc != null) + hashCode = hashCode * 59 + this.EmailBcc.GetHashCode(); + if (this.EmailCc != null) + hashCode = hashCode * 59 + this.EmailCc.GetHashCode(); + if (this.ReplyTo != null) + hashCode = hashCode * 59 + this.ReplyTo.GetHashCode(); + if (this.AttachmentUrl != null) + hashCode = hashCode * 59 + this.AttachmentUrl.GetHashCode(); + if (this.Attachment != null) + hashCode = hashCode * 59 + this.Attachment.GetHashCode(); + if (this.Headers != null) + hashCode = hashCode * 59 + this.Headers.GetHashCode(); + if (this.Attributes != null) + hashCode = hashCode * 59 + this.Attributes.GetHashCode(); + if (this.Tags != null) + hashCode = hashCode * 59 + this.Tags.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/SendEmailAttachment.cs b/src/sib_api_v3_sdk/Model/SendEmailAttachment.cs new file mode 100644 index 0000000..d08302e --- /dev/null +++ b/src/sib_api_v3_sdk/Model/SendEmailAttachment.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// SendEmailAttachment + /// + [DataContract] + public partial class SendEmailAttachment : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SendEmailAttachment() { } + /// + /// Initializes a new instance of the class. + /// + /// Base64 encoded chunk data of the attachment generated on the fly (required). + /// Required for content. Name of the attachment (required). + public SendEmailAttachment(byte[] content = default(byte[]), string name = default(string)) + { + // to ensure "content" is required (not null) + if (content == null) + { + throw new InvalidDataException("content is a required property for SendEmailAttachment and cannot be null"); + } + else + { + this.Content = content; + } + // to ensure "name" is required (not null) + if (name == null) + { + throw new InvalidDataException("name is a required property for SendEmailAttachment and cannot be null"); + } + else + { + this.Name = name; + } + } + + /// + /// Base64 encoded chunk data of the attachment generated on the fly + /// + /// Base64 encoded chunk data of the attachment generated on the fly + [DataMember(Name="content", EmitDefaultValue=false)] + public byte[] Content { get; set; } + + /// + /// Required for content. Name of the attachment + /// + /// Required for content. Name of the attachment + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class SendEmailAttachment {\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SendEmailAttachment); + } + + /// + /// Returns true if SendEmailAttachment instances are equal + /// + /// Instance of SendEmailAttachment to be compared + /// Boolean + public bool Equals(SendEmailAttachment input) + { + if (input == null) + return false; + + return + ( + this.Content == input.Content || + (this.Content != null && + this.Content.Equals(input.Content)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Content != null) + hashCode = hashCode * 59 + this.Content.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/SendReport.cs b/src/sib_api_v3_sdk/Model/SendReport.cs new file mode 100644 index 0000000..c93897a --- /dev/null +++ b/src/sib_api_v3_sdk/Model/SendReport.cs @@ -0,0 +1,207 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// SendReport + /// + [DataContract] + public partial class SendReport : IEquatable, IValidatableObject + { + /// + /// Language of email content for campaign report sending. + /// + /// Language of email content for campaign report sending. + [JsonConverter(typeof(StringEnumConverter))] + public enum LanguageEnum + { + + /// + /// Enum Fr for value: fr + /// + [EnumMember(Value = "fr")] + Fr = 1, + + /// + /// Enum Es for value: es + /// + [EnumMember(Value = "es")] + Es = 2, + + /// + /// Enum Pt for value: pt + /// + [EnumMember(Value = "pt")] + Pt = 3, + + /// + /// Enum It for value: it + /// + [EnumMember(Value = "it")] + It = 4, + + /// + /// Enum De for value: de + /// + [EnumMember(Value = "de")] + De = 5, + + /// + /// Enum En for value: en + /// + [EnumMember(Value = "en")] + En = 6 + } + + /// + /// Language of email content for campaign report sending. + /// + /// Language of email content for campaign report sending. + [DataMember(Name="language", EmitDefaultValue=false)] + public LanguageEnum? Language { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SendReport() { } + /// + /// Initializes a new instance of the class. + /// + /// Language of email content for campaign report sending. (default to LanguageEnum.Fr). + /// email (required). + public SendReport(LanguageEnum? language = LanguageEnum.Fr, SendReportEmail email = default(SendReportEmail)) + { + // to ensure "email" is required (not null) + if (email == null) + { + throw new InvalidDataException("email is a required property for SendReport and cannot be null"); + } + else + { + this.Email = email; + } + // use default value if no "language" provided + if (language == null) + { + this.Language = LanguageEnum.Fr; + } + else + { + this.Language = language; + } + } + + + /// + /// Gets or Sets Email + /// + [DataMember(Name="email", EmitDefaultValue=false)] + public SendReportEmail Email { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class SendReport {\n"); + sb.Append(" Language: ").Append(Language).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SendReport); + } + + /// + /// Returns true if SendReport instances are equal + /// + /// Instance of SendReport to be compared + /// Boolean + public bool Equals(SendReport input) + { + if (input == null) + return false; + + return + ( + this.Language == input.Language || + (this.Language != null && + this.Language.Equals(input.Language)) + ) && + ( + this.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Language != null) + hashCode = hashCode * 59 + this.Language.GetHashCode(); + if (this.Email != null) + hashCode = hashCode * 59 + this.Email.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/SendReportEmail.cs b/src/sib_api_v3_sdk/Model/SendReportEmail.cs new file mode 100644 index 0000000..eec3c77 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/SendReportEmail.cs @@ -0,0 +1,268 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// Email sending credentials including subject, body, to, cc etc. + /// + [DataContract] + public partial class SendReportEmail : IEquatable, IValidatableObject + { + /// + /// Type of the message body + /// + /// Type of the message body + [JsonConverter(typeof(StringEnumConverter))] + public enum ContentTypeEnum + { + + /// + /// Enum Text for value: text + /// + [EnumMember(Value = "text")] + Text = 1, + + /// + /// Enum Html for value: html + /// + [EnumMember(Value = "html")] + Html = 2 + } + + /// + /// Type of the message body + /// + /// Type of the message body + [DataMember(Name="contentType", EmitDefaultValue=false)] + public ContentTypeEnum? ContentType { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SendReportEmail() { } + /// + /// Initializes a new instance of the class. + /// + /// Subject of the email message (required). + /// Email addresses of the recipients (required). + /// Type of the message body (default to ContentTypeEnum.Html). + /// Email addresses of the recipients in bcc. + /// Email addresses of the recipients in cc. + /// Body of the email message (required). + public SendReportEmail(string subject = default(string), List to = default(List), ContentTypeEnum? contentType = ContentTypeEnum.Html, List bcc = default(List), List cc = default(List), string body = default(string)) + { + // to ensure "subject" is required (not null) + if (subject == null) + { + throw new InvalidDataException("subject is a required property for SendReportEmail and cannot be null"); + } + else + { + this.Subject = subject; + } + // to ensure "to" is required (not null) + if (to == null) + { + throw new InvalidDataException("to is a required property for SendReportEmail and cannot be null"); + } + else + { + this.To = to; + } + // to ensure "body" is required (not null) + if (body == null) + { + throw new InvalidDataException("body is a required property for SendReportEmail and cannot be null"); + } + else + { + this.Body = body; + } + // use default value if no "contentType" provided + if (contentType == null) + { + this.ContentType = ContentTypeEnum.Html; + } + else + { + this.ContentType = contentType; + } + this.Bcc = bcc; + this.Cc = cc; + } + + /// + /// Subject of the email message + /// + /// Subject of the email message + [DataMember(Name="subject", EmitDefaultValue=false)] + public string Subject { get; set; } + + /// + /// Email addresses of the recipients + /// + /// Email addresses of the recipients + [DataMember(Name="to", EmitDefaultValue=false)] + public List To { get; set; } + + + /// + /// Email addresses of the recipients in bcc + /// + /// Email addresses of the recipients in bcc + [DataMember(Name="bcc", EmitDefaultValue=false)] + public List Bcc { get; set; } + + /// + /// Email addresses of the recipients in cc + /// + /// Email addresses of the recipients in cc + [DataMember(Name="cc", EmitDefaultValue=false)] + public List Cc { get; set; } + + /// + /// Body of the email message + /// + /// Body of the email message + [DataMember(Name="body", EmitDefaultValue=false)] + public string Body { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class SendReportEmail {\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" ContentType: ").Append(ContentType).Append("\n"); + sb.Append(" Bcc: ").Append(Bcc).Append("\n"); + sb.Append(" Cc: ").Append(Cc).Append("\n"); + sb.Append(" Body: ").Append(Body).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SendReportEmail); + } + + /// + /// Returns true if SendReportEmail instances are equal + /// + /// Instance of SendReportEmail to be compared + /// Boolean + public bool Equals(SendReportEmail input) + { + if (input == null) + return false; + + return + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && + ( + this.To == input.To || + this.To != null && + this.To.SequenceEqual(input.To) + ) && + ( + this.ContentType == input.ContentType || + (this.ContentType != null && + this.ContentType.Equals(input.ContentType)) + ) && + ( + this.Bcc == input.Bcc || + this.Bcc != null && + this.Bcc.SequenceEqual(input.Bcc) + ) && + ( + this.Cc == input.Cc || + this.Cc != null && + this.Cc.SequenceEqual(input.Cc) + ) && + ( + this.Body == input.Body || + (this.Body != null && + this.Body.Equals(input.Body)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Subject != null) + hashCode = hashCode * 59 + this.Subject.GetHashCode(); + if (this.To != null) + hashCode = hashCode * 59 + this.To.GetHashCode(); + if (this.ContentType != null) + hashCode = hashCode * 59 + this.ContentType.GetHashCode(); + if (this.Bcc != null) + hashCode = hashCode * 59 + this.Bcc.GetHashCode(); + if (this.Cc != null) + hashCode = hashCode * 59 + this.Cc.GetHashCode(); + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/SendSms.cs b/src/sib_api_v3_sdk/Model/SendSms.cs new file mode 100644 index 0000000..c30c331 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/SendSms.cs @@ -0,0 +1,212 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// SendSms + /// + [DataContract] + public partial class SendSms : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SendSms() { } + /// + /// Initializes a new instance of the class. + /// + /// reference (required). + /// messageId (required). + /// Count of SMS's to send multiple text messages. + /// SMS credits used per text message. + /// Remaining SMS credits of the user. + public SendSms(string reference = default(string), long? messageId = default(long?), long? smsCount = default(long?), float? usedCredits = default(float?), float? remainingCredits = default(float?)) + { + // to ensure "reference" is required (not null) + if (reference == null) + { + throw new InvalidDataException("reference is a required property for SendSms and cannot be null"); + } + else + { + this.Reference = reference; + } + // to ensure "messageId" is required (not null) + if (messageId == null) + { + throw new InvalidDataException("messageId is a required property for SendSms and cannot be null"); + } + else + { + this.MessageId = messageId; + } + this.SmsCount = smsCount; + this.UsedCredits = usedCredits; + this.RemainingCredits = remainingCredits; + } + + /// + /// Gets or Sets Reference + /// + [DataMember(Name="reference", EmitDefaultValue=false)] + public string Reference { get; set; } + + /// + /// Gets or Sets MessageId + /// + [DataMember(Name="messageId", EmitDefaultValue=false)] + public long? MessageId { get; set; } + + /// + /// Count of SMS's to send multiple text messages + /// + /// Count of SMS's to send multiple text messages + [DataMember(Name="smsCount", EmitDefaultValue=false)] + public long? SmsCount { get; set; } + + /// + /// SMS credits used per text message + /// + /// SMS credits used per text message + [DataMember(Name="usedCredits", EmitDefaultValue=false)] + public float? UsedCredits { get; set; } + + /// + /// Remaining SMS credits of the user + /// + /// Remaining SMS credits of the user + [DataMember(Name="remainingCredits", EmitDefaultValue=false)] + public float? RemainingCredits { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class SendSms {\n"); + sb.Append(" Reference: ").Append(Reference).Append("\n"); + sb.Append(" MessageId: ").Append(MessageId).Append("\n"); + sb.Append(" SmsCount: ").Append(SmsCount).Append("\n"); + sb.Append(" UsedCredits: ").Append(UsedCredits).Append("\n"); + sb.Append(" RemainingCredits: ").Append(RemainingCredits).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SendSms); + } + + /// + /// Returns true if SendSms instances are equal + /// + /// Instance of SendSms to be compared + /// Boolean + public bool Equals(SendSms input) + { + if (input == null) + return false; + + return + ( + this.Reference == input.Reference || + (this.Reference != null && + this.Reference.Equals(input.Reference)) + ) && + ( + this.MessageId == input.MessageId || + (this.MessageId != null && + this.MessageId.Equals(input.MessageId)) + ) && + ( + this.SmsCount == input.SmsCount || + (this.SmsCount != null && + this.SmsCount.Equals(input.SmsCount)) + ) && + ( + this.UsedCredits == input.UsedCredits || + (this.UsedCredits != null && + this.UsedCredits.Equals(input.UsedCredits)) + ) && + ( + this.RemainingCredits == input.RemainingCredits || + (this.RemainingCredits != null && + this.RemainingCredits.Equals(input.RemainingCredits)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Reference != null) + hashCode = hashCode * 59 + this.Reference.GetHashCode(); + if (this.MessageId != null) + hashCode = hashCode * 59 + this.MessageId.GetHashCode(); + if (this.SmsCount != null) + hashCode = hashCode * 59 + this.SmsCount.GetHashCode(); + if (this.UsedCredits != null) + hashCode = hashCode * 59 + this.UsedCredits.GetHashCode(); + if (this.RemainingCredits != null) + hashCode = hashCode * 59 + this.RemainingCredits.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/SendSmtpEmail.cs b/src/sib_api_v3_sdk/Model/SendSmtpEmail.cs new file mode 100644 index 0000000..2acfb80 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/SendSmtpEmail.cs @@ -0,0 +1,340 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// SendSmtpEmail + /// + [DataContract] + public partial class SendSmtpEmail : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SendSmtpEmail() { } + /// + /// Initializes a new instance of the class. + /// + /// sender. + /// List of email addresses and names (optional) of the recipients. For example, [{'name':'Jimmy', 'email':'jimmy98@example.com'}, {'name':'Joe', 'email':'joe@example.com'}] (required). + /// List of email addresses and names (optional) of the recipients in bcc. + /// List of email addresses and names (optional) of the recipients in cc. + /// HTML body of the message ( Mandatory if 'templateId' is not passed, ignored if 'templateId' is passed ). + /// Plain Text body of the message ( Ignored if 'templateId' is passed ). + /// Subject of the message. Mandatory if 'templateId' is not passed. + /// replyTo. + /// Pass the absolute URL (no local file) or the base64 content of the attachment along with the attachment name (Mandatory if attachment content is passed). For example, [{'url':'https://attachment.domain.com/myAttachmentFromUrl.jpg', 'name':'My attachment 1'}, {'content':'base64 exmaple content', 'name':'My attachment 2'}]. Allowed extensions for attachment file: 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, eps and odt ( If 'templateId' is passed and is in New Template Language format then only attachment url is accepted. If template is in Old template Language format, then 'attachment' is ignored ). + /// Pass the set of headers that shall be sent along the mail headers in the original email. 'sender.ip' header can be set (only for dedicated ip users) to mention the IP to be used for sending transactional emails. For example, {'Content-Type':'text/html', 'charset':'iso-8859-1', 'sender.ip':'1.2.3.4'}. + /// Id of the template. + /// Pass the set of attributes to customize the template. For example, {'FNAME':'Joe', 'LNAME':'Doe'}. It's considered only if template is in New Template Language format.. + /// Tag your emails to find them more easily. + public SendSmtpEmail(SendSmtpEmailSender sender = default(SendSmtpEmailSender), List to = default(List), List bcc = default(List), List cc = default(List), string htmlContent = default(string), string textContent = default(string), string subject = default(string), SendSmtpEmailReplyTo replyTo = default(SendSmtpEmailReplyTo), List attachment = default(List), Object headers = default(Object), long? templateId = default(long?), Object _params = default(Object), List tags = default(List)) + { + // to ensure "to" is required (not null) + if (to == null) + { + throw new InvalidDataException("to is a required property for SendSmtpEmail and cannot be null"); + } + else + { + this.To = to; + } + this.Sender = sender; + this.Bcc = bcc; + this.Cc = cc; + this.HtmlContent = htmlContent; + this.TextContent = textContent; + this.Subject = subject; + this.ReplyTo = replyTo; + this.Attachment = attachment; + this.Headers = headers; + this.TemplateId = templateId; + this.Params = _params; + this.Tags = tags; + } + + /// + /// Gets or Sets Sender + /// + [DataMember(Name="sender", EmitDefaultValue=false)] + public SendSmtpEmailSender Sender { get; set; } + + /// + /// List of email addresses and names (optional) of the recipients. For example, [{'name':'Jimmy', 'email':'jimmy98@example.com'}, {'name':'Joe', 'email':'joe@example.com'}] + /// + /// List of email addresses and names (optional) of the recipients. For example, [{'name':'Jimmy', 'email':'jimmy98@example.com'}, {'name':'Joe', 'email':'joe@example.com'}] + [DataMember(Name="to", EmitDefaultValue=false)] + public List To { get; set; } + + /// + /// List of email addresses and names (optional) of the recipients in bcc + /// + /// List of email addresses and names (optional) of the recipients in bcc + [DataMember(Name="bcc", EmitDefaultValue=false)] + public List Bcc { get; set; } + + /// + /// List of email addresses and names (optional) of the recipients in cc + /// + /// List of email addresses and names (optional) of the recipients in cc + [DataMember(Name="cc", EmitDefaultValue=false)] + public List Cc { get; set; } + + /// + /// HTML body of the message ( Mandatory if 'templateId' is not passed, ignored if 'templateId' is passed ) + /// + /// HTML body of the message ( Mandatory if 'templateId' is not passed, ignored if 'templateId' is passed ) + [DataMember(Name="htmlContent", EmitDefaultValue=false)] + public string HtmlContent { get; set; } + + /// + /// Plain Text body of the message ( Ignored if 'templateId' is passed ) + /// + /// Plain Text body of the message ( Ignored if 'templateId' is passed ) + [DataMember(Name="textContent", EmitDefaultValue=false)] + public string TextContent { get; set; } + + /// + /// Subject of the message. Mandatory if 'templateId' is not passed + /// + /// Subject of the message. Mandatory if 'templateId' is not passed + [DataMember(Name="subject", EmitDefaultValue=false)] + public string Subject { get; set; } + + /// + /// Gets or Sets ReplyTo + /// + [DataMember(Name="replyTo", EmitDefaultValue=false)] + public SendSmtpEmailReplyTo ReplyTo { get; set; } + + /// + /// Pass the absolute URL (no local file) or the base64 content of the attachment along with the attachment name (Mandatory if attachment content is passed). For example, [{'url':'https://attachment.domain.com/myAttachmentFromUrl.jpg', 'name':'My attachment 1'}, {'content':'base64 exmaple content', 'name':'My attachment 2'}]. Allowed extensions for attachment file: 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, eps and odt ( If 'templateId' is passed and is in New Template Language format then only attachment url is accepted. If template is in Old template Language format, then 'attachment' is ignored ) + /// + /// Pass the absolute URL (no local file) or the base64 content of the attachment along with the attachment name (Mandatory if attachment content is passed). For example, [{'url':'https://attachment.domain.com/myAttachmentFromUrl.jpg', 'name':'My attachment 1'}, {'content':'base64 exmaple content', 'name':'My attachment 2'}]. Allowed extensions for attachment file: 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, eps and odt ( If 'templateId' is passed and is in New Template Language format then only attachment url is accepted. If template is in Old template Language format, then 'attachment' is ignored ) + [DataMember(Name="attachment", EmitDefaultValue=false)] + public List Attachment { get; set; } + + /// + /// Pass the set of headers that shall be sent along the mail headers in the original email. 'sender.ip' header can be set (only for dedicated ip users) to mention the IP to be used for sending transactional emails. For example, {'Content-Type':'text/html', 'charset':'iso-8859-1', 'sender.ip':'1.2.3.4'} + /// + /// Pass the set of headers that shall be sent along the mail headers in the original email. 'sender.ip' header can be set (only for dedicated ip users) to mention the IP to be used for sending transactional emails. For example, {'Content-Type':'text/html', 'charset':'iso-8859-1', 'sender.ip':'1.2.3.4'} + [DataMember(Name="headers", EmitDefaultValue=false)] + public Object Headers { get; set; } + + /// + /// Id of the template + /// + /// Id of the template + [DataMember(Name="templateId", EmitDefaultValue=false)] + public long? TemplateId { get; set; } + + /// + /// Pass the set of attributes to customize the template. For example, {'FNAME':'Joe', 'LNAME':'Doe'}. It's considered only if template is in New Template Language format. + /// + /// Pass the set of attributes to customize the template. For example, {'FNAME':'Joe', 'LNAME':'Doe'}. It's considered only if template is in New Template Language format. + [DataMember(Name="params", EmitDefaultValue=false)] + public Object Params { get; set; } + + /// + /// Tag your emails to find them more easily + /// + /// Tag your emails to find them more easily + [DataMember(Name="tags", EmitDefaultValue=false)] + public List Tags { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class SendSmtpEmail {\n"); + sb.Append(" Sender: ").Append(Sender).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" Bcc: ").Append(Bcc).Append("\n"); + sb.Append(" Cc: ").Append(Cc).Append("\n"); + sb.Append(" HtmlContent: ").Append(HtmlContent).Append("\n"); + sb.Append(" TextContent: ").Append(TextContent).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" ReplyTo: ").Append(ReplyTo).Append("\n"); + sb.Append(" Attachment: ").Append(Attachment).Append("\n"); + sb.Append(" Headers: ").Append(Headers).Append("\n"); + sb.Append(" TemplateId: ").Append(TemplateId).Append("\n"); + sb.Append(" Params: ").Append(Params).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SendSmtpEmail); + } + + /// + /// Returns true if SendSmtpEmail instances are equal + /// + /// Instance of SendSmtpEmail to be compared + /// Boolean + public bool Equals(SendSmtpEmail input) + { + if (input == null) + return false; + + return + ( + this.Sender == input.Sender || + (this.Sender != null && + this.Sender.Equals(input.Sender)) + ) && + ( + this.To == input.To || + this.To != null && + this.To.SequenceEqual(input.To) + ) && + ( + this.Bcc == input.Bcc || + this.Bcc != null && + this.Bcc.SequenceEqual(input.Bcc) + ) && + ( + this.Cc == input.Cc || + this.Cc != null && + this.Cc.SequenceEqual(input.Cc) + ) && + ( + this.HtmlContent == input.HtmlContent || + (this.HtmlContent != null && + this.HtmlContent.Equals(input.HtmlContent)) + ) && + ( + this.TextContent == input.TextContent || + (this.TextContent != null && + this.TextContent.Equals(input.TextContent)) + ) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && + ( + this.ReplyTo == input.ReplyTo || + (this.ReplyTo != null && + this.ReplyTo.Equals(input.ReplyTo)) + ) && + ( + this.Attachment == input.Attachment || + this.Attachment != null && + this.Attachment.SequenceEqual(input.Attachment) + ) && + ( + this.Headers == input.Headers || + (this.Headers != null && + this.Headers.Equals(input.Headers)) + ) && + ( + this.TemplateId == input.TemplateId || + (this.TemplateId != null && + this.TemplateId.Equals(input.TemplateId)) + ) && + ( + this.Params == input.Params || + (this.Params != null && + this.Params.Equals(input.Params)) + ) && + ( + this.Tags == input.Tags || + this.Tags != null && + this.Tags.SequenceEqual(input.Tags) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Sender != null) + hashCode = hashCode * 59 + this.Sender.GetHashCode(); + if (this.To != null) + hashCode = hashCode * 59 + this.To.GetHashCode(); + if (this.Bcc != null) + hashCode = hashCode * 59 + this.Bcc.GetHashCode(); + if (this.Cc != null) + hashCode = hashCode * 59 + this.Cc.GetHashCode(); + if (this.HtmlContent != null) + hashCode = hashCode * 59 + this.HtmlContent.GetHashCode(); + if (this.TextContent != null) + hashCode = hashCode * 59 + this.TextContent.GetHashCode(); + if (this.Subject != null) + hashCode = hashCode * 59 + this.Subject.GetHashCode(); + if (this.ReplyTo != null) + hashCode = hashCode * 59 + this.ReplyTo.GetHashCode(); + if (this.Attachment != null) + hashCode = hashCode * 59 + this.Attachment.GetHashCode(); + if (this.Headers != null) + hashCode = hashCode * 59 + this.Headers.GetHashCode(); + if (this.TemplateId != null) + hashCode = hashCode * 59 + this.TemplateId.GetHashCode(); + if (this.Params != null) + hashCode = hashCode * 59 + this.Params.GetHashCode(); + if (this.Tags != null) + hashCode = hashCode * 59 + this.Tags.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/SendSmtpEmailAttachment.cs b/src/sib_api_v3_sdk/Model/SendSmtpEmailAttachment.cs new file mode 100644 index 0000000..8f4acd3 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/SendSmtpEmailAttachment.cs @@ -0,0 +1,159 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// SendSmtpEmailAttachment + /// + [DataContract] + public partial class SendSmtpEmailAttachment : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Absolute url of the attachment (no local file).. + /// Base64 encoded chunk data of the attachment generated on the fly. + /// Required if content is passed. Name of the attachment. + public SendSmtpEmailAttachment(string url = default(string), byte[] content = default(byte[]), string name = default(string)) + { + this.Url = url; + this.Content = content; + this.Name = name; + } + + /// + /// Absolute url of the attachment (no local file). + /// + /// Absolute url of the attachment (no local file). + [DataMember(Name="url", EmitDefaultValue=false)] + public string Url { get; set; } + + /// + /// Base64 encoded chunk data of the attachment generated on the fly + /// + /// Base64 encoded chunk data of the attachment generated on the fly + [DataMember(Name="content", EmitDefaultValue=false)] + public byte[] Content { get; set; } + + /// + /// Required if content is passed. Name of the attachment + /// + /// Required if content is passed. Name of the attachment + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class SendSmtpEmailAttachment {\n"); + sb.Append(" Url: ").Append(Url).Append("\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SendSmtpEmailAttachment); + } + + /// + /// Returns true if SendSmtpEmailAttachment instances are equal + /// + /// Instance of SendSmtpEmailAttachment to be compared + /// Boolean + public bool Equals(SendSmtpEmailAttachment input) + { + if (input == null) + return false; + + return + ( + this.Url == input.Url || + (this.Url != null && + this.Url.Equals(input.Url)) + ) && + ( + this.Content == input.Content || + (this.Content != null && + this.Content.Equals(input.Content)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Url != null) + hashCode = hashCode * 59 + this.Url.GetHashCode(); + if (this.Content != null) + hashCode = hashCode * 59 + this.Content.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/SendSmtpEmailBcc.cs b/src/sib_api_v3_sdk/Model/SendSmtpEmailBcc.cs new file mode 100644 index 0000000..1c3d08c --- /dev/null +++ b/src/sib_api_v3_sdk/Model/SendSmtpEmailBcc.cs @@ -0,0 +1,155 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// SendSmtpEmailBcc + /// + [DataContract] + public partial class SendSmtpEmailBcc : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SendSmtpEmailBcc() { } + /// + /// Initializes a new instance of the class. + /// + /// Email address of the recipient in bcc (required). + /// Name of the recipient in bcc. + public SendSmtpEmailBcc(string email = default(string), string name = default(string)) + { + // to ensure "email" is required (not null) + if (email == null) + { + throw new InvalidDataException("email is a required property for SendSmtpEmailBcc and cannot be null"); + } + else + { + this.Email = email; + } + this.Name = name; + } + + /// + /// Email address of the recipient in bcc + /// + /// Email address of the recipient in bcc + [DataMember(Name="email", EmitDefaultValue=false)] + public string Email { get; set; } + + /// + /// Name of the recipient in bcc + /// + /// Name of the recipient in bcc + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class SendSmtpEmailBcc {\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SendSmtpEmailBcc); + } + + /// + /// Returns true if SendSmtpEmailBcc instances are equal + /// + /// Instance of SendSmtpEmailBcc to be compared + /// Boolean + public bool Equals(SendSmtpEmailBcc input) + { + if (input == null) + return false; + + return + ( + this.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Email != null) + hashCode = hashCode * 59 + this.Email.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/SendSmtpEmailCc.cs b/src/sib_api_v3_sdk/Model/SendSmtpEmailCc.cs new file mode 100644 index 0000000..a6b140c --- /dev/null +++ b/src/sib_api_v3_sdk/Model/SendSmtpEmailCc.cs @@ -0,0 +1,155 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// SendSmtpEmailCc + /// + [DataContract] + public partial class SendSmtpEmailCc : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SendSmtpEmailCc() { } + /// + /// Initializes a new instance of the class. + /// + /// Email address of the recipient in cc (required). + /// Name of the recipient in cc. + public SendSmtpEmailCc(string email = default(string), string name = default(string)) + { + // to ensure "email" is required (not null) + if (email == null) + { + throw new InvalidDataException("email is a required property for SendSmtpEmailCc and cannot be null"); + } + else + { + this.Email = email; + } + this.Name = name; + } + + /// + /// Email address of the recipient in cc + /// + /// Email address of the recipient in cc + [DataMember(Name="email", EmitDefaultValue=false)] + public string Email { get; set; } + + /// + /// Name of the recipient in cc + /// + /// Name of the recipient in cc + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class SendSmtpEmailCc {\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SendSmtpEmailCc); + } + + /// + /// Returns true if SendSmtpEmailCc instances are equal + /// + /// Instance of SendSmtpEmailCc to be compared + /// Boolean + public bool Equals(SendSmtpEmailCc input) + { + if (input == null) + return false; + + return + ( + this.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Email != null) + hashCode = hashCode * 59 + this.Email.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/SendSmtpEmailReplyTo.cs b/src/sib_api_v3_sdk/Model/SendSmtpEmailReplyTo.cs new file mode 100644 index 0000000..fbd9e0a --- /dev/null +++ b/src/sib_api_v3_sdk/Model/SendSmtpEmailReplyTo.cs @@ -0,0 +1,155 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// Email (required), along with name (optional), on which transactional mail recipients will be able to reply back. For example, {'email':'ann6533@example.com', 'name':'Ann'}. + /// + [DataContract] + public partial class SendSmtpEmailReplyTo : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SendSmtpEmailReplyTo() { } + /// + /// Initializes a new instance of the class. + /// + /// Email address in reply to (required). + /// Name in reply to. + public SendSmtpEmailReplyTo(string email = default(string), string name = default(string)) + { + // to ensure "email" is required (not null) + if (email == null) + { + throw new InvalidDataException("email is a required property for SendSmtpEmailReplyTo and cannot be null"); + } + else + { + this.Email = email; + } + this.Name = name; + } + + /// + /// Email address in reply to + /// + /// Email address in reply to + [DataMember(Name="email", EmitDefaultValue=false)] + public string Email { get; set; } + + /// + /// Name in reply to + /// + /// Name in reply to + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class SendSmtpEmailReplyTo {\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SendSmtpEmailReplyTo); + } + + /// + /// Returns true if SendSmtpEmailReplyTo instances are equal + /// + /// Instance of SendSmtpEmailReplyTo to be compared + /// Boolean + public bool Equals(SendSmtpEmailReplyTo input) + { + if (input == null) + return false; + + return + ( + this.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Email != null) + hashCode = hashCode * 59 + this.Email.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/SendSmtpEmailSender.cs b/src/sib_api_v3_sdk/Model/SendSmtpEmailSender.cs new file mode 100644 index 0000000..ac66bde --- /dev/null +++ b/src/sib_api_v3_sdk/Model/SendSmtpEmailSender.cs @@ -0,0 +1,155 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// Mandatory if 'templateId' is not passed. Pass name (optional) and email of sender from which emails will be sent. For example, {'name':'Mary from MyShop', 'email':'no-reply@myshop.com'} + /// + [DataContract] + public partial class SendSmtpEmailSender : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SendSmtpEmailSender() { } + /// + /// Initializes a new instance of the class. + /// + /// Name of the sender from which the emails will be sent. + /// Email of the sender from which the emails will be sent (required). + public SendSmtpEmailSender(string name = default(string), string email = default(string)) + { + // to ensure "email" is required (not null) + if (email == null) + { + throw new InvalidDataException("email is a required property for SendSmtpEmailSender and cannot be null"); + } + else + { + this.Email = email; + } + this.Name = name; + } + + /// + /// Name of the sender from which the emails will be sent + /// + /// Name of the sender from which the emails will be sent + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Email of the sender from which the emails will be sent + /// + /// Email of the sender from which the emails will be sent + [DataMember(Name="email", EmitDefaultValue=false)] + public string Email { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class SendSmtpEmailSender {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SendSmtpEmailSender); + } + + /// + /// Returns true if SendSmtpEmailSender instances are equal + /// + /// Instance of SendSmtpEmailSender to be compared + /// Boolean + public bool Equals(SendSmtpEmailSender input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Email != null) + hashCode = hashCode * 59 + this.Email.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/SendSmtpEmailTo.cs b/src/sib_api_v3_sdk/Model/SendSmtpEmailTo.cs new file mode 100644 index 0000000..0cded44 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/SendSmtpEmailTo.cs @@ -0,0 +1,155 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// SendSmtpEmailTo + /// + [DataContract] + public partial class SendSmtpEmailTo : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SendSmtpEmailTo() { } + /// + /// Initializes a new instance of the class. + /// + /// Email address of the recipient (required). + /// Name of the recipient. + public SendSmtpEmailTo(string email = default(string), string name = default(string)) + { + // to ensure "email" is required (not null) + if (email == null) + { + throw new InvalidDataException("email is a required property for SendSmtpEmailTo and cannot be null"); + } + else + { + this.Email = email; + } + this.Name = name; + } + + /// + /// Email address of the recipient + /// + /// Email address of the recipient + [DataMember(Name="email", EmitDefaultValue=false)] + public string Email { get; set; } + + /// + /// Name of the recipient + /// + /// Name of the recipient + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class SendSmtpEmailTo {\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SendSmtpEmailTo); + } + + /// + /// Returns true if SendSmtpEmailTo instances are equal + /// + /// Instance of SendSmtpEmailTo to be compared + /// Boolean + public bool Equals(SendSmtpEmailTo input) + { + if (input == null) + return false; + + return + ( + this.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Email != null) + hashCode = hashCode * 59 + this.Email.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/SendTemplateEmail.cs b/src/sib_api_v3_sdk/Model/SendTemplateEmail.cs new file mode 100644 index 0000000..cc0b137 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/SendTemplateEmail.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// SendTemplateEmail + /// + [DataContract] + public partial class SendTemplateEmail : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SendTemplateEmail() { } + /// + /// Initializes a new instance of the class. + /// + /// Message ID of the template Email sent (required). + public SendTemplateEmail(string messageId = default(string)) + { + // to ensure "messageId" is required (not null) + if (messageId == null) + { + throw new InvalidDataException("messageId is a required property for SendTemplateEmail and cannot be null"); + } + else + { + this.MessageId = messageId; + } + } + + /// + /// Message ID of the template Email sent + /// + /// Message ID of the template Email sent + [DataMember(Name="messageId", EmitDefaultValue=false)] + public string MessageId { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class SendTemplateEmail {\n"); + sb.Append(" MessageId: ").Append(MessageId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SendTemplateEmail); + } + + /// + /// Returns true if SendTemplateEmail instances are equal + /// + /// Instance of SendTemplateEmail to be compared + /// Boolean + public bool Equals(SendTemplateEmail input) + { + if (input == null) + return false; + + return + ( + this.MessageId == input.MessageId || + (this.MessageId != null && + this.MessageId.Equals(input.MessageId)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.MessageId != null) + hashCode = hashCode * 59 + this.MessageId.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/SendTestEmail.cs b/src/sib_api_v3_sdk/Model/SendTestEmail.cs new file mode 100644 index 0000000..5d3de43 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/SendTestEmail.cs @@ -0,0 +1,125 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// SendTestEmail + /// + [DataContract] + public partial class SendTestEmail : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// List of the email addresses of the recipients whom you wish to send the test mail. If left empty, the test mail will be sent to your entire test list.. + public SendTestEmail(List emailTo = default(List)) + { + this.EmailTo = emailTo; + } + + /// + /// List of the email addresses of the recipients whom you wish to send the test mail. If left empty, the test mail will be sent to your entire test list. + /// + /// List of the email addresses of the recipients whom you wish to send the test mail. If left empty, the test mail will be sent to your entire test list. + [DataMember(Name="emailTo", EmitDefaultValue=false)] + public List EmailTo { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class SendTestEmail {\n"); + sb.Append(" EmailTo: ").Append(EmailTo).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SendTestEmail); + } + + /// + /// Returns true if SendTestEmail instances are equal + /// + /// Instance of SendTestEmail to be compared + /// Boolean + public bool Equals(SendTestEmail input) + { + if (input == null) + return false; + + return + ( + this.EmailTo == input.EmailTo || + this.EmailTo != null && + this.EmailTo.SequenceEqual(input.EmailTo) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.EmailTo != null) + hashCode = hashCode * 59 + this.EmailTo.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/SendTestSms.cs b/src/sib_api_v3_sdk/Model/SendTestSms.cs new file mode 100644 index 0000000..da3abd0 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/SendTestSms.cs @@ -0,0 +1,125 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// SendTestSms + /// + [DataContract] + public partial class SendTestSms : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted. + public SendTestSms(string phoneNumber = default(string)) + { + this.PhoneNumber = phoneNumber; + } + + /// + /// Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted + /// + /// Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted + [DataMember(Name="phoneNumber", EmitDefaultValue=false)] + public string PhoneNumber { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class SendTestSms {\n"); + sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SendTestSms); + } + + /// + /// Returns true if SendTestSms instances are equal + /// + /// Instance of SendTestSms to be compared + /// Boolean + public bool Equals(SendTestSms input) + { + if (input == null) + return false; + + return + ( + this.PhoneNumber == input.PhoneNumber || + (this.PhoneNumber != null && + this.PhoneNumber.Equals(input.PhoneNumber)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.PhoneNumber != null) + hashCode = hashCode * 59 + this.PhoneNumber.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/SendTransacSms.cs b/src/sib_api_v3_sdk/Model/SendTransacSms.cs new file mode 100644 index 0000000..683a6fe --- /dev/null +++ b/src/sib_api_v3_sdk/Model/SendTransacSms.cs @@ -0,0 +1,274 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// SendTransacSms + /// + [DataContract] + public partial class SendTransacSms : IEquatable, IValidatableObject + { + /// + /// Type of the SMS. Marketing SMS messages are those sent typically with marketing content. Transactional SMS messages are sent to individuals and are triggered in response to some action, such as a sign-up, purchase, etc. + /// + /// Type of the SMS. Marketing SMS messages are those sent typically with marketing content. Transactional SMS messages are sent to individuals and are triggered in response to some action, such as a sign-up, purchase, etc. + [JsonConverter(typeof(StringEnumConverter))] + public enum TypeEnum + { + + /// + /// Enum Transactional for value: transactional + /// + [EnumMember(Value = "transactional")] + Transactional = 1, + + /// + /// Enum Marketing for value: marketing + /// + [EnumMember(Value = "marketing")] + Marketing = 2 + } + + /// + /// Type of the SMS. Marketing SMS messages are those sent typically with marketing content. Transactional SMS messages are sent to individuals and are triggered in response to some action, such as a sign-up, purchase, etc. + /// + /// Type of the SMS. Marketing SMS messages are those sent typically with marketing content. Transactional SMS messages are sent to individuals and are triggered in response to some action, such as a sign-up, purchase, etc. + [DataMember(Name="type", EmitDefaultValue=false)] + public TypeEnum? Type { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SendTransacSms() { } + /// + /// Initializes a new instance of the class. + /// + /// Name of the sender. Only alphanumeric characters. No more than 11 characters (required). + /// Mobile number to send SMS with the country code (required). + /// Content of the message. If more than 160 characters long, will be sent as multiple text messages (required). + /// Type of the SMS. Marketing SMS messages are those sent typically with marketing content. Transactional SMS messages are sent to individuals and are triggered in response to some action, such as a sign-up, purchase, etc. (default to TypeEnum.Transactional). + /// Tag of the message. + /// Webhook to call for each event triggered by the message (delivered etc.). + public SendTransacSms(string sender = default(string), string recipient = default(string), string content = default(string), TypeEnum? type = TypeEnum.Transactional, string tag = default(string), string webUrl = default(string)) + { + // to ensure "sender" is required (not null) + if (sender == null) + { + throw new InvalidDataException("sender is a required property for SendTransacSms and cannot be null"); + } + else + { + this.Sender = sender; + } + // to ensure "recipient" is required (not null) + if (recipient == null) + { + throw new InvalidDataException("recipient is a required property for SendTransacSms and cannot be null"); + } + else + { + this.Recipient = recipient; + } + // to ensure "content" is required (not null) + if (content == null) + { + throw new InvalidDataException("content is a required property for SendTransacSms and cannot be null"); + } + else + { + this.Content = content; + } + // use default value if no "type" provided + if (type == null) + { + this.Type = TypeEnum.Transactional; + } + else + { + this.Type = type; + } + this.Tag = tag; + this.WebUrl = webUrl; + } + + /// + /// Name of the sender. Only alphanumeric characters. No more than 11 characters + /// + /// Name of the sender. Only alphanumeric characters. No more than 11 characters + [DataMember(Name="sender", EmitDefaultValue=false)] + public string Sender { get; set; } + + /// + /// Mobile number to send SMS with the country code + /// + /// Mobile number to send SMS with the country code + [DataMember(Name="recipient", EmitDefaultValue=false)] + public string Recipient { get; set; } + + /// + /// Content of the message. If more than 160 characters long, will be sent as multiple text messages + /// + /// Content of the message. If more than 160 characters long, will be sent as multiple text messages + [DataMember(Name="content", EmitDefaultValue=false)] + public string Content { get; set; } + + + /// + /// Tag of the message + /// + /// Tag of the message + [DataMember(Name="tag", EmitDefaultValue=false)] + public string Tag { get; set; } + + /// + /// Webhook to call for each event triggered by the message (delivered etc.) + /// + /// Webhook to call for each event triggered by the message (delivered etc.) + [DataMember(Name="webUrl", EmitDefaultValue=false)] + public string WebUrl { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class SendTransacSms {\n"); + sb.Append(" Sender: ").Append(Sender).Append("\n"); + sb.Append(" Recipient: ").Append(Recipient).Append("\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Tag: ").Append(Tag).Append("\n"); + sb.Append(" WebUrl: ").Append(WebUrl).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SendTransacSms); + } + + /// + /// Returns true if SendTransacSms instances are equal + /// + /// Instance of SendTransacSms to be compared + /// Boolean + public bool Equals(SendTransacSms input) + { + if (input == null) + return false; + + return + ( + this.Sender == input.Sender || + (this.Sender != null && + this.Sender.Equals(input.Sender)) + ) && + ( + this.Recipient == input.Recipient || + (this.Recipient != null && + this.Recipient.Equals(input.Recipient)) + ) && + ( + this.Content == input.Content || + (this.Content != null && + this.Content.Equals(input.Content)) + ) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && + ( + this.Tag == input.Tag || + (this.Tag != null && + this.Tag.Equals(input.Tag)) + ) && + ( + this.WebUrl == input.WebUrl || + (this.WebUrl != null && + this.WebUrl.Equals(input.WebUrl)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Sender != null) + hashCode = hashCode * 59 + this.Sender.GetHashCode(); + if (this.Recipient != null) + hashCode = hashCode * 59 + this.Recipient.GetHashCode(); + if (this.Content != null) + hashCode = hashCode * 59 + this.Content.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.Tag != null) + hashCode = hashCode * 59 + this.Tag.GetHashCode(); + if (this.WebUrl != null) + hashCode = hashCode * 59 + this.WebUrl.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + // Sender (string) maxLength + if(this.Sender != null && this.Sender.Length > 11) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Sender, length must be less than 11.", new [] { "Sender" }); + } + + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/UpdateAttribute.cs b/src/sib_api_v3_sdk/Model/UpdateAttribute.cs new file mode 100644 index 0000000..1bc00b5 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/UpdateAttribute.cs @@ -0,0 +1,142 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// UpdateAttribute + /// + [DataContract] + public partial class UpdateAttribute : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Value of the attribute to update. Use only if the attribute's category is 'calculated' or 'global'. + /// List of the values and labels that the attribute can take. Use only if the attribute's category is \"category\". For example, [{'value':1, 'label':'male'}, {'value':2, 'label':'female'}]. + public UpdateAttribute(string value = default(string), List enumeration = default(List)) + { + this.Value = value; + this.Enumeration = enumeration; + } + + /// + /// Value of the attribute to update. Use only if the attribute's category is 'calculated' or 'global' + /// + /// Value of the attribute to update. Use only if the attribute's category is 'calculated' or 'global' + [DataMember(Name="value", EmitDefaultValue=false)] + public string Value { get; set; } + + /// + /// List of the values and labels that the attribute can take. Use only if the attribute's category is \"category\". For example, [{'value':1, 'label':'male'}, {'value':2, 'label':'female'}] + /// + /// List of the values and labels that the attribute can take. Use only if the attribute's category is \"category\". For example, [{'value':1, 'label':'male'}, {'value':2, 'label':'female'}] + [DataMember(Name="enumeration", EmitDefaultValue=false)] + public List Enumeration { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateAttribute {\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" Enumeration: ").Append(Enumeration).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as UpdateAttribute); + } + + /// + /// Returns true if UpdateAttribute instances are equal + /// + /// Instance of UpdateAttribute to be compared + /// Boolean + public bool Equals(UpdateAttribute input) + { + if (input == null) + return false; + + return + ( + this.Value == input.Value || + (this.Value != null && + this.Value.Equals(input.Value)) + ) && + ( + this.Enumeration == input.Enumeration || + this.Enumeration != null && + this.Enumeration.SequenceEqual(input.Enumeration) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Value != null) + hashCode = hashCode * 59 + this.Value.GetHashCode(); + if (this.Enumeration != null) + hashCode = hashCode * 59 + this.Enumeration.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/UpdateAttributeEnumeration.cs b/src/sib_api_v3_sdk/Model/UpdateAttributeEnumeration.cs new file mode 100644 index 0000000..3e504bb --- /dev/null +++ b/src/sib_api_v3_sdk/Model/UpdateAttributeEnumeration.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// UpdateAttributeEnumeration + /// + [DataContract] + public partial class UpdateAttributeEnumeration : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected UpdateAttributeEnumeration() { } + /// + /// Initializes a new instance of the class. + /// + /// Id of the value (required). + /// Label of the value (required). + public UpdateAttributeEnumeration(int? value = default(int?), string label = default(string)) + { + // to ensure "value" is required (not null) + if (value == null) + { + throw new InvalidDataException("value is a required property for UpdateAttributeEnumeration and cannot be null"); + } + else + { + this.Value = value; + } + // to ensure "label" is required (not null) + if (label == null) + { + throw new InvalidDataException("label is a required property for UpdateAttributeEnumeration and cannot be null"); + } + else + { + this.Label = label; + } + } + + /// + /// Id of the value + /// + /// Id of the value + [DataMember(Name="value", EmitDefaultValue=false)] + public int? Value { get; set; } + + /// + /// Label of the value + /// + /// Label of the value + [DataMember(Name="label", EmitDefaultValue=false)] + public string Label { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateAttributeEnumeration {\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" Label: ").Append(Label).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as UpdateAttributeEnumeration); + } + + /// + /// Returns true if UpdateAttributeEnumeration instances are equal + /// + /// Instance of UpdateAttributeEnumeration to be compared + /// Boolean + public bool Equals(UpdateAttributeEnumeration input) + { + if (input == null) + return false; + + return + ( + this.Value == input.Value || + (this.Value != null && + this.Value.Equals(input.Value)) + ) && + ( + this.Label == input.Label || + (this.Label != null && + this.Label.Equals(input.Label)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Value != null) + hashCode = hashCode * 59 + this.Value.GetHashCode(); + if (this.Label != null) + hashCode = hashCode * 59 + this.Label.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/UpdateCampaignStatus.cs b/src/sib_api_v3_sdk/Model/UpdateCampaignStatus.cs new file mode 100644 index 0000000..6cc6256 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/UpdateCampaignStatus.cs @@ -0,0 +1,182 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// Status of the campaign + /// + [DataContract] + public partial class UpdateCampaignStatus : IEquatable, IValidatableObject + { + /// + /// Note:- replicateTemplate status will be available only for template type campaigns. + /// + /// Note:- replicateTemplate status will be available only for template type campaigns. + [JsonConverter(typeof(StringEnumConverter))] + public enum StatusEnum + { + + /// + /// Enum Suspended for value: suspended + /// + [EnumMember(Value = "suspended")] + Suspended = 1, + + /// + /// Enum Archive for value: archive + /// + [EnumMember(Value = "archive")] + Archive = 2, + + /// + /// Enum Darchive for value: darchive + /// + [EnumMember(Value = "darchive")] + Darchive = 3, + + /// + /// Enum Sent for value: sent + /// + [EnumMember(Value = "sent")] + Sent = 4, + + /// + /// Enum Queued for value: queued + /// + [EnumMember(Value = "queued")] + Queued = 5, + + /// + /// Enum Replicate for value: replicate + /// + [EnumMember(Value = "replicate")] + Replicate = 6, + + /// + /// Enum ReplicateTemplate for value: replicateTemplate + /// + [EnumMember(Value = "replicateTemplate")] + ReplicateTemplate = 7, + + /// + /// Enum Draft for value: draft + /// + [EnumMember(Value = "draft")] + Draft = 8 + } + + /// + /// Note:- replicateTemplate status will be available only for template type campaigns. + /// + /// Note:- replicateTemplate status will be available only for template type campaigns. + [DataMember(Name="status", EmitDefaultValue=false)] + public StatusEnum? Status { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// Note:- replicateTemplate status will be available only for template type campaigns.. + public UpdateCampaignStatus(StatusEnum? status = default(StatusEnum?)) + { + this.Status = status; + } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateCampaignStatus {\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as UpdateCampaignStatus); + } + + /// + /// Returns true if UpdateCampaignStatus instances are equal + /// + /// Instance of UpdateCampaignStatus to be compared + /// Boolean + public bool Equals(UpdateCampaignStatus input) + { + if (input == null) + return false; + + return + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/UpdateChild.cs b/src/sib_api_v3_sdk/Model/UpdateChild.cs new file mode 100644 index 0000000..9cd231f --- /dev/null +++ b/src/sib_api_v3_sdk/Model/UpdateChild.cs @@ -0,0 +1,193 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// UpdateChild + /// + [DataContract] + public partial class UpdateChild : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// New Email address to update the child account. + /// New First name to use to update the child account. + /// New Last name to use to update the child account. + /// New Company name to use to update the child account. + /// New password for the child account to login. + public UpdateChild(string email = default(string), string firstName = default(string), string lastName = default(string), string companyName = default(string), string password = default(string)) + { + this.Email = email; + this.FirstName = firstName; + this.LastName = lastName; + this.CompanyName = companyName; + this.Password = password; + } + + /// + /// New Email address to update the child account + /// + /// New Email address to update the child account + [DataMember(Name="email", EmitDefaultValue=false)] + public string Email { get; set; } + + /// + /// New First name to use to update the child account + /// + /// New First name to use to update the child account + [DataMember(Name="firstName", EmitDefaultValue=false)] + public string FirstName { get; set; } + + /// + /// New Last name to use to update the child account + /// + /// New Last name to use to update the child account + [DataMember(Name="lastName", EmitDefaultValue=false)] + public string LastName { get; set; } + + /// + /// New Company name to use to update the child account + /// + /// New Company name to use to update the child account + [DataMember(Name="companyName", EmitDefaultValue=false)] + public string CompanyName { get; set; } + + /// + /// New password for the child account to login + /// + /// New password for the child account to login + [DataMember(Name="password", EmitDefaultValue=false)] + public string Password { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateChild {\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" FirstName: ").Append(FirstName).Append("\n"); + sb.Append(" LastName: ").Append(LastName).Append("\n"); + sb.Append(" CompanyName: ").Append(CompanyName).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as UpdateChild); + } + + /// + /// Returns true if UpdateChild instances are equal + /// + /// Instance of UpdateChild to be compared + /// Boolean + public bool Equals(UpdateChild input) + { + if (input == null) + return false; + + return + ( + this.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ) && + ( + this.FirstName == input.FirstName || + (this.FirstName != null && + this.FirstName.Equals(input.FirstName)) + ) && + ( + this.LastName == input.LastName || + (this.LastName != null && + this.LastName.Equals(input.LastName)) + ) && + ( + this.CompanyName == input.CompanyName || + (this.CompanyName != null && + this.CompanyName.Equals(input.CompanyName)) + ) && + ( + this.Password == input.Password || + (this.Password != null && + this.Password.Equals(input.Password)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Email != null) + hashCode = hashCode * 59 + this.Email.GetHashCode(); + if (this.FirstName != null) + hashCode = hashCode * 59 + this.FirstName.GetHashCode(); + if (this.LastName != null) + hashCode = hashCode * 59 + this.LastName.GetHashCode(); + if (this.CompanyName != null) + hashCode = hashCode * 59 + this.CompanyName.GetHashCode(); + if (this.Password != null) + hashCode = hashCode * 59 + this.Password.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/UpdateContact.cs b/src/sib_api_v3_sdk/Model/UpdateContact.cs new file mode 100644 index 0000000..8676a37 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/UpdateContact.cs @@ -0,0 +1,210 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// UpdateContact + /// + [DataContract] + public partial class UpdateContact : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Pass the set of attributes to be updated. These attributes must be present in your account. To update existing email address of a contact with the new one please pass EMAIL in attribtes. For eg. { 'EMAIL':'newemail@domain.com', 'FNAME':'Ellie', 'LNAME':'Roger'}. + /// Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true). + /// Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true). + /// Ids of the lists to add the contact to. + /// Ids of the lists to remove the contact from. + /// SMTP forbidden sender for contact. Use only for email Contact. + public UpdateContact(Object attributes = default(Object), bool? emailBlacklisted = default(bool?), bool? smsBlacklisted = default(bool?), List listIds = default(List), List unlinkListIds = default(List), List smtpBlacklistSender = default(List)) + { + this.Attributes = attributes; + this.EmailBlacklisted = emailBlacklisted; + this.SmsBlacklisted = smsBlacklisted; + this.ListIds = listIds; + this.UnlinkListIds = unlinkListIds; + this.SmtpBlacklistSender = smtpBlacklistSender; + } + + /// + /// Pass the set of attributes to be updated. These attributes must be present in your account. To update existing email address of a contact with the new one please pass EMAIL in attribtes. For eg. { 'EMAIL':'newemail@domain.com', 'FNAME':'Ellie', 'LNAME':'Roger'} + /// + /// Pass the set of attributes to be updated. These attributes must be present in your account. To update existing email address of a contact with the new one please pass EMAIL in attribtes. For eg. { 'EMAIL':'newemail@domain.com', 'FNAME':'Ellie', 'LNAME':'Roger'} + [DataMember(Name="attributes", EmitDefaultValue=false)] + public Object Attributes { get; set; } + + /// + /// Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true) + /// + /// Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true) + [DataMember(Name="emailBlacklisted", EmitDefaultValue=false)] + public bool? EmailBlacklisted { get; set; } + + /// + /// Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true) + /// + /// Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true) + [DataMember(Name="smsBlacklisted", EmitDefaultValue=false)] + public bool? SmsBlacklisted { get; set; } + + /// + /// Ids of the lists to add the contact to + /// + /// Ids of the lists to add the contact to + [DataMember(Name="listIds", EmitDefaultValue=false)] + public List ListIds { get; set; } + + /// + /// Ids of the lists to remove the contact from + /// + /// Ids of the lists to remove the contact from + [DataMember(Name="unlinkListIds", EmitDefaultValue=false)] + public List UnlinkListIds { get; set; } + + /// + /// SMTP forbidden sender for contact. Use only for email Contact + /// + /// SMTP forbidden sender for contact. Use only for email Contact + [DataMember(Name="smtpBlacklistSender", EmitDefaultValue=false)] + public List SmtpBlacklistSender { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateContact {\n"); + sb.Append(" Attributes: ").Append(Attributes).Append("\n"); + sb.Append(" EmailBlacklisted: ").Append(EmailBlacklisted).Append("\n"); + sb.Append(" SmsBlacklisted: ").Append(SmsBlacklisted).Append("\n"); + sb.Append(" ListIds: ").Append(ListIds).Append("\n"); + sb.Append(" UnlinkListIds: ").Append(UnlinkListIds).Append("\n"); + sb.Append(" SmtpBlacklistSender: ").Append(SmtpBlacklistSender).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as UpdateContact); + } + + /// + /// Returns true if UpdateContact instances are equal + /// + /// Instance of UpdateContact to be compared + /// Boolean + public bool Equals(UpdateContact input) + { + if (input == null) + return false; + + return + ( + this.Attributes == input.Attributes || + (this.Attributes != null && + this.Attributes.Equals(input.Attributes)) + ) && + ( + this.EmailBlacklisted == input.EmailBlacklisted || + (this.EmailBlacklisted != null && + this.EmailBlacklisted.Equals(input.EmailBlacklisted)) + ) && + ( + this.SmsBlacklisted == input.SmsBlacklisted || + (this.SmsBlacklisted != null && + this.SmsBlacklisted.Equals(input.SmsBlacklisted)) + ) && + ( + this.ListIds == input.ListIds || + this.ListIds != null && + this.ListIds.SequenceEqual(input.ListIds) + ) && + ( + this.UnlinkListIds == input.UnlinkListIds || + this.UnlinkListIds != null && + this.UnlinkListIds.SequenceEqual(input.UnlinkListIds) + ) && + ( + this.SmtpBlacklistSender == input.SmtpBlacklistSender || + this.SmtpBlacklistSender != null && + this.SmtpBlacklistSender.SequenceEqual(input.SmtpBlacklistSender) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Attributes != null) + hashCode = hashCode * 59 + this.Attributes.GetHashCode(); + if (this.EmailBlacklisted != null) + hashCode = hashCode * 59 + this.EmailBlacklisted.GetHashCode(); + if (this.SmsBlacklisted != null) + hashCode = hashCode * 59 + this.SmsBlacklisted.GetHashCode(); + if (this.ListIds != null) + hashCode = hashCode * 59 + this.ListIds.GetHashCode(); + if (this.UnlinkListIds != null) + hashCode = hashCode * 59 + this.UnlinkListIds.GetHashCode(); + if (this.SmtpBlacklistSender != null) + hashCode = hashCode * 59 + this.SmtpBlacklistSender.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/UpdateEmailCampaign.cs b/src/sib_api_v3_sdk/Model/UpdateEmailCampaign.cs new file mode 100644 index 0000000..d61c0da --- /dev/null +++ b/src/sib_api_v3_sdk/Model/UpdateEmailCampaign.cs @@ -0,0 +1,600 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// UpdateEmailCampaign + /// + [DataContract] + public partial class UpdateEmailCampaign : IEquatable, IValidatableObject + { + /// + /// Choose the metrics that will determinate the winning version. Considered if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerCriteria' is ignored if passed or alreday exist in record + /// + /// Choose the metrics that will determinate the winning version. Considered if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerCriteria' is ignored if passed or alreday exist in record + [JsonConverter(typeof(StringEnumConverter))] + public enum WinnerCriteriaEnum + { + + /// + /// Enum Open for value: open + /// + [EnumMember(Value = "open")] + Open = 1, + + /// + /// Enum Click for value: click + /// + [EnumMember(Value = "click")] + Click = 2 + } + + /// + /// Choose the metrics that will determinate the winning version. Considered if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerCriteria' is ignored if passed or alreday exist in record + /// + /// Choose the metrics that will determinate the winning version. Considered if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerCriteria' is ignored if passed or alreday exist in record + [DataMember(Name="winnerCriteria", EmitDefaultValue=false)] + public WinnerCriteriaEnum? WinnerCriteria { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// Tag of the campaign. + /// sender. + /// Name of the campaign. + /// Body of the message (HTML version). REQUIRED if htmlUrl is empty. + /// Url which contents the body of the email message. REQUIRED if htmlContent is empty. + /// 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. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part).. + /// Subject of the campaign. + /// Email on which campaign recipients will be able to reply to. + /// To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization. + /// recipients. + /// 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. + /// 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. (default to false). + /// Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign. + /// 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 (default to false). + /// Footer of the email campaign. + /// Header of the email campaign. + /// Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed. + /// Pass the set of attributes to customize the type 'classic' campaign. For example, {'FNAME':'Joe', 'LNAME':'Doe'}. The 'params' field will get updated, only if the campaign is in New Template Language, else ignored. The New Template Language is dependent on the values of 'subject', 'htmlContent/htmlUrl', 'sender.name' & 'toField'. + /// Set this to true if you want to send your campaign at best time. Note:- if true, warmup ip will be disabled.. + /// Status of A/B Test. abTesting = false means it is disabled, & abTesting = true means it is enabled. 'subjectA', 'subjectB', 'splitRule', 'winnerCriteria' & 'winnerDelay' will be considered if abTesting is set to true. 'subject' if passed is ignored. Can be set to true only if 'sendAtBestTime' is 'false'. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B (default to false). + /// Subject A of the campaign. Considered if abTesting = true. subjectA & subjectB should have unique value. + /// Subject B of the campaign. Considered if abTesting = true. subjectA & subjectB should have unique value. + /// Add the size of your test groups. Considered if abTesting = true. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else. + /// Choose the metrics that will determinate the winning version. Considered if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerCriteria' is ignored if passed or alreday exist in record. + /// Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. Considered if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerDelay' is ignored if passed or alreday exist in record. + public UpdateEmailCampaign(string tag = default(string), UpdateEmailCampaignSender sender = default(UpdateEmailCampaignSender), string name = default(string), string htmlContent = default(string), string htmlUrl = default(string), DateTime? scheduledAt = default(DateTime?), string subject = default(string), string replyTo = default(string), string toField = default(string), UpdateEmailCampaignRecipients recipients = default(UpdateEmailCampaignRecipients), string attachmentUrl = default(string), bool? inlineImageActivation = false, bool? mirrorActive = default(bool?), bool? recurring = false, string footer = default(string), string header = default(string), string utmCampaign = default(string), Object _params = default(Object), bool? sendAtBestTime = default(bool?), bool? abTesting = false, string subjectA = default(string), string subjectB = default(string), long? splitRule = default(long?), WinnerCriteriaEnum? winnerCriteria = default(WinnerCriteriaEnum?), long? winnerDelay = default(long?)) + { + this.Tag = tag; + this.Sender = sender; + this.Name = name; + this.HtmlContent = htmlContent; + this.HtmlUrl = htmlUrl; + this.ScheduledAt = scheduledAt; + this.Subject = subject; + this.ReplyTo = replyTo; + this.ToField = toField; + this.Recipients = recipients; + this.AttachmentUrl = attachmentUrl; + // use default value if no "inlineImageActivation" provided + if (inlineImageActivation == null) + { + this.InlineImageActivation = false; + } + else + { + this.InlineImageActivation = inlineImageActivation; + } + this.MirrorActive = mirrorActive; + // use default value if no "recurring" provided + if (recurring == null) + { + this.Recurring = false; + } + else + { + this.Recurring = recurring; + } + this.Footer = footer; + this.Header = header; + this.UtmCampaign = utmCampaign; + this.Params = _params; + this.SendAtBestTime = sendAtBestTime; + // use default value if no "abTesting" provided + if (abTesting == null) + { + this.AbTesting = false; + } + else + { + this.AbTesting = abTesting; + } + this.SubjectA = subjectA; + this.SubjectB = subjectB; + this.SplitRule = splitRule; + this.WinnerCriteria = winnerCriteria; + this.WinnerDelay = winnerDelay; + } + + /// + /// Tag of the campaign + /// + /// Tag of the campaign + [DataMember(Name="tag", EmitDefaultValue=false)] + public string Tag { get; set; } + + /// + /// Gets or Sets Sender + /// + [DataMember(Name="sender", EmitDefaultValue=false)] + public UpdateEmailCampaignSender Sender { get; set; } + + /// + /// Name of the campaign + /// + /// Name of the campaign + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Body of the message (HTML version). REQUIRED if htmlUrl is empty + /// + /// Body of the message (HTML version). REQUIRED if htmlUrl is empty + [DataMember(Name="htmlContent", EmitDefaultValue=false)] + public string HtmlContent { get; set; } + + /// + /// Url which contents the body of the email message. REQUIRED if htmlContent is empty + /// + /// Url which contents the body of the email message. REQUIRED if htmlContent is empty + [DataMember(Name="htmlUrl", EmitDefaultValue=false)] + public string HtmlUrl { get; set; } + + /// + /// 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. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part). + /// + /// 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. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part). + [DataMember(Name="scheduledAt", EmitDefaultValue=false)] + public DateTime? ScheduledAt { get; set; } + + /// + /// Subject of the campaign + /// + /// Subject of the campaign + [DataMember(Name="subject", EmitDefaultValue=false)] + public string Subject { get; set; } + + /// + /// Email on which campaign recipients will be able to reply to + /// + /// Email on which campaign recipients will be able to reply to + [DataMember(Name="replyTo", EmitDefaultValue=false)] + public string ReplyTo { get; set; } + + /// + /// To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization + /// + /// To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization + [DataMember(Name="toField", EmitDefaultValue=false)] + public string ToField { get; set; } + + /// + /// Gets or Sets Recipients + /// + [DataMember(Name="recipients", EmitDefaultValue=false)] + public UpdateEmailCampaignRecipients Recipients { get; set; } + + /// + /// 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 + /// + /// 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 + [DataMember(Name="attachmentUrl", EmitDefaultValue=false)] + public string AttachmentUrl { get; set; } + + /// + /// 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. + /// + /// 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. + [DataMember(Name="inlineImageActivation", EmitDefaultValue=false)] + public bool? InlineImageActivation { get; set; } + + /// + /// Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign + /// + /// Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign + [DataMember(Name="mirrorActive", EmitDefaultValue=false)] + public bool? MirrorActive { get; set; } + + /// + /// 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 + /// + /// 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 + [DataMember(Name="recurring", EmitDefaultValue=false)] + public bool? Recurring { get; set; } + + /// + /// Footer of the email campaign + /// + /// Footer of the email campaign + [DataMember(Name="footer", EmitDefaultValue=false)] + public string Footer { get; set; } + + /// + /// Header of the email campaign + /// + /// Header of the email campaign + [DataMember(Name="header", EmitDefaultValue=false)] + public string Header { get; set; } + + /// + /// Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed + /// + /// Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed + [DataMember(Name="utmCampaign", EmitDefaultValue=false)] + public string UtmCampaign { get; set; } + + /// + /// Pass the set of attributes to customize the type 'classic' campaign. For example, {'FNAME':'Joe', 'LNAME':'Doe'}. The 'params' field will get updated, only if the campaign is in New Template Language, else ignored. The New Template Language is dependent on the values of 'subject', 'htmlContent/htmlUrl', 'sender.name' & 'toField' + /// + /// Pass the set of attributes to customize the type 'classic' campaign. For example, {'FNAME':'Joe', 'LNAME':'Doe'}. The 'params' field will get updated, only if the campaign is in New Template Language, else ignored. The New Template Language is dependent on the values of 'subject', 'htmlContent/htmlUrl', 'sender.name' & 'toField' + [DataMember(Name="params", EmitDefaultValue=false)] + public Object Params { get; set; } + + /// + /// Set this to true if you want to send your campaign at best time. Note:- if true, warmup ip will be disabled. + /// + /// Set this to true if you want to send your campaign at best time. Note:- if true, warmup ip will be disabled. + [DataMember(Name="sendAtBestTime", EmitDefaultValue=false)] + public bool? SendAtBestTime { get; set; } + + /// + /// Status of A/B Test. abTesting = false means it is disabled, & abTesting = true means it is enabled. 'subjectA', 'subjectB', 'splitRule', 'winnerCriteria' & 'winnerDelay' will be considered if abTesting is set to true. 'subject' if passed is ignored. Can be set to true only if 'sendAtBestTime' is 'false'. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B + /// + /// Status of A/B Test. abTesting = false means it is disabled, & abTesting = true means it is enabled. 'subjectA', 'subjectB', 'splitRule', 'winnerCriteria' & 'winnerDelay' will be considered if abTesting is set to true. 'subject' if passed is ignored. Can be set to true only if 'sendAtBestTime' is 'false'. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B + [DataMember(Name="abTesting", EmitDefaultValue=false)] + public bool? AbTesting { get; set; } + + /// + /// Subject A of the campaign. Considered if abTesting = true. subjectA & subjectB should have unique value + /// + /// Subject A of the campaign. Considered if abTesting = true. subjectA & subjectB should have unique value + [DataMember(Name="subjectA", EmitDefaultValue=false)] + public string SubjectA { get; set; } + + /// + /// Subject B of the campaign. Considered if abTesting = true. subjectA & subjectB should have unique value + /// + /// Subject B of the campaign. Considered if abTesting = true. subjectA & subjectB should have unique value + [DataMember(Name="subjectB", EmitDefaultValue=false)] + public string SubjectB { get; set; } + + /// + /// Add the size of your test groups. Considered if abTesting = true. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else + /// + /// Add the size of your test groups. Considered if abTesting = true. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else + [DataMember(Name="splitRule", EmitDefaultValue=false)] + public long? SplitRule { get; set; } + + + /// + /// Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. Considered if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerDelay' is ignored if passed or alreday exist in record + /// + /// Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. Considered if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerDelay' is ignored if passed or alreday exist in record + [DataMember(Name="winnerDelay", EmitDefaultValue=false)] + public long? WinnerDelay { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateEmailCampaign {\n"); + sb.Append(" Tag: ").Append(Tag).Append("\n"); + sb.Append(" Sender: ").Append(Sender).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" HtmlContent: ").Append(HtmlContent).Append("\n"); + sb.Append(" HtmlUrl: ").Append(HtmlUrl).Append("\n"); + sb.Append(" ScheduledAt: ").Append(ScheduledAt).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" ReplyTo: ").Append(ReplyTo).Append("\n"); + sb.Append(" ToField: ").Append(ToField).Append("\n"); + sb.Append(" Recipients: ").Append(Recipients).Append("\n"); + sb.Append(" AttachmentUrl: ").Append(AttachmentUrl).Append("\n"); + sb.Append(" InlineImageActivation: ").Append(InlineImageActivation).Append("\n"); + sb.Append(" MirrorActive: ").Append(MirrorActive).Append("\n"); + sb.Append(" Recurring: ").Append(Recurring).Append("\n"); + sb.Append(" Footer: ").Append(Footer).Append("\n"); + sb.Append(" Header: ").Append(Header).Append("\n"); + sb.Append(" UtmCampaign: ").Append(UtmCampaign).Append("\n"); + sb.Append(" Params: ").Append(Params).Append("\n"); + sb.Append(" SendAtBestTime: ").Append(SendAtBestTime).Append("\n"); + sb.Append(" AbTesting: ").Append(AbTesting).Append("\n"); + sb.Append(" SubjectA: ").Append(SubjectA).Append("\n"); + sb.Append(" SubjectB: ").Append(SubjectB).Append("\n"); + sb.Append(" SplitRule: ").Append(SplitRule).Append("\n"); + sb.Append(" WinnerCriteria: ").Append(WinnerCriteria).Append("\n"); + sb.Append(" WinnerDelay: ").Append(WinnerDelay).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as UpdateEmailCampaign); + } + + /// + /// Returns true if UpdateEmailCampaign instances are equal + /// + /// Instance of UpdateEmailCampaign to be compared + /// Boolean + public bool Equals(UpdateEmailCampaign input) + { + if (input == null) + return false; + + return + ( + this.Tag == input.Tag || + (this.Tag != null && + this.Tag.Equals(input.Tag)) + ) && + ( + this.Sender == input.Sender || + (this.Sender != null && + this.Sender.Equals(input.Sender)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.HtmlContent == input.HtmlContent || + (this.HtmlContent != null && + this.HtmlContent.Equals(input.HtmlContent)) + ) && + ( + this.HtmlUrl == input.HtmlUrl || + (this.HtmlUrl != null && + this.HtmlUrl.Equals(input.HtmlUrl)) + ) && + ( + this.ScheduledAt == input.ScheduledAt || + (this.ScheduledAt != null && + this.ScheduledAt.Equals(input.ScheduledAt)) + ) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && + ( + this.ReplyTo == input.ReplyTo || + (this.ReplyTo != null && + this.ReplyTo.Equals(input.ReplyTo)) + ) && + ( + this.ToField == input.ToField || + (this.ToField != null && + this.ToField.Equals(input.ToField)) + ) && + ( + this.Recipients == input.Recipients || + (this.Recipients != null && + this.Recipients.Equals(input.Recipients)) + ) && + ( + this.AttachmentUrl == input.AttachmentUrl || + (this.AttachmentUrl != null && + this.AttachmentUrl.Equals(input.AttachmentUrl)) + ) && + ( + this.InlineImageActivation == input.InlineImageActivation || + (this.InlineImageActivation != null && + this.InlineImageActivation.Equals(input.InlineImageActivation)) + ) && + ( + this.MirrorActive == input.MirrorActive || + (this.MirrorActive != null && + this.MirrorActive.Equals(input.MirrorActive)) + ) && + ( + this.Recurring == input.Recurring || + (this.Recurring != null && + this.Recurring.Equals(input.Recurring)) + ) && + ( + this.Footer == input.Footer || + (this.Footer != null && + this.Footer.Equals(input.Footer)) + ) && + ( + this.Header == input.Header || + (this.Header != null && + this.Header.Equals(input.Header)) + ) && + ( + this.UtmCampaign == input.UtmCampaign || + (this.UtmCampaign != null && + this.UtmCampaign.Equals(input.UtmCampaign)) + ) && + ( + this.Params == input.Params || + (this.Params != null && + this.Params.Equals(input.Params)) + ) && + ( + this.SendAtBestTime == input.SendAtBestTime || + (this.SendAtBestTime != null && + this.SendAtBestTime.Equals(input.SendAtBestTime)) + ) && + ( + this.AbTesting == input.AbTesting || + (this.AbTesting != null && + this.AbTesting.Equals(input.AbTesting)) + ) && + ( + this.SubjectA == input.SubjectA || + (this.SubjectA != null && + this.SubjectA.Equals(input.SubjectA)) + ) && + ( + this.SubjectB == input.SubjectB || + (this.SubjectB != null && + this.SubjectB.Equals(input.SubjectB)) + ) && + ( + this.SplitRule == input.SplitRule || + (this.SplitRule != null && + this.SplitRule.Equals(input.SplitRule)) + ) && + ( + this.WinnerCriteria == input.WinnerCriteria || + (this.WinnerCriteria != null && + this.WinnerCriteria.Equals(input.WinnerCriteria)) + ) && + ( + this.WinnerDelay == input.WinnerDelay || + (this.WinnerDelay != null && + this.WinnerDelay.Equals(input.WinnerDelay)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Tag != null) + hashCode = hashCode * 59 + this.Tag.GetHashCode(); + if (this.Sender != null) + hashCode = hashCode * 59 + this.Sender.GetHashCode(); + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.HtmlContent != null) + hashCode = hashCode * 59 + this.HtmlContent.GetHashCode(); + if (this.HtmlUrl != null) + hashCode = hashCode * 59 + this.HtmlUrl.GetHashCode(); + if (this.ScheduledAt != null) + hashCode = hashCode * 59 + this.ScheduledAt.GetHashCode(); + if (this.Subject != null) + hashCode = hashCode * 59 + this.Subject.GetHashCode(); + if (this.ReplyTo != null) + hashCode = hashCode * 59 + this.ReplyTo.GetHashCode(); + if (this.ToField != null) + hashCode = hashCode * 59 + this.ToField.GetHashCode(); + if (this.Recipients != null) + hashCode = hashCode * 59 + this.Recipients.GetHashCode(); + if (this.AttachmentUrl != null) + hashCode = hashCode * 59 + this.AttachmentUrl.GetHashCode(); + if (this.InlineImageActivation != null) + hashCode = hashCode * 59 + this.InlineImageActivation.GetHashCode(); + if (this.MirrorActive != null) + hashCode = hashCode * 59 + this.MirrorActive.GetHashCode(); + if (this.Recurring != null) + hashCode = hashCode * 59 + this.Recurring.GetHashCode(); + if (this.Footer != null) + hashCode = hashCode * 59 + this.Footer.GetHashCode(); + if (this.Header != null) + hashCode = hashCode * 59 + this.Header.GetHashCode(); + if (this.UtmCampaign != null) + hashCode = hashCode * 59 + this.UtmCampaign.GetHashCode(); + if (this.Params != null) + hashCode = hashCode * 59 + this.Params.GetHashCode(); + if (this.SendAtBestTime != null) + hashCode = hashCode * 59 + this.SendAtBestTime.GetHashCode(); + if (this.AbTesting != null) + hashCode = hashCode * 59 + this.AbTesting.GetHashCode(); + if (this.SubjectA != null) + hashCode = hashCode * 59 + this.SubjectA.GetHashCode(); + if (this.SubjectB != null) + hashCode = hashCode * 59 + this.SubjectB.GetHashCode(); + if (this.SplitRule != null) + hashCode = hashCode * 59 + this.SplitRule.GetHashCode(); + if (this.WinnerCriteria != null) + hashCode = hashCode * 59 + this.WinnerCriteria.GetHashCode(); + if (this.WinnerDelay != null) + hashCode = hashCode * 59 + this.WinnerDelay.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + // SplitRule (long?) maximum + if(this.SplitRule > (long?)50) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SplitRule, must be a value less than or equal to 50.", new [] { "SplitRule" }); + } + + // SplitRule (long?) minimum + if(this.SplitRule < (long?)1) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SplitRule, must be a value greater than or equal to 1.", new [] { "SplitRule" }); + } + + // WinnerDelay (long?) maximum + if(this.WinnerDelay > (long?)168) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for WinnerDelay, must be a value less than or equal to 168.", new [] { "WinnerDelay" }); + } + + // WinnerDelay (long?) minimum + if(this.WinnerDelay < (long?)1) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for WinnerDelay, must be a value greater than or equal to 1.", new [] { "WinnerDelay" }); + } + + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/UpdateEmailCampaignRecipients.cs b/src/sib_api_v3_sdk/Model/UpdateEmailCampaignRecipients.cs new file mode 100644 index 0000000..460f093 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/UpdateEmailCampaignRecipients.cs @@ -0,0 +1,142 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// List ids to include/exclude from campaign + /// + [DataContract] + public partial class UpdateEmailCampaignRecipients : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// List ids which have to be excluded from a campaign. + /// Lists Ids to send the campaign to. REQUIRED if already not present in campaign and scheduledAt is not empty. + public UpdateEmailCampaignRecipients(List exclusionListIds = default(List), List listIds = default(List)) + { + this.ExclusionListIds = exclusionListIds; + this.ListIds = listIds; + } + + /// + /// List ids which have to be excluded from a campaign + /// + /// List ids which have to be excluded from a campaign + [DataMember(Name="exclusionListIds", EmitDefaultValue=false)] + public List ExclusionListIds { get; set; } + + /// + /// Lists Ids to send the campaign to. REQUIRED if already not present in campaign and scheduledAt is not empty + /// + /// Lists Ids to send the campaign to. REQUIRED if already not present in campaign and scheduledAt is not empty + [DataMember(Name="listIds", EmitDefaultValue=false)] + public List ListIds { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateEmailCampaignRecipients {\n"); + sb.Append(" ExclusionListIds: ").Append(ExclusionListIds).Append("\n"); + sb.Append(" ListIds: ").Append(ListIds).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as UpdateEmailCampaignRecipients); + } + + /// + /// Returns true if UpdateEmailCampaignRecipients instances are equal + /// + /// Instance of UpdateEmailCampaignRecipients to be compared + /// Boolean + public bool Equals(UpdateEmailCampaignRecipients input) + { + if (input == null) + return false; + + return + ( + this.ExclusionListIds == input.ExclusionListIds || + this.ExclusionListIds != null && + this.ExclusionListIds.SequenceEqual(input.ExclusionListIds) + ) && + ( + this.ListIds == input.ListIds || + this.ListIds != null && + this.ListIds.SequenceEqual(input.ListIds) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ExclusionListIds != null) + hashCode = hashCode * 59 + this.ExclusionListIds.GetHashCode(); + if (this.ListIds != null) + hashCode = hashCode * 59 + this.ListIds.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/UpdateEmailCampaignSender.cs b/src/sib_api_v3_sdk/Model/UpdateEmailCampaignSender.cs new file mode 100644 index 0000000..87ea148 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/UpdateEmailCampaignSender.cs @@ -0,0 +1,142 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// Sender details including email and/or name. For example {'name':'xyz' , 'email':'example@abc.com'} + /// + [DataContract] + public partial class UpdateEmailCampaignSender : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Sender Name from which the campaign emails are sent. + /// Sender email from which the campaign emails are sent. + public UpdateEmailCampaignSender(string name = default(string), string email = default(string)) + { + this.Name = name; + this.Email = email; + } + + /// + /// Sender Name from which the campaign emails are sent + /// + /// Sender Name from which the campaign emails are sent + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Sender email from which the campaign emails are sent + /// + /// Sender email from which the campaign emails are sent + [DataMember(Name="email", EmitDefaultValue=false)] + public string Email { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateEmailCampaignSender {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as UpdateEmailCampaignSender); + } + + /// + /// Returns true if UpdateEmailCampaignSender instances are equal + /// + /// Instance of UpdateEmailCampaignSender to be compared + /// Boolean + public bool Equals(UpdateEmailCampaignSender input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Email != null) + hashCode = hashCode * 59 + this.Email.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/UpdateList.cs b/src/sib_api_v3_sdk/Model/UpdateList.cs new file mode 100644 index 0000000..4784be4 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/UpdateList.cs @@ -0,0 +1,142 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// UpdateList + /// + [DataContract] + public partial class UpdateList : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Name of the list. Either of the two parameters (name, folderId) can be updated at a time.. + /// Id of the folder in which the list is to be moved. Either of the two parameters (name, folderId) can be updated at a time.. + public UpdateList(string name = default(string), long? folderId = default(long?)) + { + this.Name = name; + this.FolderId = folderId; + } + + /// + /// Name of the list. Either of the two parameters (name, folderId) can be updated at a time. + /// + /// Name of the list. Either of the two parameters (name, folderId) can be updated at a time. + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Id of the folder in which the list is to be moved. Either of the two parameters (name, folderId) can be updated at a time. + /// + /// Id of the folder in which the list is to be moved. Either of the two parameters (name, folderId) can be updated at a time. + [DataMember(Name="folderId", EmitDefaultValue=false)] + public long? FolderId { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateList {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" FolderId: ").Append(FolderId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as UpdateList); + } + + /// + /// Returns true if UpdateList instances are equal + /// + /// Instance of UpdateList to be compared + /// Boolean + public bool Equals(UpdateList input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.FolderId == input.FolderId || + (this.FolderId != null && + this.FolderId.Equals(input.FolderId)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.FolderId != null) + hashCode = hashCode * 59 + this.FolderId.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/UpdateSender.cs b/src/sib_api_v3_sdk/Model/UpdateSender.cs new file mode 100644 index 0000000..cab62eb --- /dev/null +++ b/src/sib_api_v3_sdk/Model/UpdateSender.cs @@ -0,0 +1,159 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// UpdateSender + /// + [DataContract] + public partial class UpdateSender : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// From Name to update the sender. + /// From Email to update the sender. + /// Only in case of dedicated IP, IPs to associate to the sender. If passed, will replace all the existing IPs.. + public UpdateSender(string name = default(string), string email = default(string), List ips = default(List)) + { + this.Name = name; + this.Email = email; + this.Ips = ips; + } + + /// + /// From Name to update the sender + /// + /// From Name to update the sender + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// From Email to update the sender + /// + /// From Email to update the sender + [DataMember(Name="email", EmitDefaultValue=false)] + public string Email { get; set; } + + /// + /// Only in case of dedicated IP, IPs to associate to the sender. If passed, will replace all the existing IPs. + /// + /// Only in case of dedicated IP, IPs to associate to the sender. If passed, will replace all the existing IPs. + [DataMember(Name="ips", EmitDefaultValue=false)] + public List Ips { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateSender {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" Ips: ").Append(Ips).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as UpdateSender); + } + + /// + /// Returns true if UpdateSender instances are equal + /// + /// Instance of UpdateSender to be compared + /// Boolean + public bool Equals(UpdateSender input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ) && + ( + this.Ips == input.Ips || + this.Ips != null && + this.Ips.SequenceEqual(input.Ips) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Email != null) + hashCode = hashCode * 59 + this.Email.GetHashCode(); + if (this.Ips != null) + hashCode = hashCode * 59 + this.Ips.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/UpdateSmsCampaign.cs b/src/sib_api_v3_sdk/Model/UpdateSmsCampaign.cs new file mode 100644 index 0000000..18469df --- /dev/null +++ b/src/sib_api_v3_sdk/Model/UpdateSmsCampaign.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// UpdateSmsCampaign + /// + [DataContract] + public partial class UpdateSmsCampaign : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Name of the campaign. + /// Name of the sender. The number of characters is limited to 11. + /// 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. + /// recipients. + /// 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 UpdateSmsCampaign(string name = default(string), string sender = default(string), string content = default(string), CreateSmsCampaignRecipients recipients = default(CreateSmsCampaignRecipients), DateTime? scheduledAt = default(DateTime?)) + { + this.Name = name; + this.Sender = sender; + this.Content = content; + this.Recipients = recipients; + this.ScheduledAt = scheduledAt; + } + + /// + /// Name of the campaign + /// + /// Name of the campaign + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Name of the sender. The number of characters is limited to 11 + /// + /// Name of the sender. The number of characters is limited to 11 + [DataMember(Name="sender", EmitDefaultValue=false)] + public string Sender { get; set; } + + /// + /// 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 + /// + /// 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 + [DataMember(Name="content", EmitDefaultValue=false)] + public string Content { get; set; } + + /// + /// Gets or Sets Recipients + /// + [DataMember(Name="recipients", EmitDefaultValue=false)] + public CreateSmsCampaignRecipients Recipients { get; set; } + + /// + /// 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. + /// + /// 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. + [DataMember(Name="scheduledAt", EmitDefaultValue=false)] + public DateTime? ScheduledAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateSmsCampaign {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Sender: ").Append(Sender).Append("\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Recipients: ").Append(Recipients).Append("\n"); + sb.Append(" ScheduledAt: ").Append(ScheduledAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as UpdateSmsCampaign); + } + + /// + /// Returns true if UpdateSmsCampaign instances are equal + /// + /// Instance of UpdateSmsCampaign to be compared + /// Boolean + public bool Equals(UpdateSmsCampaign input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Sender == input.Sender || + (this.Sender != null && + this.Sender.Equals(input.Sender)) + ) && + ( + this.Content == input.Content || + (this.Content != null && + this.Content.Equals(input.Content)) + ) && + ( + this.Recipients == input.Recipients || + (this.Recipients != null && + this.Recipients.Equals(input.Recipients)) + ) && + ( + this.ScheduledAt == input.ScheduledAt || + (this.ScheduledAt != null && + this.ScheduledAt.Equals(input.ScheduledAt)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Sender != null) + hashCode = hashCode * 59 + this.Sender.GetHashCode(); + if (this.Content != null) + hashCode = hashCode * 59 + this.Content.GetHashCode(); + if (this.Recipients != null) + hashCode = hashCode * 59 + this.Recipients.GetHashCode(); + if (this.ScheduledAt != null) + hashCode = hashCode * 59 + this.ScheduledAt.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + // Sender (string) maxLength + if(this.Sender != null && this.Sender.Length > 11) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Sender, length must be less than 11.", new [] { "Sender" }); + } + + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/UpdateSmtpTemplate.cs b/src/sib_api_v3_sdk/Model/UpdateSmtpTemplate.cs new file mode 100644 index 0000000..f012bc7 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/UpdateSmtpTemplate.cs @@ -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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// UpdateSmtpTemplate + /// + [DataContract] + public partial class UpdateSmtpTemplate : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Tag of the template. + /// sender. + /// Name of the template. + /// Required if htmlUrl is empty. Body of the message (HTML must have more than 10 characters). + /// Required if htmlContent is empty. URL to the body of the email (HTML). + /// Subject of the email. + /// Email on which campaign recipients will be able to reply to. + /// To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization. + /// 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. + /// Status of the template. isActive = false means template is inactive, isActive = true means template is active. + public UpdateSmtpTemplate(string tag = default(string), UpdateSmtpTemplateSender sender = default(UpdateSmtpTemplateSender), string templateName = default(string), string htmlContent = default(string), string htmlUrl = default(string), string subject = default(string), string replyTo = default(string), string toField = default(string), string attachmentUrl = default(string), bool? isActive = default(bool?)) + { + this.Tag = tag; + this.Sender = sender; + this.TemplateName = templateName; + this.HtmlContent = htmlContent; + this.HtmlUrl = htmlUrl; + this.Subject = subject; + this.ReplyTo = replyTo; + this.ToField = toField; + this.AttachmentUrl = attachmentUrl; + this.IsActive = isActive; + } + + /// + /// Tag of the template + /// + /// Tag of the template + [DataMember(Name="tag", EmitDefaultValue=false)] + public string Tag { get; set; } + + /// + /// Gets or Sets Sender + /// + [DataMember(Name="sender", EmitDefaultValue=false)] + public UpdateSmtpTemplateSender Sender { get; set; } + + /// + /// Name of the template + /// + /// Name of the template + [DataMember(Name="templateName", EmitDefaultValue=false)] + public string TemplateName { get; set; } + + /// + /// Required if htmlUrl is empty. Body of the message (HTML must have more than 10 characters) + /// + /// Required if htmlUrl is empty. Body of the message (HTML must have more than 10 characters) + [DataMember(Name="htmlContent", EmitDefaultValue=false)] + public string HtmlContent { get; set; } + + /// + /// Required if htmlContent is empty. URL to the body of the email (HTML) + /// + /// Required if htmlContent is empty. URL to the body of the email (HTML) + [DataMember(Name="htmlUrl", EmitDefaultValue=false)] + public string HtmlUrl { get; set; } + + /// + /// Subject of the email + /// + /// Subject of the email + [DataMember(Name="subject", EmitDefaultValue=false)] + public string Subject { get; set; } + + /// + /// Email on which campaign recipients will be able to reply to + /// + /// Email on which campaign recipients will be able to reply to + [DataMember(Name="replyTo", EmitDefaultValue=false)] + public string ReplyTo { get; set; } + + /// + /// To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization + /// + /// To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization + [DataMember(Name="toField", EmitDefaultValue=false)] + public string ToField { get; set; } + + /// + /// 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 + /// + /// 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 + [DataMember(Name="attachmentUrl", EmitDefaultValue=false)] + public string AttachmentUrl { get; set; } + + /// + /// Status of the template. isActive = false means template is inactive, isActive = true means template is active + /// + /// Status of the template. isActive = false means template is inactive, isActive = true means template is active + [DataMember(Name="isActive", EmitDefaultValue=false)] + public bool? IsActive { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateSmtpTemplate {\n"); + sb.Append(" Tag: ").Append(Tag).Append("\n"); + sb.Append(" Sender: ").Append(Sender).Append("\n"); + sb.Append(" TemplateName: ").Append(TemplateName).Append("\n"); + sb.Append(" HtmlContent: ").Append(HtmlContent).Append("\n"); + sb.Append(" HtmlUrl: ").Append(HtmlUrl).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" ReplyTo: ").Append(ReplyTo).Append("\n"); + sb.Append(" ToField: ").Append(ToField).Append("\n"); + sb.Append(" AttachmentUrl: ").Append(AttachmentUrl).Append("\n"); + sb.Append(" IsActive: ").Append(IsActive).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as UpdateSmtpTemplate); + } + + /// + /// Returns true if UpdateSmtpTemplate instances are equal + /// + /// Instance of UpdateSmtpTemplate to be compared + /// Boolean + public bool Equals(UpdateSmtpTemplate input) + { + if (input == null) + return false; + + return + ( + this.Tag == input.Tag || + (this.Tag != null && + this.Tag.Equals(input.Tag)) + ) && + ( + this.Sender == input.Sender || + (this.Sender != null && + this.Sender.Equals(input.Sender)) + ) && + ( + this.TemplateName == input.TemplateName || + (this.TemplateName != null && + this.TemplateName.Equals(input.TemplateName)) + ) && + ( + this.HtmlContent == input.HtmlContent || + (this.HtmlContent != null && + this.HtmlContent.Equals(input.HtmlContent)) + ) && + ( + this.HtmlUrl == input.HtmlUrl || + (this.HtmlUrl != null && + this.HtmlUrl.Equals(input.HtmlUrl)) + ) && + ( + this.Subject == input.Subject || + (this.Subject != null && + this.Subject.Equals(input.Subject)) + ) && + ( + this.ReplyTo == input.ReplyTo || + (this.ReplyTo != null && + this.ReplyTo.Equals(input.ReplyTo)) + ) && + ( + this.ToField == input.ToField || + (this.ToField != null && + this.ToField.Equals(input.ToField)) + ) && + ( + this.AttachmentUrl == input.AttachmentUrl || + (this.AttachmentUrl != null && + this.AttachmentUrl.Equals(input.AttachmentUrl)) + ) && + ( + this.IsActive == input.IsActive || + (this.IsActive != null && + this.IsActive.Equals(input.IsActive)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Tag != null) + hashCode = hashCode * 59 + this.Tag.GetHashCode(); + if (this.Sender != null) + hashCode = hashCode * 59 + this.Sender.GetHashCode(); + if (this.TemplateName != null) + hashCode = hashCode * 59 + this.TemplateName.GetHashCode(); + if (this.HtmlContent != null) + hashCode = hashCode * 59 + this.HtmlContent.GetHashCode(); + if (this.HtmlUrl != null) + hashCode = hashCode * 59 + this.HtmlUrl.GetHashCode(); + if (this.Subject != null) + hashCode = hashCode * 59 + this.Subject.GetHashCode(); + if (this.ReplyTo != null) + hashCode = hashCode * 59 + this.ReplyTo.GetHashCode(); + if (this.ToField != null) + hashCode = hashCode * 59 + this.ToField.GetHashCode(); + if (this.AttachmentUrl != null) + hashCode = hashCode * 59 + this.AttachmentUrl.GetHashCode(); + if (this.IsActive != null) + hashCode = hashCode * 59 + this.IsActive.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/UpdateSmtpTemplateSender.cs b/src/sib_api_v3_sdk/Model/UpdateSmtpTemplateSender.cs new file mode 100644 index 0000000..f80c2a8 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/UpdateSmtpTemplateSender.cs @@ -0,0 +1,142 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// Sender details including email and/or name. For example {'name':'xyz' , 'email':'example@abc.com'} + /// + [DataContract] + public partial class UpdateSmtpTemplateSender : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Name of the sender. + /// Email of the sender. + public UpdateSmtpTemplateSender(string name = default(string), string email = default(string)) + { + this.Name = name; + this.Email = email; + } + + /// + /// Name of the sender + /// + /// Name of the sender + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Email of the sender + /// + /// Email of the sender + [DataMember(Name="email", EmitDefaultValue=false)] + public string Email { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateSmtpTemplateSender {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as UpdateSmtpTemplateSender); + } + + /// + /// Returns true if UpdateSmtpTemplateSender instances are equal + /// + /// Instance of UpdateSmtpTemplateSender to be compared + /// Boolean + public bool Equals(UpdateSmtpTemplateSender input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Email != null) + hashCode = hashCode * 59 + this.Email.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/UpdateWebhook.cs b/src/sib_api_v3_sdk/Model/UpdateWebhook.cs new file mode 100644 index 0000000..5e48ad8 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/UpdateWebhook.cs @@ -0,0 +1,246 @@ +/* + * 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 + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// UpdateWebhook + /// + [DataContract] + public partial class UpdateWebhook : IEquatable, IValidatableObject + { + /// + /// Defines Events + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum EventsEnum + { + + /// + /// Enum HardBounce for value: hardBounce + /// + [EnumMember(Value = "hardBounce")] + HardBounce = 1, + + /// + /// Enum SoftBounce for value: softBounce + /// + [EnumMember(Value = "softBounce")] + SoftBounce = 2, + + /// + /// Enum Blocked for value: blocked + /// + [EnumMember(Value = "blocked")] + Blocked = 3, + + /// + /// Enum Spam for value: spam + /// + [EnumMember(Value = "spam")] + Spam = 4, + + /// + /// Enum Delivered for value: delivered + /// + [EnumMember(Value = "delivered")] + Delivered = 5, + + /// + /// Enum Request for value: request + /// + [EnumMember(Value = "request")] + Request = 6, + + /// + /// Enum Click for value: click + /// + [EnumMember(Value = "click")] + Click = 7, + + /// + /// Enum Invalid for value: invalid + /// + [EnumMember(Value = "invalid")] + Invalid = 8, + + /// + /// Enum Deferred for value: deferred + /// + [EnumMember(Value = "deferred")] + Deferred = 9, + + /// + /// Enum Opened for value: opened + /// + [EnumMember(Value = "opened")] + Opened = 10, + + /// + /// Enum UniqueOpened for value: uniqueOpened + /// + [EnumMember(Value = "uniqueOpened")] + UniqueOpened = 11, + + /// + /// Enum Unsubscribed for value: unsubscribed + /// + [EnumMember(Value = "unsubscribed")] + Unsubscribed = 12, + + /// + /// Enum ListAddition for value: listAddition + /// + [EnumMember(Value = "listAddition")] + ListAddition = 13 + } + + + /// + /// 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 + /// + /// 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 + [DataMember(Name="events", EmitDefaultValue=false)] + public List Events { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// URL of the webhook. + /// Description of the webhook. + /// 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 UpdateWebhook(string url = default(string), string description = default(string), List events = default(List)) + { + this.Url = url; + this.Description = description; + this.Events = events; + } + + /// + /// URL of the webhook + /// + /// URL of the webhook + [DataMember(Name="url", EmitDefaultValue=false)] + public string Url { get; set; } + + /// + /// Description of the webhook + /// + /// Description of the webhook + [DataMember(Name="description", EmitDefaultValue=false)] + public string Description { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UpdateWebhook {\n"); + sb.Append(" Url: ").Append(Url).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Events: ").Append(Events).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as UpdateWebhook); + } + + /// + /// Returns true if UpdateWebhook instances are equal + /// + /// Instance of UpdateWebhook to be compared + /// Boolean + public bool Equals(UpdateWebhook input) + { + if (input == null) + return false; + + return + ( + this.Url == input.Url || + (this.Url != null && + this.Url.Equals(input.Url)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && + ( + this.Events == input.Events || + this.Events != null && + this.Events.SequenceEqual(input.Events) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Url != null) + hashCode = hashCode * 59 + this.Url.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + if (this.Events != null) + hashCode = hashCode * 59 + this.Events.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/sib_api_v3_sdk/sib_api_v3_sdk.csproj b/src/sib_api_v3_sdk/sib_api_v3_sdk.csproj new file mode 100644 index 0000000..2b845ca --- /dev/null +++ b/src/sib_api_v3_sdk/sib_api_v3_sdk.csproj @@ -0,0 +1,38 @@ + + + + net45 + sib_api_v3_sdk + sib_api_v3_sdk + Library + Swagger + Swagger + Swagger Library + A library generated from a Swagger doc + No Copyright + true + true + true + sib_api_v3_sdk + 1.0.0 + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 41acaa8213b0a25cbcc6315e6f18e51232447152 Mon Sep 17 00:00:00 2001 From: amitsendinblue Date: Sat, 30 Mar 2019 11:34:28 +0530 Subject: [PATCH 2/2] Updated README file as per comments on PR --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 703709c..cfc1bcd 100644 --- a/README.md +++ b/README.md @@ -372,10 +372,10 @@ The partner key should be passed in the request headers as `partner-key` along w - **API key parameter name**: partner-key - **Location**: HTTP header -If you find a bug, please post the issue on [Github](https://github.com/sendinblue/APIv3-csharp-library/issues). +## Support and Feedback -As always, if you need additional assistance, drop us a note [here](https://account.sendinblue.com/support). +Be sure to visit the SendinBlue official [documentation website](https://sendinblue.readme.io/docs ) for additional information about our API. -## Author +If you find a bug, please post the issue on [Github](https://github.com/sendinblue/APIv3-csharp-library/issues). -contact@sendinblue.com \ No newline at end of file +As always, if you need additional assistance, drop us a note [here](https://account.sendinblue.com/support).