| Requires any of the roles: | Agent, Administrator |
| POST,OPTIONS | /v1/Rfp/Availability/Refresh |
|---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class AvailabilityRowView implements IConvertible
{
int? ResourceAvailabilityID;
String? ResourceType;
String? Label;
String? EquipmentName;
String? RolesCsv;
double? InternalRate;
double? RentalRate;
double? PremiumPerHour;
DateTime? AvailableFrom;
String? FreedFromProjectLabel;
String? Source;
AvailabilityRowView({this.ResourceAvailabilityID,this.ResourceType,this.Label,this.EquipmentName,this.RolesCsv,this.InternalRate,this.RentalRate,this.PremiumPerHour,this.AvailableFrom,this.FreedFromProjectLabel,this.Source});
AvailabilityRowView.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResourceAvailabilityID = json['ResourceAvailabilityID'];
ResourceType = json['ResourceType'];
Label = json['Label'];
EquipmentName = json['EquipmentName'];
RolesCsv = json['RolesCsv'];
InternalRate = JsonConverters.toDouble(json['InternalRate']);
RentalRate = JsonConverters.toDouble(json['RentalRate']);
PremiumPerHour = JsonConverters.toDouble(json['PremiumPerHour']);
AvailableFrom = JsonConverters.fromJson(json['AvailableFrom'],'DateTime',context!);
FreedFromProjectLabel = json['FreedFromProjectLabel'];
Source = json['Source'];
return this;
}
Map<String, dynamic> toJson() => {
'ResourceAvailabilityID': ResourceAvailabilityID,
'ResourceType': ResourceType,
'Label': Label,
'EquipmentName': EquipmentName,
'RolesCsv': RolesCsv,
'InternalRate': InternalRate,
'RentalRate': RentalRate,
'PremiumPerHour': PremiumPerHour,
'AvailableFrom': JsonConverters.toJson(AvailableFrom,'DateTime',context!),
'FreedFromProjectLabel': FreedFromProjectLabel,
'Source': Source
};
getTypeName() => "AvailabilityRowView";
TypeContext? context = _ctx;
}
class AvailabilityRefreshSummary implements IConvertible
{
int? Derived;
int? DeactivatedStale;
int? SkippedManualPrecedence;
int? SkippedNoRentalSource;
int? SkippedNoDayRate;
List<String>? Notes = [];
AvailabilityRefreshSummary({this.Derived,this.DeactivatedStale,this.SkippedManualPrecedence,this.SkippedNoRentalSource,this.SkippedNoDayRate,this.Notes});
AvailabilityRefreshSummary.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Derived = json['Derived'];
DeactivatedStale = json['DeactivatedStale'];
SkippedManualPrecedence = json['SkippedManualPrecedence'];
SkippedNoRentalSource = json['SkippedNoRentalSource'];
SkippedNoDayRate = json['SkippedNoDayRate'];
Notes = JsonConverters.fromJson(json['Notes'],'List<String>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Derived': Derived,
'DeactivatedStale': DeactivatedStale,
'SkippedManualPrecedence': SkippedManualPrecedence,
'SkippedNoRentalSource': SkippedNoRentalSource,
'SkippedNoDayRate': SkippedNoDayRate,
'Notes': JsonConverters.toJson(Notes,'List<String>',context!)
};
getTypeName() => "AvailabilityRefreshSummary";
TypeContext? context = _ctx;
}
class AvailabilityListResponse implements IConvertible
{
ResponseStatus? ResponseStatus;
List<AvailabilityRowView>? Rows = [];
List<String>? EquipmentNames = [];
List<String>? CrewRoles = [];
AvailabilityRefreshSummary? Summary;
AvailabilityListResponse({this.ResponseStatus,this.Rows,this.EquipmentNames,this.CrewRoles,this.Summary});
AvailabilityListResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
Rows = JsonConverters.fromJson(json['Rows'],'List<AvailabilityRowView>',context!);
EquipmentNames = JsonConverters.fromJson(json['EquipmentNames'],'List<String>',context!);
CrewRoles = JsonConverters.fromJson(json['CrewRoles'],'List<String>',context!);
Summary = JsonConverters.fromJson(json['Summary'],'AvailabilityRefreshSummary',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'Rows': JsonConverters.toJson(Rows,'List<AvailabilityRowView>',context!),
'EquipmentNames': JsonConverters.toJson(EquipmentNames,'List<String>',context!),
'CrewRoles': JsonConverters.toJson(CrewRoles,'List<String>',context!),
'Summary': JsonConverters.toJson(Summary,'AvailabilityRefreshSummary',context!)
};
getTypeName() => "AvailabilityListResponse";
TypeContext? context = _ctx;
}
class AvailabilityRefreshRequest implements IConvertible
{
AvailabilityRefreshRequest();
AvailabilityRefreshRequest.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "AvailabilityRefreshRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'AvailabilityRowView': TypeInfo(TypeOf.Class, create:() => AvailabilityRowView()),
'AvailabilityRefreshSummary': TypeInfo(TypeOf.Class, create:() => AvailabilityRefreshSummary()),
'AvailabilityListResponse': TypeInfo(TypeOf.Class, create:() => AvailabilityListResponse()),
'List<AvailabilityRowView>': TypeInfo(TypeOf.Class, create:() => <AvailabilityRowView>[]),
'AvailabilityRefreshRequest': TypeInfo(TypeOf.Class, create:() => AvailabilityRefreshRequest()),
});
Dart AvailabilityRefreshRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/Rfp/Availability/Refresh HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Rows":[{"ResourceAvailabilityID":0,"ResourceType":"String","Label":"String","EquipmentName":"String","RolesCsv":"String","InternalRate":0,"RentalRate":0,"PremiumPerHour":0,"AvailableFrom":"0001-01-01T00:00:00.0000000","FreedFromProjectLabel":"String","Source":"String"}],"EquipmentNames":["String"],"CrewRoles":["String"],"Summary":{"Derived":0,"DeactivatedStale":0,"SkippedManualPrecedence":0,"SkippedNoRentalSource":0,"SkippedNoDayRate":0,"Notes":["String"]}}