Richemont.Booster2.PublicApi

<back to all web services

GetStockDetail

Requires Authentication
The following routes are available for this service:
GET/stock/{brand}/{posCode}/{articleCode}Get stock details
import 'package:servicestack/servicestack.dart';

class Pos implements IConvertible
{
    /**
    * Name of the POS
    */
    // @ApiMember(Description="Name of the POS", IsRequired=true)
    String name = "";

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

    /**
    * Country of the POS
    */
    // @ApiMember(Description="Country of the POS", IsRequired=true)
    String country = "";

    /**
    * City of the POS
    */
    // @ApiMember(Description="City of the POS", IsRequired=true)
    String city = "";

    /**
    * Postal Code
    */
    // @ApiMember(Description="Postal Code", IsRequired=true)
    String postalCode = "";

    /**
    * State
    */
    // @ApiMember(Description="State", IsRequired=true)
    String state = "";

    /**
    * Street
    */
    // @ApiMember(Description="Street", IsRequired=true)
    String street = "";

    Pos({this.name="",this.posCode="",this.posCodeToBeDisplayed="",this.country="",this.city="",this.postalCode="",this.state="",this.street=""});
    Pos.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        name = json['name'] ?? "";
        posCode = json['posCode'] ?? "";
        posCodeToBeDisplayed = json['posCodeToBeDisplayed'] ?? "";
        country = json['country'] ?? "";
        city = json['city'] ?? "";
        postalCode = json['postalCode'] ?? "";
        state = json['state'] ?? "";
        street = json['street'] ?? "";
        return this;
    }

    Map<String, dynamic> toJson() => {
        'name': name,
        'posCode': posCode,
        'posCodeToBeDisplayed': posCodeToBeDisplayed,
        'country': country,
        'city': city,
        'postalCode': postalCode,
        'state': state,
        'street': street
    };

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

class UnitNetAmount implements IConvertible
{
    /**
    * Currency Iso Code
    */
    // @ApiMember(Description="Currency Iso Code", IsRequired=true)
    String currencyIsoCode = "";

    /**
    * Value
    */
    // @ApiMember(Description="Value", IsRequired=true)
    double value = 0;

    UnitNetAmount({this.currencyIsoCode="",this.value=0});
    UnitNetAmount.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class StorageLocation implements IConvertible
{
    /**
    * Storage Location Identifier
    */
    // @ApiMember(Description="Storage Location Identifier", IsRequired=true)
    String storageLocationId = "";

    /**
    * Storage Location Description
    */
    // @ApiMember(Description="Storage Location Description")
    String? storageLocationDs;

    StorageLocation({this.storageLocationId="",this.storageLocationDs});
    StorageLocation.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        storageLocationId = json['storageLocationId'] ?? "";
        storageLocationDs = json['storageLocationDs'];
        return this;
    }

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

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

class StockPositionItem implements IConvertible
{
    /**
    * Quantity
    */
    // @ApiMember(Description="Quantity", IsRequired=true)
    int quantity = 0;

    /**
    * Serial Number
    */
    // @ApiMember(Description="Serial Number")
    String? serialNumber;

    /**
    * Stock Date
    */
    // @ApiMember(Description="Stock Date", IsRequired=true)
    String stockDate = "";

    /**
    * Loaded On Date
    */
    // @ApiMember(Description="Loaded On Date", IsRequired=true)
    String loadedOnDate = "";

    /**
    * Type e.g. consignment or standard
    */
    // @ApiMember(Description="Type e.g. consignment or standard", IsRequired=true)
    String type = "";

    /**
    * Is Consignment Sellable 
    */
    // @ApiMember(Description="Is Consignment Sellable ", IsRequired=true)
    bool? isConsignmentSellable;

    /**
    * Sell-In Price. Disclaimer: this data will be arriving empty/null due to DealerCost project still being in test phase.
    */
    // @ApiMember(Description="Sell-In Price. Disclaimer: this data will be arriving empty/null due to DealerCost project still being in test phase.")
    UnitNetAmount? unitNetAmount;

    /**
    * Retail Sales Price
    */
    // @ApiMember(Description="Retail Sales Price")
    UnitNetAmount? retailSalesPrice;

    /**
    * Storage Location
    */
    // @ApiMember(Description="Storage Location")
    StorageLocation? storageLocation;

