GalaxyMobile App API

<back to all web services

ConfirmOtp

import 'package:servicestack/servicestack.dart';

class ApiServiceRequest implements IServiceRequest, IHasApiKey, IHasDeviceInfo, IHasClientId, IConvertible
{
    /**
    * The API Key required for authentication
    */
    // @ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true)
    String? ApiKey;

    /**
    * Latitude of the user making this request
    */
    // @ApiMember(DataType="double", Description="Latitude of the user making this request")
    double? Latitude;

    /**
    * Longitude of the user making this request
    */
    // @ApiMember(DataType="double", Description="Longitude of the user making this request")
    double? Longitude;

    ApiServiceRequest({this.ApiKey,this.Latitude,this.Longitude});
    ApiServiceRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ApiKey = json['ApiKey'];
        Latitude = JsonConverters.toDouble(json['Latitude']);
        Longitude = JsonConverters.toDouble(json['Longitude']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ApiKey': ApiKey,
        'Latitude': Latitude,
        'Longitude': Longitude
    };

    getTypeName() => "ApiServiceRequest";
    TypeContext? context = _ctx;
}

class ApiServiceResponse implements IServiceResponse, IConvertible
{
    String? Description;
    String? Heading;
    bool? WasSuccessful;
    dynamic? ModelState;

    ApiServiceResponse({this.Description,this.Heading,this.WasSuccessful,this.ModelState});
    ApiServiceResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Description = json['Description'];
        Heading = json['Heading'];
        WasSuccessful = json['WasSuccessful'];
        ModelState = JsonConverters.fromJson(json['ModelState'],'dynamic',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Description': Description,
        'Heading': Heading,
        'WasSuccessful': WasSuccessful,
        'ModelState': JsonConverters.toJson(ModelState,'dynamic',context!)
    };

    getTypeName() => "ApiServiceResponse";
    TypeContext? context = _ctx;
}

// @Flags()
class IntegrationProviderType
{
    static const IntegrationProviderType None = const IntegrationProviderType._(0);
    static const IntegrationProviderType EA = const IntegrationProviderType._(1);
    static const IntegrationProviderType IlluminaHubProtectMe = const IntegrationProviderType._(2);
    static const IntegrationProviderType MyLegalHand = const IntegrationProviderType._(3);
    static const IntegrationProviderType AccidentAngels = const IntegrationProviderType._(4);
    static const IntegrationProviderType EmergencyServices = const IntegrationProviderType._(5);
    static const IntegrationProviderType MightyMobile = const IntegrationProviderType._(6);
    static const IntegrationProviderType Pulsit = const IntegrationProviderType._(7);
    static const IntegrationProviderType Bolt = const IntegrationProviderType._(8);

    final int _value;
    const IntegrationProviderType._(this._value);
    int get value => _value;
    static List<IntegrationProviderType> get values => const [None,EA,IlluminaHubProtectMe,MyLegalHand,AccidentAngels,EmergencyServices,MightyMobile,Pulsit,Bolt];
}

class SystemUserProductAttachmentData implements IConvertible
{
    int? Id;
    String? FileName;
    String? MainFileUrl;
    String? ThumbnailUrl;
    bool? IsVideo;
    bool? IsImage;
    bool? IsPdf;

    SystemUserProductAttachmentData({this.Id,this.FileName,this.MainFileUrl,this.ThumbnailUrl,this.IsVideo,this.IsImage,this.IsPdf});
    SystemUserProductAttachmentData.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        FileName = json['FileName'];
        MainFileUrl = json['MainFileUrl'];
        ThumbnailUrl = json['ThumbnailUrl'];
        IsVideo = json['IsVideo'];
        IsImage = json['IsImage'];
        IsPdf = json['IsPdf'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'FileName': FileName,
        'MainFileUrl': MainFileUrl,
        'ThumbnailUrl': ThumbnailUrl,
        'IsVideo': IsVideo,
        'IsImage': IsImage,
        'IsPdf': IsPdf
    };

    getTypeName() => "SystemUserProductAttachmentData";
    TypeContext? context = _ctx;
}

class SystemUserProductData implements IConvertible
{
    IntegrationProviderType? IntegrationType;
    int? ProductId;
    String? Name;
    String? NameAfrikaans;
    int? PanicId;
    bool? UserHasProduct;
    bool? CanActivate;
    bool? Enquired;
    String? DashImage;
    bool? ShowOnDash;
    String? ActionUrl;
    List<SystemUserProductAttachmentData>? Attachments;
    String? DescriptionEng;
    String? SummaryEng;
    String? DescriptionAfr;
    String? SummaryAfr;

