| GET,PUT,POST | /{Workspace}/InventoryItemType | ||
|---|---|---|---|
| GET,PUT,POST | /{Workspace}/InventoryItemType/{ObjectId} |
import 'package:servicestack/servicestack.dart';
abstract class InventoryTreeNode
{
String? Type;
int? DescendantCount;
InventoryTreeNode({this.Type,this.DescendantCount});
InventoryTreeNode.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Type = json['Type'];
DescendantCount = json['DescendantCount'];
return this;
}
Map<String, dynamic> toJson() => {
'Type': Type,
'DescendantCount': DescendantCount
};
getTypeName() => "InventoryTreeNode";
TypeContext? context = _ctx;
}
class InventoryItemType extends InventoryTreeNode implements IConvertible
{
String? Type;
String? ObjectId;
String? Workspace;
String? ExternalId;
String? Created;
String? LastUpdated;
String? ItemType;
String? Desc;
String? VendorNum;
String? PurchasingUOM;
String? SalesUOM;
int? ReorderLevel;
int? ReorderQty;
double? DefaultUnitCost;
double? DefaultUnitPrice;
String? Barcode;
bool? UseSerialNumbers;
String? Template;
Map<String,String?>? Data;
bool? Enabled;
String? ParentCategoryId;
bool? IncludeInactive;
InventoryItemType({this.Type,this.ObjectId,this.Workspace,this.ExternalId,this.Created,this.LastUpdated,this.ItemType,this.Desc,this.VendorNum,this.PurchasingUOM,this.SalesUOM,this.ReorderLevel,this.ReorderQty,this.DefaultUnitCost,this.DefaultUnitPrice,this.Barcode,this.UseSerialNumbers,this.Template,this.Data,this.Enabled,this.ParentCategoryId,this.IncludeInactive});
InventoryItemType.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
Type = json['Type'];
ObjectId = json['ObjectId'];
Workspace = json['Workspace'];
ExternalId = json['ExternalId'];
Created = json['Created'];
LastUpdated = json['LastUpdated'];
ItemType = json['ItemType'];
Desc = json['Desc'];
VendorNum = json['VendorNum'];
PurchasingUOM = json['PurchasingUOM'];
SalesUOM = json['SalesUOM'];
ReorderLevel = json['ReorderLevel'];
ReorderQty = json['ReorderQty'];
DefaultUnitCost = JsonConverters.toDouble(json['DefaultUnitCost']);
DefaultUnitPrice = JsonConverters.toDouble(json['DefaultUnitPrice']);
Barcode = json['Barcode'];
UseSerialNumbers = json['UseSerialNumbers'];
Template = json['Template'];
Data = JsonConverters.toStringMap(json['Data']);
Enabled = json['Enabled'];
ParentCategoryId = json['ParentCategoryId'];
IncludeInactive = json['IncludeInactive'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'Type': Type,
'ObjectId': ObjectId,
'Workspace': Workspace,
'ExternalId': ExternalId,
'Created': Created,
'LastUpdated': LastUpdated,
'ItemType': ItemType,
'Desc': Desc,
'VendorNum': VendorNum,
'PurchasingUOM': PurchasingUOM,
'SalesUOM': SalesUOM,
'ReorderLevel': ReorderLevel,
'ReorderQty': ReorderQty,
'DefaultUnitCost': DefaultUnitCost,
'DefaultUnitPrice': DefaultUnitPrice,
'Barcode': Barcode,
'UseSerialNumbers': UseSerialNumbers,
'Template': Template,
'Data': Data,
'Enabled': Enabled,
'ParentCategoryId': ParentCategoryId,
'IncludeInactive': IncludeInactive
});
getTypeName() => "InventoryItemType";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'dev.fieldsquared.com', types: <String, TypeInfo> {
'InventoryTreeNode': TypeInfo(TypeOf.AbstractClass),
'InventoryItemType': TypeInfo(TypeOf.Class, create:() => InventoryItemType()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /{Workspace}/InventoryItemType HTTP/1.1
Host: dev.fieldsquared.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"Type":"ItemType","ObjectId":"String","Workspace":"String","ExternalId":"String","Created":"String","LastUpdated":"String","ItemType":"String","Desc":"String","VendorNum":"String","PurchasingUOM":"String","SalesUOM":"String","ReorderLevel":0,"ReorderQty":0,"DefaultUnitCost":0,"DefaultUnitPrice":0,"Barcode":"String","UseSerialNumbers":false,"Template":"String","Data":{"String":"String"},"Enabled":false,"ParentCategoryId":"String","IncludeInactive":false,"DescendantCount":0}