    StockPositionItem({this.quantity=0,this.serialNumber,this.stockDate="",this.loadedOnDate="",this.type="",this.isConsignmentSellable,this.unitNetAmount,this.retailSalesPrice,this.storageLocation});
    StockPositionItem.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        quantity = json['quantity'] ?? 0;
        serialNumber = json['serialNumber'];
        stockDate = json['stockDate'] ?? "";
        loadedOnDate = json['loadedOnDate'] ?? "";
        type = json['type'] ?? "";
        isConsignmentSellable = json['isConsignmentSellable'];
        unitNetAmount = JsonConverters.fromJson(json['unitNetAmount'],'UnitNetAmount',context!);
        retailSalesPrice = JsonConverters.fromJson(json['retailSalesPrice'],'UnitNetAmount',context!);
        storageLocation = JsonConverters.fromJson(json['storageLocation'],'StorageLocation',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'quantity': quantity,
        'serialNumber': serialNumber,
        'stockDate': stockDate,
        'loadedOnDate': loadedOnDate,
        'type': type,
        'isConsignmentSellable': isConsignmentSellable,
        'unitNetAmount': JsonConverters.toJson(unitNetAmount,'UnitNetAmount',context!),
        'retailSalesPrice': JsonConverters.toJson(retailSalesPrice,'UnitNetAmount',context!),
        'storageLocation': JsonConverters.toJson(storageLocation,'StorageLocation',context!)
    };

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

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

    /**
    * Brand
    */
    // @ApiMember(Description="Brand", IsRequired=true)
    String brand = "";

    /**
    * Pos Code
    */
    // @ApiMember(Description="Pos Code", IsRequired=true)
    String posCode = "";

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

    /**
    * Shared Stock Location
    */
    // @ApiMember(Description="Shared Stock Location", IsRequired=true)
    Pos? sharedStockLocation;

    /**
    * Stock Positions
    */
    // @ApiMember(Description="Stock Positions", IsRequired=true)
    List<StockPositionItem> stockPositions = [];

    GetStockDetailResponse({this.articleCode="",this.brand="",this.posCode="",this.currentStockQuantity=0,this.sharedStockLocation,this.stockPositions=const []});
    GetStockDetailResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        articleCode = json['articleCode'] ?? "";
        brand = json['brand'] ?? "";
        posCode = json['posCode'] ?? "";
        currentStockQuantity = json['currentStockQuantity'] ?? 0;
        sharedStockLocation = JsonConverters.fromJson(json['sharedStockLocation'],'Pos',context!);
        stockPositions = JsonConverters.fromJson(json['stockPositions'],'List<StockPositionItem>',context!) ?? [];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'articleCode': articleCode,
        'brand': brand,
        'posCode': posCode,
        'currentStockQuantity': currentStockQuantity,
        'sharedStockLocation': JsonConverters.toJson(sharedStockLocation,'Pos',context!),
        'stockPositions': JsonConverters.toJson(stockPositions,'List<StockPositionItem>',context!)
    };

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

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

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

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

    /**
    * Storage Location Identifier e.g. CPO, NEW, REP
    */
    // @ApiMember(Description="Storage Location Identifier e.g. CPO, NEW, REP")
    String? storageLocationId;

    /**
    * Inventory segment e.g. CPO or null
    */
    // @ApiMember(Description="Inventory segment e.g. CPO or null")
    String? inventorySegment;

    GetStockDetail({this.brand="",this.posCode="",this.articleCode="",this.storageLocationId,this.inventorySegment});
    GetStockDetail.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        brand = json['brand'] ?? "";
        posCode = json['posCode'] ?? "";
        articleCode = json['articleCode'] ?? "";
        storageLocationId = json['storageLocationId'];
        inventorySegment = json['inventorySegment'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'brand': brand,
        'posCode': posCode,
        'articleCode': articleCode,
        'storageLocationId': storageLocationId,
        'inventorySegment': inventorySegment
    };

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

TypeContext _ctx = TypeContext(library: 'dev_api_booster.richemont.com', types: <String, TypeInfo> {
    'Pos': TypeInfo(TypeOf.Class, create:() => Pos()),
    'UnitNetAmount': TypeInfo(TypeOf.Class, create:() => UnitNetAmount()),
    'StorageLocation': TypeInfo(TypeOf.Class, create:() => StorageLocation()),
    'StockPositionItem': TypeInfo(TypeOf.Class, create:() => StockPositionItem()),
    'GetStockDetailResponse': TypeInfo(TypeOf.Class, create:() => GetStockDetailResponse()),
    'List<StockPositionItem>': TypeInfo(TypeOf.Class, create:() => <StockPositionItem>[]),
    'GetStockDetail': TypeInfo(TypeOf.Class, create:() => GetStockDetail()),
});

Dart GetStockDetail 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 /stock/{brand}/{posCode}/{articleCode} HTTP/1.1 
Host: dev-api-booster.richemont.com 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"articleCode":"String","brand":"String","posCode":"String","currentStockQuantity":0,"sharedStockLocation":{"name":"String","posCode":"String","posCodeToBeDisplayed":"String","country":"String","city":"String","postalCode":"String","state":"String","street":"String"},"stockPositions":[{"quantity":0,"serialNumber":"String","stockDate":"String","loadedOnDate":"String","type":"String","isConsignmentSellable":false,"unitNetAmount":{"currencyIsoCode":"String","value":0},"retailSalesPrice":{"currencyIsoCode":"String","value":0},"storageLocation":{"storageLocationId":"String","storageLocationDs":"String"}}]}