Richemont.Booster2.PublicApi

<back to all web services

GetPhoneTypes

Requires Authentication
The following routes are available for this service:
GET/phoneTypesGet all available phone types
import 'package:servicestack/servicestack.dart';

class PhoneType implements IConvertible
{
    /**
    * Booster Phone Type
    */
    // @ApiMember(Description="Booster Phone Type", IsRequired=true)
    String? phoneType;

    /**
    * Phone type description translation
    */
    // @ApiMember(Description="Phone type description translation", IsRequired=true)
    String? translation;

    PhoneType({this.phoneType,this.translation});
    PhoneType.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

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

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

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

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

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

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

[]