Trendsic Platform Service

<back to all web services

WorkerDayGearRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/worker/gear
import 'package:servicestack/servicestack.dart';

class WorkerGearItem implements IConvertible
{
    String? Kind;
    String? Name;
    int? Qty;

    WorkerGearItem({this.Kind,this.Name,this.Qty});
    WorkerGearItem.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'Kind': Kind,
        'Name': Name,
        'Qty': Qty
    };

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

class WorkerGearResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    List<WorkerGearItem>? Items = [];

    WorkerGearResponse({this.ResponseStatus,this.Items});
    WorkerGearResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
        'Items': JsonConverters.toJson(Items,'List<WorkerGearItem>',context!)
    };

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

class WorkerDayGearRequest implements IConvertible
{
    String? Date;

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

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

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

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

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'WorkerGearItem': TypeInfo(TypeOf.Class, create:() => WorkerGearItem()),
    'WorkerGearResponse': TypeInfo(TypeOf.Class, create:() => WorkerGearResponse()),
    'List<WorkerGearItem>': TypeInfo(TypeOf.Class, create:() => <WorkerGearItem>[]),
    'WorkerDayGearRequest': TypeInfo(TypeOf.Class, create:() => WorkerDayGearRequest()),
});

Dart WorkerDayGearRequest 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.

GET /v1/worker/gear HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Items":[{"Kind":"String","Name":"String","Qty":0}]}