Booster.Microservices

<back to all web services

ListWarrantyCardsRequest

Requires Authentication
The following routes are available for this service:
GET/warranty/v1/cards
import 'package:servicestack/servicestack.dart';

class BaseRequest<TResponse> implements IRequest, IConvertible
{
    String? sid;
    String? app;
    String? _os;
    String? _appVersion;
    String? _searchMethod;

    BaseRequest({this.sid,this.app,this._os,this._appVersion,this._searchMethod});
    BaseRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        sid = json['sid'];
        app = json['app'];
        _os = json['_os'];
        _appVersion = json['_appVersion'];
        _searchMethod = json['_searchMethod'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'sid': sid,
        'app': app,
        '_os': _os,
        '_appVersion': _appVersion,
        '_searchMethod': _searchMethod
    };

    getTypeName() => "BaseRequest<$TResponse>";
    TypeContext? context = _ctx;
}

class BaseResponse implements IRespose, IConvertible
{
    String? _xmlns;
    String? _type;
    String? _source;
    String? _tstamp;
    String? _user;
    String? _env;
    String? _uri;
    String? _query;

    BaseResponse({this._xmlns,this._type,this._source,this._tstamp,this._user,this._env,this._uri,this._query});
    BaseResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        _xmlns = json['_xmlns'];
        _type = json['_type'];
        _source = json['_source'];
        _tstamp = json['_tstamp'];
        _user = json['_user'];
        _env = json['_env'];
        _uri = json['_uri'];
        _query = json['_query'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        '_xmlns': _xmlns,
        '_type': _type,
        '_source': _source,
        '_tstamp': _tstamp,
        '_user': _user,
        '_env': _env,
        '_uri': _uri,
        '_query': _query
    };

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

class LookupInt implements ILookupInt, IConvertible
{
    String? object;
    int? id;

    LookupInt({this.object,this.id});
    LookupInt.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'object': object,
        'id': id
    };

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

class Article implements IConvertible
{
    String? ref;
    String? serial;
    String? name;
    LookupInt? site;
    String? brand;
    bool? isConsignment;

    Article({this.ref,this.serial,this.name,this.site,this.brand,this.isConsignment});
    Article.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ref = json['ref'];
        serial = json['serial'];
        name = json['name'];
        site = JsonConverters.fromJson(json['site'],'LookupInt',context!);
        brand = json['brand'];
        isConsignment = json['isConsignment'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ref': ref,
        'serial': serial,
        'name': name,
        'site': JsonConverters.toJson(site,'LookupInt',context!),
        'brand': brand,
        'isConsignment': isConsignment
    };

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

class Address implements IConvertible
{
    String? line1;
    String? line2;
    String? city;
    String? zipCode;
    String? countryCode;

    Address({this.line1,this.line2,this.city,this.zipCode,this.countryCode});
    Address.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        line1 = json['line1'];
        line2 = json['line2'];
        city = json['city'];
        zipCode = json['zipCode'];
        countryCode = json['countryCode'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'line1': line1,
        'line2': line2,
        'city': city,
        'zipCode': zipCode,
        'countryCode': countryCode
    };

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

class Site implements IConvertible
{
    String? object;
    String? id;
    String? name;
    Address? address;
    bool? crmPrivacyPolicyMandatory;
    bool? crmAllowStoreDataAbroadVisible;
    bool? isTimeVallee;
    bool? crmPrivacyPolicyTimeValleeMandatory;
    bool? crmAllowStoreDataAbroadTimeValleeVisible;
    bool? allowToCreateEndCustomerOutsideChina;
    bool? displayFirstLastNameNotLatin;
    String? languageTransliteration;
    bool? doNotDisplayPOSDataInDisclaimers;
    bool? crmFirstNameMandatory;
    bool? crmCityMandatory;
    bool? manageOwnStock;

