Richemont.Booster2.PublicApi

<back to all web services

GetStockLookup

Requires Authentication
The following routes are available for this service:
GET/stock/{brand}/lookupGet Serial Number and Article lookup from the database
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 GetStockLookupResponse implements IConvertible
{
    /**
    * Exists in Stock?
    */
    // @ApiMember(Description="Exists in Stock?", IsRequired=true)
    bool? existsInStock;

    /**
    * Stock Locations / POSes
    */
    // @ApiMember(Description="Stock Locations / POSes", IsRequired=true)
    Pos? stockLocation;

    GetStockLookupResponse({this.existsInStock,this.stockLocation});
    GetStockLookupResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        existsInStock = json['existsInStock'];
        stockLocation = JsonConverters.fromJson(json['stockLocation'],'Pos',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'existsInStock': existsInStock,
        'stockLocation': JsonConverters.toJson(stockLocation,'Pos',context!)
    };

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

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

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

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

    GetStockLookup({this.brand,this.articleCode,this.serialNumber});
    GetStockLookup.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

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

Dart GetStockLookup DTOs

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

HTTP + JSV

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

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

{
	existsInStock: False,
	stockLocation: 
	{
		name: String,
		posCode: String,
		posCodeToBeDisplayed: String,
		country: String,
		city: String,
		postalCode: String,
		state: String,
		street: String
	}
}