    SystemUserProductData({this.IntegrationType,this.ProductId,this.Name,this.NameAfrikaans,this.PanicId,this.UserHasProduct,this.CanActivate,this.Enquired,this.DashImage,this.ShowOnDash,this.ActionUrl,this.Attachments,this.DescriptionEng,this.SummaryEng,this.DescriptionAfr,this.SummaryAfr});
    SystemUserProductData.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        IntegrationType = JsonConverters.fromJson(json['IntegrationType'],'IntegrationProviderType',context!);
        ProductId = json['ProductId'];
        Name = json['Name'];
        NameAfrikaans = json['NameAfrikaans'];
        PanicId = json['PanicId'];
        UserHasProduct = json['UserHasProduct'];
        CanActivate = json['CanActivate'];
        Enquired = json['Enquired'];
        DashImage = json['DashImage'];
        ShowOnDash = json['ShowOnDash'];
        ActionUrl = json['ActionUrl'];
        Attachments = JsonConverters.fromJson(json['Attachments'],'List<SystemUserProductAttachmentData>',context!);
        DescriptionEng = json['DescriptionEng'];
        SummaryEng = json['SummaryEng'];
        DescriptionAfr = json['DescriptionAfr'];
        SummaryAfr = json['SummaryAfr'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'IntegrationType': JsonConverters.toJson(IntegrationType,'IntegrationProviderType',context!),
        'ProductId': ProductId,
        'Name': Name,
        'NameAfrikaans': NameAfrikaans,
        'PanicId': PanicId,
        'UserHasProduct': UserHasProduct,
        'CanActivate': CanActivate,
        'Enquired': Enquired,
        'DashImage': DashImage,
        'ShowOnDash': ShowOnDash,
        'ActionUrl': ActionUrl,
        'Attachments': JsonConverters.toJson(Attachments,'List<SystemUserProductAttachmentData>',context!),
        'DescriptionEng': DescriptionEng,
        'SummaryEng': SummaryEng,
        'DescriptionAfr': DescriptionAfr,
        'SummaryAfr': SummaryAfr
    };

    getTypeName() => "SystemUserProductData";
    TypeContext? context = _ctx;
}

class DependentData implements IConvertible
{
    int? DependentId;
    String? FirstName;
    String? Surname;
    String? MobileNumber;
    String? Email;
    String? IdNumber;

    DependentData({this.DependentId,this.FirstName,this.Surname,this.MobileNumber,this.Email,this.IdNumber});
    DependentData.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        DependentId = json['DependentId'];
        FirstName = json['FirstName'];
        Surname = json['Surname'];
        MobileNumber = json['MobileNumber'];
        Email = json['Email'];
        IdNumber = json['IdNumber'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'DependentId': DependentId,
        'FirstName': FirstName,
        'Surname': Surname,
        'MobileNumber': MobileNumber,
        'Email': Email,
        'IdNumber': IdNumber
    };

    getTypeName() => "DependentData";
    TypeContext? context = _ctx;
}

class LoginData implements IConvertible
{
    int? SystemUserId;
    String? RefreshToken;
    String? FirstName;
    bool? IsDependent;
    String? FullName;
    List<SystemUserProductData>? AllProducts;
    List<SystemUserProductData>? UserProducts;
    List<SystemUserProductData>? OtherProducts;
    String? ContactNumber;
    List<DependentData>? Dependents;
    int? UnreadMessageCount;
    List<int>? PendingFeedbackIds;

    LoginData({this.SystemUserId,this.RefreshToken,this.FirstName,this.IsDependent,this.FullName,this.AllProducts,this.UserProducts,this.OtherProducts,this.ContactNumber,this.Dependents,this.UnreadMessageCount,this.PendingFeedbackIds});
    LoginData.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        SystemUserId = json['SystemUserId'];
        RefreshToken = json['RefreshToken'];
        FirstName = json['FirstName'];
        IsDependent = json['IsDependent'];
        FullName = json['FullName'];
        AllProducts = JsonConverters.fromJson(json['AllProducts'],'List<SystemUserProductData>',context!);
        UserProducts = JsonConverters.fromJson(json['UserProducts'],'List<SystemUserProductData>',context!);
        OtherProducts = JsonConverters.fromJson(json['OtherProducts'],'List<SystemUserProductData>',context!);
        ContactNumber = json['ContactNumber'];
        Dependents = JsonConverters.fromJson(json['Dependents'],'List<DependentData>',context!);
        UnreadMessageCount = json['UnreadMessageCount'];
        PendingFeedbackIds = JsonConverters.fromJson(json['PendingFeedbackIds'],'List<int>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'SystemUserId': SystemUserId,
        'RefreshToken': RefreshToken,
        'FirstName': FirstName,
        'IsDependent': IsDependent,
        'FullName': FullName,
        'AllProducts': JsonConverters.toJson(AllProducts,'List<SystemUserProductData>',context!),
        'UserProducts': JsonConverters.toJson(UserProducts,'List<SystemUserProductData>',context!),
        'OtherProducts': JsonConverters.toJson(OtherProducts,'List<SystemUserProductData>',context!),
        'ContactNumber': ContactNumber,
        'Dependents': JsonConverters.toJson(Dependents,'List<DependentData>',context!),
        'UnreadMessageCount': UnreadMessageCount,
        'PendingFeedbackIds': JsonConverters.toJson(PendingFeedbackIds,'List<int>',context!)
    };

