Richemont.Booster2.PublicApi

<back to all web services

ExportOrder

Requires Authentication
The following routes are available for this service:
POST/purchase/{brand}/exportExport Order Data
import 'package:servicestack/servicestack.dart';

class ExportOrderResponse implements IConvertible
{
    /**
    * Unique Identifier of the Export Request created
    */
    // @ApiMember(Description="Unique Identifier of the Export Request created", IsRequired=true)
    String? asyncTaskId;

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

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

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

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

class ProductCategory implements IConvertible
{
    /**
    * Brand Category ID
    */
    // @ApiMember(Description="Brand Category ID")
    String? brandCategoryId;

    /**
    * Grand Category ID
    */
    // @ApiMember(Description="Grand Category ID", IsRequired=true)
    String? grandCategoryId;

    /**
    * Master Category ID
    */
    // @ApiMember(Description="Master Category ID")
    String? masterCategoryId;

    /**
    * Category ID
    */
    // @ApiMember(Description="Category ID")
    String? categoryId;

    /**
    * Sub Category ID
    */
    // @ApiMember(Description="Sub Category ID")
    String? subCategoryId;

    ProductCategory({this.brandCategoryId,this.grandCategoryId,this.masterCategoryId,this.categoryId,this.subCategoryId});
    ProductCategory.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        brandCategoryId = json['brandCategoryId'];
        grandCategoryId = json['grandCategoryId'];
        masterCategoryId = json['masterCategoryId'];
        categoryId = json['categoryId'];
        subCategoryId = json['subCategoryId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'brandCategoryId': brandCategoryId,
        'grandCategoryId': grandCategoryId,
        'masterCategoryId': masterCategoryId,
        'categoryId': categoryId,
        'subCategoryId': subCategoryId
    };

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

class ExportOrder implements IConvertible
{
    /**
    * Brand Trigram, e.g. CAR, IWC
    */
    // @ApiMember(Description="Brand Trigram, e.g. CAR, IWC", IsRequired=true)
    String? brand;

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

    /**
    * Date To
    */
    // @ApiMember(Description="Date To")
    DateTime? dateTo;

    /**
    * Date From
    */
    // @ApiMember(Description="Date From")
    DateTime? dateFrom;

    /**
    * Possible order statues: B (Backorder), C (Created), D (Draft), I (In transit)N (Pending), P (Shipped), PS (Partially shipped), R (Reserved), X (RP Simulated), Z (Deleted)
    */
    // @ApiMember(Description="Possible order statues: B (Backorder), C (Created), D (Draft), I (In transit)N (Pending), P (Shipped), PS (Partially shipped), R (Reserved), X (RP Simulated), Z (Deleted)")
    List<String>? status;

    /**
    * Reason Code e.g. Y00, Y06
    */
    // @ApiMember(Description="Reason Code e.g. Y00, Y06")
    List<String>? reasonCode;

    /**
    * Product Categories
    */
    // @ApiMember(Description="Product Categories")
    List<ProductCategory>? productCategories;

    /**
    * Final Ship To Pos Codes
    */
    // @ApiMember(Description="Final Ship To Pos Codes")
    List<String>? finalShipTo;

    /**
    * Export Request ID of the API Consumers
    */
    // @ApiMember(Description="Export Request ID of the API Consumers", IsRequired=true)
    String? downloadRequestId;

    ExportOrder({this.brand,this.posCodes,this.dateTo,this.dateFrom,this.status,this.reasonCode,this.productCategories,this.finalShipTo,this.downloadRequestId});
    ExportOrder.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        brand = json['brand'];
        posCodes = JsonConverters.fromJson(json['posCodes'],'List<String>',context!);
        dateTo = JsonConverters.fromJson(json['dateTo'],'DateTime',context!);
        dateFrom = JsonConverters.fromJson(json['dateFrom'],'DateTime',context!);
        status = JsonConverters.fromJson(json['status'],'List<String>',context!);
        reasonCode = JsonConverters.fromJson(json['reasonCode'],'List<String>',context!);
        productCategories = JsonConverters.fromJson(json['productCategories'],'List<ProductCategory>',context!);
        finalShipTo = JsonConverters.fromJson(json['finalShipTo'],'List<String>',context!);
        downloadRequestId = json['downloadRequestId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'brand': brand,
        'posCodes': JsonConverters.toJson(posCodes,'List<String>',context!),
        'dateTo': JsonConverters.toJson(dateTo,'DateTime',context!),
        'dateFrom': JsonConverters.toJson(dateFrom,'DateTime',context!),
        'status': JsonConverters.toJson(status,'List<String>',context!),
        'reasonCode': JsonConverters.toJson(reasonCode,'List<String>',context!),
        'productCategories': JsonConverters.toJson(productCategories,'List<ProductCategory>',context!),
        'finalShipTo': JsonConverters.toJson(finalShipTo,'List<String>',context!),
        'downloadRequestId': downloadRequestId
    };

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

TypeContext _ctx = TypeContext(library: 'dev_api_booster.richemont.com', types: <String, TypeInfo> {
    'ExportOrderResponse': TypeInfo(TypeOf.Class, create:() => ExportOrderResponse()),
    'ProductCategory': TypeInfo(TypeOf.Class, create:() => ProductCategory()),
    'ExportOrder': TypeInfo(TypeOf.Class, create:() => ExportOrder()),
    'List<ProductCategory>': TypeInfo(TypeOf.Class, create:() => <ProductCategory>[]),
});

Dart ExportOrder 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 /purchase/{brand}/export HTTP/1.1 
Host: dev-api-booster.richemont.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"brand":"String","posCodes":["String"],"dateTo":"\/Date(-62135596800000-0000)\/","dateFrom":"\/Date(-62135596800000-0000)\/","status":["String"],"reasonCode":["String"],"productCategories":[{"brandCategoryId":"String","grandCategoryId":"String","masterCategoryId":"String","categoryId":"String","subCategoryId":"String"}],"finalShipTo":["String"],"downloadRequestId":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"asyncTaskId":"00000000000000000000000000000000"}