Richemont.Booster2.PublicApi

<back to all web services

GetPurchasablePos

Requires Authentication
The following routes are available for this service:
GET/purchase/posGet a list of authorized pos that can place orders
import 'package:servicestack/servicestack.dart';

class Pos implements IConvertible
{
    /**
    * POS Code
    */
    // @ApiMember(Description="POS Code", IsRequired=true)
    String? posCode;

    /**
    * Name of the POS
    */
    // @ApiMember(Description="Name of the POS", IsRequired=true)
    String? name;

    /**
    * City of the POS
    */
    // @ApiMember(Description="City of the POS", IsRequired=true)
    String? city;

    /**
    * Address of the POS
    */
    // @ApiMember(Description="Address of the POS", IsRequired=true)
    String? address;

    /**
    * Country of the POS
    */
    // @ApiMember(Description="Country of the POS", IsRequired=true)
    String? country;

    /**
    * Brand of the POS
    */
    // @ApiMember(Description="Brand of the POS", IsRequired=true)
    String? brand;

    Pos({this.posCode,this.name,this.city,this.address,this.country,this.brand});
    Pos.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'posCode': posCode,
        'name': name,
        'city': city,
        'address': address,
        'country': country,
        'brand': brand
    };

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

class GetPurchasablePosResponse implements IConvertible
{
    /**
    * Index of the result set returnedr
    */
    // @ApiMember(Description="Index of the result set returnedr", IsRequired=true)
    int? page;

    /**
    * Size of the result set returned
    */
    // @ApiMember(Description="Size of the result set returned", IsRequired=true)
    int? items;

    /**
    * Total amount of pages / result sets
    */
    // @ApiMember(Description="Total amount of pages / result sets", IsRequired=true)
    int? totalPages;

    /**
    * Total amount of results
    */
    // @ApiMember(Description="Total amount of results", IsRequired=true)
    int? totalResults;

    /**
    * List of Pos
    */
    // @ApiMember(Description="List of Pos", IsRequired=true)
    List<Pos>? elements;

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

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

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

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

class GetPurchasablePos implements IPagedRequest, IConvertible
{
    /**
    * Index of the result set returned
    */
    // @ApiMember(Description="Index of the result set returned", IsRequired=true)
    int? page;

    /**
    * Size of the result set returned
    */
    // @ApiMember(Description="Size of the result set returned", IsRequired=true)
    int? items;

    /**
    * Omit precise record count - save on performance
    */
    // @ApiMember(Description="Omit precise record count - save on performance")
    bool? noCount;

    /**
    * Sorting expression
    */
    // @ApiMember(Description="Sorting expression")
    String? sortBy;

    /**
    * Brand Trigram
    */
    // @ApiMember(Description="Brand Trigram", IsRequired=true)
    String? brand;

    /**
    * Brand Context ID
    */
    // @ApiMember(Description="Brand Context ID")
    String? boosterContextId;

    GetPurchasablePos({this.page,this.items,this.noCount,this.sortBy,this.brand,this.boosterContextId});
    GetPurchasablePos.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'page': page,
        'items': items,
        'noCount': noCount,
        'sortBy': sortBy,
        'brand': brand,
        'boosterContextId': boosterContextId
    };

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

TypeContext _ctx = TypeContext(library: 'dev_api_booster.richemont.com', types: <String, TypeInfo> {
    'Pos': TypeInfo(TypeOf.Class, create:() => Pos()),
    'GetPurchasablePosResponse': TypeInfo(TypeOf.Class, create:() => GetPurchasablePosResponse()),
    'List<Pos>': TypeInfo(TypeOf.Class, create:() => <Pos>[]),
    'GetPurchasablePos': TypeInfo(TypeOf.Class, create:() => GetPurchasablePos()),
});

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

<GetPurchasablePosResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.Purchase.ServiceModel">
  <elements i:nil="true" />
  <items>0</items>
  <page>0</page>
  <totalPages>0</totalPages>
  <totalResults>0</totalResults>
</GetPurchasablePosResponse>