Richemont.Booster2.PublicApi

<back to all web services

ExtendSellOut

Requires Authentication
The following routes are available for this service:
POST/warranty/{saleDetailId}/extendExtend a Sell-OutDelete a sell-out you are authorized for
import 'package:servicestack/servicestack.dart';

class Status implements IConvertible
{
    /**
    * Unique Identifier of the Sell-out created in Booster
    */
    // @ApiMember(Description="Unique Identifier of the Sell-out created in Booster", IsRequired=true)
    String? id;

    /**
    * Unique Identifier of the Sell-out created in Booster
    */
    // @ApiMember(Description="Unique Identifier of the Sell-out created in Booster", IsRequired=true)
    String? description;

    Status({this.id,this.description});
    Status.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class StatusWarrantyExtension extends Status implements IConvertible
{
    /**
    * Information about if a warranty can be retriggered
    */
    // @ApiMember(Description="Information about if a warranty can be retriggered", IsRequired=true)
    bool? retriggerEnabled;

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

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

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

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

class ExtendSellOutResponse implements IConvertible
{
    /**
    * ccp substatus information
    */
    // @ApiMember(Description="ccp substatus information", IsRequired=true)
    StatusWarrantyExtension? ccpStatus;

    /**
    * ccp main status information
    */
    // @ApiMember(Description="ccp main status information", IsRequired=true)
    Status? boosterStatus;

    ExtendSellOutResponse({this.ccpStatus,this.boosterStatus});
    ExtendSellOutResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ccpStatus = JsonConverters.fromJson(json['ccpStatus'],'StatusWarrantyExtension',context!);
        boosterStatus = JsonConverters.fromJson(json['boosterStatus'],'Status',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ccpStatus': JsonConverters.toJson(ccpStatus,'StatusWarrantyExtension',context!),
        'boosterStatus': JsonConverters.toJson(boosterStatus,'Status',context!)
    };

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

class ExtendSellOut implements IConvertible
{
    /**
    * Unique Identifier of the Sell-out created in Booster
    */
    // @ApiMember(Description="Unique Identifier of the Sell-out created in Booster", IsRequired=true)
    int? saleDetailId;

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

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

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

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

TypeContext _ctx = TypeContext(library: 'dev_api_booster.richemont.com', types: <String, TypeInfo> {
    'Status': TypeInfo(TypeOf.Class, create:() => Status()),
    'StatusWarrantyExtension': TypeInfo(TypeOf.Class, create:() => StatusWarrantyExtension()),
    'ExtendSellOutResponse': TypeInfo(TypeOf.Class, create:() => ExtendSellOutResponse()),
    'ExtendSellOut': TypeInfo(TypeOf.Class, create:() => ExtendSellOut()),
});

Dart ExtendSellOut DTOs

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

HTTP + CSV

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

POST /warranty/{saleDetailId}/extend HTTP/1.1 
Host: dev-api-booster.richemont.com 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"saleDetailId":0}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"ccpStatus":{"retriggerEnabled":false,"id":"String","description":"String"},"boosterStatus":{"id":"String","description":"String"}}