    getTypeName() => "LoginData";
    TypeContext? context = _ctx;
}

class ConfirmOtpResponse extends ApiServiceResponse implements IConvertible
{
    LoginData? Data;
    bool? MustSetPin;

    ConfirmOtpResponse({this.Data,this.MustSetPin});
    ConfirmOtpResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        Data = JsonConverters.fromJson(json['Data'],'LoginData',context!);
        MustSetPin = json['MustSetPin'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'Data': JsonConverters.toJson(Data,'LoginData',context!),
        'MustSetPin': MustSetPin
    });

    getTypeName() => "ConfirmOtpResponse";
    TypeContext? context = _ctx;
}

class ConfirmOtp extends ApiServiceRequest implements IConvertible
{
    int? SystemUserId;
    String? Otp;
    int? UtcOffset;

    ConfirmOtp({this.SystemUserId,this.Otp,this.UtcOffset});
    ConfirmOtp.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        SystemUserId = json['SystemUserId'];
        Otp = json['Otp'];
        UtcOffset = json['UtcOffset'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'SystemUserId': SystemUserId,
        'Otp': Otp,
        'UtcOffset': UtcOffset
    });

    getTypeName() => "ConfirmOtp";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'galaxymobile.api.dev.86degrees.com', types: <String, TypeInfo> {
    'ApiServiceRequest': TypeInfo(TypeOf.Class, create:() => ApiServiceRequest()),
    'ApiServiceResponse': TypeInfo(TypeOf.Class, create:() => ApiServiceResponse()),
    'IntegrationProviderType': TypeInfo(TypeOf.Enum, enumValues:IntegrationProviderType.values),
    'SystemUserProductAttachmentData': TypeInfo(TypeOf.Class, create:() => SystemUserProductAttachmentData()),
    'SystemUserProductData': TypeInfo(TypeOf.Class, create:() => SystemUserProductData()),
    'List<SystemUserProductAttachmentData>': TypeInfo(TypeOf.Class, create:() => <SystemUserProductAttachmentData>[]),
    'DependentData': TypeInfo(TypeOf.Class, create:() => DependentData()),
    'LoginData': TypeInfo(TypeOf.Class, create:() => LoginData()),
    'List<SystemUserProductData>': TypeInfo(TypeOf.Class, create:() => <SystemUserProductData>[]),
    'List<DependentData>': TypeInfo(TypeOf.Class, create:() => <DependentData>[]),
    'ConfirmOtpResponse': TypeInfo(TypeOf.Class, create:() => ConfirmOtpResponse()),
    'ConfirmOtp': TypeInfo(TypeOf.Class, create:() => ConfirmOtp()),
});

Dart ConfirmOtp DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /xml/reply/ConfirmOtp HTTP/1.1 
Host: galaxymobile.api.dev.86degrees.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<ConfirmOtp xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebService.ServiceModel">
  <ApiKey xmlns="http://schemas.datacontract.org/2004/07/WebService.ServiceModel.Base">String</ApiKey>
  <Latitude xmlns="http://schemas.datacontract.org/2004/07/WebService.ServiceModel.Base">0</Latitude>
  <Longitude xmlns="http://schemas.datacontract.org/2004/07/WebService.ServiceModel.Base">0</Longitude>
  <Otp>String</Otp>
  <SystemUserId>0</SystemUserId>
  <UtcOffset>0</UtcOffset>
