GalaxyMobile App API

<back to all web services

PulsitModuleTripHistoryRequest

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

class PulsitTripHistoryItem implements IConvertible
{
    String? TripNumber;
    String? StartPulsitId;
    DateTime? StartEventTimeValue;
    String? StartEventTime;
    double? StartLatitude;
    double? StartLongitude;
    String? StartAddress;
    String? StopPulsitId;
    String? StopEventTime;
    double? StopLatitude;
    double? StopLongitude;
    String? StopAddress;
    double? TripMinutes;

    PulsitTripHistoryItem({this.TripNumber,this.StartPulsitId,this.StartEventTimeValue,this.StartEventTime,this.StartLatitude,this.StartLongitude,this.StartAddress,this.StopPulsitId,this.StopEventTime,this.StopLatitude,this.StopLongitude,this.StopAddress,this.TripMinutes});
    PulsitTripHistoryItem.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        TripNumber = json['TripNumber'];
        StartPulsitId = json['StartPulsitId'];
        StartEventTimeValue = JsonConverters.fromJson(json['StartEventTimeValue'],'DateTime',context!);
        StartEventTime = json['StartEventTime'];
        StartLatitude = JsonConverters.toDouble(json['StartLatitude']);
        StartLongitude = JsonConverters.toDouble(json['StartLongitude']);
        StartAddress = json['StartAddress'];
        StopPulsitId = json['StopPulsitId'];
        StopEventTime = json['StopEventTime'];
        StopLatitude = JsonConverters.toDouble(json['StopLatitude']);
        StopLongitude = JsonConverters.toDouble(json['StopLongitude']);
        StopAddress = json['StopAddress'];
        TripMinutes = JsonConverters.toDouble(json['TripMinutes']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'TripNumber': TripNumber,
        'StartPulsitId': StartPulsitId,
        'StartEventTimeValue': JsonConverters.toJson(StartEventTimeValue,'DateTime',context!),
        'StartEventTime': StartEventTime,
        'StartLatitude': StartLatitude,
        'StartLongitude': StartLongitude,
        'StartAddress': StartAddress,
        'StopPulsitId': StopPulsitId,
        'StopEventTime': StopEventTime,
        'StopLatitude': StopLatitude,
        'StopLongitude': StopLongitude,
        'StopAddress': StopAddress,
        'TripMinutes': TripMinutes
    };

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

class PulsitModuleTripHistoryResponse extends ApiServiceResponse implements IConvertible
{
    List<PulsitTripHistoryItem>? Trips;

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

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

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'Trips': JsonConverters.toJson(Trips,'List<PulsitTripHistoryItem>',context!)
    });

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

class PulsitModuleTripHistoryRequest extends ApiServiceRequest implements IConvertible
{
    String? PulsitModuleId;
    String? StartDate;
    String? EndDate;

    PulsitModuleTripHistoryRequest({this.PulsitModuleId,this.StartDate,this.EndDate});
    PulsitModuleTripHistoryRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

    getTypeName() => "PulsitModuleTripHistoryRequest";
    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()),
    'PulsitTripHistoryItem': TypeInfo(TypeOf.Class, create:() => PulsitTripHistoryItem()),
    'PulsitModuleTripHistoryResponse': TypeInfo(TypeOf.Class, create:() => PulsitModuleTripHistoryResponse()),
    'List<PulsitTripHistoryItem>': TypeInfo(TypeOf.Class, create:() => <PulsitTripHistoryItem>[]),
    'PulsitModuleTripHistoryRequest': TypeInfo(TypeOf.Class, create:() => PulsitModuleTripHistoryRequest()),
});

Dart PulsitModuleTripHistoryRequest 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/PulsitModuleTripHistoryRequest HTTP/1.1 
Host: galaxymobile.api.dev.86degrees.com 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"PulsitModuleId":"String","StartDate":"String","EndDate":"String","ApiKey":"String","Latitude":0,"Longitude":0}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Trips":[{"TripNumber":"String","StartPulsitId":"String","StartEventTimeValue":"0001-01-01T00:00:00.0000000","StartEventTime":"String","StartLatitude":0,"StartLongitude":0,"StartAddress":"String","StopPulsitId":"String","StopEventTime":"String","StopLatitude":0,"StopLongitude":0,"StopAddress":"String","TripMinutes":0}],"Description":"String","Heading":"String","WasSuccessful":false,"ModelState":{}}