| GET | /warranty | Get a list of Sale Details | Get a list of Sale Details based on the search parameters submitted |
|---|
import 'package:servicestack/servicestack.dart';
class SaleDetail 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? saleId;
/**
* Unique Identifier of the Sell-out created in Booster
*/
// @ApiMember(Description="Unique Identifier of the Sell-out created in Booster", IsRequired=true)
int? saleDetailId;
/**
* Booster Customer Id
*/
// @ApiMember(Description="Booster Customer Id")
int? boosterCustomerId;
/**
* Richemont POS code
*/
// @ApiMember(Description="Richemont POS code", IsRequired=true)
String? posCode;
/**
* Receipt or Invoice Number
*/
// @ApiMember(Description="Receipt or Invoice Number")
String? documentNumber;
/**
* Date of the Sell-out
*/
// @ApiMember(Description="Date of the Sell-out", IsRequired=true)
String? documentDate;
/**
* Position Number
*/
// @ApiMember(Description="Position Number")
int? documentLineNumber;
/**
* Richemont Reference Code of the item
*/
// @ApiMember(Description="Richemont Reference Code of the item", IsRequired=true)
String? articleCode;
/**
* Serial Number of the item
*/
// @ApiMember(Description="Serial Number of the item")
String? serialNumber;
/**
* Use positive for standard Sell-out and negative quantity for return
*/
// @ApiMember(Description="Use positive for standard Sell-out and negative quantity for return", IsRequired=true)
int? quantity;
/**
* Retail Price
*/
// @ApiMember(Description="Retail Price")
double? retailPrice;
/**
* Sold Price
*/
// @ApiMember(Description="Sold Price")
double? unitPrice;
/**
* Currency of the sold price
*/
// @ApiMember(Description="Currency of the sold price")
String? currencyCode;
/**
* CCP Status Code
*/
// @ApiMember(Description="CCP Status Code")
String? ccpStatusCode;
/**
* CCP Status Description
*/
// @ApiMember(Description="CCP Status Description")
String? ccpStatusDescription;
/**
* CCP Retrigger enable
*/
// @ApiMember(Description="CCP Retrigger enable")
bool? retriggerEnabled;
/**
* Warranty Extention Status
*/
// @ApiMember(Description="Warranty Extention Status")
int? warrantyExtentionStatusId;
/**
* Warranty Extention Status
*/
// @ApiMember(Description="Warranty Extention Status")
String? warrantyExtentionStatusDescription;
/**
* Sale Representative Email
*/
// @ApiMember(Description="Sale Representative Email")
List<String>? saleRepresentativeEmails;
/**
* Promoter Type IDs, possible values are: DAI, FIT, GRT
*/
// @ApiMember(Description="Promoter Type IDs, possible values are: DAI, FIT, GRT")
String? promoterTypeId;
/**
* Sellout Type, possible values are: 'standard' or 'consigned'
*/
// @ApiMember(Description="Sellout Type, possible values are: 'standard' or 'consigned'", IsRequired=true)
String? type;
/**
* Original Sale Detail Id
*/
// @ApiMember(Description="Original Sale Detail Id")
int? originalSaleDetailId;
SaleDetail({this.saleId,this.saleDetailId,this.boosterCustomerId,this.posCode,this.documentNumber,this.documentDate,this.documentLineNumber,this.articleCode,this.serialNumber,this.quantity,this.retailPrice,this.unitPrice,this.currencyCode,this.ccpStatusCode,this.ccpStatusDescription,this.retriggerEnabled,this.warrantyExtentionStatusId,this.warrantyExtentionStatusDescription,this.saleRepresentativeEmails,this.promoterTypeId,this.type,this.originalSaleDetailId});
SaleDetail.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
saleId = json['saleId'];
saleDetailId = json['saleDetailId'];
boosterCustomerId = json['boosterCustomerId'];
posCode = json['posCode'];
documentNumber = json['documentNumber'];
documentDate = json['documentDate'];
documentLineNumber = json['documentLineNumber'];
articleCode = json['articleCode'];
serialNumber = json['serialNumber'];
quantity = json['quantity'];
retailPrice = JsonConverters.toDouble(json['retailPrice']);
unitPrice = JsonConverters.toDouble(json['unitPrice']);
currencyCode = json['currencyCode'];
ccpStatusCode = json['ccpStatusCode'];
ccpStatusDescription = json['ccpStatusDescription'];
retriggerEnabled = json['retriggerEnabled'];
warrantyExtentionStatusId = json['warrantyExtentionStatusId'];
warrantyExtentionStatusDescription = json['warrantyExtentionStatusDescription'];
saleRepresentativeEmails = JsonConverters.fromJson(json['saleRepresentativeEmails'],'List<String>',context!);
promoterTypeId = json['promoterTypeId'];
type = json['type'];
originalSaleDetailId = json['originalSaleDetailId'];
return this;
}
Map<String, dynamic> toJson() => {
'saleId': saleId,
'saleDetailId': saleDetailId,
'boosterCustomerId': boosterCustomerId,
'posCode': posCode,
'documentNumber': documentNumber,
'documentDate': documentDate,
'documentLineNumber': documentLineNumber,
'articleCode': articleCode,
'serialNumber': serialNumber,
'quantity': quantity,
'retailPrice': retailPrice,
'unitPrice': unitPrice,
'currencyCode': currencyCode,
'ccpStatusCode': ccpStatusCode,
'ccpStatusDescription': ccpStatusDescription,
'retriggerEnabled': retriggerEnabled,
'warrantyExtentionStatusId': warrantyExtentionStatusId,
'warrantyExtentionStatusDescription': warrantyExtentionStatusDescription,
'saleRepresentativeEmails': JsonConverters.toJson(saleRepresentativeEmails,'List<String>',context!),
'promoterTypeId': promoterTypeId,
'type': type,
'originalSaleDetailId': originalSaleDetailId
};
getTypeName() => "SaleDetail";
TypeContext? context = _ctx;
}
class GetSaleDetailsResponse implements IConvertible
{
/**
* Index of the result set returnedr
*/
// @ApiMember(Description="Index of the result set returnedr", IsRequired=true)
int? page;
/**
* Size of the result set returned
*/
// @ApiMember(Description="Size of the result set returned", IsRequired=true)
int? items;
/**
* Total amount of pages / result sets
*/
// @ApiMember(Description="Total amount of pages / result sets", IsRequired=true)
int? totalPages;
/**
* Total amount of results
*/
// @ApiMember(Description="Total amount of results", IsRequired=true)
int? totalResults;
/**
* List of Sale Details
*/
// @ApiMember(Description="List of Sale Details", IsRequired=true)
List<SaleDetail>? elements;
GetSaleDetailsResponse({this.page,this.items,this.totalPages,this.totalResults,this.elements});
GetSaleDetailsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
page = json['page'];
items = json['items'];
totalPages = json['totalPages'];
totalResults = json['totalResults'];
elements = JsonConverters.fromJson(json['elements'],'List<SaleDetail>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'page': page,
'items': items,
'totalPages': totalPages,
'totalResults': totalResults,
'elements': JsonConverters.toJson(elements,'List<SaleDetail>',context!)
};
getTypeName() => "GetSaleDetailsResponse";
TypeContext? context = _ctx;
}
class ProductCategory implements IConvertible
{
/**
* Brand Category ID
*/
// @ApiMember(Description="Brand Category ID")
String? brandCategoryId;
/**
* Grand Category ID
*/
// @ApiMember(Description="Grand Category ID", IsRequired=true)
String? grandCategoryId;
/**
* Master Category ID
*/
// @ApiMember(Description="Master Category ID")
String? masterCategoryId;
/**
* Category ID
*/
// @ApiMember(Description="Category ID")
String? categoryId;
/**
* Sub Category ID
*/
// @ApiMember(Description="Sub Category ID")
String? subCategoryId;
ProductCategory({this.brandCategoryId,this.grandCategoryId,this.masterCategoryId,this.categoryId,this.subCategoryId});
ProductCategory.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
brandCategoryId = json['brandCategoryId'];
grandCategoryId = json['grandCategoryId'];
masterCategoryId = json['masterCategoryId'];
categoryId = json['categoryId'];
subCategoryId = json['subCategoryId'];
return this;
}
Map<String, dynamic> toJson() => {
'brandCategoryId': brandCategoryId,
'grandCategoryId': grandCategoryId,
'masterCategoryId': masterCategoryId,
'categoryId': categoryId,
'subCategoryId': subCategoryId
};
getTypeName() => "ProductCategory";
TypeContext? context = _ctx;
}
class GetSaleDetails implements IPagedRequest, IConvertible
{
/**
* Richemont Brand ID
*/
// @ApiMember(Description="Richemont Brand ID", IsRequired=true)
String? brand;
/**
* Richemont POS code
*/
// @ApiMember(Description="Richemont POS code", IsRequired=true)
String? posCode;
/**
* Receipt or Invoice Number
*/
// @ApiMember(Description="Receipt or Invoice Number")
String? documentNumber;
/**
* Date of the Sell-out Start
*/
// @ApiMember(Description="Date of the Sell-out Start ")
DateTime? documentDateFrom;
/**
* Date of the Sell-out End
*/
// @ApiMember(Description="Date of the Sell-out End")
DateTime? documentDateTo;
/**
* Richemont Reference Code of the item
*/
// @ApiMember(Description="Richemont Reference Code of the item")
String? articleCode;
/**
* Serial Number of the item
*/
// @ApiMember(Description="Serial Number of the item")
String? serialNumber;
/**
* Unique Identifier of the Sell-out created in Booster
*/
// @ApiMember(Description="Unique Identifier of the Sell-out created in Booster")
int? saleDetailId;
/**
* Unique Identifier of the Sell-out created in Booster
*/
// @ApiMember(Description="Unique Identifier of the Sell-out created in Booster")
int? saleId;
/**
* Booster Customer Id
*/
// @ApiMember(Description="Booster Customer Id")
int? boosterCustomerId;
/**
* Possible warranty extention status IDs, 1 (Activated), 2 (Requested), 3 (Refused), 4 (Error), 5 (Action Required), 6 (Pending)
*/
// @ApiMember(Description="Possible warranty extention status IDs, 1 (Activated), 2 (Requested), 3 (Refused), 4 (Error), 5 (Action Required), 6 (Pending)")
List<int>? warrantyExtensionStatusIds;
/**
* Product Categories
*/
// @ApiMember(Description="Product Categories")
List<ProductCategory>? productCategories;
/**
* Index of the result set returned
*/
// @ApiMember(Description="Index of the result set returned", IsRequired=true)
int? page;
/**
* Size of the result set returned
*/
// @ApiMember(Description="Size of the result set returned", IsRequired=true)
int? items;
/**
* Omit precise record count - save on performance
*/
// @ApiMember(Description="Omit precise record count - save on performance")
bool? noCount;
/**
* Sort Expression, Possible values: 'SaleDetailIdDESC', 'DocumentDate'.
*/
// @ApiMember(Description="Sort Expression, Possible values: 'SaleDetailIdDESC', 'DocumentDate'.")
String? sortBy;
GetSaleDetails({this.brand,this.posCode,this.documentNumber,this.documentDateFrom,this.documentDateTo,this.articleCode,this.serialNumber,this.saleDetailId,this.saleId,this.boosterCustomerId,this.warrantyExtensionStatusIds,this.productCategories,this.page,this.items,this.noCount,this.sortBy});
GetSaleDetails.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
brand = json['brand'];
posCode = json['posCode'];
documentNumber = json['documentNumber'];
documentDateFrom = JsonConverters.fromJson(json['documentDateFrom'],'DateTime',context!);
documentDateTo = JsonConverters.fromJson(json['documentDateTo'],'DateTime',context!);
articleCode = json['articleCode'];
serialNumber = json['serialNumber'];
saleDetailId = json['saleDetailId'];
saleId = json['saleId'];
boosterCustomerId = json['boosterCustomerId'];
warrantyExtensionStatusIds = JsonConverters.fromJson(json['warrantyExtensionStatusIds'],'List<int>',context!);
productCategories = JsonConverters.fromJson(json['productCategories'],'List<ProductCategory>',context!);
page = json['page'];
items = json['items'];
noCount = json['noCount'];
sortBy = json['sortBy'];
return this;
}
Map<String, dynamic> toJson() => {
'brand': brand,
'posCode': posCode,
'documentNumber': documentNumber,
'documentDateFrom': JsonConverters.toJson(documentDateFrom,'DateTime',context!),
'documentDateTo': JsonConverters.toJson(documentDateTo,'DateTime',context!),
'articleCode': articleCode,
'serialNumber': serialNumber,
'saleDetailId': saleDetailId,
'saleId': saleId,
'boosterCustomerId': boosterCustomerId,
'warrantyExtensionStatusIds': JsonConverters.toJson(warrantyExtensionStatusIds,'List<int>',context!),
'productCategories': JsonConverters.toJson(productCategories,'List<ProductCategory>',context!),
'page': page,
'items': items,
'noCount': noCount,
'sortBy': sortBy
};
getTypeName() => "GetSaleDetails";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'dev_api_booster.richemont.com', types: <String, TypeInfo> {
'SaleDetail': TypeInfo(TypeOf.Class, create:() => SaleDetail()),
'GetSaleDetailsResponse': TypeInfo(TypeOf.Class, create:() => GetSaleDetailsResponse()),
'List<SaleDetail>': TypeInfo(TypeOf.Class, create:() => <SaleDetail>[]),
'ProductCategory': TypeInfo(TypeOf.Class, create:() => ProductCategory()),
'GetSaleDetails': TypeInfo(TypeOf.Class, create:() => GetSaleDetails()),
'List<ProductCategory>': TypeInfo(TypeOf.Class, create:() => <ProductCategory>[]),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /warranty HTTP/1.1 Host: dev-api-booster.richemont.com Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"page":0,"items":0,"totalPages":0,"totalResults":0}