Richemont.Booster2.PublicApi

<back to all web services

GetPromoterType

Requires Authentication
The following routes are available for this service:
GET/warranty/promotertypeGet a list of Promoter Types
import 'package:servicestack/servicestack.dart';

class PromoterTypeItem implements IConvertible
{
    /**
    * Code of Promoter Type
    */
    // @ApiMember(Description="Code of Promoter Type", IsRequired=true)
    String? code;

    /**
    * Description of Promoter Type
    */
    // @ApiMember(Description="Description of Promoter Type", IsRequired=true)
    String? description;

    PromoterTypeItem({this.code,this.description});
    PromoterTypeItem.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'code': code,
        'description': description
    };

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

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

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

class GetPromoterType implements IConvertible
{
    GetPromoterType();
    GetPromoterType.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

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

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

Dart GetPromoterType 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 /warranty/promotertype HTTP/1.1 
Host: dev-api-booster.richemont.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ArrayOfPromoterTypeItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.Sellout.ServiceModel" />