From b1342825d3e4e664e57ac182cc409f04bc617904 Mon Sep 17 00:00:00 2001 From: api-librarian Date: Fri, 1 Mar 2019 13:47:49 +0000 Subject: [PATCH 01/20] Travis update: Mar 2019 (Build 52) [skip ci] --- .gitignore | 186 ++ .openapi-generator-ignore | 23 + .openapi-generator/VERSION | 1 + README.md | 149 +- com.Messente.Api.sln | 25 + docs/BlacklistApi.md | 257 +++ docs/Channel.md | 8 + docs/ContactEnvelope.md | 9 + docs/ContactFields.md | 18 + docs/ContactListEnvelope.md | 9 + docs/ContactUpdateFields.md | 17 + docs/ContactsApi.md | 524 +++++ docs/DeliveryReportApi.md | 72 + docs/DeliveryReportResponse.md | 11 + docs/DeliveryResult.md | 14 + docs/ErrorCodeOmnichannel.md | 8 + docs/ErrorCodeOmnichannelMachine.md | 8 + docs/ErrorCodePhonebook.md | 8 + docs/ErrorItemOmnichannel.md | 12 + docs/ErrorItemPhonebook.md | 11 + docs/ErrorOmnichannel.md | 9 + docs/ErrorPhonebook.md | 9 + docs/ErrorTitleOmnichannel.md | 8 + docs/ErrorTitlePhonebook.md | 8 + docs/FetchBlacklistSuccess.md | 9 + docs/GroupEnvelope.md | 9 + docs/GroupListEnvelope.md | 9 + docs/GroupName.md | 9 + docs/GroupResponseFields.md | 12 + docs/GroupsApi.md | 325 ++++ docs/MessageResult.md | 11 + docs/NumberToBlacklist.md | 9 + docs/OmniMessageCreateSuccessResponse.md | 11 + docs/Omnimessage.md | 12 + docs/OmnimessageApi.md | 135 ++ docs/SMS.md | 14 + docs/Status.md | 8 + docs/Viber.md | 15 + docs/WhatsApp.md | 15 + docs/WhatsAppAudio.md | 9 + docs/WhatsAppDocument.md | 10 + docs/WhatsAppImage.md | 10 + docs/WhatsAppText.md | 10 + git_push.sh | 52 + src/com.Messente.Api/Api/BlacklistApi.cs | 883 +++++++++ src/com.Messente.Api/Api/ContactsApi.cs | 1707 +++++++++++++++++ src/com.Messente.Api/Api/DeliveryReportApi.cs | 328 ++++ src/com.Messente.Api/Api/GroupsApi.cs | 1106 +++++++++++ src/com.Messente.Api/Api/OmnimessageApi.cs | 529 +++++ src/com.Messente.Api/Client/ApiClient.cs | 535 ++++++ src/com.Messente.Api/Client/ApiException.cs | 60 + src/com.Messente.Api/Client/ApiResponse.cs | 54 + src/com.Messente.Api/Client/Configuration.cs | 446 +++++ .../Client/ExceptionFactory.cs | 24 + .../Client/GlobalConfiguration.cs | 34 + src/com.Messente.Api/Client/IApiAccessor.cs | 42 + .../Client/IReadableConfiguration.cs | 94 + .../Client/OpenAPIDateConverter.cs | 30 + src/com.Messente.Api/Model/Channel.cs | 54 + src/com.Messente.Api/Model/ContactEnvelope.cs | 112 ++ src/com.Messente.Api/Model/ContactFields.cs | 270 +++ .../Model/ContactListEnvelope.cs | 112 ++ .../Model/ContactUpdateFields.cs | 240 +++ .../Model/DeliveryReportResponse.cs | 176 ++ src/com.Messente.Api/Model/DeliveryResult.cs | 195 ++ .../Model/ErrorCodeOmnichannel.cs | 78 + .../Model/ErrorCodeOmnichannelMachine.cs | 108 ++ .../Model/ErrorCodePhonebook.cs | 72 + .../Model/ErrorItemOmnichannel.cs | 199 ++ .../Model/ErrorItemPhonebook.cs | 174 ++ .../Model/ErrorOmnichannel.cs | 125 ++ src/com.Messente.Api/Model/ErrorPhonebook.cs | 125 ++ .../Model/ErrorTitleOmnichannel.cs | 78 + .../Model/ErrorTitlePhonebook.cs | 72 + .../Model/FetchBlacklistSuccess.cs | 112 ++ src/com.Messente.Api/Model/GroupEnvelope.cs | 112 ++ .../Model/GroupListEnvelope.cs | 112 ++ src/com.Messente.Api/Model/GroupName.cs | 125 ++ .../Model/GroupResponseFields.cs | 191 ++ src/com.Messente.Api/Model/MessageResult.cs | 175 ++ .../Model/NumberToBlacklist.cs | 126 ++ .../Model/OmniMessageCreateSuccessResponse.cs | 176 ++ src/com.Messente.Api/Model/Omnimessage.cs | 184 ++ src/com.Messente.Api/Model/SMS.cs | 245 +++ src/com.Messente.Api/Model/Status.cs | 102 + src/com.Messente.Api/Model/Viber.cs | 222 +++ src/com.Messente.Api/Model/WhatsApp.cs | 218 +++ src/com.Messente.Api/Model/WhatsAppAudio.cs | 126 ++ .../Model/WhatsAppDocument.cs | 143 ++ src/com.Messente.Api/Model/WhatsAppImage.cs | 143 ++ src/com.Messente.Api/Model/WhatsAppText.cs | 151 ++ .../Properties/AssemblyInfo.cs | 32 + src/com.Messente.Api/com.Messente.Api.csproj | 52 + src/com.Messente.Api/project.json | 12 + 94 files changed, 12917 insertions(+), 2 deletions(-) create mode 100644 .gitignore create mode 100644 .openapi-generator-ignore create mode 100644 .openapi-generator/VERSION create mode 100644 com.Messente.Api.sln create mode 100644 docs/BlacklistApi.md create mode 100644 docs/Channel.md create mode 100644 docs/ContactEnvelope.md create mode 100644 docs/ContactFields.md create mode 100644 docs/ContactListEnvelope.md create mode 100644 docs/ContactUpdateFields.md create mode 100644 docs/ContactsApi.md create mode 100644 docs/DeliveryReportApi.md create mode 100644 docs/DeliveryReportResponse.md create mode 100644 docs/DeliveryResult.md create mode 100644 docs/ErrorCodeOmnichannel.md create mode 100644 docs/ErrorCodeOmnichannelMachine.md create mode 100644 docs/ErrorCodePhonebook.md create mode 100644 docs/ErrorItemOmnichannel.md create mode 100644 docs/ErrorItemPhonebook.md create mode 100644 docs/ErrorOmnichannel.md create mode 100644 docs/ErrorPhonebook.md create mode 100644 docs/ErrorTitleOmnichannel.md create mode 100644 docs/ErrorTitlePhonebook.md create mode 100644 docs/FetchBlacklistSuccess.md create mode 100644 docs/GroupEnvelope.md create mode 100644 docs/GroupListEnvelope.md create mode 100644 docs/GroupName.md create mode 100644 docs/GroupResponseFields.md create mode 100644 docs/GroupsApi.md create mode 100644 docs/MessageResult.md create mode 100644 docs/NumberToBlacklist.md create mode 100644 docs/OmniMessageCreateSuccessResponse.md create mode 100644 docs/Omnimessage.md create mode 100644 docs/OmnimessageApi.md create mode 100644 docs/SMS.md create mode 100644 docs/Status.md create mode 100644 docs/Viber.md create mode 100644 docs/WhatsApp.md create mode 100644 docs/WhatsAppAudio.md create mode 100644 docs/WhatsAppDocument.md create mode 100644 docs/WhatsAppImage.md create mode 100644 docs/WhatsAppText.md create mode 100644 git_push.sh create mode 100644 src/com.Messente.Api/Api/BlacklistApi.cs create mode 100644 src/com.Messente.Api/Api/ContactsApi.cs create mode 100644 src/com.Messente.Api/Api/DeliveryReportApi.cs create mode 100644 src/com.Messente.Api/Api/GroupsApi.cs create mode 100644 src/com.Messente.Api/Api/OmnimessageApi.cs create mode 100644 src/com.Messente.Api/Client/ApiClient.cs create mode 100644 src/com.Messente.Api/Client/ApiException.cs create mode 100644 src/com.Messente.Api/Client/ApiResponse.cs create mode 100644 src/com.Messente.Api/Client/Configuration.cs create mode 100644 src/com.Messente.Api/Client/ExceptionFactory.cs create mode 100644 src/com.Messente.Api/Client/GlobalConfiguration.cs create mode 100644 src/com.Messente.Api/Client/IApiAccessor.cs create mode 100644 src/com.Messente.Api/Client/IReadableConfiguration.cs create mode 100644 src/com.Messente.Api/Client/OpenAPIDateConverter.cs create mode 100644 src/com.Messente.Api/Model/Channel.cs create mode 100644 src/com.Messente.Api/Model/ContactEnvelope.cs create mode 100644 src/com.Messente.Api/Model/ContactFields.cs create mode 100644 src/com.Messente.Api/Model/ContactListEnvelope.cs create mode 100644 src/com.Messente.Api/Model/ContactUpdateFields.cs create mode 100644 src/com.Messente.Api/Model/DeliveryReportResponse.cs create mode 100644 src/com.Messente.Api/Model/DeliveryResult.cs create mode 100644 src/com.Messente.Api/Model/ErrorCodeOmnichannel.cs create mode 100644 src/com.Messente.Api/Model/ErrorCodeOmnichannelMachine.cs create mode 100644 src/com.Messente.Api/Model/ErrorCodePhonebook.cs create mode 100644 src/com.Messente.Api/Model/ErrorItemOmnichannel.cs create mode 100644 src/com.Messente.Api/Model/ErrorItemPhonebook.cs create mode 100644 src/com.Messente.Api/Model/ErrorOmnichannel.cs create mode 100644 src/com.Messente.Api/Model/ErrorPhonebook.cs create mode 100644 src/com.Messente.Api/Model/ErrorTitleOmnichannel.cs create mode 100644 src/com.Messente.Api/Model/ErrorTitlePhonebook.cs create mode 100644 src/com.Messente.Api/Model/FetchBlacklistSuccess.cs create mode 100644 src/com.Messente.Api/Model/GroupEnvelope.cs create mode 100644 src/com.Messente.Api/Model/GroupListEnvelope.cs create mode 100644 src/com.Messente.Api/Model/GroupName.cs create mode 100644 src/com.Messente.Api/Model/GroupResponseFields.cs create mode 100644 src/com.Messente.Api/Model/MessageResult.cs create mode 100644 src/com.Messente.Api/Model/NumberToBlacklist.cs create mode 100644 src/com.Messente.Api/Model/OmniMessageCreateSuccessResponse.cs create mode 100644 src/com.Messente.Api/Model/Omnimessage.cs create mode 100644 src/com.Messente.Api/Model/SMS.cs create mode 100644 src/com.Messente.Api/Model/Status.cs create mode 100644 src/com.Messente.Api/Model/Viber.cs create mode 100644 src/com.Messente.Api/Model/WhatsApp.cs create mode 100644 src/com.Messente.Api/Model/WhatsAppAudio.cs create mode 100644 src/com.Messente.Api/Model/WhatsAppDocument.cs create mode 100644 src/com.Messente.Api/Model/WhatsAppImage.cs create mode 100644 src/com.Messente.Api/Model/WhatsAppText.cs create mode 100644 src/com.Messente.Api/Properties/AssemblyInfo.cs create mode 100644 src/com.Messente.Api/com.Messente.Api.csproj create mode 100644 src/com.Messente.Api/project.json 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/.openapi-generator-ignore b/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# 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 OpenAPI Generator 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/.openapi-generator/VERSION b/.openapi-generator/VERSION new file mode 100644 index 0000000..f9dfe82 --- /dev/null +++ b/.openapi-generator/VERSION @@ -0,0 +1 @@ +4.0.0-beta2 \ No newline at end of file diff --git a/README.md b/README.md index ae3863b..647b3c6 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,147 @@ -# messente-api-csharp -Messente public API libraries merged into one C# library +# com.Messente.Api - the C# library for the Messente API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 0.0.1 +- SDK version: 0.0.1 +- Build package: org.openapitools.codegen.languages.CSharpClientCodegen + + +## Frameworks supported +- .NET Core >=1.0 +- .NET Framework >=4.6 +- Mono/Xamarin >=vNext +- UWP >=10.0 + + +## Dependencies +- FubarCoder.RestSharp.Portable.Core >=4.0.7 +- FubarCoder.RestSharp.Portable.HttpClient >=4.0.7 +- Newtonsoft.Json >=10.0.3 + + +## Installation +Generate the DLL using your preferred tool + +Then include the DLL (under the `bin` folder) in the C# project, and use the namespaces: +```csharp +using com.Messente.Api.Api; +using com.Messente.Api.Client; +using com.Messente.Api.Model; +``` + +## Getting Started + +```csharp +using System; +using System.Diagnostics; +using com.Messente.Api.Api; +using com.Messente.Api.Client; +using com.Messente.Api.Model; + +namespace Example +{ + public class Example + { + public void main() + { + + // Configure HTTP basic authorization: basicAuth + Configuration.Default.Username = "YOUR_USERNAME"; + Configuration.Default.Password = "YOUR_PASSWORD"; + + var apiInstance = new BlacklistApi(); + var numberToBlacklist = new NumberToBlacklist(); // NumberToBlacklist | Phone number to be blacklisted + + try + { + // Adds a phone number to the blacklist. + apiInstance.AddToBlacklist(numberToBlacklist); + } + catch (Exception e) + { + Debug.Print("Exception when calling BlacklistApi.AddToBlacklist: " + e.Message ); + } + + } + } +} +``` + + +## Documentation for API Endpoints + +All URIs are relative to *https://api.messente.com/v1* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*BlacklistApi* | [**AddToBlacklist**](docs/BlacklistApi.md#addtoblacklist) | **POST** /phonebook/blacklist | Adds a phone number to the blacklist. +*BlacklistApi* | [**DeleteFromBlacklist**](docs/BlacklistApi.md#deletefromblacklist) | **DELETE** /blacklist/{phone} | Deletes a phone number from the blacklist. +*BlacklistApi* | [**FetchBlacklist**](docs/BlacklistApi.md#fetchblacklist) | **GET** /phonebook/blacklist | Returns all blacklisted phone numbers. +*BlacklistApi* | [**IsBlacklisted**](docs/BlacklistApi.md#isblacklisted) | **GET** /blacklist/{phone} | Checks if a phone number is blacklisted. +*ContactsApi* | [**AddContactToGroup**](docs/ContactsApi.md#addcontacttogroup) | **POST** /groups/{groupId}/contacts/{phone} | Adds a contact to a group. +*ContactsApi* | [**CreateContact**](docs/ContactsApi.md#createcontact) | **POST** /contacts | Creates a new contact. +*ContactsApi* | [**DeleteContact**](docs/ContactsApi.md#deletecontact) | **DELETE** /contacts/{phone} | Deletes a contact. +*ContactsApi* | [**FetchContact**](docs/ContactsApi.md#fetchcontact) | **GET** /contacts/{phone} | Lists a contact. +*ContactsApi* | [**FetchContactGroups**](docs/ContactsApi.md#fetchcontactgroups) | **GET** /contacts/{phone}/groups | Lists groups of a contact. +*ContactsApi* | [**FetchContacts**](docs/ContactsApi.md#fetchcontacts) | **GET** /contacts | Returns all contacts. +*ContactsApi* | [**RemoveContactFromGroup**](docs/ContactsApi.md#removecontactfromgroup) | **DELETE** /groups/{groupId}/contacts/{phone} | Remove a contact from a group. +*ContactsApi* | [**UpdateContact**](docs/ContactsApi.md#updatecontact) | **PATCH** /contacts/{phone} | Updates a contact. +*DeliveryReportApi* | [**RetrieveDeliveryReport**](docs/DeliveryReportApi.md#retrievedeliveryreport) | **GET** /omnimessage/{omnimessageId}/status | Retrieves the delivery report for the Omnimessage +*GroupsApi* | [**CreateGroup**](docs/GroupsApi.md#creategroup) | **POST** /groups | Creates a new group with the provided name. +*GroupsApi* | [**DeleteGroup**](docs/GroupsApi.md#deletegroup) | **DELETE** /groups/{groupId} | Deletes a group. +*GroupsApi* | [**FetchGroup**](docs/GroupsApi.md#fetchgroup) | **GET** /groups/{groupId} | Lists a group. +*GroupsApi* | [**FetchGroups**](docs/GroupsApi.md#fetchgroups) | **GET** /groups | Returns all groups. +*GroupsApi* | [**UpdateGroup**](docs/GroupsApi.md#updategroup) | **PUT** /groups/{groupId} | Updates a group with the provided name. +*OmnimessageApi* | [**CancelScheduledMessage**](docs/OmnimessageApi.md#cancelscheduledmessage) | **DELETE** /omnimessage/{omnimessageId} | Cancels a scheduled Omnimessage. +*OmnimessageApi* | [**SendOmnimessage**](docs/OmnimessageApi.md#sendomnimessage) | **POST** /omnimessage | Sends an Omnimessage. + + + +## Documentation for Models + + - [Model.Channel](docs/Channel.md) + - [Model.ContactEnvelope](docs/ContactEnvelope.md) + - [Model.ContactFields](docs/ContactFields.md) + - [Model.ContactListEnvelope](docs/ContactListEnvelope.md) + - [Model.ContactUpdateFields](docs/ContactUpdateFields.md) + - [Model.DeliveryReportResponse](docs/DeliveryReportResponse.md) + - [Model.DeliveryResult](docs/DeliveryResult.md) + - [Model.ErrorCodeOmnichannel](docs/ErrorCodeOmnichannel.md) + - [Model.ErrorCodeOmnichannelMachine](docs/ErrorCodeOmnichannelMachine.md) + - [Model.ErrorCodePhonebook](docs/ErrorCodePhonebook.md) + - [Model.ErrorItemOmnichannel](docs/ErrorItemOmnichannel.md) + - [Model.ErrorItemPhonebook](docs/ErrorItemPhonebook.md) + - [Model.ErrorOmnichannel](docs/ErrorOmnichannel.md) + - [Model.ErrorPhonebook](docs/ErrorPhonebook.md) + - [Model.ErrorTitleOmnichannel](docs/ErrorTitleOmnichannel.md) + - [Model.ErrorTitlePhonebook](docs/ErrorTitlePhonebook.md) + - [Model.FetchBlacklistSuccess](docs/FetchBlacklistSuccess.md) + - [Model.GroupEnvelope](docs/GroupEnvelope.md) + - [Model.GroupListEnvelope](docs/GroupListEnvelope.md) + - [Model.GroupName](docs/GroupName.md) + - [Model.GroupResponseFields](docs/GroupResponseFields.md) + - [Model.MessageResult](docs/MessageResult.md) + - [Model.NumberToBlacklist](docs/NumberToBlacklist.md) + - [Model.OmniMessageCreateSuccessResponse](docs/OmniMessageCreateSuccessResponse.md) + - [Model.Omnimessage](docs/Omnimessage.md) + - [Model.SMS](docs/SMS.md) + - [Model.Status](docs/Status.md) + - [Model.Viber](docs/Viber.md) + - [Model.WhatsApp](docs/WhatsApp.md) + - [Model.WhatsAppAudio](docs/WhatsAppAudio.md) + - [Model.WhatsAppDocument](docs/WhatsAppDocument.md) + - [Model.WhatsAppImage](docs/WhatsAppImage.md) + - [Model.WhatsAppText](docs/WhatsAppText.md) + + + +## Documentation for Authorization + + +### basicAuth + +- **Type**: HTTP basic authentication + diff --git a/com.Messente.Api.sln b/com.Messente.Api.sln new file mode 100644 index 0000000..5f85e85 --- /dev/null +++ b/com.Messente.Api.sln @@ -0,0 +1,25 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "com.Messente.Api", "src\com.Messente.Api\com.Messente.Api.csproj", "{CC8784CC-0557-4397-B0EE-36AF0775CCF0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CC8784CC-0557-4397-B0EE-36AF0775CCF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CC8784CC-0557-4397-B0EE-36AF0775CCF0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CC8784CC-0557-4397-B0EE-36AF0775CCF0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CC8784CC-0557-4397-B0EE-36AF0775CCF0}.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 +EndGlobal \ No newline at end of file diff --git a/docs/BlacklistApi.md b/docs/BlacklistApi.md new file mode 100644 index 0000000..7651006 --- /dev/null +++ b/docs/BlacklistApi.md @@ -0,0 +1,257 @@ +# com.Messente.Api.Api.BlacklistApi + +All URIs are relative to *https://api.messente.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddToBlacklist**](BlacklistApi.md#addtoblacklist) | **POST** /phonebook/blacklist | Adds a phone number to the blacklist. +[**DeleteFromBlacklist**](BlacklistApi.md#deletefromblacklist) | **DELETE** /blacklist/{phone} | Deletes a phone number from the blacklist. +[**FetchBlacklist**](BlacklistApi.md#fetchblacklist) | **GET** /phonebook/blacklist | Returns all blacklisted phone numbers. +[**IsBlacklisted**](BlacklistApi.md#isblacklisted) | **GET** /blacklist/{phone} | Checks if a phone number is blacklisted. + + + +# **AddToBlacklist** +> void AddToBlacklist (NumberToBlacklist numberToBlacklist) + +Adds a phone number to the blacklist. + +### Example +```csharp +using System; +using System.Diagnostics; +using com.Messente.Api.Api; +using com.Messente.Api.Client; +using com.Messente.Api.Model; + +namespace Example +{ + public class AddToBlacklistExample + { + public void main() + { + // Configure HTTP basic authorization: basicAuth + Configuration.Default.Username = "YOUR_USERNAME"; + Configuration.Default.Password = "YOUR_PASSWORD"; + + var apiInstance = new BlacklistApi(); + var numberToBlacklist = new NumberToBlacklist(); // NumberToBlacklist | Phone number to be blacklisted + + try + { + // Adds a phone number to the blacklist. + apiInstance.AddToBlacklist(numberToBlacklist); + } + catch (Exception e) + { + Debug.Print("Exception when calling BlacklistApi.AddToBlacklist: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **numberToBlacklist** | [**NumberToBlacklist**](NumberToBlacklist.md)| Phone number to be blacklisted | + +### Return type + +void (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### 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) + + +# **DeleteFromBlacklist** +> void DeleteFromBlacklist (string phone) + +Deletes a phone number from the blacklist. + +### Example +```csharp +using System; +using System.Diagnostics; +using com.Messente.Api.Api; +using com.Messente.Api.Client; +using com.Messente.Api.Model; + +namespace Example +{ + public class DeleteFromBlacklistExample + { + public void main() + { + // Configure HTTP basic authorization: basicAuth + Configuration.Default.Username = "YOUR_USERNAME"; + Configuration.Default.Password = "YOUR_PASSWORD"; + + var apiInstance = new BlacklistApi(); + var phone = phone_example; // string | A phone number + + try + { + // Deletes a phone number from the blacklist. + apiInstance.DeleteFromBlacklist(phone); + } + catch (Exception e) + { + Debug.Print("Exception when calling BlacklistApi.DeleteFromBlacklist: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **phone** | **string**| A phone number | + +### Return type + +void (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + + +# **FetchBlacklist** +> FetchBlacklistSuccess FetchBlacklist () + +Returns all blacklisted phone numbers. + +### Example +```csharp +using System; +using System.Diagnostics; +using com.Messente.Api.Api; +using com.Messente.Api.Client; +using com.Messente.Api.Model; + +namespace Example +{ + public class FetchBlacklistExample + { + public void main() + { + // Configure HTTP basic authorization: basicAuth + Configuration.Default.Username = "YOUR_USERNAME"; + Configuration.Default.Password = "YOUR_PASSWORD"; + + var apiInstance = new BlacklistApi(); + + try + { + // Returns all blacklisted phone numbers. + FetchBlacklistSuccess result = apiInstance.FetchBlacklist(); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling BlacklistApi.FetchBlacklist: " + e.Message ); + } + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**FetchBlacklistSuccess**](FetchBlacklistSuccess.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + + +# **IsBlacklisted** +> void IsBlacklisted (string phone) + +Checks if a phone number is blacklisted. + +### Example +```csharp +using System; +using System.Diagnostics; +using com.Messente.Api.Api; +using com.Messente.Api.Client; +using com.Messente.Api.Model; + +namespace Example +{ + public class IsBlacklistedExample + { + public void main() + { + // Configure HTTP basic authorization: basicAuth + Configuration.Default.Username = "YOUR_USERNAME"; + Configuration.Default.Password = "YOUR_PASSWORD"; + + var apiInstance = new BlacklistApi(); + var phone = phone_example; // string | A phone number + + try + { + // Checks if a phone number is blacklisted. + apiInstance.IsBlacklisted(phone); + } + catch (Exception e) + { + Debug.Print("Exception when calling BlacklistApi.IsBlacklisted: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **phone** | **string**| A phone number | + +### Return type + +void (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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/Channel.md b/docs/Channel.md new file mode 100644 index 0000000..d961ed2 --- /dev/null +++ b/docs/Channel.md @@ -0,0 +1,8 @@ +# com.Messente.Api.Model.Channel +## 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/ContactEnvelope.md b/docs/ContactEnvelope.md new file mode 100644 index 0000000..6e4af6f --- /dev/null +++ b/docs/ContactEnvelope.md @@ -0,0 +1,9 @@ +# com.Messente.Api.Model.ContactEnvelope +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Contact** | [**ContactFields**](.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/ContactFields.md b/docs/ContactFields.md new file mode 100644 index 0000000..73c7224 --- /dev/null +++ b/docs/ContactFields.md @@ -0,0 +1,18 @@ +# com.Messente.Api.Model.ContactFields +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PhoneNumber** | **string** | Phone number in e.164 format | +**Email** | **string** | | [optional] +**FirstName** | **string** | | [optional] +**LastName** | **string** | | [optional] +**Company** | **string** | | [optional] +**Title** | **string** | | [optional] +**Custom** | **string** | | [optional] +**Custom2** | **string** | | [optional] +**Custom3** | **string** | | [optional] +**Custom4** | **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/ContactListEnvelope.md b/docs/ContactListEnvelope.md new file mode 100644 index 0000000..b64e1bb --- /dev/null +++ b/docs/ContactListEnvelope.md @@ -0,0 +1,9 @@ +# com.Messente.Api.Model.ContactListEnvelope +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Contacts** | [**List<ContactFields>**](ContactFields.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/ContactUpdateFields.md b/docs/ContactUpdateFields.md new file mode 100644 index 0000000..56f114e --- /dev/null +++ b/docs/ContactUpdateFields.md @@ -0,0 +1,17 @@ +# com.Messente.Api.Model.ContactUpdateFields +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | | [optional] +**FirstName** | **string** | | [optional] +**LastName** | **string** | | [optional] +**Company** | **string** | | [optional] +**Title** | **string** | | [optional] +**Custom** | **string** | | [optional] +**Custom2** | **string** | | [optional] +**Custom3** | **string** | | [optional] +**Custom4** | **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/ContactsApi.md b/docs/ContactsApi.md new file mode 100644 index 0000000..9cd1107 --- /dev/null +++ b/docs/ContactsApi.md @@ -0,0 +1,524 @@ +# com.Messente.Api.Api.ContactsApi + +All URIs are relative to *https://api.messente.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddContactToGroup**](ContactsApi.md#addcontacttogroup) | **POST** /groups/{groupId}/contacts/{phone} | Adds a contact to a group. +[**CreateContact**](ContactsApi.md#createcontact) | **POST** /contacts | Creates a new contact. +[**DeleteContact**](ContactsApi.md#deletecontact) | **DELETE** /contacts/{phone} | Deletes a contact. +[**FetchContact**](ContactsApi.md#fetchcontact) | **GET** /contacts/{phone} | Lists a contact. +[**FetchContactGroups**](ContactsApi.md#fetchcontactgroups) | **GET** /contacts/{phone}/groups | Lists groups of a contact. +[**FetchContacts**](ContactsApi.md#fetchcontacts) | **GET** /contacts | Returns all contacts. +[**RemoveContactFromGroup**](ContactsApi.md#removecontactfromgroup) | **DELETE** /groups/{groupId}/contacts/{phone} | Remove a contact from a group. +[**UpdateContact**](ContactsApi.md#updatecontact) | **PATCH** /contacts/{phone} | Updates a contact. + + + +# **AddContactToGroup** +> Object AddContactToGroup (string groupId, string phone) + +Adds a contact to a group. + +### Example +```csharp +using System; +using System.Diagnostics; +using com.Messente.Api.Api; +using com.Messente.Api.Client; +using com.Messente.Api.Model; + +namespace Example +{ + public class AddContactToGroupExample + { + public void main() + { + // Configure HTTP basic authorization: basicAuth + Configuration.Default.Username = "YOUR_USERNAME"; + Configuration.Default.Password = "YOUR_PASSWORD"; + + var apiInstance = new ContactsApi(); + var groupId = groupId_example; // string | String in uuid format. + var phone = phone_example; // string | A phone number + + try + { + // Adds a contact to a group. + Object result = apiInstance.AddContactToGroup(groupId, phone); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ContactsApi.AddContactToGroup: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| String in uuid format. | + **phone** | **string**| A phone number | + +### Return type + +**Object** + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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** +> ContactEnvelope CreateContact (ContactFields contactFields) + +Creates a new contact. + +### Example +```csharp +using System; +using System.Diagnostics; +using com.Messente.Api.Api; +using com.Messente.Api.Client; +using com.Messente.Api.Model; + +namespace Example +{ + public class CreateContactExample + { + public void main() + { + // Configure HTTP basic authorization: basicAuth + Configuration.Default.Username = "YOUR_USERNAME"; + Configuration.Default.Password = "YOUR_PASSWORD"; + + var apiInstance = new ContactsApi(); + var contactFields = new ContactFields(); // ContactFields | + + try + { + // Creates a new contact. + ContactEnvelope result = apiInstance.CreateContact(contactFields); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ContactsApi.CreateContact: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **contactFields** | [**ContactFields**](ContactFields.md)| | + +### Return type + +[**ContactEnvelope**](ContactEnvelope.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### 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 phone) + +Deletes a contact. + +### Example +```csharp +using System; +using System.Diagnostics; +using com.Messente.Api.Api; +using com.Messente.Api.Client; +using com.Messente.Api.Model; + +namespace Example +{ + public class DeleteContactExample + { + public void main() + { + // Configure HTTP basic authorization: basicAuth + Configuration.Default.Username = "YOUR_USERNAME"; + Configuration.Default.Password = "YOUR_PASSWORD"; + + var apiInstance = new ContactsApi(); + var phone = phone_example; // string | A phone number + + try + { + // Deletes a contact. + apiInstance.DeleteContact(phone); + } + catch (Exception e) + { + Debug.Print("Exception when calling ContactsApi.DeleteContact: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **phone** | **string**| A phone number | + +### Return type + +void (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + + +# **FetchContact** +> ContactEnvelope FetchContact (string phone) + +Lists a contact. + +### Example +```csharp +using System; +using System.Diagnostics; +using com.Messente.Api.Api; +using com.Messente.Api.Client; +using com.Messente.Api.Model; + +namespace Example +{ + public class FetchContactExample + { + public void main() + { + // Configure HTTP basic authorization: basicAuth + Configuration.Default.Username = "YOUR_USERNAME"; + Configuration.Default.Password = "YOUR_PASSWORD"; + + var apiInstance = new ContactsApi(); + var phone = phone_example; // string | A phone number + + try + { + // Lists a contact. + ContactEnvelope result = apiInstance.FetchContact(phone); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ContactsApi.FetchContact: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **phone** | **string**| A phone number | + +### Return type + +[**ContactEnvelope**](ContactEnvelope.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + + +# **FetchContactGroups** +> GroupListEnvelope FetchContactGroups (string phone) + +Lists groups of a contact. + +### Example +```csharp +using System; +using System.Diagnostics; +using com.Messente.Api.Api; +using com.Messente.Api.Client; +using com.Messente.Api.Model; + +namespace Example +{ + public class FetchContactGroupsExample + { + public void main() + { + // Configure HTTP basic authorization: basicAuth + Configuration.Default.Username = "YOUR_USERNAME"; + Configuration.Default.Password = "YOUR_PASSWORD"; + + var apiInstance = new ContactsApi(); + var phone = phone_example; // string | A phone number + + try + { + // Lists groups of a contact. + GroupListEnvelope result = apiInstance.FetchContactGroups(phone); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ContactsApi.FetchContactGroups: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **phone** | **string**| A phone number | + +### Return type + +[**GroupListEnvelope**](GroupListEnvelope.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + + +# **FetchContacts** +> ContactListEnvelope FetchContacts (List groupIds = null) + +Returns all contacts. + +### Example +```csharp +using System; +using System.Diagnostics; +using com.Messente.Api.Api; +using com.Messente.Api.Client; +using com.Messente.Api.Model; + +namespace Example +{ + public class FetchContactsExample + { + public void main() + { + // Configure HTTP basic authorization: basicAuth + Configuration.Default.Username = "YOUR_USERNAME"; + Configuration.Default.Password = "YOUR_PASSWORD"; + + var apiInstance = new ContactsApi(); + var groupIds = new List(); // List | Group id string in uuid format. (optional) + + try + { + // Returns all contacts. + ContactListEnvelope result = apiInstance.FetchContacts(groupIds); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ContactsApi.FetchContacts: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupIds** | [**List<string>**](string.md)| Group id string in uuid format. | [optional] + +### Return type + +[**ContactListEnvelope**](ContactListEnvelope.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + + +# **RemoveContactFromGroup** +> void RemoveContactFromGroup (string groupId, string phone) + +Remove a contact from a group. + +### Example +```csharp +using System; +using System.Diagnostics; +using com.Messente.Api.Api; +using com.Messente.Api.Client; +using com.Messente.Api.Model; + +namespace Example +{ + public class RemoveContactFromGroupExample + { + public void main() + { + // Configure HTTP basic authorization: basicAuth + Configuration.Default.Username = "YOUR_USERNAME"; + Configuration.Default.Password = "YOUR_PASSWORD"; + + var apiInstance = new ContactsApi(); + var groupId = groupId_example; // string | String in uuid format. + var phone = phone_example; // string | A phone number + + try + { + // Remove a contact from a group. + apiInstance.RemoveContactFromGroup(groupId, phone); + } + catch (Exception e) + { + Debug.Print("Exception when calling ContactsApi.RemoveContactFromGroup: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| String in uuid format. | + **phone** | **string**| A phone number | + +### Return type + +void (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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** +> ContactEnvelope UpdateContact (string phone, ContactUpdateFields contactUpdateFields) + +Updates a contact. + +### Example +```csharp +using System; +using System.Diagnostics; +using com.Messente.Api.Api; +using com.Messente.Api.Client; +using com.Messente.Api.Model; + +namespace Example +{ + public class UpdateContactExample + { + public void main() + { + // Configure HTTP basic authorization: basicAuth + Configuration.Default.Username = "YOUR_USERNAME"; + Configuration.Default.Password = "YOUR_PASSWORD"; + + var apiInstance = new ContactsApi(); + var phone = phone_example; // string | A phone number + var contactUpdateFields = new ContactUpdateFields(); // ContactUpdateFields | + + try + { + // Updates a contact. + ContactEnvelope result = apiInstance.UpdateContact(phone, contactUpdateFields); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling ContactsApi.UpdateContact: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **phone** | **string**| A phone number | + **contactUpdateFields** | [**ContactUpdateFields**](ContactUpdateFields.md)| | + +### Return type + +[**ContactEnvelope**](ContactEnvelope.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### 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/DeliveryReportApi.md b/docs/DeliveryReportApi.md new file mode 100644 index 0000000..7487f3c --- /dev/null +++ b/docs/DeliveryReportApi.md @@ -0,0 +1,72 @@ +# com.Messente.Api.Api.DeliveryReportApi + +All URIs are relative to *https://api.messente.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**RetrieveDeliveryReport**](DeliveryReportApi.md#retrievedeliveryreport) | **GET** /omnimessage/{omnimessageId}/status | Retrieves the delivery report for the Omnimessage + + + +# **RetrieveDeliveryReport** +> DeliveryReportResponse RetrieveDeliveryReport (Guid? omnimessageId) + +Retrieves the delivery report for the Omnimessage + +### Example +```csharp +using System; +using System.Diagnostics; +using com.Messente.Api.Api; +using com.Messente.Api.Client; +using com.Messente.Api.Model; + +namespace Example +{ + public class RetrieveDeliveryReportExample + { + public void main() + { + // Configure HTTP basic authorization: basicAuth + Configuration.Default.Username = "YOUR_USERNAME"; + Configuration.Default.Password = "YOUR_PASSWORD"; + + var apiInstance = new DeliveryReportApi(); + var omnimessageId = new Guid?(); // Guid? | UUID of the Omnimessage to for which the delivery report is to be retrieved + + try + { + // Retrieves the delivery report for the Omnimessage + DeliveryReportResponse result = apiInstance.RetrieveDeliveryReport(omnimessageId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling DeliveryReportApi.RetrieveDeliveryReport: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **omnimessageId** | [**Guid?**](Guid?.md)| UUID of the Omnimessage to for which the delivery report is to be retrieved | + +### Return type + +[**DeliveryReportResponse**](DeliveryReportResponse.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[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/DeliveryReportResponse.md b/docs/DeliveryReportResponse.md new file mode 100644 index 0000000..88bf7f7 --- /dev/null +++ b/docs/DeliveryReportResponse.md @@ -0,0 +1,11 @@ +# com.Messente.Api.Model.DeliveryReportResponse +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Statuses** | [**List<DeliveryResult>**](DeliveryResult.md) | Contains the delivery reports for each channnel, ordered by send order | +**To** | **string** | Phone number in e.164 format | +**OmnimessageId** | **Guid?** | Unique identifier for the Omnimessage | + +[[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/DeliveryResult.md b/docs/DeliveryResult.md new file mode 100644 index 0000000..1f30ddb --- /dev/null +++ b/docs/DeliveryResult.md @@ -0,0 +1,14 @@ +# com.Messente.Api.Model.DeliveryResult +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | [**Status**](Status.md) | | [optional] +**Channel** | [**Channel**](Channel.md) | | [optional] +**MessageId** | **Guid?** | Unique identifier for the message | [optional] +**Error** | **string** | Human-readable description of what went wrong, *null* in case of success or if the messages has not been processed yet | [optional] +**Err** | [**ErrorCodeOmnichannelMachine**](ErrorCodeOmnichannelMachine.md) | | [optional] +**Timestamp** | **DateTime?** | When this status was received by Omnichannel API | [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/ErrorCodeOmnichannel.md b/docs/ErrorCodeOmnichannel.md new file mode 100644 index 0000000..c2c9a0c --- /dev/null +++ b/docs/ErrorCodeOmnichannel.md @@ -0,0 +1,8 @@ +# com.Messente.Api.Model.ErrorCodeOmnichannel +## 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/ErrorCodeOmnichannelMachine.md b/docs/ErrorCodeOmnichannelMachine.md new file mode 100644 index 0000000..de12fd3 --- /dev/null +++ b/docs/ErrorCodeOmnichannelMachine.md @@ -0,0 +1,8 @@ +# com.Messente.Api.Model.ErrorCodeOmnichannelMachine +## 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/ErrorCodePhonebook.md b/docs/ErrorCodePhonebook.md new file mode 100644 index 0000000..4ae2540 --- /dev/null +++ b/docs/ErrorCodePhonebook.md @@ -0,0 +1,8 @@ +# com.Messente.Api.Model.ErrorCodePhonebook +## 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/ErrorItemOmnichannel.md b/docs/ErrorItemOmnichannel.md new file mode 100644 index 0000000..26445bc --- /dev/null +++ b/docs/ErrorItemOmnichannel.md @@ -0,0 +1,12 @@ +# com.Messente.Api.Model.ErrorItemOmnichannel +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Title** | [**ErrorTitleOmnichannel**](ErrorTitleOmnichannel.md) | | +**Detail** | **string** | Free form more detailed description of the error. | +**Code** | [**ErrorCodeOmnichannel**](ErrorCodeOmnichannel.md) | | +**Source** | **string** | Describes which field is causing the issue in the payload, null for non 400 status code responses | + +[[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/ErrorItemPhonebook.md b/docs/ErrorItemPhonebook.md new file mode 100644 index 0000000..559c5ec --- /dev/null +++ b/docs/ErrorItemPhonebook.md @@ -0,0 +1,11 @@ +# com.Messente.Api.Model.ErrorItemPhonebook +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Title** | [**ErrorTitlePhonebook**](ErrorTitlePhonebook.md) | | +**Detail** | **string** | Free form more detailed description of the error. | +**Code** | [**ErrorCodePhonebook**](ErrorCodePhonebook.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/ErrorOmnichannel.md b/docs/ErrorOmnichannel.md new file mode 100644 index 0000000..945530d --- /dev/null +++ b/docs/ErrorOmnichannel.md @@ -0,0 +1,9 @@ +# com.Messente.Api.Model.ErrorOmnichannel +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**List<ErrorItemOmnichannel>**](ErrorItemOmnichannel.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/ErrorPhonebook.md b/docs/ErrorPhonebook.md new file mode 100644 index 0000000..063170e --- /dev/null +++ b/docs/ErrorPhonebook.md @@ -0,0 +1,9 @@ +# com.Messente.Api.Model.ErrorPhonebook +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**List<ErrorItemPhonebook>**](ErrorItemPhonebook.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/ErrorTitleOmnichannel.md b/docs/ErrorTitleOmnichannel.md new file mode 100644 index 0000000..060034b --- /dev/null +++ b/docs/ErrorTitleOmnichannel.md @@ -0,0 +1,8 @@ +# com.Messente.Api.Model.ErrorTitleOmnichannel +## 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/ErrorTitlePhonebook.md b/docs/ErrorTitlePhonebook.md new file mode 100644 index 0000000..f464df0 --- /dev/null +++ b/docs/ErrorTitlePhonebook.md @@ -0,0 +1,8 @@ +# com.Messente.Api.Model.ErrorTitlePhonebook +## 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/FetchBlacklistSuccess.md b/docs/FetchBlacklistSuccess.md new file mode 100644 index 0000000..15f4447 --- /dev/null +++ b/docs/FetchBlacklistSuccess.md @@ -0,0 +1,9 @@ +# com.Messente.Api.Model.FetchBlacklistSuccess +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PhoneNumbers** | **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/GroupEnvelope.md b/docs/GroupEnvelope.md new file mode 100644 index 0000000..ec4ed81 --- /dev/null +++ b/docs/GroupEnvelope.md @@ -0,0 +1,9 @@ +# com.Messente.Api.Model.GroupEnvelope +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Group** | [**GroupResponseFields**](.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/GroupListEnvelope.md b/docs/GroupListEnvelope.md new file mode 100644 index 0000000..f1c96f8 --- /dev/null +++ b/docs/GroupListEnvelope.md @@ -0,0 +1,9 @@ +# com.Messente.Api.Model.GroupListEnvelope +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Groups** | [**List<GroupResponseFields>**](GroupResponseFields.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/GroupName.md b/docs/GroupName.md new file mode 100644 index 0000000..9818963 --- /dev/null +++ b/docs/GroupName.md @@ -0,0 +1,9 @@ +# com.Messente.Api.Model.GroupName +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | + +[[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/GroupResponseFields.md b/docs/GroupResponseFields.md new file mode 100644 index 0000000..49ef93e --- /dev/null +++ b/docs/GroupResponseFields.md @@ -0,0 +1,12 @@ +# com.Messente.Api.Model.GroupResponseFields +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | Id string in uuid format | +**Name** | **string** | | +**CreatedOn** | **string** | format %Y-%m-%dT%H:%M:%S.%fZ | [optional] +**ContactsCount** | **int?** | | + +[[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/GroupsApi.md b/docs/GroupsApi.md new file mode 100644 index 0000000..da38489 --- /dev/null +++ b/docs/GroupsApi.md @@ -0,0 +1,325 @@ +# com.Messente.Api.Api.GroupsApi + +All URIs are relative to *https://api.messente.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateGroup**](GroupsApi.md#creategroup) | **POST** /groups | Creates a new group with the provided name. +[**DeleteGroup**](GroupsApi.md#deletegroup) | **DELETE** /groups/{groupId} | Deletes a group. +[**FetchGroup**](GroupsApi.md#fetchgroup) | **GET** /groups/{groupId} | Lists a group. +[**FetchGroups**](GroupsApi.md#fetchgroups) | **GET** /groups | Returns all groups. +[**UpdateGroup**](GroupsApi.md#updategroup) | **PUT** /groups/{groupId} | Updates a group with the provided name. + + + +# **CreateGroup** +> GroupEnvelope CreateGroup (GroupName groupName) + +Creates a new group with the provided name. + +### Example +```csharp +using System; +using System.Diagnostics; +using com.Messente.Api.Api; +using com.Messente.Api.Client; +using com.Messente.Api.Model; + +namespace Example +{ + public class CreateGroupExample + { + public void main() + { + // Configure HTTP basic authorization: basicAuth + Configuration.Default.Username = "YOUR_USERNAME"; + Configuration.Default.Password = "YOUR_PASSWORD"; + + var apiInstance = new GroupsApi(); + var groupName = new GroupName(); // GroupName | + + try + { + // Creates a new group with the provided name. + GroupEnvelope result = apiInstance.CreateGroup(groupName); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling GroupsApi.CreateGroup: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupName** | [**GroupName**](GroupName.md)| | + +### Return type + +[**GroupEnvelope**](GroupEnvelope.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### 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) + + +# **DeleteGroup** +> void DeleteGroup (string groupId) + +Deletes a group. + +### Example +```csharp +using System; +using System.Diagnostics; +using com.Messente.Api.Api; +using com.Messente.Api.Client; +using com.Messente.Api.Model; + +namespace Example +{ + public class DeleteGroupExample + { + public void main() + { + // Configure HTTP basic authorization: basicAuth + Configuration.Default.Username = "YOUR_USERNAME"; + Configuration.Default.Password = "YOUR_PASSWORD"; + + var apiInstance = new GroupsApi(); + var groupId = groupId_example; // string | String in uuid format. + + try + { + // Deletes a group. + apiInstance.DeleteGroup(groupId); + } + catch (Exception e) + { + Debug.Print("Exception when calling GroupsApi.DeleteGroup: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| String in uuid format. | + +### Return type + +void (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + + +# **FetchGroup** +> GroupEnvelope FetchGroup (string groupId) + +Lists a group. + +### Example +```csharp +using System; +using System.Diagnostics; +using com.Messente.Api.Api; +using com.Messente.Api.Client; +using com.Messente.Api.Model; + +namespace Example +{ + public class FetchGroupExample + { + public void main() + { + // Configure HTTP basic authorization: basicAuth + Configuration.Default.Username = "YOUR_USERNAME"; + Configuration.Default.Password = "YOUR_PASSWORD"; + + var apiInstance = new GroupsApi(); + var groupId = groupId_example; // string | String in uuid format. + + try + { + // Lists a group. + GroupEnvelope result = apiInstance.FetchGroup(groupId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling GroupsApi.FetchGroup: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| String in uuid format. | + +### Return type + +[**GroupEnvelope**](GroupEnvelope.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + + +# **FetchGroups** +> GroupListEnvelope FetchGroups () + +Returns all groups. + +### Example +```csharp +using System; +using System.Diagnostics; +using com.Messente.Api.Api; +using com.Messente.Api.Client; +using com.Messente.Api.Model; + +namespace Example +{ + public class FetchGroupsExample + { + public void main() + { + // Configure HTTP basic authorization: basicAuth + Configuration.Default.Username = "YOUR_USERNAME"; + Configuration.Default.Password = "YOUR_PASSWORD"; + + var apiInstance = new GroupsApi(); + + try + { + // Returns all groups. + GroupListEnvelope result = apiInstance.FetchGroups(); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling GroupsApi.FetchGroups: " + e.Message ); + } + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**GroupListEnvelope**](GroupListEnvelope.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + + +# **UpdateGroup** +> GroupEnvelope UpdateGroup (string groupId, GroupName groupName) + +Updates a group with the provided name. + +### Example +```csharp +using System; +using System.Diagnostics; +using com.Messente.Api.Api; +using com.Messente.Api.Client; +using com.Messente.Api.Model; + +namespace Example +{ + public class UpdateGroupExample + { + public void main() + { + // Configure HTTP basic authorization: basicAuth + Configuration.Default.Username = "YOUR_USERNAME"; + Configuration.Default.Password = "YOUR_PASSWORD"; + + var apiInstance = new GroupsApi(); + var groupId = groupId_example; // string | String in uuid format. + var groupName = new GroupName(); // GroupName | + + try + { + // Updates a group with the provided name. + GroupEnvelope result = apiInstance.UpdateGroup(groupId, groupName); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling GroupsApi.UpdateGroup: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| String in uuid format. | + **groupName** | [**GroupName**](GroupName.md)| | + +### Return type + +[**GroupEnvelope**](GroupEnvelope.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### 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/MessageResult.md b/docs/MessageResult.md new file mode 100644 index 0000000..9c4b66a --- /dev/null +++ b/docs/MessageResult.md @@ -0,0 +1,11 @@ +# com.Messente.Api.Model.MessageResult +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MessageId** | **Guid?** | Unique identifier for the message | +**Channel** | [**Channel**](Channel.md) | | +**Sender** | **string** | Sender that was used for the 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/NumberToBlacklist.md b/docs/NumberToBlacklist.md new file mode 100644 index 0000000..2d61a2f --- /dev/null +++ b/docs/NumberToBlacklist.md @@ -0,0 +1,9 @@ +# com.Messente.Api.Model.NumberToBlacklist +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PhoneNumber** | **string** | Phone number in e.164 format | + +[[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/OmniMessageCreateSuccessResponse.md b/docs/OmniMessageCreateSuccessResponse.md new file mode 100644 index 0000000..fbdcd3d --- /dev/null +++ b/docs/OmniMessageCreateSuccessResponse.md @@ -0,0 +1,11 @@ +# com.Messente.Api.Model.OmniMessageCreateSuccessResponse +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Messages** | [**List<MessageResult>**](MessageResult.md) | List of messages that compose the Omnimessage | +**To** | **string** | Phone number in e.164 format | +**OmnimessageId** | **Guid?** | Unique identifier for the Omnimessage | + +[[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/Omnimessage.md b/docs/Omnimessage.md new file mode 100644 index 0000000..ac6a6f7 --- /dev/null +++ b/docs/Omnimessage.md @@ -0,0 +1,12 @@ +# com.Messente.Api.Model.Omnimessage +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**To** | **string** | Phone number in e.164 format | +**Messages** | [**List<OneOfViberSMSWhatsApp>**](OneOfViberSMSWhatsApp.md) | | +**DlrUrl** | **string** | URL where the delivery report will be sent | [optional] +**TimeToSend** | **DateTime?** | Optional parameter for sending messages at some specific time in the future. Time must be specified in the 8601 format. If no timezone is specified, then the timezone is assumed to be UTC. Examples: * Time specified with timezone: 2018-06-22T09:05:07+00:00 Time specified in UTC: 2018-06-22T09:05:07Z * Time specified without timezone: 2018-06-22T09:05 (equivalent to 2018-06-22T09:05+00:00) | [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/OmnimessageApi.md b/docs/OmnimessageApi.md new file mode 100644 index 0000000..681895b --- /dev/null +++ b/docs/OmnimessageApi.md @@ -0,0 +1,135 @@ +# com.Messente.Api.Api.OmnimessageApi + +All URIs are relative to *https://api.messente.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CancelScheduledMessage**](OmnimessageApi.md#cancelscheduledmessage) | **DELETE** /omnimessage/{omnimessageId} | Cancels a scheduled Omnimessage. +[**SendOmnimessage**](OmnimessageApi.md#sendomnimessage) | **POST** /omnimessage | Sends an Omnimessage. + + + +# **CancelScheduledMessage** +> void CancelScheduledMessage (Guid? omnimessageId) + +Cancels a scheduled Omnimessage. + +### Example +```csharp +using System; +using System.Diagnostics; +using com.Messente.Api.Api; +using com.Messente.Api.Client; +using com.Messente.Api.Model; + +namespace Example +{ + public class CancelScheduledMessageExample + { + public void main() + { + // Configure HTTP basic authorization: basicAuth + Configuration.Default.Username = "YOUR_USERNAME"; + Configuration.Default.Password = "YOUR_PASSWORD"; + + var apiInstance = new OmnimessageApi(); + var omnimessageId = new Guid?(); // Guid? | UUID of the scheduled Omnimessage to be cancelled + + try + { + // Cancels a scheduled Omnimessage. + apiInstance.CancelScheduledMessage(omnimessageId); + } + catch (Exception e) + { + Debug.Print("Exception when calling OmnimessageApi.CancelScheduledMessage: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **omnimessageId** | [**Guid?**](Guid?.md)| UUID of the scheduled Omnimessage to be cancelled | + +### Return type + +void (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + + +# **SendOmnimessage** +> OmniMessageCreateSuccessResponse SendOmnimessage (Omnimessage omnimessage) + +Sends an Omnimessage. + +### Example +```csharp +using System; +using System.Diagnostics; +using com.Messente.Api.Api; +using com.Messente.Api.Client; +using com.Messente.Api.Model; + +namespace Example +{ + public class SendOmnimessageExample + { + public void main() + { + // Configure HTTP basic authorization: basicAuth + Configuration.Default.Username = "YOUR_USERNAME"; + Configuration.Default.Password = "YOUR_PASSWORD"; + + var apiInstance = new OmnimessageApi(); + var omnimessage = new Omnimessage(); // Omnimessage | Omnimessage to be sent + + try + { + // Sends an Omnimessage. + OmniMessageCreateSuccessResponse result = apiInstance.SendOmnimessage(omnimessage); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling OmnimessageApi.SendOmnimessage: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **omnimessage** | [**Omnimessage**](Omnimessage.md)| Omnimessage to be sent | + +### Return type + +[**OmniMessageCreateSuccessResponse**](OmniMessageCreateSuccessResponse.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### 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/SMS.md b/docs/SMS.md new file mode 100644 index 0000000..40553de --- /dev/null +++ b/docs/SMS.md @@ -0,0 +1,14 @@ +# com.Messente.Api.Model.SMS +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Text** | **string** | Text content of the SMS | +**Sender** | **string** | Phone number or alphanumeric sender name | [optional] +**Validity** | **int?** | After how many minutes this channel is considered as failed and the next channel is attempted | [optional] +**Autoconvert** | **string** | Defines how non-GSM characters will be treated: - \"on\" Use replacement settings from the account's [API Auto Replace settings page](https://dashboard.messente.com/api-settings/auto-replace)(default) - \"full\" All non GSM 03.38 characters will be replaced with suitable alternatives - \"off\" Message content is not modified in any way | [optional] +**Udh** | **string** | hex-encoded string containing SMS UDH | [optional] +**Channel** | **string** | | [optional] [default to "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/Status.md b/docs/Status.md new file mode 100644 index 0000000..efac18d --- /dev/null +++ b/docs/Status.md @@ -0,0 +1,8 @@ +# com.Messente.Api.Model.Status +## 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/Viber.md b/docs/Viber.md new file mode 100644 index 0000000..f90e475 --- /dev/null +++ b/docs/Viber.md @@ -0,0 +1,15 @@ +# com.Messente.Api.Model.Viber +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Sender** | **string** | Phone number or alphanumeric sender name | [optional] +**Validity** | **int?** | After how many minutes this channel is considered as failed and the next channel is attempted | [optional] +**Text** | **string** | Plaintext content for Viber | [optional] +**ImageUrl** | **string** | URL for the embedded image. Valid combinations: 1) image_url, 2) text, image_url, button_url, button_text | [optional] +**ButtonUrl** | **string** | URL of the button, must be specified along with ''text'', ''button_text'' and ''image_url'' (optional) | [optional] +**ButtonText** | **string** | Must be specified along with ''text'', ''button_url'', ''button_text'', ''image_url'' (optional) | [optional] +**Channel** | **string** | | [optional] [default to "viber"] + +[[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/WhatsApp.md b/docs/WhatsApp.md new file mode 100644 index 0000000..46db4aa --- /dev/null +++ b/docs/WhatsApp.md @@ -0,0 +1,15 @@ +# com.Messente.Api.Model.WhatsApp +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Sender** | **string** | Phone number or alphanumeric sender name | [optional] +**Validity** | **int?** | After how many minutes this channel is considered as failed and the next channel is attempted | [optional] +**Text** | [**WhatsAppText**](WhatsAppText.md) | | [optional] +**Image** | [**WhatsAppImage**](WhatsAppImage.md) | | [optional] +**Document** | [**WhatsAppDocument**](WhatsAppDocument.md) | | [optional] +**Audio** | [**WhatsAppAudio**](WhatsAppAudio.md) | | [optional] +**Channel** | **string** | | [optional] [default to "whatsapp"] + +[[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/WhatsAppAudio.md b/docs/WhatsAppAudio.md new file mode 100644 index 0000000..a9561cb --- /dev/null +++ b/docs/WhatsAppAudio.md @@ -0,0 +1,9 @@ +# com.Messente.Api.Model.WhatsAppAudio +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | **string** | Base64-encoded audio | + +[[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/WhatsAppDocument.md b/docs/WhatsAppDocument.md new file mode 100644 index 0000000..2b6febe --- /dev/null +++ b/docs/WhatsAppDocument.md @@ -0,0 +1,10 @@ +# com.Messente.Api.Model.WhatsAppDocument +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Caption** | **string** | Description for the document | [optional] +**Content** | **string** | Base64-encoded image | + +[[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/WhatsAppImage.md b/docs/WhatsAppImage.md new file mode 100644 index 0000000..ae13a73 --- /dev/null +++ b/docs/WhatsAppImage.md @@ -0,0 +1,10 @@ +# com.Messente.Api.Model.WhatsAppImage +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Caption** | **string** | Description for the image | [optional] +**Content** | **string** | Base64-encoded image | + +[[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/WhatsAppText.md b/docs/WhatsAppText.md new file mode 100644 index 0000000..9c77515 --- /dev/null +++ b/docs/WhatsAppText.md @@ -0,0 +1,10 @@ +# com.Messente.Api.Model.WhatsAppText +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PreviewUrl** | **bool?** | Whether to display link preview if the message contains a hyperlink. | [optional] [default to true] +**Body** | **string** | Plaintext content for WhatsApp, can contains URLs, emojis and formatting | + +[[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/git_push.sh b/git_push.sh new file mode 100644 index 0000000..4d22bfe --- /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 openapi-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/src/com.Messente.Api/Api/BlacklistApi.cs b/src/com.Messente.Api/Api/BlacklistApi.cs new file mode 100644 index 0000000..7c9fa82 --- /dev/null +++ b/src/com.Messente.Api/Api/BlacklistApi.cs @@ -0,0 +1,883 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using RestSharp.Portable; +using com.Messente.Api.Client; +using com.Messente.Api.Model; + +namespace com.Messente.Api.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IBlacklistApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Adds a phone number to the blacklist. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Phone number to be blacklisted + /// + void AddToBlacklist (NumberToBlacklist numberToBlacklist); + + /// + /// Adds a phone number to the blacklist. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Phone number to be blacklisted + /// ApiResponse of Object(void) + ApiResponse AddToBlacklistWithHttpInfo (NumberToBlacklist numberToBlacklist); + /// + /// Deletes a phone number from the blacklist. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// A phone number + /// + void DeleteFromBlacklist (string phone); + + /// + /// Deletes a phone number from the blacklist. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// A phone number + /// ApiResponse of Object(void) + ApiResponse DeleteFromBlacklistWithHttpInfo (string phone); + /// + /// Returns all blacklisted phone numbers. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// FetchBlacklistSuccess + FetchBlacklistSuccess FetchBlacklist (); + + /// + /// Returns all blacklisted phone numbers. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ApiResponse of FetchBlacklistSuccess + ApiResponse FetchBlacklistWithHttpInfo (); + /// + /// Checks if a phone number is blacklisted. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// A phone number + /// + void IsBlacklisted (string phone); + + /// + /// Checks if a phone number is blacklisted. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// A phone number + /// ApiResponse of Object(void) + ApiResponse IsBlacklistedWithHttpInfo (string phone); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Adds a phone number to the blacklist. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Phone number to be blacklisted + /// Task of void + System.Threading.Tasks.Task AddToBlacklistAsync (NumberToBlacklist numberToBlacklist); + + /// + /// Adds a phone number to the blacklist. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Phone number to be blacklisted + /// Task of ApiResponse + System.Threading.Tasks.Task> AddToBlacklistAsyncWithHttpInfo (NumberToBlacklist numberToBlacklist); + /// + /// Deletes a phone number from the blacklist. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// A phone number + /// Task of void + System.Threading.Tasks.Task DeleteFromBlacklistAsync (string phone); + + /// + /// Deletes a phone number from the blacklist. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// A phone number + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteFromBlacklistAsyncWithHttpInfo (string phone); + /// + /// Returns all blacklisted phone numbers. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Task of FetchBlacklistSuccess + System.Threading.Tasks.Task FetchBlacklistAsync (); + + /// + /// Returns all blacklisted phone numbers. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Task of ApiResponse (FetchBlacklistSuccess) + System.Threading.Tasks.Task> FetchBlacklistAsyncWithHttpInfo (); + /// + /// Checks if a phone number is blacklisted. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// A phone number + /// Task of void + System.Threading.Tasks.Task IsBlacklistedAsync (string phone); + + /// + /// Checks if a phone number is blacklisted. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// A phone number + /// Task of ApiResponse + System.Threading.Tasks.Task> IsBlacklistedAsyncWithHttpInfo (string phone); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class BlacklistApi : IBlacklistApi + { + private com.Messente.Api.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public BlacklistApi(String basePath) + { + this.Configuration = new com.Messente.Api.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = com.Messente.Api.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// + /// + public BlacklistApi() + { + this.Configuration = com.Messente.Api.Client.Configuration.Default; + + ExceptionFactory = com.Messente.Api.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public BlacklistApi(com.Messente.Api.Client.Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = com.Messente.Api.Client.Configuration.Default; + else + this.Configuration = configuration; + + ExceptionFactory = com.Messente.Api.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 com.Messente.Api.Client.Configuration Configuration {get; set;} + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public com.Messente.Api.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); + } + + /// + /// Adds a phone number to the blacklist. + /// + /// Thrown when fails to make API call + /// Phone number to be blacklisted + /// + public void AddToBlacklist (NumberToBlacklist numberToBlacklist) + { + AddToBlacklistWithHttpInfo(numberToBlacklist); + } + + /// + /// Adds a phone number to the blacklist. + /// + /// Thrown when fails to make API call + /// Phone number to be blacklisted + /// ApiResponse of Object(void) + public ApiResponse AddToBlacklistWithHttpInfo (NumberToBlacklist numberToBlacklist) + { + // verify the required parameter 'numberToBlacklist' is set + if (numberToBlacklist == null) + throw new ApiException(400, "Missing required parameter 'numberToBlacklist' when calling BlacklistApi->AddToBlacklist"); + + var localVarPath = "./phonebook/blacklist"; + 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 (numberToBlacklist != null && numberToBlacklist.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(numberToBlacklist); // http body (model) parameter + } + else + { + localVarPostBody = numberToBlacklist; // byte array + } + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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("AddToBlacklist", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + null); + } + + /// + /// Adds a phone number to the blacklist. + /// + /// Thrown when fails to make API call + /// Phone number to be blacklisted + /// Task of void + public async System.Threading.Tasks.Task AddToBlacklistAsync (NumberToBlacklist numberToBlacklist) + { + await AddToBlacklistAsyncWithHttpInfo(numberToBlacklist); + + } + + /// + /// Adds a phone number to the blacklist. + /// + /// Thrown when fails to make API call + /// Phone number to be blacklisted + /// Task of ApiResponse + public async System.Threading.Tasks.Task> AddToBlacklistAsyncWithHttpInfo (NumberToBlacklist numberToBlacklist) + { + // verify the required parameter 'numberToBlacklist' is set + if (numberToBlacklist == null) + throw new ApiException(400, "Missing required parameter 'numberToBlacklist' when calling BlacklistApi->AddToBlacklist"); + + var localVarPath = "./phonebook/blacklist"; + 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 (numberToBlacklist != null && numberToBlacklist.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(numberToBlacklist); // http body (model) parameter + } + else + { + localVarPostBody = numberToBlacklist; // byte array + } + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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("AddToBlacklist", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + null); + } + + /// + /// Deletes a phone number from the blacklist. + /// + /// Thrown when fails to make API call + /// A phone number + /// + public void DeleteFromBlacklist (string phone) + { + DeleteFromBlacklistWithHttpInfo(phone); + } + + /// + /// Deletes a phone number from the blacklist. + /// + /// Thrown when fails to make API call + /// A phone number + /// ApiResponse of Object(void) + public ApiResponse DeleteFromBlacklistWithHttpInfo (string phone) + { + // verify the required parameter 'phone' is set + if (phone == null) + throw new ApiException(400, "Missing required parameter 'phone' when calling BlacklistApi->DeleteFromBlacklist"); + + var localVarPath = "./blacklist/{phone}"; + 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[] { + }; + 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 (phone != null) localVarPathParams.Add("phone", this.Configuration.ApiClient.ParameterToString(phone)); // path parameter + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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("DeleteFromBlacklist", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + null); + } + + /// + /// Deletes a phone number from the blacklist. + /// + /// Thrown when fails to make API call + /// A phone number + /// Task of void + public async System.Threading.Tasks.Task DeleteFromBlacklistAsync (string phone) + { + await DeleteFromBlacklistAsyncWithHttpInfo(phone); + + } + + /// + /// Deletes a phone number from the blacklist. + /// + /// Thrown when fails to make API call + /// A phone number + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteFromBlacklistAsyncWithHttpInfo (string phone) + { + // verify the required parameter 'phone' is set + if (phone == null) + throw new ApiException(400, "Missing required parameter 'phone' when calling BlacklistApi->DeleteFromBlacklist"); + + var localVarPath = "./blacklist/{phone}"; + 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[] { + }; + 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 (phone != null) localVarPathParams.Add("phone", this.Configuration.ApiClient.ParameterToString(phone)); // path parameter + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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("DeleteFromBlacklist", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + null); + } + + /// + /// Returns all blacklisted phone numbers. + /// + /// Thrown when fails to make API call + /// FetchBlacklistSuccess + public FetchBlacklistSuccess FetchBlacklist () + { + ApiResponse localVarResponse = FetchBlacklistWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Returns all blacklisted phone numbers. + /// + /// Thrown when fails to make API call + /// ApiResponse of FetchBlacklistSuccess + public ApiResponse< FetchBlacklistSuccess > FetchBlacklistWithHttpInfo () + { + + var localVarPath = "./phonebook/blacklist"; + 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[] { + }; + 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 (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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("FetchBlacklist", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + (FetchBlacklistSuccess) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(FetchBlacklistSuccess))); + } + + /// + /// Returns all blacklisted phone numbers. + /// + /// Thrown when fails to make API call + /// Task of FetchBlacklistSuccess + public async System.Threading.Tasks.Task FetchBlacklistAsync () + { + ApiResponse localVarResponse = await FetchBlacklistAsyncWithHttpInfo(); + return localVarResponse.Data; + + } + + /// + /// Returns all blacklisted phone numbers. + /// + /// Thrown when fails to make API call + /// Task of ApiResponse (FetchBlacklistSuccess) + public async System.Threading.Tasks.Task> FetchBlacklistAsyncWithHttpInfo () + { + + var localVarPath = "./phonebook/blacklist"; + 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[] { + }; + 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 (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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("FetchBlacklist", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + (FetchBlacklistSuccess) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(FetchBlacklistSuccess))); + } + + /// + /// Checks if a phone number is blacklisted. + /// + /// Thrown when fails to make API call + /// A phone number + /// + public void IsBlacklisted (string phone) + { + IsBlacklistedWithHttpInfo(phone); + } + + /// + /// Checks if a phone number is blacklisted. + /// + /// Thrown when fails to make API call + /// A phone number + /// ApiResponse of Object(void) + public ApiResponse IsBlacklistedWithHttpInfo (string phone) + { + // verify the required parameter 'phone' is set + if (phone == null) + throw new ApiException(400, "Missing required parameter 'phone' when calling BlacklistApi->IsBlacklisted"); + + var localVarPath = "./blacklist/{phone}"; + 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[] { + }; + 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 (phone != null) localVarPathParams.Add("phone", this.Configuration.ApiClient.ParameterToString(phone)); // path parameter + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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("IsBlacklisted", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + null); + } + + /// + /// Checks if a phone number is blacklisted. + /// + /// Thrown when fails to make API call + /// A phone number + /// Task of void + public async System.Threading.Tasks.Task IsBlacklistedAsync (string phone) + { + await IsBlacklistedAsyncWithHttpInfo(phone); + + } + + /// + /// Checks if a phone number is blacklisted. + /// + /// Thrown when fails to make API call + /// A phone number + /// Task of ApiResponse + public async System.Threading.Tasks.Task> IsBlacklistedAsyncWithHttpInfo (string phone) + { + // verify the required parameter 'phone' is set + if (phone == null) + throw new ApiException(400, "Missing required parameter 'phone' when calling BlacklistApi->IsBlacklisted"); + + var localVarPath = "./blacklist/{phone}"; + 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[] { + }; + 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 (phone != null) localVarPathParams.Add("phone", this.Configuration.ApiClient.ParameterToString(phone)); // path parameter + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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("IsBlacklisted", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + null); + } + + } +} diff --git a/src/com.Messente.Api/Api/ContactsApi.cs b/src/com.Messente.Api/Api/ContactsApi.cs new file mode 100644 index 0000000..e9eb14e --- /dev/null +++ b/src/com.Messente.Api/Api/ContactsApi.cs @@ -0,0 +1,1707 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using RestSharp.Portable; +using com.Messente.Api.Client; +using com.Messente.Api.Model; + +namespace com.Messente.Api.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IContactsApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Adds a contact to a group. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// A phone number + /// Object + Object AddContactToGroup (string groupId, string phone); + + /// + /// Adds a contact to a group. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// A phone number + /// ApiResponse of Object + ApiResponse AddContactToGroupWithHttpInfo (string groupId, string phone); + /// + /// Creates a new contact. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// ContactEnvelope + ContactEnvelope CreateContact (ContactFields contactFields); + + /// + /// Creates a new contact. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of ContactEnvelope + ApiResponse CreateContactWithHttpInfo (ContactFields contactFields); + /// + /// Deletes a contact. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// A phone number + /// + void DeleteContact (string phone); + + /// + /// Deletes a contact. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// A phone number + /// ApiResponse of Object(void) + ApiResponse DeleteContactWithHttpInfo (string phone); + /// + /// Lists a contact. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// A phone number + /// ContactEnvelope + ContactEnvelope FetchContact (string phone); + + /// + /// Lists a contact. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// A phone number + /// ApiResponse of ContactEnvelope + ApiResponse FetchContactWithHttpInfo (string phone); + /// + /// Lists groups of a contact. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// A phone number + /// GroupListEnvelope + GroupListEnvelope FetchContactGroups (string phone); + + /// + /// Lists groups of a contact. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// A phone number + /// ApiResponse of GroupListEnvelope + ApiResponse FetchContactGroupsWithHttpInfo (string phone); + /// + /// Returns all contacts. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Group id string in uuid format. (optional) + /// ContactListEnvelope + ContactListEnvelope FetchContacts (List groupIds = null); + + /// + /// Returns all contacts. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Group id string in uuid format. (optional) + /// ApiResponse of ContactListEnvelope + ApiResponse FetchContactsWithHttpInfo (List groupIds = null); + /// + /// Remove a contact from a group. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// A phone number + /// + void RemoveContactFromGroup (string groupId, string phone); + + /// + /// Remove a contact from a group. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// A phone number + /// ApiResponse of Object(void) + ApiResponse RemoveContactFromGroupWithHttpInfo (string groupId, string phone); + /// + /// Updates a contact. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// A phone number + /// + /// ContactEnvelope + ContactEnvelope UpdateContact (string phone, ContactUpdateFields contactUpdateFields); + + /// + /// Updates a contact. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// A phone number + /// + /// ApiResponse of ContactEnvelope + ApiResponse UpdateContactWithHttpInfo (string phone, ContactUpdateFields contactUpdateFields); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Adds a contact to a group. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// A phone number + /// Task of Object + System.Threading.Tasks.Task AddContactToGroupAsync (string groupId, string phone); + + /// + /// Adds a contact to a group. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// A phone number + /// Task of ApiResponse (Object) + System.Threading.Tasks.Task> AddContactToGroupAsyncWithHttpInfo (string groupId, string phone); + /// + /// Creates a new contact. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Task of ContactEnvelope + System.Threading.Tasks.Task CreateContactAsync (ContactFields contactFields); + + /// + /// Creates a new contact. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Task of ApiResponse (ContactEnvelope) + System.Threading.Tasks.Task> CreateContactAsyncWithHttpInfo (ContactFields contactFields); + /// + /// Deletes a contact. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// A phone number + /// Task of void + System.Threading.Tasks.Task DeleteContactAsync (string phone); + + /// + /// Deletes a contact. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// A phone number + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteContactAsyncWithHttpInfo (string phone); + /// + /// Lists a contact. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// A phone number + /// Task of ContactEnvelope + System.Threading.Tasks.Task FetchContactAsync (string phone); + + /// + /// Lists a contact. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// A phone number + /// Task of ApiResponse (ContactEnvelope) + System.Threading.Tasks.Task> FetchContactAsyncWithHttpInfo (string phone); + /// + /// Lists groups of a contact. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// A phone number + /// Task of GroupListEnvelope + System.Threading.Tasks.Task FetchContactGroupsAsync (string phone); + + /// + /// Lists groups of a contact. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// A phone number + /// Task of ApiResponse (GroupListEnvelope) + System.Threading.Tasks.Task> FetchContactGroupsAsyncWithHttpInfo (string phone); + /// + /// Returns all contacts. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Group id string in uuid format. (optional) + /// Task of ContactListEnvelope + System.Threading.Tasks.Task FetchContactsAsync (List groupIds = null); + + /// + /// Returns all contacts. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Group id string in uuid format. (optional) + /// Task of ApiResponse (ContactListEnvelope) + System.Threading.Tasks.Task> FetchContactsAsyncWithHttpInfo (List groupIds = null); + /// + /// Remove a contact from a group. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// A phone number + /// Task of void + System.Threading.Tasks.Task RemoveContactFromGroupAsync (string groupId, string phone); + + /// + /// Remove a contact from a group. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// A phone number + /// Task of ApiResponse + System.Threading.Tasks.Task> RemoveContactFromGroupAsyncWithHttpInfo (string groupId, string phone); + /// + /// Updates a contact. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// A phone number + /// + /// Task of ContactEnvelope + System.Threading.Tasks.Task UpdateContactAsync (string phone, ContactUpdateFields contactUpdateFields); + + /// + /// Updates a contact. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// A phone number + /// + /// Task of ApiResponse (ContactEnvelope) + System.Threading.Tasks.Task> UpdateContactAsyncWithHttpInfo (string phone, ContactUpdateFields contactUpdateFields); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class ContactsApi : IContactsApi + { + private com.Messente.Api.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public ContactsApi(String basePath) + { + this.Configuration = new com.Messente.Api.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = com.Messente.Api.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// + /// + public ContactsApi() + { + this.Configuration = com.Messente.Api.Client.Configuration.Default; + + ExceptionFactory = com.Messente.Api.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public ContactsApi(com.Messente.Api.Client.Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = com.Messente.Api.Client.Configuration.Default; + else + this.Configuration = configuration; + + ExceptionFactory = com.Messente.Api.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 com.Messente.Api.Client.Configuration Configuration {get; set;} + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public com.Messente.Api.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); + } + + /// + /// Adds a contact to a group. + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// A phone number + /// Object + public Object AddContactToGroup (string groupId, string phone) + { + ApiResponse localVarResponse = AddContactToGroupWithHttpInfo(groupId, phone); + return localVarResponse.Data; + } + + /// + /// Adds a contact to a group. + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// A phone number + /// ApiResponse of Object + public ApiResponse< Object > AddContactToGroupWithHttpInfo (string groupId, string phone) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new ApiException(400, "Missing required parameter 'groupId' when calling ContactsApi->AddContactToGroup"); + // verify the required parameter 'phone' is set + if (phone == null) + throw new ApiException(400, "Missing required parameter 'phone' when calling ContactsApi->AddContactToGroup"); + + var localVarPath = "./groups/{groupId}/contacts/{phone}"; + 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[] { + }; + 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 (groupId != null) localVarPathParams.Add("groupId", this.Configuration.ApiClient.ParameterToString(groupId)); // path parameter + if (phone != null) localVarPathParams.Add("phone", this.Configuration.ApiClient.ParameterToString(phone)); // path parameter + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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("AddContactToGroup", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + (Object) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + } + + /// + /// Adds a contact to a group. + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// A phone number + /// Task of Object + public async System.Threading.Tasks.Task AddContactToGroupAsync (string groupId, string phone) + { + ApiResponse localVarResponse = await AddContactToGroupAsyncWithHttpInfo(groupId, phone); + return localVarResponse.Data; + + } + + /// + /// Adds a contact to a group. + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// A phone number + /// Task of ApiResponse (Object) + public async System.Threading.Tasks.Task> AddContactToGroupAsyncWithHttpInfo (string groupId, string phone) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new ApiException(400, "Missing required parameter 'groupId' when calling ContactsApi->AddContactToGroup"); + // verify the required parameter 'phone' is set + if (phone == null) + throw new ApiException(400, "Missing required parameter 'phone' when calling ContactsApi->AddContactToGroup"); + + var localVarPath = "./groups/{groupId}/contacts/{phone}"; + 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[] { + }; + 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 (groupId != null) localVarPathParams.Add("groupId", this.Configuration.ApiClient.ParameterToString(groupId)); // path parameter + if (phone != null) localVarPathParams.Add("phone", this.Configuration.ApiClient.ParameterToString(phone)); // path parameter + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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("AddContactToGroup", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + (Object) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); + } + + /// + /// Creates a new contact. + /// + /// Thrown when fails to make API call + /// + /// ContactEnvelope + public ContactEnvelope CreateContact (ContactFields contactFields) + { + ApiResponse localVarResponse = CreateContactWithHttpInfo(contactFields); + return localVarResponse.Data; + } + + /// + /// Creates a new contact. + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of ContactEnvelope + public ApiResponse< ContactEnvelope > CreateContactWithHttpInfo (ContactFields contactFields) + { + // verify the required parameter 'contactFields' is set + if (contactFields == null) + throw new ApiException(400, "Missing required parameter 'contactFields' 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 (contactFields != null && contactFields.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(contactFields); // http body (model) parameter + } + else + { + localVarPostBody = contactFields; // byte array + } + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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.Key, x => string.Join(",", x.Value)), + (ContactEnvelope) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ContactEnvelope))); + } + + /// + /// Creates a new contact. + /// + /// Thrown when fails to make API call + /// + /// Task of ContactEnvelope + public async System.Threading.Tasks.Task CreateContactAsync (ContactFields contactFields) + { + ApiResponse localVarResponse = await CreateContactAsyncWithHttpInfo(contactFields); + return localVarResponse.Data; + + } + + /// + /// Creates a new contact. + /// + /// Thrown when fails to make API call + /// + /// Task of ApiResponse (ContactEnvelope) + public async System.Threading.Tasks.Task> CreateContactAsyncWithHttpInfo (ContactFields contactFields) + { + // verify the required parameter 'contactFields' is set + if (contactFields == null) + throw new ApiException(400, "Missing required parameter 'contactFields' 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 (contactFields != null && contactFields.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(contactFields); // http body (model) parameter + } + else + { + localVarPostBody = contactFields; // byte array + } + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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.Key, x => string.Join(",", x.Value)), + (ContactEnvelope) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ContactEnvelope))); + } + + /// + /// Deletes a contact. + /// + /// Thrown when fails to make API call + /// A phone number + /// + public void DeleteContact (string phone) + { + DeleteContactWithHttpInfo(phone); + } + + /// + /// Deletes a contact. + /// + /// Thrown when fails to make API call + /// A phone number + /// ApiResponse of Object(void) + public ApiResponse DeleteContactWithHttpInfo (string phone) + { + // verify the required parameter 'phone' is set + if (phone == null) + throw new ApiException(400, "Missing required parameter 'phone' when calling ContactsApi->DeleteContact"); + + var localVarPath = "./contacts/{phone}"; + 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[] { + }; + 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 (phone != null) localVarPathParams.Add("phone", this.Configuration.ApiClient.ParameterToString(phone)); // path parameter + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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.Key, x => string.Join(",", x.Value)), + null); + } + + /// + /// Deletes a contact. + /// + /// Thrown when fails to make API call + /// A phone number + /// Task of void + public async System.Threading.Tasks.Task DeleteContactAsync (string phone) + { + await DeleteContactAsyncWithHttpInfo(phone); + + } + + /// + /// Deletes a contact. + /// + /// Thrown when fails to make API call + /// A phone number + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteContactAsyncWithHttpInfo (string phone) + { + // verify the required parameter 'phone' is set + if (phone == null) + throw new ApiException(400, "Missing required parameter 'phone' when calling ContactsApi->DeleteContact"); + + var localVarPath = "./contacts/{phone}"; + 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[] { + }; + 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 (phone != null) localVarPathParams.Add("phone", this.Configuration.ApiClient.ParameterToString(phone)); // path parameter + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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.Key, x => string.Join(",", x.Value)), + null); + } + + /// + /// Lists a contact. + /// + /// Thrown when fails to make API call + /// A phone number + /// ContactEnvelope + public ContactEnvelope FetchContact (string phone) + { + ApiResponse localVarResponse = FetchContactWithHttpInfo(phone); + return localVarResponse.Data; + } + + /// + /// Lists a contact. + /// + /// Thrown when fails to make API call + /// A phone number + /// ApiResponse of ContactEnvelope + public ApiResponse< ContactEnvelope > FetchContactWithHttpInfo (string phone) + { + // verify the required parameter 'phone' is set + if (phone == null) + throw new ApiException(400, "Missing required parameter 'phone' when calling ContactsApi->FetchContact"); + + var localVarPath = "./contacts/{phone}"; + 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[] { + }; + 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 (phone != null) localVarPathParams.Add("phone", this.Configuration.ApiClient.ParameterToString(phone)); // path parameter + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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("FetchContact", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + (ContactEnvelope) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ContactEnvelope))); + } + + /// + /// Lists a contact. + /// + /// Thrown when fails to make API call + /// A phone number + /// Task of ContactEnvelope + public async System.Threading.Tasks.Task FetchContactAsync (string phone) + { + ApiResponse localVarResponse = await FetchContactAsyncWithHttpInfo(phone); + return localVarResponse.Data; + + } + + /// + /// Lists a contact. + /// + /// Thrown when fails to make API call + /// A phone number + /// Task of ApiResponse (ContactEnvelope) + public async System.Threading.Tasks.Task> FetchContactAsyncWithHttpInfo (string phone) + { + // verify the required parameter 'phone' is set + if (phone == null) + throw new ApiException(400, "Missing required parameter 'phone' when calling ContactsApi->FetchContact"); + + var localVarPath = "./contacts/{phone}"; + 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[] { + }; + 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 (phone != null) localVarPathParams.Add("phone", this.Configuration.ApiClient.ParameterToString(phone)); // path parameter + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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("FetchContact", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + (ContactEnvelope) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ContactEnvelope))); + } + + /// + /// Lists groups of a contact. + /// + /// Thrown when fails to make API call + /// A phone number + /// GroupListEnvelope + public GroupListEnvelope FetchContactGroups (string phone) + { + ApiResponse localVarResponse = FetchContactGroupsWithHttpInfo(phone); + return localVarResponse.Data; + } + + /// + /// Lists groups of a contact. + /// + /// Thrown when fails to make API call + /// A phone number + /// ApiResponse of GroupListEnvelope + public ApiResponse< GroupListEnvelope > FetchContactGroupsWithHttpInfo (string phone) + { + // verify the required parameter 'phone' is set + if (phone == null) + throw new ApiException(400, "Missing required parameter 'phone' when calling ContactsApi->FetchContactGroups"); + + var localVarPath = "./contacts/{phone}/groups"; + 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[] { + }; + 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 (phone != null) localVarPathParams.Add("phone", this.Configuration.ApiClient.ParameterToString(phone)); // path parameter + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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("FetchContactGroups", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + (GroupListEnvelope) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GroupListEnvelope))); + } + + /// + /// Lists groups of a contact. + /// + /// Thrown when fails to make API call + /// A phone number + /// Task of GroupListEnvelope + public async System.Threading.Tasks.Task FetchContactGroupsAsync (string phone) + { + ApiResponse localVarResponse = await FetchContactGroupsAsyncWithHttpInfo(phone); + return localVarResponse.Data; + + } + + /// + /// Lists groups of a contact. + /// + /// Thrown when fails to make API call + /// A phone number + /// Task of ApiResponse (GroupListEnvelope) + public async System.Threading.Tasks.Task> FetchContactGroupsAsyncWithHttpInfo (string phone) + { + // verify the required parameter 'phone' is set + if (phone == null) + throw new ApiException(400, "Missing required parameter 'phone' when calling ContactsApi->FetchContactGroups"); + + var localVarPath = "./contacts/{phone}/groups"; + 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[] { + }; + 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 (phone != null) localVarPathParams.Add("phone", this.Configuration.ApiClient.ParameterToString(phone)); // path parameter + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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("FetchContactGroups", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + (GroupListEnvelope) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GroupListEnvelope))); + } + + /// + /// Returns all contacts. + /// + /// Thrown when fails to make API call + /// Group id string in uuid format. (optional) + /// ContactListEnvelope + public ContactListEnvelope FetchContacts (List groupIds = null) + { + ApiResponse localVarResponse = FetchContactsWithHttpInfo(groupIds); + return localVarResponse.Data; + } + + /// + /// Returns all contacts. + /// + /// Thrown when fails to make API call + /// Group id string in uuid format. (optional) + /// ApiResponse of ContactListEnvelope + public ApiResponse< ContactListEnvelope > FetchContactsWithHttpInfo (List groupIds = 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[] { + }; + 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 (groupIds != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "groupIds", groupIds)); // query parameter + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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("FetchContacts", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + (ContactListEnvelope) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ContactListEnvelope))); + } + + /// + /// Returns all contacts. + /// + /// Thrown when fails to make API call + /// Group id string in uuid format. (optional) + /// Task of ContactListEnvelope + public async System.Threading.Tasks.Task FetchContactsAsync (List groupIds = null) + { + ApiResponse localVarResponse = await FetchContactsAsyncWithHttpInfo(groupIds); + return localVarResponse.Data; + + } + + /// + /// Returns all contacts. + /// + /// Thrown when fails to make API call + /// Group id string in uuid format. (optional) + /// Task of ApiResponse (ContactListEnvelope) + public async System.Threading.Tasks.Task> FetchContactsAsyncWithHttpInfo (List groupIds = 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[] { + }; + 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 (groupIds != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "groupIds", groupIds)); // query parameter + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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("FetchContacts", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + (ContactListEnvelope) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ContactListEnvelope))); + } + + /// + /// Remove a contact from a group. + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// A phone number + /// + public void RemoveContactFromGroup (string groupId, string phone) + { + RemoveContactFromGroupWithHttpInfo(groupId, phone); + } + + /// + /// Remove a contact from a group. + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// A phone number + /// ApiResponse of Object(void) + public ApiResponse RemoveContactFromGroupWithHttpInfo (string groupId, string phone) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new ApiException(400, "Missing required parameter 'groupId' when calling ContactsApi->RemoveContactFromGroup"); + // verify the required parameter 'phone' is set + if (phone == null) + throw new ApiException(400, "Missing required parameter 'phone' when calling ContactsApi->RemoveContactFromGroup"); + + var localVarPath = "./groups/{groupId}/contacts/{phone}"; + 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[] { + }; + 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 (groupId != null) localVarPathParams.Add("groupId", this.Configuration.ApiClient.ParameterToString(groupId)); // path parameter + if (phone != null) localVarPathParams.Add("phone", this.Configuration.ApiClient.ParameterToString(phone)); // path parameter + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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("RemoveContactFromGroup", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + null); + } + + /// + /// Remove a contact from a group. + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// A phone number + /// Task of void + public async System.Threading.Tasks.Task RemoveContactFromGroupAsync (string groupId, string phone) + { + await RemoveContactFromGroupAsyncWithHttpInfo(groupId, phone); + + } + + /// + /// Remove a contact from a group. + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// A phone number + /// Task of ApiResponse + public async System.Threading.Tasks.Task> RemoveContactFromGroupAsyncWithHttpInfo (string groupId, string phone) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new ApiException(400, "Missing required parameter 'groupId' when calling ContactsApi->RemoveContactFromGroup"); + // verify the required parameter 'phone' is set + if (phone == null) + throw new ApiException(400, "Missing required parameter 'phone' when calling ContactsApi->RemoveContactFromGroup"); + + var localVarPath = "./groups/{groupId}/contacts/{phone}"; + 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[] { + }; + 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 (groupId != null) localVarPathParams.Add("groupId", this.Configuration.ApiClient.ParameterToString(groupId)); // path parameter + if (phone != null) localVarPathParams.Add("phone", this.Configuration.ApiClient.ParameterToString(phone)); // path parameter + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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("RemoveContactFromGroup", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + null); + } + + /// + /// Updates a contact. + /// + /// Thrown when fails to make API call + /// A phone number + /// + /// ContactEnvelope + public ContactEnvelope UpdateContact (string phone, ContactUpdateFields contactUpdateFields) + { + ApiResponse localVarResponse = UpdateContactWithHttpInfo(phone, contactUpdateFields); + return localVarResponse.Data; + } + + /// + /// Updates a contact. + /// + /// Thrown when fails to make API call + /// A phone number + /// + /// ApiResponse of ContactEnvelope + public ApiResponse< ContactEnvelope > UpdateContactWithHttpInfo (string phone, ContactUpdateFields contactUpdateFields) + { + // verify the required parameter 'phone' is set + if (phone == null) + throw new ApiException(400, "Missing required parameter 'phone' when calling ContactsApi->UpdateContact"); + // verify the required parameter 'contactUpdateFields' is set + if (contactUpdateFields == null) + throw new ApiException(400, "Missing required parameter 'contactUpdateFields' when calling ContactsApi->UpdateContact"); + + var localVarPath = "./contacts/{phone}"; + 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 (phone != null) localVarPathParams.Add("phone", this.Configuration.ApiClient.ParameterToString(phone)); // path parameter + if (contactUpdateFields != null && contactUpdateFields.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(contactUpdateFields); // http body (model) parameter + } + else + { + localVarPostBody = contactUpdateFields; // byte array + } + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PATCH, 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.Key, x => string.Join(",", x.Value)), + (ContactEnvelope) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ContactEnvelope))); + } + + /// + /// Updates a contact. + /// + /// Thrown when fails to make API call + /// A phone number + /// + /// Task of ContactEnvelope + public async System.Threading.Tasks.Task UpdateContactAsync (string phone, ContactUpdateFields contactUpdateFields) + { + ApiResponse localVarResponse = await UpdateContactAsyncWithHttpInfo(phone, contactUpdateFields); + return localVarResponse.Data; + + } + + /// + /// Updates a contact. + /// + /// Thrown when fails to make API call + /// A phone number + /// + /// Task of ApiResponse (ContactEnvelope) + public async System.Threading.Tasks.Task> UpdateContactAsyncWithHttpInfo (string phone, ContactUpdateFields contactUpdateFields) + { + // verify the required parameter 'phone' is set + if (phone == null) + throw new ApiException(400, "Missing required parameter 'phone' when calling ContactsApi->UpdateContact"); + // verify the required parameter 'contactUpdateFields' is set + if (contactUpdateFields == null) + throw new ApiException(400, "Missing required parameter 'contactUpdateFields' when calling ContactsApi->UpdateContact"); + + var localVarPath = "./contacts/{phone}"; + 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 (phone != null) localVarPathParams.Add("phone", this.Configuration.ApiClient.ParameterToString(phone)); // path parameter + if (contactUpdateFields != null && contactUpdateFields.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(contactUpdateFields); // http body (model) parameter + } + else + { + localVarPostBody = contactUpdateFields; // byte array + } + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PATCH, 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.Key, x => string.Join(",", x.Value)), + (ContactEnvelope) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ContactEnvelope))); + } + + } +} diff --git a/src/com.Messente.Api/Api/DeliveryReportApi.cs b/src/com.Messente.Api/Api/DeliveryReportApi.cs new file mode 100644 index 0000000..bd0399c --- /dev/null +++ b/src/com.Messente.Api/Api/DeliveryReportApi.cs @@ -0,0 +1,328 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using RestSharp.Portable; +using com.Messente.Api.Client; +using com.Messente.Api.Model; + +namespace com.Messente.Api.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IDeliveryReportApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Retrieves the delivery report for the Omnimessage + /// + /// + /// + /// + /// Thrown when fails to make API call + /// UUID of the Omnimessage to for which the delivery report is to be retrieved + /// DeliveryReportResponse + DeliveryReportResponse RetrieveDeliveryReport (Guid? omnimessageId); + + /// + /// Retrieves the delivery report for the Omnimessage + /// + /// + /// + /// + /// Thrown when fails to make API call + /// UUID of the Omnimessage to for which the delivery report is to be retrieved + /// ApiResponse of DeliveryReportResponse + ApiResponse RetrieveDeliveryReportWithHttpInfo (Guid? omnimessageId); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Retrieves the delivery report for the Omnimessage + /// + /// + /// + /// + /// Thrown when fails to make API call + /// UUID of the Omnimessage to for which the delivery report is to be retrieved + /// Task of DeliveryReportResponse + System.Threading.Tasks.Task RetrieveDeliveryReportAsync (Guid? omnimessageId); + + /// + /// Retrieves the delivery report for the Omnimessage + /// + /// + /// + /// + /// Thrown when fails to make API call + /// UUID of the Omnimessage to for which the delivery report is to be retrieved + /// Task of ApiResponse (DeliveryReportResponse) + System.Threading.Tasks.Task> RetrieveDeliveryReportAsyncWithHttpInfo (Guid? omnimessageId); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class DeliveryReportApi : IDeliveryReportApi + { + private com.Messente.Api.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public DeliveryReportApi(String basePath) + { + this.Configuration = new com.Messente.Api.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = com.Messente.Api.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// + /// + public DeliveryReportApi() + { + this.Configuration = com.Messente.Api.Client.Configuration.Default; + + ExceptionFactory = com.Messente.Api.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public DeliveryReportApi(com.Messente.Api.Client.Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = com.Messente.Api.Client.Configuration.Default; + else + this.Configuration = configuration; + + ExceptionFactory = com.Messente.Api.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 com.Messente.Api.Client.Configuration Configuration {get; set;} + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public com.Messente.Api.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); + } + + /// + /// Retrieves the delivery report for the Omnimessage + /// + /// Thrown when fails to make API call + /// UUID of the Omnimessage to for which the delivery report is to be retrieved + /// DeliveryReportResponse + public DeliveryReportResponse RetrieveDeliveryReport (Guid? omnimessageId) + { + ApiResponse localVarResponse = RetrieveDeliveryReportWithHttpInfo(omnimessageId); + return localVarResponse.Data; + } + + /// + /// Retrieves the delivery report for the Omnimessage + /// + /// Thrown when fails to make API call + /// UUID of the Omnimessage to for which the delivery report is to be retrieved + /// ApiResponse of DeliveryReportResponse + public ApiResponse< DeliveryReportResponse > RetrieveDeliveryReportWithHttpInfo (Guid? omnimessageId) + { + // verify the required parameter 'omnimessageId' is set + if (omnimessageId == null) + throw new ApiException(400, "Missing required parameter 'omnimessageId' when calling DeliveryReportApi->RetrieveDeliveryReport"); + + var localVarPath = "./omnimessage/{omnimessageId}/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[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "*/*" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (omnimessageId != null) localVarPathParams.Add("omnimessageId", this.Configuration.ApiClient.ParameterToString(omnimessageId)); // path parameter + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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("RetrieveDeliveryReport", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + (DeliveryReportResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(DeliveryReportResponse))); + } + + /// + /// Retrieves the delivery report for the Omnimessage + /// + /// Thrown when fails to make API call + /// UUID of the Omnimessage to for which the delivery report is to be retrieved + /// Task of DeliveryReportResponse + public async System.Threading.Tasks.Task RetrieveDeliveryReportAsync (Guid? omnimessageId) + { + ApiResponse localVarResponse = await RetrieveDeliveryReportAsyncWithHttpInfo(omnimessageId); + return localVarResponse.Data; + + } + + /// + /// Retrieves the delivery report for the Omnimessage + /// + /// Thrown when fails to make API call + /// UUID of the Omnimessage to for which the delivery report is to be retrieved + /// Task of ApiResponse (DeliveryReportResponse) + public async System.Threading.Tasks.Task> RetrieveDeliveryReportAsyncWithHttpInfo (Guid? omnimessageId) + { + // verify the required parameter 'omnimessageId' is set + if (omnimessageId == null) + throw new ApiException(400, "Missing required parameter 'omnimessageId' when calling DeliveryReportApi->RetrieveDeliveryReport"); + + var localVarPath = "./omnimessage/{omnimessageId}/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[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "*/*" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (omnimessageId != null) localVarPathParams.Add("omnimessageId", this.Configuration.ApiClient.ParameterToString(omnimessageId)); // path parameter + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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("RetrieveDeliveryReport", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + (DeliveryReportResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(DeliveryReportResponse))); + } + + } +} diff --git a/src/com.Messente.Api/Api/GroupsApi.cs b/src/com.Messente.Api/Api/GroupsApi.cs new file mode 100644 index 0000000..edf1d53 --- /dev/null +++ b/src/com.Messente.Api/Api/GroupsApi.cs @@ -0,0 +1,1106 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using RestSharp.Portable; +using com.Messente.Api.Client; +using com.Messente.Api.Model; + +namespace com.Messente.Api.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IGroupsApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Creates a new group with the provided name. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// GroupEnvelope + GroupEnvelope CreateGroup (GroupName groupName); + + /// + /// Creates a new group with the provided name. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of GroupEnvelope + ApiResponse CreateGroupWithHttpInfo (GroupName groupName); + /// + /// Deletes a group. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// + void DeleteGroup (string groupId); + + /// + /// Deletes a group. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// ApiResponse of Object(void) + ApiResponse DeleteGroupWithHttpInfo (string groupId); + /// + /// Lists a group. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// GroupEnvelope + GroupEnvelope FetchGroup (string groupId); + + /// + /// Lists a group. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// ApiResponse of GroupEnvelope + ApiResponse FetchGroupWithHttpInfo (string groupId); + /// + /// Returns all groups. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// GroupListEnvelope + GroupListEnvelope FetchGroups (); + + /// + /// Returns all groups. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ApiResponse of GroupListEnvelope + ApiResponse FetchGroupsWithHttpInfo (); + /// + /// Updates a group with the provided name. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// + /// GroupEnvelope + GroupEnvelope UpdateGroup (string groupId, GroupName groupName); + + /// + /// Updates a group with the provided name. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// + /// ApiResponse of GroupEnvelope + ApiResponse UpdateGroupWithHttpInfo (string groupId, GroupName groupName); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Creates a new group with the provided name. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Task of GroupEnvelope + System.Threading.Tasks.Task CreateGroupAsync (GroupName groupName); + + /// + /// Creates a new group with the provided name. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Task of ApiResponse (GroupEnvelope) + System.Threading.Tasks.Task> CreateGroupAsyncWithHttpInfo (GroupName groupName); + /// + /// Deletes a group. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// Task of void + System.Threading.Tasks.Task DeleteGroupAsync (string groupId); + + /// + /// Deletes a group. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteGroupAsyncWithHttpInfo (string groupId); + /// + /// Lists a group. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// Task of GroupEnvelope + System.Threading.Tasks.Task FetchGroupAsync (string groupId); + + /// + /// Lists a group. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// Task of ApiResponse (GroupEnvelope) + System.Threading.Tasks.Task> FetchGroupAsyncWithHttpInfo (string groupId); + /// + /// Returns all groups. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Task of GroupListEnvelope + System.Threading.Tasks.Task FetchGroupsAsync (); + + /// + /// Returns all groups. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Task of ApiResponse (GroupListEnvelope) + System.Threading.Tasks.Task> FetchGroupsAsyncWithHttpInfo (); + /// + /// Updates a group with the provided name. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// + /// Task of GroupEnvelope + System.Threading.Tasks.Task UpdateGroupAsync (string groupId, GroupName groupName); + + /// + /// Updates a group with the provided name. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// + /// Task of ApiResponse (GroupEnvelope) + System.Threading.Tasks.Task> UpdateGroupAsyncWithHttpInfo (string groupId, GroupName groupName); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class GroupsApi : IGroupsApi + { + private com.Messente.Api.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public GroupsApi(String basePath) + { + this.Configuration = new com.Messente.Api.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = com.Messente.Api.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// + /// + public GroupsApi() + { + this.Configuration = com.Messente.Api.Client.Configuration.Default; + + ExceptionFactory = com.Messente.Api.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public GroupsApi(com.Messente.Api.Client.Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = com.Messente.Api.Client.Configuration.Default; + else + this.Configuration = configuration; + + ExceptionFactory = com.Messente.Api.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 com.Messente.Api.Client.Configuration Configuration {get; set;} + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public com.Messente.Api.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 a new group with the provided name. + /// + /// Thrown when fails to make API call + /// + /// GroupEnvelope + public GroupEnvelope CreateGroup (GroupName groupName) + { + ApiResponse localVarResponse = CreateGroupWithHttpInfo(groupName); + return localVarResponse.Data; + } + + /// + /// Creates a new group with the provided name. + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of GroupEnvelope + public ApiResponse< GroupEnvelope > CreateGroupWithHttpInfo (GroupName groupName) + { + // verify the required parameter 'groupName' is set + if (groupName == null) + throw new ApiException(400, "Missing required parameter 'groupName' when calling GroupsApi->CreateGroup"); + + var localVarPath = "./groups"; + 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 (groupName != null && groupName.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(groupName); // http body (model) parameter + } + else + { + localVarPostBody = groupName; // byte array + } + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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("CreateGroup", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + (GroupEnvelope) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GroupEnvelope))); + } + + /// + /// Creates a new group with the provided name. + /// + /// Thrown when fails to make API call + /// + /// Task of GroupEnvelope + public async System.Threading.Tasks.Task CreateGroupAsync (GroupName groupName) + { + ApiResponse localVarResponse = await CreateGroupAsyncWithHttpInfo(groupName); + return localVarResponse.Data; + + } + + /// + /// Creates a new group with the provided name. + /// + /// Thrown when fails to make API call + /// + /// Task of ApiResponse (GroupEnvelope) + public async System.Threading.Tasks.Task> CreateGroupAsyncWithHttpInfo (GroupName groupName) + { + // verify the required parameter 'groupName' is set + if (groupName == null) + throw new ApiException(400, "Missing required parameter 'groupName' when calling GroupsApi->CreateGroup"); + + var localVarPath = "./groups"; + 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 (groupName != null && groupName.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(groupName); // http body (model) parameter + } + else + { + localVarPostBody = groupName; // byte array + } + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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("CreateGroup", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + (GroupEnvelope) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GroupEnvelope))); + } + + /// + /// Deletes a group. + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// + public void DeleteGroup (string groupId) + { + DeleteGroupWithHttpInfo(groupId); + } + + /// + /// Deletes a group. + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// ApiResponse of Object(void) + public ApiResponse DeleteGroupWithHttpInfo (string groupId) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->DeleteGroup"); + + var localVarPath = "./groups/{groupId}"; + 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[] { + }; + 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 (groupId != null) localVarPathParams.Add("groupId", this.Configuration.ApiClient.ParameterToString(groupId)); // path parameter + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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("DeleteGroup", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + null); + } + + /// + /// Deletes a group. + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// Task of void + public async System.Threading.Tasks.Task DeleteGroupAsync (string groupId) + { + await DeleteGroupAsyncWithHttpInfo(groupId); + + } + + /// + /// Deletes a group. + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteGroupAsyncWithHttpInfo (string groupId) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->DeleteGroup"); + + var localVarPath = "./groups/{groupId}"; + 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[] { + }; + 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 (groupId != null) localVarPathParams.Add("groupId", this.Configuration.ApiClient.ParameterToString(groupId)); // path parameter + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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("DeleteGroup", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + null); + } + + /// + /// Lists a group. + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// GroupEnvelope + public GroupEnvelope FetchGroup (string groupId) + { + ApiResponse localVarResponse = FetchGroupWithHttpInfo(groupId); + return localVarResponse.Data; + } + + /// + /// Lists a group. + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// ApiResponse of GroupEnvelope + public ApiResponse< GroupEnvelope > FetchGroupWithHttpInfo (string groupId) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->FetchGroup"); + + var localVarPath = "./groups/{groupId}"; + 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[] { + }; + 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 (groupId != null) localVarPathParams.Add("groupId", this.Configuration.ApiClient.ParameterToString(groupId)); // path parameter + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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("FetchGroup", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + (GroupEnvelope) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GroupEnvelope))); + } + + /// + /// Lists a group. + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// Task of GroupEnvelope + public async System.Threading.Tasks.Task FetchGroupAsync (string groupId) + { + ApiResponse localVarResponse = await FetchGroupAsyncWithHttpInfo(groupId); + return localVarResponse.Data; + + } + + /// + /// Lists a group. + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// Task of ApiResponse (GroupEnvelope) + public async System.Threading.Tasks.Task> FetchGroupAsyncWithHttpInfo (string groupId) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->FetchGroup"); + + var localVarPath = "./groups/{groupId}"; + 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[] { + }; + 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 (groupId != null) localVarPathParams.Add("groupId", this.Configuration.ApiClient.ParameterToString(groupId)); // path parameter + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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("FetchGroup", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + (GroupEnvelope) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GroupEnvelope))); + } + + /// + /// Returns all groups. + /// + /// Thrown when fails to make API call + /// GroupListEnvelope + public GroupListEnvelope FetchGroups () + { + ApiResponse localVarResponse = FetchGroupsWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Returns all groups. + /// + /// Thrown when fails to make API call + /// ApiResponse of GroupListEnvelope + public ApiResponse< GroupListEnvelope > FetchGroupsWithHttpInfo () + { + + var localVarPath = "./groups"; + 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[] { + }; + 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 (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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("FetchGroups", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + (GroupListEnvelope) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GroupListEnvelope))); + } + + /// + /// Returns all groups. + /// + /// Thrown when fails to make API call + /// Task of GroupListEnvelope + public async System.Threading.Tasks.Task FetchGroupsAsync () + { + ApiResponse localVarResponse = await FetchGroupsAsyncWithHttpInfo(); + return localVarResponse.Data; + + } + + /// + /// Returns all groups. + /// + /// Thrown when fails to make API call + /// Task of ApiResponse (GroupListEnvelope) + public async System.Threading.Tasks.Task> FetchGroupsAsyncWithHttpInfo () + { + + var localVarPath = "./groups"; + 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[] { + }; + 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 (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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("FetchGroups", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + (GroupListEnvelope) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GroupListEnvelope))); + } + + /// + /// Updates a group with the provided name. + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// + /// GroupEnvelope + public GroupEnvelope UpdateGroup (string groupId, GroupName groupName) + { + ApiResponse localVarResponse = UpdateGroupWithHttpInfo(groupId, groupName); + return localVarResponse.Data; + } + + /// + /// Updates a group with the provided name. + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// + /// ApiResponse of GroupEnvelope + public ApiResponse< GroupEnvelope > UpdateGroupWithHttpInfo (string groupId, GroupName groupName) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->UpdateGroup"); + // verify the required parameter 'groupName' is set + if (groupName == null) + throw new ApiException(400, "Missing required parameter 'groupName' when calling GroupsApi->UpdateGroup"); + + var localVarPath = "./groups/{groupId}"; + 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 (groupId != null) localVarPathParams.Add("groupId", this.Configuration.ApiClient.ParameterToString(groupId)); // path parameter + if (groupName != null && groupName.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(groupName); // http body (model) parameter + } + else + { + localVarPostBody = groupName; // byte array + } + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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("UpdateGroup", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + (GroupEnvelope) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GroupEnvelope))); + } + + /// + /// Updates a group with the provided name. + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// + /// Task of GroupEnvelope + public async System.Threading.Tasks.Task UpdateGroupAsync (string groupId, GroupName groupName) + { + ApiResponse localVarResponse = await UpdateGroupAsyncWithHttpInfo(groupId, groupName); + return localVarResponse.Data; + + } + + /// + /// Updates a group with the provided name. + /// + /// Thrown when fails to make API call + /// String in uuid format. + /// + /// Task of ApiResponse (GroupEnvelope) + public async System.Threading.Tasks.Task> UpdateGroupAsyncWithHttpInfo (string groupId, GroupName groupName) + { + // verify the required parameter 'groupId' is set + if (groupId == null) + throw new ApiException(400, "Missing required parameter 'groupId' when calling GroupsApi->UpdateGroup"); + // verify the required parameter 'groupName' is set + if (groupName == null) + throw new ApiException(400, "Missing required parameter 'groupName' when calling GroupsApi->UpdateGroup"); + + var localVarPath = "./groups/{groupId}"; + 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 (groupId != null) localVarPathParams.Add("groupId", this.Configuration.ApiClient.ParameterToString(groupId)); // path parameter + if (groupName != null && groupName.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(groupName); // http body (model) parameter + } + else + { + localVarPostBody = groupName; // byte array + } + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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("UpdateGroup", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + (GroupEnvelope) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GroupEnvelope))); + } + + } +} diff --git a/src/com.Messente.Api/Api/OmnimessageApi.cs b/src/com.Messente.Api/Api/OmnimessageApi.cs new file mode 100644 index 0000000..de255c5 --- /dev/null +++ b/src/com.Messente.Api/Api/OmnimessageApi.cs @@ -0,0 +1,529 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using RestSharp.Portable; +using com.Messente.Api.Client; +using com.Messente.Api.Model; + +namespace com.Messente.Api.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IOmnimessageApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Cancels a scheduled Omnimessage. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// UUID of the scheduled Omnimessage to be cancelled + /// + void CancelScheduledMessage (Guid? omnimessageId); + + /// + /// Cancels a scheduled Omnimessage. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// UUID of the scheduled Omnimessage to be cancelled + /// ApiResponse of Object(void) + ApiResponse CancelScheduledMessageWithHttpInfo (Guid? omnimessageId); + /// + /// Sends an Omnimessage. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Omnimessage to be sent + /// OmniMessageCreateSuccessResponse + OmniMessageCreateSuccessResponse SendOmnimessage (Omnimessage omnimessage); + + /// + /// Sends an Omnimessage. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Omnimessage to be sent + /// ApiResponse of OmniMessageCreateSuccessResponse + ApiResponse SendOmnimessageWithHttpInfo (Omnimessage omnimessage); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Cancels a scheduled Omnimessage. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// UUID of the scheduled Omnimessage to be cancelled + /// Task of void + System.Threading.Tasks.Task CancelScheduledMessageAsync (Guid? omnimessageId); + + /// + /// Cancels a scheduled Omnimessage. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// UUID of the scheduled Omnimessage to be cancelled + /// Task of ApiResponse + System.Threading.Tasks.Task> CancelScheduledMessageAsyncWithHttpInfo (Guid? omnimessageId); + /// + /// Sends an Omnimessage. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Omnimessage to be sent + /// Task of OmniMessageCreateSuccessResponse + System.Threading.Tasks.Task SendOmnimessageAsync (Omnimessage omnimessage); + + /// + /// Sends an Omnimessage. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Omnimessage to be sent + /// Task of ApiResponse (OmniMessageCreateSuccessResponse) + System.Threading.Tasks.Task> SendOmnimessageAsyncWithHttpInfo (Omnimessage omnimessage); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class OmnimessageApi : IOmnimessageApi + { + private com.Messente.Api.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public OmnimessageApi(String basePath) + { + this.Configuration = new com.Messente.Api.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = com.Messente.Api.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// + /// + public OmnimessageApi() + { + this.Configuration = com.Messente.Api.Client.Configuration.Default; + + ExceptionFactory = com.Messente.Api.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public OmnimessageApi(com.Messente.Api.Client.Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = com.Messente.Api.Client.Configuration.Default; + else + this.Configuration = configuration; + + ExceptionFactory = com.Messente.Api.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 com.Messente.Api.Client.Configuration Configuration {get; set;} + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public com.Messente.Api.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); + } + + /// + /// Cancels a scheduled Omnimessage. + /// + /// Thrown when fails to make API call + /// UUID of the scheduled Omnimessage to be cancelled + /// + public void CancelScheduledMessage (Guid? omnimessageId) + { + CancelScheduledMessageWithHttpInfo(omnimessageId); + } + + /// + /// Cancels a scheduled Omnimessage. + /// + /// Thrown when fails to make API call + /// UUID of the scheduled Omnimessage to be cancelled + /// ApiResponse of Object(void) + public ApiResponse CancelScheduledMessageWithHttpInfo (Guid? omnimessageId) + { + // verify the required parameter 'omnimessageId' is set + if (omnimessageId == null) + throw new ApiException(400, "Missing required parameter 'omnimessageId' when calling OmnimessageApi->CancelScheduledMessage"); + + var localVarPath = "./omnimessage/{omnimessageId}"; + 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[] { + }; + 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 (omnimessageId != null) localVarPathParams.Add("omnimessageId", this.Configuration.ApiClient.ParameterToString(omnimessageId)); // path parameter + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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("CancelScheduledMessage", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + null); + } + + /// + /// Cancels a scheduled Omnimessage. + /// + /// Thrown when fails to make API call + /// UUID of the scheduled Omnimessage to be cancelled + /// Task of void + public async System.Threading.Tasks.Task CancelScheduledMessageAsync (Guid? omnimessageId) + { + await CancelScheduledMessageAsyncWithHttpInfo(omnimessageId); + + } + + /// + /// Cancels a scheduled Omnimessage. + /// + /// Thrown when fails to make API call + /// UUID of the scheduled Omnimessage to be cancelled + /// Task of ApiResponse + public async System.Threading.Tasks.Task> CancelScheduledMessageAsyncWithHttpInfo (Guid? omnimessageId) + { + // verify the required parameter 'omnimessageId' is set + if (omnimessageId == null) + throw new ApiException(400, "Missing required parameter 'omnimessageId' when calling OmnimessageApi->CancelScheduledMessage"); + + var localVarPath = "./omnimessage/{omnimessageId}"; + 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[] { + }; + 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 (omnimessageId != null) localVarPathParams.Add("omnimessageId", this.Configuration.ApiClient.ParameterToString(omnimessageId)); // path parameter + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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("CancelScheduledMessage", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + null); + } + + /// + /// Sends an Omnimessage. + /// + /// Thrown when fails to make API call + /// Omnimessage to be sent + /// OmniMessageCreateSuccessResponse + public OmniMessageCreateSuccessResponse SendOmnimessage (Omnimessage omnimessage) + { + ApiResponse localVarResponse = SendOmnimessageWithHttpInfo(omnimessage); + return localVarResponse.Data; + } + + /// + /// Sends an Omnimessage. + /// + /// Thrown when fails to make API call + /// Omnimessage to be sent + /// ApiResponse of OmniMessageCreateSuccessResponse + public ApiResponse< OmniMessageCreateSuccessResponse > SendOmnimessageWithHttpInfo (Omnimessage omnimessage) + { + // verify the required parameter 'omnimessage' is set + if (omnimessage == null) + throw new ApiException(400, "Missing required parameter 'omnimessage' when calling OmnimessageApi->SendOmnimessage"); + + var localVarPath = "./omnimessage"; + 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 (omnimessage != null && omnimessage.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(omnimessage); // http body (model) parameter + } + else + { + localVarPostBody = omnimessage; // byte array + } + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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("SendOmnimessage", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + (OmniMessageCreateSuccessResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(OmniMessageCreateSuccessResponse))); + } + + /// + /// Sends an Omnimessage. + /// + /// Thrown when fails to make API call + /// Omnimessage to be sent + /// Task of OmniMessageCreateSuccessResponse + public async System.Threading.Tasks.Task SendOmnimessageAsync (Omnimessage omnimessage) + { + ApiResponse localVarResponse = await SendOmnimessageAsyncWithHttpInfo(omnimessage); + return localVarResponse.Data; + + } + + /// + /// Sends an Omnimessage. + /// + /// Thrown when fails to make API call + /// Omnimessage to be sent + /// Task of ApiResponse (OmniMessageCreateSuccessResponse) + public async System.Threading.Tasks.Task> SendOmnimessageAsyncWithHttpInfo (Omnimessage omnimessage) + { + // verify the required parameter 'omnimessage' is set + if (omnimessage == null) + throw new ApiException(400, "Missing required parameter 'omnimessage' when calling OmnimessageApi->SendOmnimessage"); + + var localVarPath = "./omnimessage"; + 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 (omnimessage != null && omnimessage.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(omnimessage); // http body (model) parameter + } + else + { + localVarPostBody = omnimessage; // byte array + } + + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + + // 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("SendOmnimessage", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), + (OmniMessageCreateSuccessResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(OmniMessageCreateSuccessResponse))); + } + + } +} diff --git a/src/com.Messente.Api/Client/ApiClient.cs b/src/com.Messente.Api/Client/ApiClient.cs new file mode 100644 index 0000000..30829d2 --- /dev/null +++ b/src/com.Messente.Api/Client/ApiClient.cs @@ -0,0 +1,535 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Text.RegularExpressions; +using System.IO; +using System.Linq; +using System.Net; +using System.Text; +using Newtonsoft.Json; +using RestSharp.Portable; +using RestSharp.Portable.HttpClient; + +namespace com.Messente.Api.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 = com.Messente.Api.Client.Configuration.Default; + RestClient = new RestClient("https://api.messente.com/v1"); + RestClient.IgnoreResponseStatusCode = true; + } + + /// + /// Initializes a new instance of the class + /// with default base path (https://api.messente.com/v1). + /// + /// An instance of Configuration. + public ApiClient(Configuration config) + { + Configuration = config ?? com.Messente.Api.Client.Configuration.Default; + + RestClient = new RestClient(Configuration.BasePath); + RestClient.IgnoreResponseStatusCode = true; + } + + /// + /// Initializes a new instance of the class + /// with default configuration. + /// + /// The base path. + public ApiClient(String basePath = "https://api.messente.com/v1") + { + if (String.IsNullOrEmpty(basePath)) + throw new ArgumentException("basePath cannot be empty"); + + RestClient = new RestClient(basePath); + RestClient.IgnoreResponseStatusCode = true; + 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, Method method, List> queryParams, Object postBody, + Dictionary headerParams, Dictionary formParams, + Dictionary fileParams, Dictionary pathParams, + String contentType) + { + var request = new RestRequest(path, method); + // disable ResetSharp.Portable built-in serialization + request.Serializer = null; + + // 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); + } + + if (postBody != null) // http body (model or byte[]) parameter + { + request.AddParameter(new Parameter { Value = postBody, Type = ParameterType.RequestBody, ContentType = contentType }); + } + + 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, 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 = TimeSpan.FromMilliseconds(Configuration.Timeout); + + // set user agent + RestClient.UserAgent = Configuration.UserAgent; + + InterceptRequest(request); + var response = RestClient.Execute(request).Result; + 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, 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.Execute(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) + { + IHttpHeaders 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/com.Messente.Api/Client/ApiException.cs b/src/com.Messente.Api/Client/ApiException.cs new file mode 100644 index 0000000..a0fa594 --- /dev/null +++ b/src/com.Messente.Api/Client/ApiException.cs @@ -0,0 +1,60 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; + +namespace com.Messente.Api.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/com.Messente.Api/Client/ApiResponse.cs b/src/com.Messente.Api/Client/ApiResponse.cs new file mode 100644 index 0000000..883b919 --- /dev/null +++ b/src/com.Messente.Api/Client/ApiResponse.cs @@ -0,0 +1,54 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Collections.Generic; + +namespace com.Messente.Api.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/com.Messente.Api/Client/Configuration.cs b/src/com.Messente.Api/Client/Configuration.cs new file mode 100644 index 0000000..26210fd --- /dev/null +++ b/src/com.Messente.Api/Client/Configuration.cs @@ -0,0 +1,446 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Reflection; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; + +namespace com.Messente.Api.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 = "0.0.1"; + + /// + /// 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); + } + + 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 = "OpenAPI-Generator/0.0.1/csharp"; + BasePath = "https://api.messente.com/v1"; + 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.messente.com/v1") : 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 = "OpenAPI-Generator/0.0.1/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 (int)ApiClient.RestClient.Timeout.GetValueOrDefault(TimeSpan.FromSeconds(0)).TotalMilliseconds; } + set { ApiClient.RestClient.Timeout = TimeSpan.FromMilliseconds(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)) + { + _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 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 (com.Messente.Api) Debug Report:\n"; + report += " OS: " + System.Runtime.InteropServices.RuntimeInformation.OSDescription + "\n"; + report += " Version of the API: 0.0.1\n"; + report += " SDK Package Version: 0.0.1\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/com.Messente.Api/Client/ExceptionFactory.cs b/src/com.Messente.Api/Client/ExceptionFactory.cs new file mode 100644 index 0000000..7ef8e27 --- /dev/null +++ b/src/com.Messente.Api/Client/ExceptionFactory.cs @@ -0,0 +1,24 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using RestSharp.Portable; + +namespace com.Messente.Api.Client +{ + /// + /// A delegate to ExceptionFactory method + /// + /// Method name + /// Response + /// Exceptions + public delegate Exception ExceptionFactory(string methodName, IRestResponse response); +} diff --git a/src/com.Messente.Api/Client/GlobalConfiguration.cs b/src/com.Messente.Api/Client/GlobalConfiguration.cs new file mode 100644 index 0000000..3449b0e --- /dev/null +++ b/src/com.Messente.Api/Client/GlobalConfiguration.cs @@ -0,0 +1,34 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Reflection; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading; + +namespace com.Messente.Api.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 .openapi-generator-ignore file. + /// + public partial class GlobalConfiguration : Configuration + { + + } +} \ No newline at end of file diff --git a/src/com.Messente.Api/Client/IApiAccessor.cs b/src/com.Messente.Api/Client/IApiAccessor.cs new file mode 100644 index 0000000..a750ff5 --- /dev/null +++ b/src/com.Messente.Api/Client/IApiAccessor.cs @@ -0,0 +1,42 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using RestSharp.Portable; + +namespace com.Messente.Api.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/com.Messente.Api/Client/IReadableConfiguration.cs b/src/com.Messente.Api/Client/IReadableConfiguration.cs new file mode 100644 index 0000000..5d904b8 --- /dev/null +++ b/src/com.Messente.Api/Client/IReadableConfiguration.cs @@ -0,0 +1,94 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System.Collections.Generic; + +namespace com.Messente.Api.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/com.Messente.Api/Client/OpenAPIDateConverter.cs b/src/com.Messente.Api/Client/OpenAPIDateConverter.cs new file mode 100644 index 0000000..bbee9f8 --- /dev/null +++ b/src/com.Messente.Api/Client/OpenAPIDateConverter.cs @@ -0,0 +1,30 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using Newtonsoft.Json.Converters; + +namespace com.Messente.Api.Client +{ + /// + /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types + /// + public class OpenAPIDateConverter : IsoDateTimeConverter + { + /// + /// Initializes a new instance of the class. + /// + public OpenAPIDateConverter() + { + // full-date = date-fullyear "-" date-month "-" date-mday + DateTimeFormat = "yyyy-MM-dd"; + } + } +} diff --git a/src/com.Messente.Api/Model/Channel.cs b/src/com.Messente.Api/Model/Channel.cs new file mode 100644 index 0000000..af9f8c1 --- /dev/null +++ b/src/com.Messente.Api/Model/Channel.cs @@ -0,0 +1,54 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.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 OpenAPIDateConverter = com.Messente.Api.Client.OpenAPIDateConverter; + +namespace com.Messente.Api.Model +{ + /// + /// Defines the delivery channel + /// + /// Defines the delivery channel + + [JsonConverter(typeof(StringEnumConverter))] + + public enum Channel + { + /// + /// Enum Sms for value: sms + /// + [EnumMember(Value = "sms")] + Sms = 1, + + /// + /// Enum Viber for value: viber + /// + [EnumMember(Value = "viber")] + Viber = 2, + + /// + /// Enum Whatsapp for value: whatsapp + /// + [EnumMember(Value = "whatsapp")] + Whatsapp = 3 + + } + +} diff --git a/src/com.Messente.Api/Model/ContactEnvelope.cs b/src/com.Messente.Api/Model/ContactEnvelope.cs new file mode 100644 index 0000000..5f0d5df --- /dev/null +++ b/src/com.Messente.Api/Model/ContactEnvelope.cs @@ -0,0 +1,112 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.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 OpenAPIDateConverter = com.Messente.Api.Client.OpenAPIDateConverter; + +namespace com.Messente.Api.Model +{ + /// + /// ContactEnvelope + /// + [DataContract] + public partial class ContactEnvelope : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + /// contact. + public ContactEnvelope(ContactFields contact = default(ContactFields)) + { + this.Contact = contact; + } + + /// + /// Gets or Sets Contact + /// + [DataMember(Name="contact", EmitDefaultValue=false)] + public ContactFields Contact { 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 ContactEnvelope {\n"); + sb.Append(" Contact: ").Append(Contact).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 ContactEnvelope); + } + + /// + /// Returns true if ContactEnvelope instances are equal + /// + /// Instance of ContactEnvelope to be compared + /// Boolean + public bool Equals(ContactEnvelope input) + { + if (input == null) + return false; + + return + ( + this.Contact == input.Contact || + (this.Contact != null && + this.Contact.Equals(input.Contact)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Contact != null) + hashCode = hashCode * 59 + this.Contact.GetHashCode(); + return hashCode; + } + } + } + +} diff --git a/src/com.Messente.Api/Model/ContactFields.cs b/src/com.Messente.Api/Model/ContactFields.cs new file mode 100644 index 0000000..0de2967 --- /dev/null +++ b/src/com.Messente.Api/Model/ContactFields.cs @@ -0,0 +1,270 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.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 OpenAPIDateConverter = com.Messente.Api.Client.OpenAPIDateConverter; + +namespace com.Messente.Api.Model +{ + /// + /// ContactFields + /// + [DataContract] + public partial class ContactFields : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ContactFields() { } + /// + /// Initializes a new instance of the class. + /// + /// Phone number in e.164 format (required). + /// email. + /// firstName. + /// lastName. + /// company. + /// title. + /// custom. + /// custom2. + /// custom3. + /// custom4. + public ContactFields(string phoneNumber = default(string), string email = default(string), string firstName = default(string), string lastName = default(string), string company = default(string), string title = default(string), string custom = default(string), string custom2 = default(string), string custom3 = default(string), string custom4 = default(string)) + { + // to ensure "phoneNumber" is required (not null) + if (phoneNumber == null) + { + throw new InvalidDataException("phoneNumber is a required property for ContactFields and cannot be null"); + } + else + { + this.PhoneNumber = phoneNumber; + } + this.Email = email; + this.FirstName = firstName; + this.LastName = lastName; + this.Company = company; + this.Title = title; + this.Custom = custom; + this.Custom2 = custom2; + this.Custom3 = custom3; + this.Custom4 = custom4; + } + + /// + /// Phone number in e.164 format + /// + /// Phone number in e.164 format + [DataMember(Name="phoneNumber", EmitDefaultValue=false)] + public string PhoneNumber { get; set; } + + /// + /// Gets or Sets Email + /// + [DataMember(Name="email", EmitDefaultValue=false)] + public string Email { get; set; } + + /// + /// Gets or Sets FirstName + /// + [DataMember(Name="firstName", EmitDefaultValue=false)] + public string FirstName { get; set; } + + /// + /// Gets or Sets LastName + /// + [DataMember(Name="lastName", EmitDefaultValue=false)] + public string LastName { get; set; } + + /// + /// Gets or Sets Company + /// + [DataMember(Name="company", EmitDefaultValue=false)] + public string Company { get; set; } + + /// + /// Gets or Sets Title + /// + [DataMember(Name="title", EmitDefaultValue=false)] + public string Title { get; set; } + + /// + /// Gets or Sets Custom + /// + [DataMember(Name="custom", EmitDefaultValue=false)] + public string Custom { get; set; } + + /// + /// Gets or Sets Custom2 + /// + [DataMember(Name="custom2", EmitDefaultValue=false)] + public string Custom2 { get; set; } + + /// + /// Gets or Sets Custom3 + /// + [DataMember(Name="custom3", EmitDefaultValue=false)] + public string Custom3 { get; set; } + + /// + /// Gets or Sets Custom4 + /// + [DataMember(Name="custom4", EmitDefaultValue=false)] + public string Custom4 { 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 ContactFields {\n"); + sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" FirstName: ").Append(FirstName).Append("\n"); + sb.Append(" LastName: ").Append(LastName).Append("\n"); + sb.Append(" Company: ").Append(Company).Append("\n"); + sb.Append(" Title: ").Append(Title).Append("\n"); + sb.Append(" Custom: ").Append(Custom).Append("\n"); + sb.Append(" Custom2: ").Append(Custom2).Append("\n"); + sb.Append(" Custom3: ").Append(Custom3).Append("\n"); + sb.Append(" Custom4: ").Append(Custom4).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 ContactFields); + } + + /// + /// Returns true if ContactFields instances are equal + /// + /// Instance of ContactFields to be compared + /// Boolean + public bool Equals(ContactFields input) + { + if (input == null) + return false; + + return + ( + this.PhoneNumber == input.PhoneNumber || + (this.PhoneNumber != null && + this.PhoneNumber.Equals(input.PhoneNumber)) + ) && + ( + 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.Company == input.Company || + (this.Company != null && + this.Company.Equals(input.Company)) + ) && + ( + this.Title == input.Title || + (this.Title != null && + this.Title.Equals(input.Title)) + ) && + ( + this.Custom == input.Custom || + (this.Custom != null && + this.Custom.Equals(input.Custom)) + ) && + ( + this.Custom2 == input.Custom2 || + (this.Custom2 != null && + this.Custom2.Equals(input.Custom2)) + ) && + ( + this.Custom3 == input.Custom3 || + (this.Custom3 != null && + this.Custom3.Equals(input.Custom3)) + ) && + ( + this.Custom4 == input.Custom4 || + (this.Custom4 != null && + this.Custom4.Equals(input.Custom4)) + ); + } + + /// + /// 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.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.Company != null) + hashCode = hashCode * 59 + this.Company.GetHashCode(); + if (this.Title != null) + hashCode = hashCode * 59 + this.Title.GetHashCode(); + if (this.Custom != null) + hashCode = hashCode * 59 + this.Custom.GetHashCode(); + if (this.Custom2 != null) + hashCode = hashCode * 59 + this.Custom2.GetHashCode(); + if (this.Custom3 != null) + hashCode = hashCode * 59 + this.Custom3.GetHashCode(); + if (this.Custom4 != null) + hashCode = hashCode * 59 + this.Custom4.GetHashCode(); + return hashCode; + } + } + } + +} diff --git a/src/com.Messente.Api/Model/ContactListEnvelope.cs b/src/com.Messente.Api/Model/ContactListEnvelope.cs new file mode 100644 index 0000000..24056d3 --- /dev/null +++ b/src/com.Messente.Api/Model/ContactListEnvelope.cs @@ -0,0 +1,112 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.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 OpenAPIDateConverter = com.Messente.Api.Client.OpenAPIDateConverter; + +namespace com.Messente.Api.Model +{ + /// + /// ContactListEnvelope + /// + [DataContract] + public partial class ContactListEnvelope : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + /// contacts. + public ContactListEnvelope(List contacts = default(List)) + { + this.Contacts = contacts; + } + + /// + /// Gets or Sets Contacts + /// + [DataMember(Name="contacts", EmitDefaultValue=false)] + public List 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 ContactListEnvelope {\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 ContactListEnvelope); + } + + /// + /// Returns true if ContactListEnvelope instances are equal + /// + /// Instance of ContactListEnvelope to be compared + /// Boolean + public bool Equals(ContactListEnvelope input) + { + if (input == null) + return false; + + return + ( + this.Contacts == input.Contacts || + this.Contacts != null && + this.Contacts.SequenceEqual(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; + } + } + } + +} diff --git a/src/com.Messente.Api/Model/ContactUpdateFields.cs b/src/com.Messente.Api/Model/ContactUpdateFields.cs new file mode 100644 index 0000000..97cbeb7 --- /dev/null +++ b/src/com.Messente.Api/Model/ContactUpdateFields.cs @@ -0,0 +1,240 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.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 OpenAPIDateConverter = com.Messente.Api.Client.OpenAPIDateConverter; + +namespace com.Messente.Api.Model +{ + /// + /// ContactUpdateFields + /// + [DataContract] + public partial class ContactUpdateFields : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + /// email. + /// firstName. + /// lastName. + /// company. + /// title. + /// custom. + /// custom2. + /// custom3. + /// custom4. + public ContactUpdateFields(string email = default(string), string firstName = default(string), string lastName = default(string), string company = default(string), string title = default(string), string custom = default(string), string custom2 = default(string), string custom3 = default(string), string custom4 = default(string)) + { + this.Email = email; + this.FirstName = firstName; + this.LastName = lastName; + this.Company = company; + this.Title = title; + this.Custom = custom; + this.Custom2 = custom2; + this.Custom3 = custom3; + this.Custom4 = custom4; + } + + /// + /// Gets or Sets Email + /// + [DataMember(Name="email", EmitDefaultValue=false)] + public string Email { get; set; } + + /// + /// Gets or Sets FirstName + /// + [DataMember(Name="firstName", EmitDefaultValue=false)] + public string FirstName { get; set; } + + /// + /// Gets or Sets LastName + /// + [DataMember(Name="lastName", EmitDefaultValue=false)] + public string LastName { get; set; } + + /// + /// Gets or Sets Company + /// + [DataMember(Name="company", EmitDefaultValue=false)] + public string Company { get; set; } + + /// + /// Gets or Sets Title + /// + [DataMember(Name="title", EmitDefaultValue=false)] + public string Title { get; set; } + + /// + /// Gets or Sets Custom + /// + [DataMember(Name="custom", EmitDefaultValue=false)] + public string Custom { get; set; } + + /// + /// Gets or Sets Custom2 + /// + [DataMember(Name="custom2", EmitDefaultValue=false)] + public string Custom2 { get; set; } + + /// + /// Gets or Sets Custom3 + /// + [DataMember(Name="custom3", EmitDefaultValue=false)] + public string Custom3 { get; set; } + + /// + /// Gets or Sets Custom4 + /// + [DataMember(Name="custom4", EmitDefaultValue=false)] + public string Custom4 { 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 ContactUpdateFields {\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" FirstName: ").Append(FirstName).Append("\n"); + sb.Append(" LastName: ").Append(LastName).Append("\n"); + sb.Append(" Company: ").Append(Company).Append("\n"); + sb.Append(" Title: ").Append(Title).Append("\n"); + sb.Append(" Custom: ").Append(Custom).Append("\n"); + sb.Append(" Custom2: ").Append(Custom2).Append("\n"); + sb.Append(" Custom3: ").Append(Custom3).Append("\n"); + sb.Append(" Custom4: ").Append(Custom4).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 ContactUpdateFields); + } + + /// + /// Returns true if ContactUpdateFields instances are equal + /// + /// Instance of ContactUpdateFields to be compared + /// Boolean + public bool Equals(ContactUpdateFields 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.Company == input.Company || + (this.Company != null && + this.Company.Equals(input.Company)) + ) && + ( + this.Title == input.Title || + (this.Title != null && + this.Title.Equals(input.Title)) + ) && + ( + this.Custom == input.Custom || + (this.Custom != null && + this.Custom.Equals(input.Custom)) + ) && + ( + this.Custom2 == input.Custom2 || + (this.Custom2 != null && + this.Custom2.Equals(input.Custom2)) + ) && + ( + this.Custom3 == input.Custom3 || + (this.Custom3 != null && + this.Custom3.Equals(input.Custom3)) + ) && + ( + this.Custom4 == input.Custom4 || + (this.Custom4 != null && + this.Custom4.Equals(input.Custom4)) + ); + } + + /// + /// 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.Company != null) + hashCode = hashCode * 59 + this.Company.GetHashCode(); + if (this.Title != null) + hashCode = hashCode * 59 + this.Title.GetHashCode(); + if (this.Custom != null) + hashCode = hashCode * 59 + this.Custom.GetHashCode(); + if (this.Custom2 != null) + hashCode = hashCode * 59 + this.Custom2.GetHashCode(); + if (this.Custom3 != null) + hashCode = hashCode * 59 + this.Custom3.GetHashCode(); + if (this.Custom4 != null) + hashCode = hashCode * 59 + this.Custom4.GetHashCode(); + return hashCode; + } + } + } + +} diff --git a/src/com.Messente.Api/Model/DeliveryReportResponse.cs b/src/com.Messente.Api/Model/DeliveryReportResponse.cs new file mode 100644 index 0000000..92a0d2e --- /dev/null +++ b/src/com.Messente.Api/Model/DeliveryReportResponse.cs @@ -0,0 +1,176 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.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 OpenAPIDateConverter = com.Messente.Api.Client.OpenAPIDateConverter; + +namespace com.Messente.Api.Model +{ + /// + /// DeliveryReportResponse + /// + [DataContract] + public partial class DeliveryReportResponse : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DeliveryReportResponse() { } + /// + /// Initializes a new instance of the class. + /// + /// Contains the delivery reports for each channnel, ordered by send order (required). + /// Phone number in e.164 format (required). + /// Unique identifier for the Omnimessage (required). + public DeliveryReportResponse(List statuses = default(List), string to = default(string), Guid? omnimessageId = default(Guid?)) + { + // to ensure "statuses" is required (not null) + if (statuses == null) + { + throw new InvalidDataException("statuses is a required property for DeliveryReportResponse and cannot be null"); + } + else + { + this.Statuses = statuses; + } + // to ensure "to" is required (not null) + if (to == null) + { + throw new InvalidDataException("to is a required property for DeliveryReportResponse and cannot be null"); + } + else + { + this.To = to; + } + // to ensure "omnimessageId" is required (not null) + if (omnimessageId == null) + { + throw new InvalidDataException("omnimessageId is a required property for DeliveryReportResponse and cannot be null"); + } + else + { + this.OmnimessageId = omnimessageId; + } + } + + /// + /// Contains the delivery reports for each channnel, ordered by send order + /// + /// Contains the delivery reports for each channnel, ordered by send order + [DataMember(Name="statuses", EmitDefaultValue=false)] + public List Statuses { get; set; } + + /// + /// Phone number in e.164 format + /// + /// Phone number in e.164 format + [DataMember(Name="to", EmitDefaultValue=false)] + public string To { get; set; } + + /// + /// Unique identifier for the Omnimessage + /// + /// Unique identifier for the Omnimessage + [DataMember(Name="omnimessage_id", EmitDefaultValue=false)] + public Guid? OmnimessageId { 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 DeliveryReportResponse {\n"); + sb.Append(" Statuses: ").Append(Statuses).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" OmnimessageId: ").Append(OmnimessageId).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 DeliveryReportResponse); + } + + /// + /// Returns true if DeliveryReportResponse instances are equal + /// + /// Instance of DeliveryReportResponse to be compared + /// Boolean + public bool Equals(DeliveryReportResponse input) + { + if (input == null) + return false; + + return + ( + this.Statuses == input.Statuses || + this.Statuses != null && + this.Statuses.SequenceEqual(input.Statuses) + ) && + ( + this.To == input.To || + (this.To != null && + this.To.Equals(input.To)) + ) && + ( + this.OmnimessageId == input.OmnimessageId || + (this.OmnimessageId != null && + this.OmnimessageId.Equals(input.OmnimessageId)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Statuses != null) + hashCode = hashCode * 59 + this.Statuses.GetHashCode(); + if (this.To != null) + hashCode = hashCode * 59 + this.To.GetHashCode(); + if (this.OmnimessageId != null) + hashCode = hashCode * 59 + this.OmnimessageId.GetHashCode(); + return hashCode; + } + } + } + +} diff --git a/src/com.Messente.Api/Model/DeliveryResult.cs b/src/com.Messente.Api/Model/DeliveryResult.cs new file mode 100644 index 0000000..772dd0e --- /dev/null +++ b/src/com.Messente.Api/Model/DeliveryResult.cs @@ -0,0 +1,195 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.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 OpenAPIDateConverter = com.Messente.Api.Client.OpenAPIDateConverter; + +namespace com.Messente.Api.Model +{ + /// + /// DeliveryResult + /// + [DataContract] + public partial class DeliveryResult : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + /// status. + /// channel. + /// Unique identifier for the message. + /// Human-readable description of what went wrong, *null* in case of success or if the messages has not been processed yet. + /// err. + /// When this status was received by Omnichannel API. + public DeliveryResult(Status status = default(Status), Channel channel = default(Channel), Guid? messageId = default(Guid?), string error = default(string), ErrorCodeOmnichannelMachine err = default(ErrorCodeOmnichannelMachine), DateTime? timestamp = default(DateTime?)) + { + this.Status = status; + this.Channel = channel; + this.MessageId = messageId; + this.Error = error; + this.Err = err; + this.Timestamp = timestamp; + } + + /// + /// Gets or Sets Status + /// + [DataMember(Name="status", EmitDefaultValue=false)] + public Status Status { get; set; } + + /// + /// Gets or Sets Channel + /// + [DataMember(Name="channel", EmitDefaultValue=false)] + public Channel Channel { get; set; } + + /// + /// Unique identifier for the message + /// + /// Unique identifier for the message + [DataMember(Name="message_id", EmitDefaultValue=false)] + public Guid? MessageId { get; set; } + + /// + /// Human-readable description of what went wrong, *null* in case of success or if the messages has not been processed yet + /// + /// Human-readable description of what went wrong, *null* in case of success or if the messages has not been processed yet + [DataMember(Name="error", EmitDefaultValue=false)] + public string Error { get; set; } + + /// + /// Gets or Sets Err + /// + [DataMember(Name="err", EmitDefaultValue=false)] + public ErrorCodeOmnichannelMachine Err { get; set; } + + /// + /// When this status was received by Omnichannel API + /// + /// When this status was received by Omnichannel API + [DataMember(Name="timestamp", EmitDefaultValue=false)] + public DateTime? Timestamp { 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 DeliveryResult {\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Channel: ").Append(Channel).Append("\n"); + sb.Append(" MessageId: ").Append(MessageId).Append("\n"); + sb.Append(" Error: ").Append(Error).Append("\n"); + sb.Append(" Err: ").Append(Err).Append("\n"); + sb.Append(" Timestamp: ").Append(Timestamp).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 DeliveryResult); + } + + /// + /// Returns true if DeliveryResult instances are equal + /// + /// Instance of DeliveryResult to be compared + /// Boolean + public bool Equals(DeliveryResult input) + { + if (input == null) + return false; + + return + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ) && + ( + this.Channel == input.Channel || + (this.Channel != null && + this.Channel.Equals(input.Channel)) + ) && + ( + this.MessageId == input.MessageId || + (this.MessageId != null && + this.MessageId.Equals(input.MessageId)) + ) && + ( + this.Error == input.Error || + (this.Error != null && + this.Error.Equals(input.Error)) + ) && + ( + this.Err == input.Err || + (this.Err != null && + this.Err.Equals(input.Err)) + ) && + ( + this.Timestamp == input.Timestamp || + (this.Timestamp != null && + this.Timestamp.Equals(input.Timestamp)) + ); + } + + /// + /// 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(); + if (this.Channel != null) + hashCode = hashCode * 59 + this.Channel.GetHashCode(); + if (this.MessageId != null) + hashCode = hashCode * 59 + this.MessageId.GetHashCode(); + if (this.Error != null) + hashCode = hashCode * 59 + this.Error.GetHashCode(); + if (this.Err != null) + hashCode = hashCode * 59 + this.Err.GetHashCode(); + if (this.Timestamp != null) + hashCode = hashCode * 59 + this.Timestamp.GetHashCode(); + return hashCode; + } + } + } + +} diff --git a/src/com.Messente.Api/Model/ErrorCodeOmnichannel.cs b/src/com.Messente.Api/Model/ErrorCodeOmnichannel.cs new file mode 100644 index 0000000..fd93ba1 --- /dev/null +++ b/src/com.Messente.Api/Model/ErrorCodeOmnichannel.cs @@ -0,0 +1,78 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.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 OpenAPIDateConverter = com.Messente.Api.Client.OpenAPIDateConverter; + +namespace com.Messente.Api.Model +{ + /// + /// Matches the following ErrorTitleOmnichannel. This field is a constant. * 101 - Not found * 102 - Forbidden * 103 - Unauthorized * 104 - Invalid data * 105 - Internal Server Error * 106 - Missing data * 107 - Method not allowed + /// + /// Matches the following ErrorTitleOmnichannel. This field is a constant. * 101 - Not found * 102 - Forbidden * 103 - Unauthorized * 104 - Invalid data * 105 - Internal Server Error * 106 - Missing data * 107 - Method not allowed + + [JsonConverter(typeof(StringEnumConverter))] + + public enum ErrorCodeOmnichannel + { + /// + /// Enum _101 for value: 101 + /// + [EnumMember(Value = "101")] + _101 = 1, + + /// + /// Enum _102 for value: 102 + /// + [EnumMember(Value = "102")] + _102 = 2, + + /// + /// Enum _103 for value: 103 + /// + [EnumMember(Value = "103")] + _103 = 3, + + /// + /// Enum _104 for value: 104 + /// + [EnumMember(Value = "104")] + _104 = 4, + + /// + /// Enum _105 for value: 105 + /// + [EnumMember(Value = "105")] + _105 = 5, + + /// + /// Enum _106 for value: 106 + /// + [EnumMember(Value = "106")] + _106 = 6, + + /// + /// Enum _107 for value: 107 + /// + [EnumMember(Value = "107")] + _107 = 7 + + } + +} diff --git a/src/com.Messente.Api/Model/ErrorCodeOmnichannelMachine.cs b/src/com.Messente.Api/Model/ErrorCodeOmnichannelMachine.cs new file mode 100644 index 0000000..953f82a --- /dev/null +++ b/src/com.Messente.Api/Model/ErrorCodeOmnichannelMachine.cs @@ -0,0 +1,108 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.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 OpenAPIDateConverter = com.Messente.Api.Client.OpenAPIDateConverter; + +namespace com.Messente.Api.Model +{ + /// + /// Machine-readable error code, 'null' when the message has not been processed yet * 0 - No error * 1 - Delivery failure * 2 - Sending message expired * 3 - Invalid number * 4 - Error crediting account * 5 - Invalid number format * 6 - Too many identical messages * 7 - Sender name not allowed * 8 - Operator blacklisted * 9 - Unroutable * 999 - General temporary error + /// + /// Machine-readable error code, 'null' when the message has not been processed yet * 0 - No error * 1 - Delivery failure * 2 - Sending message expired * 3 - Invalid number * 4 - Error crediting account * 5 - Invalid number format * 6 - Too many identical messages * 7 - Sender name not allowed * 8 - Operator blacklisted * 9 - Unroutable * 999 - General temporary error + + [JsonConverter(typeof(StringEnumConverter))] + + public enum ErrorCodeOmnichannelMachine + { + /// + /// Enum NUMBER_0 for value: 0 + /// + [EnumMember(Value = "0")] + NUMBER_0 = 1, + + /// + /// Enum NUMBER_1 for value: 1 + /// + [EnumMember(Value = "1")] + NUMBER_1 = 2, + + /// + /// Enum NUMBER_2 for value: 2 + /// + [EnumMember(Value = "2")] + NUMBER_2 = 3, + + /// + /// Enum NUMBER_3 for value: 3 + /// + [EnumMember(Value = "3")] + NUMBER_3 = 4, + + /// + /// Enum NUMBER_4 for value: 4 + /// + [EnumMember(Value = "4")] + NUMBER_4 = 5, + + /// + /// Enum NUMBER_5 for value: 5 + /// + [EnumMember(Value = "5")] + NUMBER_5 = 6, + + /// + /// Enum NUMBER_6 for value: 6 + /// + [EnumMember(Value = "6")] + NUMBER_6 = 7, + + /// + /// Enum NUMBER_7 for value: 7 + /// + [EnumMember(Value = "7")] + NUMBER_7 = 8, + + /// + /// Enum NUMBER_8 for value: 8 + /// + [EnumMember(Value = "8")] + NUMBER_8 = 9, + + /// + /// Enum NUMBER_9 for value: 9 + /// + [EnumMember(Value = "9")] + NUMBER_9 = 10, + + /// + /// Enum NUMBER_10 for value: 10 + /// + [EnumMember(Value = "10")] + NUMBER_10 = 11, + + /// + /// Enum NUMBER_999 for value: 999 + /// + [EnumMember(Value = "999")] + NUMBER_999 = 12 + + } + +} diff --git a/src/com.Messente.Api/Model/ErrorCodePhonebook.cs b/src/com.Messente.Api/Model/ErrorCodePhonebook.cs new file mode 100644 index 0000000..69a4601 --- /dev/null +++ b/src/com.Messente.Api/Model/ErrorCodePhonebook.cs @@ -0,0 +1,72 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.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 OpenAPIDateConverter = com.Messente.Api.Client.OpenAPIDateConverter; + +namespace com.Messente.Api.Model +{ + /// + /// Matches the following ErrorTitlePhonebook. This field is a constant. * 201 - Invalid data * 202 - Unauthorized * 203 - Missing resource * 204 - Conflict * 244 - Client error * 205 - General error + /// + /// Matches the following ErrorTitlePhonebook. This field is a constant. * 201 - Invalid data * 202 - Unauthorized * 203 - Missing resource * 204 - Conflict * 244 - Client error * 205 - General error + + [JsonConverter(typeof(StringEnumConverter))] + + public enum ErrorCodePhonebook + { + /// + /// Enum _201 for value: 201 + /// + [EnumMember(Value = "201")] + _201 = 1, + + /// + /// Enum _202 for value: 202 + /// + [EnumMember(Value = "202")] + _202 = 2, + + /// + /// Enum _203 for value: 203 + /// + [EnumMember(Value = "203")] + _203 = 3, + + /// + /// Enum _204 for value: 204 + /// + [EnumMember(Value = "204")] + _204 = 4, + + /// + /// Enum _244 for value: 244 + /// + [EnumMember(Value = "244")] + _244 = 5, + + /// + /// Enum _205 for value: 205 + /// + [EnumMember(Value = "205")] + _205 = 6 + + } + +} diff --git a/src/com.Messente.Api/Model/ErrorItemOmnichannel.cs b/src/com.Messente.Api/Model/ErrorItemOmnichannel.cs new file mode 100644 index 0000000..41ff624 --- /dev/null +++ b/src/com.Messente.Api/Model/ErrorItemOmnichannel.cs @@ -0,0 +1,199 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.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 OpenAPIDateConverter = com.Messente.Api.Client.OpenAPIDateConverter; + +namespace com.Messente.Api.Model +{ + /// + /// ErrorItemOmnichannel + /// + [DataContract] + public partial class ErrorItemOmnichannel : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ErrorItemOmnichannel() { } + /// + /// Initializes a new instance of the class. + /// + /// title (required). + /// Free form more detailed description of the error. (required). + /// code (required). + /// Describes which field is causing the issue in the payload, null for non 400 status code responses (required). + public ErrorItemOmnichannel(ErrorTitleOmnichannel title = default(ErrorTitleOmnichannel), string detail = default(string), ErrorCodeOmnichannel code = default(ErrorCodeOmnichannel), string source = default(string)) + { + // to ensure "title" is required (not null) + if (title == null) + { + throw new InvalidDataException("title is a required property for ErrorItemOmnichannel and cannot be null"); + } + else + { + this.Title = title; + } + // to ensure "detail" is required (not null) + if (detail == null) + { + throw new InvalidDataException("detail is a required property for ErrorItemOmnichannel and cannot be null"); + } + else + { + this.Detail = detail; + } + // to ensure "code" is required (not null) + if (code == null) + { + throw new InvalidDataException("code is a required property for ErrorItemOmnichannel and cannot be null"); + } + else + { + this.Code = code; + } + // to ensure "source" is required (not null) + if (source == null) + { + throw new InvalidDataException("source is a required property for ErrorItemOmnichannel and cannot be null"); + } + else + { + this.Source = source; + } + } + + /// + /// Gets or Sets Title + /// + [DataMember(Name="title", EmitDefaultValue=false)] + public ErrorTitleOmnichannel Title { get; set; } + + /// + /// Free form more detailed description of the error. + /// + /// Free form more detailed description of the error. + [DataMember(Name="detail", EmitDefaultValue=false)] + public string Detail { get; set; } + + /// + /// Gets or Sets Code + /// + [DataMember(Name="code", EmitDefaultValue=false)] + public ErrorCodeOmnichannel Code { get; set; } + + /// + /// Describes which field is causing the issue in the payload, null for non 400 status code responses + /// + /// Describes which field is causing the issue in the payload, null for non 400 status code responses + [DataMember(Name="source", EmitDefaultValue=false)] + public string Source { 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 ErrorItemOmnichannel {\n"); + sb.Append(" Title: ").Append(Title).Append("\n"); + sb.Append(" Detail: ").Append(Detail).Append("\n"); + sb.Append(" Code: ").Append(Code).Append("\n"); + sb.Append(" Source: ").Append(Source).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 ErrorItemOmnichannel); + } + + /// + /// Returns true if ErrorItemOmnichannel instances are equal + /// + /// Instance of ErrorItemOmnichannel to be compared + /// Boolean + public bool Equals(ErrorItemOmnichannel input) + { + if (input == null) + return false; + + return + ( + this.Title == input.Title || + (this.Title != null && + this.Title.Equals(input.Title)) + ) && + ( + this.Detail == input.Detail || + (this.Detail != null && + this.Detail.Equals(input.Detail)) + ) && + ( + this.Code == input.Code || + (this.Code != null && + this.Code.Equals(input.Code)) + ) && + ( + this.Source == input.Source || + (this.Source != null && + this.Source.Equals(input.Source)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Title != null) + hashCode = hashCode * 59 + this.Title.GetHashCode(); + if (this.Detail != null) + hashCode = hashCode * 59 + this.Detail.GetHashCode(); + if (this.Code != null) + hashCode = hashCode * 59 + this.Code.GetHashCode(); + if (this.Source != null) + hashCode = hashCode * 59 + this.Source.GetHashCode(); + return hashCode; + } + } + } + +} diff --git a/src/com.Messente.Api/Model/ErrorItemPhonebook.cs b/src/com.Messente.Api/Model/ErrorItemPhonebook.cs new file mode 100644 index 0000000..a3d2b6b --- /dev/null +++ b/src/com.Messente.Api/Model/ErrorItemPhonebook.cs @@ -0,0 +1,174 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.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 OpenAPIDateConverter = com.Messente.Api.Client.OpenAPIDateConverter; + +namespace com.Messente.Api.Model +{ + /// + /// ErrorItemPhonebook + /// + [DataContract] + public partial class ErrorItemPhonebook : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ErrorItemPhonebook() { } + /// + /// Initializes a new instance of the class. + /// + /// title (required). + /// Free form more detailed description of the error. (required). + /// code (required). + public ErrorItemPhonebook(ErrorTitlePhonebook title = default(ErrorTitlePhonebook), string detail = default(string), ErrorCodePhonebook code = default(ErrorCodePhonebook)) + { + // to ensure "title" is required (not null) + if (title == null) + { + throw new InvalidDataException("title is a required property for ErrorItemPhonebook and cannot be null"); + } + else + { + this.Title = title; + } + // to ensure "detail" is required (not null) + if (detail == null) + { + throw new InvalidDataException("detail is a required property for ErrorItemPhonebook and cannot be null"); + } + else + { + this.Detail = detail; + } + // to ensure "code" is required (not null) + if (code == null) + { + throw new InvalidDataException("code is a required property for ErrorItemPhonebook and cannot be null"); + } + else + { + this.Code = code; + } + } + + /// + /// Gets or Sets Title + /// + [DataMember(Name="title", EmitDefaultValue=false)] + public ErrorTitlePhonebook Title { get; set; } + + /// + /// Free form more detailed description of the error. + /// + /// Free form more detailed description of the error. + [DataMember(Name="detail", EmitDefaultValue=false)] + public string Detail { get; set; } + + /// + /// Gets or Sets Code + /// + [DataMember(Name="code", EmitDefaultValue=false)] + public ErrorCodePhonebook Code { 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 ErrorItemPhonebook {\n"); + sb.Append(" Title: ").Append(Title).Append("\n"); + sb.Append(" Detail: ").Append(Detail).Append("\n"); + sb.Append(" Code: ").Append(Code).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 ErrorItemPhonebook); + } + + /// + /// Returns true if ErrorItemPhonebook instances are equal + /// + /// Instance of ErrorItemPhonebook to be compared + /// Boolean + public bool Equals(ErrorItemPhonebook input) + { + if (input == null) + return false; + + return + ( + this.Title == input.Title || + (this.Title != null && + this.Title.Equals(input.Title)) + ) && + ( + this.Detail == input.Detail || + (this.Detail != null && + this.Detail.Equals(input.Detail)) + ) && + ( + this.Code == input.Code || + (this.Code != null && + this.Code.Equals(input.Code)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Title != null) + hashCode = hashCode * 59 + this.Title.GetHashCode(); + if (this.Detail != null) + hashCode = hashCode * 59 + this.Detail.GetHashCode(); + if (this.Code != null) + hashCode = hashCode * 59 + this.Code.GetHashCode(); + return hashCode; + } + } + } + +} diff --git a/src/com.Messente.Api/Model/ErrorOmnichannel.cs b/src/com.Messente.Api/Model/ErrorOmnichannel.cs new file mode 100644 index 0000000..6693946 --- /dev/null +++ b/src/com.Messente.Api/Model/ErrorOmnichannel.cs @@ -0,0 +1,125 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.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 OpenAPIDateConverter = com.Messente.Api.Client.OpenAPIDateConverter; + +namespace com.Messente.Api.Model +{ + /// + /// ErrorOmnichannel + /// + [DataContract] + public partial class ErrorOmnichannel : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ErrorOmnichannel() { } + /// + /// Initializes a new instance of the class. + /// + /// errors (required). + public ErrorOmnichannel(List errors = default(List)) + { + // to ensure "errors" is required (not null) + if (errors == null) + { + throw new InvalidDataException("errors is a required property for ErrorOmnichannel and cannot be null"); + } + else + { + this.Errors = errors; + } + } + + /// + /// Gets or Sets Errors + /// + [DataMember(Name="errors", EmitDefaultValue=false)] + public List Errors { 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 ErrorOmnichannel {\n"); + sb.Append(" Errors: ").Append(Errors).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 ErrorOmnichannel); + } + + /// + /// Returns true if ErrorOmnichannel instances are equal + /// + /// Instance of ErrorOmnichannel to be compared + /// Boolean + public bool Equals(ErrorOmnichannel input) + { + if (input == null) + return false; + + return + ( + this.Errors == input.Errors || + this.Errors != null && + this.Errors.SequenceEqual(input.Errors) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Errors != null) + hashCode = hashCode * 59 + this.Errors.GetHashCode(); + return hashCode; + } + } + } + +} diff --git a/src/com.Messente.Api/Model/ErrorPhonebook.cs b/src/com.Messente.Api/Model/ErrorPhonebook.cs new file mode 100644 index 0000000..a501f6d --- /dev/null +++ b/src/com.Messente.Api/Model/ErrorPhonebook.cs @@ -0,0 +1,125 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.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 OpenAPIDateConverter = com.Messente.Api.Client.OpenAPIDateConverter; + +namespace com.Messente.Api.Model +{ + /// + /// ErrorPhonebook + /// + [DataContract] + public partial class ErrorPhonebook : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ErrorPhonebook() { } + /// + /// Initializes a new instance of the class. + /// + /// errors (required). + public ErrorPhonebook(List errors = default(List)) + { + // to ensure "errors" is required (not null) + if (errors == null) + { + throw new InvalidDataException("errors is a required property for ErrorPhonebook and cannot be null"); + } + else + { + this.Errors = errors; + } + } + + /// + /// Gets or Sets Errors + /// + [DataMember(Name="errors", EmitDefaultValue=false)] + public List Errors { 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 ErrorPhonebook {\n"); + sb.Append(" Errors: ").Append(Errors).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 ErrorPhonebook); + } + + /// + /// Returns true if ErrorPhonebook instances are equal + /// + /// Instance of ErrorPhonebook to be compared + /// Boolean + public bool Equals(ErrorPhonebook input) + { + if (input == null) + return false; + + return + ( + this.Errors == input.Errors || + this.Errors != null && + this.Errors.SequenceEqual(input.Errors) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Errors != null) + hashCode = hashCode * 59 + this.Errors.GetHashCode(); + return hashCode; + } + } + } + +} diff --git a/src/com.Messente.Api/Model/ErrorTitleOmnichannel.cs b/src/com.Messente.Api/Model/ErrorTitleOmnichannel.cs new file mode 100644 index 0000000..68b1665 --- /dev/null +++ b/src/com.Messente.Api/Model/ErrorTitleOmnichannel.cs @@ -0,0 +1,78 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.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 OpenAPIDateConverter = com.Messente.Api.Client.OpenAPIDateConverter; + +namespace com.Messente.Api.Model +{ + /// + /// Textual value which corresponds to ErrorCodeOmnichannel + /// + /// Textual value which corresponds to ErrorCodeOmnichannel + + [JsonConverter(typeof(StringEnumConverter))] + + public enum ErrorTitleOmnichannel + { + /// + /// Enum Notfound for value: Not found + /// + [EnumMember(Value = "Not found")] + Notfound = 1, + + /// + /// Enum Forbidden for value: Forbidden + /// + [EnumMember(Value = "Forbidden")] + Forbidden = 2, + + /// + /// Enum Unauthorized for value: Unauthorized + /// + [EnumMember(Value = "Unauthorized")] + Unauthorized = 3, + + /// + /// Enum Invaliddata for value: Invalid data + /// + [EnumMember(Value = "Invalid data")] + Invaliddata = 4, + + /// + /// Enum InternalServerError for value: Internal Server Error + /// + [EnumMember(Value = "Internal Server Error")] + InternalServerError = 5, + + /// + /// Enum Missingdata for value: Missing data + /// + [EnumMember(Value = "Missing data")] + Missingdata = 6, + + /// + /// Enum Methodnotallowed for value: Method not allowed + /// + [EnumMember(Value = "Method not allowed")] + Methodnotallowed = 7 + + } + +} diff --git a/src/com.Messente.Api/Model/ErrorTitlePhonebook.cs b/src/com.Messente.Api/Model/ErrorTitlePhonebook.cs new file mode 100644 index 0000000..494c3c2 --- /dev/null +++ b/src/com.Messente.Api/Model/ErrorTitlePhonebook.cs @@ -0,0 +1,72 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.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 OpenAPIDateConverter = com.Messente.Api.Client.OpenAPIDateConverter; + +namespace com.Messente.Api.Model +{ + /// + /// Textual value which corresponds to ErrorCodePhonebook + /// + /// Textual value which corresponds to ErrorCodePhonebook + + [JsonConverter(typeof(StringEnumConverter))] + + public enum ErrorTitlePhonebook + { + /// + /// Enum Invaliddata for value: Invalid data + /// + [EnumMember(Value = "Invalid data")] + Invaliddata = 1, + + /// + /// Enum Unauthorized for value: Unauthorized + /// + [EnumMember(Value = "Unauthorized")] + Unauthorized = 2, + + /// + /// Enum Missingresource for value: Missing resource + /// + [EnumMember(Value = "Missing resource")] + Missingresource = 3, + + /// + /// Enum Conflict for value: Conflict + /// + [EnumMember(Value = "Conflict")] + Conflict = 4, + + /// + /// Enum Clienterror for value: Client error + /// + [EnumMember(Value = "Client error")] + Clienterror = 5, + + /// + /// Enum Generalerror for value: General error + /// + [EnumMember(Value = "General error")] + Generalerror = 6 + + } + +} diff --git a/src/com.Messente.Api/Model/FetchBlacklistSuccess.cs b/src/com.Messente.Api/Model/FetchBlacklistSuccess.cs new file mode 100644 index 0000000..e210c5f --- /dev/null +++ b/src/com.Messente.Api/Model/FetchBlacklistSuccess.cs @@ -0,0 +1,112 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.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 OpenAPIDateConverter = com.Messente.Api.Client.OpenAPIDateConverter; + +namespace com.Messente.Api.Model +{ + /// + /// FetchBlacklistSuccess + /// + [DataContract] + public partial class FetchBlacklistSuccess : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + /// phoneNumbers. + public FetchBlacklistSuccess(List phoneNumbers = default(List)) + { + this.PhoneNumbers = phoneNumbers; + } + + /// + /// Gets or Sets PhoneNumbers + /// + [DataMember(Name="phoneNumbers", EmitDefaultValue=false)] + public List PhoneNumbers { 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 FetchBlacklistSuccess {\n"); + sb.Append(" PhoneNumbers: ").Append(PhoneNumbers).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 FetchBlacklistSuccess); + } + + /// + /// Returns true if FetchBlacklistSuccess instances are equal + /// + /// Instance of FetchBlacklistSuccess to be compared + /// Boolean + public bool Equals(FetchBlacklistSuccess input) + { + if (input == null) + return false; + + return + ( + this.PhoneNumbers == input.PhoneNumbers || + this.PhoneNumbers != null && + this.PhoneNumbers.SequenceEqual(input.PhoneNumbers) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.PhoneNumbers != null) + hashCode = hashCode * 59 + this.PhoneNumbers.GetHashCode(); + return hashCode; + } + } + } + +} diff --git a/src/com.Messente.Api/Model/GroupEnvelope.cs b/src/com.Messente.Api/Model/GroupEnvelope.cs new file mode 100644 index 0000000..e0c7847 --- /dev/null +++ b/src/com.Messente.Api/Model/GroupEnvelope.cs @@ -0,0 +1,112 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.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 OpenAPIDateConverter = com.Messente.Api.Client.OpenAPIDateConverter; + +namespace com.Messente.Api.Model +{ + /// + /// GroupEnvelope + /// + [DataContract] + public partial class GroupEnvelope : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + /// group. + public GroupEnvelope(GroupResponseFields group = default(GroupResponseFields)) + { + this.Group = group; + } + + /// + /// Gets or Sets Group + /// + [DataMember(Name="group", EmitDefaultValue=false)] + public GroupResponseFields Group { 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 GroupEnvelope {\n"); + sb.Append(" Group: ").Append(Group).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 GroupEnvelope); + } + + /// + /// Returns true if GroupEnvelope instances are equal + /// + /// Instance of GroupEnvelope to be compared + /// Boolean + public bool Equals(GroupEnvelope input) + { + if (input == null) + return false; + + return + ( + this.Group == input.Group || + (this.Group != null && + this.Group.Equals(input.Group)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Group != null) + hashCode = hashCode * 59 + this.Group.GetHashCode(); + return hashCode; + } + } + } + +} diff --git a/src/com.Messente.Api/Model/GroupListEnvelope.cs b/src/com.Messente.Api/Model/GroupListEnvelope.cs new file mode 100644 index 0000000..5b664fd --- /dev/null +++ b/src/com.Messente.Api/Model/GroupListEnvelope.cs @@ -0,0 +1,112 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.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 OpenAPIDateConverter = com.Messente.Api.Client.OpenAPIDateConverter; + +namespace com.Messente.Api.Model +{ + /// + /// GroupListEnvelope + /// + [DataContract] + public partial class GroupListEnvelope : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + /// groups. + public GroupListEnvelope(List groups = default(List)) + { + this.Groups = groups; + } + + /// + /// Gets or Sets Groups + /// + [DataMember(Name="groups", EmitDefaultValue=false)] + public List Groups { 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 GroupListEnvelope {\n"); + sb.Append(" Groups: ").Append(Groups).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 GroupListEnvelope); + } + + /// + /// Returns true if GroupListEnvelope instances are equal + /// + /// Instance of GroupListEnvelope to be compared + /// Boolean + public bool Equals(GroupListEnvelope input) + { + if (input == null) + return false; + + return + ( + this.Groups == input.Groups || + this.Groups != null && + this.Groups.SequenceEqual(input.Groups) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Groups != null) + hashCode = hashCode * 59 + this.Groups.GetHashCode(); + return hashCode; + } + } + } + +} diff --git a/src/com.Messente.Api/Model/GroupName.cs b/src/com.Messente.Api/Model/GroupName.cs new file mode 100644 index 0000000..fd95787 --- /dev/null +++ b/src/com.Messente.Api/Model/GroupName.cs @@ -0,0 +1,125 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.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 OpenAPIDateConverter = com.Messente.Api.Client.OpenAPIDateConverter; + +namespace com.Messente.Api.Model +{ + /// + /// GroupName + /// + [DataContract] + public partial class GroupName : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GroupName() { } + /// + /// Initializes a new instance of the class. + /// + /// name (required). + public GroupName(string name = default(string)) + { + // to ensure "name" is required (not null) + if (name == null) + { + throw new InvalidDataException("name is a required property for GroupName and cannot be null"); + } + else + { + this.Name = name; + } + } + + /// + /// Gets or Sets Name + /// + [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 GroupName {\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 GroupName); + } + + /// + /// Returns true if GroupName instances are equal + /// + /// Instance of GroupName to be compared + /// Boolean + public bool Equals(GroupName 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; + } + } + } + +} diff --git a/src/com.Messente.Api/Model/GroupResponseFields.cs b/src/com.Messente.Api/Model/GroupResponseFields.cs new file mode 100644 index 0000000..262d977 --- /dev/null +++ b/src/com.Messente.Api/Model/GroupResponseFields.cs @@ -0,0 +1,191 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.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 OpenAPIDateConverter = com.Messente.Api.Client.OpenAPIDateConverter; + +namespace com.Messente.Api.Model +{ + /// + /// GroupResponseFields + /// + [DataContract] + public partial class GroupResponseFields : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GroupResponseFields() { } + /// + /// Initializes a new instance of the class. + /// + /// Id string in uuid format (required). + /// name (required). + /// format %Y-%m-%dT%H:%M:%S.%fZ. + /// contactsCount (required). + public GroupResponseFields(string id = default(string), string name = default(string), string createdOn = default(string), int? contactsCount = default(int?)) + { + // to ensure "id" is required (not null) + if (id == null) + { + throw new InvalidDataException("id is a required property for GroupResponseFields 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 GroupResponseFields and cannot be null"); + } + else + { + this.Name = name; + } + // to ensure "contactsCount" is required (not null) + if (contactsCount == null) + { + throw new InvalidDataException("contactsCount is a required property for GroupResponseFields and cannot be null"); + } + else + { + this.ContactsCount = contactsCount; + } + this.CreatedOn = createdOn; + } + + /// + /// Id string in uuid format + /// + /// Id string in uuid format + [DataMember(Name="id", EmitDefaultValue=false)] + public string Id { get; set; } + + /// + /// Gets or Sets Name + /// + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// format %Y-%m-%dT%H:%M:%S.%fZ + /// + /// format %Y-%m-%dT%H:%M:%S.%fZ + [DataMember(Name="createdOn", EmitDefaultValue=false)] + public string CreatedOn { get; set; } + + /// + /// Gets or Sets ContactsCount + /// + [DataMember(Name="contactsCount", EmitDefaultValue=false)] + public int? ContactsCount { 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 GroupResponseFields {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" CreatedOn: ").Append(CreatedOn).Append("\n"); + sb.Append(" ContactsCount: ").Append(ContactsCount).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 GroupResponseFields); + } + + /// + /// Returns true if GroupResponseFields instances are equal + /// + /// Instance of GroupResponseFields to be compared + /// Boolean + public bool Equals(GroupResponseFields 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.CreatedOn == input.CreatedOn || + (this.CreatedOn != null && + this.CreatedOn.Equals(input.CreatedOn)) + ) && + ( + this.ContactsCount == input.ContactsCount || + (this.ContactsCount != null && + this.ContactsCount.Equals(input.ContactsCount)) + ); + } + + /// + /// 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.CreatedOn != null) + hashCode = hashCode * 59 + this.CreatedOn.GetHashCode(); + if (this.ContactsCount != null) + hashCode = hashCode * 59 + this.ContactsCount.GetHashCode(); + return hashCode; + } + } + } + +} diff --git a/src/com.Messente.Api/Model/MessageResult.cs b/src/com.Messente.Api/Model/MessageResult.cs new file mode 100644 index 0000000..596b098 --- /dev/null +++ b/src/com.Messente.Api/Model/MessageResult.cs @@ -0,0 +1,175 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.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 OpenAPIDateConverter = com.Messente.Api.Client.OpenAPIDateConverter; + +namespace com.Messente.Api.Model +{ + /// + /// MessageResult + /// + [DataContract] + public partial class MessageResult : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected MessageResult() { } + /// + /// Initializes a new instance of the class. + /// + /// Unique identifier for the message (required). + /// channel (required). + /// Sender that was used for the message (required). + public MessageResult(Guid? messageId = default(Guid?), Channel channel = default(Channel), string sender = default(string)) + { + // to ensure "messageId" is required (not null) + if (messageId == null) + { + throw new InvalidDataException("messageId is a required property for MessageResult and cannot be null"); + } + else + { + this.MessageId = messageId; + } + // to ensure "channel" is required (not null) + if (channel == null) + { + throw new InvalidDataException("channel is a required property for MessageResult and cannot be null"); + } + else + { + this.Channel = channel; + } + // to ensure "sender" is required (not null) + if (sender == null) + { + throw new InvalidDataException("sender is a required property for MessageResult and cannot be null"); + } + else + { + this.Sender = sender; + } + } + + /// + /// Unique identifier for the message + /// + /// Unique identifier for the message + [DataMember(Name="message_id", EmitDefaultValue=false)] + public Guid? MessageId { get; set; } + + /// + /// Gets or Sets Channel + /// + [DataMember(Name="channel", EmitDefaultValue=false)] + public Channel Channel { get; set; } + + /// + /// Sender that was used for the message + /// + /// Sender that was used for the message + [DataMember(Name="sender", EmitDefaultValue=false)] + public string Sender { 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 MessageResult {\n"); + sb.Append(" MessageId: ").Append(MessageId).Append("\n"); + sb.Append(" Channel: ").Append(Channel).Append("\n"); + sb.Append(" Sender: ").Append(Sender).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 MessageResult); + } + + /// + /// Returns true if MessageResult instances are equal + /// + /// Instance of MessageResult to be compared + /// Boolean + public bool Equals(MessageResult input) + { + if (input == null) + return false; + + return + ( + this.MessageId == input.MessageId || + (this.MessageId != null && + this.MessageId.Equals(input.MessageId)) + ) && + ( + this.Channel == input.Channel || + (this.Channel != null && + this.Channel.Equals(input.Channel)) + ) && + ( + this.Sender == input.Sender || + (this.Sender != null && + this.Sender.Equals(input.Sender)) + ); + } + + /// + /// 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(); + if (this.Channel != null) + hashCode = hashCode * 59 + this.Channel.GetHashCode(); + if (this.Sender != null) + hashCode = hashCode * 59 + this.Sender.GetHashCode(); + return hashCode; + } + } + } + +} diff --git a/src/com.Messente.Api/Model/NumberToBlacklist.cs b/src/com.Messente.Api/Model/NumberToBlacklist.cs new file mode 100644 index 0000000..9e439d8 --- /dev/null +++ b/src/com.Messente.Api/Model/NumberToBlacklist.cs @@ -0,0 +1,126 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.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 OpenAPIDateConverter = com.Messente.Api.Client.OpenAPIDateConverter; + +namespace com.Messente.Api.Model +{ + /// + /// NumberToBlacklist + /// + [DataContract] + public partial class NumberToBlacklist : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected NumberToBlacklist() { } + /// + /// Initializes a new instance of the class. + /// + /// Phone number in e.164 format (required). + public NumberToBlacklist(string phoneNumber = default(string)) + { + // to ensure "phoneNumber" is required (not null) + if (phoneNumber == null) + { + throw new InvalidDataException("phoneNumber is a required property for NumberToBlacklist and cannot be null"); + } + else + { + this.PhoneNumber = phoneNumber; + } + } + + /// + /// Phone number in e.164 format + /// + /// Phone number in e.164 format + [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 NumberToBlacklist {\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 NumberToBlacklist); + } + + /// + /// Returns true if NumberToBlacklist instances are equal + /// + /// Instance of NumberToBlacklist to be compared + /// Boolean + public bool Equals(NumberToBlacklist 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; + } + } + } + +} diff --git a/src/com.Messente.Api/Model/OmniMessageCreateSuccessResponse.cs b/src/com.Messente.Api/Model/OmniMessageCreateSuccessResponse.cs new file mode 100644 index 0000000..db00636 --- /dev/null +++ b/src/com.Messente.Api/Model/OmniMessageCreateSuccessResponse.cs @@ -0,0 +1,176 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.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 OpenAPIDateConverter = com.Messente.Api.Client.OpenAPIDateConverter; + +namespace com.Messente.Api.Model +{ + /// + /// OmniMessageCreateSuccessResponse + /// + [DataContract] + public partial class OmniMessageCreateSuccessResponse : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected OmniMessageCreateSuccessResponse() { } + /// + /// Initializes a new instance of the class. + /// + /// List of messages that compose the Omnimessage (required). + /// Phone number in e.164 format (required). + /// Unique identifier for the Omnimessage (required). + public OmniMessageCreateSuccessResponse(List messages = default(List), string to = default(string), Guid? omnimessageId = default(Guid?)) + { + // to ensure "messages" is required (not null) + if (messages == null) + { + throw new InvalidDataException("messages is a required property for OmniMessageCreateSuccessResponse and cannot be null"); + } + else + { + this.Messages = messages; + } + // to ensure "to" is required (not null) + if (to == null) + { + throw new InvalidDataException("to is a required property for OmniMessageCreateSuccessResponse and cannot be null"); + } + else + { + this.To = to; + } + // to ensure "omnimessageId" is required (not null) + if (omnimessageId == null) + { + throw new InvalidDataException("omnimessageId is a required property for OmniMessageCreateSuccessResponse and cannot be null"); + } + else + { + this.OmnimessageId = omnimessageId; + } + } + + /// + /// List of messages that compose the Omnimessage + /// + /// List of messages that compose the Omnimessage + [DataMember(Name="messages", EmitDefaultValue=false)] + public List Messages { get; set; } + + /// + /// Phone number in e.164 format + /// + /// Phone number in e.164 format + [DataMember(Name="to", EmitDefaultValue=false)] + public string To { get; set; } + + /// + /// Unique identifier for the Omnimessage + /// + /// Unique identifier for the Omnimessage + [DataMember(Name="omnimessage_id", EmitDefaultValue=false)] + public Guid? OmnimessageId { 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 OmniMessageCreateSuccessResponse {\n"); + sb.Append(" Messages: ").Append(Messages).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" OmnimessageId: ").Append(OmnimessageId).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 OmniMessageCreateSuccessResponse); + } + + /// + /// Returns true if OmniMessageCreateSuccessResponse instances are equal + /// + /// Instance of OmniMessageCreateSuccessResponse to be compared + /// Boolean + public bool Equals(OmniMessageCreateSuccessResponse input) + { + if (input == null) + return false; + + return + ( + this.Messages == input.Messages || + this.Messages != null && + this.Messages.SequenceEqual(input.Messages) + ) && + ( + this.To == input.To || + (this.To != null && + this.To.Equals(input.To)) + ) && + ( + this.OmnimessageId == input.OmnimessageId || + (this.OmnimessageId != null && + this.OmnimessageId.Equals(input.OmnimessageId)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Messages != null) + hashCode = hashCode * 59 + this.Messages.GetHashCode(); + if (this.To != null) + hashCode = hashCode * 59 + this.To.GetHashCode(); + if (this.OmnimessageId != null) + hashCode = hashCode * 59 + this.OmnimessageId.GetHashCode(); + return hashCode; + } + } + } + +} diff --git a/src/com.Messente.Api/Model/Omnimessage.cs b/src/com.Messente.Api/Model/Omnimessage.cs new file mode 100644 index 0000000..21c9f8d --- /dev/null +++ b/src/com.Messente.Api/Model/Omnimessage.cs @@ -0,0 +1,184 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.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 OpenAPIDateConverter = com.Messente.Api.Client.OpenAPIDateConverter; + +namespace com.Messente.Api.Model +{ + /// + /// Omnimessage + /// + [DataContract] + public partial class Omnimessage : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Omnimessage() { } + /// + /// Initializes a new instance of the class. + /// + /// Phone number in e.164 format (required). + /// messages (required). + /// URL where the delivery report will be sent. + /// Optional parameter for sending messages at some specific time in the future. Time must be specified in the 8601 format. If no timezone is specified, then the timezone is assumed to be UTC. Examples: * Time specified with timezone: 2018-06-22T09:05:07+00:00 Time specified in UTC: 2018-06-22T09:05:07Z * Time specified without timezone: 2018-06-22T09:05 (equivalent to 2018-06-22T09:05+00:00). + public Omnimessage(string to = default(string), List messages = default(List), string dlrUrl = default(string), DateTime? timeToSend = default(DateTime?)) + { + // to ensure "to" is required (not null) + if (to == null) + { + throw new InvalidDataException("to is a required property for Omnimessage and cannot be null"); + } + else + { + this.To = to; + } + // to ensure "messages" is required (not null) + if (messages == null) + { + throw new InvalidDataException("messages is a required property for Omnimessage and cannot be null"); + } + else + { + this.Messages = messages; + } + this.DlrUrl = dlrUrl; + this.TimeToSend = timeToSend; + } + + /// + /// Phone number in e.164 format + /// + /// Phone number in e.164 format + [DataMember(Name="to", EmitDefaultValue=false)] + public string To { get; set; } + + /// + /// Gets or Sets Messages + /// + [DataMember(Name="messages", EmitDefaultValue=false)] + public List Messages { get; set; } + + /// + /// URL where the delivery report will be sent + /// + /// URL where the delivery report will be sent + [DataMember(Name="dlr_url", EmitDefaultValue=false)] + public string DlrUrl { get; set; } + + /// + /// Optional parameter for sending messages at some specific time in the future. Time must be specified in the 8601 format. If no timezone is specified, then the timezone is assumed to be UTC. Examples: * Time specified with timezone: 2018-06-22T09:05:07+00:00 Time specified in UTC: 2018-06-22T09:05:07Z * Time specified without timezone: 2018-06-22T09:05 (equivalent to 2018-06-22T09:05+00:00) + /// + /// Optional parameter for sending messages at some specific time in the future. Time must be specified in the 8601 format. If no timezone is specified, then the timezone is assumed to be UTC. Examples: * Time specified with timezone: 2018-06-22T09:05:07+00:00 Time specified in UTC: 2018-06-22T09:05:07Z * Time specified without timezone: 2018-06-22T09:05 (equivalent to 2018-06-22T09:05+00:00) + [DataMember(Name="time_to_send", EmitDefaultValue=false)] + public DateTime? TimeToSend { 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 Omnimessage {\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" Messages: ").Append(Messages).Append("\n"); + sb.Append(" DlrUrl: ").Append(DlrUrl).Append("\n"); + sb.Append(" TimeToSend: ").Append(TimeToSend).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 Omnimessage); + } + + /// + /// Returns true if Omnimessage instances are equal + /// + /// Instance of Omnimessage to be compared + /// Boolean + public bool Equals(Omnimessage input) + { + if (input == null) + return false; + + return + ( + this.To == input.To || + (this.To != null && + this.To.Equals(input.To)) + ) && + ( + this.Messages == input.Messages || + this.Messages != null && + this.Messages.SequenceEqual(input.Messages) + ) && + ( + this.DlrUrl == input.DlrUrl || + (this.DlrUrl != null && + this.DlrUrl.Equals(input.DlrUrl)) + ) && + ( + this.TimeToSend == input.TimeToSend || + (this.TimeToSend != null && + this.TimeToSend.Equals(input.TimeToSend)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.To != null) + hashCode = hashCode * 59 + this.To.GetHashCode(); + if (this.Messages != null) + hashCode = hashCode * 59 + this.Messages.GetHashCode(); + if (this.DlrUrl != null) + hashCode = hashCode * 59 + this.DlrUrl.GetHashCode(); + if (this.TimeToSend != null) + hashCode = hashCode * 59 + this.TimeToSend.GetHashCode(); + return hashCode; + } + } + } + +} diff --git a/src/com.Messente.Api/Model/SMS.cs b/src/com.Messente.Api/Model/SMS.cs new file mode 100644 index 0000000..45af0ac --- /dev/null +++ b/src/com.Messente.Api/Model/SMS.cs @@ -0,0 +1,245 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.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 OpenAPIDateConverter = com.Messente.Api.Client.OpenAPIDateConverter; + +namespace com.Messente.Api.Model +{ + /// + /// SMS message content + /// + [DataContract] + public partial class SMS : IEquatable + { + /// + /// Defines how non-GSM characters will be treated: - \"on\" Use replacement settings from the account's [API Auto Replace settings page](https://dashboard.messente.com/api-settings/auto-replace)(default) - \"full\" All non GSM 03.38 characters will be replaced with suitable alternatives - \"off\" Message content is not modified in any way + /// + /// Defines how non-GSM characters will be treated: - \"on\" Use replacement settings from the account's [API Auto Replace settings page](https://dashboard.messente.com/api-settings/auto-replace)(default) - \"full\" All non GSM 03.38 characters will be replaced with suitable alternatives - \"off\" Message content is not modified in any way + [JsonConverter(typeof(StringEnumConverter))] + public enum AutoconvertEnum + { + /// + /// Enum Full for value: full + /// + [EnumMember(Value = "full")] + Full = 1, + + /// + /// Enum On for value: on + /// + [EnumMember(Value = "on")] + On = 2, + + /// + /// Enum Off for value: off + /// + [EnumMember(Value = "off")] + Off = 3 + + } + + /// + /// Defines how non-GSM characters will be treated: - \"on\" Use replacement settings from the account's [API Auto Replace settings page](https://dashboard.messente.com/api-settings/auto-replace)(default) - \"full\" All non GSM 03.38 characters will be replaced with suitable alternatives - \"off\" Message content is not modified in any way + /// + /// Defines how non-GSM characters will be treated: - \"on\" Use replacement settings from the account's [API Auto Replace settings page](https://dashboard.messente.com/api-settings/auto-replace)(default) - \"full\" All non GSM 03.38 characters will be replaced with suitable alternatives - \"off\" Message content is not modified in any way + [DataMember(Name="autoconvert", EmitDefaultValue=false)] + public AutoconvertEnum? Autoconvert { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SMS() { } + /// + /// Initializes a new instance of the class. + /// + /// Text content of the SMS (required). + /// Phone number or alphanumeric sender name. + /// After how many minutes this channel is considered as failed and the next channel is attempted. + /// Defines how non-GSM characters will be treated: - \"on\" Use replacement settings from the account's [API Auto Replace settings page](https://dashboard.messente.com/api-settings/auto-replace)(default) - \"full\" All non GSM 03.38 characters will be replaced with suitable alternatives - \"off\" Message content is not modified in any way. + /// hex-encoded string containing SMS UDH. + /// channel (default to "sms"). + public SMS(string text = default(string), string sender = default(string), int? validity = default(int?), AutoconvertEnum? autoconvert = default(AutoconvertEnum?), string udh = default(string), string channel = "sms") + { + // to ensure "text" is required (not null) + if (text == null) + { + throw new InvalidDataException("text is a required property for SMS and cannot be null"); + } + else + { + this.Text = text; + } + this.Sender = sender; + this.Validity = validity; + this.Autoconvert = autoconvert; + this.Udh = udh; + // use default value if no "channel" provided + if (channel == null) + { + this.Channel = "sms"; + } + else + { + this.Channel = channel; + } + } + + /// + /// Text content of the SMS + /// + /// Text content of the SMS + [DataMember(Name="text", EmitDefaultValue=false)] + public string Text { get; set; } + + /// + /// Phone number or alphanumeric sender name + /// + /// Phone number or alphanumeric sender name + [DataMember(Name="sender", EmitDefaultValue=false)] + public string Sender { get; set; } + + /// + /// After how many minutes this channel is considered as failed and the next channel is attempted + /// + /// After how many minutes this channel is considered as failed and the next channel is attempted + [DataMember(Name="validity", EmitDefaultValue=false)] + public int? Validity { get; set; } + + + /// + /// hex-encoded string containing SMS UDH + /// + /// hex-encoded string containing SMS UDH + [DataMember(Name="udh", EmitDefaultValue=false)] + public string Udh { get; set; } + + /// + /// Gets or Sets Channel + /// + [DataMember(Name="channel", EmitDefaultValue=false)] + public string Channel { 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 SMS {\n"); + sb.Append(" Text: ").Append(Text).Append("\n"); + sb.Append(" Sender: ").Append(Sender).Append("\n"); + sb.Append(" Validity: ").Append(Validity).Append("\n"); + sb.Append(" Autoconvert: ").Append(Autoconvert).Append("\n"); + sb.Append(" Udh: ").Append(Udh).Append("\n"); + sb.Append(" Channel: ").Append(Channel).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 SMS); + } + + /// + /// Returns true if SMS instances are equal + /// + /// Instance of SMS to be compared + /// Boolean + public bool Equals(SMS input) + { + if (input == null) + return false; + + return + ( + this.Text == input.Text || + (this.Text != null && + this.Text.Equals(input.Text)) + ) && + ( + this.Sender == input.Sender || + (this.Sender != null && + this.Sender.Equals(input.Sender)) + ) && + ( + this.Validity == input.Validity || + (this.Validity != null && + this.Validity.Equals(input.Validity)) + ) && + ( + this.Autoconvert == input.Autoconvert || + (this.Autoconvert != null && + this.Autoconvert.Equals(input.Autoconvert)) + ) && + ( + this.Udh == input.Udh || + (this.Udh != null && + this.Udh.Equals(input.Udh)) + ) && + ( + this.Channel == input.Channel || + (this.Channel != null && + this.Channel.Equals(input.Channel)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Text != null) + hashCode = hashCode * 59 + this.Text.GetHashCode(); + if (this.Sender != null) + hashCode = hashCode * 59 + this.Sender.GetHashCode(); + if (this.Validity != null) + hashCode = hashCode * 59 + this.Validity.GetHashCode(); + if (this.Autoconvert != null) + hashCode = hashCode * 59 + this.Autoconvert.GetHashCode(); + if (this.Udh != null) + hashCode = hashCode * 59 + this.Udh.GetHashCode(); + if (this.Channel != null) + hashCode = hashCode * 59 + this.Channel.GetHashCode(); + return hashCode; + } + } + } + +} diff --git a/src/com.Messente.Api/Model/Status.cs b/src/com.Messente.Api/Model/Status.cs new file mode 100644 index 0000000..f34e6a4 --- /dev/null +++ b/src/com.Messente.Api/Model/Status.cs @@ -0,0 +1,102 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.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 OpenAPIDateConverter = com.Messente.Api.Client.OpenAPIDateConverter; + +namespace com.Messente.Api.Model +{ + /// + /// The human-readable equivalent for this field is contained in \"error\". This value is *null* if the message is still being processed. + /// + /// The human-readable equivalent for this field is contained in \"error\". This value is *null* if the message is still being processed. + + [JsonConverter(typeof(StringEnumConverter))] + + public enum Status + { + /// + /// Enum ACK for value: ACK + /// + [EnumMember(Value = "ACK")] + ACK = 1, + + /// + /// Enum DELIVRD for value: DELIVRD + /// + [EnumMember(Value = "DELIVRD")] + DELIVRD = 2, + + /// + /// Enum UNDELIV for value: UNDELIV + /// + [EnumMember(Value = "UNDELIV")] + UNDELIV = 3, + + /// + /// Enum FAILED for value: FAILED + /// + [EnumMember(Value = "FAILED")] + FAILED = 4, + + /// + /// Enum UNKNOWN for value: UNKNOWN + /// + [EnumMember(Value = "UNKNOWN")] + UNKNOWN = 5, + + /// + /// Enum ACCEPTD for value: ACCEPTD + /// + [EnumMember(Value = "ACCEPTD")] + ACCEPTD = 6, + + /// + /// Enum REJECTD for value: REJECTD + /// + [EnumMember(Value = "REJECTD")] + REJECTD = 7, + + /// + /// Enum DELETED for value: DELETED + /// + [EnumMember(Value = "DELETED")] + DELETED = 8, + + /// + /// Enum EXPIRED for value: EXPIRED + /// + [EnumMember(Value = "EXPIRED")] + EXPIRED = 9, + + /// + /// Enum NACK for value: NACK + /// + [EnumMember(Value = "NACK")] + NACK = 10, + + /// + /// Enum SEEN for value: SEEN + /// + [EnumMember(Value = "SEEN")] + SEEN = 11 + + } + +} diff --git a/src/com.Messente.Api/Model/Viber.cs b/src/com.Messente.Api/Model/Viber.cs new file mode 100644 index 0000000..ec5636a --- /dev/null +++ b/src/com.Messente.Api/Model/Viber.cs @@ -0,0 +1,222 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.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 OpenAPIDateConverter = com.Messente.Api.Client.OpenAPIDateConverter; + +namespace com.Messente.Api.Model +{ + /// + /// Viber message content + /// + [DataContract] + public partial class Viber : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + /// Phone number or alphanumeric sender name. + /// After how many minutes this channel is considered as failed and the next channel is attempted. + /// Plaintext content for Viber. + /// URL for the embedded image. Valid combinations: 1) image_url, 2) text, image_url, button_url, button_text. + /// URL of the button, must be specified along with ''text'', ''button_text'' and ''image_url'' (optional). + /// Must be specified along with ''text'', ''button_url'', ''button_text'', ''image_url'' (optional). + /// channel (default to "viber"). + public Viber(string sender = default(string), int? validity = default(int?), string text = default(string), string imageUrl = default(string), string buttonUrl = default(string), string buttonText = default(string), string channel = "viber") + { + this.Sender = sender; + this.Validity = validity; + this.Text = text; + this.ImageUrl = imageUrl; + this.ButtonUrl = buttonUrl; + this.ButtonText = buttonText; + // use default value if no "channel" provided + if (channel == null) + { + this.Channel = "viber"; + } + else + { + this.Channel = channel; + } + } + + /// + /// Phone number or alphanumeric sender name + /// + /// Phone number or alphanumeric sender name + [DataMember(Name="sender", EmitDefaultValue=false)] + public string Sender { get; set; } + + /// + /// After how many minutes this channel is considered as failed and the next channel is attempted + /// + /// After how many minutes this channel is considered as failed and the next channel is attempted + [DataMember(Name="validity", EmitDefaultValue=false)] + public int? Validity { get; set; } + + /// + /// Plaintext content for Viber + /// + /// Plaintext content for Viber + [DataMember(Name="text", EmitDefaultValue=false)] + public string Text { get; set; } + + /// + /// URL for the embedded image. Valid combinations: 1) image_url, 2) text, image_url, button_url, button_text + /// + /// URL for the embedded image. Valid combinations: 1) image_url, 2) text, image_url, button_url, button_text + [DataMember(Name="image_url", EmitDefaultValue=false)] + public string ImageUrl { get; set; } + + /// + /// URL of the button, must be specified along with ''text'', ''button_text'' and ''image_url'' (optional) + /// + /// URL of the button, must be specified along with ''text'', ''button_text'' and ''image_url'' (optional) + [DataMember(Name="button_url", EmitDefaultValue=false)] + public string ButtonUrl { get; set; } + + /// + /// Must be specified along with ''text'', ''button_url'', ''button_text'', ''image_url'' (optional) + /// + /// Must be specified along with ''text'', ''button_url'', ''button_text'', ''image_url'' (optional) + [DataMember(Name="button_text", EmitDefaultValue=false)] + public string ButtonText { get; set; } + + /// + /// Gets or Sets Channel + /// + [DataMember(Name="channel", EmitDefaultValue=false)] + public string Channel { 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 Viber {\n"); + sb.Append(" Sender: ").Append(Sender).Append("\n"); + sb.Append(" Validity: ").Append(Validity).Append("\n"); + sb.Append(" Text: ").Append(Text).Append("\n"); + sb.Append(" ImageUrl: ").Append(ImageUrl).Append("\n"); + sb.Append(" ButtonUrl: ").Append(ButtonUrl).Append("\n"); + sb.Append(" ButtonText: ").Append(ButtonText).Append("\n"); + sb.Append(" Channel: ").Append(Channel).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 Viber); + } + + /// + /// Returns true if Viber instances are equal + /// + /// Instance of Viber to be compared + /// Boolean + public bool Equals(Viber input) + { + if (input == null) + return false; + + return + ( + this.Sender == input.Sender || + (this.Sender != null && + this.Sender.Equals(input.Sender)) + ) && + ( + this.Validity == input.Validity || + (this.Validity != null && + this.Validity.Equals(input.Validity)) + ) && + ( + this.Text == input.Text || + (this.Text != null && + this.Text.Equals(input.Text)) + ) && + ( + this.ImageUrl == input.ImageUrl || + (this.ImageUrl != null && + this.ImageUrl.Equals(input.ImageUrl)) + ) && + ( + this.ButtonUrl == input.ButtonUrl || + (this.ButtonUrl != null && + this.ButtonUrl.Equals(input.ButtonUrl)) + ) && + ( + this.ButtonText == input.ButtonText || + (this.ButtonText != null && + this.ButtonText.Equals(input.ButtonText)) + ) && + ( + this.Channel == input.Channel || + (this.Channel != null && + this.Channel.Equals(input.Channel)) + ); + } + + /// + /// 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.Validity != null) + hashCode = hashCode * 59 + this.Validity.GetHashCode(); + if (this.Text != null) + hashCode = hashCode * 59 + this.Text.GetHashCode(); + if (this.ImageUrl != null) + hashCode = hashCode * 59 + this.ImageUrl.GetHashCode(); + if (this.ButtonUrl != null) + hashCode = hashCode * 59 + this.ButtonUrl.GetHashCode(); + if (this.ButtonText != null) + hashCode = hashCode * 59 + this.ButtonText.GetHashCode(); + if (this.Channel != null) + hashCode = hashCode * 59 + this.Channel.GetHashCode(); + return hashCode; + } + } + } + +} diff --git a/src/com.Messente.Api/Model/WhatsApp.cs b/src/com.Messente.Api/Model/WhatsApp.cs new file mode 100644 index 0000000..3b557d6 --- /dev/null +++ b/src/com.Messente.Api/Model/WhatsApp.cs @@ -0,0 +1,218 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.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 OpenAPIDateConverter = com.Messente.Api.Client.OpenAPIDateConverter; + +namespace com.Messente.Api.Model +{ + /// + /// WhatsApp message content. Only one of \"text\", \"image\", \"document\" or \"audio\" can be provided. + /// + [DataContract] + public partial class WhatsApp : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + /// Phone number or alphanumeric sender name. + /// After how many minutes this channel is considered as failed and the next channel is attempted. + /// text. + /// image. + /// document. + /// audio. + /// channel (default to "whatsapp"). + public WhatsApp(string sender = default(string), int? validity = default(int?), WhatsAppText text = default(WhatsAppText), WhatsAppImage image = default(WhatsAppImage), WhatsAppDocument document = default(WhatsAppDocument), WhatsAppAudio audio = default(WhatsAppAudio), string channel = "whatsapp") + { + this.Sender = sender; + this.Validity = validity; + this.Text = text; + this.Image = image; + this.Document = document; + this.Audio = audio; + // use default value if no "channel" provided + if (channel == null) + { + this.Channel = "whatsapp"; + } + else + { + this.Channel = channel; + } + } + + /// + /// Phone number or alphanumeric sender name + /// + /// Phone number or alphanumeric sender name + [DataMember(Name="sender", EmitDefaultValue=false)] + public string Sender { get; set; } + + /// + /// After how many minutes this channel is considered as failed and the next channel is attempted + /// + /// After how many minutes this channel is considered as failed and the next channel is attempted + [DataMember(Name="validity", EmitDefaultValue=false)] + public int? Validity { get; set; } + + /// + /// Gets or Sets Text + /// + [DataMember(Name="text", EmitDefaultValue=false)] + public WhatsAppText Text { get; set; } + + /// + /// Gets or Sets Image + /// + [DataMember(Name="image", EmitDefaultValue=false)] + public WhatsAppImage Image { get; set; } + + /// + /// Gets or Sets Document + /// + [DataMember(Name="document", EmitDefaultValue=false)] + public WhatsAppDocument Document { get; set; } + + /// + /// Gets or Sets Audio + /// + [DataMember(Name="audio", EmitDefaultValue=false)] + public WhatsAppAudio Audio { get; set; } + + /// + /// Gets or Sets Channel + /// + [DataMember(Name="channel", EmitDefaultValue=false)] + public string Channel { 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 WhatsApp {\n"); + sb.Append(" Sender: ").Append(Sender).Append("\n"); + sb.Append(" Validity: ").Append(Validity).Append("\n"); + sb.Append(" Text: ").Append(Text).Append("\n"); + sb.Append(" Image: ").Append(Image).Append("\n"); + sb.Append(" Document: ").Append(Document).Append("\n"); + sb.Append(" Audio: ").Append(Audio).Append("\n"); + sb.Append(" Channel: ").Append(Channel).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 WhatsApp); + } + + /// + /// Returns true if WhatsApp instances are equal + /// + /// Instance of WhatsApp to be compared + /// Boolean + public bool Equals(WhatsApp input) + { + if (input == null) + return false; + + return + ( + this.Sender == input.Sender || + (this.Sender != null && + this.Sender.Equals(input.Sender)) + ) && + ( + this.Validity == input.Validity || + (this.Validity != null && + this.Validity.Equals(input.Validity)) + ) && + ( + this.Text == input.Text || + (this.Text != null && + this.Text.Equals(input.Text)) + ) && + ( + this.Image == input.Image || + (this.Image != null && + this.Image.Equals(input.Image)) + ) && + ( + this.Document == input.Document || + (this.Document != null && + this.Document.Equals(input.Document)) + ) && + ( + this.Audio == input.Audio || + (this.Audio != null && + this.Audio.Equals(input.Audio)) + ) && + ( + this.Channel == input.Channel || + (this.Channel != null && + this.Channel.Equals(input.Channel)) + ); + } + + /// + /// 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.Validity != null) + hashCode = hashCode * 59 + this.Validity.GetHashCode(); + if (this.Text != null) + hashCode = hashCode * 59 + this.Text.GetHashCode(); + if (this.Image != null) + hashCode = hashCode * 59 + this.Image.GetHashCode(); + if (this.Document != null) + hashCode = hashCode * 59 + this.Document.GetHashCode(); + if (this.Audio != null) + hashCode = hashCode * 59 + this.Audio.GetHashCode(); + if (this.Channel != null) + hashCode = hashCode * 59 + this.Channel.GetHashCode(); + return hashCode; + } + } + } + +} diff --git a/src/com.Messente.Api/Model/WhatsAppAudio.cs b/src/com.Messente.Api/Model/WhatsAppAudio.cs new file mode 100644 index 0000000..e499297 --- /dev/null +++ b/src/com.Messente.Api/Model/WhatsAppAudio.cs @@ -0,0 +1,126 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.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 OpenAPIDateConverter = com.Messente.Api.Client.OpenAPIDateConverter; + +namespace com.Messente.Api.Model +{ + /// + /// WhatsAppAudio + /// + [DataContract] + public partial class WhatsAppAudio : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected WhatsAppAudio() { } + /// + /// Initializes a new instance of the class. + /// + /// Base64-encoded audio (required). + public WhatsAppAudio(string content = default(string)) + { + // to ensure "content" is required (not null) + if (content == null) + { + throw new InvalidDataException("content is a required property for WhatsAppAudio and cannot be null"); + } + else + { + this.Content = content; + } + } + + /// + /// Base64-encoded audio + /// + /// Base64-encoded audio + [DataMember(Name="content", EmitDefaultValue=false)] + public string Content { 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 WhatsAppAudio {\n"); + sb.Append(" Content: ").Append(Content).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 WhatsAppAudio); + } + + /// + /// Returns true if WhatsAppAudio instances are equal + /// + /// Instance of WhatsAppAudio to be compared + /// Boolean + public bool Equals(WhatsAppAudio input) + { + if (input == null) + return false; + + return + ( + this.Content == input.Content || + (this.Content != null && + this.Content.Equals(input.Content)) + ); + } + + /// + /// 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(); + return hashCode; + } + } + } + +} diff --git a/src/com.Messente.Api/Model/WhatsAppDocument.cs b/src/com.Messente.Api/Model/WhatsAppDocument.cs new file mode 100644 index 0000000..a98f7d6 --- /dev/null +++ b/src/com.Messente.Api/Model/WhatsAppDocument.cs @@ -0,0 +1,143 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.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 OpenAPIDateConverter = com.Messente.Api.Client.OpenAPIDateConverter; + +namespace com.Messente.Api.Model +{ + /// + /// WhatsAppDocument + /// + [DataContract] + public partial class WhatsAppDocument : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected WhatsAppDocument() { } + /// + /// Initializes a new instance of the class. + /// + /// Description for the document. + /// Base64-encoded image (required). + public WhatsAppDocument(string caption = default(string), string content = default(string)) + { + // to ensure "content" is required (not null) + if (content == null) + { + throw new InvalidDataException("content is a required property for WhatsAppDocument and cannot be null"); + } + else + { + this.Content = content; + } + this.Caption = caption; + } + + /// + /// Description for the document + /// + /// Description for the document + [DataMember(Name="caption", EmitDefaultValue=false)] + public string Caption { get; set; } + + /// + /// Base64-encoded image + /// + /// Base64-encoded image + [DataMember(Name="content", EmitDefaultValue=false)] + public string Content { 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 WhatsAppDocument {\n"); + sb.Append(" Caption: ").Append(Caption).Append("\n"); + sb.Append(" Content: ").Append(Content).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 WhatsAppDocument); + } + + /// + /// Returns true if WhatsAppDocument instances are equal + /// + /// Instance of WhatsAppDocument to be compared + /// Boolean + public bool Equals(WhatsAppDocument input) + { + if (input == null) + return false; + + return + ( + this.Caption == input.Caption || + (this.Caption != null && + this.Caption.Equals(input.Caption)) + ) && + ( + this.Content == input.Content || + (this.Content != null && + this.Content.Equals(input.Content)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Caption != null) + hashCode = hashCode * 59 + this.Caption.GetHashCode(); + if (this.Content != null) + hashCode = hashCode * 59 + this.Content.GetHashCode(); + return hashCode; + } + } + } + +} diff --git a/src/com.Messente.Api/Model/WhatsAppImage.cs b/src/com.Messente.Api/Model/WhatsAppImage.cs new file mode 100644 index 0000000..ca9d8db --- /dev/null +++ b/src/com.Messente.Api/Model/WhatsAppImage.cs @@ -0,0 +1,143 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.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 OpenAPIDateConverter = com.Messente.Api.Client.OpenAPIDateConverter; + +namespace com.Messente.Api.Model +{ + /// + /// WhatsAppImage + /// + [DataContract] + public partial class WhatsAppImage : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected WhatsAppImage() { } + /// + /// Initializes a new instance of the class. + /// + /// Description for the image. + /// Base64-encoded image (required). + public WhatsAppImage(string caption = default(string), string content = default(string)) + { + // to ensure "content" is required (not null) + if (content == null) + { + throw new InvalidDataException("content is a required property for WhatsAppImage and cannot be null"); + } + else + { + this.Content = content; + } + this.Caption = caption; + } + + /// + /// Description for the image + /// + /// Description for the image + [DataMember(Name="caption", EmitDefaultValue=false)] + public string Caption { get; set; } + + /// + /// Base64-encoded image + /// + /// Base64-encoded image + [DataMember(Name="content", EmitDefaultValue=false)] + public string Content { 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 WhatsAppImage {\n"); + sb.Append(" Caption: ").Append(Caption).Append("\n"); + sb.Append(" Content: ").Append(Content).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 WhatsAppImage); + } + + /// + /// Returns true if WhatsAppImage instances are equal + /// + /// Instance of WhatsAppImage to be compared + /// Boolean + public bool Equals(WhatsAppImage input) + { + if (input == null) + return false; + + return + ( + this.Caption == input.Caption || + (this.Caption != null && + this.Caption.Equals(input.Caption)) + ) && + ( + this.Content == input.Content || + (this.Content != null && + this.Content.Equals(input.Content)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Caption != null) + hashCode = hashCode * 59 + this.Caption.GetHashCode(); + if (this.Content != null) + hashCode = hashCode * 59 + this.Content.GetHashCode(); + return hashCode; + } + } + } + +} diff --git a/src/com.Messente.Api/Model/WhatsAppText.cs b/src/com.Messente.Api/Model/WhatsAppText.cs new file mode 100644 index 0000000..9826b65 --- /dev/null +++ b/src/com.Messente.Api/Model/WhatsAppText.cs @@ -0,0 +1,151 @@ +/* + * Messente API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: 0.0.1 + * Contact: messente@messente.com + * Generated by: https://github.com/openapitools/openapi-generator.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 OpenAPIDateConverter = com.Messente.Api.Client.OpenAPIDateConverter; + +namespace com.Messente.Api.Model +{ + /// + /// WhatsAppText + /// + [DataContract] + public partial class WhatsAppText : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected WhatsAppText() { } + /// + /// Initializes a new instance of the class. + /// + /// Whether to display link preview if the message contains a hyperlink. (default to true). + /// Plaintext content for WhatsApp, can contains URLs, emojis and formatting (required). + public WhatsAppText(bool? previewUrl = true, string body = default(string)) + { + // to ensure "body" is required (not null) + if (body == null) + { + throw new InvalidDataException("body is a required property for WhatsAppText and cannot be null"); + } + else + { + this.Body = body; + } + // use default value if no "previewUrl" provided + if (previewUrl == null) + { + this.PreviewUrl = true; + } + else + { + this.PreviewUrl = previewUrl; + } + } + + /// + /// Whether to display link preview if the message contains a hyperlink. + /// + /// Whether to display link preview if the message contains a hyperlink. + [DataMember(Name="preview_url", EmitDefaultValue=false)] + public bool? PreviewUrl { get; set; } + + /// + /// Plaintext content for WhatsApp, can contains URLs, emojis and formatting + /// + /// Plaintext content for WhatsApp, can contains URLs, emojis and formatting + [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 WhatsAppText {\n"); + sb.Append(" PreviewUrl: ").Append(PreviewUrl).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 WhatsAppText); + } + + /// + /// Returns true if WhatsAppText instances are equal + /// + /// Instance of WhatsAppText to be compared + /// Boolean + public bool Equals(WhatsAppText input) + { + if (input == null) + return false; + + return + ( + this.PreviewUrl == input.PreviewUrl || + (this.PreviewUrl != null && + this.PreviewUrl.Equals(input.PreviewUrl)) + ) && + ( + 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.PreviewUrl != null) + hashCode = hashCode * 59 + this.PreviewUrl.GetHashCode(); + if (this.Body != null) + hashCode = hashCode * 59 + this.Body.GetHashCode(); + return hashCode; + } + } + } + +} diff --git a/src/com.Messente.Api/Properties/AssemblyInfo.cs b/src/com.Messente.Api/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..0d10e32 --- /dev/null +++ b/src/com.Messente.Api/Properties/AssemblyInfo.cs @@ -0,0 +1,32 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("OpenAPI Library")] +[assembly: AssemblyDescription("A library generated from a OpenAPI doc")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("OpenAPI")] +[assembly: AssemblyProduct("OpenAPILibrary")] +[assembly: AssemblyCopyright("No Copyright")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("0.0.1")] +[assembly: AssemblyFileVersion("0.0.1")] diff --git a/src/com.Messente.Api/com.Messente.Api.csproj b/src/com.Messente.Api/com.Messente.Api.csproj new file mode 100644 index 0000000..671ed1a --- /dev/null +++ b/src/com.Messente.Api/com.Messente.Api.csproj @@ -0,0 +1,52 @@ + + + + + 14.0 + Debug + AnyCPU + {CC8784CC-0557-4397-B0EE-36AF0775CCF0} + Library + Properties + com.Messente.Api + com.Messente.Api + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + v5.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + diff --git a/src/com.Messente.Api/project.json b/src/com.Messente.Api/project.json new file mode 100644 index 0000000..d5d3017 --- /dev/null +++ b/src/com.Messente.Api/project.json @@ -0,0 +1,12 @@ +{ + "supports": {}, + "dependencies": { + "FubarCoder.RestSharp.Portable.Core": "4.0.7", + "FubarCoder.RestSharp.Portable.HttpClient": "4.0.7", + "Newtonsoft.Json": "10.0.3", + "JsonSubTypes": "1.2.0" + }, + "frameworks": { + "netstandard1.3": {} + } +} \ No newline at end of file From 27261275e2733ac0cf3ec21b094f0ef4aad721ca Mon Sep 17 00:00:00 2001 From: api-librarian Date: Tue, 5 Mar 2019 14:47:49 +0000 Subject: [PATCH 02/20] Travis update: Mar 2019 (Build 59) [skip ci] --- docs/ContactsApi.md | 4 ++-- src/com.Messente.Api/Api/ContactsApi.cs | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/ContactsApi.md b/docs/ContactsApi.md index 9cd1107..8546009 100644 --- a/docs/ContactsApi.md +++ b/docs/ContactsApi.md @@ -355,7 +355,7 @@ namespace Example Configuration.Default.Password = "YOUR_PASSWORD"; var apiInstance = new ContactsApi(); - var groupIds = new List(); // List | Group id string in uuid format. (optional) + var groupIds = new List(); // List | Optional one or many group id strings in uuid format. For example: \"/contacts?groupIds=group_id_one&groupIds=group_id_two\" (optional) try { @@ -376,7 +376,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **groupIds** | [**List<string>**](string.md)| Group id string in uuid format. | [optional] + **groupIds** | [**List<string>**](string.md)| Optional one or many group id strings in uuid format. For example: \"/contacts?groupIds=group_id_one&groupIds=group_id_two\" | [optional] ### Return type diff --git a/src/com.Messente.Api/Api/ContactsApi.cs b/src/com.Messente.Api/Api/ContactsApi.cs index e9eb14e..8cf8e1e 100644 --- a/src/com.Messente.Api/Api/ContactsApi.cs +++ b/src/com.Messente.Api/Api/ContactsApi.cs @@ -138,7 +138,7 @@ public interface IContactsApi : IApiAccessor /// /// /// Thrown when fails to make API call - /// Group id string in uuid format. (optional) + /// Optional one or many group id strings in uuid format. For example: \"/contacts?groupIds=group_id_one&groupIds=group_id_two\" (optional) /// ContactListEnvelope ContactListEnvelope FetchContacts (List groupIds = null); @@ -149,7 +149,7 @@ public interface IContactsApi : IApiAccessor /// /// /// Thrown when fails to make API call - /// Group id string in uuid format. (optional) + /// Optional one or many group id strings in uuid format. For example: \"/contacts?groupIds=group_id_one&groupIds=group_id_two\" (optional) /// ApiResponse of ContactListEnvelope ApiResponse FetchContactsWithHttpInfo (List groupIds = null); /// @@ -314,7 +314,7 @@ public interface IContactsApi : IApiAccessor /// /// /// Thrown when fails to make API call - /// Group id string in uuid format. (optional) + /// Optional one or many group id strings in uuid format. For example: \"/contacts?groupIds=group_id_one&groupIds=group_id_two\" (optional) /// Task of ContactListEnvelope System.Threading.Tasks.Task FetchContactsAsync (List groupIds = null); @@ -325,7 +325,7 @@ public interface IContactsApi : IApiAccessor /// /// /// Thrown when fails to make API call - /// Group id string in uuid format. (optional) + /// Optional one or many group id strings in uuid format. For example: \"/contacts?groupIds=group_id_one&groupIds=group_id_two\" (optional) /// Task of ApiResponse (ContactListEnvelope) System.Threading.Tasks.Task> FetchContactsAsyncWithHttpInfo (List groupIds = null); /// @@ -1240,7 +1240,7 @@ public async System.Threading.Tasks.Task> FetchCo /// Returns all contacts. /// /// Thrown when fails to make API call - /// Group id string in uuid format. (optional) + /// Optional one or many group id strings in uuid format. For example: \"/contacts?groupIds=group_id_one&groupIds=group_id_two\" (optional) /// ContactListEnvelope public ContactListEnvelope FetchContacts (List groupIds = null) { @@ -1252,7 +1252,7 @@ public ContactListEnvelope FetchContacts (List groupIds = null) /// Returns all contacts. /// /// Thrown when fails to make API call - /// Group id string in uuid format. (optional) + /// Optional one or many group id strings in uuid format. For example: \"/contacts?groupIds=group_id_one&groupIds=group_id_two\" (optional) /// ApiResponse of ContactListEnvelope public ApiResponse< ContactListEnvelope > FetchContactsWithHttpInfo (List groupIds = null) { @@ -1309,7 +1309,7 @@ public ApiResponse< ContactListEnvelope > FetchContactsWithHttpInfo (List /// Thrown when fails to make API call - /// Group id string in uuid format. (optional) + /// Optional one or many group id strings in uuid format. For example: \"/contacts?groupIds=group_id_one&groupIds=group_id_two\" (optional) /// Task of ContactListEnvelope public async System.Threading.Tasks.Task FetchContactsAsync (List groupIds = null) { @@ -1322,7 +1322,7 @@ public async System.Threading.Tasks.Task FetchContactsAsync /// Returns all contacts. /// /// Thrown when fails to make API call - /// Group id string in uuid format. (optional) + /// Optional one or many group id strings in uuid format. For example: \"/contacts?groupIds=group_id_one&groupIds=group_id_two\" (optional) /// Task of ApiResponse (ContactListEnvelope) public async System.Threading.Tasks.Task> FetchContactsAsyncWithHttpInfo (List groupIds = null) { From 6521c5e6ac77255b4561b7cf8d5acaaab89804ef Mon Sep 17 00:00:00 2001 From: api-librarian Date: Mon, 11 Mar 2019 14:38:57 +0000 Subject: [PATCH 03/20] Travis update: Mar 2019 (Build 65) [skip ci] --- README.md | 148 +----------------------------------------------------- 1 file changed, 1 insertion(+), 147 deletions(-) diff --git a/README.md b/README.md index 647b3c6..9965fe4 100644 --- a/README.md +++ b/README.md @@ -1,147 +1 @@ -# com.Messente.Api - the C# library for the Messente API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 0.0.1 -- SDK version: 0.0.1 -- Build package: org.openapitools.codegen.languages.CSharpClientCodegen - - -## Frameworks supported -- .NET Core >=1.0 -- .NET Framework >=4.6 -- Mono/Xamarin >=vNext -- UWP >=10.0 - - -## Dependencies -- FubarCoder.RestSharp.Portable.Core >=4.0.7 -- FubarCoder.RestSharp.Portable.HttpClient >=4.0.7 -- Newtonsoft.Json >=10.0.3 - - -## Installation -Generate the DLL using your preferred tool - -Then include the DLL (under the `bin` folder) in the C# project, and use the namespaces: -```csharp -using com.Messente.Api.Api; -using com.Messente.Api.Client; -using com.Messente.Api.Model; -``` - -## Getting Started - -```csharp -using System; -using System.Diagnostics; -using com.Messente.Api.Api; -using com.Messente.Api.Client; -using com.Messente.Api.Model; - -namespace Example -{ - public class Example - { - public void main() - { - - // Configure HTTP basic authorization: basicAuth - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - - var apiInstance = new BlacklistApi(); - var numberToBlacklist = new NumberToBlacklist(); // NumberToBlacklist | Phone number to be blacklisted - - try - { - // Adds a phone number to the blacklist. - apiInstance.AddToBlacklist(numberToBlacklist); - } - catch (Exception e) - { - Debug.Print("Exception when calling BlacklistApi.AddToBlacklist: " + e.Message ); - } - - } - } -} -``` - - -## Documentation for API Endpoints - -All URIs are relative to *https://api.messente.com/v1* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*BlacklistApi* | [**AddToBlacklist**](docs/BlacklistApi.md#addtoblacklist) | **POST** /phonebook/blacklist | Adds a phone number to the blacklist. -*BlacklistApi* | [**DeleteFromBlacklist**](docs/BlacklistApi.md#deletefromblacklist) | **DELETE** /blacklist/{phone} | Deletes a phone number from the blacklist. -*BlacklistApi* | [**FetchBlacklist**](docs/BlacklistApi.md#fetchblacklist) | **GET** /phonebook/blacklist | Returns all blacklisted phone numbers. -*BlacklistApi* | [**IsBlacklisted**](docs/BlacklistApi.md#isblacklisted) | **GET** /blacklist/{phone} | Checks if a phone number is blacklisted. -*ContactsApi* | [**AddContactToGroup**](docs/ContactsApi.md#addcontacttogroup) | **POST** /groups/{groupId}/contacts/{phone} | Adds a contact to a group. -*ContactsApi* | [**CreateContact**](docs/ContactsApi.md#createcontact) | **POST** /contacts | Creates a new contact. -*ContactsApi* | [**DeleteContact**](docs/ContactsApi.md#deletecontact) | **DELETE** /contacts/{phone} | Deletes a contact. -*ContactsApi* | [**FetchContact**](docs/ContactsApi.md#fetchcontact) | **GET** /contacts/{phone} | Lists a contact. -*ContactsApi* | [**FetchContactGroups**](docs/ContactsApi.md#fetchcontactgroups) | **GET** /contacts/{phone}/groups | Lists groups of a contact. -*ContactsApi* | [**FetchContacts**](docs/ContactsApi.md#fetchcontacts) | **GET** /contacts | Returns all contacts. -*ContactsApi* | [**RemoveContactFromGroup**](docs/ContactsApi.md#removecontactfromgroup) | **DELETE** /groups/{groupId}/contacts/{phone} | Remove a contact from a group. -*ContactsApi* | [**UpdateContact**](docs/ContactsApi.md#updatecontact) | **PATCH** /contacts/{phone} | Updates a contact. -*DeliveryReportApi* | [**RetrieveDeliveryReport**](docs/DeliveryReportApi.md#retrievedeliveryreport) | **GET** /omnimessage/{omnimessageId}/status | Retrieves the delivery report for the Omnimessage -*GroupsApi* | [**CreateGroup**](docs/GroupsApi.md#creategroup) | **POST** /groups | Creates a new group with the provided name. -*GroupsApi* | [**DeleteGroup**](docs/GroupsApi.md#deletegroup) | **DELETE** /groups/{groupId} | Deletes a group. -*GroupsApi* | [**FetchGroup**](docs/GroupsApi.md#fetchgroup) | **GET** /groups/{groupId} | Lists a group. -*GroupsApi* | [**FetchGroups**](docs/GroupsApi.md#fetchgroups) | **GET** /groups | Returns all groups. -*GroupsApi* | [**UpdateGroup**](docs/GroupsApi.md#updategroup) | **PUT** /groups/{groupId} | Updates a group with the provided name. -*OmnimessageApi* | [**CancelScheduledMessage**](docs/OmnimessageApi.md#cancelscheduledmessage) | **DELETE** /omnimessage/{omnimessageId} | Cancels a scheduled Omnimessage. -*OmnimessageApi* | [**SendOmnimessage**](docs/OmnimessageApi.md#sendomnimessage) | **POST** /omnimessage | Sends an Omnimessage. - - - -## Documentation for Models - - - [Model.Channel](docs/Channel.md) - - [Model.ContactEnvelope](docs/ContactEnvelope.md) - - [Model.ContactFields](docs/ContactFields.md) - - [Model.ContactListEnvelope](docs/ContactListEnvelope.md) - - [Model.ContactUpdateFields](docs/ContactUpdateFields.md) - - [Model.DeliveryReportResponse](docs/DeliveryReportResponse.md) - - [Model.DeliveryResult](docs/DeliveryResult.md) - - [Model.ErrorCodeOmnichannel](docs/ErrorCodeOmnichannel.md) - - [Model.ErrorCodeOmnichannelMachine](docs/ErrorCodeOmnichannelMachine.md) - - [Model.ErrorCodePhonebook](docs/ErrorCodePhonebook.md) - - [Model.ErrorItemOmnichannel](docs/ErrorItemOmnichannel.md) - - [Model.ErrorItemPhonebook](docs/ErrorItemPhonebook.md) - - [Model.ErrorOmnichannel](docs/ErrorOmnichannel.md) - - [Model.ErrorPhonebook](docs/ErrorPhonebook.md) - - [Model.ErrorTitleOmnichannel](docs/ErrorTitleOmnichannel.md) - - [Model.ErrorTitlePhonebook](docs/ErrorTitlePhonebook.md) - - [Model.FetchBlacklistSuccess](docs/FetchBlacklistSuccess.md) - - [Model.GroupEnvelope](docs/GroupEnvelope.md) - - [Model.GroupListEnvelope](docs/GroupListEnvelope.md) - - [Model.GroupName](docs/GroupName.md) - - [Model.GroupResponseFields](docs/GroupResponseFields.md) - - [Model.MessageResult](docs/MessageResult.md) - - [Model.NumberToBlacklist](docs/NumberToBlacklist.md) - - [Model.OmniMessageCreateSuccessResponse](docs/OmniMessageCreateSuccessResponse.md) - - [Model.Omnimessage](docs/Omnimessage.md) - - [Model.SMS](docs/SMS.md) - - [Model.Status](docs/Status.md) - - [Model.Viber](docs/Viber.md) - - [Model.WhatsApp](docs/WhatsApp.md) - - [Model.WhatsAppAudio](docs/WhatsAppAudio.md) - - [Model.WhatsAppDocument](docs/WhatsAppDocument.md) - - [Model.WhatsAppImage](docs/WhatsAppImage.md) - - [Model.WhatsAppText](docs/WhatsAppText.md) - - - -## Documentation for Authorization - - -### basicAuth - -- **Type**: HTTP basic authentication - +# TODO: README: csharp From a9c48370a23c1ef0ceaaec1ca9556b11c4f66a7a Mon Sep 17 00:00:00 2001 From: api-librarian Date: Sat, 16 Mar 2019 09:37:18 +0000 Subject: [PATCH 04/20] Travis update: Mar 2019 (Build 69) [skip ci] --- src/com.Messente.Api/Api/BlacklistApi.cs | 2 +- src/com.Messente.Api/Api/ContactsApi.cs | 2 +- src/com.Messente.Api/Api/DeliveryReportApi.cs | 2 +- src/com.Messente.Api/Api/GroupsApi.cs | 2 +- src/com.Messente.Api/Api/OmnimessageApi.cs | 2 +- src/com.Messente.Api/Client/ApiClient.cs | 2 +- src/com.Messente.Api/Client/ApiException.cs | 2 +- src/com.Messente.Api/Client/ApiResponse.cs | 2 +- src/com.Messente.Api/Client/Configuration.cs | 2 +- src/com.Messente.Api/Client/ExceptionFactory.cs | 2 +- src/com.Messente.Api/Client/GlobalConfiguration.cs | 2 +- src/com.Messente.Api/Client/IApiAccessor.cs | 2 +- src/com.Messente.Api/Client/IReadableConfiguration.cs | 2 +- src/com.Messente.Api/Client/OpenAPIDateConverter.cs | 2 +- src/com.Messente.Api/Model/Channel.cs | 2 +- src/com.Messente.Api/Model/ContactEnvelope.cs | 2 +- src/com.Messente.Api/Model/ContactFields.cs | 2 +- src/com.Messente.Api/Model/ContactListEnvelope.cs | 2 +- src/com.Messente.Api/Model/ContactUpdateFields.cs | 2 +- src/com.Messente.Api/Model/DeliveryReportResponse.cs | 2 +- src/com.Messente.Api/Model/DeliveryResult.cs | 2 +- src/com.Messente.Api/Model/ErrorCodeOmnichannel.cs | 2 +- src/com.Messente.Api/Model/ErrorCodeOmnichannelMachine.cs | 2 +- src/com.Messente.Api/Model/ErrorCodePhonebook.cs | 2 +- src/com.Messente.Api/Model/ErrorItemOmnichannel.cs | 2 +- src/com.Messente.Api/Model/ErrorItemPhonebook.cs | 2 +- src/com.Messente.Api/Model/ErrorOmnichannel.cs | 2 +- src/com.Messente.Api/Model/ErrorPhonebook.cs | 2 +- src/com.Messente.Api/Model/ErrorTitleOmnichannel.cs | 2 +- src/com.Messente.Api/Model/ErrorTitlePhonebook.cs | 2 +- src/com.Messente.Api/Model/FetchBlacklistSuccess.cs | 2 +- src/com.Messente.Api/Model/GroupEnvelope.cs | 2 +- src/com.Messente.Api/Model/GroupListEnvelope.cs | 2 +- src/com.Messente.Api/Model/GroupName.cs | 2 +- src/com.Messente.Api/Model/GroupResponseFields.cs | 2 +- src/com.Messente.Api/Model/MessageResult.cs | 2 +- src/com.Messente.Api/Model/NumberToBlacklist.cs | 2 +- src/com.Messente.Api/Model/OmniMessageCreateSuccessResponse.cs | 2 +- src/com.Messente.Api/Model/Omnimessage.cs | 2 +- src/com.Messente.Api/Model/SMS.cs | 2 +- src/com.Messente.Api/Model/Status.cs | 2 +- src/com.Messente.Api/Model/Viber.cs | 2 +- src/com.Messente.Api/Model/WhatsApp.cs | 2 +- src/com.Messente.Api/Model/WhatsAppAudio.cs | 2 +- src/com.Messente.Api/Model/WhatsAppDocument.cs | 2 +- src/com.Messente.Api/Model/WhatsAppImage.cs | 2 +- src/com.Messente.Api/Model/WhatsAppText.cs | 2 +- src/com.Messente.Api/com.Messente.Api.csproj | 2 +- 48 files changed, 48 insertions(+), 48 deletions(-) diff --git a/src/com.Messente.Api/Api/BlacklistApi.cs b/src/com.Messente.Api/Api/BlacklistApi.cs index 7c9fa82..0879c6c 100644 --- a/src/com.Messente.Api/Api/BlacklistApi.cs +++ b/src/com.Messente.Api/Api/BlacklistApi.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Api/ContactsApi.cs b/src/com.Messente.Api/Api/ContactsApi.cs index 8cf8e1e..aa5a13c 100644 --- a/src/com.Messente.Api/Api/ContactsApi.cs +++ b/src/com.Messente.Api/Api/ContactsApi.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Api/DeliveryReportApi.cs b/src/com.Messente.Api/Api/DeliveryReportApi.cs index bd0399c..7e82e05 100644 --- a/src/com.Messente.Api/Api/DeliveryReportApi.cs +++ b/src/com.Messente.Api/Api/DeliveryReportApi.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Api/GroupsApi.cs b/src/com.Messente.Api/Api/GroupsApi.cs index edf1d53..7fa5396 100644 --- a/src/com.Messente.Api/Api/GroupsApi.cs +++ b/src/com.Messente.Api/Api/GroupsApi.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Api/OmnimessageApi.cs b/src/com.Messente.Api/Api/OmnimessageApi.cs index de255c5..3c8ed93 100644 --- a/src/com.Messente.Api/Api/OmnimessageApi.cs +++ b/src/com.Messente.Api/Api/OmnimessageApi.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Client/ApiClient.cs b/src/com.Messente.Api/Client/ApiClient.cs index 30829d2..4d1154f 100644 --- a/src/com.Messente.Api/Client/ApiClient.cs +++ b/src/com.Messente.Api/Client/ApiClient.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Client/ApiException.cs b/src/com.Messente.Api/Client/ApiException.cs index a0fa594..fc510ac 100644 --- a/src/com.Messente.Api/Client/ApiException.cs +++ b/src/com.Messente.Api/Client/ApiException.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Client/ApiResponse.cs b/src/com.Messente.Api/Client/ApiResponse.cs index 883b919..c34118f 100644 --- a/src/com.Messente.Api/Client/ApiResponse.cs +++ b/src/com.Messente.Api/Client/ApiResponse.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Client/Configuration.cs b/src/com.Messente.Api/Client/Configuration.cs index 26210fd..d29a457 100644 --- a/src/com.Messente.Api/Client/Configuration.cs +++ b/src/com.Messente.Api/Client/Configuration.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Client/ExceptionFactory.cs b/src/com.Messente.Api/Client/ExceptionFactory.cs index 7ef8e27..1821432 100644 --- a/src/com.Messente.Api/Client/ExceptionFactory.cs +++ b/src/com.Messente.Api/Client/ExceptionFactory.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Client/GlobalConfiguration.cs b/src/com.Messente.Api/Client/GlobalConfiguration.cs index 3449b0e..6116f1a 100644 --- a/src/com.Messente.Api/Client/GlobalConfiguration.cs +++ b/src/com.Messente.Api/Client/GlobalConfiguration.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Client/IApiAccessor.cs b/src/com.Messente.Api/Client/IApiAccessor.cs index a750ff5..8a48624 100644 --- a/src/com.Messente.Api/Client/IApiAccessor.cs +++ b/src/com.Messente.Api/Client/IApiAccessor.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Client/IReadableConfiguration.cs b/src/com.Messente.Api/Client/IReadableConfiguration.cs index 5d904b8..5a3b39d 100644 --- a/src/com.Messente.Api/Client/IReadableConfiguration.cs +++ b/src/com.Messente.Api/Client/IReadableConfiguration.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Client/OpenAPIDateConverter.cs b/src/com.Messente.Api/Client/OpenAPIDateConverter.cs index bbee9f8..4324840 100644 --- a/src/com.Messente.Api/Client/OpenAPIDateConverter.cs +++ b/src/com.Messente.Api/Client/OpenAPIDateConverter.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Model/Channel.cs b/src/com.Messente.Api/Model/Channel.cs index af9f8c1..b98accc 100644 --- a/src/com.Messente.Api/Model/Channel.cs +++ b/src/com.Messente.Api/Model/Channel.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Model/ContactEnvelope.cs b/src/com.Messente.Api/Model/ContactEnvelope.cs index 5f0d5df..c3dde2b 100644 --- a/src/com.Messente.Api/Model/ContactEnvelope.cs +++ b/src/com.Messente.Api/Model/ContactEnvelope.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Model/ContactFields.cs b/src/com.Messente.Api/Model/ContactFields.cs index 0de2967..2b34799 100644 --- a/src/com.Messente.Api/Model/ContactFields.cs +++ b/src/com.Messente.Api/Model/ContactFields.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Model/ContactListEnvelope.cs b/src/com.Messente.Api/Model/ContactListEnvelope.cs index 24056d3..aa64216 100644 --- a/src/com.Messente.Api/Model/ContactListEnvelope.cs +++ b/src/com.Messente.Api/Model/ContactListEnvelope.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Model/ContactUpdateFields.cs b/src/com.Messente.Api/Model/ContactUpdateFields.cs index 97cbeb7..36b86ff 100644 --- a/src/com.Messente.Api/Model/ContactUpdateFields.cs +++ b/src/com.Messente.Api/Model/ContactUpdateFields.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Model/DeliveryReportResponse.cs b/src/com.Messente.Api/Model/DeliveryReportResponse.cs index 92a0d2e..ccc666d 100644 --- a/src/com.Messente.Api/Model/DeliveryReportResponse.cs +++ b/src/com.Messente.Api/Model/DeliveryReportResponse.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Model/DeliveryResult.cs b/src/com.Messente.Api/Model/DeliveryResult.cs index 772dd0e..8ac2eca 100644 --- a/src/com.Messente.Api/Model/DeliveryResult.cs +++ b/src/com.Messente.Api/Model/DeliveryResult.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Model/ErrorCodeOmnichannel.cs b/src/com.Messente.Api/Model/ErrorCodeOmnichannel.cs index fd93ba1..373bf32 100644 --- a/src/com.Messente.Api/Model/ErrorCodeOmnichannel.cs +++ b/src/com.Messente.Api/Model/ErrorCodeOmnichannel.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Model/ErrorCodeOmnichannelMachine.cs b/src/com.Messente.Api/Model/ErrorCodeOmnichannelMachine.cs index 953f82a..38a52e4 100644 --- a/src/com.Messente.Api/Model/ErrorCodeOmnichannelMachine.cs +++ b/src/com.Messente.Api/Model/ErrorCodeOmnichannelMachine.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Model/ErrorCodePhonebook.cs b/src/com.Messente.Api/Model/ErrorCodePhonebook.cs index 69a4601..042ded2 100644 --- a/src/com.Messente.Api/Model/ErrorCodePhonebook.cs +++ b/src/com.Messente.Api/Model/ErrorCodePhonebook.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Model/ErrorItemOmnichannel.cs b/src/com.Messente.Api/Model/ErrorItemOmnichannel.cs index 41ff624..5865ee8 100644 --- a/src/com.Messente.Api/Model/ErrorItemOmnichannel.cs +++ b/src/com.Messente.Api/Model/ErrorItemOmnichannel.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Model/ErrorItemPhonebook.cs b/src/com.Messente.Api/Model/ErrorItemPhonebook.cs index a3d2b6b..3a60304 100644 --- a/src/com.Messente.Api/Model/ErrorItemPhonebook.cs +++ b/src/com.Messente.Api/Model/ErrorItemPhonebook.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Model/ErrorOmnichannel.cs b/src/com.Messente.Api/Model/ErrorOmnichannel.cs index 6693946..d76e450 100644 --- a/src/com.Messente.Api/Model/ErrorOmnichannel.cs +++ b/src/com.Messente.Api/Model/ErrorOmnichannel.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Model/ErrorPhonebook.cs b/src/com.Messente.Api/Model/ErrorPhonebook.cs index a501f6d..4726839 100644 --- a/src/com.Messente.Api/Model/ErrorPhonebook.cs +++ b/src/com.Messente.Api/Model/ErrorPhonebook.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Model/ErrorTitleOmnichannel.cs b/src/com.Messente.Api/Model/ErrorTitleOmnichannel.cs index 68b1665..b705181 100644 --- a/src/com.Messente.Api/Model/ErrorTitleOmnichannel.cs +++ b/src/com.Messente.Api/Model/ErrorTitleOmnichannel.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Model/ErrorTitlePhonebook.cs b/src/com.Messente.Api/Model/ErrorTitlePhonebook.cs index 494c3c2..464c826 100644 --- a/src/com.Messente.Api/Model/ErrorTitlePhonebook.cs +++ b/src/com.Messente.Api/Model/ErrorTitlePhonebook.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Model/FetchBlacklistSuccess.cs b/src/com.Messente.Api/Model/FetchBlacklistSuccess.cs index e210c5f..99060d6 100644 --- a/src/com.Messente.Api/Model/FetchBlacklistSuccess.cs +++ b/src/com.Messente.Api/Model/FetchBlacklistSuccess.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Model/GroupEnvelope.cs b/src/com.Messente.Api/Model/GroupEnvelope.cs index e0c7847..de8fd88 100644 --- a/src/com.Messente.Api/Model/GroupEnvelope.cs +++ b/src/com.Messente.Api/Model/GroupEnvelope.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Model/GroupListEnvelope.cs b/src/com.Messente.Api/Model/GroupListEnvelope.cs index 5b664fd..1d7ffa9 100644 --- a/src/com.Messente.Api/Model/GroupListEnvelope.cs +++ b/src/com.Messente.Api/Model/GroupListEnvelope.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Model/GroupName.cs b/src/com.Messente.Api/Model/GroupName.cs index fd95787..4e01c8c 100644 --- a/src/com.Messente.Api/Model/GroupName.cs +++ b/src/com.Messente.Api/Model/GroupName.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Model/GroupResponseFields.cs b/src/com.Messente.Api/Model/GroupResponseFields.cs index 262d977..4f6c59a 100644 --- a/src/com.Messente.Api/Model/GroupResponseFields.cs +++ b/src/com.Messente.Api/Model/GroupResponseFields.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Model/MessageResult.cs b/src/com.Messente.Api/Model/MessageResult.cs index 596b098..1f63d76 100644 --- a/src/com.Messente.Api/Model/MessageResult.cs +++ b/src/com.Messente.Api/Model/MessageResult.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Model/NumberToBlacklist.cs b/src/com.Messente.Api/Model/NumberToBlacklist.cs index 9e439d8..b649a5d 100644 --- a/src/com.Messente.Api/Model/NumberToBlacklist.cs +++ b/src/com.Messente.Api/Model/NumberToBlacklist.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Model/OmniMessageCreateSuccessResponse.cs b/src/com.Messente.Api/Model/OmniMessageCreateSuccessResponse.cs index db00636..4f891e8 100644 --- a/src/com.Messente.Api/Model/OmniMessageCreateSuccessResponse.cs +++ b/src/com.Messente.Api/Model/OmniMessageCreateSuccessResponse.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Model/Omnimessage.cs b/src/com.Messente.Api/Model/Omnimessage.cs index 21c9f8d..9d1fdd2 100644 --- a/src/com.Messente.Api/Model/Omnimessage.cs +++ b/src/com.Messente.Api/Model/Omnimessage.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Model/SMS.cs b/src/com.Messente.Api/Model/SMS.cs index 45af0ac..e76acd0 100644 --- a/src/com.Messente.Api/Model/SMS.cs +++ b/src/com.Messente.Api/Model/SMS.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Model/Status.cs b/src/com.Messente.Api/Model/Status.cs index f34e6a4..bafada4 100644 --- a/src/com.Messente.Api/Model/Status.cs +++ b/src/com.Messente.Api/Model/Status.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Model/Viber.cs b/src/com.Messente.Api/Model/Viber.cs index ec5636a..3edd5f5 100644 --- a/src/com.Messente.Api/Model/Viber.cs +++ b/src/com.Messente.Api/Model/Viber.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Model/WhatsApp.cs b/src/com.Messente.Api/Model/WhatsApp.cs index 3b557d6..68545e4 100644 --- a/src/com.Messente.Api/Model/WhatsApp.cs +++ b/src/com.Messente.Api/Model/WhatsApp.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Model/WhatsAppAudio.cs b/src/com.Messente.Api/Model/WhatsAppAudio.cs index e499297..24d2b73 100644 --- a/src/com.Messente.Api/Model/WhatsAppAudio.cs +++ b/src/com.Messente.Api/Model/WhatsAppAudio.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Model/WhatsAppDocument.cs b/src/com.Messente.Api/Model/WhatsAppDocument.cs index a98f7d6..d6db003 100644 --- a/src/com.Messente.Api/Model/WhatsAppDocument.cs +++ b/src/com.Messente.Api/Model/WhatsAppDocument.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Model/WhatsAppImage.cs b/src/com.Messente.Api/Model/WhatsAppImage.cs index ca9d8db..6946e1a 100644 --- a/src/com.Messente.Api/Model/WhatsAppImage.cs +++ b/src/com.Messente.Api/Model/WhatsAppImage.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/Model/WhatsAppText.cs b/src/com.Messente.Api/Model/WhatsAppText.cs index 9826b65..789ba9b 100644 --- a/src/com.Messente.Api/Model/WhatsAppText.cs +++ b/src/com.Messente.Api/Model/WhatsAppText.cs @@ -1,7 +1,7 @@ /* * Messente API * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * [Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. * * OpenAPI spec version: 0.0.1 * Contact: messente@messente.com diff --git a/src/com.Messente.Api/com.Messente.Api.csproj b/src/com.Messente.Api/com.Messente.Api.csproj index 671ed1a..e53d0cf 100644 --- a/src/com.Messente.Api/com.Messente.Api.csproj +++ b/src/com.Messente.Api/com.Messente.Api.csproj @@ -2,7 +2,7 @@