Richemont.Booster2.PublicApi

<back to all web services

GetMovements

Requires Authentication
The following routes are available for this service:
GET/stock/{brand}/movementGet movements
import 'package:servicestack/servicestack.dart';

class MovementsRequest implements IConvertible
{
    /**
    * Brand
    */
    // @ApiMember(Description="Brand", IsRequired=true)
    String? brand;

    /**
    * POS Legacy
    */
    // @ApiMember(Description="POS Legacy", IsRequired=true)
    List<String>? posCodes;

    /**
    * Movement Type Ids
    */
    // @ApiMember(Description="Movement Type Ids")
    List<int>? movementTypeIds;

    /**
    * Search Key (Article or SerialNumber)
    */
    // @ApiMember(Description="Search Key (Article or SerialNumber)")
    String? searchKey;

    /**
    * In Stock Since date from 
    */
    // @ApiMember(Description="In Stock Since date from ")
    DateTime? dateFrom;

    /**
    * In Stock Since date to
    */
    // @ApiMember(Description="In Stock Since date to")
    DateTime? dateTo;

    /**
    * Sort by date could be: 'DateDESC' or 'DateASC' (default is descending) 
    */
    // @ApiMember(Description="Sort by date could be: 'DateDESC' or 'DateASC' (default is descending) ")
    String? sortBy;

    MovementsRequest({this.brand,this.posCodes,this.movementTypeIds,this.searchKey,this.dateFrom,this.dateTo,this.sortBy});
    MovementsRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        brand = json['brand'];
        posCodes = JsonConverters.fromJson(json['posCodes'],'List<String>',context!);
        movementTypeIds = JsonConverters.fromJson(json['movementTypeIds'],'List<int>',context!);
        searchKey = json['searchKey'];
        dateFrom = JsonConverters.fromJson(json['dateFrom'],'DateTime',context!);
        dateTo = JsonConverters.fromJson(json['dateTo'],'DateTime',context!);
        sortBy = json['sortBy'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'brand': brand,
        'posCodes': JsonConverters.toJson(posCodes,'List<String>',context!),
        'movementTypeIds': JsonConverters.toJson(movementTypeIds,'List<int>',context!),
        'searchKey': searchKey,
        'dateFrom': JsonConverters.toJson(dateFrom,'DateTime',context!),
        'dateTo': JsonConverters.toJson(dateTo,'DateTime',context!),
        'sortBy': sortBy
    };

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

class Movement implements IConvertible
{
    /**
    * Movement Id
    */
    // @ApiMember(Description="Movement Id", IsRequired=true)
    int? movementId;

    /**
    * Pos Code
    */
    // @ApiMember(Description="Pos Code", IsRequired=true)
    String? posCode;

    /**
    * Pos Name
    */
    // @ApiMember(Description="Pos Name", IsRequired=true)
    String? posName;

    /**
    * Created By
    */
    // @ApiMember(Description="Created By", IsRequired=true)
    String? createdBy;

    /**
    * Movement Date
    */
    // @ApiMember(Description="Movement Date", IsRequired=true)
    String? movementDate;

    /**
    * Article Code
    */
    // @ApiMember(Description="Article Code", IsRequired=true)
    String? articleCode;

    /**
    * Serial Number
    */
    // @ApiMember(Description="Serial Number", IsRequired=true)
    String? serialNumber;

    /**
    * Quantity
    */
    // @ApiMember(Description="Quantity", IsRequired=true)
    int? quantity;

    /**
    * Movement Type Id
    */
    // @ApiMember(Description="Movement Type Id", IsRequired=true)
    int? movementTypeId;

    /**
    * Comments
    */
    // @ApiMember(Description="Comments", IsRequired=true)
    String? comments;

    Movement({this.movementId,this.posCode,this.posName,this.createdBy,this.movementDate,this.articleCode,this.serialNumber,this.quantity,this.movementTypeId,this.comments});
    Movement.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        movementId = json['movementId'];
        posCode = json['posCode'];
        posName = json['posName'];
        createdBy = json['createdBy'];
        movementDate = json['movementDate'];
        articleCode = json['articleCode'];
        serialNumber = json['serialNumber'];
        quantity = json['quantity'];
        movementTypeId = json['movementTypeId'];
        comments = json['comments'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'movementId': movementId,
        'posCode': posCode,
        'posName': posName,
        'createdBy': createdBy,
        'movementDate': movementDate,
        'articleCode': articleCode,
        'serialNumber': serialNumber,
        'quantity': quantity,
        'movementTypeId': movementTypeId,
        'comments': comments
    };

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

class GetMovementsResponse implements IConvertible
{
    /**
    * Total Pages
    */
    // @ApiMember(Description="Total Pages", IsRequired=true)
    int? totalPages;

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

    /**
    * 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;

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

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

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

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

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

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

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

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

    GetMovements({this.page,this.items,this.noCount});
    GetMovements.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

TypeContext _ctx = TypeContext(library: 'dev_api_booster.richemont.com', types: <String, TypeInfo> {
    'MovementsRequest': TypeInfo(TypeOf.Class, create:() => MovementsRequest()),
    'Movement': TypeInfo(TypeOf.Class, create:() => Movement()),
    'GetMovementsResponse': TypeInfo(TypeOf.Class, create:() => GetMovementsResponse()),
    'List<Movement>': TypeInfo(TypeOf.Class, create:() => <Movement>[]),
    'GetMovements': TypeInfo(TypeOf.Class, create:() => GetMovements()),
});

Dart GetMovements 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 /stock/{brand}/movement HTTP/1.1 
Host: dev-api-booster.richemont.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"totalPages":0,"totalResults":0,"page":0,"items":0}