Trendsic Platform Service

<back to all web services

ASAPReportRequest

Requires Authentication
Requires any of the roles:Agent, Administrator
The following routes are available for this service:
GET,OPTIONS/v1/ASAPReport/DateRange/{ParamStartDate}/{ParamEndDate}/{AgentID}
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class ASAPReport implements IConvertible
{
    DateTime? AdjustmentDate;
    String? ApptAgent;
    String? Reason;
    double? Amount;

    ASAPReport({this.AdjustmentDate,this.ApptAgent,this.Reason,this.Amount});
    ASAPReport.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        AdjustmentDate = JsonConverters.fromJson(json['AdjustmentDate'],'DateTime',context!);
        ApptAgent = json['ApptAgent'];
        Reason = json['Reason'];
        Amount = JsonConverters.toDouble(json['Amount']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'AdjustmentDate': JsonConverters.toJson(AdjustmentDate,'DateTime',context!),
        'ApptAgent': ApptAgent,
        'Reason': Reason,
        'Amount': Amount
    };

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

class ASAPReportResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    List<ASAPReport>? ASAPReport = [];

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

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

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

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

class ASAPReportRequest implements IConvertible
{
    List<ASAPReport>? ASAPReport = [];
    int? AgentID;
    DateTime? ParamStartDate;
    DateTime? ParamEndDate;

    ASAPReportRequest({this.ASAPReport,this.AgentID,this.ParamStartDate,this.ParamEndDate});
    ASAPReportRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ASAPReport = JsonConverters.fromJson(json['ASAPReport'],'List<ASAPReport>',context!);
        AgentID = json['AgentID'];
        ParamStartDate = JsonConverters.fromJson(json['ParamStartDate'],'DateTime',context!);
        ParamEndDate = JsonConverters.fromJson(json['ParamEndDate'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ASAPReport': JsonConverters.toJson(ASAPReport,'List<ASAPReport>',context!),
        'AgentID': AgentID,
        'ParamStartDate': JsonConverters.toJson(ParamStartDate,'DateTime',context!),
        'ParamEndDate': JsonConverters.toJson(ParamEndDate,'DateTime',context!)
    };

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

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

Dart ASAPReportRequest 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/ASAPReport/DateRange/{ParamStartDate}/{ParamEndDate}/{AgentID} 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"}},"ASAPReport":[{"AdjustmentDate":"0001-01-01T00:00:00.0000000","ApptAgent":"String","Reason":"String","Amount":0}]}