| GET | /workflow/{WorkflowId}/advanced-info |
|---|
import 'package:servicestack/servicestack.dart';
class Provider implements IConvertible
{
int? id;
String? name;
String? taxCode;
String? address;
String? email;
String? phone;
String? additionalInfo;
int? providerType;
DateTime? createdAt;
int? createdBy;
Provider({this.id,this.name,this.taxCode,this.address,this.email,this.phone,this.additionalInfo,this.providerType,this.createdAt,this.createdBy});
Provider.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
taxCode = json['taxCode'];
address = json['address'];
email = json['email'];
phone = json['phone'];
additionalInfo = json['additionalInfo'];
providerType = json['providerType'];
createdAt = JsonConverters.fromJson(json['createdAt'],'DateTime',context!);
createdBy = json['createdBy'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'taxCode': taxCode,
'address': address,
'email': email,
'phone': phone,
'additionalInfo': additionalInfo,
'providerType': providerType,
'createdAt': JsonConverters.toJson(createdAt,'DateTime',context!),
'createdBy': createdBy
};
getTypeName() => "Provider";
TypeContext? context = _ctx;
}
class Contract implements IConvertible
{
int? id;
// @required()
int? workflowId;
// @StringLength(100)
String? contractNo;
// @StringLength(100)
String? contractDate;
String? serviceName;
// @StringLength(100)
String? contractType;
String? objective;
String? location;
DateTime? createdAt;
// @required()
int? createdBy;
Contract({this.id,this.workflowId,this.contractNo,this.contractDate,this.serviceName,this.contractType,this.objective,this.location,this.createdAt,this.createdBy});
Contract.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
workflowId = json['workflowId'];
contractNo = json['contractNo'];
contractDate = json['contractDate'];
serviceName = json['serviceName'];
contractType = json['contractType'];
objective = json['objective'];
location = json['location'];
createdAt = JsonConverters.fromJson(json['createdAt'],'DateTime',context!);
createdBy = json['createdBy'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'workflowId': workflowId,
'contractNo': contractNo,
'contractDate': contractDate,
'serviceName': serviceName,
'contractType': contractType,
'objective': objective,
'location': location,
'createdAt': JsonConverters.toJson(createdAt,'DateTime',context!),
'createdBy': createdBy
};
getTypeName() => "Contract";
TypeContext? context = _ctx;
}
class Estimate implements IConvertible
{
int? id;
// @required()
int? workflowId;
int? valueBeforeTax;
int? taxAmount;
int? totalAmount;
DateTime? createdAt;
// @required()
int? createdBy;
Estimate({this.id,this.workflowId,this.valueBeforeTax,this.taxAmount,this.totalAmount,this.createdAt,this.createdBy});
Estimate.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
workflowId = json['workflowId'];
valueBeforeTax = json['valueBeforeTax'];
taxAmount = json['taxAmount'];
totalAmount = json['totalAmount'];
createdAt = JsonConverters.fromJson(json['createdAt'],'DateTime',context!);
createdBy = json['createdBy'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'workflowId': workflowId,
'valueBeforeTax': valueBeforeTax,
'taxAmount': taxAmount,
'totalAmount': totalAmount,
'createdAt': JsonConverters.toJson(createdAt,'DateTime',context!),
'createdBy': createdBy
};
getTypeName() => "Estimate";
TypeContext? context = _ctx;
}
class PurchaseHistory implements IConvertible
{
int? id;
// @required()
int? workflowId;
int? sequenceNo;
String? detail;
// @StringLength(150)
String? unit;
int? quantity;
int? unitPrice;
int? amount;
String? note;
DateTime? createdAt;
// @required()
int? createdBy;
PurchaseHistory({this.id,this.workflowId,this.sequenceNo,this.detail,this.unit,this.quantity,this.unitPrice,this.amount,this.note,this.createdAt,this.createdBy});
PurchaseHistory.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
workflowId = json['workflowId'];
sequenceNo = json['sequenceNo'];
detail = json['detail'];
unit = json['unit'];
quantity = json['quantity'];
unitPrice = json['unitPrice'];
amount = json['amount'];
note = json['note'];
createdAt = JsonConverters.fromJson(json['createdAt'],'DateTime',context!);
createdBy = json['createdBy'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'workflowId': workflowId,
'sequenceNo': sequenceNo,
'detail': detail,
'unit': unit,
'quantity': quantity,
'unitPrice': unitPrice,
'amount': amount,
'note': note,
'createdAt': JsonConverters.toJson(createdAt,'DateTime',context!),
'createdBy': createdBy
};
getTypeName() => "PurchaseHistory";
TypeContext? context = _ctx;
}
class AdvancedWorkflowInfoData implements IConvertible
{
Provider? provider;
Contract? contract;
Estimate? estimate;
List<PurchaseHistory>? purchaseHistory;
AdvancedWorkflowInfoData({this.provider,this.contract,this.estimate,this.purchaseHistory});
AdvancedWorkflowInfoData.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
provider = JsonConverters.fromJson(json['provider'],'Provider',context!);
contract = JsonConverters.fromJson(json['contract'],'Contract',context!);
estimate = JsonConverters.fromJson(json['estimate'],'Estimate',context!);
purchaseHistory = JsonConverters.fromJson(json['purchaseHistory'],'List<PurchaseHistory>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'provider': JsonConverters.toJson(provider,'Provider',context!),
'contract': JsonConverters.toJson(contract,'Contract',context!),
'estimate': JsonConverters.toJson(estimate,'Estimate',context!),
'purchaseHistory': JsonConverters.toJson(purchaseHistory,'List<PurchaseHistory>',context!)
};
getTypeName() => "AdvancedWorkflowInfoData";
TypeContext? context = _ctx;
}
class AdvancedWorkflowInfoResponse implements IConvertible
{
int? code;
String? message;
AdvancedWorkflowInfoData? data;
AdvancedWorkflowInfoResponse({this.code,this.message,this.data});
AdvancedWorkflowInfoResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
code = json['code'];
message = json['message'];
data = JsonConverters.fromJson(json['data'],'AdvancedWorkflowInfoData',context!);
return this;
}
Map<String, dynamic> toJson() => {
'code': code,
'message': message,
'data': JsonConverters.toJson(data,'AdvancedWorkflowInfoData',context!)
};
getTypeName() => "AdvancedWorkflowInfoResponse";
TypeContext? context = _ctx;
}
class GetAdvancedWorkflowInfoRequest implements IConvertible
{
int? workflowId;
GetAdvancedWorkflowInfoRequest({this.workflowId});
GetAdvancedWorkflowInfoRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
workflowId = json['workflowId'];
return this;
}
Map<String, dynamic> toJson() => {
'workflowId': workflowId
};
getTypeName() => "GetAdvancedWorkflowInfoRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'etc_api.vsmlab.vn', types: <String, TypeInfo> {
'Provider': TypeInfo(TypeOf.Class, create:() => Provider()),
'Contract': TypeInfo(TypeOf.Class, create:() => Contract()),
'Estimate': TypeInfo(TypeOf.Class, create:() => Estimate()),
'PurchaseHistory': TypeInfo(TypeOf.Class, create:() => PurchaseHistory()),
'AdvancedWorkflowInfoData': TypeInfo(TypeOf.Class, create:() => AdvancedWorkflowInfoData()),
'List<PurchaseHistory>': TypeInfo(TypeOf.Class, create:() => <PurchaseHistory>[]),
'AdvancedWorkflowInfoResponse': TypeInfo(TypeOf.Class, create:() => AdvancedWorkflowInfoResponse()),
'GetAdvancedWorkflowInfoRequest': TypeInfo(TypeOf.Class, create:() => GetAdvancedWorkflowInfoRequest()),
});
Dart GetAdvancedWorkflowInfoRequest 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 /workflow/{WorkflowId}/advanced-info HTTP/1.1
Host: etc-api.vsmlab.vn
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<AdvancedWorkflowInfoResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/tvpl.api.ServiceModel">
<Code>0</Code>
<Data>
<Contract xmlns:d3p1="http://schemas.datacontract.org/2004/07/tvpl.data.Models">
<d3p1:ContractDate>String</d3p1:ContractDate>
<d3p1:ContractNo>String</d3p1:ContractNo>
<d3p1:ContractType>String</d3p1:ContractType>
<d3p1:CreatedAt>0001-01-01T00:00:00</d3p1:CreatedAt>
<d3p1:CreatedBy>0</d3p1:CreatedBy>
<d3p1:Id>0</d3p1:Id>
<d3p1:Location>String</d3p1:Location>
<d3p1:Objective>String</d3p1:Objective>
<d3p1:ServiceName>String</d3p1:ServiceName>
<d3p1:WorkflowId>0</d3p1:WorkflowId>
</Contract>
<Estimate xmlns:d3p1="http://schemas.datacontract.org/2004/07/tvpl.data.Models">
<d3p1:CreatedAt>0001-01-01T00:00:00</d3p1:CreatedAt>
<d3p1:CreatedBy>0</d3p1:CreatedBy>
<d3p1:Id>0</d3p1:Id>
<d3p1:TaxAmount>0</d3p1:TaxAmount>
<d3p1:TotalAmount>0</d3p1:TotalAmount>
<d3p1:ValueBeforeTax>0</d3p1:ValueBeforeTax>
<d3p1:WorkflowId>0</d3p1:WorkflowId>
</Estimate>
<Provider xmlns:d3p1="http://schemas.datacontract.org/2004/07/tvpl.data.Models">
<d3p1:AdditionalInfo>String</d3p1:AdditionalInfo>
<d3p1:Address>String</d3p1:Address>
<d3p1:CreatedAt>0001-01-01T00:00:00</d3p1:CreatedAt>
<d3p1:CreatedBy>0</d3p1:CreatedBy>
<d3p1:DeletedAt>0001-01-01T00:00:00</d3p1:DeletedAt>
<d3p1:DeletedBy>0</d3p1:DeletedBy>
<d3p1:Email>String</d3p1:Email>
<d3p1:Id>0</d3p1:Id>
<d3p1:IsDeleted>false</d3p1:IsDeleted>
<d3p1:Name>String</d3p1:Name>
<d3p1:Phone>String</d3p1:Phone>
<d3p1:ProviderType>0</d3p1:ProviderType>
<d3p1:TaxCode>String</d3p1:TaxCode>
</Provider>
<PurchaseHistory xmlns:d3p1="http://schemas.datacontract.org/2004/07/tvpl.data.Models">
<d3p1:PurchaseHistory>
<d3p1:Amount>0</d3p1:Amount>
<d3p1:CreatedAt>0001-01-01T00:00:00</d3p1:CreatedAt>
<d3p1:CreatedBy>0</d3p1:CreatedBy>
<d3p1:Detail>String</d3p1:Detail>
<d3p1:Id>0</d3p1:Id>
<d3p1:Note>String</d3p1:Note>
<d3p1:Quantity>0</d3p1:Quantity>
<d3p1:SequenceNo>0</d3p1:SequenceNo>
<d3p1:Unit>String</d3p1:Unit>
<d3p1:UnitPrice>0</d3p1:UnitPrice>
<d3p1:WorkflowId>0</d3p1:WorkflowId>
</d3p1:PurchaseHistory>
</PurchaseHistory>
</Data>
<Message>String</Message>
</AdvancedWorkflowInfoResponse>