Antel API

<back to all web services

SealDetailsRequest

Requires Authentication
The following routes are available for this service:
POST/stock/seal/details
import 'package:servicestack/servicestack.dart';

class ApiServiceRequest implements IServiceRequest, IHasApiKey, IHasDeviceInfo, 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
{
    /**
    * Information about the response.
    */
    // @ApiMember(Description="Information about the response.", IsRequired=true)
    String? description;

    /**
    * Heading or summary of the response.
    */
    // @ApiMember(Description="Heading or summary of the response.", IsRequired=true)
    String? heading;

    /**
    * Did the intended operation for this response complete successfully?
    */
    // @ApiMember(DataType="boolean", Description="Did the intended operation for this response complete successfully?", IsRequired=true)
    bool? wasSuccessful;

    ResponseStatus? responseStatus;

    ApiServiceResponse({this.description,this.heading,this.wasSuccessful,this.responseStatus});
    ApiServiceResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        description = json['description'];
        heading = json['heading'];
        wasSuccessful = json['wasSuccessful'];
        responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'description': description,
        'heading': heading,
        'wasSuccessful': wasSuccessful,
        'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
    };

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

class FileDataItem implements IConvertible
{
    String? fileName;
    String? fileUrl;
    String? thumbnailUrl;
    String? fileId;
    String? thumbnailId;
    int? linkId;
    DateTime? createdDate;

