| GET | /product-collection/{brand}/{posCode} | Get customer product collections |
|---|
import 'package:servicestack/servicestack.dart';
class ProductCollection implements IConvertible
{
/**
* Product Collection description
*/
// @ApiMember(Description="Product Collection description", IsRequired=true)
String productCollection = "";
/**
* SAP ProductCollection ID, e.g. 'CA-1'
*/
// @ApiMember(Description="SAP ProductCollection ID, e.g. 'CA-1'", IsRequired=true)
String sapProductCollectionId = "";
/**
* Product Collection description translation
*/
// @ApiMember(Description="Product Collection description translation", IsRequired=true)
String translation = "";
ProductCollection({this.productCollection="",this.sapProductCollectionId="",this.translation=""});
ProductCollection.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
productCollection = json['productCollection'] ?? "";
sapProductCollectionId = json['sapProductCollectionId'] ?? "";
translation = json['translation'] ?? "";
return this;
}
Map<String, dynamic> toJson() => {
'productCollection': productCollection,
'sapProductCollectionId': sapProductCollectionId,
'translation': translation
};
getTypeName() => "ProductCollection";
TypeContext? context = _ctx;
}
class GetProductCollectionsResponse extends ListBase<ProductCollection> implements IConvertible
{
final List<ProductCollection> l = [];
set length(int newLength) { l.length = newLength; }
int get length => l.length;
ProductCollection operator [](int index) => l[index];
void operator []=(int index, ProductCollection value) { l[index] = value; }
GetProductCollectionsResponse();
GetProductCollectionsResponse.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "GetProductCollectionsResponse";
TypeContext? context = _ctx;
}
class GetProductCollections implements IConvertible
{
/**
* Brand
*/
// @ApiMember(Description="Brand", IsRequired=true)
String brand = "";
/**
* POS Legacy
*/
// @ApiMember(Description="POS Legacy", IsRequired=true)
String posCode = "";
GetProductCollections({this.brand="",this.posCode=""});
GetProductCollections.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
brand = json['brand'] ?? "";
posCode = json['posCode'] ?? "";
return this;
}
Map<String, dynamic> toJson() => {
'brand': brand,
'posCode': posCode
};
getTypeName() => "GetProductCollections";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'dev_api_booster.richemont.com', types: <String, TypeInfo> {
'ProductCollection': TypeInfo(TypeOf.Class, create:() => ProductCollection()),
'GetProductCollectionsResponse': TypeInfo(TypeOf.Class, create:() => GetProductCollectionsResponse()),
'GetProductCollections': TypeInfo(TypeOf.Class, create:() => GetProductCollections()),
});
Dart GetProductCollections 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.
GET /product-collection/{brand}/{posCode} HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: text/csv
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length []