DX STF Client API

<back to all web services

SearchClaim

Claim Requests

Claim

Requires Authentication
The following routes are available for this service:
POST/api/claim/searchSearch for claims based on parameters
import 'package:servicestack/servicestack.dart';

class _Buyer implements IBuyer, IConvertible
{
    String gln = "";

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

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

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

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

class _ClaimNotification implements IClaimNotification, IConvertible
{
    String entityIdentification = "";

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

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

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

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

class _Invoice implements IInvoice, IConvertible
{
    String entityIdentification = "";

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

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

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

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

class SearchClaimQuery implements IConvertible
{
    String receiverGln = "";
    DateTime fromDate = DateTime(0);
    DateTime toDate = DateTime(0);
    String claimsNotificationTypeCode = "";
    String claimsNotificationIdentification = "";
    _Buyer buyer;
    _ClaimNotification claimNotification;
    _Invoice invoice;
    bool excludeLinkedToCreditNote;
    String senderGln = "";
    List<String> partnerGln = [];
    int requestedPage = 0;
    int numberOfRecordsPerPage = 0;

    SearchClaimQuery({this.receiverGln,this.fromDate,this.toDate,this.claimsNotificationTypeCode,this.claimsNotificationIdentification,this.buyer,this.claimNotification,this.invoice,this.excludeLinkedToCreditNote,this.senderGln,this.partnerGln,this.requestedPage,this.numberOfRecordsPerPage});
    SearchClaimQuery.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        receiverGln = json['receiverGln'];
        fromDate = JsonConverters.fromJson(json['fromDate'],'DateTime',context!);
        toDate = JsonConverters.fromJson(json['toDate'],'DateTime',context!);
        claimsNotificationTypeCode = json['claimsNotificationTypeCode'];
        claimsNotificationIdentification = json['claimsNotificationIdentification'];
        buyer = JsonConverters.fromJson(json['buyer'],'_Buyer',context!);
        claimNotification = JsonConverters.fromJson(json['claimNotification'],'_ClaimNotification',context!);
        invoice = JsonConverters.fromJson(json['invoice'],'_Invoice',context!);
        excludeLinkedToCreditNote = json['excludeLinkedToCreditNote'];
        senderGln = json['senderGln'];
        partnerGln = JsonConverters.fromJson(json['partnerGln'],'List<String>',context!);
        requestedPage = json['requestedPage'];
        numberOfRecordsPerPage = json['numberOfRecordsPerPage'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'receiverGln': receiverGln,
        'fromDate': JsonConverters.toJson(fromDate,'DateTime',context!),
        'toDate': JsonConverters.toJson(toDate,'DateTime',context!),
        'claimsNotificationTypeCode': claimsNotificationTypeCode,
        'claimsNotificationIdentification': claimsNotificationIdentification,
        'buyer': JsonConverters.toJson(buyer,'_Buyer',context!),
        'claimNotification': JsonConverters.toJson(claimNotification,'_ClaimNotification',context!),
        'invoice': JsonConverters.toJson(invoice,'_Invoice',context!),
        'excludeLinkedToCreditNote': excludeLinkedToCreditNote,
        'senderGln': senderGln,
        'partnerGln': JsonConverters.toJson(partnerGln,'List<String>',context!),
        'requestedPage': requestedPage,
        'numberOfRecordsPerPage': numberOfRecordsPerPage
    };

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

/**
* Claim
*/
// @Api(Description="Claim")
// @ApiResponse(Description="Claim search results", StatusCode=200)
class SearchClaim implements IConvertible
{
    // @ApiMember(ParameterType="model")
    SearchClaimQuery query;

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

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

    Map<String, dynamic> toJson() => {
        'query': JsonConverters.toJson(query,'SearchClaimQuery',context!)
    };

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

class PagedQueryResult<T> implements IConvertible
{
    int startIndex = 0;
    int endIndex = 0;
    int numberOfRecordsReturned = 0;
    int totalNumberOfPages = 0;
    int totalNumberOfRecords = 0;
    List<ResultItem<ClaimMessage>> results = [];

    PagedQueryResult({this.startIndex,this.endIndex,this.numberOfRecordsReturned,this.totalNumberOfPages,this.totalNumberOfRecords,this.results});
    PagedQueryResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        startIndex = json['startIndex'];
        endIndex = json['endIndex'];
        numberOfRecordsReturned = json['numberOfRecordsReturned'];
        totalNumberOfPages = json['totalNumberOfPages'];
        totalNumberOfRecords = json['totalNumberOfRecords'];
        results = JsonConverters.fromJson(json['results'],'List<ResultItem<ClaimMessage>>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'startIndex': startIndex,
        'endIndex': endIndex,
        'numberOfRecordsReturned': numberOfRecordsReturned,
        'totalNumberOfPages': totalNumberOfPages,
        'totalNumberOfRecords': totalNumberOfRecords,
        'results': JsonConverters.toJson(results,'List<ResultItem<ClaimMessage>>',context!)
    };

    getTypeName() => "PagedQueryResult<$T>";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'stf_api_uat.data_xchange.co.za', types: <String, TypeInfo> {
    '_Buyer': TypeInfo(TypeOf.Class, create:() => _Buyer()),
    '_ClaimNotification': TypeInfo(TypeOf.Class, create:() => _ClaimNotification()),
    '_Invoice': TypeInfo(TypeOf.Class, create:() => _Invoice()),
    'SearchClaimQuery': TypeInfo(TypeOf.Class, create:() => SearchClaimQuery()),
    'SearchClaim': TypeInfo(TypeOf.Class, create:() => SearchClaim()),
    'PagedQueryResult<T>': TypeInfo(TypeOf.Class, create:() => PagedQueryResult<T>()),
    'List<ResultItem<ClaimMessage>>': TypeInfo(TypeOf.Class, create:() => <ResultItem<ClaimMessage>>[]),
    'ResultItem<ClaimMessage>': TypeInfo(TypeOf.Class, create:() => ResultItem<ClaimMessage>()),
    'ClaimMessage': TypeInfo(TypeOf.Class, create:() => ClaimMessage()),
});

Dart SearchClaim 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 /api/claim/search HTTP/1.1 
Host: stf-api-uat.data-xchange.co.za 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"query":{"receiverGln":"String","claimsNotificationTypeCode":"String","claimsNotificationIdentification":"String","buyer":{"gln":"String"},"claimNotification":{"entityIdentification":"String"},"invoice":{"entityIdentification":"String"},"excludeLinkedToCreditNote":false,"senderGln":"String","partnerGln":["String"],"requestedPage":0,"numberOfRecordsPerPage":0}}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"startIndex":0,"endIndex":0,"numberOfRecordsReturned":0,"totalNumberOfPages":0,"totalNumberOfRecords":0,"results":[{}]}