Richemont.Booster2.PublicApi

<back to all web services

GetInterests

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

class Interest implements IConvertible
{
    /**
    * Interest description
    */
    // @ApiMember(Description="Interest description", IsRequired=true)
    String? interest;

    /**
    * SAP Interest ID, e.g. 'CA-1'
    */
    // @ApiMember(Description="SAP Interest ID, e.g. 'CA-1'", IsRequired=true)
    String? sapInterestId;

    /**
    * Interest description translation
    */
    // @ApiMember(Description="Interest description translation")
    String? translation;

    Interest({this.interest,this.sapInterestId,this.translation});
    Interest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        interest = json['interest'];
        sapInterestId = json['sapInterestId'];
        translation = json['translation'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'interest': interest,
        'sapInterestId': sapInterestId,
        'translation': translation
    };

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

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

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

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

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

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

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

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

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

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

Dart GetInterests DTOs

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

HTTP + CSV

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

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

[]