Richemont.Booster2.PublicApi

<back to all web services

GetPurchaseItems

Requires Authentication
The following routes are available for this service:
GET/purchaseItem/{brand}Get a list of purchase details
import 'package:servicestack/servicestack.dart';

class Amount implements IConvertible
{
    /**
    * Value
    */
    // @ApiMember(Description="Value", IsRequired=true)
    double? value;

    /**
    * Currency
    */
    // @ApiMember(Description="Currency", IsRequired=true)
    String? currency;

    Amount({this.value,this.currency});
    Amount.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        value = JsonConverters.toDouble(json['value']);
        currency = json['currency'];
        return this;
    }

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

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

class PurchaseItem implements IConvertible
{
    /**
    * Pos Code
    */
    // @ApiMember(Description="Pos Code", IsRequired=true)
    String? posCode;

    /**
    * Pos Code To Be Displayed
    */
    // @ApiMember(Description="Pos Code To Be Displayed", IsRequired=true)
    String? posCodeToBeDisplayed;

    /**
    * Erp Order Id
    */
    // @ApiMember(Description="Erp Order Id", IsRequired=true)
    int? erpOrderId;

    /**
    * Line number
    */
    // @ApiMember(Description="Line number", IsRequired=true)
    int? lineNumber;

    /**
    * Order Date
    */
    // @ApiMember(Description="Order Date", IsRequired=true)
    String? orderDate;

    /**
    * Origin Order Id
    */
    // @ApiMember(Description="Origin Order Id")
    int? originOrderId;

    /**
    * Article Code
    */
    // @ApiMember(Description="Article Code", IsRequired=true)
    String? articleCode;

    /**
    * Ordered Quantity
    */
    // @ApiMember(Description="Ordered Quantity", IsRequired=true)
    int? orderedQuantity;

    /**
    * Open Quantity
    */
    // @ApiMember(Description="Open Quantity", IsRequired=true)
    int? openQuantity;

    /**
    * Order status
    */
    // @ApiMember(Description="Order status", IsRequired=true)
    String? status;

    /**
    * Net Amount
    */
    // @ApiMember(Description="Net Amount", IsRequired=true)
    Amount? netAmount;

    /**
    * Customer Reference
    */
    // @ApiMember(Description="Customer Reference", IsRequired=true)
    String? customerReference;

    /**
    * Speaking Article Code
    */
    // @ApiMember(Description="Speaking Article Code", IsRequired=true)
    String? speakingArticleCode;

    /**
    * Expected Delivery Date
    */
    // @ApiMember(Description="Expected Delivery Date", IsRequired=true)
    String? expectedDeliveryDate;

    /**
    * Is Strap Vip Order
    */
    // @ApiMember(Description="Is Strap Vip Order", IsRequired=true)
    bool? isStrapVipOrder;

    /**
    * Order Type
    */
    // @ApiMember(Description="Order Type", IsRequired=true)
    String? orderType;

    PurchaseItem({this.posCode,this.posCodeToBeDisplayed,this.erpOrderId,this.lineNumber,this.orderDate,this.originOrderId,this.articleCode,this.orderedQuantity,this.openQuantity,this.status,this.netAmount,this.customerReference,this.speakingArticleCode,this.expectedDeliveryDate,this.isStrapVipOrder,this.orderType});
    PurchaseItem.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        posCode = json['posCode'];
        posCodeToBeDisplayed = json['posCodeToBeDisplayed'];
        erpOrderId = json['erpOrderId'];
        lineNumber = json['lineNumber'];
        orderDate = json['orderDate'];
        originOrderId = json['originOrderId'];
        articleCode = json['articleCode'];
        orderedQuantity = json['orderedQuantity'];
        openQuantity = json['openQuantity'];
        status = json['status'];
        netAmount = JsonConverters.fromJson(json['netAmount'],'Amount',context!);
        customerReference = json['customerReference'];
        speakingArticleCode = json['speakingArticleCode'];
        expectedDeliveryDate = json['expectedDeliveryDate'];
        isStrapVipOrder = json['isStrapVipOrder'];
        orderType = json['orderType'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'posCode': posCode,
        'posCodeToBeDisplayed': posCodeToBeDisplayed,
        'erpOrderId': erpOrderId,
        'lineNumber': lineNumber,
        'orderDate': orderDate,
        'originOrderId': originOrderId,
        'articleCode': articleCode,
        'orderedQuantity': orderedQuantity,
        'openQuantity': openQuantity,
        'status': status,
        'netAmount': JsonConverters.toJson(netAmount,'Amount',context!),
        'customerReference': customerReference,
        'speakingArticleCode': speakingArticleCode,
        'expectedDeliveryDate': expectedDeliveryDate,
        'isStrapVipOrder': isStrapVipOrder,
        'orderType': orderType
    };

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

class GetPurchaseItemsResponse implements IConvertible
{
    /**
    * Total Pages
    */
    // @ApiMember(Description="Total Pages", IsRequired=true)
    int? totalPages;

