Richemont.Booster2.PublicApi

<back to all web services

GetPrice

Requires Authentication
The following routes are available for this service:
GET/price/{brand}Get the list of prices of the requested items
import 'package:servicestack/servicestack.dart';

class DealerCostPrice implements IConvertible
{
    /**
    * Currency of the Dealer Cost Price
    */
    // @ApiMember(Description="Currency of the Dealer Cost Price", IsRequired=true)
    String? currency;

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

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

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

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

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

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

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

    /**
    * Retail price of the item
    */
    // @ApiMember(Description="Retail price of the item")
    double? retailSalePrice;

    /**
    * Code of currency applied
    */
    // @ApiMember(Description="Code of currency applied", IsRequired=true)
    String? priceListCode;

    /**
    * Dealer Cost Price
    */
    // @ApiMember(Description="Dealer Cost Price")
    DealerCostPrice? dealerCostPrice;

    Price({this.articleCode,this.currency,this.retailSalePrice,this.priceListCode,this.dealerCostPrice});
    Price.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        articleCode = json['articleCode'];
        currency = json['currency'];
        retailSalePrice = JsonConverters.toDouble(json['retailSalePrice']);
        priceListCode = json['priceListCode'];
        dealerCostPrice = JsonConverters.fromJson(json['dealerCostPrice'],'DealerCostPrice',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'articleCode': articleCode,
        'currency': currency,
        'retailSalePrice': retailSalePrice,
        'priceListCode': priceListCode,
        'dealerCostPrice': JsonConverters.toJson(dealerCostPrice,'DealerCostPrice',context!)
    };

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

class GetPriceResponse extends ListBase<Price> implements IConvertible
{
    final List<Price> l = [];
    set length(int newLength) { l.length = newLength; }
    int get length => l.length;
    Price operator [](int index) => l[index];
    void operator []=(int index, Price value) { l[index] = value; }
    GetPriceResponse();
    GetPriceResponse.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "GetPriceResponse";
    TypeContext? context = _ctx;
}

class GetPrice implements 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", IsRequired=true)
    List<String>? articleCodes;

    /**
    * Include Dealer Cost Price in the response
    */
    // @ApiMember(Description="Include Dealer Cost Price in the response", IsRequired=true)
    bool? includeDealerCostPrice;

    GetPrice({this.brand,this.posCode,this.articleCodes,this.includeDealerCostPrice});
    GetPrice.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!);
        includeDealerCostPrice = json['includeDealerCostPrice'];
        return this;
    }

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

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

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

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

[]