diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000..a0270fb
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,2 @@
+node_modules
+dist
\ No newline at end of file
diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml
new file mode 100644
index 0000000..92961aa
--- /dev/null
+++ b/.github/workflows/pr.yml
@@ -0,0 +1,19 @@
+name: validate-pr
+on: pull_request
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: "Checkout Project"
+ uses: actions/checkout@v1
+ with:
+ fetch-depth: 1
+ - name: "Docker run test"
+ env: # Or as an environment variable
+ CLIENT_ID: ${{ secrets.CLIENT_ID }}
+ CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
+ PHONE_NO: ${{ secrets.PHONE_NO }}
+ FROM_ALIAS: ${{ secrets.FROM_ALIAS }}
+ run: docker-compose up --build --exit-code-from telstradev
\ No newline at end of file
diff --git a/.github/workflows/publish-nuget.yml b/.github/workflows/publish-nuget.yml
new file mode 100644
index 0000000..89d7fbf
--- /dev/null
+++ b/.github/workflows/publish-nuget.yml
@@ -0,0 +1,23 @@
+name: publish to nuget
+on:
+ push:
+ branches:
+ - master # Your default release branch
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+ steps:
+ # Checkout
+ - uses: actions/checkout@master
+ - uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: '3.1.100' # SDK Version to use.
+ source-url: https://nuget.pkg.github.com/telstra/index.json
+ env:
+ NUGET_AUTH_TOKEN: ${{secrets.NUGET_DEPLOY_KEY}}
+ - run: dotnet build src/Telstra.Messaging
+
+ - name: Create the package
+ run: dotnet pack --configuration Release src/Telstra.Messaging
+ - name: Publish the package to GPR
+ run: dotnet nuget push src/Telstra.Messaging/bin/Release/*.nupkg
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..4725853
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,187 @@
+# 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
+nuget.config
+# 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/.travis.yml b/.travis.yml
deleted file mode 100644
index 204253d..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# Generated by: https://github.com/swagger-api/swagger-codegen.git
-#
-language: csharp
-mono:
- - latest
-solution: com.telstra.messaging.sln
-script:
- - /bin/sh ./mono_nunit_test.sh
diff --git a/.vs/Telstra.Messaging/DesignTimeBuild/.dtbcache b/.vs/Telstra.Messaging/DesignTimeBuild/.dtbcache
new file mode 100644
index 0000000..05477cd
Binary files /dev/null and b/.vs/Telstra.Messaging/DesignTimeBuild/.dtbcache differ
diff --git a/.vs/Telstra.Messaging/v16/Server/sqlite3/db.lock b/.vs/Telstra.Messaging/v16/Server/sqlite3/db.lock
new file mode 100644
index 0000000..e69de29
diff --git a/.vs/Telstra.Messaging/v16/Server/sqlite3/storage.ide b/.vs/Telstra.Messaging/v16/Server/sqlite3/storage.ide
new file mode 100644
index 0000000..b01f1e8
Binary files /dev/null and b/.vs/Telstra.Messaging/v16/Server/sqlite3/storage.ide differ
diff --git a/DockerFile b/DockerFile
new file mode 100644
index 0000000..2c47392
--- /dev/null
+++ b/DockerFile
@@ -0,0 +1,12 @@
+FROM microsoft/dotnet:2.2-sdk
+
+WORKDIR /telstradev
+COPY . .
+
+RUN dotnet build
+
+WORKDIR /telstradev/src/Telstra.Messaging.Test
+RUN dotnet test
+
+WORKDIR /telstradev/src/Telstra.Messaging.BackwardCompatTest
+CMD dotnet run
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index acb0be4..0000000
--- a/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "{}"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright 2017 Telstra Corporation Limited (ABN 33 051 775 556)
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/README.md b/README.md
index 8147378..982214f 100644
--- a/README.md
+++ b/README.md
@@ -1,84 +1,84 @@
-# com.telstra.messaging - the C# library for the Telstra Messaging API
+# Telstra.Messaging - the C# library for the Telstra Messaging API
- The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages.
+The API specification for Telstra Messaging API
+This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
-- API version: 2.2.4
-- SDK version: 1.0.2
+- API version: 2.2.9
+- SDK version: 1.0.8
+- Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen
## Frameworks supported
-- .NET 4.0 or later
-- Windows Phone 7.1 (Mango)
+- .NET Core >=1.0
+- .NET Framework >=4.6
+- Mono/Xamarin >=vNext
## Dependencies
-- [RestSharp](https://www.nuget.org/packages/RestSharp) - 105.1.0 or later
-- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 7.0.0 or later
-- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.2.0 or later
+- [RestSharp](https://www.nuget.org/packages/RestSharp) - 106.6.7 or later
+- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 12.0.1 or later
+- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.5.2 or later
+- [CompareNETObjects](https://www.nuget.org/packages/CompareNETObjects) - 4.57.0 or later
+- [System.ComponentModel.Annotations](https://www.nuget.org/packages/System.ComponentModel.Annotations) - 4.5.0 or later
+
+The DLLs included in the package may not be the latest version. We recommend using [NuGet](https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages:
```
Install-Package RestSharp
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes
+Install-Package System.ComponentModel.Annotations
+Install-Package CompareNETObjects
```
NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See [RestSharp#742](https://github.com/restsharp/RestSharp/issues/742)
## Installation
-Run the following command to generate the DLL
-- [Mac/Linux] `/bin/sh build.sh`
-- [Windows] `build.bat`
+Generate the DLL using your preferred tool (e.g. `dotnet build`)
Then include the DLL (under the `bin` folder) in the C# project, and use the namespaces:
```csharp
-using com.telstra.messaging.Api;
-using com.telstra.messaging.Client;
-using com.telstra.messaging.Model;
-```
-
-## Packaging
-
-
-This `.nuspec` uses placeholders from the `.csproj`, so build the `.csproj` directly:
-
-```
-nuget pack -Build -OutputDirectory out com.telstra.messaging.csproj
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Client;
+using Telstra.Messaging.Model;
```
-
-
## Getting Started
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
-using com.telstra.messaging.Api;
-using com.telstra.messaging.Client;
-using com.telstra.messaging.Model;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Client;
+using Telstra.Messaging.Model;
namespace Example
{
public class Example
{
- public void main()
+ public static void Main()
{
- var apiInstance = new AuthenticationApi();
+ Configuration.Default.BasePath = "https://tapi.telstra.com/v2";
+ var apiInstance = new AuthenticationApi(Configuration.Default);
var clientId = clientId_example; // string |
var clientSecret = clientSecret_example; // string |
- var grantType = grantType_example; // string | (default to client_credentials)
+ var grantType = grantType_example; // string | (default to "client_credentials")
+ var scope = scope_example; // string | NSMS (optional)
try
{
- // Generate authentication token
- OAuthResponse result = apiInstance.AuthToken(clientId, clientSecret, grantType);
+ // Generate OAuth2 token
+ OAuthResponse result = apiInstance.AuthToken(clientId, clientSecret, grantType, scope);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling AuthenticationApi.AuthToken: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
@@ -93,10 +93,14 @@ All URIs are relative to *https://tapi.telstra.com/v2*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
-*AuthenticationApi* | [**AuthToken**](docs/AuthenticationApi.md#authtoken) | **POST** /oauth/token | Generate authentication token
+*AuthenticationApi* | [**AuthToken**](docs/AuthenticationApi.md#authtoken) | **POST** /oauth/token | Generate OAuth2 token
*MessagingApi* | [**GetMMSStatus**](docs/MessagingApi.md#getmmsstatus) | **GET** /messages/mms/{messageid}/status | Get MMS Status
*MessagingApi* | [**GetSMSStatus**](docs/MessagingApi.md#getsmsstatus) | **GET** /messages/sms/{messageId}/status | Get SMS Status
-*MessagingApi* | [**RetrieveSMSResponses**](docs/MessagingApi.md#retrievesmsresponses) | **GET** /messages/sms | Retrieve SMS Responses
+*MessagingApi* | [**MMSHealthCheck**](docs/MessagingApi.md#mmshealthcheck) | **GET** /messages/mms/heathcheck | MMS Health Check
+*MessagingApi* | [**RetrieveMMSReplies**](docs/MessagingApi.md#retrievemmsreplies) | **GET** /messages/mms | Retrieve MMS Replies
+*MessagingApi* | [**RetrieveSMSReplies**](docs/MessagingApi.md#retrievesmsreplies) | **GET** /messages/sms | Retrieve SMS Replies
+*MessagingApi* | [**SMSHealthCheck**](docs/MessagingApi.md#smshealthcheck) | **GET** /messages/sms/heathcheck | SMS Health Check
+*MessagingApi* | [**SMSMulti**](docs/MessagingApi.md#smsmulti) | **POST** /messages/sms/multi | Send Multiple SMS
*MessagingApi* | [**SendMMS**](docs/MessagingApi.md#sendmms) | **POST** /messages/mms | Send MMS
*MessagingApi* | [**SendSMS**](docs/MessagingApi.md#sendsms) | **POST** /messages/sms | Send SMS
*ProvisioningApi* | [**CreateSubscription**](docs/ProvisioningApi.md#createsubscription) | **POST** /messages/provisioning/subscriptions | Create Subscription
@@ -108,33 +112,34 @@ Class | Method | HTTP request | Description
## Documentation for Models
- [Model.DeleteNumberRequest](docs/DeleteNumberRequest.md)
- - [Model.ErrorError](docs/ErrorError.md)
- - [Model.ErrorErrorError](docs/ErrorErrorError.md)
+ - [Model.GetMmsResponse](docs/GetMmsResponse.md)
- [Model.GetSubscriptionResponse](docs/GetSubscriptionResponse.md)
+ - [Model.HealthCheckResponse](docs/HealthCheckResponse.md)
- [Model.InboundPollResponse](docs/InboundPollResponse.md)
- [Model.MMSContent](docs/MMSContent.md)
- [Model.Message](docs/Message.md)
- - [Model.MessageSentResponse](docs/MessageSentResponse.md)
- - [Model.MessageType](docs/MessageType.md)
- - [Model.OAuthRequest](docs/OAuthRequest.md)
+ - [Model.MessageMulti](docs/MessageMulti.md)
+ - [Model.MessageSentResponseMms](docs/MessageSentResponseMms.md)
+ - [Model.MessageSentResponseSms](docs/MessageSentResponseSms.md)
- [Model.OAuthResponse](docs/OAuthResponse.md)
- [Model.OutboundPollResponse](docs/OutboundPollResponse.md)
- [Model.ProvisionNumberRequest](docs/ProvisionNumberRequest.md)
- [Model.ProvisionNumberResponse](docs/ProvisionNumberResponse.md)
- [Model.SendMmsRequest](docs/SendMmsRequest.md)
- [Model.SendSMSRequest](docs/SendSMSRequest.md)
+ - [Model.SendSmsMultiRequest](docs/SendSmsMultiRequest.md)
- [Model.Status](docs/Status.md)
-## Documentation for Authorisation
+## Documentation for Authorization
### auth
- **Type**: OAuth
- **Flow**: application
-- **Authorisation URL**:
+- **Authorization URL**:
- **Scopes**:
- NSMS: NSMS
diff --git a/Telstra.Messaging.sln b/Telstra.Messaging.sln
new file mode 100644
index 0000000..774e286
--- /dev/null
+++ b/Telstra.Messaging.sln
@@ -0,0 +1,36 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29001.49
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Telstra.Messaging", "src\Telstra.Messaging\Telstra.Messaging.csproj", "{B98ACF0D-EE51-49A8-BA8E-71750CAAB9E3}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Telstra.Messaging.Test", "src\Telstra.Messaging.Test\Telstra.Messaging.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Telstra.Messaging.BackwardCompatTest", "src\Telstra.Messaging.BackwardCompatTest\Telstra.Messaging.BackwardCompatTest.csproj", "{EFCB5739-9CBE-43FC-80FD-78E552CD415E}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {B98ACF0D-EE51-49A8-BA8E-71750CAAB9E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B98ACF0D-EE51-49A8-BA8E-71750CAAB9E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B98ACF0D-EE51-49A8-BA8E-71750CAAB9E3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B98ACF0D-EE51-49A8-BA8E-71750CAAB9E3}.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
+ {EFCB5739-9CBE-43FC-80FD-78E552CD415E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {EFCB5739-9CBE-43FC-80FD-78E552CD415E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {EFCB5739-9CBE-43FC-80FD-78E552CD415E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {EFCB5739-9CBE-43FC-80FD-78E552CD415E}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {9B2B0E7E-CEBF-46C0-BB6C-20FC6C8F8EEF}
+ EndGlobalSection
+EndGlobal
diff --git a/build.bat b/build.bat
deleted file mode 100644
index 632d114..0000000
--- a/build.bat
+++ /dev/null
@@ -1,17 +0,0 @@
-:: Generated by: https://github.com/swagger-api/swagger-codegen.git
-::
-
-@echo off
-
-SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319
-
-if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient).DownloadFile('https://dist.nuget.org/win-x86-commandline/latest/nuget.exe', '.\nuget.exe')"
-.\nuget.exe install src\com.telstra.messaging\packages.config -o packages
-
-if not exist ".\bin" mkdir bin
-
-copy packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll
-copy packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll bin\JsonSubTypes.dll
-copy packages\RestSharp.105.1.0\lib\net45\RestSharp.dll bin\RestSharp.dll
-%CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\JsonSubTypes.dll;bin\RestSharp.dll;System.ComponentModel.DataAnnotations.dll /target:library /out:bin\com.telstra.messaging.dll /recurse:src\com.telstra.messaging\*.cs /doc:bin\com.telstra.messaging.xml
-
diff --git a/build.sh b/build.sh
deleted file mode 100644
index dc2b8c7..0000000
--- a/build.sh
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/env bash
-#
-# Generated by: https://github.com/swagger-api/swagger-codegen.git
-#
-
-frameworkVersion=net45
-
-# sdk must match installed framworks under PREFIX/lib/mono/[value]
-sdk=4.5.2-api
-
-# langversion refers to C# language features. see man mcs for details.
-langversion=${sdk}
-nuget_cmd=nuget
-
-# Match against our known SDK possibilities
-case "${sdk}" in
- 4)
- langversion=4
- ;;
- 4.5*)
- langversion=5
- ;;
- 4.6*)
- langversion=6
- ;;
- 4.7*)
- langversion=7 # ignoring 7.1 for now.
- ;;
- *)
- langversion=6
- ;;
-esac
-
-echo "[INFO] Target framework: ${frameworkVersion}"
-
-if ! type nuget &>/dev/null; then
- echo "[INFO] Download nuget and packages"
- wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe;
- nuget_cmd="mono nuget.exe"
-fi
-
-mozroots --import --sync
-${nuget_cmd} install src/com.telstra.messaging/packages.config -o packages;
-
-echo "[INFO] Copy DLLs to the 'bin' folder"
-mkdir -p bin;
-cp packages/Newtonsoft.Json.10.0.3/lib/net45/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll;
-cp packages/RestSharp.105.1.0/lib/net45/RestSharp.dll bin/RestSharp.dll;
-cp packages/JsonSubTypes.1.2.0/lib/net45/JsonSubTypes.dll bin/JsonSubTypes.dll
-
-echo "[INFO] Run 'mcs' to build bin/com.telstra.messaging.dll"
-mcs -langversion:${langversion} -sdk:${sdk} -r:bin/Newtonsoft.Json.dll,bin/JsonSubTypes.dll,\
-bin/RestSharp.dll,\
-System.ComponentModel.DataAnnotations.dll,\
-System.Runtime.Serialization.dll \
--target:library \
--out:bin/com.telstra.messaging.dll \
--recurse:'src/com.telstra.messaging/*.cs' \
--doc:bin/com.telstra.messaging.xml \
--platform:anycpu
-
-if [ $? -ne 0 ]
-then
- echo "[ERROR] Compilation failed with exit code $?"
- exit 1
-else
- echo "[INFO] bin/com.telstra.messaging.dll was created successfully"
-fi
diff --git a/com.telstra.messaging.sln b/com.telstra.messaging.sln
deleted file mode 100644
index ac0a23a..0000000
--- a/com.telstra.messaging.sln
+++ /dev/null
@@ -1,27 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2012
-VisualStudioVersion = 12.0.0.0
-MinimumVisualStudioVersion = 10.0.0.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "com.telstra.messaging", "src\com.telstra.messaging\com.telstra.messaging.csproj", "{C0869B26-6FED-45CB-88E0-8AD7E6B96330}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "com.telstra.messaging.Test", "src\com.telstra.messaging.Test\com.telstra.messaging.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {C0869B26-6FED-45CB-88E0-8AD7E6B96330}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C0869B26-6FED-45CB-88E0-8AD7E6B96330}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C0869B26-6FED-45CB-88E0-8AD7E6B96330}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C0869B26-6FED-45CB-88E0-8AD7E6B96330}.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/com.telstra.messaging.userprefs b/com.telstra.messaging.userprefs
deleted file mode 100644
index c53e8c0..0000000
--- a/com.telstra.messaging.userprefs
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docker-compose.yaml b/docker-compose.yaml
new file mode 100644
index 0000000..44446f8
--- /dev/null
+++ b/docker-compose.yaml
@@ -0,0 +1,11 @@
+version: '3'
+services:
+ telstradev:
+ environment:
+ - CLIENT_ID
+ - CLIENT_SECRET
+ - PHONE_NO
+ - FROM_ALIAS
+ build:
+ context: .
+ dockerfile: DockerFile
\ No newline at end of file
diff --git a/docs/AuthApi.md b/docs/AuthApi.md
deleted file mode 100644
index 106c1ba..0000000
--- a/docs/AuthApi.md
+++ /dev/null
@@ -1,72 +0,0 @@
-# com.telstra.messaging.Api.AuthApi
-
-All URIs are relative to *https://tapi.telstra.com/v2*
-
-Method | HTTP request | Description
-------------- | ------------- | -------------
-[**OauthTokenPost**](AuthApi.md#oauthtokenpost) | **POST** /oauth/token | AuthGeneratetokenPost
-
-
-
-# **OauthTokenPost**
-> AuthgeneratetokenpostResponse OauthTokenPost (string oAuthClientId, string oAuthClientSecret)
-
-AuthGeneratetokenPost
-
-generate auth token
-
-### Example
-```csharp
-using System;
-using System.Diagnostics;
-using com.telstra.messaging.Api;
-using com.telstra.messaging.Client;
-using com.telstra.messaging.Model;
-
-namespace Example
-{
- public class OauthTokenPostExample
- {
- public void main()
- {
- var apiInstance = new AuthApi();
- var oAuthClientId = oAuthClientId_example; // string |
- var oAuthClientSecret = oAuthClientSecret_example; // string |
-
- try
- {
- // AuthGeneratetokenPost
- AuthgeneratetokenpostResponse result = apiInstance.OauthTokenPost(oAuthClientId, oAuthClientSecret);
- Debug.WriteLine(result);
- }
- catch (Exception e)
- {
- Debug.Print("Exception when calling AuthApi.OauthTokenPost: " + e.Message );
- }
- }
- }
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **oAuthClientId** | **string**| |
- **oAuthClientSecret** | **string**| |
-
-### Return type
-
-[**AuthgeneratetokenpostResponse**](AuthgeneratetokenpostResponse.md)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: application/x-www-form-urlencoded
- - **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/AuthenticationApi.md b/docs/AuthenticationApi.md
index ceaa61a..d1eb36b 100644
--- a/docs/AuthenticationApi.md
+++ b/docs/AuthenticationApi.md
@@ -1,48 +1,52 @@
-# com.telstra.messaging.Api.AuthenticationApi
+# Telstra.Messaging.Api.AuthenticationApi
All URIs are relative to *https://tapi.telstra.com/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
-[**AuthToken**](AuthenticationApi.md#authtoken) | **POST** /oauth/token | Generate authentication token
+[**AuthToken**](AuthenticationApi.md#authtoken) | **POST** /oauth/token | Generate OAuth2 token
# **AuthToken**
-> OAuthResponse AuthToken (string clientId, string clientSecret, string grantType)
+> OAuthResponse AuthToken (string clientId, string clientSecret, string grantType, string scope = null)
-Generate authentication token
+Generate OAuth2 token
-Generate authentication token
+To generate an OAuth2 Authentication token, pass through your `Client key` and `Client secret` that you received when you registered for the **API Free Trial** Product. The grant_type should be left as `client_credentials` and the scope as `NSMS`. The token will expire in one hour.
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
-using com.telstra.messaging.Api;
-using com.telstra.messaging.Client;
-using com.telstra.messaging.Model;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Client;
+using Telstra.Messaging.Model;
namespace Example
{
public class AuthTokenExample
{
- public void main()
+ public static void Main()
{
- var apiInstance = new AuthenticationApi();
+ Configuration.Default.BasePath = "https://tapi.telstra.com/v2";
+ var apiInstance = new AuthenticationApi(Configuration.Default);
var clientId = clientId_example; // string |
var clientSecret = clientSecret_example; // string |
- var grantType = grantType_example; // string | (default to client_credentials)
+ var grantType = grantType_example; // string | (default to "client_credentials")
+ var scope = scope_example; // string | NSMS (optional)
try
{
- // Generate authentication token
- OAuthResponse result = apiInstance.AuthToken(clientId, clientSecret, grantType);
+ // Generate OAuth2 token
+ OAuthResponse result = apiInstance.AuthToken(clientId, clientSecret, grantType, scope);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling AuthenticationApi.AuthToken: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -55,7 +59,8 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**clientId** | **string**| |
**clientSecret** | **string**| |
- **grantType** | **string**| | [default to client_credentials]
+ **grantType** | **string**| | [default to "client_credentials"]
+ **scope** | **string**| NSMS | [optional]
### Return type
@@ -70,5 +75,15 @@ No authorization required
- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Success | - |
+| **400** | unsupported_grant_type | - |
+| **401** | invalid_client | - |
+| **404** | The requested URI does not exist | - |
+| **503** | The service requested is currently unavailable | - |
+| **0** | An internal error occurred when processing the request | - |
+
[[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/AuthgeneratetokenpostResponse.md b/docs/AuthgeneratetokenpostResponse.md
deleted file mode 100644
index d668d26..0000000
--- a/docs/AuthgeneratetokenpostResponse.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# com.telstra.messaging.Model.AuthgeneratetokenpostResponse
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**AccessToken** | **string** | | [optional]
-**ExpiresIn** | **int?** | | [optional]
-**RefreshToken** | **string** | | [optional]
-**TokenType** | **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/DeleteNumberRequest.md b/docs/DeleteNumberRequest.md
index cc4df09..5ebb2db 100644
--- a/docs/DeleteNumberRequest.md
+++ b/docs/DeleteNumberRequest.md
@@ -1,9 +1,9 @@
-# com.telstra.messaging.Model.DeleteNumberRequest
+# Telstra.Messaging.Model.DeleteNumberRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**EmptyArr** | **int?** | Empty Arr | [optional] [default to 0]
+**EmptyArr** | **int** | Empty Arr | [optional] [default to 0]
[[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/ErrorError.md b/docs/ErrorError.md
deleted file mode 100644
index d3e745c..0000000
--- a/docs/ErrorError.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# com.telstra.messaging.Model.ErrorError
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**Status** | **string** | A short error code |
-**Message** | **string** | Message describing the error. | [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/ErrorErrorError.md b/docs/ErrorErrorError.md
deleted file mode 100644
index f81354a..0000000
--- a/docs/ErrorErrorError.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# com.telstra.messaging.Model.ErrorErrorError
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**Status** | **int?** | The status code. | [optional]
-**Message** | **string** | Message describing the error. | [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/ErrorErrorError62.md b/docs/ErrorErrorError62.md
deleted file mode 100644
index 7b848a1..0000000
--- a/docs/ErrorErrorError62.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# com.telstra.messaging.Model.ErrorErrorError62
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**Status** | **string** | A short error code |
-**Message** | **string** | Message describing the error. | [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/ErrorErrorErrorError.md b/docs/ErrorErrorErrorError.md
deleted file mode 100644
index 9fa0c27..0000000
--- a/docs/ErrorErrorErrorError.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# com.telstra.messaging.Model.ErrorErrorErrorError
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**Status** | **int?** | The status code. | [optional]
-**Message** | **string** | Message describing the error. | [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/GetMmsResponse.md b/docs/GetMmsResponse.md
new file mode 100644
index 0000000..785195b
--- /dev/null
+++ b/docs/GetMmsResponse.md
@@ -0,0 +1,16 @@
+# Telstra.Messaging.Model.GetMmsResponse
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Status** | **string** | The final state of the message. |
+**DestinationAddress** | **string** | The number the message was sent to. |
+**SenderAddress** | **string** | The number the message was sent from. |
+**Subject** | **string** | The subject assigned to the message. | [optional]
+**MessageId** | **string** | Message Id assigned by the MMSC. | [optional]
+**ApiMsgId** | **string** | Message Id assigned by the API. | [optional]
+**SentTimestamp** | **string** | Time handling of the message ended. |
+**MMSContent** | [**List<MMSContent>**](MMSContent.md) | An array of content that was received in an MMS 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/GetSubscriptionResponse.md b/docs/GetSubscriptionResponse.md
index 2148f40..16f63f0 100644
--- a/docs/GetSubscriptionResponse.md
+++ b/docs/GetSubscriptionResponse.md
@@ -1,4 +1,4 @@
-# com.telstra.messaging.Model.GetSubscriptionResponse
+# Telstra.Messaging.Model.GetSubscriptionResponse
## Properties
Name | Type | Description | Notes
diff --git a/docs/MessageType.md b/docs/HealthCheckResponse.md
similarity index 64%
rename from docs/MessageType.md
rename to docs/HealthCheckResponse.md
index f1130f4..1c5ea1d 100644
--- a/docs/MessageType.md
+++ b/docs/HealthCheckResponse.md
@@ -1,8 +1,10 @@
-# com.telstra.messaging.Model.MessageType
+# Telstra.Messaging.Model.HealthCheckResponse
+Information regarding service being up or down.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
+**Status** | **string** | message status | [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/InboundPollResponse.md b/docs/InboundPollResponse.md
index 897e7b3..fc605b9 100644
--- a/docs/InboundPollResponse.md
+++ b/docs/InboundPollResponse.md
@@ -1,11 +1,12 @@
-# com.telstra.messaging.Model.InboundPollResponse
+# Telstra.Messaging.Model.InboundPollResponse
+Poll for incoming messages returning the latest. Only works if no callback url was specified when provisioning a number.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Status** | **string** | message status | [optional]
-**DestinationAddress** | **string** | The phone number (recipient) that the message was sent to(in E.164 format). | [optional]
-**SenderAddress** | **string** | The phone number (sender) that the message was sent from (in E.164 format). | [optional]
+**DestinationAddress** | **string** | The phone number (recipient) that the message was sent to (in E.164 format). | [optional]
+**SenderAddress** | **string** | The phone number (sender) that the message was sent from (in E.164 format). | [optional]
**Message** | **string** | Text of the message that was sent | [optional]
**MessageId** | **string** | Message Id | [optional]
**SentTimestamp** | **string** | The date and time when the message was sent by recipient. | [optional]
diff --git a/docs/MMSContent.md b/docs/MMSContent.md
index 0c78c3a..34630df 100644
--- a/docs/MMSContent.md
+++ b/docs/MMSContent.md
@@ -1,11 +1,11 @@
-# com.telstra.messaging.Model.MMSContent
+# Telstra.Messaging.Model.MMSContent
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Type** | **string** | The following types are supported audio/amr audio/aac audio/mp3 audio/mpeg3 audio/mpeg audio/mpg audio/wav audio/3gpp audio/mp4 image/gif image/jpeg image/jpg image/png image/bmp video/mpeg4 video/mp4 video/mpeg video/3gpp video/3gp video/h263 text/plain text/x-vCard text/x-vCalendar |
-**Filename** | **string** | The file name to be associated with the content. Some devices will display this file name with a placeholder for the content. |
-**Payload** | **string** | |
+**Type** | **string** | The following types are supported audio/amr audio/aac audio/mp3 audio/mpeg3 audio/mpeg audio/mpg audio/wav audio/3gpp audio/mp4 image/gif image/jpeg image/jpg image/png image/bmp video/mpeg4 video/mp4 video/mpeg video/3gpp video/3gp video/h263 text/plain text/x-vCard text/x-vCalendar |
+**Filename** | **string** | The file name to be associated with the content. Some devices will display this file name with a placeholder for the content. |
+**Payload** | **string** | Base64 encoded message content. |
[[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/Message.md b/docs/Message.md
index 3890f4a..8d54631 100644
--- a/docs/Message.md
+++ b/docs/Message.md
@@ -1,12 +1,12 @@
-# com.telstra.messaging.Model.Message
+# Telstra.Messaging.Model.Message
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**To** | **string** | |
-**DeliveryStatus** | **string** | |
-**MessageId** | **string** | |
-**MessageStatusURL** | **string** | | [optional]
+**To** | **string** | Just a copy of the number the message is sent to. |
+**DeliveryStatus** | **string** | Gives an indication if the message has been accepted for delivery. The description field contains information on why a message may have been rejected. |
+**MessageId** | **string** | For an accepted message, ths will be a unique reference that can be used to check the messages status. Please refer to the Delivery Notification section. Note that `messageId` will be different for each number that the message was sent to. |
+**MessageStatusURL** | **string** | For an accepted message, ths will be the URL that can be used to check the messages status. Please refer to the Delivery Notification section. | [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/MessageMulti.md b/docs/MessageMulti.md
new file mode 100644
index 0000000..6d0b851
--- /dev/null
+++ b/docs/MessageMulti.md
@@ -0,0 +1,11 @@
+# Telstra.Messaging.Model.MessageMulti
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**To** | **string** | Phone number (in E.164 format) to send the SMS to. This number can be in international format `\"to\": \"+61412345678\"` or in national format. | [optional]
+**Body** | **string** | The text body of the message. Messages longer than 160 characters will be counted as multiple messages. This field contains the message text, this can be up to 1900 (for a single recipient) or 500 (for multiple recipients) UTF-8 characters. As mobile devices rarely support the full range of UTF-8 characters, it is possible that some characters may not be translated correctly by the mobile device | [optional]
+**ReceiptOff** | **bool** | Whether Delivery Receipt will be sent back or not. Setting this field to `true` will disable Delivery Receipts. The `notifyURL` field will be ignored, if there is one in the payload. An \"OLD-NONEXISTANT-MESSAGE-ID\" 400 error will also be returned upon Polling for the SMS Status. | [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/MessageSentResponse.md b/docs/MessageSentResponse.md
deleted file mode 100644
index b415d27..0000000
--- a/docs/MessageSentResponse.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# com.telstra.messaging.Model.MessageSentResponse
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**Messages** | [**List<Message>**](Message.md) | |
-**MessageType** | **string** | |
-**NumberSegments** | **int?** | |
-**NumberNationalDestinations** | **int?** | | [optional]
-**NumberInternationalDestinations** | **int?** | | [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/MessageSentResponseMms.md b/docs/MessageSentResponseMms.md
new file mode 100644
index 0000000..ce84867
--- /dev/null
+++ b/docs/MessageSentResponseMms.md
@@ -0,0 +1,13 @@
+# Telstra.Messaging.Model.MessageSentResponseMms
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Messages** | [**List<Message>**](Message.md) | An array of messages. |
+**MmsMediaKB** | **int** | Indicates the message size in kB of the MMS sent. | [optional]
+**Country** | **List<Object>** | An array of the countries to which the destination MSISDNs belong. | [optional]
+**MessageType** | **string** | This returns whether the message sent was a SMS or MMS. |
+**NumberSegments** | **int** | MMS with numberSegments below 600 are classed as Small whereas those that are bigger than 600 are classed as Large. They will be charged accordingly. |
+
+[[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/MessageSentResponseSms.md b/docs/MessageSentResponseSms.md
new file mode 100644
index 0000000..2afb50d
--- /dev/null
+++ b/docs/MessageSentResponseSms.md
@@ -0,0 +1,12 @@
+# Telstra.Messaging.Model.MessageSentResponseSms
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Messages** | [**List<Message>**](Message.md) | An array of messages. |
+**Country** | **List<Object>** | An array of the countries to which the destination MSISDNs belong. | [optional]
+**MessageType** | **string** | This returns whether the message sent was a SMS or MMS. |
+**NumberSegments** | **int** | A message which has 160 GSM-7 characters or less will have numberSegments=1. Note that multi-part messages which are over 160 GSM-7 characters will include the User Data Header as part of the numberSegments. The User Data Header is being used for the re-assembly of the messages. |
+
+[[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/MessagingApi.md b/docs/MessagingApi.md
index 7dba801..fc66d81 100644
--- a/docs/MessagingApi.md
+++ b/docs/MessagingApi.md
@@ -1,4 +1,4 @@
-# com.telstra.messaging.Api.MessagingApi
+# Telstra.Messaging.Api.MessagingApi
All URIs are relative to *https://tapi.telstra.com/v2*
@@ -6,14 +6,18 @@ Method | HTTP request | Description
------------- | ------------- | -------------
[**GetMMSStatus**](MessagingApi.md#getmmsstatus) | **GET** /messages/mms/{messageid}/status | Get MMS Status
[**GetSMSStatus**](MessagingApi.md#getsmsstatus) | **GET** /messages/sms/{messageId}/status | Get SMS Status
-[**RetrieveSMSResponses**](MessagingApi.md#retrievesmsresponses) | **GET** /messages/sms | Retrieve SMS Responses
+[**MMSHealthCheck**](MessagingApi.md#mmshealthcheck) | **GET** /messages/mms/healthcheck | MMS Health Check
+[**RetrieveMMSReplies**](MessagingApi.md#retrievemmsreplies) | **GET** /messages/mms | Retrieve MMS Replies
+[**RetrieveSMSReplies**](MessagingApi.md#retrievesmsreplies) | **GET** /messages/sms | Retrieve SMS Replies
+[**SMSHealthCheck**](MessagingApi.md#smshealthcheck) | **GET** /messages/sms/healthcheck | SMS Health Check
+[**SMSMulti**](MessagingApi.md#smsmulti) | **POST** /messages/sms/multi | Send Multiple SMS
[**SendMMS**](MessagingApi.md#sendmms) | **POST** /messages/mms | Send MMS
[**SendSMS**](MessagingApi.md#sendsms) | **POST** /messages/sms | Send SMS
# **GetMMSStatus**
-> List GetMMSStatus (string messageid)
+> List<OutboundPollResponse> GetMMSStatus (string messageid)
Get MMS Status
@@ -21,33 +25,36 @@ Get MMS Status
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
-using com.telstra.messaging.Api;
-using com.telstra.messaging.Client;
-using com.telstra.messaging.Model;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Client;
+using Telstra.Messaging.Model;
namespace Example
{
public class GetMMSStatusExample
{
- public void main()
+ public static void Main()
{
+ Configuration.Default.BasePath = "https://tapi.telstra.com/v2";
// Configure OAuth2 access token for authorization: auth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new MessagingApi();
- var messageid = messageid_example; // string | Unique identifier of a message - it is the value returned from a previous POST call to https://api.telstra.com/v2/messages/mms
+ var apiInstance = new MessagingApi(Configuration.Default);
+ var messageid = messageid_example; // string | Unique identifier of a message - it is the value returned from a previous POST call to https://tapi.telstra.com/v2/messages/mms
try
{
// Get MMS Status
- List<OutboundPollResponse> result = apiInstance.GetMMSStatus(messageid);
+ List result = apiInstance.GetMMSStatus(messageid);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling MessagingApi.GetMMSStatus: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -58,11 +65,11 @@ namespace Example
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **messageid** | **string**| Unique identifier of a message - it is the value returned from a previous POST call to https://api.telstra.com/v2/messages/mms |
+ **messageid** | **string**| Unique identifier of a message - it is the value returned from a previous POST call to https://tapi.telstra.com/v2/messages/mms |
### Return type
-[**List**](OutboundPollResponse.md)
+[**List<OutboundPollResponse>**](OutboundPollResponse.md)
### Authorization
@@ -70,48 +77,67 @@ Name | Type | Description | Notes
### HTTP request headers
- - **Content-Type**: application/json
+ - **Content-Type**: Not defined
- **Accept**: application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | | - |
+| **400** | Invalid or missing request parameters NOT-PROVISIONED Request flagged as containing suspicious content | - |
+| **401** | Invalid access token. Please try with a valid token | - |
+| **403** | Authorization credentials passed and accepted but account does not have permission SpikeArrest-The API call rate limit has been exceeded | - |
+| **404** | The requested URI does not exist OLD-NONEXISTANT-MESSAGE-ID RESOURCE-NOT-FOUND | - |
+| **405** | The requested resource does not support the supplied verb | - |
+| **415** | API does not support the requested content type | - |
+| **422** | The request is formed correctly, but due to some condition the request cannot be processed e.g. email is required and it is not provided in the request | - |
+| **500** | Technical error : Unable to route the message to a Target Endpoint : An error has occurred while processing your request, please refer to API Docs for summary on the issue | - |
+| **501** | The HTTP method being used has not yet been implemented for the requested resource | - |
+| **503** | The service requested is currently unavailable | - |
+| **0** | An internal error occurred when processing the request | - |
+
[[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)
# **GetSMSStatus**
-> List GetSMSStatus (string messageId)
+> List<OutboundPollResponse> GetSMSStatus (string messageId)
Get SMS Status
-Get Message Status
+If no notification URL has been specified, it is possible to poll for the message status. Note that the `MessageId` that appears in the URL must be URL encoded. Just copying the `MessageId` as it was supplied when submitting the message may not work. # SMS Status with Notification URL When a message has reached its final state, the API will send a POST to the URL that has been previously specified.
The fields are: | Field | Description | | - -- | - --| | `to` | The number the message was sent to. | | `receivedTimestamp` | Time the message was sent to the API. | | `sentTimestamp` | Time handling of the message ended. | | `deliveryStatus` | The final state of the message. | | `messageId` | The same reference that was returned when the original message was sent.| | `receivedTimestamp` | Time the message was sent to the API.| Upon receiving this call it is expected that your servers will give a 204 (No Content) response.
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
-using com.telstra.messaging.Api;
-using com.telstra.messaging.Client;
-using com.telstra.messaging.Model;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Client;
+using Telstra.Messaging.Model;
namespace Example
{
public class GetSMSStatusExample
{
- public void main()
+ public static void Main()
{
+ Configuration.Default.BasePath = "https://tapi.telstra.com/v2";
// Configure OAuth2 access token for authorization: auth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new MessagingApi();
- var messageId = messageId_example; // string | Unique identifier of a message - it is the value returned from a previous POST call to https://api.telstra.com/v2/messages/sms
+ var apiInstance = new MessagingApi(Configuration.Default);
+ var messageId = messageId_example; // string | Unique identifier of a message - it is the value returned from a previous POST call to https://tapi.telstra.com/v2/messages/sms.
try
{
// Get SMS Status
- List<OutboundPollResponse> result = apiInstance.GetSMSStatus(messageId);
+ List result = apiInstance.GetSMSStatus(messageId);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling MessagingApi.GetSMSStatus: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -122,11 +148,11 @@ namespace Example
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **messageId** | **string**| Unique identifier of a message - it is the value returned from a previous POST call to https://api.telstra.com/v2/messages/sms |
+ **messageId** | **string**| Unique identifier of a message - it is the value returned from a previous POST call to https://tapi.telstra.com/v2/messages/sms. |
### Return type
-[**List**](OutboundPollResponse.md)
+[**List<OutboundPollResponse>**](OutboundPollResponse.md)
### Authorization
@@ -134,47 +160,214 @@ Name | Type | Description | Notes
### HTTP request headers
- - **Content-Type**: application/json
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Success | - |
+| **400** | Invalid or missing request parameters NOT-PROVISIONED Request flagged as containing suspicious content | - |
+| **401** | Invalid access token. Please try with a valid token | - |
+| **403** | Authorization credentials passed and accepted but account does not have permission SpikeArrest-The API call rate limit has been exceeded | - |
+| **404** | The requested URI does not exist OLD-NONEXISTANT-MESSAGE-ID RESOURCE-NOT-FOUND | - |
+| **405** | The requested resource does not support the supplied verb | - |
+| **415** | API does not support the requested content type | - |
+| **422** | The request is formed correctly, but due to some condition the request cannot be processed e.g. email is required and it is not provided in the request | - |
+| **500** | Technical error : Unable to route the message to a Target Endpoint : An error has occurred while processing your request, please refer to API Docs for summary on the issue | - |
+| **501** | The HTTP method being used has not yet been implemented for the requested resource | - |
+| **503** | The service requested is currently unavailable | - |
+| **0** | An internal error occurred when processing the request | - |
+
+[[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)
+
+
+# **MMSHealthCheck**
+> HealthCheckResponse MMSHealthCheck ()
+
+MMS Health Check
+
+Determine whether the MMS service is up or down.
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Client;
+using Telstra.Messaging.Model;
+
+namespace Example
+{
+ public class MMSHealthCheckExample
+ {
+ public static void Main()
+ {
+ Configuration.Default.BasePath = "https://tapi.telstra.com/v2";
+ var apiInstance = new MessagingApi(Configuration.Default);
+
+ try
+ {
+ // MMS Health Check
+ HealthCheckResponse result = apiInstance.MMSHealthCheck();
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling MessagingApi.MMSHealthCheck: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+### Parameters
+This endpoint does not need any parameter.
+
+### Return type
+
+[**HealthCheckResponse**](HealthCheckResponse.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
- **Accept**: application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Success | - |
+| **500** | Technical error : Unable to route the message to a Target Endpoint : An error has occurred while processing your request, please refer to API Docs for summary on the issue | - |
+| **501** | The HTTP method being used has not yet been implemented for the requested resource | - |
+| **503** | The service requested is currently unavailable | - |
+| **0** | An internal error occurred when processing the request | - |
+
[[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)
-
-# **RetrieveSMSResponses**
-> InboundPollResponse RetrieveSMSResponses ()
+
+# **RetrieveMMSReplies**
+> GetMmsResponse RetrieveMMSReplies ()
-Retrieve SMS Responses
+Retrieve MMS Replies
-Retrieve Messages
+Messages are retrieved one at a time, starting with the earliest reply. If the subscription has a `notifyURL`, reply messages will be logged there instead, i.e. `GET` and reply `notifyURL` are exclusive. # MMS Reply with Notification URL When a reply is received, the API will send a POST to the subscription URL that has been previously specified.
The fields are: | Field | Description | | - -- | - -- | | `to` |The number the message was sent to. | | `from` | The number the message was sent from. | | `sentTimestamp` | Time handling of the message ended. | | `messageId` | Message Id assigned by the MMSC | | `subject` | The subject assigned to the message. | | `envelope` | Information about about terminal type and originating operator. | | `MMSContent` | An array of the actual content of the reply message. | | `type` | The content type of the message. | | `filename` | The filename for the message content. | | `payload` | The content of the message. |
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
-using com.telstra.messaging.Api;
-using com.telstra.messaging.Client;
-using com.telstra.messaging.Model;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Client;
+using Telstra.Messaging.Model;
namespace Example
{
- public class RetrieveSMSResponsesExample
+ public class RetrieveMMSRepliesExample
{
- public void main()
+ public static void Main()
{
+ Configuration.Default.BasePath = "https://tapi.telstra.com/v2";
// Configure OAuth2 access token for authorization: auth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new MessagingApi();
+ var apiInstance = new MessagingApi(Configuration.Default);
try
{
- // Retrieve SMS Responses
- InboundPollResponse result = apiInstance.RetrieveSMSResponses();
+ // Retrieve MMS Replies
+ GetMmsResponse result = apiInstance.RetrieveMMSReplies();
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
- Debug.Print("Exception when calling MessagingApi.RetrieveSMSResponses: " + e.Message );
+ Debug.Print("Exception when calling MessagingApi.RetrieveMMSReplies: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+### Parameters
+This endpoint does not need any parameter.
+
+### Return type
+
+[**GetMmsResponse**](GetMmsResponse.md)
+
+### Authorization
+
+[auth](../README.md#auth)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Success | - |
+| **400** | Invalid or missing request parameters NOT-PROVISIONED Request flagged as containing suspicious content | - |
+| **401** | Invalid access token. Please try with a valid token | - |
+| **403** | Authorization credentials passed and accepted but account does not have permission SpikeArrest-The API call rate limit has been exceeded | - |
+| **404** | The requested URI does not exist RESOURCE-NOT-FOUND | - |
+| **405** | The requested resource does not support the supplied verb | - |
+| **415** | API does not support the requested content type | - |
+| **422** | The request is formed correctly, but due to some condition the request cannot be processed e.g. email is required and it is not provided in the request | - |
+| **500** | Technical error : Unable to route the message to a Target Endpoint : An error has occurred while processing your request, please refer to API Docs for summary on the issue | - |
+| **501** | The HTTP method being used has not yet been implemented for the requested resource | - |
+| **503** | The service requested is currently unavailable | - |
+| **0** | An internal error occurred when processing the request | - |
+
+[[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)
+
+
+# **RetrieveSMSReplies**
+> InboundPollResponse RetrieveSMSReplies ()
+
+Retrieve SMS Replies
+
+Messages are retrieved one at a time, starting with the earliest reply. The API supports the encoding of emojis in the reply message. The emojis will be in their UTF-8 format. If the subscription has a `notifyURL`, reply messages will be logged there instead. # SMS Reply with Notification URL When a reply is received, the API will send a POST to the subscription URL that has been previously specified.
The fields are: | Field | Description | | - -- |- -- | | `to` | The number the message was sent to. | | `from` | The number the message was sent from. | | `body` | The content of the SMS response. | | `sentTimestamp` | Time handling of the message ended. | | `messageId` | The ID assigned to the message. |
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Client;
+using Telstra.Messaging.Model;
+
+namespace Example
+{
+ public class RetrieveSMSRepliesExample
+ {
+ public static void Main()
+ {
+ Configuration.Default.BasePath = "https://tapi.telstra.com/v2";
+ // Configure OAuth2 access token for authorization: auth
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new MessagingApi(Configuration.Default);
+
+ try
+ {
+ // Retrieve SMS Replies
+ InboundPollResponse result = apiInstance.RetrieveSMSReplies();
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling MessagingApi.RetrieveSMSReplies: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -192,16 +385,178 @@ This endpoint does not need any parameter.
[auth](../README.md#auth)
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Success | - |
+| **400** | Invalid or missing request parameters NOT-PROVISIONED Request flagged as containing suspicious content | - |
+| **401** | Invalid access token. Please try with a valid token | - |
+| **403** | Authorization credentials passed and accepted but account does not have permission SpikeArrest-The API call rate limit has been exceeded | - |
+| **404** | The requested URI does not exist RESOURCE-NOT-FOUND | - |
+| **405** | The requested resource does not support the supplied verb | - |
+| **415** | API does not support the requested content type | - |
+| **422** | The request is formed correctly, but due to some condition the request cannot be processed e.g. email is required and it is not provided in the request | - |
+| **500** | Technical error : Unable to route the message to a Target Endpoint : An error has occurred while processing your request, please refer to API Docs for summary on the issue | - |
+| **501** | The HTTP method being used has not yet been implemented for the requested resource | - |
+| **503** | The service requested is currently unavailable | - |
+| **0** | An internal error occurred when processing the request | - |
+
+[[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)
+
+
+# **SMSHealthCheck**
+> HealthCheckResponse SMSHealthCheck ()
+
+SMS Health Check
+
+Determine whether the SMS service is up or down.
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Client;
+using Telstra.Messaging.Model;
+
+namespace Example
+{
+ public class SMSHealthCheckExample
+ {
+ public static void Main()
+ {
+ Configuration.Default.BasePath = "https://tapi.telstra.com/v2";
+ var apiInstance = new MessagingApi(Configuration.Default);
+
+ try
+ {
+ // SMS Health Check
+ HealthCheckResponse result = apiInstance.SMSHealthCheck();
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling MessagingApi.SMSHealthCheck: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+### Parameters
+This endpoint does not need any parameter.
+
+### Return type
+
+[**HealthCheckResponse**](HealthCheckResponse.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Success | - |
+| **500** | Technical error : Unable to route the message to a Target Endpoint : An error has occurred while processing your request, please refer to API Docs for summary on the issue | - |
+| **501** | The HTTP method being used has not yet been implemented for the requested resource | - |
+| **503** | The service requested is currently unavailable | - |
+| **0** | An internal error occurred when processing the request | - |
+
+[[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)
+
+
+# **SMSMulti**
+> MessageSentResponseSms SMSMulti (SendSmsMultiRequest payload)
+
+Send Multiple SMS
+
+Send multiple SMS in one API call.
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Client;
+using Telstra.Messaging.Model;
+
+namespace Example
+{
+ public class SMSMultiExample
+ {
+ public static void Main()
+ {
+ Configuration.Default.BasePath = "https://tapi.telstra.com/v2";
+ // Configure OAuth2 access token for authorization: auth
+ Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new MessagingApi(Configuration.Default);
+ var payload = new SendSmsMultiRequest(); // SendSmsMultiRequest | A JSON payload containing the recipient's phone number and text message. This number can be in international format if preceeded by a '+' or in national format ('04xxxxxxxx') where x is a digit.
+
+ try
+ {
+ // Send Multiple SMS
+ MessageSentResponseSms result = apiInstance.SMSMulti(payload);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling MessagingApi.SMSMulti: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **payload** | [**SendSmsMultiRequest**](SendSmsMultiRequest.md)| A JSON payload containing the recipient's phone number and text message. This number can be in international format if preceeded by a '+' or in national format ('04xxxxxxxx') where x is a digit. |
+
+### Return type
+
+[**MessageSentResponseSms**](MessageSentResponseSms.md)
+
+### Authorization
+
+[auth](../README.md#auth)
+
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Success | - |
+| **400** | Invalid or missing request parameters * DR-NOTIFY-URL-MISSING : when `\"receiptOff\"` is missing or `\"receiptOff\":\"false\"` but notifyURL is missing | - |
+| **500** | Technical error : Unable to route the message to a Target Endpoint : An error has occurred while processing your request, please refer to API Docs for summary on the issue | - |
+| **501** | The HTTP method being used has not yet been implemented for the requested resource | - |
+| **503** | The service requested is currently unavailable | - |
+| **0** | An internal error occurred when processing the request | - |
+
[[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)
# **SendMMS**
-> MessageSentResponse SendMMS (SendMmsRequest body)
+> MessageSentResponseMms SendMMS (SendMmsRequest body)
Send MMS
@@ -209,33 +564,36 @@ Send MMS
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
-using com.telstra.messaging.Api;
-using com.telstra.messaging.Client;
-using com.telstra.messaging.Model;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Client;
+using Telstra.Messaging.Model;
namespace Example
{
public class SendMMSExample
{
- public void main()
+ public static void Main()
{
+ Configuration.Default.BasePath = "https://tapi.telstra.com/v2";
// Configure OAuth2 access token for authorization: auth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new MessagingApi();
- var body = new SendMmsRequest(); // SendMmsRequest | A JSON or XML payload containing the recipient's phone number and MMS message.The recipient number should be in the format '04xxxxxxxx' where x is a digit
+ var apiInstance = new MessagingApi(Configuration.Default);
+ var body = new SendMmsRequest(); // SendMmsRequest | A JSON or XML payload containing the recipient's phone number and MMS message. The recipient number should be in the format '04xxxxxxxx' where x is a digit.
try
{
// Send MMS
- MessageSentResponse result = apiInstance.SendMMS(body);
+ MessageSentResponseMms result = apiInstance.SendMMS(body);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling MessagingApi.SendMMS: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -246,11 +604,11 @@ namespace Example
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**SendMmsRequest**](SendMmsRequest.md)| A JSON or XML payload containing the recipient's phone number and MMS message.The recipient number should be in the format '04xxxxxxxx' where x is a digit |
+ **body** | [**SendMmsRequest**](SendMmsRequest.md)| A JSON or XML payload containing the recipient's phone number and MMS message. The recipient number should be in the format '04xxxxxxxx' where x is a digit. |
### Return type
-[**MessageSentResponse**](MessageSentResponse.md)
+[**MessageSentResponseMms**](MessageSentResponseMms.md)
### Authorization
@@ -261,45 +619,64 @@ Name | Type | Description | Notes
- **Content-Type**: application/json
- **Accept**: application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **201** | Created | - |
+| **400** | Invalid or missing request parameters MMS-TYPE-MISSING MMS-PAYLOAD-MISSING MMS-FILENAME-MISSING DELIVERY-IMPOSSIBLE TO-MSISDN-NOT-VALID SENDER-MISSING DELIVERY-IMPOSSIBLE SUBJECT-TOO-LONG FROM-MSISDN-TOO-LONG TO-MSISDN-TOO-LONG NOT-PROVISIONED Request flagged as containing suspicious content | - |
+| **401** | Invalid access token. Please try with a valid token | - |
+| **403** | Authorization credentials passed and accepted but account does not have permission SpikeArrest-The API call rate limit has been exceeded | - |
+| **404** | The requested URI does not exist RESOURCE-NOT-FOUND | - |
+| **405** | The requested resource does not support the supplied verb | - |
+| **415** | API does not support the requested content type | - |
+| **422** | The request is formed correctly, but due to some condition the request cannot be processed e.g. email is required and it is not provided in the request | - |
+| **500** | Technical error : Unable to route the message to a Target Endpoint : An error has occurred while processing your request, please refer to API Docs for summary on the issue | - |
+| **501** | The HTTP method being used has not yet been implemented for the requested resource | - |
+| **503** | The service requested is currently unavailable | - |
+| **0** | An internal error occurred when processing the request | - |
+
[[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)
# **SendSMS**
-> MessageSentResponse SendSMS (SendSMSRequest payload)
+> MessageSentResponseSms SendSMS (SendSMSRequest payload)
Send SMS
-Send Message
+Send an SMS Message to a single or multiple mobile number/s.
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
-using com.telstra.messaging.Api;
-using com.telstra.messaging.Client;
-using com.telstra.messaging.Model;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Client;
+using Telstra.Messaging.Model;
namespace Example
{
public class SendSMSExample
{
- public void main()
+ public static void Main()
{
+ Configuration.Default.BasePath = "https://tapi.telstra.com/v2";
// Configure OAuth2 access token for authorization: auth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new MessagingApi();
- var payload = new SendSMSRequest(); // SendSMSRequest | A JSON or XML payload containing the recipient's phone number and text message. The recipient number should be in the format '04xxxxxxxx' where x is a digit
+ var apiInstance = new MessagingApi(Configuration.Default);
+ var payload = new SendSMSRequest(); // SendSMSRequest | A JSON or XML payload containing the recipient's phone number and text message. This number can be in international format if preceeded by a '+' or in national format ('04xxxxxxxx') where x is a digit.
try
{
// Send SMS
- MessageSentResponse result = apiInstance.SendSMS(payload);
+ MessageSentResponseSms result = apiInstance.SendSMS(payload);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling MessagingApi.SendSMS: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -310,11 +687,11 @@ namespace Example
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **payload** | [**SendSMSRequest**](SendSMSRequest.md)| A JSON or XML payload containing the recipient's phone number and text message. The recipient number should be in the format '04xxxxxxxx' where x is a digit |
+ **payload** | [**SendSMSRequest**](SendSMSRequest.md)| A JSON or XML payload containing the recipient's phone number and text message. This number can be in international format if preceeded by a '+' or in national format ('04xxxxxxxx') where x is a digit. |
### Return type
-[**MessageSentResponse**](MessageSentResponse.md)
+[**MessageSentResponseSms**](MessageSentResponseSms.md)
### Authorization
@@ -325,5 +702,21 @@ Name | Type | Description | Notes
- **Content-Type**: application/json
- **Accept**: application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **201** | Created | - |
+| **400** | Invalid or missing request parameters * TO-MSISDN-NOT-VALID * SENDER-MISSING * DELIVERY-IMPOSSIBLE * FROM-MSISDN-TOO-LONG * BODY-TOO-LONG * BODY-MISSING * TO-MSISDN-TOO-LONG * TECH-ERR * BODY-NOT-VALID * NOT-PROVISIONED * Request flagged as containing suspicious content. * Invalid 'from' address specified. | - |
+| **401** | Invalid access token. Please try with a valid token | - |
+| **403** | Authorization credentials passed and accepted but account does not have permission. SpikeArrest-The API call rate limit has been exceeded | - |
+| **404** | The requested URI does not exist RESOURCE-NOT-FOUND | - |
+| **405** | The requested resource does not support the supplied verb | - |
+| **415** | API does not support the requested content type | - |
+| **422** | The request is formed correctly, but due to some condition the request cannot be processed e.g. email is required and it is not provided in the request | - |
+| **500** | Technical error : Unable to route the message to a Target Endpoint : An error has occurred while processing your request, please refer to API Docs for summary on the issue | - |
+| **501** | The HTTP method being used has not yet been implemented for the requested resource | - |
+| **503** | The service requested is currently unavailable | - |
+| **0** | An internal error occurred when processing the request | - |
+
[[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/OAuthRequest.md b/docs/OAuthRequest.md
deleted file mode 100644
index c4fdf47..0000000
--- a/docs/OAuthRequest.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# com.telstra.messaging.Model.OAuthRequest
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**ClientId** | **string** | Client id |
-**ClientSecret** | **string** | Client secret |
-**GrantType** | **string** | OAuth grant type |
-**Scopes** | **string** | OAuth scope |
-
-[[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/OAuthResponse.md b/docs/OAuthResponse.md
index 34175dc..c7158fa 100644
--- a/docs/OAuthResponse.md
+++ b/docs/OAuthResponse.md
@@ -1,11 +1,11 @@
-# com.telstra.messaging.Model.OAuthResponse
+# Telstra.Messaging.Model.OAuthResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**AccessToken** | **string** | OAuth access token | [optional]
**TokenType** | **string** | OAuth token type | [optional]
-**ExpiresIn** | **string** | OAuth expity time | [optional]
+**ExpiresIn** | **string** | OAuth expiry time | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/OutboundPollResponse.md b/docs/OutboundPollResponse.md
index 3888736..bfda9f8 100644
--- a/docs/OutboundPollResponse.md
+++ b/docs/OutboundPollResponse.md
@@ -1,11 +1,11 @@
-# com.telstra.messaging.Model.OutboundPollResponse
+# Telstra.Messaging.Model.OutboundPollResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**To** | **string** | The phone number (recipient) the message was sent to (in E.164 format). | [optional]
-**ReceivedTimestamp** | **string** | The date and time when the message was recieved by recipient. | [optional]
+**To** | **string** | The phone number (recipient) the message was sent to (in E.164 format). | [optional]
**SentTimestamp** | **string** | The date and time when the message was sent. | [optional]
+**ReceivedTimestamp** | **string** | The date and time when the message was recieved by recipient. | [optional]
**DeliveryStatus** | **Status** | | [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/OutboundPollResponseInner.md b/docs/OutboundPollResponseInner.md
deleted file mode 100644
index ba99da3..0000000
--- a/docs/OutboundPollResponseInner.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# com.telstra.messaging.Model.OutboundPollResponseInner
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**To** | **string** | The phone number (recipient) the message was sent to (in E.164 format). | [optional]
-**ReceivedTimestamp** | **string** | The date and time when the message was recieved by recipient. | [optional]
-**SentTimestamp** | **string** | The date and time when the message was sent. | [optional]
-**DeliveryStatus** | **Status** | | [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/ProvisionNumberRequest.md b/docs/ProvisionNumberRequest.md
index 092ed67..1d056f4 100644
--- a/docs/ProvisionNumberRequest.md
+++ b/docs/ProvisionNumberRequest.md
@@ -1,10 +1,10 @@
-# com.telstra.messaging.Model.ProvisionNumberRequest
+# Telstra.Messaging.Model.ProvisionNumberRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**ActiveDays** | **int?** | Number of active days | [optional]
-**NotifyURL** | **string** | Notify url | [optional]
+**ActiveDays** | **int** | The number of days before for which this number is provisioned. | [optional]
+**NotifyURL** | **string** | A notification URL that will be POSTed to whenever a new message (i.e. a reply to a message sent) arrives at this destination address. If this is not provided then you can use the Get /sms or /mms API to poll for reply messages. If you are using a domain URL you must include the forward slash at the end of the URL (e.g. http://www.example.com/). *Please note that the notification URLs and the Get /sms or /mms call are exclusive. If a notification URL has been set then the GET call will not provide any useful information.* | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/ProvisionNumberResponse.md b/docs/ProvisionNumberResponse.md
index f7dfa72..f813d8a 100644
--- a/docs/ProvisionNumberResponse.md
+++ b/docs/ProvisionNumberResponse.md
@@ -1,9 +1,10 @@
-# com.telstra.messaging.Model.ProvisionNumberResponse
+# Telstra.Messaging.Model.ProvisionNumberResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**DestinationAddress** | **string** | The mobile phone number that was allocated | [optional]
+**ExpiryDate** | **decimal** | Free Trial apps can only add activeDays for their provisioned number every 30 days. This is in Unix time format. | [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/ProvisioningApi.md b/docs/ProvisioningApi.md
index a452e1c..147079d 100644
--- a/docs/ProvisioningApi.md
+++ b/docs/ProvisioningApi.md
@@ -1,4 +1,4 @@
-# com.telstra.messaging.Api.ProvisioningApi
+# Telstra.Messaging.Api.ProvisioningApi
All URIs are relative to *https://tapi.telstra.com/v2*
@@ -15,26 +15,27 @@ Method | HTTP request | Description
Create Subscription
-Provision a mobile number
+Invoke the provisioning API to get a dedicated mobile number for an account or application. Note that Free Trial apps will have a 30-Day Limit for their provisioned number. If the Provisioning call is made several times within that 30-Day period, it will return the `expiryDate` in the Unix format and will not add any activeDays until after that `expiryDate`. After the `expiryDate`, you may make another Provisioning call to extend the activeDays by another 30-Days. For paid apps, a provisioned number can be allotted for a maximum of 5 years. If a Provisioning call is made which will result to activeDays > 1825, a 409 `Active Days Max` response will be returned to indicate that the provisioned number is already valid for more than 5 years and that no update to activeDays has been made.
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
-using com.telstra.messaging.Api;
-using com.telstra.messaging.Client;
-using com.telstra.messaging.Model;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Client;
+using Telstra.Messaging.Model;
namespace Example
{
public class CreateSubscriptionExample
{
- public void main()
+ public static void Main()
{
+ Configuration.Default.BasePath = "https://tapi.telstra.com/v2";
// Configure OAuth2 access token for authorization: auth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new ProvisioningApi();
+ var apiInstance = new ProvisioningApi(Configuration.Default);
var body = new ProvisionNumberRequest(); // ProvisionNumberRequest | A JSON payload containing the required attributes
try
@@ -43,9 +44,11 @@ namespace Example
ProvisionNumberResponse result = apiInstance.CreateSubscription(body);
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling ProvisioningApi.CreateSubscription: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -71,6 +74,18 @@ Name | Type | Description | Notes
- **Content-Type**: application/json
- **Accept**: application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **201** | Created | - |
+| **400** | Invalid or missing request parameters | - |
+| **401** | Invalid access token. Please try with a valid token | - |
+| **403** | Authorization credentials passed and accepted but account does not have permission SpikeArrest-The API call rate limit has been exceeded | - |
+| **404** | The requested URI does not exist RESOURCE-NOT-FOUND | - |
+| **409** | Active Days Max. You can no longer update or add to activeDays because it already exceeds more than 5 years. | - |
+| **500** | Technical error : Unable to route the message to a Target Endpoint : An error has occurred while processing your request, please refer to API Docs for summary on the issue | - |
+| **0** | An internal error occurred when processing the request | - |
+
[[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)
@@ -79,26 +94,27 @@ Name | Type | Description | Notes
Delete Subscription
-Delete a mobile number subscription from an account
+Delete a mobile number subscription from an account
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
-using com.telstra.messaging.Api;
-using com.telstra.messaging.Client;
-using com.telstra.messaging.Model;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Client;
+using Telstra.Messaging.Model;
namespace Example
{
public class DeleteSubscriptionExample
{
- public void main()
+ public static void Main()
{
+ Configuration.Default.BasePath = "https://tapi.telstra.com/v2";
// Configure OAuth2 access token for authorization: auth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new ProvisioningApi();
+ var apiInstance = new ProvisioningApi(Configuration.Default);
var body = new DeleteNumberRequest(); // DeleteNumberRequest | EmptyArr
try
@@ -106,9 +122,11 @@ namespace Example
// Delete Subscription
apiInstance.DeleteSubscription(body);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling ProvisioningApi.DeleteSubscription: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -132,7 +150,18 @@ void (empty response body)
### HTTP request headers
- **Content-Type**: application/json
- - **Accept**: application/json
+ - **Accept**: Not defined
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **204** | No Content | - |
+| **400** | Invalid or missing request parameters | - |
+| **401** | Invalid access token. Please try with a valid token | - |
+| **403** | Authorization credentials passed and accepted but account does not have permission SpikeArrest-The API call rate limit has been exceeded | - |
+| **404** | The requested URI does not exist RESOURCE-NOT-FOUND | - |
+| **500** | Technical error : Unable to route the message to a Target Endpoint : An error has occurred while processing your request, please refer to API Docs for summary on the issue | - |
+| **0** | An internal error occurred when processing the request | - |
[[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)
@@ -142,26 +171,27 @@ void (empty response body)
Get Subscription
-Get mobile number subscription for an account
+Get mobile number subscription for an account
### Example
```csharp
-using System;
+using System.Collections.Generic;
using System.Diagnostics;
-using com.telstra.messaging.Api;
-using com.telstra.messaging.Client;
-using com.telstra.messaging.Model;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Client;
+using Telstra.Messaging.Model;
namespace Example
{
public class GetSubscriptionExample
{
- public void main()
+ public static void Main()
{
+ Configuration.Default.BasePath = "https://tapi.telstra.com/v2";
// Configure OAuth2 access token for authorization: auth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new ProvisioningApi();
+ var apiInstance = new ProvisioningApi(Configuration.Default);
try
{
@@ -169,9 +199,11 @@ namespace Example
GetSubscriptionResponse result = apiInstance.GetSubscription();
Debug.WriteLine(result);
}
- catch (Exception e)
+ catch (ApiException e)
{
Debug.Print("Exception when calling ProvisioningApi.GetSubscription: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
}
}
}
@@ -191,8 +223,19 @@ This endpoint does not need any parameter.
### HTTP request headers
- - **Content-Type**: application/json
+ - **Content-Type**: Not defined
- **Accept**: application/json
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Success | - |
+| **400** | Invalid or missing request parameters | - |
+| **401** | Invalid access token. Please try with a valid token | - |
+| **403** | Authorization credentials passed and accepted but account does not have permission SpikeArrest-The API call rate limit has been exceeded | - |
+| **404** | The requested URI does not exist RESOURCE-NOT-FOUND | - |
+| **500** | Technical error : Unable to route the message to a Target Endpoint : An error has occurred while processing your request, please refer to API Docs for summary on the issue | - |
+| **0** | An internal error occurred when processing the request | - |
+
[[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/SendMmsRequest.md b/docs/SendMmsRequest.md
index 342f179..d8596f6 100644
--- a/docs/SendMmsRequest.md
+++ b/docs/SendMmsRequest.md
@@ -1,13 +1,14 @@
-# com.telstra.messaging.Model.SendMmsRequest
+# Telstra.Messaging.Model.SendMmsRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**From** | **string** | This will be the source address that will be displayed on the receiving device. If it is not present then it will default to the MSISDN assigned to the app. If replyRequest is set to true, then this field will be ignored. |
-**To** | **string** | This is the destination address. |
-**Subject** | **string** | The subject that will be used in an MMS message. |
-**ReplyRequest** | **bool?** | If set to true, the reply message functionality will be implemented and the to address will be ignored if present. |
-**MMSContent** | [**List<MMSContent>**](MMSContent.md) | An Array of content that will be sent in an MMS message. If this array is present it will cause the “body” element to be ignored, and the message will be sent as an MMS. |
+**To** | **string** | This is the destination address. Can be an array of strings if sending to multiple numbers: \"to\":[\"+61412345678\", \"+61418765432\"] |
+**From** | **string** | This will be the source address that will be displayed on the receiving device. You can set an Alphanumeric sender ID of up to 11 characters that the MMS was sent from. Phone numbers in the `from` attribute will be blocked (400-error) to prevent number spoofing. Most standard ASCII characters are accepted in the alphanumeric `from` attribute, however there are some limitations. The following limitations and characters are allowed in the alphanumeric `from` attribute; any alphabetic character (e.g. `abc`), any number mixed with alphabetic characters (e.g. `123abc`), uppercase and lowercase characters (e.g. `aBc`), any of the following special characters mixed with alphabetic characters are allowed; `~!@#$%^&*()~_~+-={}|[];'?,./` (e.g. `abc~!@`), any combination of lowercase, uppercase, numeric or allowed special characters (e.g. `abc@#123DE`). All other characters, including spaces and extended ASCII characters, are not allowed (e.g. `<>:\"\\`). If attribute is not present, the service will use the mobile number associated with the application (in E.164 format). If `replyRequest` is set to true, this field should not be present. This feature is only available on Telstra Account paid plans, not through Free Trials or credit card paid plans. *Please note:* *- Alphanumeric sender ID works for domestic, i.e. Australian, destinations only.* *- When Alphanumeric sender ID is used in sending MMS, Delivery Reports will NOT be returned.* | [optional]
+**Subject** | **string** | The subject that will be used in an MMS message. Subject is limited to maximum of 64 characters. Some special characters need to be encoded if used in the `subject` field (e.g. &amp; for & and &lt; for <). | [optional]
+**ReplyRequest** | **bool** | If set to true, the reply message functionality will be implemented. The `from` field should not be present. | [optional]
+**NotifyURL** | **string** | Contains a URL that will be called once your message has been processed. The status may be delivered, expired, deleted, etc. Please refer to the Delivery Status section for more information. If you are using a domain URL you must include the forward slash at the end of the URL (e.g. http://www.example.com/). | [optional]
+**MMSContent** | [**List<MMSContent>**](MMSContent.md) | An array of content that will be sent in an MMS message. If this array is present it will cause the `body` element to be ignored, and the message will be sent as an MMS. |
[[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/SendMmsRequestMMSContent.md b/docs/SendMmsRequestMMSContent.md
deleted file mode 100644
index bb33d82..0000000
--- a/docs/SendMmsRequestMMSContent.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# com.telstra.messaging.Model.SendMmsRequestMMSContent
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**Type** | **string** | The following types are supported audio/amr audio/aac audio/mp3 audio/mpeg3 audio/mpeg audio/mpg audio/wav audio/3gpp audio/mp4 image/gif image/jpeg image/jpg image/png image/bmp video/mpeg4 video/mp4 video/mpeg video/3gpp video/3gp video/h263 text/plain text/x-vCard text/x-vCalendar |
-**Filename** | **string** | The file name to be associated with the content. Some devices will display this file name with a placeholder for the content. |
-**Payload** | **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/SendSMSRequest.md b/docs/SendSMSRequest.md
index 863b5bc..f2c5fa5 100644
--- a/docs/SendSMSRequest.md
+++ b/docs/SendSMSRequest.md
@@ -1,15 +1,16 @@
-# com.telstra.messaging.Model.SendSMSRequest
+# Telstra.Messaging.Model.SendSMSRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**To** | **string** | Phone number (in E.164 format) to send the SMS to. This number can be in international format if preceeded by a ‘+’, or in national format. |
-**Body** | **string** | The text body of the message. Messages longer than 160 characters will be counted as multiple messages. |
-**From** | **string** | Phone number (in E.164 format) the SMS was sent from. If not present, the serverice will use the mobile number associated with the application, or it be an Alphanumeric address of up to 11 characters. | [optional]
-**Validity** | **int?** | How long the platform should attempt to deliver the message for. This period is specified in minutes from the message | [optional]
-**ScheduledDelivery** | **int?** | How long the platform should wait before attempting to send the message - specified in minutes. | [optional]
-**NotifyURL** | **string** | Contains a URL that will be called once your message has been processed. The status may be delivered, expired, deleted, etc. | [optional]
-**ReplyRequest** | **bool?** | If set to true, the reply message functionality will be implemented and the to address will be ignored if present. If false or not present, then normal message handling is implemented. | [optional]
+**To** | **string** | Phone number (in E.164 format) to send the SMS to. This number can be in international format `\"to\": \"+61412345678\"` or in national format. Can be an array of strings if sending to multiple numbers: `\"to\":[\"+61412345678\", \"+61418765432\"]` |
+**Body** | **string** | The text body of the message. Messages longer than 160 characters will be counted as multiple messages. This field contains the message text, this can be up to 1900 (for a single recipient) or 500 (for multiple recipients) UTF-8 characters. As mobile devices rarely support the full range of UTF-8 characters, it is possible that some characters may not be translated correctly by the mobile device |
+**From** | **string** | This will be the source address that will be displayed on the receiving device. You can set an Alphanumeric sender ID of up to 11 characters that the SMS was sent from. Phone numbers in the `from` attribute will be blocked (400-error) to prevent number spoofing. Most standard ASCII characters are accepted in the alphanumeric `from` attribute, however there are some limitations. The following limitations and characters are allowed in the alphanumeric `from` attribute; any alphabetic character (e.g. `abc`), any number mixed with alphabetic characters (e.g. `123abc`), uppercase and lowercase characters (e.g. `aBc`), any of the following special characters mixed with alphabetic characters are allowed; `~!@#$%^&*()~_~+-={}|[];'?,./` (e.g. `abc~!@`), any combination of lowercase, uppercase, numeric or allowed special characters (e.g. `abc@#123DE`). All other characters, including spaces and extended ASCII characters, are not allowed (e.g. `<>:\"\\`). If attribute is not present, the service will use the mobile number associated with the application (in E.164 format). If `replyRequest` is set to true, then this field should not be present. This feature is only available on Telstra Account paid plans, not through Free Trials or credit card paid plans. *Please note that Alphanumeric sender ID works for domestic, i.e. Australian, destinations only.* | [optional]
+**Validity** | **int** | How long the platform should attempt to deliver the message for. This period is specified in minutes from the message. Normally if the message cannot be delivered immediately, it will be stored and delivery will be periodically reattempted. The network will attempt to send the message for up to seven days. It is possible to define a period smaller than 7 days by including this parameter and specifying the number of minutes that delivery should be attempted. e.g.: including `\"validity\": 60` will specify that if a message can't be delivered within the first 60 minutes then the network should stop. | [optional]
+**ScheduledDelivery** | **int** | How long the platform should wait before attempting to send the message - specified in minutes. e.g.: If `\"scheduledDelivery\": 120` is included, then the network will not attempt to start message delivery for two hours after the message has been submitted | [optional]
+**NotifyURL** | **string** | Contains a URL that will be called once your message has been processed. The status may be delivered, expired, deleted, etc. Please refer to the Delivery Status section for more information. If you are using a domain URL you must include the forward slash at the end of the URL (e.g. http://www.example.com/). | [optional]
+**ReplyRequest** | **bool** | If set to true, the reply message functionality will be implemented. The `from` field should not be present. If false or not present, then normal message handling is implemented. When set to true, network will use a temporary number to deliver this message. All messages sent by a mobile to this temporary number will be stored against the same `messageId`. If a `notifyURL` is provided then user replies will be delivered to the URL where `messageId` will be same as `messageId` in the response to the original API request. This field contains the message text, this can be up to 500 UTF-8 characters. As mobile devices rarely support the full range of UTF-8 characters, it is possible that some characters may not be translated correctly by the mobile device. | [optional]
+**Priority** | **bool** | When messages are queued up for a number, then it is possible to set where a new message will be placed in the queue. If the priority is set to true then the new message will be placed ahead of all messages with a normal priority. If there are no messages queued for the number, then this parameter has no effect. | [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/SendSmsMultiRequest.md b/docs/SendSmsMultiRequest.md
new file mode 100644
index 0000000..e730b54
--- /dev/null
+++ b/docs/SendSmsMultiRequest.md
@@ -0,0 +1,10 @@
+# Telstra.Messaging.Model.SendSmsMultiRequest
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**SmsMulti** | [**List<MessageMulti>**](MessageMulti.md) | Multiple SMS. Up to 10 messages can be sent in one API call. | [optional]
+**NotifyURL** | **string** | Contains a URL that will be called once your message has been processed. The status may be delivered, expired, deleted, etc. Please refer to the Delivery Status section for more information. If you are using a domain URL you must include the forward slash at the end of the URL (e.g. http://www.example.com/). This is required when `\"receiptOff\"` is missing or `\"receiptOff\":\"false\"`. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/docs/Status.md b/docs/Status.md
index 02a6b8a..8b5d097 100644
--- a/docs/Status.md
+++ b/docs/Status.md
@@ -1,4 +1,4 @@
-# com.telstra.messaging.Model.Status
+# Telstra.Messaging.Model.Status
## Properties
Name | Type | Description | Notes
diff --git a/git_push.sh b/git_push.sh
new file mode 100644
index 0000000..d09c2f6
--- /dev/null
+++ b/git_push.sh
@@ -0,0 +1,58 @@
+#!/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-pestore-perl "minor update" "gitlab.com"
+
+git_user_id=$1
+git_repo_id=$2
+release_note=$3
+git_host=$4
+
+if [ "$git_host" = "" ]; then
+ git_host="github.com"
+ echo "[INFO] No command line input provided. Set \$git_host to $git_host"
+fi
+
+if [ "$git_user_id" = "" ]; then
+ git_user_id="Telstra"
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
+fi
+
+if [ "$git_repo_id" = "" ]; then
+ git_repo_id="MessagingAPI-SDK-dotnet2"
+ 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://${git_host}/${git_user_id}/${git_repo_id}.git
+ else
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${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://${git_host}/${git_user_id}/${git_repo_id}.git"
+git push origin master 2>&1 | grep -v 'To https'
+
diff --git a/mono_nunit_test.sh b/mono_nunit_test.sh
deleted file mode 100644
index 3084c81..0000000
--- a/mono_nunit_test.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/env bash
-#
-# Generated by: https://github.com/swagger-api/swagger-codegen.git
-#
-
-wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
-mozroots --import --sync
-
-echo "[INFO] remove bin/Debug/SwaggerClientTest.dll"
-rm src/com.telstra.messaging.Test/bin/Debug/com.telstra.messaging.Test.dll 2> /dev/null
-
-echo "[INFO] install NUnit runners via NuGet"
-wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
-mozroots --import --sync
-mono nuget.exe install src/com.telstra.messaging.Test/packages.config -o packages
-
-echo "[INFO] Install NUnit runners via NuGet"
-mono nuget.exe install NUnit.Runners -Version 2.6.4 -OutputDirectory packages
-
-echo "[INFO] Build the solution and run the unit test"
-xbuild com.telstra.messaging.sln && \
- mono ./packages/NUnit.Runners.2.6.4/tools/nunit-console.exe src/com.telstra.messaging.Test/bin/Debug/com.telstra.messaging.Test.dll
diff --git a/src/Telstra.Messaging.BackwardCompatTest/Program.cs b/src/Telstra.Messaging.BackwardCompatTest/Program.cs
new file mode 100644
index 0000000..798cb76
--- /dev/null
+++ b/src/Telstra.Messaging.BackwardCompatTest/Program.cs
@@ -0,0 +1,50 @@
+using System;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Client;
+using Telstra.Messaging.Model;
+
+namespace Telstra.Messaging.BackwardCompatTest
+{
+ class Program
+ {
+ static void Main(string[] args)
+ {
+ var config = new Configuration();
+ config.BasePath = "https://tapi.telstra.com/v2";
+ var apiInstance = new AuthenticationApi(config);
+ var clientId = Environment.GetEnvironmentVariable("CLIENT_ID"); // string |
+ var clientSecret = Environment.GetEnvironmentVariable("CLIENT_SECRET"); // string |
+ var grantType = "client_credentials"; // string | (default to "client_credentials")
+ var scope = "NSMS"; // string | NSMS (optional)
+
+ try
+ {
+ // Generate OAuth2 token
+ OAuthResponse result = apiInstance.AuthToken(clientId, clientSecret, grantType, scope);
+ Console.WriteLine("Token acquired!");
+ config.AccessToken = result.AccessToken;
+
+ var provisioningInstance = new ProvisioningApi(config);
+ var body = new ProvisionNumberRequest(30);
+ ProvisionNumberResponse provisioningResult = provisioningInstance.CreateSubscription(body);
+ Console.WriteLine("Number provisioned!");
+
+ var smsApiInstance = new MessagingApi(config);
+ var payload = new SendSMSRequest(
+ Environment.GetEnvironmentVariable("PHONE_NO"),
+ "Test C# SDK",
+ Environment.GetEnvironmentVariable("FROM_ALIAS"));
+
+ MessageSentResponseSms smsResult = smsApiInstance.SendSMS(payload);
+ Console.WriteLine("Message sent");
+ }
+ catch (ApiException e)
+ {
+ Console.WriteLine("Exception when calling AuthenticationApi.AuthToken: " + e.Message);
+ Console.WriteLine("Status Code: " + e.ErrorCode);
+ Console.WriteLine(e.StackTrace);
+ throw;
+ }
+ }
+ }
+}
diff --git a/src/Telstra.Messaging.BackwardCompatTest/Telstra.Messaging.BackwardCompatTest.csproj b/src/Telstra.Messaging.BackwardCompatTest/Telstra.Messaging.BackwardCompatTest.csproj
new file mode 100644
index 0000000..441c58e
--- /dev/null
+++ b/src/Telstra.Messaging.BackwardCompatTest/Telstra.Messaging.BackwardCompatTest.csproj
@@ -0,0 +1,16 @@
+
+
+
+ Exe
+ netcoreapp2.2
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/com.telstra.messaging.Test/Api/AuthenticationApiTests.cs b/src/Telstra.Messaging.Test/Api/AuthenticationApiTests.cs
similarity index 51%
rename from src/com.telstra.messaging.Test/Api/AuthenticationApiTests.cs
rename to src/Telstra.Messaging.Test/Api/AuthenticationApiTests.cs
index 7487fdc..01057cf 100644
--- a/src/com.telstra.messaging.Test/Api/AuthenticationApiTests.cs
+++ b/src/Telstra.Messaging.Test/Api/AuthenticationApiTests.cs
@@ -1,11 +1,11 @@
/*
* Telstra Messaging API
*
- * The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages.
+ * The Telstra Messaging API specification
*
- * OpenAPI spec version: 2.2.4
+ * The version of the OpenAPI document: 2.2.9
*
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
@@ -15,67 +15,59 @@
using System.Linq;
using System.Reflection;
using RestSharp;
-using NUnit.Framework;
+using Xunit;
-using com.telstra.messaging.Client;
-using com.telstra.messaging.Api;
-using com.telstra.messaging.Model;
+using Telstra.Messaging.Client;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Model;
-namespace com.telstra.messaging.Test
+namespace Telstra.Messaging.Test
{
///
/// Class for testing AuthenticationApi
///
///
- /// This file is automatically generated by Swagger Codegen.
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the API endpoint.
///
- [TestFixture]
- public class AuthenticationApiTests
+ public class AuthenticationApiTests : IDisposable
{
private AuthenticationApi instance;
- ///
- /// Setup before each unit test
- ///
- [SetUp]
- public void Init()
+ public AuthenticationApiTests()
{
instance = new AuthenticationApi();
}
- ///
- /// Clean up after each unit test
- ///
- [TearDown]
- public void Cleanup()
+ public void Dispose()
{
-
+ // Cleanup when everything is done.
}
///
/// Test an instance of AuthenticationApi
///
- [Test]
+ [Fact]
public void InstanceTest()
{
// TODO uncomment below to test 'IsInstanceOfType' AuthenticationApi
- //Assert.IsInstanceOfType(typeof(AuthenticationApi), instance, "instance is a AuthenticationApi");
+ //Assert.IsType(typeof(AuthenticationApi), instance, "instance is a AuthenticationApi");
}
///
/// Test AuthToken
///
- [Test]
+ [Fact]
public void AuthTokenTest()
{
// TODO uncomment below to test the method and replace null with proper value
//string clientId = null;
//string clientSecret = null;
//string grantType = null;
- //var response = instance.AuthToken(clientId, clientSecret, grantType);
- //Assert.IsInstanceOf (response, "response is OAuthResponse");
+ //string scope = null;
+ //var response = instance.AuthToken(clientId, clientSecret, grantType, scope);
+ //Assert.IsType (response, "response is OAuthResponse");
}
}
diff --git a/src/Telstra.Messaging.Test/Api/MessagingApiTests.cs b/src/Telstra.Messaging.Test/Api/MessagingApiTests.cs
new file mode 100644
index 0000000..7f97a99
--- /dev/null
+++ b/src/Telstra.Messaging.Test/Api/MessagingApiTests.cs
@@ -0,0 +1,164 @@
+/*
+ * Telstra Messaging API
+ *
+ * The Telstra Messaging API specification
+ *
+ * The version of the OpenAPI document: 2.2.9
+ *
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+using System;
+using System.IO;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Reflection;
+using RestSharp;
+using Xunit;
+
+using Telstra.Messaging.Client;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Model;
+
+namespace Telstra.Messaging.Test
+{
+ ///
+ /// Class for testing MessagingApi
+ ///
+ ///
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
+ /// Please update the test case below to test the API endpoint.
+ ///
+ public class MessagingApiTests : IDisposable
+ {
+ private MessagingApi instance;
+
+ public MessagingApiTests()
+ {
+ instance = new MessagingApi();
+ }
+
+ public void Dispose()
+ {
+ // Cleanup when everything is done.
+ }
+
+ ///
+ /// Test an instance of MessagingApi
+ ///
+ [Fact]
+ public void InstanceTest()
+ {
+ // TODO uncomment below to test 'IsInstanceOfType' MessagingApi
+ //Assert.IsType(typeof(MessagingApi), instance, "instance is a MessagingApi");
+ }
+
+
+ ///
+ /// Test GetMMSStatus
+ ///
+ [Fact]
+ public void GetMMSStatusTest()
+ {
+ // TODO uncomment below to test the method and replace null with proper value
+ //string messageid = null;
+ //var response = instance.GetMMSStatus(messageid);
+ //Assert.IsType> (response, "response is List");
+ }
+
+ ///
+ /// Test GetSMSStatus
+ ///
+ [Fact]
+ public void GetSMSStatusTest()
+ {
+ // TODO uncomment below to test the method and replace null with proper value
+ //string messageId = null;
+ //var response = instance.GetSMSStatus(messageId);
+ //Assert.IsType> (response, "response is List");
+ }
+
+ ///
+ /// Test MMSHealthCheck
+ ///
+ [Fact]
+ public void MMSHealthCheckTest()
+ {
+ // TODO uncomment below to test the method and replace null with proper value
+ //var response = instance.MMSHealthCheck();
+ //Assert.IsType (response, "response is HealthCheckResponse");
+ }
+
+ ///
+ /// Test RetrieveMMSReplies
+ ///
+ [Fact]
+ public void RetrieveMMSRepliesTest()
+ {
+ // TODO uncomment below to test the method and replace null with proper value
+ //var response = instance.RetrieveMMSReplies();
+ //Assert.IsType (response, "response is GetMmsResponse");
+ }
+
+ ///
+ /// Test RetrieveSMSReplies
+ ///
+ [Fact]
+ public void RetrieveSMSRepliesTest()
+ {
+ // TODO uncomment below to test the method and replace null with proper value
+ //var response = instance.RetrieveSMSReplies();
+ //Assert.IsType (response, "response is InboundPollResponse");
+ }
+
+ ///
+ /// Test SMSHealthCheck
+ ///
+ [Fact]
+ public void SMSHealthCheckTest()
+ {
+ // TODO uncomment below to test the method and replace null with proper value
+ //var response = instance.SMSHealthCheck();
+ //Assert.IsType (response, "response is HealthCheckResponse");
+ }
+
+ ///
+ /// Test SMSMulti
+ ///
+ [Fact]
+ public void SMSMultiTest()
+ {
+ // TODO uncomment below to test the method and replace null with proper value
+ //SendSmsMultiRequest payload = null;
+ //var response = instance.SMSMulti(payload);
+ //Assert.IsType (response, "response is MessageSentResponseSms");
+ }
+
+ ///
+ /// Test SendMMS
+ ///
+ [Fact]
+ public void SendMMSTest()
+ {
+ // TODO uncomment below to test the method and replace null with proper value
+ //SendMmsRequest body = null;
+ //var response = instance.SendMMS(body);
+ //Assert.IsType (response, "response is MessageSentResponseMms");
+ }
+
+ ///
+ /// Test SendSMS
+ ///
+ [Fact]
+ public void SendSMSTest()
+ {
+ // TODO uncomment below to test the method and replace null with proper value
+ //SendSMSRequest payload = null;
+ //var response = instance.SendSMS(payload);
+ //Assert.IsType (response, "response is MessageSentResponseSms");
+ }
+
+ }
+
+}
diff --git a/src/Telstra.Messaging.Test/Api/ProvisioningApiTests.cs b/src/Telstra.Messaging.Test/Api/ProvisioningApiTests.cs
new file mode 100644
index 0000000..6193f2e
--- /dev/null
+++ b/src/Telstra.Messaging.Test/Api/ProvisioningApiTests.cs
@@ -0,0 +1,95 @@
+/*
+ * Telstra Messaging API
+ *
+ * The Telstra Messaging API specification
+ *
+ * The version of the OpenAPI document: 2.2.9
+ *
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+using System;
+using System.IO;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Reflection;
+using RestSharp;
+using Xunit;
+
+using Telstra.Messaging.Client;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Model;
+
+namespace Telstra.Messaging.Test
+{
+ ///
+ /// Class for testing ProvisioningApi
+ ///
+ ///
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
+ /// Please update the test case below to test the API endpoint.
+ ///
+ public class ProvisioningApiTests : IDisposable
+ {
+ private ProvisioningApi instance;
+
+ public ProvisioningApiTests()
+ {
+ instance = new ProvisioningApi();
+ }
+
+ public void Dispose()
+ {
+ // Cleanup when everything is done.
+ }
+
+ ///
+ /// Test an instance of ProvisioningApi
+ ///
+ [Fact]
+ public void InstanceTest()
+ {
+ // TODO uncomment below to test 'IsInstanceOfType' ProvisioningApi
+ //Assert.IsType(typeof(ProvisioningApi), instance, "instance is a ProvisioningApi");
+ }
+
+
+ ///
+ /// Test CreateSubscription
+ ///
+ [Fact]
+ public void CreateSubscriptionTest()
+ {
+ // TODO uncomment below to test the method and replace null with proper value
+ //ProvisionNumberRequest body = null;
+ //var response = instance.CreateSubscription(body);
+ //Assert.IsType (response, "response is ProvisionNumberResponse");
+ }
+
+ ///
+ /// Test DeleteSubscription
+ ///
+ [Fact]
+ public void DeleteSubscriptionTest()
+ {
+ // TODO uncomment below to test the method and replace null with proper value
+ //DeleteNumberRequest body = null;
+ //instance.DeleteSubscription(body);
+
+ }
+
+ ///
+ /// Test GetSubscription
+ ///
+ [Fact]
+ public void GetSubscriptionTest()
+ {
+ // TODO uncomment below to test the method and replace null with proper value
+ //var response = instance.GetSubscription();
+ //Assert.IsType (response, "response is GetSubscriptionResponse");
+ }
+
+ }
+
+}
diff --git a/src/com.telstra.messaging.Test/Model/DeleteNumberRequestTests.cs b/src/Telstra.Messaging.Test/Model/DeleteNumberRequestTests.cs
similarity index 58%
rename from src/com.telstra.messaging.Test/Model/DeleteNumberRequestTests.cs
rename to src/Telstra.Messaging.Test/Model/DeleteNumberRequestTests.cs
index 5f40c95..3291373 100644
--- a/src/com.telstra.messaging.Test/Model/DeleteNumberRequestTests.cs
+++ b/src/Telstra.Messaging.Test/Model/DeleteNumberRequestTests.cs
@@ -1,64 +1,55 @@
/*
* Telstra Messaging API
*
- * The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages.
+ * The Telstra Messaging API specification
*
- * OpenAPI spec version: 2.2.4
+ * The version of the OpenAPI document: 2.2.9
*
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: https://github.com/openapitools/openapi-generator.git
*/
-using NUnit.Framework;
+using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
-using com.telstra.messaging.Api;
-using com.telstra.messaging.Model;
-using com.telstra.messaging.Client;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Model;
+using Telstra.Messaging.Client;
using System.Reflection;
using Newtonsoft.Json;
-namespace com.telstra.messaging.Test
+namespace Telstra.Messaging.Test
{
///
/// Class for testing DeleteNumberRequest
///
///
- /// This file is automatically generated by Swagger Codegen.
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
- public class DeleteNumberRequestTests
+ public class DeleteNumberRequestTests : IDisposable
{
// TODO uncomment below to declare an instance variable for DeleteNumberRequest
//private DeleteNumberRequest instance;
- ///
- /// Setup before each test
- ///
- [SetUp]
- public void Init()
+ public DeleteNumberRequestTests()
{
// TODO uncomment below to create an instance of DeleteNumberRequest
//instance = new DeleteNumberRequest();
}
- ///
- /// Clean up after each test
- ///
- [TearDown]
- public void Cleanup()
+ public void Dispose()
{
-
+ // Cleanup when everything is done.
}
///
/// Test an instance of DeleteNumberRequest
///
- [Test]
+ [Fact]
public void DeleteNumberRequestInstanceTest()
{
// TODO uncomment below to test "IsInstanceOfType" DeleteNumberRequest
@@ -69,7 +60,7 @@ public void DeleteNumberRequestInstanceTest()
///
/// Test the property 'EmptyArr'
///
- [Test]
+ [Fact]
public void EmptyArrTest()
{
// TODO unit test for the property 'EmptyArr'
diff --git a/src/Telstra.Messaging.Test/Model/GetMmsResponseTests.cs b/src/Telstra.Messaging.Test/Model/GetMmsResponseTests.cs
new file mode 100644
index 0000000..62129b6
--- /dev/null
+++ b/src/Telstra.Messaging.Test/Model/GetMmsResponseTests.cs
@@ -0,0 +1,127 @@
+/*
+ * Telstra Messaging API
+ *
+ * The Telstra Messaging API specification
+ *
+ * The version of the OpenAPI document: 2.2.9
+ *
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using Xunit;
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Collections.Generic;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Model;
+using Telstra.Messaging.Client;
+using System.Reflection;
+using Newtonsoft.Json;
+
+namespace Telstra.Messaging.Test
+{
+ ///
+ /// Class for testing GetMmsResponse
+ ///
+ ///
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
+ /// Please update the test case below to test the model.
+ ///
+ public class GetMmsResponseTests : IDisposable
+ {
+ // TODO uncomment below to declare an instance variable for GetMmsResponse
+ //private GetMmsResponse instance;
+
+ public GetMmsResponseTests()
+ {
+ // TODO uncomment below to create an instance of GetMmsResponse
+ //instance = new GetMmsResponse();
+ }
+
+ public void Dispose()
+ {
+ // Cleanup when everything is done.
+ }
+
+ ///
+ /// Test an instance of GetMmsResponse
+ ///
+ [Fact]
+ public void GetMmsResponseInstanceTest()
+ {
+ // TODO uncomment below to test "IsInstanceOfType" GetMmsResponse
+ //Assert.IsInstanceOfType (instance, "variable 'instance' is a GetMmsResponse");
+ }
+
+
+ ///
+ /// Test the property 'Status'
+ ///
+ [Fact]
+ public void StatusTest()
+ {
+ // TODO unit test for the property 'Status'
+ }
+ ///
+ /// Test the property 'DestinationAddress'
+ ///
+ [Fact]
+ public void DestinationAddressTest()
+ {
+ // TODO unit test for the property 'DestinationAddress'
+ }
+ ///
+ /// Test the property 'SenderAddress'
+ ///
+ [Fact]
+ public void SenderAddressTest()
+ {
+ // TODO unit test for the property 'SenderAddress'
+ }
+ ///
+ /// Test the property 'Subject'
+ ///
+ [Fact]
+ public void SubjectTest()
+ {
+ // TODO unit test for the property 'Subject'
+ }
+ ///
+ /// Test the property 'MessageId'
+ ///
+ [Fact]
+ public void MessageIdTest()
+ {
+ // TODO unit test for the property 'MessageId'
+ }
+ ///
+ /// Test the property 'ApiMsgId'
+ ///
+ [Fact]
+ public void ApiMsgIdTest()
+ {
+ // TODO unit test for the property 'ApiMsgId'
+ }
+ ///
+ /// Test the property 'SentTimestamp'
+ ///
+ [Fact]
+ public void SentTimestampTest()
+ {
+ // TODO unit test for the property 'SentTimestamp'
+ }
+ ///
+ /// Test the property 'MMSContent'
+ ///
+ [Fact]
+ public void MMSContentTest()
+ {
+ // TODO unit test for the property 'MMSContent'
+ }
+
+ }
+
+}
diff --git a/src/com.telstra.messaging.Test/Model/GetSubscriptionResponseTests.cs b/src/Telstra.Messaging.Test/Model/GetSubscriptionResponseTests.cs
similarity index 64%
rename from src/com.telstra.messaging.Test/Model/GetSubscriptionResponseTests.cs
rename to src/Telstra.Messaging.Test/Model/GetSubscriptionResponseTests.cs
index 93b4219..b479154 100644
--- a/src/com.telstra.messaging.Test/Model/GetSubscriptionResponseTests.cs
+++ b/src/Telstra.Messaging.Test/Model/GetSubscriptionResponseTests.cs
@@ -1,64 +1,55 @@
/*
* Telstra Messaging API
*
- * The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages.
+ * The Telstra Messaging API specification
*
- * OpenAPI spec version: 2.2.4
+ * The version of the OpenAPI document: 2.2.9
*
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: https://github.com/openapitools/openapi-generator.git
*/
-using NUnit.Framework;
+using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
-using com.telstra.messaging.Api;
-using com.telstra.messaging.Model;
-using com.telstra.messaging.Client;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Model;
+using Telstra.Messaging.Client;
using System.Reflection;
using Newtonsoft.Json;
-namespace com.telstra.messaging.Test
+namespace Telstra.Messaging.Test
{
///
/// Class for testing GetSubscriptionResponse
///
///
- /// This file is automatically generated by Swagger Codegen.
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
- public class GetSubscriptionResponseTests
+ public class GetSubscriptionResponseTests : IDisposable
{
// TODO uncomment below to declare an instance variable for GetSubscriptionResponse
//private GetSubscriptionResponse instance;
- ///
- /// Setup before each test
- ///
- [SetUp]
- public void Init()
+ public GetSubscriptionResponseTests()
{
// TODO uncomment below to create an instance of GetSubscriptionResponse
//instance = new GetSubscriptionResponse();
}
- ///
- /// Clean up after each test
- ///
- [TearDown]
- public void Cleanup()
+ public void Dispose()
{
-
+ // Cleanup when everything is done.
}
///
/// Test an instance of GetSubscriptionResponse
///
- [Test]
+ [Fact]
public void GetSubscriptionResponseInstanceTest()
{
// TODO uncomment below to test "IsInstanceOfType" GetSubscriptionResponse
@@ -69,7 +60,7 @@ public void GetSubscriptionResponseInstanceTest()
///
/// Test the property 'ActiveDays'
///
- [Test]
+ [Fact]
public void ActiveDaysTest()
{
// TODO unit test for the property 'ActiveDays'
@@ -77,7 +68,7 @@ public void ActiveDaysTest()
///
/// Test the property 'NotifyURL'
///
- [Test]
+ [Fact]
public void NotifyURLTest()
{
// TODO unit test for the property 'NotifyURL'
@@ -85,7 +76,7 @@ public void NotifyURLTest()
///
/// Test the property 'DestinationAddress'
///
- [Test]
+ [Fact]
public void DestinationAddressTest()
{
// TODO unit test for the property 'DestinationAddress'
diff --git a/src/Telstra.Messaging.Test/Model/HealthCheckResponseTests.cs b/src/Telstra.Messaging.Test/Model/HealthCheckResponseTests.cs
new file mode 100644
index 0000000..2ff5501
--- /dev/null
+++ b/src/Telstra.Messaging.Test/Model/HealthCheckResponseTests.cs
@@ -0,0 +1,71 @@
+/*
+ * Telstra Messaging API
+ *
+ * The Telstra Messaging API specification
+ *
+ * The version of the OpenAPI document: 2.2.9
+ *
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using Xunit;
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Collections.Generic;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Model;
+using Telstra.Messaging.Client;
+using System.Reflection;
+using Newtonsoft.Json;
+
+namespace Telstra.Messaging.Test
+{
+ ///
+ /// Class for testing HealthCheckResponse
+ ///
+ ///
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
+ /// Please update the test case below to test the model.
+ ///
+ public class HealthCheckResponseTests : IDisposable
+ {
+ // TODO uncomment below to declare an instance variable for HealthCheckResponse
+ //private HealthCheckResponse instance;
+
+ public HealthCheckResponseTests()
+ {
+ // TODO uncomment below to create an instance of HealthCheckResponse
+ //instance = new HealthCheckResponse();
+ }
+
+ public void Dispose()
+ {
+ // Cleanup when everything is done.
+ }
+
+ ///
+ /// Test an instance of HealthCheckResponse
+ ///
+ [Fact]
+ public void HealthCheckResponseInstanceTest()
+ {
+ // TODO uncomment below to test "IsInstanceOfType" HealthCheckResponse
+ //Assert.IsInstanceOfType (instance, "variable 'instance' is a HealthCheckResponse");
+ }
+
+
+ ///
+ /// Test the property 'Status'
+ ///
+ [Fact]
+ public void StatusTest()
+ {
+ // TODO unit test for the property 'Status'
+ }
+
+ }
+
+}
diff --git a/src/Telstra.Messaging.Test/Model/InboundPollResponseTests.cs b/src/Telstra.Messaging.Test/Model/InboundPollResponseTests.cs
new file mode 100644
index 0000000..d2ccf01
--- /dev/null
+++ b/src/Telstra.Messaging.Test/Model/InboundPollResponseTests.cs
@@ -0,0 +1,111 @@
+/*
+ * Telstra Messaging API
+ *
+ * The Telstra Messaging API specification
+ *
+ * The version of the OpenAPI document: 2.2.9
+ *
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using Xunit;
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Collections.Generic;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Model;
+using Telstra.Messaging.Client;
+using System.Reflection;
+using Newtonsoft.Json;
+
+namespace Telstra.Messaging.Test
+{
+ ///
+ /// Class for testing InboundPollResponse
+ ///
+ ///
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
+ /// Please update the test case below to test the model.
+ ///
+ public class InboundPollResponseTests : IDisposable
+ {
+ // TODO uncomment below to declare an instance variable for InboundPollResponse
+ //private InboundPollResponse instance;
+
+ public InboundPollResponseTests()
+ {
+ // TODO uncomment below to create an instance of InboundPollResponse
+ //instance = new InboundPollResponse();
+ }
+
+ public void Dispose()
+ {
+ // Cleanup when everything is done.
+ }
+
+ ///
+ /// Test an instance of InboundPollResponse
+ ///
+ [Fact]
+ public void InboundPollResponseInstanceTest()
+ {
+ // TODO uncomment below to test "IsInstanceOfType" InboundPollResponse
+ //Assert.IsInstanceOfType (instance, "variable 'instance' is a InboundPollResponse");
+ }
+
+
+ ///
+ /// Test the property 'Status'
+ ///
+ [Fact]
+ public void StatusTest()
+ {
+ // TODO unit test for the property 'Status'
+ }
+ ///
+ /// Test the property 'DestinationAddress'
+ ///
+ [Fact]
+ public void DestinationAddressTest()
+ {
+ // TODO unit test for the property 'DestinationAddress'
+ }
+ ///
+ /// Test the property 'SenderAddress'
+ ///
+ [Fact]
+ public void SenderAddressTest()
+ {
+ // TODO unit test for the property 'SenderAddress'
+ }
+ ///
+ /// Test the property 'Message'
+ ///
+ [Fact]
+ public void MessageTest()
+ {
+ // TODO unit test for the property 'Message'
+ }
+ ///
+ /// Test the property 'MessageId'
+ ///
+ [Fact]
+ public void MessageIdTest()
+ {
+ // TODO unit test for the property 'MessageId'
+ }
+ ///
+ /// Test the property 'SentTimestamp'
+ ///
+ [Fact]
+ public void SentTimestampTest()
+ {
+ // TODO unit test for the property 'SentTimestamp'
+ }
+
+ }
+
+}
diff --git a/src/com.telstra.messaging.Test/Model/MMSContentTests.cs b/src/Telstra.Messaging.Test/Model/MMSContentTests.cs
similarity index 62%
rename from src/com.telstra.messaging.Test/Model/MMSContentTests.cs
rename to src/Telstra.Messaging.Test/Model/MMSContentTests.cs
index 7898069..dfd4237 100644
--- a/src/com.telstra.messaging.Test/Model/MMSContentTests.cs
+++ b/src/Telstra.Messaging.Test/Model/MMSContentTests.cs
@@ -1,64 +1,55 @@
/*
* Telstra Messaging API
*
- * The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages.
+ * The Telstra Messaging API specification
*
- * OpenAPI spec version: 2.2.4
+ * The version of the OpenAPI document: 2.2.9
*
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: https://github.com/openapitools/openapi-generator.git
*/
-using NUnit.Framework;
+using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
-using com.telstra.messaging.Api;
-using com.telstra.messaging.Model;
-using com.telstra.messaging.Client;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Model;
+using Telstra.Messaging.Client;
using System.Reflection;
using Newtonsoft.Json;
-namespace com.telstra.messaging.Test
+namespace Telstra.Messaging.Test
{
///
/// Class for testing MMSContent
///
///
- /// This file is automatically generated by Swagger Codegen.
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
- public class MMSContentTests
+ public class MMSContentTests : IDisposable
{
// TODO uncomment below to declare an instance variable for MMSContent
//private MMSContent instance;
- ///
- /// Setup before each test
- ///
- [SetUp]
- public void Init()
+ public MMSContentTests()
{
// TODO uncomment below to create an instance of MMSContent
//instance = new MMSContent();
}
- ///
- /// Clean up after each test
- ///
- [TearDown]
- public void Cleanup()
+ public void Dispose()
{
-
+ // Cleanup when everything is done.
}
///
/// Test an instance of MMSContent
///
- [Test]
+ [Fact]
public void MMSContentInstanceTest()
{
// TODO uncomment below to test "IsInstanceOfType" MMSContent
@@ -69,7 +60,7 @@ public void MMSContentInstanceTest()
///
/// Test the property 'Type'
///
- [Test]
+ [Fact]
public void TypeTest()
{
// TODO unit test for the property 'Type'
@@ -77,7 +68,7 @@ public void TypeTest()
///
/// Test the property 'Filename'
///
- [Test]
+ [Fact]
public void FilenameTest()
{
// TODO unit test for the property 'Filename'
@@ -85,7 +76,7 @@ public void FilenameTest()
///
/// Test the property 'Payload'
///
- [Test]
+ [Fact]
public void PayloadTest()
{
// TODO unit test for the property 'Payload'
diff --git a/src/Telstra.Messaging.Test/Model/MessageMultiTests.cs b/src/Telstra.Messaging.Test/Model/MessageMultiTests.cs
new file mode 100644
index 0000000..346fb5b
--- /dev/null
+++ b/src/Telstra.Messaging.Test/Model/MessageMultiTests.cs
@@ -0,0 +1,87 @@
+/*
+ * Telstra Messaging API
+ *
+ * The Telstra Messaging API specification
+ *
+ * The version of the OpenAPI document: 2.2.9
+ *
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using Xunit;
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Collections.Generic;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Model;
+using Telstra.Messaging.Client;
+using System.Reflection;
+using Newtonsoft.Json;
+
+namespace Telstra.Messaging.Test
+{
+ ///
+ /// Class for testing MessageMulti
+ ///
+ ///
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
+ /// Please update the test case below to test the model.
+ ///
+ public class MessageMultiTests : IDisposable
+ {
+ // TODO uncomment below to declare an instance variable for MessageMulti
+ //private MessageMulti instance;
+
+ public MessageMultiTests()
+ {
+ // TODO uncomment below to create an instance of MessageMulti
+ //instance = new MessageMulti();
+ }
+
+ public void Dispose()
+ {
+ // Cleanup when everything is done.
+ }
+
+ ///
+ /// Test an instance of MessageMulti
+ ///
+ [Fact]
+ public void MessageMultiInstanceTest()
+ {
+ // TODO uncomment below to test "IsInstanceOfType" MessageMulti
+ //Assert.IsInstanceOfType (instance, "variable 'instance' is a MessageMulti");
+ }
+
+
+ ///
+ /// Test the property 'To'
+ ///
+ [Fact]
+ public void ToTest()
+ {
+ // TODO unit test for the property 'To'
+ }
+ ///
+ /// Test the property 'Body'
+ ///
+ [Fact]
+ public void BodyTest()
+ {
+ // TODO unit test for the property 'Body'
+ }
+ ///
+ /// Test the property 'ReceiptOff'
+ ///
+ [Fact]
+ public void ReceiptOffTest()
+ {
+ // TODO unit test for the property 'ReceiptOff'
+ }
+
+ }
+
+}
diff --git a/src/Telstra.Messaging.Test/Model/MessageSentResponseMmsTests.cs b/src/Telstra.Messaging.Test/Model/MessageSentResponseMmsTests.cs
new file mode 100644
index 0000000..c8256b1
--- /dev/null
+++ b/src/Telstra.Messaging.Test/Model/MessageSentResponseMmsTests.cs
@@ -0,0 +1,103 @@
+/*
+ * Telstra Messaging API
+ *
+ * The Telstra Messaging API specification
+ *
+ * The version of the OpenAPI document: 2.2.9
+ *
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using Xunit;
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Collections.Generic;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Model;
+using Telstra.Messaging.Client;
+using System.Reflection;
+using Newtonsoft.Json;
+
+namespace Telstra.Messaging.Test
+{
+ ///
+ /// Class for testing MessageSentResponseMms
+ ///
+ ///
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
+ /// Please update the test case below to test the model.
+ ///
+ public class MessageSentResponseMmsTests : IDisposable
+ {
+ // TODO uncomment below to declare an instance variable for MessageSentResponseMms
+ //private MessageSentResponseMms instance;
+
+ public MessageSentResponseMmsTests()
+ {
+ // TODO uncomment below to create an instance of MessageSentResponseMms
+ //instance = new MessageSentResponseMms();
+ }
+
+ public void Dispose()
+ {
+ // Cleanup when everything is done.
+ }
+
+ ///
+ /// Test an instance of MessageSentResponseMms
+ ///
+ [Fact]
+ public void MessageSentResponseMmsInstanceTest()
+ {
+ // TODO uncomment below to test "IsInstanceOfType" MessageSentResponseMms
+ //Assert.IsInstanceOfType (instance, "variable 'instance' is a MessageSentResponseMms");
+ }
+
+
+ ///
+ /// Test the property 'Messages'
+ ///
+ [Fact]
+ public void MessagesTest()
+ {
+ // TODO unit test for the property 'Messages'
+ }
+ ///
+ /// Test the property 'MmsMediaKB'
+ ///
+ [Fact]
+ public void MmsMediaKBTest()
+ {
+ // TODO unit test for the property 'MmsMediaKB'
+ }
+ ///
+ /// Test the property 'Country'
+ ///
+ [Fact]
+ public void CountryTest()
+ {
+ // TODO unit test for the property 'Country'
+ }
+ ///
+ /// Test the property 'MessageType'
+ ///
+ [Fact]
+ public void MessageTypeTest()
+ {
+ // TODO unit test for the property 'MessageType'
+ }
+ ///
+ /// Test the property 'NumberSegments'
+ ///
+ [Fact]
+ public void NumberSegmentsTest()
+ {
+ // TODO unit test for the property 'NumberSegments'
+ }
+
+ }
+
+}
diff --git a/src/Telstra.Messaging.Test/Model/MessageSentResponseSmsTests.cs b/src/Telstra.Messaging.Test/Model/MessageSentResponseSmsTests.cs
new file mode 100644
index 0000000..ffd57b2
--- /dev/null
+++ b/src/Telstra.Messaging.Test/Model/MessageSentResponseSmsTests.cs
@@ -0,0 +1,95 @@
+/*
+ * Telstra Messaging API
+ *
+ * The Telstra Messaging API specification
+ *
+ * The version of the OpenAPI document: 2.2.9
+ *
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using Xunit;
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Collections.Generic;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Model;
+using Telstra.Messaging.Client;
+using System.Reflection;
+using Newtonsoft.Json;
+
+namespace Telstra.Messaging.Test
+{
+ ///
+ /// Class for testing MessageSentResponseSms
+ ///
+ ///
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
+ /// Please update the test case below to test the model.
+ ///
+ public class MessageSentResponseSmsTests : IDisposable
+ {
+ // TODO uncomment below to declare an instance variable for MessageSentResponseSms
+ //private MessageSentResponseSms instance;
+
+ public MessageSentResponseSmsTests()
+ {
+ // TODO uncomment below to create an instance of MessageSentResponseSms
+ //instance = new MessageSentResponseSms();
+ }
+
+ public void Dispose()
+ {
+ // Cleanup when everything is done.
+ }
+
+ ///
+ /// Test an instance of MessageSentResponseSms
+ ///
+ [Fact]
+ public void MessageSentResponseSmsInstanceTest()
+ {
+ // TODO uncomment below to test "IsInstanceOfType" MessageSentResponseSms
+ //Assert.IsInstanceOfType (instance, "variable 'instance' is a MessageSentResponseSms");
+ }
+
+
+ ///
+ /// Test the property 'Messages'
+ ///
+ [Fact]
+ public void MessagesTest()
+ {
+ // TODO unit test for the property 'Messages'
+ }
+ ///
+ /// Test the property 'Country'
+ ///
+ [Fact]
+ public void CountryTest()
+ {
+ // TODO unit test for the property 'Country'
+ }
+ ///
+ /// Test the property 'MessageType'
+ ///
+ [Fact]
+ public void MessageTypeTest()
+ {
+ // TODO unit test for the property 'MessageType'
+ }
+ ///
+ /// Test the property 'NumberSegments'
+ ///
+ [Fact]
+ public void NumberSegmentsTest()
+ {
+ // TODO unit test for the property 'NumberSegments'
+ }
+
+ }
+
+}
diff --git a/src/com.telstra.messaging.Test/Model/MessageTests.cs b/src/Telstra.Messaging.Test/Model/MessageTests.cs
similarity index 65%
rename from src/com.telstra.messaging.Test/Model/MessageTests.cs
rename to src/Telstra.Messaging.Test/Model/MessageTests.cs
index 5d81f4d..9279e1e 100644
--- a/src/com.telstra.messaging.Test/Model/MessageTests.cs
+++ b/src/Telstra.Messaging.Test/Model/MessageTests.cs
@@ -1,64 +1,55 @@
/*
* Telstra Messaging API
*
- * The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages.
+ * The Telstra Messaging API specification
*
- * OpenAPI spec version: 2.2.4
+ * The version of the OpenAPI document: 2.2.9
*
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: https://github.com/openapitools/openapi-generator.git
*/
-using NUnit.Framework;
+using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
-using com.telstra.messaging.Api;
-using com.telstra.messaging.Model;
-using com.telstra.messaging.Client;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Model;
+using Telstra.Messaging.Client;
using System.Reflection;
using Newtonsoft.Json;
-namespace com.telstra.messaging.Test
+namespace Telstra.Messaging.Test
{
///
/// Class for testing Message
///
///
- /// This file is automatically generated by Swagger Codegen.
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
- public class MessageTests
+ public class MessageTests : IDisposable
{
// TODO uncomment below to declare an instance variable for Message
//private Message instance;
- ///
- /// Setup before each test
- ///
- [SetUp]
- public void Init()
+ public MessageTests()
{
// TODO uncomment below to create an instance of Message
//instance = new Message();
}
- ///
- /// Clean up after each test
- ///
- [TearDown]
- public void Cleanup()
+ public void Dispose()
{
-
+ // Cleanup when everything is done.
}
///
/// Test an instance of Message
///
- [Test]
+ [Fact]
public void MessageInstanceTest()
{
// TODO uncomment below to test "IsInstanceOfType" Message
@@ -69,7 +60,7 @@ public void MessageInstanceTest()
///
/// Test the property 'To'
///
- [Test]
+ [Fact]
public void ToTest()
{
// TODO unit test for the property 'To'
@@ -77,7 +68,7 @@ public void ToTest()
///
/// Test the property 'DeliveryStatus'
///
- [Test]
+ [Fact]
public void DeliveryStatusTest()
{
// TODO unit test for the property 'DeliveryStatus'
@@ -85,7 +76,7 @@ public void DeliveryStatusTest()
///
/// Test the property 'MessageId'
///
- [Test]
+ [Fact]
public void MessageIdTest()
{
// TODO unit test for the property 'MessageId'
@@ -93,7 +84,7 @@ public void MessageIdTest()
///
/// Test the property 'MessageStatusURL'
///
- [Test]
+ [Fact]
public void MessageStatusURLTest()
{
// TODO unit test for the property 'MessageStatusURL'
diff --git a/src/com.telstra.messaging.Test/Model/OAuthResponseTests.cs b/src/Telstra.Messaging.Test/Model/OAuthResponseTests.cs
similarity index 63%
rename from src/com.telstra.messaging.Test/Model/OAuthResponseTests.cs
rename to src/Telstra.Messaging.Test/Model/OAuthResponseTests.cs
index bf0d5ce..b1badcc 100644
--- a/src/com.telstra.messaging.Test/Model/OAuthResponseTests.cs
+++ b/src/Telstra.Messaging.Test/Model/OAuthResponseTests.cs
@@ -1,64 +1,55 @@
/*
* Telstra Messaging API
*
- * The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages.
+ * The Telstra Messaging API specification
*
- * OpenAPI spec version: 2.2.4
+ * The version of the OpenAPI document: 2.2.9
*
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: https://github.com/openapitools/openapi-generator.git
*/
-using NUnit.Framework;
+using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
-using com.telstra.messaging.Api;
-using com.telstra.messaging.Model;
-using com.telstra.messaging.Client;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Model;
+using Telstra.Messaging.Client;
using System.Reflection;
using Newtonsoft.Json;
-namespace com.telstra.messaging.Test
+namespace Telstra.Messaging.Test
{
///
/// Class for testing OAuthResponse
///
///
- /// This file is automatically generated by Swagger Codegen.
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
- public class OAuthResponseTests
+ public class OAuthResponseTests : IDisposable
{
// TODO uncomment below to declare an instance variable for OAuthResponse
//private OAuthResponse instance;
- ///
- /// Setup before each test
- ///
- [SetUp]
- public void Init()
+ public OAuthResponseTests()
{
// TODO uncomment below to create an instance of OAuthResponse
//instance = new OAuthResponse();
}
- ///
- /// Clean up after each test
- ///
- [TearDown]
- public void Cleanup()
+ public void Dispose()
{
-
+ // Cleanup when everything is done.
}
///
/// Test an instance of OAuthResponse
///
- [Test]
+ [Fact]
public void OAuthResponseInstanceTest()
{
// TODO uncomment below to test "IsInstanceOfType" OAuthResponse
@@ -69,7 +60,7 @@ public void OAuthResponseInstanceTest()
///
/// Test the property 'AccessToken'
///
- [Test]
+ [Fact]
public void AccessTokenTest()
{
// TODO unit test for the property 'AccessToken'
@@ -77,7 +68,7 @@ public void AccessTokenTest()
///
/// Test the property 'TokenType'
///
- [Test]
+ [Fact]
public void TokenTypeTest()
{
// TODO unit test for the property 'TokenType'
@@ -85,7 +76,7 @@ public void TokenTypeTest()
///
/// Test the property 'ExpiresIn'
///
- [Test]
+ [Fact]
public void ExpiresInTest()
{
// TODO unit test for the property 'ExpiresIn'
diff --git a/src/com.telstra.messaging.Test/Model/OutboundPollResponseTests.cs b/src/Telstra.Messaging.Test/Model/OutboundPollResponseTests.cs
similarity index 66%
rename from src/com.telstra.messaging.Test/Model/OutboundPollResponseTests.cs
rename to src/Telstra.Messaging.Test/Model/OutboundPollResponseTests.cs
index e487a48..e26252d 100644
--- a/src/com.telstra.messaging.Test/Model/OutboundPollResponseTests.cs
+++ b/src/Telstra.Messaging.Test/Model/OutboundPollResponseTests.cs
@@ -1,64 +1,55 @@
/*
* Telstra Messaging API
*
- * The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages.
+ * The Telstra Messaging API specification
*
- * OpenAPI spec version: 2.2.4
+ * The version of the OpenAPI document: 2.2.9
*
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: https://github.com/openapitools/openapi-generator.git
*/
-using NUnit.Framework;
+using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
-using com.telstra.messaging.Api;
-using com.telstra.messaging.Model;
-using com.telstra.messaging.Client;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Model;
+using Telstra.Messaging.Client;
using System.Reflection;
using Newtonsoft.Json;
-namespace com.telstra.messaging.Test
+namespace Telstra.Messaging.Test
{
///
/// Class for testing OutboundPollResponse
///
///
- /// This file is automatically generated by Swagger Codegen.
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
- public class OutboundPollResponseTests
+ public class OutboundPollResponseTests : IDisposable
{
// TODO uncomment below to declare an instance variable for OutboundPollResponse
//private OutboundPollResponse instance;
- ///
- /// Setup before each test
- ///
- [SetUp]
- public void Init()
+ public OutboundPollResponseTests()
{
// TODO uncomment below to create an instance of OutboundPollResponse
//instance = new OutboundPollResponse();
}
- ///
- /// Clean up after each test
- ///
- [TearDown]
- public void Cleanup()
+ public void Dispose()
{
-
+ // Cleanup when everything is done.
}
///
/// Test an instance of OutboundPollResponse
///
- [Test]
+ [Fact]
public void OutboundPollResponseInstanceTest()
{
// TODO uncomment below to test "IsInstanceOfType" OutboundPollResponse
@@ -69,31 +60,31 @@ public void OutboundPollResponseInstanceTest()
///
/// Test the property 'To'
///
- [Test]
+ [Fact]
public void ToTest()
{
// TODO unit test for the property 'To'
}
///
- /// Test the property 'ReceivedTimestamp'
+ /// Test the property 'SentTimestamp'
///
- [Test]
- public void ReceivedTimestampTest()
+ [Fact]
+ public void SentTimestampTest()
{
- // TODO unit test for the property 'ReceivedTimestamp'
+ // TODO unit test for the property 'SentTimestamp'
}
///
- /// Test the property 'SentTimestamp'
+ /// Test the property 'ReceivedTimestamp'
///
- [Test]
- public void SentTimestampTest()
+ [Fact]
+ public void ReceivedTimestampTest()
{
- // TODO unit test for the property 'SentTimestamp'
+ // TODO unit test for the property 'ReceivedTimestamp'
}
///
/// Test the property 'DeliveryStatus'
///
- [Test]
+ [Fact]
public void DeliveryStatusTest()
{
// TODO unit test for the property 'DeliveryStatus'
diff --git a/src/com.telstra.messaging.Test/Model/ProvisionNumberRequestTests.cs b/src/Telstra.Messaging.Test/Model/ProvisionNumberRequestTests.cs
similarity index 61%
rename from src/com.telstra.messaging.Test/Model/ProvisionNumberRequestTests.cs
rename to src/Telstra.Messaging.Test/Model/ProvisionNumberRequestTests.cs
index 98baa2c..40f774c 100644
--- a/src/com.telstra.messaging.Test/Model/ProvisionNumberRequestTests.cs
+++ b/src/Telstra.Messaging.Test/Model/ProvisionNumberRequestTests.cs
@@ -1,64 +1,55 @@
/*
* Telstra Messaging API
*
- * The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages.
+ * The Telstra Messaging API specification
*
- * OpenAPI spec version: 2.2.4
+ * The version of the OpenAPI document: 2.2.9
*
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: https://github.com/openapitools/openapi-generator.git
*/
-using NUnit.Framework;
+using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
-using com.telstra.messaging.Api;
-using com.telstra.messaging.Model;
-using com.telstra.messaging.Client;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Model;
+using Telstra.Messaging.Client;
using System.Reflection;
using Newtonsoft.Json;
-namespace com.telstra.messaging.Test
+namespace Telstra.Messaging.Test
{
///
/// Class for testing ProvisionNumberRequest
///
///
- /// This file is automatically generated by Swagger Codegen.
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
- public class ProvisionNumberRequestTests
+ public class ProvisionNumberRequestTests : IDisposable
{
// TODO uncomment below to declare an instance variable for ProvisionNumberRequest
//private ProvisionNumberRequest instance;
- ///
- /// Setup before each test
- ///
- [SetUp]
- public void Init()
+ public ProvisionNumberRequestTests()
{
// TODO uncomment below to create an instance of ProvisionNumberRequest
//instance = new ProvisionNumberRequest();
}
- ///
- /// Clean up after each test
- ///
- [TearDown]
- public void Cleanup()
+ public void Dispose()
{
-
+ // Cleanup when everything is done.
}
///
/// Test an instance of ProvisionNumberRequest
///
- [Test]
+ [Fact]
public void ProvisionNumberRequestInstanceTest()
{
// TODO uncomment below to test "IsInstanceOfType" ProvisionNumberRequest
@@ -69,7 +60,7 @@ public void ProvisionNumberRequestInstanceTest()
///
/// Test the property 'ActiveDays'
///
- [Test]
+ [Fact]
public void ActiveDaysTest()
{
// TODO unit test for the property 'ActiveDays'
@@ -77,7 +68,7 @@ public void ActiveDaysTest()
///
/// Test the property 'NotifyURL'
///
- [Test]
+ [Fact]
public void NotifyURLTest()
{
// TODO unit test for the property 'NotifyURL'
diff --git a/src/com.telstra.messaging.Test/Model/ProvisionNumberResponseTests.cs b/src/Telstra.Messaging.Test/Model/ProvisionNumberResponseTests.cs
similarity index 52%
rename from src/com.telstra.messaging.Test/Model/ProvisionNumberResponseTests.cs
rename to src/Telstra.Messaging.Test/Model/ProvisionNumberResponseTests.cs
index 66f7f85..7072e21 100644
--- a/src/com.telstra.messaging.Test/Model/ProvisionNumberResponseTests.cs
+++ b/src/Telstra.Messaging.Test/Model/ProvisionNumberResponseTests.cs
@@ -1,64 +1,55 @@
/*
* Telstra Messaging API
*
- * The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages.
+ * The Telstra Messaging API specification
*
- * OpenAPI spec version: 2.2.4
+ * The version of the OpenAPI document: 2.2.9
*
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: https://github.com/openapitools/openapi-generator.git
*/
-using NUnit.Framework;
+using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
-using com.telstra.messaging.Api;
-using com.telstra.messaging.Model;
-using com.telstra.messaging.Client;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Model;
+using Telstra.Messaging.Client;
using System.Reflection;
using Newtonsoft.Json;
-namespace com.telstra.messaging.Test
+namespace Telstra.Messaging.Test
{
///
/// Class for testing ProvisionNumberResponse
///
///
- /// This file is automatically generated by Swagger Codegen.
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
- public class ProvisionNumberResponseTests
+ public class ProvisionNumberResponseTests : IDisposable
{
// TODO uncomment below to declare an instance variable for ProvisionNumberResponse
//private ProvisionNumberResponse instance;
- ///
- /// Setup before each test
- ///
- [SetUp]
- public void Init()
+ public ProvisionNumberResponseTests()
{
// TODO uncomment below to create an instance of ProvisionNumberResponse
//instance = new ProvisionNumberResponse();
}
- ///
- /// Clean up after each test
- ///
- [TearDown]
- public void Cleanup()
+ public void Dispose()
{
-
+ // Cleanup when everything is done.
}
///
/// Test an instance of ProvisionNumberResponse
///
- [Test]
+ [Fact]
public void ProvisionNumberResponseInstanceTest()
{
// TODO uncomment below to test "IsInstanceOfType" ProvisionNumberResponse
@@ -67,28 +58,20 @@ public void ProvisionNumberResponseInstanceTest()
///
- /// Test the property 'ActiveDays'
- ///
- [Test]
- public void ActiveDaysTest()
- {
- // TODO unit test for the property 'ActiveDays'
- }
- ///
- /// Test the property 'NotifyURL'
+ /// Test the property 'DestinationAddress'
///
- [Test]
- public void NotifyURLTest()
+ [Fact]
+ public void DestinationAddressTest()
{
- // TODO unit test for the property 'NotifyURL'
+ // TODO unit test for the property 'DestinationAddress'
}
///
- /// Test the property 'DestinationAddress'
+ /// Test the property 'ExpiryDate'
///
- [Test]
- public void DestinationAddressTest()
+ [Fact]
+ public void ExpiryDateTest()
{
- // TODO unit test for the property 'DestinationAddress'
+ // TODO unit test for the property 'ExpiryDate'
}
}
diff --git a/src/com.telstra.messaging.Test/Model/SendMmsRequestTests.cs b/src/Telstra.Messaging.Test/Model/SendMmsRequestTests.cs
similarity index 68%
rename from src/com.telstra.messaging.Test/Model/SendMmsRequestTests.cs
rename to src/Telstra.Messaging.Test/Model/SendMmsRequestTests.cs
index 575572c..100e15c 100644
--- a/src/com.telstra.messaging.Test/Model/SendMmsRequestTests.cs
+++ b/src/Telstra.Messaging.Test/Model/SendMmsRequestTests.cs
@@ -1,64 +1,55 @@
/*
* Telstra Messaging API
*
- * The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages.
+ * The Telstra Messaging API specification
*
- * OpenAPI spec version: 2.2.4
+ * The version of the OpenAPI document: 2.2.9
*
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: https://github.com/openapitools/openapi-generator.git
*/
-using NUnit.Framework;
+using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
-using com.telstra.messaging.Api;
-using com.telstra.messaging.Model;
-using com.telstra.messaging.Client;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Model;
+using Telstra.Messaging.Client;
using System.Reflection;
using Newtonsoft.Json;
-namespace com.telstra.messaging.Test
+namespace Telstra.Messaging.Test
{
///
/// Class for testing SendMmsRequest
///
///
- /// This file is automatically generated by Swagger Codegen.
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
- public class SendMmsRequestTests
+ public class SendMmsRequestTests : IDisposable
{
// TODO uncomment below to declare an instance variable for SendMmsRequest
//private SendMmsRequest instance;
- ///
- /// Setup before each test
- ///
- [SetUp]
- public void Init()
+ public SendMmsRequestTests()
{
// TODO uncomment below to create an instance of SendMmsRequest
//instance = new SendMmsRequest();
}
- ///
- /// Clean up after each test
- ///
- [TearDown]
- public void Cleanup()
+ public void Dispose()
{
-
+ // Cleanup when everything is done.
}
///
/// Test an instance of SendMmsRequest
///
- [Test]
+ [Fact]
public void SendMmsRequestInstanceTest()
{
// TODO uncomment below to test "IsInstanceOfType" SendMmsRequest
@@ -67,25 +58,25 @@ public void SendMmsRequestInstanceTest()
///
- /// Test the property 'From'
+ /// Test the property 'To'
///
- [Test]
- public void FromTest()
+ [Fact]
+ public void ToTest()
{
- // TODO unit test for the property 'From'
+ // TODO unit test for the property 'To'
}
///
- /// Test the property 'To'
+ /// Test the property 'From'
///
- [Test]
- public void ToTest()
+ [Fact]
+ public void FromTest()
{
- // TODO unit test for the property 'To'
+ // TODO unit test for the property 'From'
}
///
/// Test the property 'Subject'
///
- [Test]
+ [Fact]
public void SubjectTest()
{
// TODO unit test for the property 'Subject'
@@ -93,15 +84,23 @@ public void SubjectTest()
///
/// Test the property 'ReplyRequest'
///
- [Test]
+ [Fact]
public void ReplyRequestTest()
{
// TODO unit test for the property 'ReplyRequest'
}
///
+ /// Test the property 'NotifyURL'
+ ///
+ [Fact]
+ public void NotifyURLTest()
+ {
+ // TODO unit test for the property 'NotifyURL'
+ }
+ ///
/// Test the property 'MMSContent'
///
- [Test]
+ [Fact]
public void MMSContentTest()
{
// TODO unit test for the property 'MMSContent'
diff --git a/src/com.telstra.messaging.Test/Model/SendSMSRequestTests.cs b/src/Telstra.Messaging.Test/Model/SendSMSRequestTests.cs
similarity index 71%
rename from src/com.telstra.messaging.Test/Model/SendSMSRequestTests.cs
rename to src/Telstra.Messaging.Test/Model/SendSMSRequestTests.cs
index 5461c30..c9c6f96 100644
--- a/src/com.telstra.messaging.Test/Model/SendSMSRequestTests.cs
+++ b/src/Telstra.Messaging.Test/Model/SendSMSRequestTests.cs
@@ -1,64 +1,55 @@
/*
* Telstra Messaging API
*
- * The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages.
+ * The Telstra Messaging API specification
*
- * OpenAPI spec version: 2.2.4
+ * The version of the OpenAPI document: 2.2.9
*
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: https://github.com/openapitools/openapi-generator.git
*/
-using NUnit.Framework;
+using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
-using com.telstra.messaging.Api;
-using com.telstra.messaging.Model;
-using com.telstra.messaging.Client;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Model;
+using Telstra.Messaging.Client;
using System.Reflection;
using Newtonsoft.Json;
-namespace com.telstra.messaging.Test
+namespace Telstra.Messaging.Test
{
///
/// Class for testing SendSMSRequest
///
///
- /// This file is automatically generated by Swagger Codegen.
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
- public class SendSMSRequestTests
+ public class SendSMSRequestTests : IDisposable
{
// TODO uncomment below to declare an instance variable for SendSMSRequest
//private SendSMSRequest instance;
- ///
- /// Setup before each test
- ///
- [SetUp]
- public void Init()
+ public SendSMSRequestTests()
{
// TODO uncomment below to create an instance of SendSMSRequest
//instance = new SendSMSRequest();
}
- ///
- /// Clean up after each test
- ///
- [TearDown]
- public void Cleanup()
+ public void Dispose()
{
-
+ // Cleanup when everything is done.
}
///
/// Test an instance of SendSMSRequest
///
- [Test]
+ [Fact]
public void SendSMSRequestInstanceTest()
{
// TODO uncomment below to test "IsInstanceOfType" SendSMSRequest
@@ -69,7 +60,7 @@ public void SendSMSRequestInstanceTest()
///
/// Test the property 'To'
///
- [Test]
+ [Fact]
public void ToTest()
{
// TODO unit test for the property 'To'
@@ -77,7 +68,7 @@ public void ToTest()
///
/// Test the property 'Body'
///
- [Test]
+ [Fact]
public void BodyTest()
{
// TODO unit test for the property 'Body'
@@ -85,7 +76,7 @@ public void BodyTest()
///
/// Test the property 'From'
///
- [Test]
+ [Fact]
public void FromTest()
{
// TODO unit test for the property 'From'
@@ -93,7 +84,7 @@ public void FromTest()
///
/// Test the property 'Validity'
///
- [Test]
+ [Fact]
public void ValidityTest()
{
// TODO unit test for the property 'Validity'
@@ -101,7 +92,7 @@ public void ValidityTest()
///
/// Test the property 'ScheduledDelivery'
///
- [Test]
+ [Fact]
public void ScheduledDeliveryTest()
{
// TODO unit test for the property 'ScheduledDelivery'
@@ -109,7 +100,7 @@ public void ScheduledDeliveryTest()
///
/// Test the property 'NotifyURL'
///
- [Test]
+ [Fact]
public void NotifyURLTest()
{
// TODO unit test for the property 'NotifyURL'
@@ -117,11 +108,19 @@ public void NotifyURLTest()
///
/// Test the property 'ReplyRequest'
///
- [Test]
+ [Fact]
public void ReplyRequestTest()
{
// TODO unit test for the property 'ReplyRequest'
}
+ ///
+ /// Test the property 'Priority'
+ ///
+ [Fact]
+ public void PriorityTest()
+ {
+ // TODO unit test for the property 'Priority'
+ }
}
diff --git a/src/Telstra.Messaging.Test/Model/SendSmsMultiRequestTests.cs b/src/Telstra.Messaging.Test/Model/SendSmsMultiRequestTests.cs
new file mode 100644
index 0000000..36f4d2c
--- /dev/null
+++ b/src/Telstra.Messaging.Test/Model/SendSmsMultiRequestTests.cs
@@ -0,0 +1,79 @@
+/*
+ * Telstra Messaging API
+ *
+ * The Telstra Messaging API specification
+ *
+ * The version of the OpenAPI document: 2.2.9
+ *
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using Xunit;
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Collections.Generic;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Model;
+using Telstra.Messaging.Client;
+using System.Reflection;
+using Newtonsoft.Json;
+
+namespace Telstra.Messaging.Test
+{
+ ///
+ /// Class for testing SendSmsMultiRequest
+ ///
+ ///
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
+ /// Please update the test case below to test the model.
+ ///
+ public class SendSmsMultiRequestTests : IDisposable
+ {
+ // TODO uncomment below to declare an instance variable for SendSmsMultiRequest
+ //private SendSmsMultiRequest instance;
+
+ public SendSmsMultiRequestTests()
+ {
+ // TODO uncomment below to create an instance of SendSmsMultiRequest
+ //instance = new SendSmsMultiRequest();
+ }
+
+ public void Dispose()
+ {
+ // Cleanup when everything is done.
+ }
+
+ ///
+ /// Test an instance of SendSmsMultiRequest
+ ///
+ [Fact]
+ public void SendSmsMultiRequestInstanceTest()
+ {
+ // TODO uncomment below to test "IsInstanceOfType" SendSmsMultiRequest
+ //Assert.IsInstanceOfType (instance, "variable 'instance' is a SendSmsMultiRequest");
+ }
+
+
+ ///
+ /// Test the property 'SmsMulti'
+ ///
+ [Fact]
+ public void SmsMultiTest()
+ {
+ // TODO unit test for the property 'SmsMulti'
+ }
+ ///
+ /// Test the property 'NotifyURL'
+ ///
+ [Fact]
+ public void NotifyURLTest()
+ {
+ // TODO unit test for the property 'NotifyURL'
+ }
+
+ }
+
+}
diff --git a/src/com.telstra.messaging.Test/Model/StatusTests.cs b/src/Telstra.Messaging.Test/Model/StatusTests.cs
similarity index 51%
rename from src/com.telstra.messaging.Test/Model/StatusTests.cs
rename to src/Telstra.Messaging.Test/Model/StatusTests.cs
index 956cccc..ecc55d2 100644
--- a/src/com.telstra.messaging.Test/Model/StatusTests.cs
+++ b/src/Telstra.Messaging.Test/Model/StatusTests.cs
@@ -1,64 +1,55 @@
/*
* Telstra Messaging API
*
- * The Telstra SMS Messaging API allows your applications to send and receive SMS text messages from Australia's leading network operator. It also allows your application to track the delivery status of both sent and received SMS messages.
+ * The Telstra Messaging API specification
*
- * OpenAPI spec version: 2.2.4
+ * The version of the OpenAPI document: 2.2.9
*
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: https://github.com/openapitools/openapi-generator.git
*/
-using NUnit.Framework;
+using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
-using com.telstra.messaging.Api;
-using com.telstra.messaging.Model;
-using com.telstra.messaging.Client;
+using Telstra.Messaging.Api;
+using Telstra.Messaging.Model;
+using Telstra.Messaging.Client;
using System.Reflection;
using Newtonsoft.Json;
-namespace com.telstra.messaging.Test
+namespace Telstra.Messaging.Test
{
///
/// Class for testing Status
///
///
- /// This file is automatically generated by Swagger Codegen.
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- [TestFixture]
- public class StatusTests
+ public class StatusTests : IDisposable
{
// TODO uncomment below to declare an instance variable for Status
//private Status instance;
- ///
- /// Setup before each test
- ///
- [SetUp]
- public void Init()
+ public StatusTests()
{
// TODO uncomment below to create an instance of Status
//instance = new Status();
}
- ///
- /// Clean up after each test
- ///
- [TearDown]
- public void Cleanup()
+ public void Dispose()
{
-
+ // Cleanup when everything is done.
}
///
/// Test an instance of Status
///
- [Test]
+ [Fact]
public void StatusInstanceTest()
{
// TODO uncomment below to test "IsInstanceOfType" Status
diff --git a/src/Telstra.Messaging.Test/Telstra.Messaging.Test.csproj b/src/Telstra.Messaging.Test/Telstra.Messaging.Test.csproj
new file mode 100644
index 0000000..ad727cd
--- /dev/null
+++ b/src/Telstra.Messaging.Test/Telstra.Messaging.Test.csproj
@@ -0,0 +1,38 @@
+
+
+
+
+ false
+ Properties
+ Telstra.Messaging.Test
+ Telstra.Messaging.Test
+
+ netcoreapp2.0
+ false
+ 512
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {C5E9110C-5420-4A07-A05D-00D6ED6D205E}
+ Telstra.Messaging
+
+
+
+
diff --git a/src/Telstra.Messaging/Api/AuthenticationApi.cs b/src/Telstra.Messaging/Api/AuthenticationApi.cs
new file mode 100644
index 0000000..b8d4bc3
--- /dev/null
+++ b/src/Telstra.Messaging/Api/AuthenticationApi.cs
@@ -0,0 +1,387 @@
+/*
+ * Telstra Messaging API
+ *
+ * The Telstra Messaging API specification
+ *
+ * The version of the OpenAPI document: 2.2.9
+ *
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Net;
+using System.Net.Mime;
+using Telstra.Messaging.Client;
+using Telstra.Messaging.Model;
+
+namespace Telstra.Messaging.Api
+{
+
+ ///
+ /// Represents a collection of functions to interact with the API endpoints
+ ///
+ public interface IAuthenticationApiSync : IApiAccessor
+ {
+ #region Synchronous Operations
+ ///
+ /// Generate OAuth2 token
+ ///
+ ///
+ /// To generate an OAuth2 Authentication token, pass through your `Client key` and `Client secret` that you received when you registered for the **API Free Trial** Product. The grant_type should be left as `client_credentials` and the scope as `NSMS`. The token will expire in one hour.
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ ///
+ /// NSMS (optional)
+ /// OAuthResponse
+ OAuthResponse AuthToken (string clientId, string clientSecret, string grantType, string scope = default(string));
+
+ ///
+ /// Generate OAuth2 token
+ ///
+ ///
+ /// To generate an OAuth2 Authentication token, pass through your `Client key` and `Client secret` that you received when you registered for the **API Free Trial** Product. The grant_type should be left as `client_credentials` and the scope as `NSMS`. The token will expire in one hour.
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ ///
+ /// NSMS (optional)
+ /// ApiResponse of OAuthResponse
+ ApiResponse AuthTokenWithHttpInfo (string clientId, string clientSecret, string grantType, string scope = default(string));
+ #endregion Synchronous Operations
+ }
+
+ ///
+ /// Represents a collection of functions to interact with the API endpoints
+ ///
+ public interface IAuthenticationApiAsync : IApiAccessor
+ {
+ #region Asynchronous Operations
+ ///
+ /// Generate OAuth2 token
+ ///
+ ///
+ /// To generate an OAuth2 Authentication token, pass through your `Client key` and `Client secret` that you received when you registered for the **API Free Trial** Product. The grant_type should be left as `client_credentials` and the scope as `NSMS`. The token will expire in one hour.
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ ///
+ /// NSMS (optional)
+ /// Task of OAuthResponse
+ System.Threading.Tasks.Task AuthTokenAsync (string clientId, string clientSecret, string grantType, string scope = default(string));
+
+ ///
+ /// Generate OAuth2 token
+ ///
+ ///
+ /// To generate an OAuth2 Authentication token, pass through your `Client key` and `Client secret` that you received when you registered for the **API Free Trial** Product. The grant_type should be left as `client_credentials` and the scope as `NSMS`. The token will expire in one hour.
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ ///
+ /// NSMS (optional)
+ /// Task of ApiResponse (OAuthResponse)
+ System.Threading.Tasks.Task> AuthTokenAsyncWithHttpInfo (string clientId, string clientSecret, string grantType, string scope = default(string));
+ #endregion Asynchronous Operations
+ }
+
+ ///
+ /// Represents a collection of functions to interact with the API endpoints
+ ///
+ public interface IAuthenticationApi : IAuthenticationApiSync, IAuthenticationApiAsync
+ {
+
+ }
+
+ ///
+ /// Represents a collection of functions to interact with the API endpoints
+ ///
+ public partial class AuthenticationApi : IAuthenticationApi
+ {
+ private Telstra.Messaging.Client.ExceptionFactory _exceptionFactory = (name, response) => null;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ public AuthenticationApi() : this((string) null)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ public AuthenticationApi(String basePath)
+ {
+ this.Configuration = Telstra.Messaging.Client.Configuration.MergeConfigurations(
+ Telstra.Messaging.Client.GlobalConfiguration.Instance,
+ new Telstra.Messaging.Client.Configuration { BasePath = basePath }
+ );
+ this.Client = new Telstra.Messaging.Client.ApiClient(this.Configuration.BasePath);
+ this.AsynchronousClient = new Telstra.Messaging.Client.ApiClient(this.Configuration.BasePath);
+ this.ExceptionFactory = Telstra.Messaging.Client.Configuration.DefaultExceptionFactory;
+ }
+
+ ///
+ /// Initializes a new instance of the class
+ /// using Configuration object
+ ///
+ /// An instance of Configuration
+ ///
+ public AuthenticationApi(Telstra.Messaging.Client.Configuration configuration)
+ {
+ if (configuration == null) throw new ArgumentNullException("configuration");
+
+ this.Configuration = Telstra.Messaging.Client.Configuration.MergeConfigurations(
+ Telstra.Messaging.Client.GlobalConfiguration.Instance,
+ configuration
+ );
+ this.Client = new Telstra.Messaging.Client.ApiClient(this.Configuration.BasePath);
+ this.AsynchronousClient = new Telstra.Messaging.Client.ApiClient(this.Configuration.BasePath);
+ ExceptionFactory = Telstra.Messaging.Client.Configuration.DefaultExceptionFactory;
+ }
+
+ ///
+ /// Initializes a new instance of the class
+ /// using a Configuration object and client instance.
+ ///
+ /// The client interface for synchronous API access.
+ /// The client interface for asynchronous API access.
+ /// The configuration object.
+ public AuthenticationApi(Telstra.Messaging.Client.ISynchronousClient client,Telstra.Messaging.Client.IAsynchronousClient asyncClient, Telstra.Messaging.Client.IReadableConfiguration configuration)
+ {
+ if(client == null) throw new ArgumentNullException("client");
+ if(asyncClient == null) throw new ArgumentNullException("asyncClient");
+ if(configuration == null) throw new ArgumentNullException("configuration");
+
+ this.Client = client;
+ this.AsynchronousClient = asyncClient;
+ this.Configuration = configuration;
+ this.ExceptionFactory = Telstra.Messaging.Client.Configuration.DefaultExceptionFactory;
+ }
+
+ ///
+ /// The client for accessing this underlying API asynchronously.
+ ///
+ public Telstra.Messaging.Client.IAsynchronousClient AsynchronousClient { get; set; }
+
+ ///
+ /// The client for accessing this underlying API synchronously.
+ ///
+ public Telstra.Messaging.Client.ISynchronousClient Client { get; set; }
+
+ ///
+ /// Gets the base path of the API client.
+ ///
+ /// The base path
+ public String GetBasePath()
+ {
+ return this.Configuration.BasePath;
+ }
+
+ ///
+ /// Gets or sets the configuration object
+ ///
+ /// An instance of the Configuration
+ public Telstra.Messaging.Client.IReadableConfiguration Configuration {get; set;}
+
+ ///
+ /// Provides a factory method hook for the creation of exceptions.
+ ///
+ public Telstra.Messaging.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; }
+ }
+
+ ///
+ /// Generate OAuth2 token To generate an OAuth2 Authentication token, pass through your `Client key` and `Client secret` that you received when you registered for the **API Free Trial** Product. The grant_type should be left as `client_credentials` and the scope as `NSMS`. The token will expire in one hour.
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ ///
+ /// NSMS (optional)
+ /// OAuthResponse
+ public OAuthResponse AuthToken (string clientId, string clientSecret, string grantType, string scope = default(string))
+ {
+ Telstra.Messaging.Client.ApiResponse localVarResponse = AuthTokenWithHttpInfo(clientId, clientSecret, grantType, scope);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Generate OAuth2 token To generate an OAuth2 Authentication token, pass through your `Client key` and `Client secret` that you received when you registered for the **API Free Trial** Product. The grant_type should be left as `client_credentials` and the scope as `NSMS`. The token will expire in one hour.
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ ///
+ /// NSMS (optional)
+ /// ApiResponse of OAuthResponse
+ public Telstra.Messaging.Client.ApiResponse< OAuthResponse > AuthTokenWithHttpInfo (string clientId, string clientSecret, string grantType, string scope = default(string))
+ {
+ // verify the required parameter 'clientId' is set
+ if (clientId == null)
+ throw new Telstra.Messaging.Client.ApiException(400, "Missing required parameter 'clientId' when calling AuthenticationApi->AuthToken");
+
+ // verify the required parameter 'clientSecret' is set
+ if (clientSecret == null)
+ throw new Telstra.Messaging.Client.ApiException(400, "Missing required parameter 'clientSecret' when calling AuthenticationApi->AuthToken");
+
+ // verify the required parameter 'grantType' is set
+ if (grantType == null)
+ throw new Telstra.Messaging.Client.ApiException(400, "Missing required parameter 'grantType' when calling AuthenticationApi->AuthToken");
+
+ Telstra.Messaging.Client.RequestOptions localVarRequestOptions = new Telstra.Messaging.Client.RequestOptions();
+
+ String[] _contentTypes = new String[] {
+ "application/x-www-form-urlencoded"
+ };
+
+ // to determine the Accept header
+ String[] _accepts = new String[] {
+ "application/json"
+ };
+
+ var localVarContentType = Telstra.Messaging.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+
+ var localVarAccept = Telstra.Messaging.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+
+ if (clientId != null)
+ {
+ localVarRequestOptions.FormParameters.Add("client_id", Telstra.Messaging.Client.ClientUtils.ParameterToString(clientId)); // form parameter
+ }
+ if (clientSecret != null)
+ {
+ localVarRequestOptions.FormParameters.Add("client_secret", Telstra.Messaging.Client.ClientUtils.ParameterToString(clientSecret)); // form parameter
+ }
+ if (grantType != null)
+ {
+ localVarRequestOptions.FormParameters.Add("grant_type", Telstra.Messaging.Client.ClientUtils.ParameterToString(grantType)); // form parameter
+ }
+ if (scope != null)
+ {
+ localVarRequestOptions.FormParameters.Add("scope", Telstra.Messaging.Client.ClientUtils.ParameterToString(scope)); // form parameter
+ }
+
+
+ // make the HTTP request
+ var localVarResponse = this.Client.Post< OAuthResponse >("/oauth/token", localVarRequestOptions, this.Configuration);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("AuthToken", localVarResponse);
+ if (_exception != null) throw _exception;
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Generate OAuth2 token To generate an OAuth2 Authentication token, pass through your `Client key` and `Client secret` that you received when you registered for the **API Free Trial** Product. The grant_type should be left as `client_credentials` and the scope as `NSMS`. The token will expire in one hour.
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ ///
+ /// NSMS (optional)
+ /// Task of OAuthResponse
+ public async System.Threading.Tasks.Task AuthTokenAsync (string clientId, string clientSecret, string grantType, string scope = default(string))
+ {
+ Telstra.Messaging.Client.ApiResponse localVarResponse = await AuthTokenAsyncWithHttpInfo(clientId, clientSecret, grantType, scope);
+ return localVarResponse.Data;
+
+ }
+
+ ///
+ /// Generate OAuth2 token To generate an OAuth2 Authentication token, pass through your `Client key` and `Client secret` that you received when you registered for the **API Free Trial** Product. The grant_type should be left as `client_credentials` and the scope as `NSMS`. The token will expire in one hour.
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ ///
+ /// NSMS (optional)
+ /// Task of ApiResponse (OAuthResponse)
+ public async System.Threading.Tasks.Task> AuthTokenAsyncWithHttpInfo (string clientId, string clientSecret, string grantType, string scope = default(string))
+ {
+ // verify the required parameter 'clientId' is set
+ if (clientId == null)
+ throw new Telstra.Messaging.Client.ApiException(400, "Missing required parameter 'clientId' when calling AuthenticationApi->AuthToken");
+
+ // verify the required parameter 'clientSecret' is set
+ if (clientSecret == null)
+ throw new Telstra.Messaging.Client.ApiException(400, "Missing required parameter 'clientSecret' when calling AuthenticationApi->AuthToken");
+
+ // verify the required parameter 'grantType' is set
+ if (grantType == null)
+ throw new Telstra.Messaging.Client.ApiException(400, "Missing required parameter 'grantType' when calling AuthenticationApi->AuthToken");
+
+
+ Telstra.Messaging.Client.RequestOptions localVarRequestOptions = new Telstra.Messaging.Client.RequestOptions();
+
+ String[] _contentTypes = new String[] {
+ "application/x-www-form-urlencoded"
+ };
+
+ // to determine the Accept header
+ String[] _accepts = new String[] {
+ "application/json"
+ };
+
+ foreach (var _contentType in _contentTypes)
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
+
+ foreach (var _accept in _accepts)
+ localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
+
+ if (clientId != null)
+ {
+ localVarRequestOptions.FormParameters.Add("client_id", Telstra.Messaging.Client.ClientUtils.ParameterToString(clientId)); // form parameter
+ }
+ if (clientSecret != null)
+ {
+ localVarRequestOptions.FormParameters.Add("client_secret", Telstra.Messaging.Client.ClientUtils.ParameterToString(clientSecret)); // form parameter
+ }
+ if (grantType != null)
+ {
+ localVarRequestOptions.FormParameters.Add("grant_type", Telstra.Messaging.Client.ClientUtils.ParameterToString(grantType)); // form parameter
+ }
+ if (scope != null)
+ {
+ localVarRequestOptions.FormParameters.Add("scope", Telstra.Messaging.Client.ClientUtils.ParameterToString(scope)); // form parameter
+ }
+
+
+ // make the HTTP request
+
+ var localVarResponse = await this.AsynchronousClient.PostAsync("/oauth/token", localVarRequestOptions, this.Configuration);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("AuthToken", localVarResponse);
+ if (_exception != null) throw _exception;
+ }
+
+ return localVarResponse;
+ }
+
+ }
+}
diff --git a/src/Telstra.Messaging/Api/MessagingApi.cs b/src/Telstra.Messaging/Api/MessagingApi.cs
new file mode 100644
index 0000000..217fb52
--- /dev/null
+++ b/src/Telstra.Messaging/Api/MessagingApi.cs
@@ -0,0 +1,1577 @@
+/*
+ * Telstra Messaging API
+ *
+ * The Telstra Messaging API specification
+ *
+ * The version of the OpenAPI document: 2.2.9
+ *
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Net;
+using System.Net.Mime;
+using Telstra.Messaging.Client;
+using Telstra.Messaging.Model;
+
+namespace Telstra.Messaging.Api
+{
+
+ ///
+ /// Represents a collection of functions to interact with the API endpoints
+ ///
+ public interface IMessagingApiSync : IApiAccessor
+ {
+ #region Synchronous Operations
+ ///
+ /// Get MMS Status
+ ///
+ ///
+ /// Get MMS Status
+ ///
+ /// Thrown when fails to make API call
+ /// Unique identifier of a message - it is the value returned from a previous POST call to https://tapi.telstra.com/v2/messages/mms
+ /// List<OutboundPollResponse>
+ List GetMMSStatus (string messageid);
+
+ ///
+ /// Get MMS Status
+ ///
+ ///
+ /// Get MMS Status
+ ///
+ /// Thrown when fails to make API call
+ /// Unique identifier of a message - it is the value returned from a previous POST call to https://tapi.telstra.com/v2/messages/mms
+ /// ApiResponse of List<OutboundPollResponse>
+ ApiResponse> GetMMSStatusWithHttpInfo (string messageid);
+ ///
+ /// Get SMS Status
+ ///
+ ///
+ /// If no notification URL has been specified, it is possible to poll for the message status. Note that the `MessageId` that appears in the URL must be URL encoded. Just copying the `MessageId` as it was supplied when submitting the message may not work. # SMS Status with Notification URL When a message has reached its final state, the API will send a POST to the URL that has been previously specified. <pre><code class=\"language-sh\">{ \"to\": \"+61418123456\", \"sentTimestamp\": \"2017-03-17T10:05:22+10:00\", \"receivedTimestamp\": \"2017-03-17T10:05:23+10:00\", \"messageId\": \"1234567890ABCDEFGHIJKLNOPQRSTUVW\", \"deliveryStatus\": \"DELIVRD\" } </code></pre> The fields are: | Field | Description | | - -- | - --| | `to` | The number the message was sent to. | | `receivedTimestamp` | Time the message was sent to the API. | | `sentTimestamp` | Time handling of the message ended. | | `deliveryStatus` | The final state of the message. | | `messageId` | The same reference that was returned when the original message was sent.| | `receivedTimestamp` | Time the message was sent to the API.| Upon receiving this call it is expected that your servers will give a 204 (No Content) response.
+ ///
+ /// Thrown when fails to make API call
+ /// Unique identifier of a message - it is the value returned from a previous POST call to https://tapi.telstra.com/v2/messages/sms.
+ /// List<OutboundPollResponse>
+ List GetSMSStatus (string messageId);
+
+ ///
+ /// Get SMS Status
+ ///
+ ///
+ /// If no notification URL has been specified, it is possible to poll for the message status. Note that the `MessageId` that appears in the URL must be URL encoded. Just copying the `MessageId` as it was supplied when submitting the message may not work. # SMS Status with Notification URL When a message has reached its final state, the API will send a POST to the URL that has been previously specified. <pre><code class=\"language-sh\">{ \"to\": \"+61418123456\", \"sentTimestamp\": \"2017-03-17T10:05:22+10:00\", \"receivedTimestamp\": \"2017-03-17T10:05:23+10:00\", \"messageId\": \"1234567890ABCDEFGHIJKLNOPQRSTUVW\", \"deliveryStatus\": \"DELIVRD\" } </code></pre> The fields are: | Field | Description | | - -- | - --| | `to` | The number the message was sent to. | | `receivedTimestamp` | Time the message was sent to the API. | | `sentTimestamp` | Time handling of the message ended. | | `deliveryStatus` | The final state of the message. | | `messageId` | The same reference that was returned when the original message was sent.| | `receivedTimestamp` | Time the message was sent to the API.| Upon receiving this call it is expected that your servers will give a 204 (No Content) response.
+ ///
+ /// Thrown when fails to make API call
+ /// Unique identifier of a message - it is the value returned from a previous POST call to https://tapi.telstra.com/v2/messages/sms.
+ /// ApiResponse of List<OutboundPollResponse>
+ ApiResponse> GetSMSStatusWithHttpInfo (string messageId);
+ ///
+ /// MMS Health Check
+ ///
+ ///
+ /// Determine whether the MMS service is up or down.
+ ///
+ /// Thrown when fails to make API call
+ /// HealthCheckResponse
+ HealthCheckResponse MMSHealthCheck ();
+
+ ///
+ /// MMS Health Check
+ ///
+ ///
+ /// Determine whether the MMS service is up or down.
+ ///
+ /// Thrown when fails to make API call
+ /// ApiResponse of HealthCheckResponse
+ ApiResponse MMSHealthCheckWithHttpInfo ();
+ ///
+ /// Retrieve MMS Replies
+ ///
+ ///
+ /// Messages are retrieved one at a time, starting with the earliest reply. If the subscription has a `notifyURL`, reply messages will be logged there instead, i.e. `GET` and reply `notifyURL` are exclusive. # MMS Reply with Notification URL When a reply is received, the API will send a POST to the subscription URL that has been previously specified. <pre><code class=\"language-sh\">{ \"to\": \"+61418123456\", \"from\": \"+61421987654\", \"sentTimestamp\": \"2018-03-23T12:15:45+10:00\", \"messageId\": \"XFRO1ApiA0000000111\", \"subject\": \"Foo\", \"envelope\": \"string\", \"MMSContent\": [ { \"type\": \"text/plain\", \"filename\": \"text_1.txt\", \"payload\": \"string\" }, { \"type\": \"image/jpeg\", \"filename\": \"sample.jpeg\", \"payload\": \"string\" } ] }</code></pre> The fields are: | Field | Description | | - -- | - -- | | `to` |The number the message was sent to. | | `from` | The number the message was sent from. | | `sentTimestamp` | Time handling of the message ended. | | `messageId` | Message Id assigned by the MMSC | | `subject` | The subject assigned to the message. | | `envelope` | Information about about terminal type and originating operator. | | `MMSContent` | An array of the actual content of the reply message. | | `type` | The content type of the message. | | `filename` | The filename for the message content. | | `payload` | The content of the message. |
+ ///
+ /// Thrown when fails to make API call
+ /// GetMmsResponse
+ GetMmsResponse RetrieveMMSReplies ();
+
+ ///
+ /// Retrieve MMS Replies
+ ///
+ ///
+ /// Messages are retrieved one at a time, starting with the earliest reply. If the subscription has a `notifyURL`, reply messages will be logged there instead, i.e. `GET` and reply `notifyURL` are exclusive. # MMS Reply with Notification URL When a reply is received, the API will send a POST to the subscription URL that has been previously specified. <pre><code class=\"language-sh\">{ \"to\": \"+61418123456\", \"from\": \"+61421987654\", \"sentTimestamp\": \"2018-03-23T12:15:45+10:00\", \"messageId\": \"XFRO1ApiA0000000111\", \"subject\": \"Foo\", \"envelope\": \"string\", \"MMSContent\": [ { \"type\": \"text/plain\", \"filename\": \"text_1.txt\", \"payload\": \"string\" }, { \"type\": \"image/jpeg\", \"filename\": \"sample.jpeg\", \"payload\": \"string\" } ] }</code></pre> The fields are: | Field | Description | | - -- | - -- | | `to` |The number the message was sent to. | | `from` | The number the message was sent from. | | `sentTimestamp` | Time handling of the message ended. | | `messageId` | Message Id assigned by the MMSC | | `subject` | The subject assigned to the message. | | `envelope` | Information about about terminal type and originating operator. | | `MMSContent` | An array of the actual content of the reply message. | | `type` | The content type of the message. | | `filename` | The filename for the message content. | | `payload` | The content of the message. |
+ ///
+ /// Thrown when fails to make API call
+ /// ApiResponse of GetMmsResponse
+ ApiResponse RetrieveMMSRepliesWithHttpInfo ();
+ ///
+ /// Retrieve SMS Replies
+ ///
+ ///
+ /// Messages are retrieved one at a time, starting with the earliest reply. The API supports the encoding of emojis in the reply message. The emojis will be in their UTF-8 format. If the subscription has a `notifyURL`, reply messages will be logged there instead. # SMS Reply with Notification URL When a reply is received, the API will send a POST to the subscription URL that has been previously specified. <pre><code class=\"language-sh\">{ \"to\":\"+61472880123\", \"from\":\"+61412345678\", \"body\":\"Foo4\", \"sentTimestamp\":\"2018-04-20T14:24:35\", \"messageId\":\"DMASApiA0000000146\" }</code></pre> The fields are: | Field | Description | | - -- |- -- | | `to` | The number the message was sent to. | | `from` | The number the message was sent from. | | `body` | The content of the SMS response. | | `sentTimestamp` | Time handling of the message ended. | | `messageId` | The ID assigned to the message. |
+ ///
+ /// Thrown when fails to make API call
+ /// InboundPollResponse
+ InboundPollResponse RetrieveSMSReplies ();
+
+ ///
+ /// Retrieve SMS Replies
+ ///
+ ///
+ /// Messages are retrieved one at a time, starting with the earliest reply. The API supports the encoding of emojis in the reply message. The emojis will be in their UTF-8 format. If the subscription has a `notifyURL`, reply messages will be logged there instead. # SMS Reply with Notification URL When a reply is received, the API will send a POST to the subscription URL that has been previously specified. <pre><code class=\"language-sh\">{ \"to\":\"+61472880123\", \"from\":\"+61412345678\", \"body\":\"Foo4\", \"sentTimestamp\":\"2018-04-20T14:24:35\", \"messageId\":\"DMASApiA0000000146\" }</code></pre> The fields are: | Field | Description | | - -- |- -- | | `to` | The number the message was sent to. | | `from` | The number the message was sent from. | | `body` | The content of the SMS response. | | `sentTimestamp` | Time handling of the message ended. | | `messageId` | The ID assigned to the message. |
+ ///
+ /// Thrown when fails to make API call
+ /// ApiResponse of InboundPollResponse
+ ApiResponse RetrieveSMSRepliesWithHttpInfo ();
+ ///
+ /// SMS Health Check
+ ///
+ ///
+ /// Determine whether the SMS service is up or down.
+ ///
+ /// Thrown when fails to make API call
+ /// HealthCheckResponse
+ HealthCheckResponse SMSHealthCheck ();
+
+ ///
+ /// SMS Health Check
+ ///
+ ///
+ /// Determine whether the SMS service is up or down.
+ ///
+ /// Thrown when fails to make API call
+ /// ApiResponse of HealthCheckResponse
+ ApiResponse SMSHealthCheckWithHttpInfo ();
+ ///
+ /// Send Multiple SMS
+ ///
+ ///
+ /// Send multiple SMS in one API call.
+ ///
+ /// Thrown when fails to make API call
+ /// A JSON payload containing the recipient's phone number and text message. This number can be in international format if preceeded by a '+' or in national format ('04xxxxxxxx') where x is a digit.
+ /// MessageSentResponseSms
+ MessageSentResponseSms SMSMulti (SendSmsMultiRequest payload);
+
+ ///
+ /// Send Multiple SMS
+ ///
+ ///
+ /// Send multiple SMS in one API call.
+ ///
+ /// Thrown when fails to make API call
+ /// A JSON payload containing the recipient's phone number and text message. This number can be in international format if preceeded by a '+' or in national format ('04xxxxxxxx') where x is a digit.
+ /// ApiResponse of MessageSentResponseSms
+ ApiResponse SMSMultiWithHttpInfo (SendSmsMultiRequest payload);
+ ///
+ /// Send MMS
+ ///
+ ///
+ /// Send MMS
+ ///
+ /// Thrown when fails to make API call
+ /// A JSON or XML payload containing the recipient's phone number and MMS message. The recipient number should be in the format '04xxxxxxxx' where x is a digit.
+ /// MessageSentResponseMms
+ MessageSentResponseMms SendMMS (SendMmsRequest body);
+
+ ///
+ /// Send MMS
+ ///
+ ///
+ /// Send MMS
+ ///
+ /// Thrown when fails to make API call
+ /// A JSON or XML payload containing the recipient's phone number and MMS message. The recipient number should be in the format '04xxxxxxxx' where x is a digit.
+ /// ApiResponse of MessageSentResponseMms
+ ApiResponse SendMMSWithHttpInfo (SendMmsRequest body);
+ ///
+ /// Send SMS
+ ///
+ ///
+ /// Send an SMS Message to a single or multiple mobile number/s.
+ ///
+ /// Thrown when fails to make API call
+ /// A JSON or XML payload containing the recipient's phone number and text message. This number can be in international format if preceeded by a '+' or in national format ('04xxxxxxxx') where x is a digit.
+ /// MessageSentResponseSms
+ MessageSentResponseSms SendSMS (SendSMSRequest payload);
+
+ ///
+ /// Send SMS
+ ///
+ ///
+ /// Send an SMS Message to a single or multiple mobile number/s.
+ ///
+ /// Thrown when fails to make API call
+ /// A JSON or XML payload containing the recipient's phone number and text message. This number can be in international format if preceeded by a '+' or in national format ('04xxxxxxxx') where x is a digit.
+ /// ApiResponse of MessageSentResponseSms
+ ApiResponse SendSMSWithHttpInfo (SendSMSRequest payload);
+ #endregion Synchronous Operations
+ }
+
+ ///
+ /// Represents a collection of functions to interact with the API endpoints
+ ///
+ public interface IMessagingApiAsync : IApiAccessor
+ {
+ #region Asynchronous Operations
+ ///
+ /// Get MMS Status
+ ///
+ ///
+ /// Get MMS Status
+ ///
+ /// Thrown when fails to make API call
+ /// Unique identifier of a message - it is the value returned from a previous POST call to https://tapi.telstra.com/v2/messages/mms
+ /// Task of List<OutboundPollResponse>
+ System.Threading.Tasks.Task> GetMMSStatusAsync (string messageid);
+
+ ///
+ /// Get MMS Status
+ ///
+ ///
+ /// Get MMS Status
+ ///
+ /// Thrown when fails to make API call
+ /// Unique identifier of a message - it is the value returned from a previous POST call to https://tapi.telstra.com/v2/messages/mms
+ /// Task of ApiResponse (List<OutboundPollResponse>)
+ System.Threading.Tasks.Task>> GetMMSStatusAsyncWithHttpInfo (string messageid);
+ ///
+ /// Get SMS Status
+ ///
+ ///
+ /// If no notification URL has been specified, it is possible to poll for the message status. Note that the `MessageId` that appears in the URL must be URL encoded. Just copying the `MessageId` as it was supplied when submitting the message may not work. # SMS Status with Notification URL When a message has reached its final state, the API will send a POST to the URL that has been previously specified. <pre><code class=\"language-sh\">{ \"to\": \"+61418123456\", \"sentTimestamp\": \"2017-03-17T10:05:22+10:00\", \"receivedTimestamp\": \"2017-03-17T10:05:23+10:00\", \"messageId\": \"1234567890ABCDEFGHIJKLNOPQRSTUVW\", \"deliveryStatus\": \"DELIVRD\" } </code></pre> The fields are: | Field | Description | | - -- | - --| | `to` | The number the message was sent to. | | `receivedTimestamp` | Time the message was sent to the API. | | `sentTimestamp` | Time handling of the message ended. | | `deliveryStatus` | The final state of the message. | | `messageId` | The same reference that was returned when the original message was sent.| | `receivedTimestamp` | Time the message was sent to the API.| Upon receiving this call it is expected that your servers will give a 204 (No Content) response.
+ ///
+ /// Thrown when fails to make API call
+ /// Unique identifier of a message - it is the value returned from a previous POST call to https://tapi.telstra.com/v2/messages/sms.
+ /// Task of List<OutboundPollResponse>
+ System.Threading.Tasks.Task> GetSMSStatusAsync (string messageId);
+
+ ///
+ /// Get SMS Status
+ ///
+ ///
+ /// If no notification URL has been specified, it is possible to poll for the message status. Note that the `MessageId` that appears in the URL must be URL encoded. Just copying the `MessageId` as it was supplied when submitting the message may not work. # SMS Status with Notification URL When a message has reached its final state, the API will send a POST to the URL that has been previously specified. <pre><code class=\"language-sh\">{ \"to\": \"+61418123456\", \"sentTimestamp\": \"2017-03-17T10:05:22+10:00\", \"receivedTimestamp\": \"2017-03-17T10:05:23+10:00\", \"messageId\": \"1234567890ABCDEFGHIJKLNOPQRSTUVW\", \"deliveryStatus\": \"DELIVRD\" } </code></pre> The fields are: | Field | Description | | - -- | - --| | `to` | The number the message was sent to. | | `receivedTimestamp` | Time the message was sent to the API. | | `sentTimestamp` | Time handling of the message ended. | | `deliveryStatus` | The final state of the message. | | `messageId` | The same reference that was returned when the original message was sent.| | `receivedTimestamp` | Time the message was sent to the API.| Upon receiving this call it is expected that your servers will give a 204 (No Content) response.
+ ///
+ /// Thrown when fails to make API call
+ /// Unique identifier of a message - it is the value returned from a previous POST call to https://tapi.telstra.com/v2/messages/sms.
+ /// Task of ApiResponse (List<OutboundPollResponse>)
+ System.Threading.Tasks.Task>> GetSMSStatusAsyncWithHttpInfo (string messageId);
+ ///
+ /// MMS Health Check
+ ///
+ ///
+ /// Determine whether the MMS service is up or down.
+ ///
+ /// Thrown when fails to make API call
+ /// Task of HealthCheckResponse
+ System.Threading.Tasks.Task MMSHealthCheckAsync ();
+
+ ///
+ /// MMS Health Check
+ ///
+ ///
+ /// Determine whether the MMS service is up or down.
+ ///
+ /// Thrown when fails to make API call
+ /// Task of ApiResponse (HealthCheckResponse)
+ System.Threading.Tasks.Task> MMSHealthCheckAsyncWithHttpInfo ();
+ ///
+ /// Retrieve MMS Replies
+ ///
+ ///
+ /// Messages are retrieved one at a time, starting with the earliest reply. If the subscription has a `notifyURL`, reply messages will be logged there instead, i.e. `GET` and reply `notifyURL` are exclusive. # MMS Reply with Notification URL When a reply is received, the API will send a POST to the subscription URL that has been previously specified. <pre><code class=\"language-sh\">{ \"to\": \"+61418123456\", \"from\": \"+61421987654\", \"sentTimestamp\": \"2018-03-23T12:15:45+10:00\", \"messageId\": \"XFRO1ApiA0000000111\", \"subject\": \"Foo\", \"envelope\": \"string\", \"MMSContent\": [ { \"type\": \"text/plain\", \"filename\": \"text_1.txt\", \"payload\": \"string\" }, { \"type\": \"image/jpeg\", \"filename\": \"sample.jpeg\", \"payload\": \"string\" } ] }</code></pre> The fields are: | Field | Description | | - -- | - -- | | `to` |The number the message was sent to. | | `from` | The number the message was sent from. | | `sentTimestamp` | Time handling of the message ended. | | `messageId` | Message Id assigned by the MMSC | | `subject` | The subject assigned to the message. | | `envelope` | Information about about terminal type and originating operator. | | `MMSContent` | An array of the actual content of the reply message. | | `type` | The content type of the message. | | `filename` | The filename for the message content. | | `payload` | The content of the message. |
+ ///
+ /// Thrown when fails to make API call
+ /// Task of GetMmsResponse
+ System.Threading.Tasks.Task RetrieveMMSRepliesAsync ();
+
+ ///
+ /// Retrieve MMS Replies
+ ///
+ ///
+ /// Messages are retrieved one at a time, starting with the earliest reply. If the subscription has a `notifyURL`, reply messages will be logged there instead, i.e. `GET` and reply `notifyURL` are exclusive. # MMS Reply with Notification URL When a reply is received, the API will send a POST to the subscription URL that has been previously specified. <pre><code class=\"language-sh\">{ \"to\": \"+61418123456\", \"from\": \"+61421987654\", \"sentTimestamp\": \"2018-03-23T12:15:45+10:00\", \"messageId\": \"XFRO1ApiA0000000111\", \"subject\": \"Foo\", \"envelope\": \"string\", \"MMSContent\": [ { \"type\": \"text/plain\", \"filename\": \"text_1.txt\", \"payload\": \"string\" }, { \"type\": \"image/jpeg\", \"filename\": \"sample.jpeg\", \"payload\": \"string\" } ] }</code></pre> The fields are: | Field | Description | | - -- | - -- | | `to` |The number the message was sent to. | | `from` | The number the message was sent from. | | `sentTimestamp` | Time handling of the message ended. | | `messageId` | Message Id assigned by the MMSC | | `subject` | The subject assigned to the message. | | `envelope` | Information about about terminal type and originating operator. | | `MMSContent` | An array of the actual content of the reply message. | | `type` | The content type of the message. | | `filename` | The filename for the message content. | | `payload` | The content of the message. |
+ ///
+ /// Thrown when fails to make API call
+ /// Task of ApiResponse (GetMmsResponse)
+ System.Threading.Tasks.Task> RetrieveMMSRepliesAsyncWithHttpInfo ();
+ ///
+ /// Retrieve SMS Replies
+ ///
+ ///
+ /// Messages are retrieved one at a time, starting with the earliest reply. The API supports the encoding of emojis in the reply message. The emojis will be in their UTF-8 format. If the subscription has a `notifyURL`, reply messages will be logged there instead. # SMS Reply with Notification URL When a reply is received, the API will send a POST to the subscription URL that has been previously specified. <pre><code class=\"language-sh\">{ \"to\":\"+61472880123\", \"from\":\"+61412345678\", \"body\":\"Foo4\", \"sentTimestamp\":\"2018-04-20T14:24:35\", \"messageId\":\"DMASApiA0000000146\" }</code></pre> The fields are: | Field | Description | | - -- |- -- | | `to` | The number the message was sent to. | | `from` | The number the message was sent from. | | `body` | The content of the SMS response. | | `sentTimestamp` | Time handling of the message ended. | | `messageId` | The ID assigned to the message. |
+ ///
+ /// Thrown when fails to make API call
+ /// Task of InboundPollResponse
+ System.Threading.Tasks.Task RetrieveSMSRepliesAsync ();
+
+ ///
+ /// Retrieve SMS Replies
+ ///
+ ///
+ /// Messages are retrieved one at a time, starting with the earliest reply. The API supports the encoding of emojis in the reply message. The emojis will be in their UTF-8 format. If the subscription has a `notifyURL`, reply messages will be logged there instead. # SMS Reply with Notification URL When a reply is received, the API will send a POST to the subscription URL that has been previously specified. <pre><code class=\"language-sh\">{ \"to\":\"+61472880123\", \"from\":\"+61412345678\", \"body\":\"Foo4\", \"sentTimestamp\":\"2018-04-20T14:24:35\", \"messageId\":\"DMASApiA0000000146\" }</code></pre> The fields are: | Field | Description | | - -- |- -- | | `to` | The number the message was sent to. | | `from` | The number the message was sent from. | | `body` | The content of the SMS response. | | `sentTimestamp` | Time handling of the message ended. | | `messageId` | The ID assigned to the message. |
+ ///
+ /// Thrown when fails to make API call
+ /// Task of ApiResponse (InboundPollResponse)
+ System.Threading.Tasks.Task> RetrieveSMSRepliesAsyncWithHttpInfo ();
+ ///
+ /// SMS Health Check
+ ///
+ ///
+ /// Determine whether the SMS service is up or down.
+ ///
+ /// Thrown when fails to make API call
+ /// Task of HealthCheckResponse
+ System.Threading.Tasks.Task SMSHealthCheckAsync ();
+
+ ///
+ /// SMS Health Check
+ ///
+ ///
+ /// Determine whether the SMS service is up or down.
+ ///
+ /// Thrown when fails to make API call
+ /// Task of ApiResponse (HealthCheckResponse)
+ System.Threading.Tasks.Task> SMSHealthCheckAsyncWithHttpInfo ();
+ ///
+ /// Send Multiple SMS
+ ///
+ ///
+ /// Send multiple SMS in one API call.
+ ///
+ /// Thrown when fails to make API call
+ /// A JSON payload containing the recipient's phone number and text message. This number can be in international format if preceeded by a '+' or in national format ('04xxxxxxxx') where x is a digit.
+ /// Task of MessageSentResponseSms
+ System.Threading.Tasks.Task SMSMultiAsync (SendSmsMultiRequest payload);
+
+ ///
+ /// Send Multiple SMS
+ ///
+ ///
+ /// Send multiple SMS in one API call.
+ ///
+ /// Thrown when fails to make API call
+ /// A JSON payload containing the recipient's phone number and text message. This number can be in international format if preceeded by a '+' or in national format ('04xxxxxxxx') where x is a digit.
+ /// Task of ApiResponse (MessageSentResponseSms)
+ System.Threading.Tasks.Task> SMSMultiAsyncWithHttpInfo (SendSmsMultiRequest payload);
+ ///
+ /// Send MMS
+ ///
+ ///
+ /// Send MMS
+ ///
+ /// Thrown when fails to make API call
+ /// A JSON or XML payload containing the recipient's phone number and MMS message. The recipient number should be in the format '04xxxxxxxx' where x is a digit.
+ /// Task of MessageSentResponseMms
+ System.Threading.Tasks.Task SendMMSAsync (SendMmsRequest body);
+
+ ///
+ /// Send MMS
+ ///
+ ///
+ /// Send MMS
+ ///
+ /// Thrown when fails to make API call
+ /// A JSON or XML payload containing the recipient's phone number and MMS message. The recipient number should be in the format '04xxxxxxxx' where x is a digit.
+ /// Task of ApiResponse (MessageSentResponseMms)
+ System.Threading.Tasks.Task> SendMMSAsyncWithHttpInfo (SendMmsRequest body);
+ ///
+ /// Send SMS
+ ///
+ ///
+ /// Send an SMS Message to a single or multiple mobile number/s.
+ ///
+ /// Thrown when fails to make API call
+ /// A JSON or XML payload containing the recipient's phone number and text message. This number can be in international format if preceeded by a '+' or in national format ('04xxxxxxxx') where x is a digit.
+ /// Task of MessageSentResponseSms
+ System.Threading.Tasks.Task SendSMSAsync (SendSMSRequest payload);
+
+ ///
+ /// Send SMS
+ ///
+ ///
+ /// Send an SMS Message to a single or multiple mobile number/s.
+ ///
+ /// Thrown when fails to make API call
+ /// A JSON or XML payload containing the recipient's phone number and text message. This number can be in international format if preceeded by a '+' or in national format ('04xxxxxxxx') where x is a digit.
+ /// Task of ApiResponse (MessageSentResponseSms)
+ System.Threading.Tasks.Task> SendSMSAsyncWithHttpInfo (SendSMSRequest payload);
+ #endregion Asynchronous Operations
+ }
+
+ ///
+ /// Represents a collection of functions to interact with the API endpoints
+ ///
+ public interface IMessagingApi : IMessagingApiSync, IMessagingApiAsync
+ {
+
+ }
+
+ ///
+ /// Represents a collection of functions to interact with the API endpoints
+ ///
+ public partial class MessagingApi : IMessagingApi
+ {
+ private Telstra.Messaging.Client.ExceptionFactory _exceptionFactory = (name, response) => null;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ public MessagingApi() : this((string) null)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ public MessagingApi(String basePath)
+ {
+ this.Configuration = Telstra.Messaging.Client.Configuration.MergeConfigurations(
+ Telstra.Messaging.Client.GlobalConfiguration.Instance,
+ new Telstra.Messaging.Client.Configuration { BasePath = basePath }
+ );
+ this.Client = new Telstra.Messaging.Client.ApiClient(this.Configuration.BasePath);
+ this.AsynchronousClient = new Telstra.Messaging.Client.ApiClient(this.Configuration.BasePath);
+ this.ExceptionFactory = Telstra.Messaging.Client.Configuration.DefaultExceptionFactory;
+ }
+
+ ///
+ /// Initializes a new instance of the class
+ /// using Configuration object
+ ///
+ /// An instance of Configuration
+ ///
+ public MessagingApi(Telstra.Messaging.Client.Configuration configuration)
+ {
+ if (configuration == null) throw new ArgumentNullException("configuration");
+
+ this.Configuration = Telstra.Messaging.Client.Configuration.MergeConfigurations(
+ Telstra.Messaging.Client.GlobalConfiguration.Instance,
+ configuration
+ );
+ this.Client = new Telstra.Messaging.Client.ApiClient(this.Configuration.BasePath);
+ this.AsynchronousClient = new Telstra.Messaging.Client.ApiClient(this.Configuration.BasePath);
+ ExceptionFactory = Telstra.Messaging.Client.Configuration.DefaultExceptionFactory;
+ }
+
+ ///
+ /// Initializes a new instance of the class
+ /// using a Configuration object and client instance.
+ ///
+ /// The client interface for synchronous API access.
+ /// The client interface for asynchronous API access.
+ /// The configuration object.
+ public MessagingApi(Telstra.Messaging.Client.ISynchronousClient client,Telstra.Messaging.Client.IAsynchronousClient asyncClient, Telstra.Messaging.Client.IReadableConfiguration configuration)
+ {
+ if(client == null) throw new ArgumentNullException("client");
+ if(asyncClient == null) throw new ArgumentNullException("asyncClient");
+ if(configuration == null) throw new ArgumentNullException("configuration");
+
+ this.Client = client;
+ this.AsynchronousClient = asyncClient;
+ this.Configuration = configuration;
+ this.ExceptionFactory = Telstra.Messaging.Client.Configuration.DefaultExceptionFactory;
+ }
+
+ ///
+ /// The client for accessing this underlying API asynchronously.
+ ///
+ public Telstra.Messaging.Client.IAsynchronousClient AsynchronousClient { get; set; }
+
+ ///
+ /// The client for accessing this underlying API synchronously.
+ ///
+ public Telstra.Messaging.Client.ISynchronousClient Client { get; set; }
+
+ ///
+ /// Gets the base path of the API client.
+ ///
+ /// The base path
+ public String GetBasePath()
+ {
+ return this.Configuration.BasePath;
+ }
+
+ ///
+ /// Gets or sets the configuration object
+ ///
+ /// An instance of the Configuration
+ public Telstra.Messaging.Client.IReadableConfiguration Configuration {get; set;}
+
+ ///
+ /// Provides a factory method hook for the creation of exceptions.
+ ///
+ public Telstra.Messaging.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; }
+ }
+
+ ///
+ /// Get MMS Status Get MMS Status
+ ///
+ /// Thrown when fails to make API call
+ /// Unique identifier of a message - it is the value returned from a previous POST call to https://tapi.telstra.com/v2/messages/mms
+ /// List<OutboundPollResponse>
+ public List GetMMSStatus (string messageid)
+ {
+ Telstra.Messaging.Client.ApiResponse> localVarResponse = GetMMSStatusWithHttpInfo(messageid);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Get MMS Status Get MMS Status
+ ///
+ /// Thrown when fails to make API call
+ /// Unique identifier of a message - it is the value returned from a previous POST call to https://tapi.telstra.com/v2/messages/mms
+ /// ApiResponse of List<OutboundPollResponse>
+ public Telstra.Messaging.Client.ApiResponse< List > GetMMSStatusWithHttpInfo (string messageid)
+ {
+ // verify the required parameter 'messageid' is set
+ if (messageid == null)
+ throw new Telstra.Messaging.Client.ApiException(400, "Missing required parameter 'messageid' when calling MessagingApi->GetMMSStatus");
+
+ Telstra.Messaging.Client.RequestOptions localVarRequestOptions = new Telstra.Messaging.Client.RequestOptions();
+
+ String[] _contentTypes = new String[] {
+ };
+
+ // to determine the Accept header
+ String[] _accepts = new String[] {
+ "application/json"
+ };
+
+ var localVarContentType = Telstra.Messaging.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+
+ var localVarAccept = Telstra.Messaging.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+
+ if (messageid != null)
+ localVarRequestOptions.PathParameters.Add("messageid", Telstra.Messaging.Client.ClientUtils.ParameterToString(messageid)); // path parameter
+
+ // authentication (auth) required
+ // oauth required
+ if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
+ {
+ localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
+ }
+
+ // make the HTTP request
+ var localVarResponse = this.Client.Get< List >("/messages/mms/{messageid}/status", localVarRequestOptions, this.Configuration);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("GetMMSStatus", localVarResponse);
+ if (_exception != null) throw _exception;
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Get MMS Status Get MMS Status
+ ///
+ /// Thrown when fails to make API call
+ /// Unique identifier of a message - it is the value returned from a previous POST call to https://tapi.telstra.com/v2/messages/mms
+ /// Task of List<OutboundPollResponse>
+ public async System.Threading.Tasks.Task> GetMMSStatusAsync (string messageid)
+ {
+ Telstra.Messaging.Client.ApiResponse> localVarResponse = await GetMMSStatusAsyncWithHttpInfo(messageid);
+ return localVarResponse.Data;
+
+ }
+
+ ///
+ /// Get MMS Status Get MMS Status
+ ///
+ /// Thrown when fails to make API call
+ /// Unique identifier of a message - it is the value returned from a previous POST call to https://tapi.telstra.com/v2/messages/mms
+ /// Task of ApiResponse (List<OutboundPollResponse>)
+ public async System.Threading.Tasks.Task>> GetMMSStatusAsyncWithHttpInfo (string messageid)
+ {
+ // verify the required parameter 'messageid' is set
+ if (messageid == null)
+ throw new Telstra.Messaging.Client.ApiException(400, "Missing required parameter 'messageid' when calling MessagingApi->GetMMSStatus");
+
+
+ Telstra.Messaging.Client.RequestOptions localVarRequestOptions = new Telstra.Messaging.Client.RequestOptions();
+
+ String[] _contentTypes = new String[] {
+ };
+
+ // to determine the Accept header
+ String[] _accepts = new String[] {
+ "application/json"
+ };
+
+ foreach (var _contentType in _contentTypes)
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
+
+ foreach (var _accept in _accepts)
+ localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
+
+ if (messageid != null)
+ localVarRequestOptions.PathParameters.Add("messageid", Telstra.Messaging.Client.ClientUtils.ParameterToString(messageid)); // path parameter
+
+ // authentication (auth) required
+ // oauth required
+ if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
+ {
+ localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
+ }
+
+ // make the HTTP request
+
+ var localVarResponse = await this.AsynchronousClient.GetAsync>("/messages/mms/{messageid}/status", localVarRequestOptions, this.Configuration);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("GetMMSStatus", localVarResponse);
+ if (_exception != null) throw _exception;
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Get SMS Status If no notification URL has been specified, it is possible to poll for the message status. Note that the `MessageId` that appears in the URL must be URL encoded. Just copying the `MessageId` as it was supplied when submitting the message may not work. # SMS Status with Notification URL When a message has reached its final state, the API will send a POST to the URL that has been previously specified. <pre><code class=\"language-sh\">{ \"to\": \"+61418123456\", \"sentTimestamp\": \"2017-03-17T10:05:22+10:00\", \"receivedTimestamp\": \"2017-03-17T10:05:23+10:00\", \"messageId\": \"1234567890ABCDEFGHIJKLNOPQRSTUVW\", \"deliveryStatus\": \"DELIVRD\" } </code></pre> The fields are: | Field | Description | | - -- | - --| | `to` | The number the message was sent to. | | `receivedTimestamp` | Time the message was sent to the API. | | `sentTimestamp` | Time handling of the message ended. | | `deliveryStatus` | The final state of the message. | | `messageId` | The same reference that was returned when the original message was sent.| | `receivedTimestamp` | Time the message was sent to the API.| Upon receiving this call it is expected that your servers will give a 204 (No Content) response.
+ ///
+ /// Thrown when fails to make API call
+ /// Unique identifier of a message - it is the value returned from a previous POST call to https://tapi.telstra.com/v2/messages/sms.
+ /// List<OutboundPollResponse>
+ public List GetSMSStatus (string messageId)
+ {
+ Telstra.Messaging.Client.ApiResponse> localVarResponse = GetSMSStatusWithHttpInfo(messageId);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Get SMS Status If no notification URL has been specified, it is possible to poll for the message status. Note that the `MessageId` that appears in the URL must be URL encoded. Just copying the `MessageId` as it was supplied when submitting the message may not work. # SMS Status with Notification URL When a message has reached its final state, the API will send a POST to the URL that has been previously specified. <pre><code class=\"language-sh\">{ \"to\": \"+61418123456\", \"sentTimestamp\": \"2017-03-17T10:05:22+10:00\", \"receivedTimestamp\": \"2017-03-17T10:05:23+10:00\", \"messageId\": \"1234567890ABCDEFGHIJKLNOPQRSTUVW\", \"deliveryStatus\": \"DELIVRD\" } </code></pre> The fields are: | Field | Description | | - -- | - --| | `to` | The number the message was sent to. | | `receivedTimestamp` | Time the message was sent to the API. | | `sentTimestamp` | Time handling of the message ended. | | `deliveryStatus` | The final state of the message. | | `messageId` | The same reference that was returned when the original message was sent.| | `receivedTimestamp` | Time the message was sent to the API.| Upon receiving this call it is expected that your servers will give a 204 (No Content) response.
+ ///
+ /// Thrown when fails to make API call
+ /// Unique identifier of a message - it is the value returned from a previous POST call to https://tapi.telstra.com/v2/messages/sms.
+ /// ApiResponse of List<OutboundPollResponse>
+ public Telstra.Messaging.Client.ApiResponse< List > GetSMSStatusWithHttpInfo (string messageId)
+ {
+ // verify the required parameter 'messageId' is set
+ if (messageId == null)
+ throw new Telstra.Messaging.Client.ApiException(400, "Missing required parameter 'messageId' when calling MessagingApi->GetSMSStatus");
+
+ Telstra.Messaging.Client.RequestOptions localVarRequestOptions = new Telstra.Messaging.Client.RequestOptions();
+
+ String[] _contentTypes = new String[] {
+ };
+
+ // to determine the Accept header
+ String[] _accepts = new String[] {
+ "application/json"
+ };
+
+ var localVarContentType = Telstra.Messaging.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+
+ var localVarAccept = Telstra.Messaging.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+
+ if (messageId != null)
+ localVarRequestOptions.PathParameters.Add("messageId", Telstra.Messaging.Client.ClientUtils.ParameterToString(messageId)); // path parameter
+
+ // authentication (auth) required
+ // oauth required
+ if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
+ {
+ localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
+ }
+
+ // make the HTTP request
+ var localVarResponse = this.Client.Get< List >("/messages/sms/{messageId}/status", localVarRequestOptions, this.Configuration);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("GetSMSStatus", localVarResponse);
+ if (_exception != null) throw _exception;
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Get SMS Status If no notification URL has been specified, it is possible to poll for the message status. Note that the `MessageId` that appears in the URL must be URL encoded. Just copying the `MessageId` as it was supplied when submitting the message may not work. # SMS Status with Notification URL When a message has reached its final state, the API will send a POST to the URL that has been previously specified. <pre><code class=\"language-sh\">{ \"to\": \"+61418123456\", \"sentTimestamp\": \"2017-03-17T10:05:22+10:00\", \"receivedTimestamp\": \"2017-03-17T10:05:23+10:00\", \"messageId\": \"1234567890ABCDEFGHIJKLNOPQRSTUVW\", \"deliveryStatus\": \"DELIVRD\" } </code></pre> The fields are: | Field | Description | | - -- | - --| | `to` | The number the message was sent to. | | `receivedTimestamp` | Time the message was sent to the API. | | `sentTimestamp` | Time handling of the message ended. | | `deliveryStatus` | The final state of the message. | | `messageId` | The same reference that was returned when the original message was sent.| | `receivedTimestamp` | Time the message was sent to the API.| Upon receiving this call it is expected that your servers will give a 204 (No Content) response.
+ ///
+ /// Thrown when fails to make API call
+ /// Unique identifier of a message - it is the value returned from a previous POST call to https://tapi.telstra.com/v2/messages/sms.
+ /// Task of List<OutboundPollResponse>
+ public async System.Threading.Tasks.Task> GetSMSStatusAsync (string messageId)
+ {
+ Telstra.Messaging.Client.ApiResponse> localVarResponse = await GetSMSStatusAsyncWithHttpInfo(messageId);
+ return localVarResponse.Data;
+
+ }
+
+ ///
+ /// Get SMS Status If no notification URL has been specified, it is possible to poll for the message status. Note that the `MessageId` that appears in the URL must be URL encoded. Just copying the `MessageId` as it was supplied when submitting the message may not work. # SMS Status with Notification URL When a message has reached its final state, the API will send a POST to the URL that has been previously specified. <pre><code class=\"language-sh\">{ \"to\": \"+61418123456\", \"sentTimestamp\": \"2017-03-17T10:05:22+10:00\", \"receivedTimestamp\": \"2017-03-17T10:05:23+10:00\", \"messageId\": \"1234567890ABCDEFGHIJKLNOPQRSTUVW\", \"deliveryStatus\": \"DELIVRD\" } </code></pre> The fields are: | Field | Description | | - -- | - --| | `to` | The number the message was sent to. | | `receivedTimestamp` | Time the message was sent to the API. | | `sentTimestamp` | Time handling of the message ended. | | `deliveryStatus` | The final state of the message. | | `messageId` | The same reference that was returned when the original message was sent.| | `receivedTimestamp` | Time the message was sent to the API.| Upon receiving this call it is expected that your servers will give a 204 (No Content) response.
+ ///
+ /// Thrown when fails to make API call
+ /// Unique identifier of a message - it is the value returned from a previous POST call to https://tapi.telstra.com/v2/messages/sms.
+ /// Task of ApiResponse (List<OutboundPollResponse>)
+ public async System.Threading.Tasks.Task>> GetSMSStatusAsyncWithHttpInfo (string messageId)
+ {
+ // verify the required parameter 'messageId' is set
+ if (messageId == null)
+ throw new Telstra.Messaging.Client.ApiException(400, "Missing required parameter 'messageId' when calling MessagingApi->GetSMSStatus");
+
+
+ Telstra.Messaging.Client.RequestOptions localVarRequestOptions = new Telstra.Messaging.Client.RequestOptions();
+
+ String[] _contentTypes = new String[] {
+ };
+
+ // to determine the Accept header
+ String[] _accepts = new String[] {
+ "application/json"
+ };
+
+ foreach (var _contentType in _contentTypes)
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
+
+ foreach (var _accept in _accepts)
+ localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
+
+ if (messageId != null)
+ localVarRequestOptions.PathParameters.Add("messageId", Telstra.Messaging.Client.ClientUtils.ParameterToString(messageId)); // path parameter
+
+ // authentication (auth) required
+ // oauth required
+ if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
+ {
+ localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
+ }
+
+ // make the HTTP request
+
+ var localVarResponse = await this.AsynchronousClient.GetAsync>("/messages/sms/{messageId}/status", localVarRequestOptions, this.Configuration);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("GetSMSStatus", localVarResponse);
+ if (_exception != null) throw _exception;
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// MMS Health Check Determine whether the MMS service is up or down.
+ ///
+ /// Thrown when fails to make API call
+ /// HealthCheckResponse
+ public HealthCheckResponse MMSHealthCheck ()
+ {
+ Telstra.Messaging.Client.ApiResponse localVarResponse = MMSHealthCheckWithHttpInfo();
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// MMS Health Check Determine whether the MMS service is up or down.
+ ///
+ /// Thrown when fails to make API call
+ /// ApiResponse of HealthCheckResponse
+ public Telstra.Messaging.Client.ApiResponse< HealthCheckResponse > MMSHealthCheckWithHttpInfo ()
+ {
+ Telstra.Messaging.Client.RequestOptions localVarRequestOptions = new Telstra.Messaging.Client.RequestOptions();
+
+ String[] _contentTypes = new String[] {
+ };
+
+ // to determine the Accept header
+ String[] _accepts = new String[] {
+ "application/json"
+ };
+
+ var localVarContentType = Telstra.Messaging.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+
+ var localVarAccept = Telstra.Messaging.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+
+
+
+ // make the HTTP request
+ var localVarResponse = this.Client.Get< HealthCheckResponse >("/messages/mms/healthcheck", localVarRequestOptions, this.Configuration);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("MMSHealthCheck", localVarResponse);
+ if (_exception != null) throw _exception;
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// MMS Health Check Determine whether the MMS service is up or down.
+ ///
+ /// Thrown when fails to make API call
+ /// Task of HealthCheckResponse
+ public async System.Threading.Tasks.Task MMSHealthCheckAsync ()
+ {
+ Telstra.Messaging.Client.ApiResponse localVarResponse = await MMSHealthCheckAsyncWithHttpInfo();
+ return localVarResponse.Data;
+
+ }
+
+ ///
+ /// MMS Health Check Determine whether the MMS service is up or down.
+ ///
+ /// Thrown when fails to make API call
+ /// Task of ApiResponse (HealthCheckResponse)
+ public async System.Threading.Tasks.Task> MMSHealthCheckAsyncWithHttpInfo ()
+ {
+
+ Telstra.Messaging.Client.RequestOptions localVarRequestOptions = new Telstra.Messaging.Client.RequestOptions();
+
+ String[] _contentTypes = new String[] {
+ };
+
+ // to determine the Accept header
+ String[] _accepts = new String[] {
+ "application/json"
+ };
+
+ foreach (var _contentType in _contentTypes)
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
+
+ foreach (var _accept in _accepts)
+ localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
+
+
+
+ // make the HTTP request
+
+ var localVarResponse = await this.AsynchronousClient.GetAsync("/messages/mms/healthcheck", localVarRequestOptions, this.Configuration);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("MMSHealthCheck", localVarResponse);
+ if (_exception != null) throw _exception;
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Retrieve MMS Replies Messages are retrieved one at a time, starting with the earliest reply. If the subscription has a `notifyURL`, reply messages will be logged there instead, i.e. `GET` and reply `notifyURL` are exclusive. # MMS Reply with Notification URL When a reply is received, the API will send a POST to the subscription URL that has been previously specified. <pre><code class=\"language-sh\">{ \"to\": \"+61418123456\", \"from\": \"+61421987654\", \"sentTimestamp\": \"2018-03-23T12:15:45+10:00\", \"messageId\": \"XFRO1ApiA0000000111\", \"subject\": \"Foo\", \"envelope\": \"string\", \"MMSContent\": [ { \"type\": \"text/plain\", \"filename\": \"text_1.txt\", \"payload\": \"string\" }, { \"type\": \"image/jpeg\", \"filename\": \"sample.jpeg\", \"payload\": \"string\" } ] }</code></pre> The fields are: | Field | Description | | - -- | - -- | | `to` |The number the message was sent to. | | `from` | The number the message was sent from. | | `sentTimestamp` | Time handling of the message ended. | | `messageId` | Message Id assigned by the MMSC | | `subject` | The subject assigned to the message. | | `envelope` | Information about about terminal type and originating operator. | | `MMSContent` | An array of the actual content of the reply message. | | `type` | The content type of the message. | | `filename` | The filename for the message content. | | `payload` | The content of the message. |
+ ///
+ /// Thrown when fails to make API call
+ /// GetMmsResponse
+ public GetMmsResponse RetrieveMMSReplies ()
+ {
+ Telstra.Messaging.Client.ApiResponse localVarResponse = RetrieveMMSRepliesWithHttpInfo();
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Retrieve MMS Replies Messages are retrieved one at a time, starting with the earliest reply. If the subscription has a `notifyURL`, reply messages will be logged there instead, i.e. `GET` and reply `notifyURL` are exclusive. # MMS Reply with Notification URL When a reply is received, the API will send a POST to the subscription URL that has been previously specified. <pre><code class=\"language-sh\">{ \"to\": \"+61418123456\", \"from\": \"+61421987654\", \"sentTimestamp\": \"2018-03-23T12:15:45+10:00\", \"messageId\": \"XFRO1ApiA0000000111\", \"subject\": \"Foo\", \"envelope\": \"string\", \"MMSContent\": [ { \"type\": \"text/plain\", \"filename\": \"text_1.txt\", \"payload\": \"string\" }, { \"type\": \"image/jpeg\", \"filename\": \"sample.jpeg\", \"payload\": \"string\" } ] }</code></pre> The fields are: | Field | Description | | - -- | - -- | | `to` |The number the message was sent to. | | `from` | The number the message was sent from. | | `sentTimestamp` | Time handling of the message ended. | | `messageId` | Message Id assigned by the MMSC | | `subject` | The subject assigned to the message. | | `envelope` | Information about about terminal type and originating operator. | | `MMSContent` | An array of the actual content of the reply message. | | `type` | The content type of the message. | | `filename` | The filename for the message content. | | `payload` | The content of the message. |
+ ///
+ /// Thrown when fails to make API call
+ /// ApiResponse of GetMmsResponse
+ public Telstra.Messaging.Client.ApiResponse< GetMmsResponse > RetrieveMMSRepliesWithHttpInfo ()
+ {
+ Telstra.Messaging.Client.RequestOptions localVarRequestOptions = new Telstra.Messaging.Client.RequestOptions();
+
+ String[] _contentTypes = new String[] {
+ };
+
+ // to determine the Accept header
+ String[] _accepts = new String[] {
+ "application/json"
+ };
+
+ var localVarContentType = Telstra.Messaging.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+
+ var localVarAccept = Telstra.Messaging.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+
+
+ // authentication (auth) required
+ // oauth required
+ if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
+ {
+ localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
+ }
+
+ // make the HTTP request
+ var localVarResponse = this.Client.Get< GetMmsResponse >("/messages/mms", localVarRequestOptions, this.Configuration);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("RetrieveMMSReplies", localVarResponse);
+ if (_exception != null) throw _exception;
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Retrieve MMS Replies Messages are retrieved one at a time, starting with the earliest reply. If the subscription has a `notifyURL`, reply messages will be logged there instead, i.e. `GET` and reply `notifyURL` are exclusive. # MMS Reply with Notification URL When a reply is received, the API will send a POST to the subscription URL that has been previously specified. <pre><code class=\"language-sh\">{ \"to\": \"+61418123456\", \"from\": \"+61421987654\", \"sentTimestamp\": \"2018-03-23T12:15:45+10:00\", \"messageId\": \"XFRO1ApiA0000000111\", \"subject\": \"Foo\", \"envelope\": \"string\", \"MMSContent\": [ { \"type\": \"text/plain\", \"filename\": \"text_1.txt\", \"payload\": \"string\" }, { \"type\": \"image/jpeg\", \"filename\": \"sample.jpeg\", \"payload\": \"string\" } ] }</code></pre> The fields are: | Field | Description | | - -- | - -- | | `to` |The number the message was sent to. | | `from` | The number the message was sent from. | | `sentTimestamp` | Time handling of the message ended. | | `messageId` | Message Id assigned by the MMSC | | `subject` | The subject assigned to the message. | | `envelope` | Information about about terminal type and originating operator. | | `MMSContent` | An array of the actual content of the reply message. | | `type` | The content type of the message. | | `filename` | The filename for the message content. | | `payload` | The content of the message. |
+ ///
+ /// Thrown when fails to make API call
+ /// Task of GetMmsResponse
+ public async System.Threading.Tasks.Task RetrieveMMSRepliesAsync ()
+ {
+ Telstra.Messaging.Client.ApiResponse localVarResponse = await RetrieveMMSRepliesAsyncWithHttpInfo();
+ return localVarResponse.Data;
+
+ }
+
+ ///
+ /// Retrieve MMS Replies Messages are retrieved one at a time, starting with the earliest reply. If the subscription has a `notifyURL`, reply messages will be logged there instead, i.e. `GET` and reply `notifyURL` are exclusive. # MMS Reply with Notification URL When a reply is received, the API will send a POST to the subscription URL that has been previously specified. <pre><code class=\"language-sh\">{ \"to\": \"+61418123456\", \"from\": \"+61421987654\", \"sentTimestamp\": \"2018-03-23T12:15:45+10:00\", \"messageId\": \"XFRO1ApiA0000000111\", \"subject\": \"Foo\", \"envelope\": \"string\", \"MMSContent\": [ { \"type\": \"text/plain\", \"filename\": \"text_1.txt\", \"payload\": \"string\" }, { \"type\": \"image/jpeg\", \"filename\": \"sample.jpeg\", \"payload\": \"string\" } ] }</code></pre> The fields are: | Field | Description | | - -- | - -- | | `to` |The number the message was sent to. | | `from` | The number the message was sent from. | | `sentTimestamp` | Time handling of the message ended. | | `messageId` | Message Id assigned by the MMSC | | `subject` | The subject assigned to the message. | | `envelope` | Information about about terminal type and originating operator. | | `MMSContent` | An array of the actual content of the reply message. | | `type` | The content type of the message. | | `filename` | The filename for the message content. | | `payload` | The content of the message. |
+ ///
+ /// Thrown when fails to make API call
+ /// Task of ApiResponse (GetMmsResponse)
+ public async System.Threading.Tasks.Task> RetrieveMMSRepliesAsyncWithHttpInfo ()
+ {
+
+ Telstra.Messaging.Client.RequestOptions localVarRequestOptions = new Telstra.Messaging.Client.RequestOptions();
+
+ String[] _contentTypes = new String[] {
+ };
+
+ // to determine the Accept header
+ String[] _accepts = new String[] {
+ "application/json"
+ };
+
+ foreach (var _contentType in _contentTypes)
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
+
+ foreach (var _accept in _accepts)
+ localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
+
+
+ // authentication (auth) required
+ // oauth required
+ if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
+ {
+ localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
+ }
+
+ // make the HTTP request
+
+ var localVarResponse = await this.AsynchronousClient.GetAsync("/messages/mms", localVarRequestOptions, this.Configuration);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("RetrieveMMSReplies", localVarResponse);
+ if (_exception != null) throw _exception;
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Retrieve SMS Replies Messages are retrieved one at a time, starting with the earliest reply. The API supports the encoding of emojis in the reply message. The emojis will be in their UTF-8 format. If the subscription has a `notifyURL`, reply messages will be logged there instead. # SMS Reply with Notification URL When a reply is received, the API will send a POST to the subscription URL that has been previously specified. <pre><code class=\"language-sh\">{ \"to\":\"+61472880123\", \"from\":\"+61412345678\", \"body\":\"Foo4\", \"sentTimestamp\":\"2018-04-20T14:24:35\", \"messageId\":\"DMASApiA0000000146\" }</code></pre> The fields are: | Field | Description | | - -- |- -- | | `to` | The number the message was sent to. | | `from` | The number the message was sent from. | | `body` | The content of the SMS response. | | `sentTimestamp` | Time handling of the message ended. | | `messageId` | The ID assigned to the message. |
+ ///
+ /// Thrown when fails to make API call
+ /// InboundPollResponse
+ public InboundPollResponse RetrieveSMSReplies ()
+ {
+ Telstra.Messaging.Client.ApiResponse localVarResponse = RetrieveSMSRepliesWithHttpInfo();
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Retrieve SMS Replies Messages are retrieved one at a time, starting with the earliest reply. The API supports the encoding of emojis in the reply message. The emojis will be in their UTF-8 format. If the subscription has a `notifyURL`, reply messages will be logged there instead. # SMS Reply with Notification URL When a reply is received, the API will send a POST to the subscription URL that has been previously specified. <pre><code class=\"language-sh\">{ \"to\":\"+61472880123\", \"from\":\"+61412345678\", \"body\":\"Foo4\", \"sentTimestamp\":\"2018-04-20T14:24:35\", \"messageId\":\"DMASApiA0000000146\" }</code></pre> The fields are: | Field | Description | | - -- |- -- | | `to` | The number the message was sent to. | | `from` | The number the message was sent from. | | `body` | The content of the SMS response. | | `sentTimestamp` | Time handling of the message ended. | | `messageId` | The ID assigned to the message. |
+ ///
+ /// Thrown when fails to make API call
+ /// ApiResponse of InboundPollResponse
+ public Telstra.Messaging.Client.ApiResponse< InboundPollResponse > RetrieveSMSRepliesWithHttpInfo ()
+ {
+ Telstra.Messaging.Client.RequestOptions localVarRequestOptions = new Telstra.Messaging.Client.RequestOptions();
+
+ String[] _contentTypes = new String[] {
+ };
+
+ // to determine the Accept header
+ String[] _accepts = new String[] {
+ "application/json"
+ };
+
+ var localVarContentType = Telstra.Messaging.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+
+ var localVarAccept = Telstra.Messaging.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+
+
+ // authentication (auth) required
+ // oauth required
+ if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
+ {
+ localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
+ }
+
+ // make the HTTP request
+ var localVarResponse = this.Client.Get< InboundPollResponse >("/messages/sms", localVarRequestOptions, this.Configuration);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("RetrieveSMSReplies", localVarResponse);
+ if (_exception != null) throw _exception;
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Retrieve SMS Replies Messages are retrieved one at a time, starting with the earliest reply. The API supports the encoding of emojis in the reply message. The emojis will be in their UTF-8 format. If the subscription has a `notifyURL`, reply messages will be logged there instead. # SMS Reply with Notification URL When a reply is received, the API will send a POST to the subscription URL that has been previously specified. <pre><code class=\"language-sh\">{ \"to\":\"+61472880123\", \"from\":\"+61412345678\", \"body\":\"Foo4\", \"sentTimestamp\":\"2018-04-20T14:24:35\", \"messageId\":\"DMASApiA0000000146\" }</code></pre> The fields are: | Field | Description | | - -- |- -- | | `to` | The number the message was sent to. | | `from` | The number the message was sent from. | | `body` | The content of the SMS response. | | `sentTimestamp` | Time handling of the message ended. | | `messageId` | The ID assigned to the message. |
+ ///
+ /// Thrown when fails to make API call
+ /// Task of InboundPollResponse
+ public async System.Threading.Tasks.Task RetrieveSMSRepliesAsync ()
+ {
+ Telstra.Messaging.Client.ApiResponse localVarResponse = await RetrieveSMSRepliesAsyncWithHttpInfo();
+ return localVarResponse.Data;
+
+ }
+
+ ///
+ /// Retrieve SMS Replies Messages are retrieved one at a time, starting with the earliest reply. The API supports the encoding of emojis in the reply message. The emojis will be in their UTF-8 format. If the subscription has a `notifyURL`, reply messages will be logged there instead. # SMS Reply with Notification URL When a reply is received, the API will send a POST to the subscription URL that has been previously specified. <pre><code class=\"language-sh\">{ \"to\":\"+61472880123\", \"from\":\"+61412345678\", \"body\":\"Foo4\", \"sentTimestamp\":\"2018-04-20T14:24:35\", \"messageId\":\"DMASApiA0000000146\" }</code></pre> The fields are: | Field | Description | | - -- |- -- | | `to` | The number the message was sent to. | | `from` | The number the message was sent from. | | `body` | The content of the SMS response. | | `sentTimestamp` | Time handling of the message ended. | | `messageId` | The ID assigned to the message. |
+ ///
+ /// Thrown when fails to make API call
+ /// Task of ApiResponse (InboundPollResponse)
+ public async System.Threading.Tasks.Task> RetrieveSMSRepliesAsyncWithHttpInfo ()
+ {
+
+ Telstra.Messaging.Client.RequestOptions localVarRequestOptions = new Telstra.Messaging.Client.RequestOptions();
+
+ String[] _contentTypes = new String[] {
+ };
+
+ // to determine the Accept header
+ String[] _accepts = new String[] {
+ "application/json"
+ };
+
+ foreach (var _contentType in _contentTypes)
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
+
+ foreach (var _accept in _accepts)
+ localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
+
+
+ // authentication (auth) required
+ // oauth required
+ if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
+ {
+ localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
+ }
+
+ // make the HTTP request
+
+ var localVarResponse = await this.AsynchronousClient.GetAsync("/messages/sms", localVarRequestOptions, this.Configuration);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("RetrieveSMSReplies", localVarResponse);
+ if (_exception != null) throw _exception;
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// SMS Health Check Determine whether the SMS service is up or down.
+ ///
+ /// Thrown when fails to make API call
+ /// HealthCheckResponse
+ public HealthCheckResponse SMSHealthCheck ()
+ {
+ Telstra.Messaging.Client.ApiResponse localVarResponse = SMSHealthCheckWithHttpInfo();
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// SMS Health Check Determine whether the SMS service is up or down.
+ ///
+ /// Thrown when fails to make API call
+ /// ApiResponse of HealthCheckResponse
+ public Telstra.Messaging.Client.ApiResponse< HealthCheckResponse > SMSHealthCheckWithHttpInfo ()
+ {
+ Telstra.Messaging.Client.RequestOptions localVarRequestOptions = new Telstra.Messaging.Client.RequestOptions();
+
+ String[] _contentTypes = new String[] {
+ };
+
+ // to determine the Accept header
+ String[] _accepts = new String[] {
+ "application/json"
+ };
+
+ var localVarContentType = Telstra.Messaging.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+
+ var localVarAccept = Telstra.Messaging.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+
+
+
+ // make the HTTP request
+ var localVarResponse = this.Client.Get< HealthCheckResponse >("/messages/sms/healthcheck", localVarRequestOptions, this.Configuration);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("SMSHealthCheck", localVarResponse);
+ if (_exception != null) throw _exception;
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// SMS Health Check Determine whether the SMS service is up or down.
+ ///
+ /// Thrown when fails to make API call
+ /// Task of HealthCheckResponse
+ public async System.Threading.Tasks.Task SMSHealthCheckAsync ()
+ {
+ Telstra.Messaging.Client.ApiResponse localVarResponse = await SMSHealthCheckAsyncWithHttpInfo();
+ return localVarResponse.Data;
+
+ }
+
+ ///
+ /// SMS Health Check Determine whether the SMS service is up or down.
+ ///
+ /// Thrown when fails to make API call
+ /// Task of ApiResponse (HealthCheckResponse)
+ public async System.Threading.Tasks.Task> SMSHealthCheckAsyncWithHttpInfo ()
+ {
+
+ Telstra.Messaging.Client.RequestOptions localVarRequestOptions = new Telstra.Messaging.Client.RequestOptions();
+
+ String[] _contentTypes = new String[] {
+ };
+
+ // to determine the Accept header
+ String[] _accepts = new String[] {
+ "application/json"
+ };
+
+ foreach (var _contentType in _contentTypes)
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
+
+ foreach (var _accept in _accepts)
+ localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
+
+
+
+ // make the HTTP request
+
+ var localVarResponse = await this.AsynchronousClient.GetAsync("/messages/sms/healthcheck", localVarRequestOptions, this.Configuration);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("SMSHealthCheck", localVarResponse);
+ if (_exception != null) throw _exception;
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Send Multiple SMS Send multiple SMS in one API call.
+ ///
+ /// Thrown when fails to make API call
+ /// A JSON payload containing the recipient's phone number and text message. This number can be in international format if preceeded by a '+' or in national format ('04xxxxxxxx') where x is a digit.
+ /// MessageSentResponseSms
+ public MessageSentResponseSms SMSMulti (SendSmsMultiRequest payload)
+ {
+ Telstra.Messaging.Client.ApiResponse localVarResponse = SMSMultiWithHttpInfo(payload);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Send Multiple SMS Send multiple SMS in one API call.
+ ///
+ /// Thrown when fails to make API call
+ /// A JSON payload containing the recipient's phone number and text message. This number can be in international format if preceeded by a '+' or in national format ('04xxxxxxxx') where x is a digit.
+ /// ApiResponse of MessageSentResponseSms
+ public Telstra.Messaging.Client.ApiResponse< MessageSentResponseSms > SMSMultiWithHttpInfo (SendSmsMultiRequest payload)
+ {
+ // verify the required parameter 'payload' is set
+ if (payload == null)
+ throw new Telstra.Messaging.Client.ApiException(400, "Missing required parameter 'payload' when calling MessagingApi->SMSMulti");
+
+ Telstra.Messaging.Client.RequestOptions localVarRequestOptions = new Telstra.Messaging.Client.RequestOptions();
+
+ String[] _contentTypes = new String[] {
+ "application/json"
+ };
+
+ // to determine the Accept header
+ String[] _accepts = new String[] {
+ "application/json"
+ };
+
+ var localVarContentType = Telstra.Messaging.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+
+ var localVarAccept = Telstra.Messaging.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+
+ localVarRequestOptions.Data = payload;
+
+ // authentication (auth) required
+ // oauth required
+ if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
+ {
+ localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
+ }
+
+ // make the HTTP request
+ var localVarResponse = this.Client.Post< MessageSentResponseSms >("/messages/sms/multi", localVarRequestOptions, this.Configuration);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("SMSMulti", localVarResponse);
+ if (_exception != null) throw _exception;
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Send Multiple SMS Send multiple SMS in one API call.
+ ///
+ /// Thrown when fails to make API call
+ /// A JSON payload containing the recipient's phone number and text message. This number can be in international format if preceeded by a '+' or in national format ('04xxxxxxxx') where x is a digit.
+ /// Task of MessageSentResponseSms
+ public async System.Threading.Tasks.Task SMSMultiAsync (SendSmsMultiRequest payload)
+ {
+ Telstra.Messaging.Client.ApiResponse localVarResponse = await SMSMultiAsyncWithHttpInfo(payload);
+ return localVarResponse.Data;
+
+ }
+
+ ///
+ /// Send Multiple SMS Send multiple SMS in one API call.
+ ///
+ /// Thrown when fails to make API call
+ /// A JSON payload containing the recipient's phone number and text message. This number can be in international format if preceeded by a '+' or in national format ('04xxxxxxxx') where x is a digit.
+ /// Task of ApiResponse (MessageSentResponseSms)
+ public async System.Threading.Tasks.Task> SMSMultiAsyncWithHttpInfo (SendSmsMultiRequest payload)
+ {
+ // verify the required parameter 'payload' is set
+ if (payload == null)
+ throw new Telstra.Messaging.Client.ApiException(400, "Missing required parameter 'payload' when calling MessagingApi->SMSMulti");
+
+
+ Telstra.Messaging.Client.RequestOptions localVarRequestOptions = new Telstra.Messaging.Client.RequestOptions();
+
+ String[] _contentTypes = new String[] {
+ "application/json"
+ };
+
+ // to determine the Accept header
+ String[] _accepts = new String[] {
+ "application/json"
+ };
+
+ foreach (var _contentType in _contentTypes)
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
+
+ foreach (var _accept in _accepts)
+ localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
+
+ localVarRequestOptions.Data = payload;
+
+ // authentication (auth) required
+ // oauth required
+ if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
+ {
+ localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
+ }
+
+ // make the HTTP request
+
+ var localVarResponse = await this.AsynchronousClient.PostAsync("/messages/sms/multi", localVarRequestOptions, this.Configuration);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("SMSMulti", localVarResponse);
+ if (_exception != null) throw _exception;
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Send MMS Send MMS
+ ///
+ /// Thrown when fails to make API call
+ /// A JSON or XML payload containing the recipient's phone number and MMS message. The recipient number should be in the format '04xxxxxxxx' where x is a digit.
+ /// MessageSentResponseMms
+ public MessageSentResponseMms SendMMS (SendMmsRequest body)
+ {
+ Telstra.Messaging.Client.ApiResponse localVarResponse = SendMMSWithHttpInfo(body);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Send MMS Send MMS
+ ///
+ /// Thrown when fails to make API call
+ /// A JSON or XML payload containing the recipient's phone number and MMS message. The recipient number should be in the format '04xxxxxxxx' where x is a digit.
+ /// ApiResponse of MessageSentResponseMms
+ public Telstra.Messaging.Client.ApiResponse< MessageSentResponseMms > SendMMSWithHttpInfo (SendMmsRequest body)
+ {
+ // verify the required parameter 'body' is set
+ if (body == null)
+ throw new Telstra.Messaging.Client.ApiException(400, "Missing required parameter 'body' when calling MessagingApi->SendMMS");
+
+ Telstra.Messaging.Client.RequestOptions localVarRequestOptions = new Telstra.Messaging.Client.RequestOptions();
+
+ String[] _contentTypes = new String[] {
+ "application/json"
+ };
+
+ // to determine the Accept header
+ String[] _accepts = new String[] {
+ "application/json"
+ };
+
+ var localVarContentType = Telstra.Messaging.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+
+ var localVarAccept = Telstra.Messaging.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+
+ localVarRequestOptions.Data = body;
+
+ // authentication (auth) required
+ // oauth required
+ if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
+ {
+ localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
+ }
+
+ // make the HTTP request
+ var localVarResponse = this.Client.Post< MessageSentResponseMms >("/messages/mms", localVarRequestOptions, this.Configuration);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("SendMMS", localVarResponse);
+ if (_exception != null) throw _exception;
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Send MMS Send MMS
+ ///
+ /// Thrown when fails to make API call
+ /// A JSON or XML payload containing the recipient's phone number and MMS message. The recipient number should be in the format '04xxxxxxxx' where x is a digit.
+ /// Task of MessageSentResponseMms
+ public async System.Threading.Tasks.Task SendMMSAsync (SendMmsRequest body)
+ {
+ Telstra.Messaging.Client.ApiResponse localVarResponse = await SendMMSAsyncWithHttpInfo(body);
+ return localVarResponse.Data;
+
+ }
+
+ ///
+ /// Send MMS Send MMS
+ ///
+ /// Thrown when fails to make API call
+ /// A JSON or XML payload containing the recipient's phone number and MMS message. The recipient number should be in the format '04xxxxxxxx' where x is a digit.
+ /// Task of ApiResponse (MessageSentResponseMms)
+ public async System.Threading.Tasks.Task> SendMMSAsyncWithHttpInfo (SendMmsRequest body)
+ {
+ // verify the required parameter 'body' is set
+ if (body == null)
+ throw new Telstra.Messaging.Client.ApiException(400, "Missing required parameter 'body' when calling MessagingApi->SendMMS");
+
+
+ Telstra.Messaging.Client.RequestOptions localVarRequestOptions = new Telstra.Messaging.Client.RequestOptions();
+
+ String[] _contentTypes = new String[] {
+ "application/json"
+ };
+
+ // to determine the Accept header
+ String[] _accepts = new String[] {
+ "application/json"
+ };
+
+ foreach (var _contentType in _contentTypes)
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
+
+ foreach (var _accept in _accepts)
+ localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
+
+ localVarRequestOptions.Data = body;
+
+ // authentication (auth) required
+ // oauth required
+ if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
+ {
+ localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
+ }
+
+ // make the HTTP request
+
+ var localVarResponse = await this.AsynchronousClient.PostAsync("/messages/mms", localVarRequestOptions, this.Configuration);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("SendMMS", localVarResponse);
+ if (_exception != null) throw _exception;
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Send SMS Send an SMS Message to a single or multiple mobile number/s.
+ ///
+ /// Thrown when fails to make API call
+ /// A JSON or XML payload containing the recipient's phone number and text message. This number can be in international format if preceeded by a '+' or in national format ('04xxxxxxxx') where x is a digit.
+ /// MessageSentResponseSms
+ public MessageSentResponseSms SendSMS (SendSMSRequest payload)
+ {
+ Telstra.Messaging.Client.ApiResponse localVarResponse = SendSMSWithHttpInfo(payload);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Send SMS Send an SMS Message to a single or multiple mobile number/s.
+ ///
+ /// Thrown when fails to make API call
+ /// A JSON or XML payload containing the recipient's phone number and text message. This number can be in international format if preceeded by a '+' or in national format ('04xxxxxxxx') where x is a digit.
+ /// ApiResponse of MessageSentResponseSms
+ public Telstra.Messaging.Client.ApiResponse< MessageSentResponseSms > SendSMSWithHttpInfo (SendSMSRequest payload)
+ {
+ // verify the required parameter 'payload' is set
+ if (payload == null)
+ throw new Telstra.Messaging.Client.ApiException(400, "Missing required parameter 'payload' when calling MessagingApi->SendSMS");
+
+ Telstra.Messaging.Client.RequestOptions localVarRequestOptions = new Telstra.Messaging.Client.RequestOptions();
+
+ String[] _contentTypes = new String[] {
+ "application/json"
+ };
+
+ // to determine the Accept header
+ String[] _accepts = new String[] {
+ "application/json"
+ };
+
+ var localVarContentType = Telstra.Messaging.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+
+ var localVarAccept = Telstra.Messaging.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+
+ localVarRequestOptions.Data = payload;
+
+ // authentication (auth) required
+ // oauth required
+ if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
+ {
+ localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
+ }
+
+ // make the HTTP request
+ var localVarResponse = this.Client.Post< MessageSentResponseSms >("/messages/sms", localVarRequestOptions, this.Configuration);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("SendSMS", localVarResponse);
+ if (_exception != null) throw _exception;
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Send SMS Send an SMS Message to a single or multiple mobile number/s.
+ ///
+ /// Thrown when fails to make API call
+ /// A JSON or XML payload containing the recipient's phone number and text message. This number can be in international format if preceeded by a '+' or in national format ('04xxxxxxxx') where x is a digit.
+ /// Task of MessageSentResponseSms
+ public async System.Threading.Tasks.Task SendSMSAsync (SendSMSRequest payload)
+ {
+ Telstra.Messaging.Client.ApiResponse localVarResponse = await SendSMSAsyncWithHttpInfo(payload);
+ return localVarResponse.Data;
+
+ }
+
+ ///
+ /// Send SMS Send an SMS Message to a single or multiple mobile number/s.
+ ///
+ /// Thrown when fails to make API call
+ /// A JSON or XML payload containing the recipient's phone number and text message. This number can be in international format if preceeded by a '+' or in national format ('04xxxxxxxx') where x is a digit.
+ /// Task of ApiResponse (MessageSentResponseSms)
+ public async System.Threading.Tasks.Task> SendSMSAsyncWithHttpInfo (SendSMSRequest payload)
+ {
+ // verify the required parameter 'payload' is set
+ if (payload == null)
+ throw new Telstra.Messaging.Client.ApiException(400, "Missing required parameter 'payload' when calling MessagingApi->SendSMS");
+
+
+ Telstra.Messaging.Client.RequestOptions localVarRequestOptions = new Telstra.Messaging.Client.RequestOptions();
+
+ String[] _contentTypes = new String[] {
+ "application/json"
+ };
+
+ // to determine the Accept header
+ String[] _accepts = new String[] {
+ "application/json"
+ };
+
+ foreach (var _contentType in _contentTypes)
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
+
+ foreach (var _accept in _accepts)
+ localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
+
+ localVarRequestOptions.Data = payload;
+
+ // authentication (auth) required
+ // oauth required
+ if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
+ {
+ localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
+ }
+
+ // make the HTTP request
+
+ var localVarResponse = await this.AsynchronousClient.PostAsync("/messages/sms", localVarRequestOptions, this.Configuration);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("SendSMS", localVarResponse);
+ if (_exception != null) throw _exception;
+ }
+
+ return localVarResponse;
+ }
+
+ }
+}
diff --git a/src/Telstra.Messaging/Api/ProvisioningApi.cs b/src/Telstra.Messaging/Api/ProvisioningApi.cs
new file mode 100644
index 0000000..4de2764
--- /dev/null
+++ b/src/Telstra.Messaging/Api/ProvisioningApi.cs
@@ -0,0 +1,643 @@
+/*
+ * Telstra Messaging API
+ *
+ * The Telstra Messaging API specification
+ *
+ * The version of the OpenAPI document: 2.2.9
+ *
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Net;
+using System.Net.Mime;
+using Telstra.Messaging.Client;
+using Telstra.Messaging.Model;
+
+namespace Telstra.Messaging.Api
+{
+
+ ///
+ /// Represents a collection of functions to interact with the API endpoints
+ ///
+ public interface IProvisioningApiSync : IApiAccessor
+ {
+ #region Synchronous Operations
+ ///
+ /// Create Subscription
+ ///
+ ///
+ /// Invoke the provisioning API to get a dedicated mobile number for an account or application. Note that Free Trial apps will have a 30-Day Limit for their provisioned number. If the Provisioning call is made several times within that 30-Day period, it will return the `expiryDate` in the Unix format and will not add any activeDays until after that `expiryDate`. After the `expiryDate`, you may make another Provisioning call to extend the activeDays by another 30-Days. For paid apps, a provisioned number can be allotted for a maximum of 5 years. If a Provisioning call is made which will result to activeDays > 1825, a 409 `Active Days Max` response will be returned to indicate that the provisioned number is already valid for more than 5 years and that no update to activeDays has been made.
+ ///
+ /// Thrown when fails to make API call
+ /// A JSON payload containing the required attributes
+ /// ProvisionNumberResponse
+ ProvisionNumberResponse CreateSubscription (ProvisionNumberRequest body);
+
+ ///
+ /// Create Subscription
+ ///
+ ///
+ /// Invoke the provisioning API to get a dedicated mobile number for an account or application. Note that Free Trial apps will have a 30-Day Limit for their provisioned number. If the Provisioning call is made several times within that 30-Day period, it will return the `expiryDate` in the Unix format and will not add any activeDays until after that `expiryDate`. After the `expiryDate`, you may make another Provisioning call to extend the activeDays by another 30-Days. For paid apps, a provisioned number can be allotted for a maximum of 5 years. If a Provisioning call is made which will result to activeDays > 1825, a 409 `Active Days Max` response will be returned to indicate that the provisioned number is already valid for more than 5 years and that no update to activeDays has been made.
+ ///
+ /// Thrown when fails to make API call
+ /// A JSON payload containing the required attributes
+ /// ApiResponse of ProvisionNumberResponse
+ ApiResponse CreateSubscriptionWithHttpInfo (ProvisionNumberRequest body);
+ ///
+ /// Delete Subscription
+ ///
+ ///
+ /// Delete a mobile number subscription from an account
+ ///
+ /// Thrown when fails to make API call
+ /// EmptyArr
+ ///
+ void DeleteSubscription (DeleteNumberRequest body);
+
+ ///
+ /// Delete Subscription
+ ///
+ ///
+ /// Delete a mobile number subscription from an account
+ ///
+ /// Thrown when fails to make API call
+ /// EmptyArr
+ /// ApiResponse of Object(void)
+ ApiResponse