Richemont.Booster2.PublicApi

<back to all web services

GetWarehouseStock

Requires Authentication
The following routes are available for this service:
GET/warehouseItems/{brand}/{posCode}Get a list Paginated Warehouse Stock
import 'package:servicestack/servicestack.dart';

class WarehouseStockElement implements IConvertible
{
    /**
    * Article Code
    */
    // @ApiMember(Description="Article Code", IsRequired=true)
    String? articleCode;

    /**
    * Current Stock Quantity
    */
    // @ApiMember(Description="Current Stock Quantity", IsRequired=true)
    int? atpQuantity;

    WarehouseStockElement({this.articleCode,this.atpQuantity});
    WarehouseStockElement.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class GetWarehouseStockResponse 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 movements
    */
    // @ApiMember(Description="List of movements", IsRequired=true)
    List<WarehouseStockElement>? elements;

    GetWarehouseStockResponse({this.totalPages,this.totalResults,this.page,this.items,this.elements});
    GetWarehouseStockResponse.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<WarehouseStockElement>',context!);
        return this;
    }

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

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

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

    /**
    * POS Legacy
    */
    // @ApiMember(Description="POS Legacy", IsRequired=true)
    String? posCode;

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

    /**
    * 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;

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

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

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

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

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

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

GET /warehouseItems/{brand}/{posCode} HTTP/1.1 
Host: dev-api-booster.richemont.com 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

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