using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using WebService.ServiceModel;
using WebService.ServiceModel.Base;
using CommonService.Api.Models.Base;
using BusinessLogic.Entities;
namespace BusinessLogic.Entities
{
[Flags]
public enum IntegrationProviderType
{
None = 0,
EA = 1,
IlluminaHubProtectMe = 2,
MyLegalHand = 3,
AccidentAngels = 4,
EmergencyServices = 5,
MightyMobile = 6,
Pulsit = 7,
Bolt = 8,
}
}
namespace CommonService.Api.Models.Base
{
public partial class ApiServiceResponse
: IServiceResponse
{
public virtual string Description { get; set; }
public virtual string Heading { get; set; }
public virtual bool WasSuccessful { get; set; }
public virtual Object ModelState { get; set; }
}
}
namespace WebService.ServiceModel
{
public partial class ConfirmOtp
: ApiServiceRequest
{
public virtual int SystemUserId { get; set; }
public virtual string Otp { get; set; }
public virtual int UtcOffset { get; set; }
}
public partial class ConfirmOtpResponse
: ApiServiceResponse
{
public virtual LoginData Data { get; set; }
public virtual bool MustSetPin { get; set; }
}
public partial class DependentData
{
public virtual int DependentId { get; set; }
public virtual string FirstName { get; set; }
public virtual string Surname { get; set; }
public virtual string MobileNumber { get; set; }
public virtual string Email { get; set; }
public virtual string IdNumber { get; set; }
}
public partial class LoginData
{
public LoginData()
{
AllProducts = new List<SystemUserProductData>{};
UserProducts = new List<SystemUserProductData>{};
OtherProducts = new List<SystemUserProductData>{};
Dependents = new List<DependentData>{};
PendingFeedbackIds = new List<int>{};
}
public virtual int SystemUserId { get; set; }
public virtual string RefreshToken { get; set; }
public virtual string FirstName { get; set; }
public virtual bool IsDependent { get; set; }
public virtual string FullName { get; set; }
public virtual List<SystemUserProductData> AllProducts { get; set; }
public virtual List<SystemUserProductData> UserProducts { get; set; }
public virtual List<SystemUserProductData> OtherProducts { get; set; }
public virtual string ContactNumber { get; set; }
public virtual List<DependentData> Dependents { get; set; }
public virtual int UnreadMessageCount { get; set; }
public virtual List<int> PendingFeedbackIds { get; set; }
}
public partial class SystemUserProductAttachmentData
{
public virtual int Id { get; set; }
public virtual string FileName { get; set; }
public virtual string MainFileUrl { get; set; }
public virtual string ThumbnailUrl { get; set; }
public virtual bool IsVideo { get; set; }
public virtual bool IsImage { get; set; }
public virtual bool IsPdf { get; set; }
}
public partial class SystemUserProductData
{
public SystemUserProductData()
{
Attachments = new List<SystemUserProductAttachmentData>{};
}
public virtual IntegrationProviderType IntegrationType { get; set; }
public virtual int ProductId { get; set; }
public virtual string Name { get; set; }
public virtual string NameAfrikaans { get; set; }
public virtual long PanicId { get; set; }
public virtual bool UserHasProduct { get; set; }
public virtual bool CanActivate { get; set; }
public virtual bool Enquired { get; set; }
public virtual string DashImage { get; set; }
public virtual bool ShowOnDash { get; set; }
public virtual string ActionUrl { get; set; }
public virtual List<SystemUserProductAttachmentData> Attachments { get; set; }
public virtual string DescriptionEng { get; set; }
public virtual string SummaryEng { get; set; }
public virtual string DescriptionAfr { get; set; }
public virtual string SummaryAfr { get; set; }
}
}
namespace WebService.ServiceModel.Base
{
public partial class ApiServiceRequest
: IServiceRequest, IHasApiKey, IHasDeviceInfo, IHasClientId
{
///<summary>
///The API Key required for authentication
///</summary>
[ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true)]
public virtual string ApiKey { get; set; }
///<summary>
///Latitude of the user making this request
///</summary>
[ApiMember(DataType="double", Description="Latitude of the user making this request")]
public virtual double Latitude { get; set; }
///<summary>
///Longitude of the user making this request
///</summary>
[ApiMember(DataType="double", Description="Longitude of the user making this request")]
public virtual double Longitude { 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/ConfirmOtp HTTP/1.1
Host: galaxymobile.api.dev.86degrees.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
SystemUserId: 0,
Otp: String,
UtcOffset: 0,
ApiKey: String,
Latitude: 0,
Longitude: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Data:
{
SystemUserId: 0,
RefreshToken: String,
FirstName: String,
IsDependent: False,
FullName: String,
AllProducts:
[
{
IntegrationType: 0,
ProductId: 0,
Name: String,
NameAfrikaans: String,
PanicId: 0,
UserHasProduct: False,
CanActivate: False,
Enquired: False,
DashImage: String,
ShowOnDash: False,
ActionUrl: String,
Attachments:
[
{
Id: 0,
FileName: String,
MainFileUrl: String,
ThumbnailUrl: String,
IsVideo: False,
IsImage: False,
IsPdf: False
}
],
DescriptionEng: String,
SummaryEng: String,
DescriptionAfr: String,
SummaryAfr: String
}
],
UserProducts:
[
{
IntegrationType: 0,
ProductId: 0,
Name: String,
NameAfrikaans: String,
PanicId: 0,
UserHasProduct: False,
CanActivate: False,
Enquired: False,
DashImage: String,
ShowOnDash: False,
ActionUrl: String,
Attachments:
[
{
Id: 0,
FileName: String,
MainFileUrl: String,
ThumbnailUrl: String,
IsVideo: False,
IsImage: False,
IsPdf: False
}
],
DescriptionEng: String,
SummaryEng: String,
DescriptionAfr: String,
SummaryAfr: String
}
],
OtherProducts:
[
{
IntegrationType: 0,
ProductId: 0,
Name: String,
NameAfrikaans: String,
PanicId: 0,
UserHasProduct: False,
CanActivate: False,
Enquired: False,
DashImage: String,
ShowOnDash: False,
ActionUrl: String,
Attachments:
[
{
Id: 0,
FileName: String,
MainFileUrl: String,
ThumbnailUrl: String,
IsVideo: False,
IsImage: False,
IsPdf: False
}
],
DescriptionEng: String,
SummaryEng: String,
DescriptionAfr: String,
SummaryAfr: String
}
],
ContactNumber: String,
Dependents:
[
{
DependentId: 0,
FirstName: String,
Surname: String,
MobileNumber: String,
Email: String,
IdNumber: String
}
],
UnreadMessageCount: 0,
PendingFeedbackIds:
[
0
]
},
MustSetPin: False,
Description: String,
Heading: String,
WasSuccessful: False,
ModelState: {}
}