Richemont.Booster2.PublicApi

<back to all web services

ExportMovement

Requires Authentication
The following routes are available for this service:
POST/stock/{brand}/movement/exportExport Stock Movement Data
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 ExportMovementResponse implements IConvertible
{
    /**
    * Unique Identifier of the Export Request created
    */
    // @ApiMember(Description="Unique Identifier of the Export Request created", IsRequired=true)
    String? asyncTaskId;

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

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

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

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

class ExportMovement extends MovementsRequest implements IConvertible
{
    /**
    * Export Request ID of the API Consumers
    */
    // @ApiMember(Description="Export Request ID of the API Consumers", IsRequired=true)
    String? downloadRequestId;

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

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

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

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

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

Dart ExportMovement 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.

POST /stock/{brand}/movement/export HTTP/1.1 
Host: dev-api-booster.richemont.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<ExportMovement xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.Stock.ServiceModel">
  <brand>String</brand>
  <dateFrom>0001-01-01T00:00:00</dateFrom>
  <dateTo>0001-01-01T00:00:00</dateTo>
  <movementTypeIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>0</d2p1:int>
  </movementTypeIds>
  <posCodes xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </posCodes>
  <searchKey>String</searchKey>
  <sortBy>String</sortBy>
  <downloadRequestId>String</downloadRequestId>
</ExportMovement>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ExportMovementResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.Stock.ServiceModel">
  <asyncTaskId>00000000-0000-0000-0000-000000000000</asyncTaskId>
</ExportMovementResponse>