</ConfirmOtp>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ConfirmOtpResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebService.ServiceModel">
  <Description xmlns="http://schemas.datacontract.org/2004/07/CommonService.Api.Models.Base">String</Description>
  <Heading xmlns="http://schemas.datacontract.org/2004/07/CommonService.Api.Models.Base">String</Heading>
  <ModelState xmlns="http://schemas.datacontract.org/2004/07/CommonService.Api.Models.Base" />
  <WasSuccessful xmlns="http://schemas.datacontract.org/2004/07/CommonService.Api.Models.Base">false</WasSuccessful>
  <Data>
    <AllProducts>
      <SystemUserProductData>
        <ActionUrl>String</ActionUrl>
        <Attachments>
          <SystemUserProductAttachmentData>
            <FileName>String</FileName>
            <Id>0</Id>
            <IsImage>false</IsImage>
            <IsPdf>false</IsPdf>
            <IsVideo>false</IsVideo>
            <MainFileUrl>String</MainFileUrl>
            <ThumbnailUrl>String</ThumbnailUrl>
          </SystemUserProductAttachmentData>
        </Attachments>
        <DashImage>String</DashImage>
        <DescriptionAfr>String</DescriptionAfr>
        <DescriptionEng>String</DescriptionEng>
        <Enquired>false</Enquired>
        <IntegrationType>None</IntegrationType>
        <Name>String</Name>
        <NameAfrikaans>String</NameAfrikaans>
        <PanicId>0</PanicId>
        <ProductId>0</ProductId>
        <ShowOnDash>false</ShowOnDash>
        <SummaryAfr>String</SummaryAfr>
        <SummaryEng>String</SummaryEng>
        <UserHasProduct>false</UserHasProduct>
      </SystemUserProductData>
    </AllProducts>
    <Dependents>
      <DependentData>
        <DependentId>0</DependentId>
        <Email>String</Email>
        <FirstName>String</FirstName>
        <IdNumber>String</IdNumber>
        <MobileNumber>String</MobileNumber>
        <Surname>String</Surname>
      </DependentData>
    </Dependents>
    <FirstName>String</FirstName>
    <IsDependent>false</IsDependent>
    <OtherProducts>
      <SystemUserProductData>
        <ActionUrl>String</ActionUrl>
        <Attachments>
          <SystemUserProductAttachmentData>
            <FileName>String</FileName>
            <Id>0</Id>
            <IsImage>false</IsImage>
            <IsPdf>false</IsPdf>
            <IsVideo>false</IsVideo>
            <MainFileUrl>String</MainFileUrl>
            <ThumbnailUrl>String</ThumbnailUrl>
          </SystemUserProductAttachmentData>
        </Attachments>
        <DashImage>String</DashImage>
        <DescriptionAfr>String</DescriptionAfr>
        <DescriptionEng>String</DescriptionEng>
        <Enquired>false</Enquired>
        <IntegrationType>None</IntegrationType>
        <Name>String</Name>
        <NameAfrikaans>String</NameAfrikaans>
        <PanicId>0</PanicId>
        <ProductId>0</ProductId>
        <ShowOnDash>false</ShowOnDash>
        <SummaryAfr>String</SummaryAfr>
        <SummaryEng>String</SummaryEng>
        <UserHasProduct>false</UserHasProduct>
      </SystemUserProductData>
    </OtherProducts>
    <PendingFeedbackIds xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:int>0</d3p1:int>
    </PendingFeedbackIds>
    <RefreshToken>String</RefreshToken>
    <SystemUserId>0</SystemUserId>
    <UnreadMessageCount>0</UnreadMessageCount>
    <UserProducts>
      <SystemUserProductData>
        <ActionUrl>String</ActionUrl>
        <Attachments>
          <SystemUserProductAttachmentData>
            <FileName>String</FileName>
            <Id>0</Id>
            <IsImage>false</IsImage>
            <IsPdf>false</IsPdf>
            <IsVideo>false</IsVideo>
            <MainFileUrl>String</MainFileUrl>
            <ThumbnailUrl>String</ThumbnailUrl>
          </SystemUserProductAttachmentData>
        </Attachments>
        <DashImage>String</DashImage>
        <DescriptionAfr>String</DescriptionAfr>
        <DescriptionEng>String</DescriptionEng>
        <Enquired>false</Enquired>
        <IntegrationType>None</IntegrationType>
        <Name>String</Name>
        <NameAfrikaans>String</NameAfrikaans>
        <PanicId>0</PanicId>
        <ProductId>0</ProductId>
        <ShowOnDash>false</ShowOnDash>
        <SummaryAfr>String</SummaryAfr>
        <SummaryEng>String</SummaryEng>
        <UserHasProduct>false</UserHasProduct>
      </SystemUserProductData>
    </UserProducts>
  </Data>
  <MustSetPin>false</MustSetPin>
</ConfirmOtpResponse>