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
{
    /**
    * The first name of the sales representative.
    */
    // @ApiMember(Description="The first name of the sales representative.", IsRequired=true)
    String firstName = "";

    /**
    * The last name of the sales representative.
    */
    // @ApiMember(Description="The last name of the sales representative.", IsRequired=true)
    String lastName = "";

    /**
    * The email address of the sales representative.
    */
    // @ApiMember(Description="The email address of the sales representative.", IsRequired=true)
    String email = "";

    /**
    * The unique user ID of the sales representative.
    */
    // @ApiMember(Description="The unique user ID of the sales representative.", IsRequired=true)
    String userId = "";

    /**
    * Whether the sales representative's account is locked.
    */
    // @ApiMember(Description="Whether the sales representative's account is locked.", IsRequired=true)
    bool? accountLocked;

    /**
    * Whether the sales representative's account is pinned.
    */
    // @ApiMember(Description="Whether the sales representative's account is pinned.", IsRequired=true)
    bool? isPinned;

    SalesRep({this.firstName="",this.lastName="",this.email="",this.userId="",this.accountLocked,this.isPinned});
    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'] ?? "";
        accountLocked = json['accountLocked'];
        isPinned = json['isPinned'];
        return this;
    }

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

    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;

    /**
    * Whether the sales representative's account is locked.
    */
    // @ApiMember(Description="Whether the sales representative's account is locked.")
    bool? accountLocked;

    /**
    * Whether the sales representative's account is pinned.
    */
    // @ApiMember(Description="Whether the sales representative's account is pinned.")
    bool? isPinned;

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

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

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

    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 .jsv suffix or ?format=jsv

HTTP + JSV

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: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

[
	
]