    Site({this.object,this.id,this.name,this.address,this.crmPrivacyPolicyMandatory,this.crmAllowStoreDataAbroadVisible,this.isTimeVallee,this.crmPrivacyPolicyTimeValleeMandatory,this.crmAllowStoreDataAbroadTimeValleeVisible,this.allowToCreateEndCustomerOutsideChina,this.displayFirstLastNameNotLatin,this.languageTransliteration,this.doNotDisplayPOSDataInDisclaimers,this.crmFirstNameMandatory,this.crmCityMandatory,this.manageOwnStock});
    Site.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        object = json['object'];
        id = json['id'];
        name = json['name'];
        address = JsonConverters.fromJson(json['address'],'Address',context!);
        crmPrivacyPolicyMandatory = json['crmPrivacyPolicyMandatory'];
        crmAllowStoreDataAbroadVisible = json['crmAllowStoreDataAbroadVisible'];
        isTimeVallee = json['isTimeVallee'];
        crmPrivacyPolicyTimeValleeMandatory = json['crmPrivacyPolicyTimeValleeMandatory'];
        crmAllowStoreDataAbroadTimeValleeVisible = json['crmAllowStoreDataAbroadTimeValleeVisible'];
        allowToCreateEndCustomerOutsideChina = json['allowToCreateEndCustomerOutsideChina'];
        displayFirstLastNameNotLatin = json['displayFirstLastNameNotLatin'];
        languageTransliteration = json['languageTransliteration'];
        doNotDisplayPOSDataInDisclaimers = json['doNotDisplayPOSDataInDisclaimers'];
        crmFirstNameMandatory = json['crmFirstNameMandatory'];
        crmCityMandatory = json['crmCityMandatory'];
        manageOwnStock = json['manageOwnStock'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'object': object,
        'id': id,
        'name': name,
        'address': JsonConverters.toJson(address,'Address',context!),
        'crmPrivacyPolicyMandatory': crmPrivacyPolicyMandatory,
        'crmAllowStoreDataAbroadVisible': crmAllowStoreDataAbroadVisible,
        'isTimeVallee': isTimeVallee,
        'crmPrivacyPolicyTimeValleeMandatory': crmPrivacyPolicyTimeValleeMandatory,
        'crmAllowStoreDataAbroadTimeValleeVisible': crmAllowStoreDataAbroadTimeValleeVisible,
        'allowToCreateEndCustomerOutsideChina': allowToCreateEndCustomerOutsideChina,
        'displayFirstLastNameNotLatin': displayFirstLastNameNotLatin,
        'languageTransliteration': languageTransliteration,
        'doNotDisplayPOSDataInDisclaimers': doNotDisplayPOSDataInDisclaimers,
        'crmFirstNameMandatory': crmFirstNameMandatory,
        'crmCityMandatory': crmCityMandatory,
        'manageOwnStock': manageOwnStock
    };

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

class Warranty implements IConvertible
{
    List<Article>? article;
    String? warrantyId;
    String? createdBy;
    String? createdAt;
    String? issuedBy;
    String? selloutId;
    String? activationDate;
    String? pin;
    String? promoterTypeId;
    String? promoterTypeDs;
    Site? site;
    bool? crmEnabled;
    bool? canBeExtended;
    bool? canBeRetriggered;

    Warranty({this.article,this.warrantyId,this.createdBy,this.createdAt,this.issuedBy,this.selloutId,this.activationDate,this.pin,this.promoterTypeId,this.promoterTypeDs,this.site,this.crmEnabled,this.canBeExtended,this.canBeRetriggered});
    Warranty.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        article = JsonConverters.fromJson(json['article'],'List<Article>',context!);
        warrantyId = json['warrantyId'];
        createdBy = json['createdBy'];
        createdAt = json['createdAt'];
        issuedBy = json['issuedBy'];
        selloutId = json['selloutId'];
        activationDate = json['activationDate'];
        pin = json['pin'];
        promoterTypeId = json['promoterTypeId'];
        promoterTypeDs = json['promoterTypeDs'];
        site = JsonConverters.fromJson(json['site'],'Site',context!);
        crmEnabled = json['crmEnabled'];
        canBeExtended = json['canBeExtended'];
        canBeRetriggered = json['canBeRetriggered'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'article': JsonConverters.toJson(article,'List<Article>',context!),
        'warrantyId': warrantyId,
        'createdBy': createdBy,
        'createdAt': createdAt,
        'issuedBy': issuedBy,
        'selloutId': selloutId,
        'activationDate': activationDate,
        'pin': pin,
        'promoterTypeId': promoterTypeId,
        'promoterTypeDs': promoterTypeDs,
        'site': JsonConverters.toJson(site,'Site',context!),
        'crmEnabled': crmEnabled,
        'canBeExtended': canBeExtended,
        'canBeRetriggered': canBeRetriggered
    };

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

class ListWarrantyCardsResponse extends BaseResponse implements IConvertible
{
    List<Warranty>? warranty;

