Trendsic Platform Service

<back to all web services

QboSyncOrdersRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/qbo/sync-orders
import 'package:servicestack/servicestack.dart';

class QboSyncResult implements IConvertible
{
    String? InvoiceUID;
    String? InvoiceNumber;
    bool? Success;
    String? QboId;
    String? Message;

    QboSyncResult({this.InvoiceUID,this.InvoiceNumber,this.Success,this.QboId,this.Message});
    QboSyncResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        InvoiceUID = json['InvoiceUID'];
        InvoiceNumber = json['InvoiceNumber'];
        Success = json['Success'];
        QboId = json['QboId'];
        Message = json['Message'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'InvoiceUID': InvoiceUID,
        'InvoiceNumber': InvoiceNumber,
        'Success': Success,
        'QboId': QboId,
        'Message': Message
    };

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

class QboSyncResponse implements IConvertible
{
    int? Synced;
    int? Failed;
    List<QboSyncResult>? Results = [];
    ResponseStatus? ResponseStatus;

    QboSyncResponse({this.Synced,this.Failed,this.Results,this.ResponseStatus});
    QboSyncResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class QboSyncOrdersRequest implements IConvertible
{
    List<int>? OrderIds = [];

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

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

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

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

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

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

POST /v1/qbo/sync-orders HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"OrderIds":[0]}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"Synced":0,"Failed":0,"Results":[{"InvoiceUID":"00000000000000000000000000000000","InvoiceNumber":"String","Success":false,"QboId":"String","Message":"String"}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}