| POST,OPTIONS | /v1/projects/{ProjectID}/wage-determinations/samgov-import |
|---|
import 'package:servicestack/servicestack.dart';
class SamGovImportResult implements IConvertible
{
String? WdNumber;
int? Revision;
int? ProjectWageDeterminationID;
int? ClassificationsImported;
String? EffectiveFrom;
SamGovImportResult({this.WdNumber,this.Revision,this.ProjectWageDeterminationID,this.ClassificationsImported,this.EffectiveFrom});
SamGovImportResult.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
WdNumber = json['WdNumber'];
Revision = json['Revision'];
ProjectWageDeterminationID = json['ProjectWageDeterminationID'];
ClassificationsImported = json['ClassificationsImported'];
EffectiveFrom = json['EffectiveFrom'];
return this;
}
Map<String, dynamic> toJson() => {
'WdNumber': WdNumber,
'Revision': Revision,
'ProjectWageDeterminationID': ProjectWageDeterminationID,
'ClassificationsImported': ClassificationsImported,
'EffectiveFrom': EffectiveFrom
};
getTypeName() => "SamGovImportResult";
TypeContext? context = _ctx;
}
class ProjectWageDetermination implements IConvertible
{
int? ProjectWageDeterminationID;
String? ProjectWageDeterminationUID;
int? ProjectID;
String? DeterminationNo;
String? DeterminationType;
DateTime? EffectiveFrom;
DateTime? EffectiveTo;
bool? IsDefault;
int? SortOrder;
String? CreatedBy;
DateTime? CreatedAt;
DateTime? UpdatedAt;
ProjectWageDetermination({this.ProjectWageDeterminationID,this.ProjectWageDeterminationUID,this.ProjectID,this.DeterminationNo,this.DeterminationType,this.EffectiveFrom,this.EffectiveTo,this.IsDefault,this.SortOrder,this.CreatedBy,this.CreatedAt,this.UpdatedAt});
ProjectWageDetermination.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ProjectWageDeterminationID = json['ProjectWageDeterminationID'];
ProjectWageDeterminationUID = json['ProjectWageDeterminationUID'];
ProjectID = json['ProjectID'];
DeterminationNo = json['DeterminationNo'];
DeterminationType = json['DeterminationType'];
EffectiveFrom = JsonConverters.fromJson(json['EffectiveFrom'],'DateTime',context!);
EffectiveTo = JsonConverters.fromJson(json['EffectiveTo'],'DateTime',context!);
IsDefault = json['IsDefault'];
SortOrder = json['SortOrder'];
CreatedBy = json['CreatedBy'];
CreatedAt = JsonConverters.fromJson(json['CreatedAt'],'DateTime',context!);
UpdatedAt = JsonConverters.fromJson(json['UpdatedAt'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ProjectWageDeterminationID': ProjectWageDeterminationID,
'ProjectWageDeterminationUID': ProjectWageDeterminationUID,
'ProjectID': ProjectID,
'DeterminationNo': DeterminationNo,
'DeterminationType': DeterminationType,
'EffectiveFrom': JsonConverters.toJson(EffectiveFrom,'DateTime',context!),
'EffectiveTo': JsonConverters.toJson(EffectiveTo,'DateTime',context!),
'IsDefault': IsDefault,
'SortOrder': SortOrder,
'CreatedBy': CreatedBy,
'CreatedAt': JsonConverters.toJson(CreatedAt,'DateTime',context!),
'UpdatedAt': JsonConverters.toJson(UpdatedAt,'DateTime',context!)
};
getTypeName() => "ProjectWageDetermination";
TypeContext? context = _ctx;
}
class SamGovWdImportResponse implements IConvertible
{
ResponseStatus? ResponseStatus;
SamGovImportResult? Result;
List<ProjectWageDetermination>? Determinations = [];
SamGovWdImportResponse({this.ResponseStatus,this.Result,this.Determinations});
SamGovWdImportResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
Result = JsonConverters.fromJson(json['Result'],'SamGovImportResult',context!);
Determinations = JsonConverters.fromJson(json['Determinations'],'List<ProjectWageDetermination>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'Result': JsonConverters.toJson(Result,'SamGovImportResult',context!),
'Determinations': JsonConverters.toJson(Determinations,'List<ProjectWageDetermination>',context!)
};
getTypeName() => "SamGovWdImportResponse";
TypeContext? context = _ctx;
}
class SamGovWdImportRequest implements IConvertible
{
int? ProjectID;
String? WdNumber;
int? Revision;
SamGovWdImportRequest({this.ProjectID,this.WdNumber,this.Revision});
SamGovWdImportRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ProjectID = json['ProjectID'];
WdNumber = json['WdNumber'];
Revision = json['Revision'];
return this;
}
Map<String, dynamic> toJson() => {
'ProjectID': ProjectID,
'WdNumber': WdNumber,
'Revision': Revision
};
getTypeName() => "SamGovWdImportRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'SamGovImportResult': TypeInfo(TypeOf.Class, create:() => SamGovImportResult()),
'ProjectWageDetermination': TypeInfo(TypeOf.Class, create:() => ProjectWageDetermination()),
'SamGovWdImportResponse': TypeInfo(TypeOf.Class, create:() => SamGovWdImportResponse()),
'List<ProjectWageDetermination>': TypeInfo(TypeOf.Class, create:() => <ProjectWageDetermination>[]),
'SamGovWdImportRequest': TypeInfo(TypeOf.Class, create:() => SamGovWdImportRequest()),
});
Dart SamGovWdImportRequest DTOs
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 /v1/projects/{ProjectID}/wage-determinations/samgov-import HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"ProjectID":0,"WdNumber":"String","Revision":0}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Result":{"WdNumber":"String","Revision":0,"ProjectWageDeterminationID":0,"ClassificationsImported":0,"EffectiveFrom":"String"},"Determinations":[{"ProjectWageDeterminationID":0,"ProjectWageDeterminationUID":"00000000000000000000000000000000","ProjectID":0,"DeterminationNo":"String","DeterminationType":"String","EffectiveFrom":"0001-01-01T00:00:00.0000000","EffectiveTo":"0001-01-01T00:00:00.0000000","IsDefault":false,"SortOrder":0,"CreatedBy":"String","CreatedAt":"0001-01-01T00:00:00.0000000","UpdatedAt":"0001-01-01T00:00:00.0000000"}]}