    ListWarrantyCardsResponse({this.warranty});
    ListWarrantyCardsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        warranty = JsonConverters.fromJson(json['warranty'],'List<Warranty>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'warranty': JsonConverters.toJson(warranty,'List<Warranty>',context!)
    });

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

class ListWarrantyCardsRequest extends BaseRequest<ListWarrantyCardsResponse> implements IConvertible
{
    String? user;
    String? site;
    String? system;
    String? application;
    String? article;
    String? ref;
    String? serial;
    int? page;
    int? size;

    ListWarrantyCardsRequest({this.user,this.site,this.system,this.application,this.article,this.ref,this.serial,this.page,this.size});
    ListWarrantyCardsRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        user = json['user'];
        site = json['site'];
        system = json['system'];
        application = json['application'];
        article = json['article'];
        ref = json['ref'];
        serial = json['serial'];
        page = json['page'];
        size = json['size'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'user': user,
        'site': site,
        'system': system,
        'application': application,
        'article': article,
        'ref': ref,
        'serial': serial,
        'page': page,
        'size': size
    });

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

TypeContext _ctx = TypeContext(library: 'qp_microservices_booster.richemont.com', types: <String, TypeInfo> {
    'BaseRequest<TResponse>': TypeInfo(TypeOf.Class, create:() => BaseRequest<TResponse>()),
    'BaseResponse': TypeInfo(TypeOf.Class, create:() => BaseResponse()),
    'LookupInt': TypeInfo(TypeOf.Class, create:() => LookupInt()),
    'Article': TypeInfo(TypeOf.Class, create:() => Article()),
    'Address': TypeInfo(TypeOf.Class, create:() => Address()),
    'Site': TypeInfo(TypeOf.Class, create:() => Site()),
    'Warranty': TypeInfo(TypeOf.Class, create:() => Warranty()),
    'List<Article>': TypeInfo(TypeOf.Class, create:() => <Article>[]),
    'ListWarrantyCardsResponse': TypeInfo(TypeOf.Class, create:() => ListWarrantyCardsResponse()),
    'List<Warranty>': TypeInfo(TypeOf.Class, create:() => <Warranty>[]),
    'ListWarrantyCardsRequest': TypeInfo(TypeOf.Class, create:() => ListWarrantyCardsRequest()),
});

Dart ListWarrantyCardsRequest DTOs

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

HTTP + OTHER

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

GET /warranty/v1/cards HTTP/1.1 
Host: qp-microservices-booster.richemont.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"warranty":[{"article":[{"ref":"String","serial":"String","name":"String","shortDesc":"String","brand":"String","warrantyStatusId":0,"warrantyStatusDesc":"String","warrantyStatusCode":"String","isConsignment":false}],"warrantyId":"String","createdBy":"String","createdAt":"String","issuedBy":"String","selloutId":"String","activationDate":"String","pin":"String","promoterTypeId":"String","promoterTypeDs":"String","site":{"object":"String","id":"String","name":"String","address":{"line1":"String","line2":"String","city":"String","zipCode":"String","countryCode":"String"},"crmPrivacyPolicyMandatory":false,"crmAllowStoreDataAbroadVisible":false,"isTimeVallee":false,"crmPrivacyPolicyTimeValleeMandatory":false,"crmAllowStoreDataAbroadTimeValleeVisible":false,"allowToCreateEndCustomerOutsideChina":false,"displayFirstLastNameNotLatin":false,"languageTransliteration":"String","doNotDisplayPOSDataInDisclaimers":false,"crmFirstNameMandatory":false,"crmCityMandatory":false,"manageOwnStock":false},"crmEnabled":false,"canBeExtended":false,"canBeRetriggered":false}],"_xmlns":"String","_type":"String","_source":"String","_tstamp":"String","_user":"String","_env":"String","_uri":"String","_query":"String"}