GalaxyMobile Client API

<back to all web services

UserLoginRequest

The following routes are available for this service:
POST/user/loginCheck that the user exists on Galaxy and set up their account and services.
import 'package:servicestack/servicestack.dart';

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

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

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

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

    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;
}

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 UserProductAttachmentData implements IConvertible
{
    String? FileName;
    String? MainFileUrl;
    String? ThumbnailUrl;
    bool? IsVideo;
    bool? IsImage;
    bool? IsPdf;

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

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

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

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

class UserProductData implements IConvertible
{
    IntegrationProviderType? IntegrationType;
    int? ProductId;
    String? Name;
    String? NameAfrikaans;
    String? DashImageUrl;
    String? ActionUrl;
    List<UserProductAttachmentData>? Attachments;
    String? DescriptionEng;
    String? SummaryEng;
    String? DescriptionAfr;
    String? SummaryAfr;

    UserProductData({this.IntegrationType,this.ProductId,this.Name,this.NameAfrikaans,this.DashImageUrl,this.ActionUrl,this.Attachments,this.DescriptionEng,this.SummaryEng,this.DescriptionAfr,this.SummaryAfr});
    UserProductData.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'];
        DashImageUrl = json['DashImageUrl'];
        ActionUrl = json['ActionUrl'];
        Attachments = JsonConverters.fromJson(json['Attachments'],'List<UserProductAttachmentData>',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,
        'DashImageUrl': DashImageUrl,
        'ActionUrl': ActionUrl,
        'Attachments': JsonConverters.toJson(Attachments,'List<UserProductAttachmentData>',context!),
        'DescriptionEng': DescriptionEng,
        'SummaryEng': SummaryEng,
        'DescriptionAfr': DescriptionAfr,
        'SummaryAfr': SummaryAfr
    };

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

class DependentData implements IConvertible
{
    /**
    * Dependent's Galaxy Id used for referring to or deleting.
    */
    // @ApiMember(Description="Dependent's Galaxy Id used for referring to or deleting.", IsRequired=true)
    int? DependentId;

    /**
    * Dependent's first name.
    */
    // @ApiMember(Description="Dependent's first name.", IsRequired=true)
    String? FirstName;

    /**
    * Dependent's surname.
    */
    // @ApiMember(Description="Dependent's surname.", IsRequired=true)
    String? Surname;

    /**
    * Dependent's mobile contact number.
    */
    // @ApiMember(Description="Dependent's mobile contact number.", IsRequired=true)
    String? MobileNumber;

    /**
    * Dependent's email address.
    */
    // @ApiMember(Description="Dependent's email address.", IsRequired=true)
    String? Email;

    /**
    * Depdendent's ID number.
    */
    // @ApiMember(Description="Depdendent's ID number.", IsRequired=true)
    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 UserLoginResponse extends ApiServiceResponse implements IConvertible
{
    /**
    * List of products the user has access to.
    */
    // @ApiMember(Description="List of products the user has access to.")
    List<UserProductData>? UserProductInformation;

    /**
    * List of all dependents linked to this user.
    */
    // @ApiMember(Description="List of all dependents linked to this user.")
    List<DependentData>? Dependents;

    UserLoginResponse({this.UserProductInformation,this.Dependents});
    UserLoginResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        UserProductInformation = JsonConverters.fromJson(json['UserProductInformation'],'List<UserProductData>',context!);
        Dependents = JsonConverters.fromJson(json['Dependents'],'List<DependentData>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'UserProductInformation': JsonConverters.toJson(UserProductInformation,'List<UserProductData>',context!),
        'Dependents': JsonConverters.toJson(Dependents,'List<DependentData>',context!)
    });

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

class UserLoginRequest extends ApiServiceRequest implements IConvertible
{
    /**
    * ID Number of the user to log in.
    */
    // @ApiMember(Description="ID Number of the user to log in.", IsRequired=true)
    String? IdNumber;

    UserLoginRequest({this.IdNumber});
    UserLoginRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

TypeContext _ctx = TypeContext(library: 'galaxymobile.api.client.prod.86degrees.com', types: <String, TypeInfo> {
    'ApiServiceRequest': TypeInfo(TypeOf.Class, create:() => ApiServiceRequest()),
    'ApiServiceResponse': TypeInfo(TypeOf.Class, create:() => ApiServiceResponse()),
    'IntegrationProviderType': TypeInfo(TypeOf.Enum, enumValues:IntegrationProviderType.values),
    'UserProductAttachmentData': TypeInfo(TypeOf.Class, create:() => UserProductAttachmentData()),
    'UserProductData': TypeInfo(TypeOf.Class, create:() => UserProductData()),
    'List<UserProductAttachmentData>': TypeInfo(TypeOf.Class, create:() => <UserProductAttachmentData>[]),
    'DependentData': TypeInfo(TypeOf.Class, create:() => DependentData()),
    'UserLoginResponse': TypeInfo(TypeOf.Class, create:() => UserLoginResponse()),
    'List<UserProductData>': TypeInfo(TypeOf.Class, create:() => <UserProductData>[]),
    'List<DependentData>': TypeInfo(TypeOf.Class, create:() => <DependentData>[]),
    'UserLoginRequest': TypeInfo(TypeOf.Class, create:() => UserLoginRequest()),
});

Dart UserLoginRequest 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 /user/login HTTP/1.1 
Host: galaxymobile.api.client.prod.86degrees.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<UserLoginRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebService.ClientServiceModel.User">
  <ApiKey xmlns="http://schemas.datacontract.org/2004/07/WebService.ClientServiceModel.Base">String</ApiKey>
  <IdNumber>String</IdNumber>
</UserLoginRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<UserLoginResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebService.ClientServiceModel.User">
  <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>
  <Dependents>
    <DependentData>
      <DependentId>0</DependentId>
      <Email>String</Email>
      <FirstName>String</FirstName>
      <IdNumber>String</IdNumber>
      <MobileNumber>String</MobileNumber>
      <Surname>String</Surname>
    </DependentData>
  </Dependents>
  <UserProductInformation>
    <UserProductData>
      <ActionUrl>String</ActionUrl>
      <Attachments>
        <UserProductAttachmentData>
          <FileName>String</FileName>
          <IsImage>false</IsImage>
          <IsPdf>false</IsPdf>
          <IsVideo>false</IsVideo>
          <MainFileUrl>String</MainFileUrl>
          <ThumbnailUrl>String</ThumbnailUrl>
        </UserProductAttachmentData>
      </Attachments>
      <DashImageUrl>String</DashImageUrl>
      <DescriptionAfr>String</DescriptionAfr>
      <DescriptionEng>String</DescriptionEng>
      <IntegrationType>None</IntegrationType>
      <Name>String</Name>
      <NameAfrikaans>String</NameAfrikaans>
      <ProductId>0</ProductId>
      <SummaryAfr>String</SummaryAfr>
      <SummaryEng>String</SummaryEng>
    </UserProductData>
  </UserProductInformation>
</UserLoginResponse>