    FileDataItem({this.fileName,this.fileUrl,this.thumbnailUrl,this.fileId,this.thumbnailId,this.linkId,this.createdDate});
    FileDataItem.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        fileName = json['fileName'];
        fileUrl = json['fileUrl'];
        thumbnailUrl = json['thumbnailUrl'];
        fileId = json['fileId'];
        thumbnailId = json['thumbnailId'];
        linkId = json['linkId'];
        createdDate = JsonConverters.fromJson(json['createdDate'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'fileName': fileName,
        'fileUrl': fileUrl,
        'thumbnailUrl': thumbnailUrl,
        'fileId': fileId,
        'thumbnailId': thumbnailId,
        'linkId': linkId,
        'createdDate': JsonConverters.toJson(createdDate,'DateTime',context!)
    };

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

class SealOrderHistoryItem implements IConvertible
{
    String? createdDate;
    int? orderId;
    String? orderNumber;
    String? orderRequestingOperator;

    SealOrderHistoryItem({this.createdDate,this.orderId,this.orderNumber,this.orderRequestingOperator});
    SealOrderHistoryItem.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        createdDate = json['createdDate'];
        orderId = json['orderId'];
        orderNumber = json['orderNumber'];
        orderRequestingOperator = json['orderRequestingOperator'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'createdDate': createdDate,
        'orderId': orderId,
        'orderNumber': orderNumber,
        'orderRequestingOperator': orderRequestingOperator
    };

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

class SealMovementHistoryItem implements IConvertible
{
    int? id;
    String? eventDateTime;
    String? actionUserName;
    String? scannedDepotName;
    String? assignedBucketName;
    String? assignedOrderNumber;
    String? assignedOperatorName;
    String? orderDriverName;
    String? orderDriverCompanyName;
    String? orderDriverLicensePlate;
    double? targetWeight;
    double? currentWeight;
    bool? hadWeightIssue;
    bool? hadUnknownUplift;
    bool? wasPaused;
    bool? pausedWasAwaitingAuth;

    SealMovementHistoryItem({this.id,this.eventDateTime,this.actionUserName,this.scannedDepotName,this.assignedBucketName,this.assignedOrderNumber,this.assignedOperatorName,this.orderDriverName,this.orderDriverCompanyName,this.orderDriverLicensePlate,this.targetWeight,this.currentWeight,this.hadWeightIssue,this.hadUnknownUplift,this.wasPaused,this.pausedWasAwaitingAuth});
    SealMovementHistoryItem.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        eventDateTime = json['eventDateTime'];
        actionUserName = json['actionUserName'];
        scannedDepotName = json['scannedDepotName'];
        assignedBucketName = json['assignedBucketName'];
        assignedOrderNumber = json['assignedOrderNumber'];
        assignedOperatorName = json['assignedOperatorName'];
        orderDriverName = json['orderDriverName'];
        orderDriverCompanyName = json['orderDriverCompanyName'];
        orderDriverLicensePlate = json['orderDriverLicensePlate'];
        targetWeight = JsonConverters.toDouble(json['targetWeight']);
        currentWeight = JsonConverters.toDouble(json['currentWeight']);
        hadWeightIssue = json['hadWeightIssue'];
        hadUnknownUplift = json['hadUnknownUplift'];
        wasPaused = json['wasPaused'];
        pausedWasAwaitingAuth = json['pausedWasAwaitingAuth'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'eventDateTime': eventDateTime,
        'actionUserName': actionUserName,
        'scannedDepotName': scannedDepotName,
        'assignedBucketName': assignedBucketName,
        'assignedOrderNumber': assignedOrderNumber,
        'assignedOperatorName': assignedOperatorName,
        'orderDriverName': orderDriverName,
        'orderDriverCompanyName': orderDriverCompanyName,
        'orderDriverLicensePlate': orderDriverLicensePlate,
        'targetWeight': targetWeight,
        'currentWeight': currentWeight,
        'hadWeightIssue': hadWeightIssue,
        'hadUnknownUplift': hadUnknownUplift,
        'wasPaused': wasPaused,
        'pausedWasAwaitingAuth': pausedWasAwaitingAuth
    };

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

class SealDetailsResponse extends ApiServiceResponse implements IConvertible
{
    String? principalName;
    String? upliftNumber;
    String? operatorName;
    String? outletName;
    String? upliftDate;
    String? sealNumber;
    String? currentWeight;
    String? targetWeight;
    bool? hasWeightIssue;
    String? bucketName;
    List<String>? claimNumbers;
    String? joinedClaimNumbers;
    List<FileDataItem>? sealImages;
    List<SealOrderHistoryItem>? orderHistory;
    List<SealMovementHistoryItem>? movementHistory;

    SealDetailsResponse({this.principalName,this.upliftNumber,this.operatorName,this.outletName,this.upliftDate,this.sealNumber,this.currentWeight,this.targetWeight,this.hasWeightIssue,this.bucketName,this.claimNumbers,this.joinedClaimNumbers,this.sealImages,this.orderHistory,this.movementHistory});
    SealDetailsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        principalName = json['principalName'];
        upliftNumber = json['upliftNumber'];
        operatorName = json['operatorName'];
        outletName = json['outletName'];
        upliftDate = json['upliftDate'];
        sealNumber = json['sealNumber'];
        currentWeight = json['currentWeight'];
        targetWeight = json['targetWeight'];
        hasWeightIssue = json['hasWeightIssue'];
        bucketName = json['bucketName'];
        claimNumbers = JsonConverters.fromJson(json['claimNumbers'],'List<String>',context!);
        joinedClaimNumbers = json['joinedClaimNumbers'];
        sealImages = JsonConverters.fromJson(json['sealImages'],'List<FileDataItem>',context!);
        orderHistory = JsonConverters.fromJson(json['orderHistory'],'List<SealOrderHistoryItem>',context!);
        movementHistory = JsonConverters.fromJson(json['movementHistory'],'List<SealMovementHistoryItem>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'principalName': principalName,
        'upliftNumber': upliftNumber,
        'operatorName': operatorName,
        'outletName': outletName,
        'upliftDate': upliftDate,
        'sealNumber': sealNumber,
        'currentWeight': currentWeight,
        'targetWeight': targetWeight,
        'hasWeightIssue': hasWeightIssue,
        'bucketName': bucketName,
        'claimNumbers': JsonConverters.toJson(claimNumbers,'List<String>',context!),
        'joinedClaimNumbers': joinedClaimNumbers,
        'sealImages': JsonConverters.toJson(sealImages,'List<FileDataItem>',context!),
        'orderHistory': JsonConverters.toJson(orderHistory,'List<SealOrderHistoryItem>',context!),
        'movementHistory': JsonConverters.toJson(movementHistory,'List<SealMovementHistoryItem>',context!)
    });

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

class SealDetailsRequest extends ApiServiceRequest implements IConvertible
{
    int? sealId;

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

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

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

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

TypeContext _ctx = TypeContext(library: 'antel.api.dev.86degrees.com', types: <String, TypeInfo> {
    'ApiServiceRequest': TypeInfo(TypeOf.Class, create:() => ApiServiceRequest()),
    'ApiServiceResponse': TypeInfo(TypeOf.Class, create:() => ApiServiceResponse()),
    'FileDataItem': TypeInfo(TypeOf.Class, create:() => FileDataItem()),
    'SealOrderHistoryItem': TypeInfo(TypeOf.Class, create:() => SealOrderHistoryItem()),
    'SealMovementHistoryItem': TypeInfo(TypeOf.Class, create:() => SealMovementHistoryItem()),
    'SealDetailsResponse': TypeInfo(TypeOf.Class, create:() => SealDetailsResponse()),
    'List<FileDataItem>': TypeInfo(TypeOf.Class, create:() => <FileDataItem>[]),
    'List<SealOrderHistoryItem>': TypeInfo(TypeOf.Class, create:() => <SealOrderHistoryItem>[]),
    'List<SealMovementHistoryItem>': TypeInfo(TypeOf.Class, create:() => <SealMovementHistoryItem>[]),
    'SealDetailsRequest': TypeInfo(TypeOf.Class, create:() => SealDetailsRequest()),
});

Dart SealDetailsRequest DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

POST /stock/seal/details HTTP/1.1 
Host: antel.api.dev.86degrees.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"sealId":0,"apiKey":"String","latitude":0,"longitude":0}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"principalName":"String","upliftNumber":"String","operatorName":"String","outletName":"String","upliftDate":"String","sealNumber":"String","currentWeight":"String","targetWeight":"String","hasWeightIssue":false,"bucketName":"String","claimNumbers":["String"],"joinedClaimNumbers":"String","sealImages":[{"fileName":"String","fileUrl":"String","thumbnailUrl":"String","linkId":0,"createdDate":"0001-01-01T00:00:00.0000000"}],"orderHistory":[{"createdDate":"String","orderId":0,"orderNumber":"String","orderRequestingOperator":"String"}],"movementHistory":[{"id":0,"eventDateTime":"String","actionUserName":"String","scannedDepotName":"String","assignedBucketName":"String","assignedOrderNumber":"String","assignedOperatorName":"String","orderDriverName":"String","orderDriverCompanyName":"String","orderDriverLicensePlate":"String","targetWeight":0,"currentWeight":0,"hadWeightIssue":false,"hadUnknownUplift":false,"wasPaused":false,"pausedWasAwaitingAuth":false}],"description":"String","heading":"String","wasSuccessful":false,"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}