| POST | /warranty/{saleDetailId}/extend | Extend a Sell-Out | Delete 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()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
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: application/xml
Content-Type: application/xml
Content-Length: length
<ExtendSellOut xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.Sellout.ServiceModel">
<saleDetailId>0</saleDetailId>
</ExtendSellOut>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<ExtendSellOutResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.Sellout.ServiceModel">
<boosterStatus>
<description>String</description>
<id>String</id>
</boosterStatus>
<ccpStatus>
<description>String</description>
<id>String</id>
<retriggerEnabled>false</retriggerEnabled>
</ccpStatus>
</ExtendSellOutResponse>