Richemont.Booster2.PublicApi

<back to all web services

GetStockSlim

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

class GetStockSlimResponse implements IConvertible
{
    /**
    * Total Product Count
    */
    // @ApiMember(Description="Total Product Count", IsRequired=true)
    int? totalProductCount;

    /**
    * Total Consignment Count
    */
    // @ApiMember(Description="Total Consignment Count", IsRequired=true)
    int? totalConsignmentCount;

    /**
    * Articles
    */
    // @ApiMember(Description="Articles", IsRequired=true)
    List<String>? elements;

    GetStockSlimResponse({this.totalProductCount,this.totalConsignmentCount,this.elements});
    GetStockSlimResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'totalProductCount': totalProductCount,
        'totalConsignmentCount': totalConsignmentCount,
        'elements': JsonConverters.toJson(elements,'List<String>',context!)
    };

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

class GetStockSlim 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;

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

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

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

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

    GetStockSlim({this.brand,this.posCodes,this.articleCodes,this.clusterIds,this.includeExtraInfo,this.includeConsignmentNotAuthorizedPOS,this.type});
    GetStockSlim.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!);
        clusterIds = JsonConverters.fromJson(json['clusterIds'],'List<String>',context!);
        includeExtraInfo = json['includeExtraInfo'];
        includeConsignmentNotAuthorizedPOS = json['includeConsignmentNotAuthorizedPOS'];
        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!),
        'clusterIds': JsonConverters.toJson(clusterIds,'List<String>',context!),
        'includeExtraInfo': includeExtraInfo,
        'includeConsignmentNotAuthorizedPOS': includeConsignmentNotAuthorizedPOS,
        'type': type
    };

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

TypeContext _ctx = TypeContext(library: 'dev_api_booster.richemont.com', types: <String, TypeInfo> {
    'GetStockSlimResponse': TypeInfo(TypeOf.Class, create:() => GetStockSlimResponse()),
    'GetStockSlim': TypeInfo(TypeOf.Class, create:() => GetStockSlim()),
});

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

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

<GetStockSlimResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.Stock.ServiceModel">
  <elements xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </elements>
  <totalConsignmentCount>0</totalConsignmentCount>
  <totalProductCount>0</totalProductCount>
</GetStockSlimResponse>