    /**
    * Total Results
    */
    // @ApiMember(Description="Total Results", IsRequired=true)
    int? totalResults;

    /**
    * Index of the result set returned
    */
    // @ApiMember(Description="Index of the result set returned", IsRequired=true)
    int? page;

    /**
    * Size of the result set returned
    */
    // @ApiMember(Description="Size of the result set returned", IsRequired=true)
    int? items;

    /**
    * List of purchase items
    */
    // @ApiMember(Description="List of purchase items", IsRequired=true)
    List<PurchaseItem>? elements;

    GetPurchaseItemsResponse({this.totalPages,this.totalResults,this.page,this.items,this.elements});
    GetPurchaseItemsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        totalPages = json['totalPages'];
        totalResults = json['totalResults'];
        page = json['page'];
        items = json['items'];
        elements = JsonConverters.fromJson(json['elements'],'List<PurchaseItem>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'totalPages': totalPages,
        'totalResults': totalResults,
        'page': page,
        'items': items,
        'elements': JsonConverters.toJson(elements,'List<PurchaseItem>',context!)
    };

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

class GetPurchaseItems implements IPagedRequest, IConvertible
{
    /**
    * Brand
    */
    // @ApiMember(Description="Brand", IsRequired=true)
    String? brand;

    /**
    * POS Legacy
    */
    // @ApiMember(Description="POS Legacy", IsRequired=true)
    List<String>? posCodes;

    /**
    * Article Codes
    */
    // @ApiMember(Description="Article Codes")
    List<String>? articleCodes;

    /**
    * ERP Order Codes
    */
    // @ApiMember(Description="ERP Order Codes")
    List<String>? erpOrderCodes;

    /**
    * Index of the result set returned
    */
    // @ApiMember(Description="Index of the result set returned")
    int? page;

    /**
    * Size of the result set returned
    */
    // @ApiMember(Description="Size of the result set returned")
    int? items;

    /**
    * Omit precise record count - save on performance
    */
    // @ApiMember(Description="Omit precise record count - save on performance")
    bool? noCount;

    /**
    * Sorting expression
    */
    // @ApiMember(Description="Sorting expression")
    String? sortBy;

    GetPurchaseItems({this.brand,this.posCodes,this.articleCodes,this.erpOrderCodes,this.page,this.items,this.noCount,this.sortBy});
    GetPurchaseItems.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        brand = json['brand'];
        posCodes = JsonConverters.fromJson(json['posCodes'],'List<String>',context!);
        articleCodes = JsonConverters.fromJson(json['articleCodes'],'List<String>',context!);
        erpOrderCodes = JsonConverters.fromJson(json['erpOrderCodes'],'List<String>',context!);
        page = json['page'];
        items = json['items'];
        noCount = json['noCount'];
        sortBy = json['sortBy'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'brand': brand,
        'posCodes': JsonConverters.toJson(posCodes,'List<String>',context!),
        'articleCodes': JsonConverters.toJson(articleCodes,'List<String>',context!),
        'erpOrderCodes': JsonConverters.toJson(erpOrderCodes,'List<String>',context!),
        'page': page,
        'items': items,
        'noCount': noCount,
        'sortBy': sortBy
    };

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

TypeContext _ctx = TypeContext(library: 'dev_api_booster.richemont.com', types: <String, TypeInfo> {
    'Amount': TypeInfo(TypeOf.Class, create:() => Amount()),
    'PurchaseItem': TypeInfo(TypeOf.Class, create:() => PurchaseItem()),
    'GetPurchaseItemsResponse': TypeInfo(TypeOf.Class, create:() => GetPurchaseItemsResponse()),
    'List<PurchaseItem>': TypeInfo(TypeOf.Class, create:() => <PurchaseItem>[]),
    'GetPurchaseItems': TypeInfo(TypeOf.Class, create:() => GetPurchaseItems()),
});

Dart GetPurchaseItems DTOs

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

HTTP + CSV

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

GET /purchaseItem/{brand} HTTP/1.1 
Host: dev-api-booster.richemont.com 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"totalPages":0,"totalResults":0,"page":0,"items":0}