Richemont.Booster2.PublicApi

<back to all web services

GetSalesReps

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

class SalesRep implements IConvertible
{
    /**
    * First name of sales representative
    */
    // @ApiMember(Description="First name of sales representative", IsRequired=true)
    String? firstName;

    /**
    * Last name of sales representative
    */
    // @ApiMember(Description="Last name of sales representative", IsRequired=true)
    String? lastName;

    /**
    * Email address of sales representative
    */
    // @ApiMember(Description="Email address of sales representative", IsRequired=true)
    String? email;

    /**
    * User ID of sales representative
    */
    // @ApiMember(Description="User ID of sales representative", IsRequired=true)
    String? userId;

    SalesRep({this.firstName,this.lastName,this.email,this.userId});
    SalesRep.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        firstName = json['firstName'];
        lastName = json['lastName'];
        email = json['email'];
        userId = json['userId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'firstName': firstName,
        'lastName': lastName,
        'email': email,
        'userId': userId
    };

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

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

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

class GetSalesReps implements IConvertible
{
    /**
    * Brand Triagram, e.g. CAR, IWC, VAC
    */
    // @ApiMember(Description="Brand Triagram, e.g. CAR, IWC, VAC", IsRequired=true)
    String? brand;

    /**
    * Point of Sale Code, e.g. ES100:102048
    */
    // @ApiMember(Description="Point of Sale Code, e.g. ES100:102048", IsRequired=true)
    String? posCode;

    /**
    * Booster Customer Id
    */
    // @ApiMember(Description="Booster Customer Id")
    int? boosterCustomerId;

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

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

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

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

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

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

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