| POST | /uplift/conclude |
|---|
import 'package:servicestack/servicestack.dart';
class ApiServiceRequest implements IServiceRequest, IHasApiKey, IHasDeviceInfo, IConvertible
{
/**
* The API Key required for authentication
*/
// @ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true)
String? apiKey;
/**
* Latitude of the user making this request
*/
// @ApiMember(DataType="double", Description="Latitude of the user making this request")
double? latitude;
/**
* Longitude of the user making this request
*/
// @ApiMember(DataType="double", Description="Longitude of the user making this request")
double? longitude;
ApiServiceRequest({this.apiKey,this.latitude,this.longitude});
ApiServiceRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
apiKey = json['apiKey'];
latitude = JsonConverters.toDouble(json['latitude']);
longitude = JsonConverters.toDouble(json['longitude']);
return this;
}
Map<String, dynamic> toJson() => {
'apiKey': apiKey,
'latitude': latitude,
'longitude': longitude
};
getTypeName() => "ApiServiceRequest";
TypeContext? context = _ctx;
}
class ApiServiceResponse implements IServiceResponse, IConvertible
{
/**
* Information about the response.
*/
// @ApiMember(Description="Information about the response.", IsRequired=true)
String? description;
/**
* Heading or summary of the response.
*/
// @ApiMember(Description="Heading or summary of the response.", IsRequired=true)
String? heading;
/**
* Did the intended operation for this response complete successfully?
*/
// @ApiMember(DataType="boolean", Description="Did the intended operation for this response complete successfully?", IsRequired=true)
bool? wasSuccessful;
ResponseStatus? responseStatus;
ApiServiceResponse({this.description,this.heading,this.wasSuccessful,this.responseStatus});
ApiServiceResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
description = json['description'];
heading = json['heading'];
wasSuccessful = json['wasSuccessful'];
responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'description': description,
'heading': heading,
'wasSuccessful': wasSuccessful,
'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
};
getTypeName() => "ApiServiceResponse";
TypeContext? context = _ctx;
}
class UpliftProductData implements IConvertible
{
int? upliftProductId;
int? upliftId;
int? productId;
double? unitPrice;
String? name;
String? category;
String? unitBarcode;
String? unitSize;
double? unitWeight;
String? code;
List<dynamic>? upliftImages;
double? quantity;
double? value;
bool? priceOverMax;
bool? quantityOverMax;
bool? quantityOverRequirement;
String? serialNumber;
String? batchCode;
int? stockStatusId;
String? lotNumber;
String? expiryDate;
String? manufactureDate;
UpliftProductData({this.upliftProductId,this.upliftId,this.productId,this.unitPrice,this.name,this.category,this.unitBarcode,this.unitSize,this.unitWeight,this.code,this.upliftImages,this.quantity,this.value,this.priceOverMax,this.quantityOverMax,this.quantityOverRequirement,this.serialNumber,this.batchCode,this.stockStatusId,this.lotNumber,this.expiryDate,this.manufactureDate});
UpliftProductData.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
upliftProductId = json['upliftProductId'];
upliftId = json['upliftId'];
productId = json['productId'];
unitPrice = JsonConverters.toDouble(json['unitPrice']);
name = json['name'];
category = json['category'];
unitBarcode = json['unitBarcode'];
unitSize = json['unitSize'];
unitWeight = JsonConverters.toDouble(json['unitWeight']);
code = json['code'];
upliftImages = JsonConverters.fromJson(json['upliftImages'],'List<dynamic>',context!);
quantity = JsonConverters.toDouble(json['quantity']);
value = JsonConverters.toDouble(json['value']);
priceOverMax = json['priceOverMax'];
quantityOverMax = json['quantityOverMax'];
quantityOverRequirement = json['quantityOverRequirement'];
serialNumber = json['serialNumber'];
batchCode = json['batchCode'];
stockStatusId = json['stockStatusId'];
lotNumber = json['lotNumber'];
expiryDate = json['expiryDate'];
manufactureDate = json['manufactureDate'];
return this;
}
Map<String, dynamic> toJson() => {
'upliftProductId': upliftProductId,
'upliftId': upliftId,
'productId': productId,
'unitPrice': unitPrice,
'name': name,
'category': category,
'unitBarcode': unitBarcode,
'unitSize': unitSize,
'unitWeight': unitWeight,
'code': code,
'upliftImages': JsonConverters.toJson(upliftImages,'List<dynamic>',context!),
'quantity': quantity,
'value': value,
'priceOverMax': priceOverMax,
'quantityOverMax': quantityOverMax,
'quantityOverRequirement': quantityOverRequirement,
'serialNumber': serialNumber,
'batchCode': batchCode,
'stockStatusId': stockStatusId,
'lotNumber': lotNumber,
'expiryDate': expiryDate,
'manufactureDate': manufactureDate
};
getTypeName() => "UpliftProductData";
TypeContext? context = _ctx;
}
class UpliftSealData implements IConvertible
{
bool? unbagged;
String? sealNumber;
String? antelSealNumber;
List<UpliftProductData>? products;
double? totalPrice;
double? totalQuantity;
double? netWeight;
double? grossWeight;
bool? billableSeal;
bool? invalidAntelSealNumber;
UpliftSealData({this.unbagged,this.sealNumber,this.antelSealNumber,this.products,this.totalPrice,this.totalQuantity,this.netWeight,this.grossWeight,this.billableSeal,this.invalidAntelSealNumber});
UpliftSealData.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
unbagged = json['unbagged'];
sealNumber = json['sealNumber'];
antelSealNumber = json['antelSealNumber'];
products = JsonConverters.fromJson(json['products'],'List<UpliftProductData>',context!);
totalPrice = JsonConverters.toDouble(json['totalPrice']);
totalQuantity = JsonConverters.toDouble(json['totalQuantity']);
netWeight = JsonConverters.toDouble(json['netWeight']);
grossWeight = JsonConverters.toDouble(json['grossWeight']);
billableSeal = json['billableSeal'];
invalidAntelSealNumber = json['invalidAntelSealNumber'];
return this;
}
Map<String, dynamic> toJson() => {
'unbagged': unbagged,
'sealNumber': sealNumber,
'antelSealNumber': antelSealNumber,
'products': JsonConverters.toJson(products,'List<UpliftProductData>',context!),
'totalPrice': totalPrice,
'totalQuantity': totalQuantity,
'netWeight': netWeight,
'grossWeight': grossWeight,
'billableSeal': billableSeal,
'invalidAntelSealNumber': invalidAntelSealNumber
};
getTypeName() => "UpliftSealData";
TypeContext? context = _ctx;
}
class UpliftClaimData implements IConvertible
{
int? upliftClaimId;
int? claimUnits;
String? claimNumber;
double? claimValue;
List<dynamic>? claimDocumentImages;
String? returnOrderNumber;
int? lineCount;
UpliftClaimData({this.upliftClaimId,this.claimUnits,this.claimNumber,this.claimValue,this.claimDocumentImages,this.returnOrderNumber,this.lineCount});
UpliftClaimData.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
upliftClaimId = json['upliftClaimId'];
claimUnits = json['claimUnits'];
claimNumber = json['claimNumber'];
claimValue = JsonConverters.toDouble(json['claimValue']);
claimDocumentImages = JsonConverters.fromJson(json['claimDocumentImages'],'List<dynamic>',context!);
returnOrderNumber = json['returnOrderNumber'];
lineCount = json['lineCount'];
return this;
}
Map<String, dynamic> toJson() => {
'upliftClaimId': upliftClaimId,
'claimUnits': claimUnits,
'claimNumber': claimNumber,
'claimValue': claimValue,
'claimDocumentImages': JsonConverters.toJson(claimDocumentImages,'List<dynamic>',context!),
'returnOrderNumber': returnOrderNumber,
'lineCount': lineCount
};
getTypeName() => "UpliftClaimData";
TypeContext? context = _ctx;
}
class SaveUpliftResponse extends ApiServiceResponse implements IConvertible
{
int? upliftId;
String? upliftAuthRequestId;
List<UpliftSealData>? seals;
UpliftSealData? unbaggedItems;
List<UpliftClaimData>? claims;
bool? deleteFromDevice;
List<String>? imageIds;
bool? invalidAntelSeal;
SaveUpliftResponse({this.upliftId,this.upliftAuthRequestId,this.seals,this.unbaggedItems,this.claims,this.deleteFromDevice,this.imageIds,this.invalidAntelSeal});
SaveUpliftResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
upliftId = json['upliftId'];
upliftAuthRequestId = json['upliftAuthRequestId'];
seals = JsonConverters.fromJson(json['seals'],'List<UpliftSealData>',context!);
unbaggedItems = JsonConverters.fromJson(json['unbaggedItems'],'UpliftSealData',context!);
claims = JsonConverters.fromJson(json['claims'],'List<UpliftClaimData>',context!);
deleteFromDevice = json['deleteFromDevice'];
imageIds = JsonConverters.fromJson(json['imageIds'],'List<String>',context!);
invalidAntelSeal = json['invalidAntelSeal'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'upliftId': upliftId,
'upliftAuthRequestId': upliftAuthRequestId,
'seals': JsonConverters.toJson(seals,'List<UpliftSealData>',context!),
'unbaggedItems': JsonConverters.toJson(unbaggedItems,'UpliftSealData',context!),
'claims': JsonConverters.toJson(claims,'List<UpliftClaimData>',context!),
'deleteFromDevice': deleteFromDevice,
'imageIds': JsonConverters.toJson(imageIds,'List<String>',context!),
'invalidAntelSeal': invalidAntelSeal
});
getTypeName() => "SaveUpliftResponse";
TypeContext? context = _ctx;
}
class ConcludeUplift extends ApiServiceRequest implements IConvertible
{
int? upliftSchedulePrincipleId;
String? incompleteUpliftId;
String? comments;
ConcludeUplift({this.upliftSchedulePrincipleId,this.incompleteUpliftId,this.comments});
ConcludeUplift.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
upliftSchedulePrincipleId = json['upliftSchedulePrincipleId'];
incompleteUpliftId = json['incompleteUpliftId'];
comments = json['comments'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'upliftSchedulePrincipleId': upliftSchedulePrincipleId,
'incompleteUpliftId': incompleteUpliftId,
'comments': comments
});
getTypeName() => "ConcludeUplift";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'antel.api.dev.86degrees.com', types: <String, TypeInfo> {
'ApiServiceRequest': TypeInfo(TypeOf.Class, create:() => ApiServiceRequest()),
'ApiServiceResponse': TypeInfo(TypeOf.Class, create:() => ApiServiceResponse()),
'UpliftProductData': TypeInfo(TypeOf.Class, create:() => UpliftProductData()),
'List<dynamic>': TypeInfo(TypeOf.Class, create:() => <dynamic>[]),
'UpliftSealData': TypeInfo(TypeOf.Class, create:() => UpliftSealData()),
'List<UpliftProductData>': TypeInfo(TypeOf.Class, create:() => <UpliftProductData>[]),
'UpliftClaimData': TypeInfo(TypeOf.Class, create:() => UpliftClaimData()),
'SaveUpliftResponse': TypeInfo(TypeOf.Class, create:() => SaveUpliftResponse()),
'List<UpliftSealData>': TypeInfo(TypeOf.Class, create:() => <UpliftSealData>[]),
'List<UpliftClaimData>': TypeInfo(TypeOf.Class, create:() => <UpliftClaimData>[]),
'ConcludeUplift': TypeInfo(TypeOf.Class, create:() => ConcludeUplift()),
});
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 /uplift/conclude HTTP/1.1
Host: antel.api.dev.86degrees.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<ConcludeUplift xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebService.ServiceModel">
<ApiKey xmlns="http://schemas.datacontract.org/2004/07/WebService.ServiceModel.Base">String</ApiKey>
<Latitude xmlns="http://schemas.datacontract.org/2004/07/WebService.ServiceModel.Base">0</Latitude>
<Longitude xmlns="http://schemas.datacontract.org/2004/07/WebService.ServiceModel.Base">0</Longitude>
<Comments>String</Comments>
<IncompleteUpliftId>00000000-0000-0000-0000-000000000000</IncompleteUpliftId>
<UpliftSchedulePrincipleId>0</UpliftSchedulePrincipleId>
</ConcludeUplift>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<SaveUpliftResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebService.ServiceModel">
<Description xmlns="http://schemas.datacontract.org/2004/07/WebService.ServiceModel.Base">String</Description>
<Heading xmlns="http://schemas.datacontract.org/2004/07/WebService.ServiceModel.Base">String</Heading>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types" xmlns="http://schemas.datacontract.org/2004/07/WebService.ServiceModel.Base">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
<WasSuccessful xmlns="http://schemas.datacontract.org/2004/07/WebService.ServiceModel.Base">false</WasSuccessful>
<Claims>
<UpliftClaimData>
<ClaimDocumentImages xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:anyType />
</ClaimDocumentImages>
<ClaimNumber>String</ClaimNumber>
<ClaimUnits>0</ClaimUnits>
<ClaimValue>0</ClaimValue>
<LineCount>0</LineCount>
<ReturnOrderNumber>String</ReturnOrderNumber>
<UpliftClaimId>0</UpliftClaimId>
</UpliftClaimData>
</Claims>
<DeleteFromDevice>false</DeleteFromDevice>
<ImageIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</ImageIds>
<Seals>
<UpliftSealData>
<AntelSealNumber>String</AntelSealNumber>
<BillableSeal>false</BillableSeal>
<GrossWeight>0</GrossWeight>
<InvalidAntelSealNumber>false</InvalidAntelSealNumber>
<NetWeight>0</NetWeight>
<Products>
<UpliftProductData>
<BatchCode>String</BatchCode>
<Category>String</Category>
<Code>String</Code>
<ExpiryDate>String</ExpiryDate>
<LotNumber>String</LotNumber>
<ManufactureDate>String</ManufactureDate>
<Name>String</Name>
<PriceOverMax>false</PriceOverMax>
<ProductId>0</ProductId>
<Quantity>0</Quantity>
<QuantityOverMax>false</QuantityOverMax>
<QuantityOverRequirement>false</QuantityOverRequirement>
<SerialNumber>String</SerialNumber>
<StockStatusId>0</StockStatusId>
<UnitBarcode>String</UnitBarcode>
<UnitPrice>0</UnitPrice>
<UnitSize>String</UnitSize>
<UnitWeight>0</UnitWeight>
<UpliftId>0</UpliftId>
<UpliftImages xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d6p1:anyType />
</UpliftImages>
<UpliftProductId>0</UpliftProductId>
<Value>0</Value>
</UpliftProductData>
</Products>
<SealNumber>String</SealNumber>
<TotalPrice>0</TotalPrice>
<TotalQuantity>0</TotalQuantity>
<Unbagged>false</Unbagged>
</UpliftSealData>
</Seals>
<UnbaggedItems>
<AntelSealNumber>String</AntelSealNumber>
<BillableSeal>false</BillableSeal>
<GrossWeight>0</GrossWeight>
<InvalidAntelSealNumber>false</InvalidAntelSealNumber>
<NetWeight>0</NetWeight>
<Products>
<UpliftProductData>
<BatchCode>String</BatchCode>
<Category>String</Category>
<Code>String</Code>
<ExpiryDate>String</ExpiryDate>
<LotNumber>String</LotNumber>
<ManufactureDate>String</ManufactureDate>
<Name>String</Name>
<PriceOverMax>false</PriceOverMax>
<ProductId>0</ProductId>
<Quantity>0</Quantity>
<QuantityOverMax>false</QuantityOverMax>
<QuantityOverRequirement>false</QuantityOverRequirement>
<SerialNumber>String</SerialNumber>
<StockStatusId>0</StockStatusId>
<UnitBarcode>String</UnitBarcode>
<UnitPrice>0</UnitPrice>
<UnitSize>String</UnitSize>
<UnitWeight>0</UnitWeight>
<UpliftId>0</UpliftId>
<UpliftImages xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:anyType />
</UpliftImages>
<UpliftProductId>0</UpliftProductId>
<Value>0</Value>
</UpliftProductData>
</Products>
<SealNumber>String</SealNumber>
<TotalPrice>0</TotalPrice>
<TotalQuantity>0</TotalQuantity>
<Unbagged>false</Unbagged>
</UnbaggedItems>
<UpliftAuthRequestId>00000000-0000-0000-0000-000000000000</UpliftAuthRequestId>
<UpliftId>0</UpliftId>
</SaveUpliftResponse>