Richemont.Booster2.PublicApi

<back to all web services

ExportStock

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

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

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

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

    /**
    * Include Extra Info
    */
    // @ApiMember(Description="Include Extra Info")
    bool? includeExtraInfo;

    /**
    * Cluster Id
    */
    // @ApiMember(Description="Cluster Id")
    List<String>? clusterIds;

    /**
    * Include Consignment NotAuthorized POS
    */
    // @ApiMember(Description="Include Consignment NotAuthorized POS")
    bool? includeConsignmentNotAuthorizedPOS;

    /**
    * Include Retail Sales Price in the Output, by default: false
    */
    // @ApiMember(Description="Include Retail Sales Price in the Output, by default: false")
    bool? includeRSP;

    /**
    * In Stock Since date from 
    */
    // @ApiMember(Description="In Stock Since date from ")
    DateTime? dateFrom;

    /**
    * In Stock Since date to
    */
    // @ApiMember(Description="In Stock Since date to")
    DateTime? dateTo;

    /**
    * Item type, 'standard' OR 'consigned'. By default, all are coming
    */
    // @ApiMember(Description="Item type, 'standard' OR 'consigned'. By default, all are coming")
    String? type;

    StockRequest({this.brand,this.posCodes,this.articleCodes,this.includeExtraInfo,this.clusterIds,this.includeConsignmentNotAuthorizedPOS,this.includeRSP,this.dateFrom,this.dateTo,this.type});
    StockRequest.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!);
        includeExtraInfo = json['includeExtraInfo'];
        clusterIds = JsonConverters.fromJson(json['clusterIds'],'List<String>',context!);
        includeConsignmentNotAuthorizedPOS = json['includeConsignmentNotAuthorizedPOS'];
        includeRSP = json['includeRSP'];
        dateFrom = JsonConverters.fromJson(json['dateFrom'],'DateTime',context!);
        dateTo = JsonConverters.fromJson(json['dateTo'],'DateTime',context!);
        type = json['type'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'brand': brand,
        'posCodes': JsonConverters.toJson(posCodes,'List<String>',context!),
        'articleCodes': JsonConverters.toJson(articleCodes,'List<String>',context!),
        'includeExtraInfo': includeExtraInfo,
        'clusterIds': JsonConverters.toJson(clusterIds,'List<String>',context!),
        'includeConsignmentNotAuthorizedPOS': includeConsignmentNotAuthorizedPOS,
        'includeRSP': includeRSP,
        'dateFrom': JsonConverters.toJson(dateFrom,'DateTime',context!),
        'dateTo': JsonConverters.toJson(dateTo,'DateTime',context!),
        'type': type
    };

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

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

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

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

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

    getTypeName() => "ExportStockResponse";
    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 ExportStock extends StockRequest implements IConvertible
{
    /**
    * Product Categories
    */
    // @ApiMember(Description="Product Categories")
    List<ProductCategory>? productCategories;

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

    ExportStock({this.productCategories,this.downloadRequestId});
    ExportStock.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'productCategories': JsonConverters.toJson(productCategories,'List<ProductCategory>',context!),
        'downloadRequestId': downloadRequestId
    });

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

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

Dart ExportStock DTOs

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

HTTP + XML

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

POST /stock/{brand}/export HTTP/1.1 
Host: dev-api-booster.richemont.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<ExportStock xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.Stock.ServiceModel">
  <articleCodes xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </articleCodes>
  <brand>String</brand>
  <clusterIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </clusterIds>
  <dateFrom>0001-01-01T00:00:00</dateFrom>
  <dateTo>0001-01-01T00:00:00</dateTo>
  <includeConsignmentNotAuthorizedPOS>false</includeConsignmentNotAuthorizedPOS>
  <includeExtraInfo>false</includeExtraInfo>
  <includeRSP>false</includeRSP>
  <posCodes xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </posCodes>
  <type>String</type>
  <downloadRequestId>String</downloadRequestId>
  <productCategories>
    <ProductCategory>
      <brandCategoryId>String</brandCategoryId>
      <categoryId>String</categoryId>
      <grandCategoryId>String</grandCategoryId>
      <masterCategoryId>String</masterCategoryId>
      <subCategoryId>String</subCategoryId>
    </ProductCategory>
  </productCategories>
</ExportStock>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ExportStockResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.Stock.ServiceModel">
  <asyncTaskId>00000000-0000-0000-0000-000000000000</asyncTaskId>
</ExportStockResponse>