Booster.Microservices

<back to all web services

ListWarrantyCardsPagedRequest

Requires Authentication
The following routes are available for this service:
GET/warranty/v1/cards/paged
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 ListWarrantyCardsPagedResponse extends BaseResponse implements IConvertible
{
    int? page;
    int? items;
    int? totalPages;
    int? totalResults;
    List<Warranty>? elements;

    ListWarrantyCardsPagedResponse({this.page,this.items,this.totalPages,this.totalResults,this.elements});
    ListWarrantyCardsPagedResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'page': page,
        'items': items,
        'totalPages': totalPages,
        'totalResults': totalResults,
        'elements': JsonConverters.toJson(elements,'List<Warranty>',context!)
    });

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

class ListWarrantyCardsPagedRequest extends BaseRequest<ListWarrantyCardsPagedResponse> implements IPagedRequest, IConvertible
{
    String? referenceId;
    String? serial;
    String? brand;
    int? siteId;
    int? page;
    int? items;
    bool? noCount;
    String? sortBy;

    ListWarrantyCardsPagedRequest({this.referenceId,this.serial,this.brand,this.siteId,this.page,this.items,this.noCount,this.sortBy});
    ListWarrantyCardsPagedRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        referenceId = json['referenceId'];
        serial = json['serial'];
        brand = json['brand'];
        siteId = json['siteId'];
        page = json['page'];
        items = json['items'];
        noCount = json['noCount'];
        sortBy = json['sortBy'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'referenceId': referenceId,
        'serial': serial,
        'brand': brand,
        'siteId': siteId,
        'page': page,
        'items': items,
        'noCount': noCount,
        'sortBy': sortBy
    });

    getTypeName() => "ListWarrantyCardsPagedRequest";
    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>[]),
    'ListWarrantyCardsPagedResponse': TypeInfo(TypeOf.Class, create:() => ListWarrantyCardsPagedResponse()),
    'List<Warranty>': TypeInfo(TypeOf.Class, create:() => <Warranty>[]),
    'ListWarrantyCardsPagedRequest': TypeInfo(TypeOf.Class, create:() => ListWarrantyCardsPagedRequest()),
});

Dart ListWarrantyCardsPagedRequest 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/paged HTTP/1.1 
Host: qp-microservices-booster.richemont.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"page":0,"items":0,"totalPages":0,"totalResults":0,"_xmlns":"String","_type":"String","_source":"String","_tstamp":"String","_user":"String","_env":"String","_uri":"String","_query":"String"}