Trendsic Platform Service

<back to all web services

InvoiceWorkChangesRequest

Requires Authentication
Requires any of the roles:Agent, Administrator
The following routes are available for this service:
GET,OPTIONS/v1/invoice/workchanges/{ProjectUID}
import 'package:servicestack/servicestack.dart';

class InvoiceWorkChange implements IConvertible
{
    String? SourceType;
    int? SourceID;
    int? JobID;
    DateTime? WorkDate;
    String? WorkDay;
    String? DisplayDay;
    String? Label;
    String? JobName;
    DateTime? DisplayDate;
    String? Unit;
    double? Billed;
    double? NowQuantity;
    double? OverBilled;
    double? UnitFactor;
    double? Price;
    double? Amount;
    String? LineType;
    bool? IsTaxable;
    int? InvoiceID;
    String? InvoiceUID;
    String? InvoiceNumber;
    double? InvoiceTotal;
    bool? InvoiceIsLocked;
    bool? InvoiceIsPaid;
    String? State;
    String? Remembered;
    String? DecidedByName;
    DateTime? DecidedAt;

    InvoiceWorkChange({this.SourceType,this.SourceID,this.JobID,this.WorkDate,this.WorkDay,this.DisplayDay,this.Label,this.JobName,this.DisplayDate,this.Unit,this.Billed,this.NowQuantity,this.OverBilled,this.UnitFactor,this.Price,this.Amount,this.LineType,this.IsTaxable,this.InvoiceID,this.InvoiceUID,this.InvoiceNumber,this.InvoiceTotal,this.InvoiceIsLocked,this.InvoiceIsPaid,this.State,this.Remembered,this.DecidedByName,this.DecidedAt});
    InvoiceWorkChange.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        SourceType = json['SourceType'];
        SourceID = json['SourceID'];
        JobID = json['JobID'];
        WorkDate = JsonConverters.fromJson(json['WorkDate'],'DateTime',context!);
        WorkDay = json['WorkDay'];
        DisplayDay = json['DisplayDay'];
        Label = json['Label'];
        JobName = json['JobName'];
        DisplayDate = JsonConverters.fromJson(json['DisplayDate'],'DateTime',context!);
        Unit = json['Unit'];
        Billed = JsonConverters.toDouble(json['Billed']);
        NowQuantity = JsonConverters.toDouble(json['NowQuantity']);
        OverBilled = JsonConverters.toDouble(json['OverBilled']);
        UnitFactor = JsonConverters.toDouble(json['UnitFactor']);
        Price = JsonConverters.toDouble(json['Price']);
        Amount = JsonConverters.toDouble(json['Amount']);
        LineType = json['LineType'];
        IsTaxable = json['IsTaxable'];
        InvoiceID = json['InvoiceID'];
        InvoiceUID = json['InvoiceUID'];
        InvoiceNumber = json['InvoiceNumber'];
        InvoiceTotal = JsonConverters.toDouble(json['InvoiceTotal']);
        InvoiceIsLocked = json['InvoiceIsLocked'];
        InvoiceIsPaid = json['InvoiceIsPaid'];
        State = json['State'];
        Remembered = json['Remembered'];
        DecidedByName = json['DecidedByName'];
        DecidedAt = JsonConverters.fromJson(json['DecidedAt'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'SourceType': SourceType,
        'SourceID': SourceID,
        'JobID': JobID,
        'WorkDate': JsonConverters.toJson(WorkDate,'DateTime',context!),
        'WorkDay': WorkDay,
        'DisplayDay': DisplayDay,
        'Label': Label,
        'JobName': JobName,
        'DisplayDate': JsonConverters.toJson(DisplayDate,'DateTime',context!),
        'Unit': Unit,
        'Billed': Billed,
        'NowQuantity': NowQuantity,
        'OverBilled': OverBilled,
        'UnitFactor': UnitFactor,
        'Price': Price,
        'Amount': Amount,
        'LineType': LineType,
        'IsTaxable': IsTaxable,
        'InvoiceID': InvoiceID,
        'InvoiceUID': InvoiceUID,
        'InvoiceNumber': InvoiceNumber,
        'InvoiceTotal': InvoiceTotal,
        'InvoiceIsLocked': InvoiceIsLocked,
        'InvoiceIsPaid': InvoiceIsPaid,
        'State': State,
        'Remembered': Remembered,
        'DecidedByName': DecidedByName,
        'DecidedAt': JsonConverters.toJson(DecidedAt,'DateTime',context!)
    };

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

class InvoiceWorkChangesResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    bool? Success;
    List<InvoiceWorkChange>? Changes = [];

    InvoiceWorkChangesResponse({this.ResponseStatus,this.Success,this.Changes});
    InvoiceWorkChangesResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class InvoiceWorkChangesRequest implements IConvertible
{
    String? ProjectUID;
    int? InvoiceID;

    InvoiceWorkChangesRequest({this.ProjectUID,this.InvoiceID});
    InvoiceWorkChangesRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

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

Dart InvoiceWorkChangesRequest DTOs

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

HTTP + OTHER

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

GET /v1/invoice/workchanges/{ProjectUID} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Success":false,"Changes":[{"SourceType":"String","SourceID":0,"JobID":0,"WorkDate":"0001-01-01T00:00:00.0000000","WorkDay":"String","DisplayDay":"String","Label":"String","JobName":"String","DisplayDate":"0001-01-01T00:00:00.0000000","Unit":"String","Billed":0,"NowQuantity":0,"OverBilled":0,"UnitFactor":0,"Price":0,"Amount":0,"LineType":"String","IsTaxable":false,"InvoiceID":0,"InvoiceUID":"00000000000000000000000000000000","InvoiceNumber":"String","InvoiceTotal":0,"InvoiceIsLocked":false,"InvoiceIsPaid":false,"State":"String","Remembered":"String","DecidedByName":"String","DecidedAt":"0001-01-01T00:00:00.0000000"}]}