using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Eros.Saguna.Common.GatewayClient.ServiceModel;
using Eros.Saguna.Common.Library;
using Eros.Saguna.Common.Library.Queuing;
namespace Eros.Saguna.Common.GatewayClient.ServiceModel
{
public partial class SendTask
{
public virtual GatewayTask GatewayTask { get; set; }
}
}
namespace Eros.Saguna.Common.Library
{
public enum GatewayResponseStatus
{
Initiated,
Successful,
JobError,
}
public partial class GatewayTask
: BaseQueueMessage
{
public virtual Guid ReferenceId { get; set; }
public virtual Guid JobTypeId { get; set; }
public virtual bool IsBeingProcessed { get; set; }
public virtual string Payload { get; set; }
public virtual bool ContentStoredExternally { get; set; }
public virtual bool ResendRequest { get; set; }
}
public partial class GatewayTaskResponse
{
public virtual Guid ReferenceId { get; set; }
public virtual GatewayResponseStatus GatewayTaskResponseStatus { get; set; }
public virtual string Payload { get; set; }
}
}
namespace Eros.Saguna.Common.Library.Queuing
{
public partial class BaseQueueMessage
{
public virtual Guid LicenseeId { 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
}