| POST,OPTIONS | /v1/coverage/self/claim |
|---|
import 'package:servicestack/servicestack.dart';
class CoverageSelfEligibility implements IConvertible
{
String? Tone;
String? Text;
bool? CanClaim;
String? ClaimLabel;
CoverageSelfEligibility({this.Tone,this.Text,this.CanClaim,this.ClaimLabel});
CoverageSelfEligibility.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Tone = json['Tone'];
Text = json['Text'];
CanClaim = json['CanClaim'];
ClaimLabel = json['ClaimLabel'];
return this;
}
Map<String, dynamic> toJson() => {
'Tone': Tone,
'Text': Text,
'CanClaim': CanClaim,
'ClaimLabel': ClaimLabel
};
getTypeName() => "CoverageSelfEligibility";
TypeContext? context = _ctx;
}
class CoverageSelfMatrixRow implements IConvertible
{
String? Name;
String? Note;
String? Tone;
CoverageSelfMatrixRow({this.Name,this.Note,this.Tone});
CoverageSelfMatrixRow.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Name = json['Name'];
Note = json['Note'];
Tone = json['Tone'];
return this;
}
Map<String, dynamic> toJson() => {
'Name': Name,
'Note': Note,
'Tone': Tone
};
getTypeName() => "CoverageSelfMatrixRow";
TypeContext? context = _ctx;
}
class CoverageSelfCard implements IConvertible
{
int? CoverageGapId;
String? Kind;
String? Status;
String? ShiftDay;
String? ShiftWindow;
DateTime? ShiftStartUtc;
String? Site;
String? RoleNeeded;
String? ExpiryLabel;
String? PosterName;
int? EligibleCount;
int? IneligibleCount;
CoverageSelfEligibility? MyEligibility;
List<CoverageSelfMatrixRow>? Matrix = [];
String? SwapState;
String? SwapFromName;
String? SwapTargetName;
String? OfferShift;
String? WantShift;
bool? ConflictOk;
String? ConflictLabel;
bool? CanRespond;
CoverageSelfCard({this.CoverageGapId,this.Kind,this.Status,this.ShiftDay,this.ShiftWindow,this.ShiftStartUtc,this.Site,this.RoleNeeded,this.ExpiryLabel,this.PosterName,this.EligibleCount,this.IneligibleCount,this.MyEligibility,this.Matrix,this.SwapState,this.SwapFromName,this.SwapTargetName,this.OfferShift,this.WantShift,this.ConflictOk,this.ConflictLabel,this.CanRespond});
CoverageSelfCard.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CoverageGapId = json['CoverageGapId'];
Kind = json['Kind'];
Status = json['Status'];
ShiftDay = json['ShiftDay'];
ShiftWindow = json['ShiftWindow'];
ShiftStartUtc = JsonConverters.fromJson(json['ShiftStartUtc'],'DateTime',context!);
Site = json['Site'];
RoleNeeded = json['RoleNeeded'];
ExpiryLabel = json['ExpiryLabel'];
PosterName = json['PosterName'];
EligibleCount = json['EligibleCount'];
IneligibleCount = json['IneligibleCount'];
MyEligibility = JsonConverters.fromJson(json['MyEligibility'],'CoverageSelfEligibility',context!);
Matrix = JsonConverters.fromJson(json['Matrix'],'List<CoverageSelfMatrixRow>',context!);
SwapState = json['SwapState'];
SwapFromName = json['SwapFromName'];
SwapTargetName = json['SwapTargetName'];
OfferShift = json['OfferShift'];
WantShift = json['WantShift'];
ConflictOk = json['ConflictOk'];
ConflictLabel = json['ConflictLabel'];
CanRespond = json['CanRespond'];
return this;
}
Map<String, dynamic> toJson() => {
'CoverageGapId': CoverageGapId,
'Kind': Kind,
'Status': Status,
'ShiftDay': ShiftDay,
'ShiftWindow': ShiftWindow,
'ShiftStartUtc': JsonConverters.toJson(ShiftStartUtc,'DateTime',context!),
'Site': Site,
'RoleNeeded': RoleNeeded,
'ExpiryLabel': ExpiryLabel,
'PosterName': PosterName,
'EligibleCount': EligibleCount,
'IneligibleCount': IneligibleCount,
'MyEligibility': JsonConverters.toJson(MyEligibility,'CoverageSelfEligibility',context!),
'Matrix': JsonConverters.toJson(Matrix,'List<CoverageSelfMatrixRow>',context!),
'SwapState': SwapState,
'SwapFromName': SwapFromName,
'SwapTargetName': SwapTargetName,
'OfferShift': OfferShift,
'WantShift': WantShift,
'ConflictOk': ConflictOk,
'ConflictLabel': ConflictLabel,
'CanRespond': CanRespond
};
getTypeName() => "CoverageSelfCard";
TypeContext? context = _ctx;
}
class CoverageSelfCardResponse implements IConvertible
{
ResponseStatus? ResponseStatus;
CoverageSelfCard? Card;
CoverageSelfCardResponse({this.ResponseStatus,this.Card});
CoverageSelfCardResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
Card = JsonConverters.fromJson(json['Card'],'CoverageSelfCard',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'Card': JsonConverters.toJson(Card,'CoverageSelfCard',context!)
};
getTypeName() => "CoverageSelfCardResponse";
TypeContext? context = _ctx;
}
class CoverageSelfClaimRequest implements IConvertible
{
int? CoverageGapId;
CoverageSelfClaimRequest({this.CoverageGapId});
CoverageSelfClaimRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CoverageGapId = json['CoverageGapId'];
return this;
}
Map<String, dynamic> toJson() => {
'CoverageGapId': CoverageGapId
};
getTypeName() => "CoverageSelfClaimRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'CoverageSelfEligibility': TypeInfo(TypeOf.Class, create:() => CoverageSelfEligibility()),
'CoverageSelfMatrixRow': TypeInfo(TypeOf.Class, create:() => CoverageSelfMatrixRow()),
'CoverageSelfCard': TypeInfo(TypeOf.Class, create:() => CoverageSelfCard()),
'List<CoverageSelfMatrixRow>': TypeInfo(TypeOf.Class, create:() => <CoverageSelfMatrixRow>[]),
'CoverageSelfCardResponse': TypeInfo(TypeOf.Class, create:() => CoverageSelfCardResponse()),
'CoverageSelfClaimRequest': TypeInfo(TypeOf.Class, create:() => CoverageSelfClaimRequest()),
});
Dart CoverageSelfClaimRequest 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/coverage/self/claim HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"CoverageGapId":0}
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"}},"Card":{"CoverageGapId":0,"Kind":"String","Status":"String","ShiftDay":"String","ShiftWindow":"String","ShiftStartUtc":"0001-01-01T00:00:00.0000000","Site":"String","RoleNeeded":"String","ExpiryLabel":"String","PosterName":"String","EligibleCount":0,"IneligibleCount":0,"MyEligibility":{"Tone":"String","Text":"String","CanClaim":false,"ClaimLabel":"String"},"Matrix":[{"Name":"String","Note":"String","Tone":"String"}],"SwapState":"String","SwapFromName":"String","SwapTargetName":"String","OfferShift":"String","WantShift":"String","ConflictOk":false,"ConflictLabel":"String","CanRespond":false}}