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 .csv suffix or ?format=csv

HTTP + CSV

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

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

{"SystemUserId":0,"Otp":"String","UtcOffset":0,"ApiKey":"String","Latitude":0,"Longitude":0}
HTTP/1.1 200 OK
Content-Type: text/csv
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":{}}