Richemont.Booster2.PublicApi

<back to all web services

GetCatalog

Requires Authentication
The following routes are available for this service:
GET/purchase/catalogGet a list of purchasable articles for the given Pos and Brand
import 'package:servicestack/servicestack.dart';

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

    /**
    * Price of the article
    */
    // @ApiMember(Description="Price of the article", IsRequired=true)
    double? price;

    /**
    * Currency of the price of the article
    */
    // @ApiMember(Description="Currency of the price of the article", IsRequired=true)
    String? currency;

    Article({this.articleCode,this.price,this.currency});
    Article.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        articleCode = json['articleCode'];
        price = JsonConverters.toDouble(json['price']);
        currency = json['currency'];
        return this;
    }

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

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

class GetCatalogResponse implements IConvertible
{
    List<Article>? articles;

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

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

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

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

class GetCatalog implements IConvertible
{
    /**
    * POS Legacy
    */
    // @ApiMember(Description="POS Legacy", IsRequired=true)
    String? posCode;

    /**
    * Brand Trigram of the POS
    */
    // @ApiMember(Description="Brand Trigram of the POS", IsRequired=true)
    String? brand;

    GetCatalog({this.posCode,this.brand});
    GetCatalog.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

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

Dart GetCatalog DTOs

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

HTTP + OTHER

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

GET /purchase/catalog HTTP/1.1 
Host: dev-api-booster.richemont.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{}