| GET | /v2/inventoryblock/summary/{CendynPropertyId} | ||
|---|---|---|---|
| GET | /v2/inventoryblock/summary |
import 'package:servicestack/servicestack.dart';
enum RequestStatus
{
Success,
Warning,
Error,
NotAuthorized,
Failure,
}
class CenResResponse implements IConvertible
{
RequestStatus? status;
String? statusMessage;
int? recordsReturned;
int? recordsAvailable;
int? pageNumber;
int? pageSize;
CenResResponse({this.status,this.statusMessage,this.recordsReturned,this.recordsAvailable,this.pageNumber,this.pageSize});
CenResResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
status = JsonConverters.fromJson(json['status'],'RequestStatus',context!);
statusMessage = json['statusMessage'];
recordsReturned = json['recordsReturned'];
recordsAvailable = json['recordsAvailable'];
pageNumber = json['pageNumber'];
pageSize = json['pageSize'];
return this;
}
Map<String, dynamic> toJson() => {
'status': JsonConverters.toJson(status,'RequestStatus',context!),
'statusMessage': statusMessage,
'recordsReturned': recordsReturned,
'recordsAvailable': recordsAvailable,
'pageNumber': pageNumber,
'pageSize': pageSize
};
getTypeName() => "CenResResponse";
TypeContext? context = _ctx;
}
class InventoryBlockSummary implements IConvertible
{
String? cendynPropertyID;
DateTime? inventoryDay;
int? count;
int? sold;
DateTime? lastUpdated;
InventoryBlockSummary({this.cendynPropertyID,this.inventoryDay,this.count,this.sold,this.lastUpdated});
InventoryBlockSummary.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
cendynPropertyID = json['cendynPropertyID'];
inventoryDay = JsonConverters.fromJson(json['inventoryDay'],'DateTime',context!);
count = json['count'];
sold = json['sold'];
lastUpdated = JsonConverters.fromJson(json['lastUpdated'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'cendynPropertyID': cendynPropertyID,
'inventoryDay': JsonConverters.toJson(inventoryDay,'DateTime',context!),
'count': count,
'sold': sold,
'lastUpdated': JsonConverters.toJson(lastUpdated,'DateTime',context!)
};
getTypeName() => "InventoryBlockSummary";
TypeContext? context = _ctx;
}
class InventoryBlockSummaryResponse extends CenResResponse implements IConvertible
{
List<InventoryBlockSummary>? records;
InventoryBlockSummaryResponse({this.records});
InventoryBlockSummaryResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
records = JsonConverters.fromJson(json['records'],'List<InventoryBlockSummary>',context!);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'records': JsonConverters.toJson(records,'List<InventoryBlockSummary>',context!)
});
getTypeName() => "InventoryBlockSummaryResponse";
TypeContext? context = _ctx;
}
class InventoryBlockSummaryRequest implements IConvertible
{
String? cendynPropertyId;
DateTime? startDate;
DateTime? endDate;
// @DataMember(Name="Limit")
int? pageSize;
// @DataMember(Name="Page")
int? pageNumber;
InventoryBlockSummaryRequest({this.cendynPropertyId,this.startDate,this.endDate,this.pageSize,this.pageNumber});
InventoryBlockSummaryRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
cendynPropertyId = json['cendynPropertyId'];
startDate = JsonConverters.fromJson(json['startDate'],'DateTime',context!);
endDate = JsonConverters.fromJson(json['endDate'],'DateTime',context!);
pageSize = json['pageSize'];
pageNumber = json['pageNumber'];
return this;
}
Map<String, dynamic> toJson() => {
'cendynPropertyId': cendynPropertyId,
'startDate': JsonConverters.toJson(startDate,'DateTime',context!),
'endDate': JsonConverters.toJson(endDate,'DateTime',context!),
'pageSize': pageSize,
'pageNumber': pageNumber
};
getTypeName() => "InventoryBlockSummaryRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'cert.cendyn.com', types: <String, TypeInfo> {
'RequestStatus': TypeInfo(TypeOf.Enum, enumValues:RequestStatus.values),
'CenResResponse': TypeInfo(TypeOf.Class, create:() => CenResResponse()),
'InventoryBlockSummary': TypeInfo(TypeOf.Class, create:() => InventoryBlockSummary()),
'InventoryBlockSummaryResponse': TypeInfo(TypeOf.Class, create:() => InventoryBlockSummaryResponse()),
'List<InventoryBlockSummary>': TypeInfo(TypeOf.Class, create:() => <InventoryBlockSummary>[]),
'InventoryBlockSummaryRequest': TypeInfo(TypeOf.Class, create:() => InventoryBlockSummaryRequest()),
});
Dart InventoryBlockSummaryRequest DTOs
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.
GET /v2/inventoryblock/summary/{CendynPropertyId} HTTP/1.1
Host: cert.cendyn.com
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<InventoryBlockSummaryResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CenResSS.ServiceModel">
<PageNumber>0</PageNumber>
<PageSize>0</PageSize>
<RecordsAvailable>0</RecordsAvailable>
<RecordsReturned>0</RecordsReturned>
<Status>Success</Status>
<StatusMessage>String</StatusMessage>
<Records xmlns:d2p1="http://schemas.datacontract.org/2004/07/Cendyn.CenRes.DataLib.ViewModels">
<d2p1:InventoryBlockSummary>
<d2p1:CendynPropertyID>String</d2p1:CendynPropertyID>
<d2p1:Count>0</d2p1:Count>
<d2p1:InventoryDay>0001-01-01T00:00:00</d2p1:InventoryDay>
<d2p1:LastUpdated>0001-01-01T00:00:00</d2p1:LastUpdated>
<d2p1:Sold>0</d2p1:Sold>
</d2p1:InventoryBlockSummary>
</Records>
</InventoryBlockSummaryResponse>