diff --git a/README.md b/README.md index 1bb491a..f4e3f72 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ SendinBlue's API matches the [OpenAPI v2 definition](https://www.openapis.org/). 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: 2.0.0 +- SDK version: 2.1.0 - Build package: io.swagger.codegen.languages.CSharpClientCodegen For more information, please visit [https://account.sendinblue.com/support](https://account.sendinblue.com/support) @@ -20,8 +20,8 @@ This C# SDK is automatically generated by the [Swagger Codegen](https://github.c - UWP >=10.0 ## Dependencies -- FubarCoder.RestSharp.Portable.Core >=4.0.7 -- FubarCoder.RestSharp.Portable.HttpClient >=4.0.7 +- FubarCoder.RestSharp.Portable.Core >=4.0.8 +- FubarCoder.RestSharp.Portable.HttpClient >=4.0.8 - Newtonsoft.Json >=10.0.3 @@ -189,6 +189,7 @@ Class | Method | HTTP request | Description *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* | [**SmtpBlockedContactsEmailDelete**](docs/SMTPApi.md#smtpblockedcontactsemaildelete) | **DELETE** /smtp/blockedContacts/{email} | Unblock or resubscribe a transactional contact +*SMTPApi* | [**SmtpLogMessageIdDelete**](docs/SMTPApi.md#smtplogmessageiddelete) | **DELETE** /smtp/log/{messageId} | Delete an SMTP transactional log *SMTPApi* | [**UpdateSmtpTemplate**](docs/SMTPApi.md#updatesmtptemplate) | **PUT** /smtp/templates/{templateId} | Updates a transactional email 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 @@ -334,6 +335,7 @@ Class | Method | HTTP request | Description - [Model.RemoveContactFromList](docs/RemoveContactFromList.md) - [Model.RemoveCredits](docs/RemoveCredits.md) - [Model.RequestContactExport](docs/RequestContactExport.md) + - [Model.RequestContactExportCustomContactFilter](docs/RequestContactExportCustomContactFilter.md) - [Model.RequestContactImport](docs/RequestContactImport.md) - [Model.RequestContactImportNewList](docs/RequestContactImportNewList.md) - [Model.RequestSmsRecipientExport](docs/RequestSmsRecipientExport.md) diff --git a/docs/CreateContact.md b/docs/CreateContact.md index ab4316d..ac8ce56 100644 --- a/docs/CreateContact.md +++ b/docs/CreateContact.md @@ -3,7 +3,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Email** | **string** | Email address of the user. Mandatory if \"sms\" field is not passed in \"attributes\" parameter' | [optional] +**Email** | **string** | Email address of the user. Mandatory if \"SMS\" field is not passed in \"attributes\" parameter. For example {'SMS':'+91xxxxxxxxxx'} | [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] diff --git a/docs/RequestContactExport.md b/docs/RequestContactExport.md index f5b3802..45721ba 100644 --- a/docs/RequestContactExport.md +++ b/docs/RequestContactExport.md @@ -4,7 +4,8 @@ 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. | +**ContactFilter** | **Object** | This attribute has been deprecated and will be removed by January 1st, 2021. Only one of the two filter options (contactFilter or customContactFilter) can be passed in the request. Set the filter for the contacts to be exported. For example, {'blacklisted':true} will export all the blacklisted contacts. | [optional] +**CustomContactFilter** | [**RequestContactExportCustomContactFilter**](RequestContactExportCustomContactFilter.md) | | [optional] **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/RequestContactExportCustomContactFilter.md b/docs/RequestContactExportCustomContactFilter.md new file mode 100644 index 0000000..0e26543 --- /dev/null +++ b/docs/RequestContactExportCustomContactFilter.md @@ -0,0 +1,14 @@ +# sib_api_v3_sdk.Model.RequestContactExportCustomContactFilter +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ActionForContacts** | **string** | Mandatory if neither actionForEmailCampaigns nor actionForSmsCampaigns is passed. This will export the contacts on the basis of provided action applied on contacts as per the list id. * allContacts - Fetch the list of all contacts for a particular list. * subscribed & unsubscribed - Fetch the list of subscribed / unsubscribed (blacklisted via any means) contacts for a particular list. * unsubscribedPerList - Fetch the list of contacts that are unsubscribed from a particular list only. | [optional] +**ActionForEmailCampaigns** | **string** | Mandatory if neither actionForContacts nor actionForSmsCampaigns is passed. This will export the contacts on the basis of provided action applied on email campaigns. * openers & nonOpeners - emailCampaignId is mandatory. Fetch the list of readers / non-readers for a particular email campaign. * clickers & nonClickers - emailCampaignId is mandatory. Fetch the list of clickers / non-clickers for a particular email campaign. * unsubscribed - emailCampaignId is mandatory. Fetch the list of all unsubscribed (blacklisted via any means) contacts for a particular email campaign. * hardBounces & softBounces - emailCampaignId is optional. Fetch the list of hard bounces / soft bounces for a particular / all email campaign(s). | [optional] +**ActionForSmsCampaigns** | **string** | Mandatory if neither actionForContacts nor actionForEmailCampaigns is passed. This will export the contacts on the basis of provided action applied on sms campaigns. * unsubscribed - Fetch the list of all unsubscribed (blacklisted via any means) contacts for all / particular sms campaigns. * hardBounces & softBounces - Fetch the list of hard bounces / soft bounces for all / particular sms campaigns. | [optional] +**ListId** | **long?** | Mandatory if actionForContacts is passed, ignored otherwise. Id of the list for which the corresponding action shall be applied in the filter. | [optional] +**EmailCampaignId** | **long?** | Considered only if actionForEmailCampaigns is passed, ignored otherwise. Mandatory if action is one of the following - openers, nonOpeners, clickers, nonClickers, unsubscribed. The id of the email campaign for which the corresponding action shall be applied in the filter. | [optional] +**SmsCampaignId** | **long?** | Considered only if actionForSmsCampaigns is passed, ignored otherwise. The id of sms campaign for which the corresponding action shall be applied in the filter. | [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/ResellerApi.md b/docs/ResellerApi.md index 23cc8e9..a66ed96 100644 --- a/docs/ResellerApi.md +++ b/docs/ResellerApi.md @@ -192,7 +192,7 @@ namespace Example var apiInstance = new ResellerApi(); var childAuthKey = childAuthKey_example; // string | auth key of reseller's child - var addChildDomain = new AddChildDomain(); // AddChildDomain | Sender domain to add for a specific child account + var addChildDomain = new AddChildDomain(); // AddChildDomain | Sender domain to add for a specific child account. This will not be displayed to the parent account. try { @@ -213,7 +213,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **childAuthKey** | **string**| auth key of reseller's child | - **addChildDomain** | [**AddChildDomain**](AddChildDomain.md)| Sender domain to add for a specific child account | + **addChildDomain** | [**AddChildDomain**](AddChildDomain.md)| Sender domain to add for a specific child account. This will not be displayed to the parent account. | ### Return type diff --git a/docs/SMTPApi.md b/docs/SMTPApi.md index 3fdc6ad..b4a8d91 100644 --- a/docs/SMTPApi.md +++ b/docs/SMTPApi.md @@ -19,6 +19,7 @@ Method | HTTP request | Description [**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 [**SmtpBlockedContactsEmailDelete**](SMTPApi.md#smtpblockedcontactsemaildelete) | **DELETE** /smtp/blockedContacts/{email} | Unblock or resubscribe a transactional contact +[**SmtpLogMessageIdDelete**](SMTPApi.md#smtplogmessageiddelete) | **DELETE** /smtp/log/{messageId} | Delete an SMTP transactional log [**UpdateSmtpTemplate**](SMTPApi.md#updatesmtptemplate) | **PUT** /smtp/templates/{templateId} | Updates a transactional email templates @@ -1102,6 +1103,73 @@ void (empty response body) [[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) + +# **SmtpLogMessageIdDelete** +> void SmtpLogMessageIdDelete (string messageId) + +Delete an SMTP transactional log + +### 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 SmtpLogMessageIdDeleteExample + { + 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 messageId = messageId_example; // string | MessageId of the transactional log to delete + + try + { + // Delete an SMTP transactional log + apiInstance.SmtpLogMessageIdDelete(messageId); + } + catch (Exception e) + { + Debug.Print("Exception when calling SMTPApi.SmtpLogMessageIdDelete: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **messageId** | **string**| MessageId of the transactional log to delete | + +### 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) + # **UpdateSmtpTemplate** > void UpdateSmtpTemplate (long? templateId, UpdateSmtpTemplate smtpTemplate) diff --git a/docs/SendSmtpEmail.md b/docs/SendSmtpEmail.md index 193c54d..e337a36 100644 --- a/docs/SendSmtpEmail.md +++ b/docs/SendSmtpEmail.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **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, odt, mp3, m4a, m4v, wma, ogg, flac, wav, aif, aifc, aiff, mp4, mov, avi, mkv, mpeg, mpg and wmv ( 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] +**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, odt, mp3, m4a, m4v, wma, ogg, flac, wav, aif, aifc, aiff, mp4, mov, avi, mkv, mpeg, mpg and wmv ( If 'templateId' is passed and is in New Template Language format then both attachment url and content are accepted. If template is in Old template Language format, then 'attachment' is ignored ) | [optional] **Headers** | **Object** | Pass the set of custom headers (not the standard 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, `{\"sender.ip\":\"1.2.3.4\", \"X-Mailin-custom\":\"some_custom_header\"}`. | [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] diff --git a/docs/UpdateContact.md b/docs/UpdateContact.md index 306eed6..0030f84 100644 --- a/docs/UpdateContact.md +++ b/docs/UpdateContact.md @@ -3,7 +3,7 @@ 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] +**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 example, { 'EMAIL':'newemail@domain.com', 'FNAME':'Ellie', 'LNAME':'Roger'} `{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}`. Keep in mind transactional attributes can be updated the same way as normal attributes. | [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] diff --git a/sib_api_v3_sdk.sln b/sib_api_v3_sdk.sln index 1b6de5a..db22ec0 100644 --- a/sib_api_v3_sdk.sln +++ b/sib_api_v3_sdk.sln @@ -1,8 +1,8 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.28010.2036 +VisualStudioVersion = 15.0.28307.1022 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", "{E652C592-450F-4626-9AC0-9093AB12CFF2}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "sib_api_v3_sdk", "src\sib_api_v3_sdk\sib_api_v3_sdk.csproj", "{6C3156D9-31D5-4550-8E91-1BBAF88A5264}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -10,15 +10,15 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E652C592-450F-4626-9AC0-9093AB12CFF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E652C592-450F-4626-9AC0-9093AB12CFF2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E652C592-450F-4626-9AC0-9093AB12CFF2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E652C592-450F-4626-9AC0-9093AB12CFF2}.Release|Any CPU.Build.0 = Release|Any CPU + {6C3156D9-31D5-4550-8E91-1BBAF88A5264}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6C3156D9-31D5-4550-8E91-1BBAF88A5264}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6C3156D9-31D5-4550-8E91-1BBAF88A5264}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6C3156D9-31D5-4550-8E91-1BBAF88A5264}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {CA0D4C7A-6E62-444B-8284-6DACD452CE37} + SolutionGuid = {3E0E34C5-05C9-4975-BD57-02170BC5A67B} EndGlobalSection EndGlobal diff --git a/src/sib_api_v3_sdk/Api/ResellerApi.cs b/src/sib_api_v3_sdk/Api/ResellerApi.cs index 869d58e..3595030 100644 --- a/src/sib_api_v3_sdk/Api/ResellerApi.cs +++ b/src/sib_api_v3_sdk/Api/ResellerApi.cs @@ -78,7 +78,7 @@ public interface IResellerApi : IApiAccessor /// /// Thrown when fails to make API call /// auth key of reseller's child - /// Sender domain to add for a specific child account + /// Sender domain to add for a specific child account. This will not be displayed to the parent account. /// void CreateChildDomain (string childAuthKey, AddChildDomain addChildDomain); @@ -90,7 +90,7 @@ public interface IResellerApi : IApiAccessor /// /// Thrown when fails to make API call /// auth key of reseller's child - /// Sender domain to add for a specific child account + /// Sender domain to add for a specific child account. This will not be displayed to the parent account. /// ApiResponse of Object(void) ApiResponse CreateChildDomainWithHttpInfo (string childAuthKey, AddChildDomain addChildDomain); /// @@ -438,7 +438,7 @@ public interface IResellerApi : IApiAccessor /// /// Thrown when fails to make API call /// auth key of reseller's child - /// Sender domain to add for a specific child account + /// Sender domain to add for a specific child account. This will not be displayed to the parent account. /// Task of void System.Threading.Tasks.Task CreateChildDomainAsync (string childAuthKey, AddChildDomain addChildDomain); @@ -450,7 +450,7 @@ public interface IResellerApi : IApiAccessor /// /// Thrown when fails to make API call /// auth key of reseller's child - /// Sender domain to add for a specific child account + /// Sender domain to add for a specific child account. This will not be displayed to the parent account. /// Task of ApiResponse System.Threading.Tasks.Task> CreateChildDomainAsyncWithHttpInfo (string childAuthKey, AddChildDomain addChildDomain); /// @@ -1207,7 +1207,7 @@ public async System.Threading.Tasks.Task> AssociateIpToChild /// /// Thrown when fails to make API call /// auth key of reseller's child - /// Sender domain to add for a specific child account + /// Sender domain to add for a specific child account. This will not be displayed to the parent account. /// public void CreateChildDomain (string childAuthKey, AddChildDomain addChildDomain) { @@ -1219,7 +1219,7 @@ public void CreateChildDomain (string childAuthKey, AddChildDomain addChildDomai /// /// Thrown when fails to make API call /// auth key of reseller's child - /// Sender domain to add for a specific child account + /// Sender domain to add for a specific child account. This will not be displayed to the parent account. /// ApiResponse of Object(void) public ApiResponse CreateChildDomainWithHttpInfo (string childAuthKey, AddChildDomain addChildDomain) { @@ -1296,7 +1296,7 @@ public ApiResponse CreateChildDomainWithHttpInfo (string childAuthKey, A /// /// Thrown when fails to make API call /// auth key of reseller's child - /// Sender domain to add for a specific child account + /// Sender domain to add for a specific child account. This will not be displayed to the parent account. /// Task of void public async System.Threading.Tasks.Task CreateChildDomainAsync (string childAuthKey, AddChildDomain addChildDomain) { @@ -1309,7 +1309,7 @@ public async System.Threading.Tasks.Task CreateChildDomainAsync (string childAut /// /// Thrown when fails to make API call /// auth key of reseller's child - /// Sender domain to add for a specific child account + /// Sender domain to add for a specific child account. This will not be displayed to the parent account. /// Task of ApiResponse public async System.Threading.Tasks.Task> CreateChildDomainAsyncWithHttpInfo (string childAuthKey, AddChildDomain addChildDomain) { diff --git a/src/sib_api_v3_sdk/Api/SMTPApi.cs b/src/sib_api_v3_sdk/Api/SMTPApi.cs index cfa9e03..be2e70b 100644 --- a/src/sib_api_v3_sdk/Api/SMTPApi.cs +++ b/src/sib_api_v3_sdk/Api/SMTPApi.cs @@ -398,6 +398,27 @@ public interface ISMTPApi : IApiAccessor /// ApiResponse of Object(void) ApiResponse SmtpBlockedContactsEmailDeleteWithHttpInfo (string email); /// + /// Delete an SMTP transactional log + /// + /// + /// + /// + /// Thrown when fails to make API call + /// MessageId of the transactional log to delete + /// + void SmtpLogMessageIdDelete (string messageId); + + /// + /// Delete an SMTP transactional log + /// + /// + /// + /// + /// Thrown when fails to make API call + /// MessageId of the transactional log to delete + /// ApiResponse of Object(void) + ApiResponse SmtpLogMessageIdDeleteWithHttpInfo (string messageId); + /// /// Updates a transactional email templates /// /// @@ -796,6 +817,27 @@ public interface ISMTPApi : IApiAccessor /// Task of ApiResponse System.Threading.Tasks.Task> SmtpBlockedContactsEmailDeleteAsyncWithHttpInfo (string email); /// + /// Delete an SMTP transactional log + /// + /// + /// + /// + /// Thrown when fails to make API call + /// MessageId of the transactional log to delete + /// Task of void + System.Threading.Tasks.Task SmtpLogMessageIdDeleteAsync (string messageId); + + /// + /// Delete an SMTP transactional log + /// + /// + /// + /// + /// Thrown when fails to make API call + /// MessageId of the transactional log to delete + /// Task of ApiResponse + System.Threading.Tasks.Task> SmtpLogMessageIdDeleteAsyncWithHttpInfo (string messageId); + /// /// Updates a transactional email templates /// /// @@ -3449,6 +3491,159 @@ public async System.Threading.Tasks.Task> SmtpBlockedContact null); } + /// + /// Delete an SMTP transactional log + /// + /// Thrown when fails to make API call + /// MessageId of the transactional log to delete + /// + public void SmtpLogMessageIdDelete (string messageId) + { + SmtpLogMessageIdDeleteWithHttpInfo(messageId); + } + + /// + /// Delete an SMTP transactional log + /// + /// Thrown when fails to make API call + /// MessageId of the transactional log to delete + /// ApiResponse of Object(void) + public ApiResponse SmtpLogMessageIdDeleteWithHttpInfo (string messageId) + { + // verify the required parameter 'messageId' is set + if (messageId == null) + throw new ApiException(400, "Missing required parameter 'messageId' when calling SMTPApi->SmtpLogMessageIdDelete"); + + var localVarPath = "./smtp/log/{messageId}"; + 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 (messageId != null) localVarPathParams.Add("messageId", this.Configuration.ApiClient.ParameterToString(messageId)); // 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("SmtpLogMessageIdDelete", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), + null); + } + + /// + /// Delete an SMTP transactional log + /// + /// Thrown when fails to make API call + /// MessageId of the transactional log to delete + /// Task of void + public async System.Threading.Tasks.Task SmtpLogMessageIdDeleteAsync (string messageId) + { + await SmtpLogMessageIdDeleteAsyncWithHttpInfo(messageId); + + } + + /// + /// Delete an SMTP transactional log + /// + /// Thrown when fails to make API call + /// MessageId of the transactional log to delete + /// Task of ApiResponse + public async System.Threading.Tasks.Task> SmtpLogMessageIdDeleteAsyncWithHttpInfo (string messageId) + { + // verify the required parameter 'messageId' is set + if (messageId == null) + throw new ApiException(400, "Missing required parameter 'messageId' when calling SMTPApi->SmtpLogMessageIdDelete"); + + var localVarPath = "./smtp/log/{messageId}"; + 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 (messageId != null) localVarPathParams.Add("messageId", this.Configuration.ApiClient.ParameterToString(messageId)); // 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("SmtpLogMessageIdDelete", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), + null); + } + /// /// Updates a transactional email templates /// diff --git a/src/sib_api_v3_sdk/Client/Configuration.cs b/src/sib_api_v3_sdk/Client/Configuration.cs index 57743e7..679db84 100644 --- a/src/sib_api_v3_sdk/Client/Configuration.cs +++ b/src/sib_api_v3_sdk/Client/Configuration.cs @@ -29,7 +29,7 @@ public class Configuration : IReadableConfiguration /// Version of the package. /// /// Version of the package. - public const string Version = "2.0.0"; + public const string Version = "2.1.0"; /// /// Identifier for ISO 8601 DateTime Format @@ -57,7 +57,7 @@ public class Configuration : IReadableConfiguration string.Format("Error calling {0}: {1}", methodName, response.Content), response.Content); } - + return null; }; @@ -110,7 +110,7 @@ static Configuration() /// public Configuration() { - UserAgent = "Swagger-Codegen/2.0.0/csharp"; + UserAgent = "Swagger-Codegen/2.1.0/csharp"; BasePath = "https://api.sendinblue.com/v3"; DefaultHeader = new ConcurrentDictionary(); ApiKey = new ConcurrentDictionary(); @@ -183,7 +183,7 @@ public Configuration( string tempFolderPath = null, string dateTimeFormat = null, int timeout = 100000, - string userAgent = "Swagger-Codegen/2.0.0/csharp" + string userAgent = "Swagger-Codegen/2.1.0/csharp" // ReSharper restore UnusedParameter.Local ) { @@ -416,7 +416,7 @@ public static String ToDebugReport() String report = "C# SDK (sib_api_v3_sdk) Debug Report:\n"; report += " OS: " + System.Runtime.InteropServices.RuntimeInformation.OSDescription + "\n"; report += " Version of the API: 3.0.0\n"; - report += " SDK Package Version: 2.0.0\n"; + report += " SDK Package Version: 2.1.0\n"; return report; } diff --git a/src/sib_api_v3_sdk/Model/CreateContact.cs b/src/sib_api_v3_sdk/Model/CreateContact.cs index f48165b..cdd9815 100644 --- a/src/sib_api_v3_sdk/Model/CreateContact.cs +++ b/src/sib_api_v3_sdk/Model/CreateContact.cs @@ -31,7 +31,7 @@ public partial class CreateContact : IEquatable /// /// Initializes a new instance of the class. /// - /// 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. For example {'SMS':'+91xxxxxxxxxx'}. /// 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). @@ -58,9 +58,9 @@ public partial class CreateContact : IEquatable } /// - /// 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. For example {'SMS':'+91xxxxxxxxxx'} /// - /// 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. For example {'SMS':'+91xxxxxxxxxx'} [DataMember(Name="email", EmitDefaultValue=false)] public string Email { get; set; } diff --git a/src/sib_api_v3_sdk/Model/RequestContactExport.cs b/src/sib_api_v3_sdk/Model/RequestContactExport.cs index 2cc00fe..a98bef0 100644 --- a/src/sib_api_v3_sdk/Model/RequestContactExport.cs +++ b/src/sib_api_v3_sdk/Model/RequestContactExport.cs @@ -28,29 +28,18 @@ namespace sib_api_v3_sdk.Model [DataContract] public partial class RequestContactExport : IEquatable { - /// - /// 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). + /// This attribute has been deprecated and will be removed by January 1st, 2021. Only one of the two filter options (contactFilter or customContactFilter) can be passed in the request. Set the filter for the contacts to be exported. For example, {'blacklisted':true} will export all the blacklisted contacts. . + /// customContactFilter. /// 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)) + public RequestContactExport(List exportAttributes = default(List), Object contactFilter = default(Object), RequestContactExportCustomContactFilter customContactFilter = default(RequestContactExportCustomContactFilter), 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.ContactFilter = contactFilter; + this.CustomContactFilter = customContactFilter; this.NotifyUrl = notifyUrl; } @@ -62,12 +51,18 @@ protected RequestContactExport() { } public List ExportAttributes { get; set; } /// - /// Set the filter for the contacts to be exported. For example, {'blacklisted':true} will export all the blacklisted contacts. + /// This attribute has been deprecated and will be removed by January 1st, 2021. Only one of the two filter options (contactFilter or customContactFilter) can be passed in the request. 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. + /// This attribute has been deprecated and will be removed by January 1st, 2021. Only one of the two filter options (contactFilter or customContactFilter) can be passed in the request. 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; } + /// + /// Gets or Sets CustomContactFilter + /// + [DataMember(Name="customContactFilter", EmitDefaultValue=false)] + public RequestContactExportCustomContactFilter CustomContactFilter { get; set; } + /// /// Webhook that will be called once the export process is finished /// @@ -85,6 +80,7 @@ public override string ToString() sb.Append("class RequestContactExport {\n"); sb.Append(" ExportAttributes: ").Append(ExportAttributes).Append("\n"); sb.Append(" ContactFilter: ").Append(ContactFilter).Append("\n"); + sb.Append(" CustomContactFilter: ").Append(CustomContactFilter).Append("\n"); sb.Append(" NotifyUrl: ").Append(NotifyUrl).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -130,6 +126,11 @@ public bool Equals(RequestContactExport input) (this.ContactFilter != null && this.ContactFilter.Equals(input.ContactFilter)) ) && + ( + this.CustomContactFilter == input.CustomContactFilter || + (this.CustomContactFilter != null && + this.CustomContactFilter.Equals(input.CustomContactFilter)) + ) && ( this.NotifyUrl == input.NotifyUrl || (this.NotifyUrl != null && @@ -150,6 +151,8 @@ public override int GetHashCode() hashCode = hashCode * 59 + this.ExportAttributes.GetHashCode(); if (this.ContactFilter != null) hashCode = hashCode * 59 + this.ContactFilter.GetHashCode(); + if (this.CustomContactFilter != null) + hashCode = hashCode * 59 + this.CustomContactFilter.GetHashCode(); if (this.NotifyUrl != null) hashCode = hashCode * 59 + this.NotifyUrl.GetHashCode(); return hashCode; diff --git a/src/sib_api_v3_sdk/Model/RequestContactExportCustomContactFilter.cs b/src/sib_api_v3_sdk/Model/RequestContactExportCustomContactFilter.cs new file mode 100644 index 0000000..a794431 --- /dev/null +++ b/src/sib_api_v3_sdk/Model/RequestContactExportCustomContactFilter.cs @@ -0,0 +1,309 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :- -- -- -- -- -- --: | - -- -- -- -- -- -- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * 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.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using SwaggerDateConverter = sib_api_v3_sdk.Client.SwaggerDateConverter; + +namespace sib_api_v3_sdk.Model +{ + /// + /// Only one of the two filter options (contactFilter or customContactFilter) can be passed in the request. Set the filter for the contacts to be exported. + /// + [DataContract] + public partial class RequestContactExportCustomContactFilter : IEquatable + { + /// + /// Mandatory if neither actionForEmailCampaigns nor actionForSmsCampaigns is passed. This will export the contacts on the basis of provided action applied on contacts as per the list id. * allContacts - Fetch the list of all contacts for a particular list. * subscribed & unsubscribed - Fetch the list of subscribed / unsubscribed (blacklisted via any means) contacts for a particular list. * unsubscribedPerList - Fetch the list of contacts that are unsubscribed from a particular list only. + /// + /// Mandatory if neither actionForEmailCampaigns nor actionForSmsCampaigns is passed. This will export the contacts on the basis of provided action applied on contacts as per the list id. * allContacts - Fetch the list of all contacts for a particular list. * subscribed & unsubscribed - Fetch the list of subscribed / unsubscribed (blacklisted via any means) contacts for a particular list. * unsubscribedPerList - Fetch the list of contacts that are unsubscribed from a particular list only. + [JsonConverter(typeof(StringEnumConverter))] + public enum ActionForContactsEnum + { + + /// + /// Enum AllContacts for value: allContacts + /// + [EnumMember(Value = "allContacts")] + AllContacts = 1, + + /// + /// Enum Subscribed for value: subscribed + /// + [EnumMember(Value = "subscribed")] + Subscribed = 2, + + /// + /// Enum Unsubscribed for value: unsubscribed + /// + [EnumMember(Value = "unsubscribed")] + Unsubscribed = 3, + + /// + /// Enum UnsubscribedPerList for value: unsubscribedPerList + /// + [EnumMember(Value = "unsubscribedPerList")] + UnsubscribedPerList = 4 + } + + /// + /// Mandatory if neither actionForEmailCampaigns nor actionForSmsCampaigns is passed. This will export the contacts on the basis of provided action applied on contacts as per the list id. * allContacts - Fetch the list of all contacts for a particular list. * subscribed & unsubscribed - Fetch the list of subscribed / unsubscribed (blacklisted via any means) contacts for a particular list. * unsubscribedPerList - Fetch the list of contacts that are unsubscribed from a particular list only. + /// + /// Mandatory if neither actionForEmailCampaigns nor actionForSmsCampaigns is passed. This will export the contacts on the basis of provided action applied on contacts as per the list id. * allContacts - Fetch the list of all contacts for a particular list. * subscribed & unsubscribed - Fetch the list of subscribed / unsubscribed (blacklisted via any means) contacts for a particular list. * unsubscribedPerList - Fetch the list of contacts that are unsubscribed from a particular list only. + [DataMember(Name="actionForContacts", EmitDefaultValue=false)] + public ActionForContactsEnum? ActionForContacts { get; set; } + /// + /// Mandatory if neither actionForContacts nor actionForSmsCampaigns is passed. This will export the contacts on the basis of provided action applied on email campaigns. * openers & nonOpeners - emailCampaignId is mandatory. Fetch the list of readers / non-readers for a particular email campaign. * clickers & nonClickers - emailCampaignId is mandatory. Fetch the list of clickers / non-clickers for a particular email campaign. * unsubscribed - emailCampaignId is mandatory. Fetch the list of all unsubscribed (blacklisted via any means) contacts for a particular email campaign. * hardBounces & softBounces - emailCampaignId is optional. Fetch the list of hard bounces / soft bounces for a particular / all email campaign(s). + /// + /// Mandatory if neither actionForContacts nor actionForSmsCampaigns is passed. This will export the contacts on the basis of provided action applied on email campaigns. * openers & nonOpeners - emailCampaignId is mandatory. Fetch the list of readers / non-readers for a particular email campaign. * clickers & nonClickers - emailCampaignId is mandatory. Fetch the list of clickers / non-clickers for a particular email campaign. * unsubscribed - emailCampaignId is mandatory. Fetch the list of all unsubscribed (blacklisted via any means) contacts for a particular email campaign. * hardBounces & softBounces - emailCampaignId is optional. Fetch the list of hard bounces / soft bounces for a particular / all email campaign(s). + [JsonConverter(typeof(StringEnumConverter))] + public enum ActionForEmailCampaignsEnum + { + + /// + /// Enum Openers for value: openers + /// + [EnumMember(Value = "openers")] + Openers = 1, + + /// + /// Enum NonOpeners for value: nonOpeners + /// + [EnumMember(Value = "nonOpeners")] + NonOpeners = 2, + + /// + /// Enum Clickers for value: clickers + /// + [EnumMember(Value = "clickers")] + Clickers = 3, + + /// + /// Enum NonClickers for value: nonClickers + /// + [EnumMember(Value = "nonClickers")] + NonClickers = 4, + + /// + /// Enum Unsubscribed for value: unsubscribed + /// + [EnumMember(Value = "unsubscribed")] + Unsubscribed = 5, + + /// + /// Enum HardBounces for value: hardBounces + /// + [EnumMember(Value = "hardBounces")] + HardBounces = 6, + + /// + /// Enum SoftBounces for value: softBounces + /// + [EnumMember(Value = "softBounces")] + SoftBounces = 7 + } + + /// + /// Mandatory if neither actionForContacts nor actionForSmsCampaigns is passed. This will export the contacts on the basis of provided action applied on email campaigns. * openers & nonOpeners - emailCampaignId is mandatory. Fetch the list of readers / non-readers for a particular email campaign. * clickers & nonClickers - emailCampaignId is mandatory. Fetch the list of clickers / non-clickers for a particular email campaign. * unsubscribed - emailCampaignId is mandatory. Fetch the list of all unsubscribed (blacklisted via any means) contacts for a particular email campaign. * hardBounces & softBounces - emailCampaignId is optional. Fetch the list of hard bounces / soft bounces for a particular / all email campaign(s). + /// + /// Mandatory if neither actionForContacts nor actionForSmsCampaigns is passed. This will export the contacts on the basis of provided action applied on email campaigns. * openers & nonOpeners - emailCampaignId is mandatory. Fetch the list of readers / non-readers for a particular email campaign. * clickers & nonClickers - emailCampaignId is mandatory. Fetch the list of clickers / non-clickers for a particular email campaign. * unsubscribed - emailCampaignId is mandatory. Fetch the list of all unsubscribed (blacklisted via any means) contacts for a particular email campaign. * hardBounces & softBounces - emailCampaignId is optional. Fetch the list of hard bounces / soft bounces for a particular / all email campaign(s). + [DataMember(Name="actionForEmailCampaigns", EmitDefaultValue=false)] + public ActionForEmailCampaignsEnum? ActionForEmailCampaigns { get; set; } + /// + /// Mandatory if neither actionForContacts nor actionForEmailCampaigns is passed. This will export the contacts on the basis of provided action applied on sms campaigns. * unsubscribed - Fetch the list of all unsubscribed (blacklisted via any means) contacts for all / particular sms campaigns. * hardBounces & softBounces - Fetch the list of hard bounces / soft bounces for all / particular sms campaigns. + /// + /// Mandatory if neither actionForContacts nor actionForEmailCampaigns is passed. This will export the contacts on the basis of provided action applied on sms campaigns. * unsubscribed - Fetch the list of all unsubscribed (blacklisted via any means) contacts for all / particular sms campaigns. * hardBounces & softBounces - Fetch the list of hard bounces / soft bounces for all / particular sms campaigns. + [JsonConverter(typeof(StringEnumConverter))] + public enum ActionForSmsCampaignsEnum + { + + /// + /// Enum HardBounces for value: hardBounces + /// + [EnumMember(Value = "hardBounces")] + HardBounces = 1, + + /// + /// Enum SoftBounces for value: softBounces + /// + [EnumMember(Value = "softBounces")] + SoftBounces = 2, + + /// + /// Enum Unsubscribed for value: unsubscribed + /// + [EnumMember(Value = "unsubscribed")] + Unsubscribed = 3 + } + + /// + /// Mandatory if neither actionForContacts nor actionForEmailCampaigns is passed. This will export the contacts on the basis of provided action applied on sms campaigns. * unsubscribed - Fetch the list of all unsubscribed (blacklisted via any means) contacts for all / particular sms campaigns. * hardBounces & softBounces - Fetch the list of hard bounces / soft bounces for all / particular sms campaigns. + /// + /// Mandatory if neither actionForContacts nor actionForEmailCampaigns is passed. This will export the contacts on the basis of provided action applied on sms campaigns. * unsubscribed - Fetch the list of all unsubscribed (blacklisted via any means) contacts for all / particular sms campaigns. * hardBounces & softBounces - Fetch the list of hard bounces / soft bounces for all / particular sms campaigns. + [DataMember(Name="actionForSmsCampaigns", EmitDefaultValue=false)] + public ActionForSmsCampaignsEnum? ActionForSmsCampaigns { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// Mandatory if neither actionForEmailCampaigns nor actionForSmsCampaigns is passed. This will export the contacts on the basis of provided action applied on contacts as per the list id. * allContacts - Fetch the list of all contacts for a particular list. * subscribed & unsubscribed - Fetch the list of subscribed / unsubscribed (blacklisted via any means) contacts for a particular list. * unsubscribedPerList - Fetch the list of contacts that are unsubscribed from a particular list only. . + /// Mandatory if neither actionForContacts nor actionForSmsCampaigns is passed. This will export the contacts on the basis of provided action applied on email campaigns. * openers & nonOpeners - emailCampaignId is mandatory. Fetch the list of readers / non-readers for a particular email campaign. * clickers & nonClickers - emailCampaignId is mandatory. Fetch the list of clickers / non-clickers for a particular email campaign. * unsubscribed - emailCampaignId is mandatory. Fetch the list of all unsubscribed (blacklisted via any means) contacts for a particular email campaign. * hardBounces & softBounces - emailCampaignId is optional. Fetch the list of hard bounces / soft bounces for a particular / all email campaign(s). . + /// Mandatory if neither actionForContacts nor actionForEmailCampaigns is passed. This will export the contacts on the basis of provided action applied on sms campaigns. * unsubscribed - Fetch the list of all unsubscribed (blacklisted via any means) contacts for all / particular sms campaigns. * hardBounces & softBounces - Fetch the list of hard bounces / soft bounces for all / particular sms campaigns. . + /// Mandatory if actionForContacts is passed, ignored otherwise. Id of the list for which the corresponding action shall be applied in the filter.. + /// Considered only if actionForEmailCampaigns is passed, ignored otherwise. Mandatory if action is one of the following - openers, nonOpeners, clickers, nonClickers, unsubscribed. The id of the email campaign for which the corresponding action shall be applied in the filter.. + /// Considered only if actionForSmsCampaigns is passed, ignored otherwise. The id of sms campaign for which the corresponding action shall be applied in the filter.. + public RequestContactExportCustomContactFilter(ActionForContactsEnum? actionForContacts = default(ActionForContactsEnum?), ActionForEmailCampaignsEnum? actionForEmailCampaigns = default(ActionForEmailCampaignsEnum?), ActionForSmsCampaignsEnum? actionForSmsCampaigns = default(ActionForSmsCampaignsEnum?), long? listId = default(long?), long? emailCampaignId = default(long?), long? smsCampaignId = default(long?)) + { + this.ActionForContacts = actionForContacts; + this.ActionForEmailCampaigns = actionForEmailCampaigns; + this.ActionForSmsCampaigns = actionForSmsCampaigns; + this.ListId = listId; + this.EmailCampaignId = emailCampaignId; + this.SmsCampaignId = smsCampaignId; + } + + + + + /// + /// Mandatory if actionForContacts is passed, ignored otherwise. Id of the list for which the corresponding action shall be applied in the filter. + /// + /// Mandatory if actionForContacts is passed, ignored otherwise. Id of the list for which the corresponding action shall be applied in the filter. + [DataMember(Name="listId", EmitDefaultValue=false)] + public long? ListId { get; set; } + + /// + /// Considered only if actionForEmailCampaigns is passed, ignored otherwise. Mandatory if action is one of the following - openers, nonOpeners, clickers, nonClickers, unsubscribed. The id of the email campaign for which the corresponding action shall be applied in the filter. + /// + /// Considered only if actionForEmailCampaigns is passed, ignored otherwise. Mandatory if action is one of the following - openers, nonOpeners, clickers, nonClickers, unsubscribed. The id of the email campaign for which the corresponding action shall be applied in the filter. + [DataMember(Name="emailCampaignId", EmitDefaultValue=false)] + public long? EmailCampaignId { get; set; } + + /// + /// Considered only if actionForSmsCampaigns is passed, ignored otherwise. The id of sms campaign for which the corresponding action shall be applied in the filter. + /// + /// Considered only if actionForSmsCampaigns is passed, ignored otherwise. The id of sms campaign for which the corresponding action shall be applied in the filter. + [DataMember(Name="smsCampaignId", EmitDefaultValue=false)] + public long? SmsCampaignId { 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 RequestContactExportCustomContactFilter {\n"); + sb.Append(" ActionForContacts: ").Append(ActionForContacts).Append("\n"); + sb.Append(" ActionForEmailCampaigns: ").Append(ActionForEmailCampaigns).Append("\n"); + sb.Append(" ActionForSmsCampaigns: ").Append(ActionForSmsCampaigns).Append("\n"); + sb.Append(" ListId: ").Append(ListId).Append("\n"); + sb.Append(" EmailCampaignId: ").Append(EmailCampaignId).Append("\n"); + sb.Append(" SmsCampaignId: ").Append(SmsCampaignId).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 RequestContactExportCustomContactFilter); + } + + /// + /// Returns true if RequestContactExportCustomContactFilter instances are equal + /// + /// Instance of RequestContactExportCustomContactFilter to be compared + /// Boolean + public bool Equals(RequestContactExportCustomContactFilter input) + { + if (input == null) + return false; + + return + ( + this.ActionForContacts == input.ActionForContacts || + (this.ActionForContacts != null && + this.ActionForContacts.Equals(input.ActionForContacts)) + ) && + ( + this.ActionForEmailCampaigns == input.ActionForEmailCampaigns || + (this.ActionForEmailCampaigns != null && + this.ActionForEmailCampaigns.Equals(input.ActionForEmailCampaigns)) + ) && + ( + this.ActionForSmsCampaigns == input.ActionForSmsCampaigns || + (this.ActionForSmsCampaigns != null && + this.ActionForSmsCampaigns.Equals(input.ActionForSmsCampaigns)) + ) && + ( + this.ListId == input.ListId || + (this.ListId != null && + this.ListId.Equals(input.ListId)) + ) && + ( + this.EmailCampaignId == input.EmailCampaignId || + (this.EmailCampaignId != null && + this.EmailCampaignId.Equals(input.EmailCampaignId)) + ) && + ( + this.SmsCampaignId == input.SmsCampaignId || + (this.SmsCampaignId != null && + this.SmsCampaignId.Equals(input.SmsCampaignId)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ActionForContacts != null) + hashCode = hashCode * 59 + this.ActionForContacts.GetHashCode(); + if (this.ActionForEmailCampaigns != null) + hashCode = hashCode * 59 + this.ActionForEmailCampaigns.GetHashCode(); + if (this.ActionForSmsCampaigns != null) + hashCode = hashCode * 59 + this.ActionForSmsCampaigns.GetHashCode(); + if (this.ListId != null) + hashCode = hashCode * 59 + this.ListId.GetHashCode(); + if (this.EmailCampaignId != null) + hashCode = hashCode * 59 + this.EmailCampaignId.GetHashCode(); + if (this.SmsCampaignId != null) + hashCode = hashCode * 59 + this.SmsCampaignId.GetHashCode(); + return hashCode; + } + } + } + +} diff --git a/src/sib_api_v3_sdk/Model/SendSmtpEmail.cs b/src/sib_api_v3_sdk/Model/SendSmtpEmail.cs index f4dbe84..2421c65 100644 --- a/src/sib_api_v3_sdk/Model/SendSmtpEmail.cs +++ b/src/sib_api_v3_sdk/Model/SendSmtpEmail.cs @@ -44,7 +44,7 @@ protected SendSmtpEmail() { } /// 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, odt, mp3, m4a, m4v, wma, ogg, flac, wav, aif, aifc, aiff, mp4, mov, avi, mkv, mpeg, mpg and wmv ( 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, odt, mp3, m4a, m4v, wma, ogg, flac, wav, aif, aifc, aiff, mp4, mov, avi, mkv, mpeg, mpg and wmv ( If 'templateId' is passed and is in New Template Language format then both attachment url and content are accepted. If template is in Old template Language format, then 'attachment' is ignored ). /// Pass the set of custom headers (not the standard 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, `{\"sender.ip\":\"1.2.3.4\", \"X-Mailin-custom\":\"some_custom_header\"}`.. /// 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.. @@ -129,9 +129,9 @@ protected SendSmtpEmail() { } 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, odt, mp3, m4a, m4v, wma, ogg, flac, wav, aif, aifc, aiff, mp4, mov, avi, mkv, mpeg, mpg and wmv ( 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, odt, mp3, m4a, m4v, wma, ogg, flac, wav, aif, aifc, aiff, mp4, mov, avi, mkv, mpeg, mpg and wmv ( If 'templateId' is passed and is in New Template Language format then both attachment url and content are 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, odt, mp3, m4a, m4v, wma, ogg, flac, wav, aif, aifc, aiff, mp4, mov, avi, mkv, mpeg, mpg and wmv ( 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, odt, mp3, m4a, m4v, wma, ogg, flac, wav, aif, aifc, aiff, mp4, mov, avi, mkv, mpeg, mpg and wmv ( If 'templateId' is passed and is in New Template Language format then both attachment url and content are accepted. If template is in Old template Language format, then 'attachment' is ignored ) [DataMember(Name="attachment", EmitDefaultValue=false)] public List Attachment { get; set; } diff --git a/src/sib_api_v3_sdk/Model/UpdateContact.cs b/src/sib_api_v3_sdk/Model/UpdateContact.cs index c41aaa5..522415f 100644 --- a/src/sib_api_v3_sdk/Model/UpdateContact.cs +++ b/src/sib_api_v3_sdk/Model/UpdateContact.cs @@ -31,7 +31,7 @@ public partial class UpdateContact : IEquatable /// /// 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'}. + /// 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 example, { 'EMAIL':'newemail@domain.com', 'FNAME':'Ellie', 'LNAME':'Roger'} `{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}`. Keep in mind transactional attributes can be updated the same way as normal attributes.. /// 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. @@ -48,9 +48,9 @@ public partial class UpdateContact : IEquatable } /// - /// 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 example, { 'EMAIL':'newemail@domain.com', 'FNAME':'Ellie', 'LNAME':'Roger'} `{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}`. Keep in mind transactional attributes can be updated the same way as normal attributes. /// - /// 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 example, { 'EMAIL':'newemail@domain.com', 'FNAME':'Ellie', 'LNAME':'Roger'} `{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}`. Keep in mind transactional attributes can be updated the same way as normal attributes. [DataMember(Name="attributes", EmitDefaultValue=false)] public Object Attributes { get; set; } diff --git a/src/sib_api_v3_sdk/sib_api_v3_sdk.csproj b/src/sib_api_v3_sdk/sib_api_v3_sdk.csproj index 51753b8..e6e61f1 100644 --- a/src/sib_api_v3_sdk/sib_api_v3_sdk.csproj +++ b/src/sib_api_v3_sdk/sib_api_v3_sdk.csproj @@ -6,27 +6,26 @@ sib_api_v3_sdk Library Sendinblue Developers - SendinBlue + Sendinblue Swagger Library - Official SendinBlue provided RESTFul API V3 C# Library + SendinBlue's API v3 C# Library Copyright (c) 2019 SendinBlue true true true sib_api_v3_sdk - 2.0.0 - sib_api_v3_sdk + 2.1.0 https://github.com/sendinblue/APIv3-csharp-library/blob/master/LICENSE.txt https://github.com/sendinblue/APIv3-csharp-library - https://github.com/sendinblue/APIv3-csharp-librar - sendinblue, sdk, swagger, api, csharp, .net, c# + https://github.com/sendinblue/APIv3-csharp-library + sdk, api, swagger, csharp, c#, .net, sendinblue - - + + + -