| POST | /purchase/simulate/v2 | Simulate Order |
|---|
import 'package:servicestack/servicestack.dart';
class Quantity implements IConvertible
{
/**
* Unit
*/
// @ApiMember(Description="Unit", IsRequired=true)
String? unit;
/**
* Value
*/
// @ApiMember(Description="Value", IsRequired=true)
double? value;
Quantity({this.unit,this.value});
Quantity.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
unit = json['unit'];
value = JsonConverters.toDouble(json['value']);
return this;
}
Map<String, dynamic> toJson() => {
'unit': unit,
'value': value
};
getTypeName() => "Quantity";
TypeContext? context = _ctx;
}
class Amount implements IConvertible
{
/**
* Value
*/
// @ApiMember(Description="Value", IsRequired=true)
double? value;
/**
* Currency
*/
// @ApiMember(Description="Currency", IsRequired=true)
String? currency;
Amount({this.value,this.currency});
Amount.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
value = JsonConverters.toDouble(json['value']);
currency = json['currency'];
return this;
}
Map<String, dynamic> toJson() => {
'value': value,
'currency': currency
};
getTypeName() => "Amount";
TypeContext? context = _ctx;
}
class AmountAndQuantity implements IConvertible
{
/**
* Amount
*/
// @ApiMember(Description="Amount", IsRequired=true)
Amount? amount;
/**
* Base Quantity
*/
// @ApiMember(Description="Base Quantity", IsRequired=true)
Quantity? baseQuantity;
AmountAndQuantity({this.amount,this.baseQuantity});
AmountAndQuantity.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
amount = JsonConverters.fromJson(json['amount'],'Amount',context!);
baseQuantity = JsonConverters.fromJson(json['baseQuantity'],'Quantity',context!);
return this;
}
Map<String, dynamic> toJson() => {
'amount': JsonConverters.toJson(amount,'Amount',context!),
'baseQuantity': JsonConverters.toJson(baseQuantity,'Quantity',context!)
};
getTypeName() => "AmountAndQuantity";
TypeContext? context = _ctx;
}
class ItemTotalValues implements IConvertible
{
/**
* Requested Quantity
*/
// @ApiMember(Description="Requested Quantity")
Quantity? requestedQuantity;
/**
* Confirmed Quantity
*/
// @ApiMember(Description="Confirmed Quantity")
Quantity? confirmedQuantity;
/**
* Available Quantity
*/
// @ApiMember(Description="Available Quantity")
Quantity? availableQuantity;
/**
* Gross Weight
*/
// @ApiMember(Description="Gross Weight")
Quantity? grossWeightMeasure;
/**
* Net Weight
*/
// @ApiMember(Description="Net Weight")
Quantity? netWeightMeasure;
/**
* Volume
*/
// @ApiMember(Description="Volume")
Quantity? volumeMeasure;
/**
* Net Amount Line Total
*/
// @ApiMember(Description="Net Amount Line Total")
Amount? netAmount;
/**
* Net Price Line Total
*/
// @ApiMember(Description="Net Price Line Total")
AmountAndQuantity? netPrice;
/**
* Tax Amount Line Total
*/
// @ApiMember(Description="Tax Amount Line Total")
Amount? taxAmount;
/**
* Retail Sales Price Line Total
*/
// @ApiMember(Description="Retail Sales Price Line Total")
Amount? retailSalesPriceAmount;
ItemTotalValues({this.requestedQuantity,this.confirmedQuantity,this.availableQuantity,this.grossWeightMeasure,this.netWeightMeasure,this.volumeMeasure,this.netAmount,this.netPrice,this.taxAmount,this.retailSalesPriceAmount});
ItemTotalValues.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
requestedQuantity = JsonConverters.fromJson(json['requestedQuantity'],'Quantity',context!);
confirmedQuantity = JsonConverters.fromJson(json['confirmedQuantity'],'Quantity',context!);
availableQuantity = JsonConverters.fromJson(json['availableQuantity'],'Quantity',context!);
grossWeightMeasure = JsonConverters.fromJson(json['grossWeightMeasure'],'Quantity',context!);
netWeightMeasure = JsonConverters.fromJson(json['netWeightMeasure'],'Quantity',context!);
volumeMeasure = JsonConverters.fromJson(json['volumeMeasure'],'Quantity',context!);
netAmount = JsonConverters.fromJson(json['netAmount'],'Amount',context!);
netPrice = JsonConverters.fromJson(json['netPrice'],'AmountAndQuantity',context!);
taxAmount = JsonConverters.fromJson(json['taxAmount'],'Amount',context!);
retailSalesPriceAmount = JsonConverters.fromJson(json['retailSalesPriceAmount'],'Amount',context!);
return this;
}
Map<String, dynamic> toJson() => {
'requestedQuantity': JsonConverters.toJson(requestedQuantity,'Quantity',context!),
'confirmedQuantity': JsonConverters.toJson(confirmedQuantity,'Quantity',context!),
'availableQuantity': JsonConverters.toJson(availableQuantity,'Quantity',context!),
'grossWeightMeasure': JsonConverters.toJson(grossWeightMeasure,'Quantity',context!),
'netWeightMeasure': JsonConverters.toJson(netWeightMeasure,'Quantity',context!),
'volumeMeasure': JsonConverters.toJson(volumeMeasure,'Quantity',context!),
'netAmount': JsonConverters.toJson(netAmount,'Amount',context!),
'netPrice': JsonConverters.toJson(netPrice,'AmountAndQuantity',context!),
'taxAmount': JsonConverters.toJson(taxAmount,'Amount',context!),
'retailSalesPriceAmount': JsonConverters.toJson(retailSalesPriceAmount,'Amount',context!)
};
getTypeName() => "ItemTotalValues";
TypeContext? context = _ctx;
}
class Warning implements IConvertible
{
/**
* Id
*/
// @ApiMember(Description="Id", IsRequired=true)
String? id;
/**
* Message
*/
// @ApiMember(Description="Message", IsRequired=true)
String? message;
/**
* Severity code, possible values: 1, 2, 3, 4
*/
// @ApiMember(Description="Severity code, possible values: 1, 2, 3, 4", IsRequired=true)
int? severityCode;
Warning({this.id,this.message,this.severityCode});
Warning.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
message = json['message'];
severityCode = json['severityCode'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'message': message,
'severityCode': severityCode
};
getTypeName() => "Warning";
TypeContext? context = _ctx;
}
class SimulateOrderItemResponseV2 implements IConvertible
{
/**
* Line Number, e.g 20, 40, 21, 41
*/
// @ApiMember(Description="Line Number, e.g 20, 40, 21, 41", IsRequired=true)
int? lineNumber;
/**
* Parent Line Number, e.g 20, 40
*/
// @ApiMember(Description="Parent Line Number, e.g 20, 40", IsRequired=true)
int? parentLineNumber;
/**
* Original line number in the request. Line numbers are remapped after the split
*/
// @ApiMember(Description="Original line number in the request. Line numbers are remapped after the split", IsRequired=true)
int? requestLineNumber;
/**
* Reference No of item, e.g.: CRWB521234
*/
// @ApiMember(Description="Reference No of item, e.g.: CRWB521234", IsRequired=true)
String? articleCode;
/**
* Substituted reference No of item, e.g.: CRWB520003
*/
// @ApiMember(Description="Substituted reference No of item, e.g.: CRWB520003")
String? substitutedArticleCode;
/**
* DeliveryPlantId of item, e.g.: CHD6
*/
// @ApiMember(Description="DeliveryPlantId of item, e.g.: CHD6", IsRequired=true)
String? deliveryPlantId;
/**
* Expected Delivery Date, e.g. '2020-12-30'
*/
// @ApiMember(Description="Expected Delivery Date, e.g. '2020-12-30'")
String? expectedDeliveryDate;
/**
* Buckle Summary, need to be forwarded to order creation
*/
// @ApiMember(Description="Buckle Summary, need to be forwarded to order creation")
String? buckleSummary;
/**
* Material Summary, need to be forwarded to order creation
*/
// @ApiMember(Description="Material Summary, need to be forwarded to order creation")
String? materialSummary;
/**
* Content Summary, need to be forwarded to order creation
*/
// @ApiMember(Description="Content Summary, need to be forwarded to order creation")
String? contentSummary;
/**
* Strap Summary, need to be forwarded to order creation
*/
// @ApiMember(Description="Strap Summary, need to be forwarded to order creation")
String? strapSummary;
/**
* Item Total Values
*/
// @ApiMember(Description="Item Total Values", IsRequired=true)
ItemTotalValues? totalValues;
/**
* Warning list
*/
// @ApiMember(Description="Warning list", IsRequired=true)
List<Warning>? warnings;
SimulateOrderItemResponseV2({this.lineNumber,this.parentLineNumber,this.requestLineNumber,this.articleCode,this.substitutedArticleCode,this.deliveryPlantId,this.expectedDeliveryDate,this.buckleSummary,this.materialSummary,this.contentSummary,this.strapSummary,this.totalValues,this.warnings});
SimulateOrderItemResponseV2.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
lineNumber = json['lineNumber'];
parentLineNumber = json['parentLineNumber'];
requestLineNumber = json['requestLineNumber'];
articleCode = json['articleCode'];
substitutedArticleCode = json['substitutedArticleCode'];
deliveryPlantId = json['deliveryPlantId'];
expectedDeliveryDate = json['expectedDeliveryDate'];
buckleSummary = json['buckleSummary'];
materialSummary = json['materialSummary'];
contentSummary = json['contentSummary'];
strapSummary = json['strapSummary'];
totalValues = JsonConverters.fromJson(json['totalValues'],'ItemTotalValues',context!);
warnings = JsonConverters.fromJson(json['warnings'],'List<Warning>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'lineNumber': lineNumber,
'parentLineNumber': parentLineNumber,
'requestLineNumber': requestLineNumber,
'articleCode': articleCode,
'substitutedArticleCode': substitutedArticleCode,
'deliveryPlantId': deliveryPlantId,
'expectedDeliveryDate': expectedDeliveryDate,
'buckleSummary': buckleSummary,
'materialSummary': materialSummary,
'contentSummary': contentSummary,
'strapSummary': strapSummary,
'totalValues': JsonConverters.toJson(totalValues,'ItemTotalValues',context!),
'warnings': JsonConverters.toJson(warnings,'List<Warning>',context!)
};
getTypeName() => "SimulateOrderItemResponseV2";
TypeContext? context = _ctx;
}
class TotalValues implements IConvertible
{
/**
* Gross Weight
*/
// @ApiMember(Description="Gross Weight", IsRequired=true)
Quantity? grossWeightMeasure;
/**
* Net Weight
*/
// @ApiMember(Description="Net Weight", IsRequired=true)
Quantity? netWeightMeasure;
/**
* Gross Volume
*/
// @ApiMember(Description="Gross Volume", IsRequired=true)
Quantity? grossVolumeMeasure;
/**
* Gross Amount
*/
// @ApiMember(Description="Gross Amount", IsRequired=true)
Amount? grossAmount;
/**
* Net Amount
*/
// @ApiMember(Description="Net Amount", IsRequired=true)
Amount? netAmount;
/**
* Tax Amount
*/
// @ApiMember(Description="Tax Amount", IsRequired=true)
Amount? taxAmount;
TotalValues({this.grossWeightMeasure,this.netWeightMeasure,this.grossVolumeMeasure,this.grossAmount,this.netAmount,this.taxAmount});
TotalValues.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
grossWeightMeasure = JsonConverters.fromJson(json['grossWeightMeasure'],'Quantity',context!);
netWeightMeasure = JsonConverters.fromJson(json['netWeightMeasure'],'Quantity',context!);
grossVolumeMeasure = JsonConverters.fromJson(json['grossVolumeMeasure'],'Quantity',context!);
grossAmount = JsonConverters.fromJson(json['grossAmount'],'Amount',context!);
netAmount = JsonConverters.fromJson(json['netAmount'],'Amount',context!);
taxAmount = JsonConverters.fromJson(json['taxAmount'],'Amount',context!);
return this;
}
Map<String, dynamic> toJson() => {
'grossWeightMeasure': JsonConverters.toJson(grossWeightMeasure,'Quantity',context!),
'netWeightMeasure': JsonConverters.toJson(netWeightMeasure,'Quantity',context!),
'grossVolumeMeasure': JsonConverters.toJson(grossVolumeMeasure,'Quantity',context!),
'grossAmount': JsonConverters.toJson(grossAmount,'Amount',context!),
'netAmount': JsonConverters.toJson(netAmount,'Amount',context!),
'taxAmount': JsonConverters.toJson(taxAmount,'Amount',context!)
};
getTypeName() => "TotalValues";
TypeContext? context = _ctx;
}
class Address implements IConvertible
{
/**
* Country ID
*/
// @ApiMember(Description="Country ID")
String? countryId;
/**
* State ID
*/
// @ApiMember(Description="State ID")
String? stateId;
/**
* City Name
*/
// @ApiMember(Description="City Name")
String? city;
/**
* Street Name and Number
*/
// @ApiMember(Description="Street Name and Number")
String? street;
/**
* Postal Code
*/
// @ApiMember(Description="Postal Code")
String? zipCode;
Address({this.countryId,this.stateId,this.city,this.street,this.zipCode});
Address.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
countryId = json['countryId'];
stateId = json['stateId'];
city = json['city'];
street = json['street'];
zipCode = json['zipCode'];
return this;
}
Map<String, dynamic> toJson() => {
'countryId': countryId,
'stateId': stateId,
'city': city,
'street': street,
'zipCode': zipCode
};
getTypeName() => "Address";
TypeContext? context = _ctx;
}
class Party implements IConvertible
{
/**
* Internal ID of the Element
*/
// @ApiMember(Description="Internal ID of the Element", IsRequired=true)
String? id;
/**
* Formatted Name of the Element
*/
// @ApiMember(Description="Formatted Name of the Element", IsRequired=true)
String? name;
/**
* Geographic Address of the Element
*/
// @ApiMember(Description="Geographic Address of the Element")
Address? address;
Party({this.id,this.name,this.address});
Party.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
address = JsonConverters.fromJson(json['address'],'Address',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'address': JsonConverters.toJson(address,'Address',context!)
};
getTypeName() => "Party";
TypeContext? context = _ctx;
}
class SplittedSimulateOrderResponse implements IConvertible
{
/**
* Order Type
*/
// @ApiMember(Description="Order Type", IsRequired=true)
String? orderType;
/**
* Product Type
*/
// @ApiMember(Description="Product Type", IsRequired=true)
String? productType;
/**
* List of Articles simulated
*/
// @ApiMember(Description="List of Articles simulated", IsRequired=true)
List<SimulateOrderItemResponseV2>? orderItems;
/**
* Total Values
*/
// @ApiMember(Description="Total Values", IsRequired=true)
TotalValues? totalValues;
/**
* Addresses which order can be shipped to
*/
// @ApiMember(Description="Addresses which order can be shipped to", IsRequired=true)
List<Party>? shipTo;
/**
* Addresses which order can be final shipped to
*/
// @ApiMember(Description="Addresses which order can be final shipped to")
List<Party>? finalShipTo;
/**
* Addresses which order can be billed to
*/
// @ApiMember(Description="Addresses which order can be billed to", IsRequired=true)
List<Party>? billTo;
/**
* Address which order is made to
*/
// @ApiMember(Description="Address which order is made to", IsRequired=true)
Party? soldTo;
/**
* Sales Representative
*/
// @ApiMember(Description="Sales Representative")
Party? salesRepresentative;
/**
* Warning list
*/
// @ApiMember(Description="Warning list", IsRequired=true)
List<Warning>? warnings;
SplittedSimulateOrderResponse({this.orderType,this.productType,this.orderItems,this.totalValues,this.shipTo,this.finalShipTo,this.billTo,this.soldTo,this.salesRepresentative,this.warnings});
SplittedSimulateOrderResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
orderType = json['orderType'];
productType = json['productType'];
orderItems = JsonConverters.fromJson(json['orderItems'],'List<SimulateOrderItemResponseV2>',context!);
totalValues = JsonConverters.fromJson(json['totalValues'],'TotalValues',context!);
shipTo = JsonConverters.fromJson(json['shipTo'],'List<Party>',context!);
finalShipTo = JsonConverters.fromJson(json['finalShipTo'],'List<Party>',context!);
billTo = JsonConverters.fromJson(json['billTo'],'List<Party>',context!);
soldTo = JsonConverters.fromJson(json['soldTo'],'Party',context!);
salesRepresentative = JsonConverters.fromJson(json['salesRepresentative'],'Party',context!);
warnings = JsonConverters.fromJson(json['warnings'],'List<Warning>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'orderType': orderType,
'productType': productType,
'orderItems': JsonConverters.toJson(orderItems,'List<SimulateOrderItemResponseV2>',context!),
'totalValues': JsonConverters.toJson(totalValues,'TotalValues',context!),
'shipTo': JsonConverters.toJson(shipTo,'List<Party>',context!),
'finalShipTo': JsonConverters.toJson(finalShipTo,'List<Party>',context!),
'billTo': JsonConverters.toJson(billTo,'List<Party>',context!),
'soldTo': JsonConverters.toJson(soldTo,'Party',context!),
'salesRepresentative': JsonConverters.toJson(salesRepresentative,'Party',context!),
'warnings': JsonConverters.toJson(warnings,'List<Warning>',context!)
};
getTypeName() => "SplittedSimulateOrderResponse";
TypeContext? context = _ctx;
}
class SimulateOrderResponseV2 implements IConvertible
{
/**
* List of splitted order simulation results
*/
// @ApiMember(Description="List of splitted order simulation results", IsRequired=true)
Map<String,SplittedSimulateOrderResponse?>? results;
/**
* Addresses which order can be shipped to (common list for all splitted orders)
*/
// @ApiMember(Description="Addresses which order can be shipped to (common list for all splitted orders)")
List<Party>? shipTo;
/**
* Addresses which order can be final shipped to (common list for all splitted orders)
*/
// @ApiMember(Description="Addresses which order can be final shipped to (common list for all splitted orders)")
List<Party>? finalShipTo;
/**
* Addresses which order can be billed to (common list for all splitted orders)
*/
// @ApiMember(Description="Addresses which order can be billed to (common list for all splitted orders)")
List<Party>? billTo;
/**
* Address which order is made to (common list for all splitted orders)
*/
// @ApiMember(Description="Address which order is made to (common list for all splitted orders)")
Party? soldTo;
/**
* Sales representatives (common list for all splitted orders)
*/
// @ApiMember(Description="Sales representatives (common list for all splitted orders)")
Party? salesRepresentative;
SimulateOrderResponseV2({this.results,this.shipTo,this.finalShipTo,this.billTo,this.soldTo,this.salesRepresentative});
SimulateOrderResponseV2.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
results = JsonConverters.fromJson(json['results'],'Map<String,SplittedSimulateOrderResponse?>',context!);
shipTo = JsonConverters.fromJson(json['shipTo'],'List<Party>',context!);
finalShipTo = JsonConverters.fromJson(json['finalShipTo'],'List<Party>',context!);
billTo = JsonConverters.fromJson(json['billTo'],'List<Party>',context!);
soldTo = JsonConverters.fromJson(json['soldTo'],'Party',context!);
salesRepresentative = JsonConverters.fromJson(json['salesRepresentative'],'Party',context!);
return this;
}
Map<String, dynamic> toJson() => {
'results': JsonConverters.toJson(results,'Map<String,SplittedSimulateOrderResponse?>',context!),
'shipTo': JsonConverters.toJson(shipTo,'List<Party>',context!),
'finalShipTo': JsonConverters.toJson(finalShipTo,'List<Party>',context!),
'billTo': JsonConverters.toJson(billTo,'List<Party>',context!),
'soldTo': JsonConverters.toJson(soldTo,'Party',context!),
'salesRepresentative': JsonConverters.toJson(salesRepresentative,'Party',context!)
};
getTypeName() => "SimulateOrderResponseV2";
TypeContext? context = _ctx;
}
class StrapItem implements IConvertible
{
/**
* Article reference
*/
// @ApiMember(Description="Article reference")
String? speakingArticleCode;
/**
* Buckle type Description
*/
// @ApiMember(Description="Buckle type Description")
String? buckleTypeDescription;
/**
* Buckle type
*/
// @ApiMember(Description="Buckle type")
String? buckleTypeCode;
/**
* watch 6 Length
*/
// @ApiMember(Description="watch 6 Length")
int? watch6Length;
/**
* watch 12 Length
*/
// @ApiMember(Description="watch 12 Length")
int? watch12Length;
/**
* Article Material Code
*/
// @ApiMember(Description="Article Material Code")
String? materialCode;
/**
* Article Material Description
*/
// @ApiMember(Description="Article Material Description")
String? materialDescription;
/**
* Article Color Code
*/
// @ApiMember(Description="Article Color Code")
String? colorCode;
/**
* Article Color Description
*/
// @ApiMember(Description="Article Color Description")
String? colorDescription;
/**
* Buckle Witdh
*/
// @ApiMember(Description="Buckle Witdh")
String? buckleWidth;
/**
* Article Lining Code
*/
// @ApiMember(Description="Article Lining Code")
String? liningCode;
/**
* Article Lining Description
*/
// @ApiMember(Description="Article Lining Description")
String? liningDescription;
/**
* Article Stitching Code
*/
// @ApiMember(Description="Article Stitching Code")
String? stitchingCode;
/**
* Article Stitching Description
*/
// @ApiMember(Description="Article Stitching Description")
String? stitchingDescription;
/**
* Article Edge Code
*/
// @ApiMember(Description="Article Edge Code")
String? edgeCode;
/**
* Article Edge Description
*/
// @ApiMember(Description="Article Edge Description")
String? edgeDescription;
/**
* Article Padding Code
*/
// @ApiMember(Description="Article Padding Code")
String? paddingCode;
/**
* Article Padding Description
*/
// @ApiMember(Description="Article Padding Description")
String? paddingDescription;
/**
* Article Speciality Code
*/
// @ApiMember(Description="Article Speciality Code")
String? specialtyCode;
/**
* Article Speciality Description
*/
// @ApiMember(Description="Article Speciality Description")
String? specialtyDescription;
/**
* Nuancier Code
*/
// @ApiMember(Description="Nuancier Code")
String? nuancierCode;
/**
* Strap Vip Order
*/
// @ApiMember(Description="Strap Vip Order")
bool? isStrapVipOrder;
StrapItem({this.speakingArticleCode,this.buckleTypeDescription,this.buckleTypeCode,this.watch6Length,this.watch12Length,this.materialCode,this.materialDescription,this.colorCode,this.colorDescription,this.buckleWidth,this.liningCode,this.liningDescription,this.stitchingCode,this.stitchingDescription,this.edgeCode,this.edgeDescription,this.paddingCode,this.paddingDescription,this.specialtyCode,this.specialtyDescription,this.nuancierCode,this.isStrapVipOrder});
StrapItem.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
speakingArticleCode = json['speakingArticleCode'];
buckleTypeDescription = json['buckleTypeDescription'];
buckleTypeCode = json['buckleTypeCode'];
watch6Length = json['watch6Length'];
watch12Length = json['watch12Length'];
materialCode = json['materialCode'];
materialDescription = json['materialDescription'];
colorCode = json['colorCode'];
colorDescription = json['colorDescription'];
buckleWidth = json['buckleWidth'];
liningCode = json['liningCode'];
liningDescription = json['liningDescription'];
stitchingCode = json['stitchingCode'];
stitchingDescription = json['stitchingDescription'];
edgeCode = json['edgeCode'];
edgeDescription = json['edgeDescription'];
paddingCode = json['paddingCode'];
paddingDescription = json['paddingDescription'];
specialtyCode = json['specialtyCode'];
specialtyDescription = json['specialtyDescription'];
nuancierCode = json['nuancierCode'];
isStrapVipOrder = json['isStrapVipOrder'];
return this;
}
Map<String, dynamic> toJson() => {
'speakingArticleCode': speakingArticleCode,
'buckleTypeDescription': buckleTypeDescription,
'buckleTypeCode': buckleTypeCode,
'watch6Length': watch6Length,
'watch12Length': watch12Length,
'materialCode': materialCode,
'materialDescription': materialDescription,
'colorCode': colorCode,
'colorDescription': colorDescription,
'buckleWidth': buckleWidth,
'liningCode': liningCode,
'liningDescription': liningDescription,
'stitchingCode': stitchingCode,
'stitchingDescription': stitchingDescription,
'edgeCode': edgeCode,
'edgeDescription': edgeDescription,
'paddingCode': paddingCode,
'paddingDescription': paddingDescription,
'specialtyCode': specialtyCode,
'specialtyDescription': specialtyDescription,
'nuancierCode': nuancierCode,
'isStrapVipOrder': isStrapVipOrder
};
getTypeName() => "StrapItem";
TypeContext? context = _ctx;
}
class SimulateOrderItemRequestV2 implements IConvertible
{
/**
* Line Number
*/
// @ApiMember(Description="Line Number", IsRequired=true)
int? lineNumber;
/**
* Reference ID of the article/product, e.g. 'CRWB520003'
*/
// @ApiMember(Description="Reference ID of the article/product, e.g. 'CRWB520003'", IsRequired=true)
String? articleCode;
/**
* Desired quantity of the article
*/
// @ApiMember(Description="Desired quantity of the article", IsRequired=true)
int? quantity;
/**
* Requested Delivery Date of the Item, e.g. '2020-12-30'
*/
// @ApiMember(Description="Requested Delivery Date of the Item, e.g. '2020-12-30'")
DateTime? requestedDeliveryDate;
/**
* Purchase order type, e.g. 'WCFS', null. Null for ordinary order
*/
// @ApiMember(Description="Purchase order type, e.g. 'WCFS', null. Null for ordinary order")
String? orderType;
/**
* Final Ship To Pos Code
*/
// @ApiMember(Description="Final Ship To Pos Code")
String? finalShipToId;
/**
* Strap definition
*/
// @ApiMember(Description="Strap definition")
StrapItem? strap;
SimulateOrderItemRequestV2({this.lineNumber,this.articleCode,this.quantity,this.requestedDeliveryDate,this.orderType,this.finalShipToId,this.strap});
SimulateOrderItemRequestV2.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
lineNumber = json['lineNumber'];
articleCode = json['articleCode'];
quantity = json['quantity'];
requestedDeliveryDate = JsonConverters.fromJson(json['requestedDeliveryDate'],'DateTime',context!);
orderType = json['orderType'];
finalShipToId = json['finalShipToId'];
strap = JsonConverters.fromJson(json['strap'],'StrapItem',context!);
return this;
}
Map<String, dynamic> toJson() => {
'lineNumber': lineNumber,
'articleCode': articleCode,
'quantity': quantity,
'requestedDeliveryDate': JsonConverters.toJson(requestedDeliveryDate,'DateTime',context!),
'orderType': orderType,
'finalShipToId': finalShipToId,
'strap': JsonConverters.toJson(strap,'StrapItem',context!)
};
getTypeName() => "SimulateOrderItemRequestV2";
TypeContext? context = _ctx;
}
class EndCustomerDetails implements IConvertible
{
/**
* Title of the end Customer, e.g. 'MR', 'MRS'.
*/
// @ApiMember(Description="Title of the end Customer, e.g. 'MR', 'MRS'.")
String? title;
/**
* First Name of the end Customer
*/
// @ApiMember(Description="First Name of the end Customer", IsRequired=true)
String? firstName;
/**
* Last Name of the end Customer
*/
// @ApiMember(Description="Last Name of the end Customer", IsRequired=true)
String? lastName;
/**
* Email of the end Customer
*/
// @ApiMember(Description="Email of the end Customer")
String? email;
/**
* Phone number of the end Customer, e.g. '0032477123456'.
*/
// @ApiMember(Description="Phone number of the end Customer, e.g. '0032477123456'. ")
String? phone;
/**
* Countr code in the shipping address, e.g. 'BE' (ISO Code)
*/
// @ApiMember(Description="Countr code in the shipping address, e.g. 'BE' (ISO Code)", IsRequired=true)
String? country;
/**
* City name in the shipping address
*/
// @ApiMember(Description="City name in the shipping address", IsRequired=true)
String? city;
/**
* Street name in the shipping address
*/
// @ApiMember(Description="Street name in the shipping address", IsRequired=true)
String? street;
/**
* House number in the shipping address
*/
// @ApiMember(Description="House number in the shipping address")
String? houseNumber;
/**
* Building number in the shipping address
*/
// @ApiMember(Description="Building number in the shipping address")
String? building;
/**
* Postal code in the shipping address
*/
// @ApiMember(Description="Postal code in the shipping address")
String? postalCode;
/**
* Region code in the shipping address, e.g. 'VL' (ISO Code)
*/
// @ApiMember(Description="Region code in the shipping address, e.g. 'VL' (ISO Code)")
String? region;
/**
* District name in the shipping address
*/
// @ApiMember(Description="District name in the shipping address")
String? district;
/**
* Additional Info number to the shipping address
*/
// @ApiMember(Description="Additional Info number to the shipping address")
String? additionalInfo;
EndCustomerDetails({this.title,this.firstName,this.lastName,this.email,this.phone,this.country,this.city,this.street,this.houseNumber,this.building,this.postalCode,this.region,this.district,this.additionalInfo});
EndCustomerDetails.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
title = json['title'];
firstName = json['firstName'];
lastName = json['lastName'];
email = json['email'];
phone = json['phone'];
country = json['country'];
city = json['city'];
street = json['street'];
houseNumber = json['houseNumber'];
building = json['building'];
postalCode = json['postalCode'];
region = json['region'];
district = json['district'];
additionalInfo = json['additionalInfo'];
return this;
}
Map<String, dynamic> toJson() => {
'title': title,
'firstName': firstName,
'lastName': lastName,
'email': email,
'phone': phone,
'country': country,
'city': city,
'street': street,
'houseNumber': houseNumber,
'building': building,
'postalCode': postalCode,
'region': region,
'district': district,
'additionalInfo': additionalInfo
};
getTypeName() => "EndCustomerDetails";
TypeContext? context = _ctx;
}
class SimulateOrderV2 implements IConvertible
{
/**
* Brand Trigram of the intended Order, e.g. 'IWC', 'CAR', etc.
*/
// @ApiMember(Description="Brand Trigram of the intended Order, e.g. 'IWC', 'CAR', etc.", IsRequired=true)
String? brand;
/**
* Global Pos Code for the intended Order e.g. ES100:102048
*/
// @ApiMember(Description="Global Pos Code for the intended Order e.g. ES100:102048", IsRequired=true)
String? posCode;
/**
* Customer Reference
*/
// @ApiMember(Description="Customer Reference")
String? customerReference;
/**
* Additional Notes regarding the Order
*/
// @ApiMember(Description="Additional Notes regarding the Order")
String? notes;
/**
* Purchase order date, e.g. '2020-12-31'
*/
// @ApiMember(Description="Purchase order date, e.g. '2020-12-31'")
DateTime? orderDate;
/**
* List of Articles to be simulated
*/
// @ApiMember(Description="List of Articles to be simulated", IsRequired=true)
List<SimulateOrderItemRequestV2>? orderItems;
/**
* Booster1 ID of the end Customer
*/
// @ApiMember(Description="Booster1 ID of the end Customer")
String? endCustomerBooster1Id;
/**
* Details of the end Customer
*/
// @ApiMember(Description="Details of the end Customer")
EndCustomerDetails? endCustomerDetails;
SimulateOrderV2({this.brand,this.posCode,this.customerReference,this.notes,this.orderDate,this.orderItems,this.endCustomerBooster1Id,this.endCustomerDetails});
SimulateOrderV2.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
brand = json['brand'];
posCode = json['posCode'];
customerReference = json['customerReference'];
notes = json['notes'];
orderDate = JsonConverters.fromJson(json['orderDate'],'DateTime',context!);
orderItems = JsonConverters.fromJson(json['orderItems'],'List<SimulateOrderItemRequestV2>',context!);
endCustomerBooster1Id = json['endCustomerBooster1Id'];
endCustomerDetails = JsonConverters.fromJson(json['endCustomerDetails'],'EndCustomerDetails',context!);
return this;
}
Map<String, dynamic> toJson() => {
'brand': brand,
'posCode': posCode,
'customerReference': customerReference,
'notes': notes,
'orderDate': JsonConverters.toJson(orderDate,'DateTime',context!),
'orderItems': JsonConverters.toJson(orderItems,'List<SimulateOrderItemRequestV2>',context!),
'endCustomerBooster1Id': endCustomerBooster1Id,
'endCustomerDetails': JsonConverters.toJson(endCustomerDetails,'EndCustomerDetails',context!)
};
getTypeName() => "SimulateOrderV2";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'dev_api_booster.richemont.com', types: <String, TypeInfo> {
'Quantity': TypeInfo(TypeOf.Class, create:() => Quantity()),
'Amount': TypeInfo(TypeOf.Class, create:() => Amount()),
'AmountAndQuantity': TypeInfo(TypeOf.Class, create:() => AmountAndQuantity()),
'ItemTotalValues': TypeInfo(TypeOf.Class, create:() => ItemTotalValues()),
'Warning': TypeInfo(TypeOf.Class, create:() => Warning()),
'SimulateOrderItemResponseV2': TypeInfo(TypeOf.Class, create:() => SimulateOrderItemResponseV2()),
'List<Warning>': TypeInfo(TypeOf.Class, create:() => <Warning>[]),
'TotalValues': TypeInfo(TypeOf.Class, create:() => TotalValues()),
'Address': TypeInfo(TypeOf.Class, create:() => Address()),
'Party': TypeInfo(TypeOf.Class, create:() => Party()),
'SplittedSimulateOrderResponse': TypeInfo(TypeOf.Class, create:() => SplittedSimulateOrderResponse()),
'List<SimulateOrderItemResponseV2>': TypeInfo(TypeOf.Class, create:() => <SimulateOrderItemResponseV2>[]),
'List<Party>': TypeInfo(TypeOf.Class, create:() => <Party>[]),
'SimulateOrderResponseV2': TypeInfo(TypeOf.Class, create:() => SimulateOrderResponseV2()),
'Map<String,SplittedSimulateOrderResponse?>': TypeInfo(TypeOf.Class, create:() => Map<String,SplittedSimulateOrderResponse?>()),
'StrapItem': TypeInfo(TypeOf.Class, create:() => StrapItem()),
'SimulateOrderItemRequestV2': TypeInfo(TypeOf.Class, create:() => SimulateOrderItemRequestV2()),
'EndCustomerDetails': TypeInfo(TypeOf.Class, create:() => EndCustomerDetails()),
'SimulateOrderV2': TypeInfo(TypeOf.Class, create:() => SimulateOrderV2()),
'List<SimulateOrderItemRequestV2>': TypeInfo(TypeOf.Class, create:() => <SimulateOrderItemRequestV2>[]),
});
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.
POST /purchase/simulate/v2 HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"brand":"String","posCode":"String","customerReference":"String","notes":"String","orderDate":"\/Date(-62135596800000-0000)\/","orderItems":[{"lineNumber":0,"articleCode":"String","quantity":0,"requestedDeliveryDate":"\/Date(-62135596800000-0000)\/","orderType":"String","finalShipToId":"String","strap":{"speakingArticleCode":"String","buckleTypeDescription":"String","buckleTypeCode":"String","watch6Length":0,"watch12Length":0,"materialCode":"String","materialDescription":"String","colorCode":"String","colorDescription":"String","buckleWidth":"String","liningCode":"String","liningDescription":"String","stitchingCode":"String","stitchingDescription":"String","edgeCode":"String","edgeDescription":"String","paddingCode":"String","paddingDescription":"String","specialtyCode":"String","specialtyDescription":"String","nuancierCode":"String","isStrapVipOrder":false}}],"endCustomerBooster1Id":"String","endCustomerDetails":{"title":"String","firstName":"String","lastName":"String","email":"String","phone":"String","country":"String","city":"String","street":"String","houseNumber":"String","building":"String","postalCode":"String","region":"String","district":"String","additionalInfo":"String"}}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"results":{"String":{"orderType":"String","productType":"String","orderItems":[{"lineNumber":0,"parentLineNumber":0,"requestLineNumber":0,"articleCode":"String","substitutedArticleCode":"String","deliveryPlantId":"String","expectedDeliveryDate":"String","buckleSummary":"String","materialSummary":"String","contentSummary":"String","strapSummary":"String","totalValues":{"requestedQuantity":{"unit":"String","value":0},"confirmedQuantity":{"unit":"String","value":0},"availableQuantity":{"unit":"String","value":0},"grossWeightMeasure":{"unit":"String","value":0},"netWeightMeasure":{"unit":"String","value":0},"volumeMeasure":{"unit":"String","value":0},"netAmount":{"value":0,"currency":"String"},"netPrice":{"amount":{"value":0,"currency":"String"},"baseQuantity":{"unit":"String","value":0}},"taxAmount":{"value":0,"currency":"String"},"retailSalesPriceAmount":{"value":0,"currency":"String"}},"warnings":[{"id":"String","message":"String","severityCode":0}]}],"totalValues":{"grossWeightMeasure":{"unit":"String","value":0},"netWeightMeasure":{"unit":"String","value":0},"grossVolumeMeasure":{"unit":"String","value":0},"grossAmount":{"value":0,"currency":"String"},"netAmount":{"value":0,"currency":"String"},"taxAmount":{"value":0,"currency":"String"}},"shipTo":[{"id":"String","name":"String","address":{"countryId":"String","stateId":"String","city":"String","street":"String","zipCode":"String"}}],"finalShipTo":[{"id":"String","name":"String","address":{"countryId":"String","stateId":"String","city":"String","street":"String","zipCode":"String"}}],"billTo":[{"id":"String","name":"String","address":{"countryId":"String","stateId":"String","city":"String","street":"String","zipCode":"String"}}],"soldTo":{"id":"String","name":"String","address":{"countryId":"String","stateId":"String","city":"String","street":"String","zipCode":"String"}},"salesRepresentative":{"id":"String","name":"String","address":{"countryId":"String","stateId":"String","city":"String","street":"String","zipCode":"String"}},"warnings":[{"id":"String","message":"String","severityCode":0}]}},"shipTo":[{"id":"String","name":"String","address":{"countryId":"String","stateId":"String","city":"String","street":"String","zipCode":"String"}}],"finalShipTo":[{"id":"String","name":"String","address":{"countryId":"String","stateId":"String","city":"String","street":"String","zipCode":"String"}}],"billTo":[{"id":"String","name":"String","address":{"countryId":"String","stateId":"String","city":"String","street":"String","zipCode":"String"}}],"soldTo":{"id":"String","name":"String","address":{"countryId":"String","stateId":"String","city":"String","street":"String","zipCode":"String"}},"salesRepresentative":{"id":"String","name":"String","address":{"countryId":"String","stateId":"String","city":"String","street":"String","zipCode":"String"}}}