| PATCH | /warranty/equipment | Update Equipment Warranty | Update Equipment Warranty API |
|---|
import 'package:servicestack/servicestack.dart';
class UpdateEquipmentWarrantyResponse implements IConvertible
{
/**
* Equipment number
*/
// @ApiMember(Description="Equipment number", IsRequired=true)
String? equipment;
/**
* Warranty type
*/
// @ApiMember(Description="Warranty type", IsRequired=true)
String? warrantyType;
/**
* Master warranty
*/
// @ApiMember(Description="Master warranty", IsRequired=true)
String? masterWarranty;
/**
* Warranty start date
*/
// @ApiMember(Description="Warranty start date", IsRequired=true)
String? warrantyStartDate;
/**
* Warranty end date
*/
// @ApiMember(Description="Warranty end date")
String? warrantyEndDate;
/**
* Warranty creation date
*/
// @ApiMember(Description="Warranty creation date", IsRequired=true)
String? warrantyCreationDate;
/**
* Warranty creation time
*/
// @ApiMember(Description="Warranty creation time", IsRequired=true)
String? warrantyCreationTime;
/**
* Object number (ERP)
*/
// @ApiMember(Description="Object number (ERP)", IsRequired=true)
String? objectNumber;
/**
* Sales Force Sellout ID
*/
// @ApiMember(Description="Sales Force Sellout ID", IsRequired=true)
String? sfSelloutId;
UpdateEquipmentWarrantyResponse({this.equipment,this.warrantyType,this.masterWarranty,this.warrantyStartDate,this.warrantyEndDate,this.warrantyCreationDate,this.warrantyCreationTime,this.objectNumber,this.sfSelloutId});
UpdateEquipmentWarrantyResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
equipment = json['equipment'];
warrantyType = json['warrantyType'];
masterWarranty = json['masterWarranty'];
warrantyStartDate = json['warrantyStartDate'];
warrantyEndDate = json['warrantyEndDate'];
warrantyCreationDate = json['warrantyCreationDate'];
warrantyCreationTime = json['warrantyCreationTime'];
objectNumber = json['objectNumber'];
sfSelloutId = json['sfSelloutId'];
return this;
}
Map<String, dynamic> toJson() => {
'equipment': equipment,
'warrantyType': warrantyType,
'masterWarranty': masterWarranty,
'warrantyStartDate': warrantyStartDate,
'warrantyEndDate': warrantyEndDate,
'warrantyCreationDate': warrantyCreationDate,
'warrantyCreationTime': warrantyCreationTime,
'objectNumber': objectNumber,
'sfSelloutId': sfSelloutId
};
getTypeName() => "UpdateEquipmentWarrantyResponse";
TypeContext? context = _ctx;
}
class UpdateEquipmentWarranty implements IConvertible
{
/**
* Brand Trigram, e.g. CAR, IWC
*/
// @ApiMember(Description="Brand Trigram, e.g. CAR, IWC", IsRequired=true)
String? brand;
/**
* POS code, e.g. 102048
*/
// @ApiMember(Description="POS code, e.g. 102048", IsRequired=true)
String? posCode;
/**
* Equipment number, e.g. 1234567890
*/
// @ApiMember(Description="Equipment number, e.g. 1234567890", IsRequired=true)
String? equipmentNumber;
/**
* Warranty type, e.g. 3
*/
// @ApiMember(Description="Warranty type, e.g. 3", IsRequired=true)
String? warrantyType;
/**
* Date of the warranty start date e.g. 2025-06-01
*/
// @ApiMember(Description="Date of the warranty start date e.g. 2025-06-01", IsRequired=true)
DateTime? warrantyStartDate;
UpdateEquipmentWarranty({this.brand,this.posCode,this.equipmentNumber,this.warrantyType,this.warrantyStartDate});
UpdateEquipmentWarranty.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
brand = json['brand'];
posCode = json['posCode'];
equipmentNumber = json['equipmentNumber'];
warrantyType = json['warrantyType'];
warrantyStartDate = JsonConverters.fromJson(json['warrantyStartDate'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'brand': brand,
'posCode': posCode,
'equipmentNumber': equipmentNumber,
'warrantyType': warrantyType,
'warrantyStartDate': JsonConverters.toJson(warrantyStartDate,'DateTime',context!)
};
getTypeName() => "UpdateEquipmentWarranty";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'dev_api_booster.richemont.com', types: <String, TypeInfo> {
'UpdateEquipmentWarrantyResponse': TypeInfo(TypeOf.Class, create:() => UpdateEquipmentWarrantyResponse()),
'UpdateEquipmentWarranty': TypeInfo(TypeOf.Class, create:() => UpdateEquipmentWarranty()),
});
Dart UpdateEquipmentWarranty DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PATCH /warranty/equipment HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"brand":"String","posCode":"String","equipmentNumber":"String","warrantyType":"String","warrantyStartDate":"\/Date(-62135596800000-0000)\/"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"equipment":"String","warrantyType":"String","masterWarranty":"String","warrantyStartDate":"String","warrantyEndDate":"String","warrantyCreationDate":"String","warrantyCreationTime":"String","objectNumber":"String","sfSelloutId":"String"}