namespace Eros.Saguna.Common.GatewayClient.ServiceModel
open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
type GatewayResponseStatus =
| Initiated = 0
| Successful = 1
| JobError = 2
[<AllowNullLiteral>]
type GatewayTaskResponse() =
member val ReferenceId:Guid = new Guid() with get,set
member val GatewayTaskResponseStatus:GatewayResponseStatus = new GatewayResponseStatus() with get,set
member val Payload:String = null with get,set
[<AllowNullLiteral>]
type BaseQueueMessage() =
member val LicenseeId:Guid = new Guid() with get,set
[<AllowNullLiteral>]
type GatewayTask() =
inherit BaseQueueMessage()
member val ReferenceId:Guid = new Guid() with get,set
member val JobTypeId:Guid = new Guid() with get,set
member val IsBeingProcessed:Boolean = new Boolean() with get,set
member val Payload:String = null with get,set
member val ContentStoredExternally:Boolean = new Boolean() with get,set
member val ResendRequest:Boolean = new Boolean() with get,set
[<AllowNullLiteral>]
type SendTask() =
member val GatewayTask:GatewayTask = null with get,set
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /jsv/reply/SendTask HTTP/1.1
Host: production-eros-gateway-api-sms-wa.azurewebsites.net
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
GatewayTask:
{
ReferenceId: 00000000000000000000000000000000,
JobTypeId: 00000000000000000000000000000000,
IsBeingProcessed: False,
Payload: String,
ContentStoredExternally: False,
ResendRequest: False,
LicenseeId: 00000000000000000000000000000000
}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ReferenceId: 00000000000000000000000000000000,
GatewayTaskResponseStatus: Initiated,
Payload: String
}