Richemont.Booster2.PublicApi

<back to all web services

GetTask

Requires Authentication
The following routes are available for this service:
GET/tasksGet tasks of authorized user
import 'package:servicestack/servicestack.dart';

class Task implements IConvertible
{
    /**
    * Async task ID
    */
    // @ApiMember(Description="Async task ID", IsRequired=true)
    String? asyncTaskId;

    /**
    * Type of requested async task, e.g 'stock', 'sellout', 'crm'
    */
    // @ApiMember(Description="Type of requested async task, e.g 'stock', 'sellout', 'crm'", IsRequired=true)
    String? type;

    /**
    * Async task creation date
    */
    // @ApiMember(Description="Async task creation date", IsRequired=true)
    String? requestDate;

    /**
    * Status of requested async task, e.g 'REQ', 'INP', 'COM', 'ERR'
    */
    // @ApiMember(Description="Status of requested async task, e.g 'REQ', 'INP', 'COM', 'ERR'", IsRequired=true)
    String? status;

    /**
    * Percentage of completion
    */
    // @ApiMember(Description="Percentage of completion", IsRequired=true)
    int? percentage;

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

    /**
    * Download url of created files
    */
    // @ApiMember(Description="Download url of created files")
    String? downloadUrl;

    /**
    * Presigned expiring download url
    */
    // @ApiMember(Description="Presigned expiring download url")
    String? signedDownloadUrl;

    /**
    * Total count of operations
    */
    // @ApiMember(Description="Total count of operations")
    int? totalResults;

    /**
    * Count of successful operations
    */
    // @ApiMember(Description="Count of successful operations")
    int? totalSucceeded;

    /**
    * Count of failed operations
    */
    // @ApiMember(Description="Count of failed operations")
    int? totalFailed;

    Task({this.asyncTaskId,this.type,this.requestDate,this.status,this.percentage,this.brand,this.downloadUrl,this.signedDownloadUrl,this.totalResults,this.totalSucceeded,this.totalFailed});
    Task.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        asyncTaskId = json['asyncTaskId'];
        type = json['type'];
        requestDate = json['requestDate'];
        status = json['status'];
        percentage = json['percentage'];
        brand = json['brand'];
        downloadUrl = json['downloadUrl'];
        signedDownloadUrl = json['signedDownloadUrl'];
        totalResults = json['totalResults'];
        totalSucceeded = json['totalSucceeded'];
        totalFailed = json['totalFailed'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'asyncTaskId': asyncTaskId,
        'type': type,
        'requestDate': requestDate,
        'status': status,
        'percentage': percentage,
        'brand': brand,
        'downloadUrl': downloadUrl,
        'signedDownloadUrl': signedDownloadUrl,
        'totalResults': totalResults,
        'totalSucceeded': totalSucceeded,
        'totalFailed': totalFailed
    };

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

class GetTaskResponse extends ListBase<Task> implements IConvertible
{
    final List<Task> l = [];
    set length(int newLength) { l.length = newLength; }
    int get length => l.length;
    Task operator [](int index) => l[index];
    void operator []=(int index, Task value) { l[index] = value; }
    GetTaskResponse();
    GetTaskResponse.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "GetTaskResponse";
    TypeContext? context = _ctx;
}

class GetTask implements IConvertible
{
    GetTask();
    GetTask.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "GetTask";
    TypeContext? context = _ctx;
}

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

Dart GetTask DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

GET /tasks HTTP/1.1 
Host: dev-api-booster.richemont.com 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

[]