| GET | /v1/coverage/weather/preview |
|---|
import 'package:servicestack/servicestack.dart';
class CoverageWeatherItem implements IConvertible
{
int? JobID;
String? JobName;
int? CrewCount;
String? Note;
String? Tone;
bool? MustFill;
bool? PrevailingWage;
CoverageWeatherItem({this.JobID,this.JobName,this.CrewCount,this.Note,this.Tone,this.MustFill,this.PrevailingWage});
CoverageWeatherItem.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
JobID = json['JobID'];
JobName = json['JobName'];
CrewCount = json['CrewCount'];
Note = json['Note'];
Tone = json['Tone'];
MustFill = json['MustFill'];
PrevailingWage = json['PrevailingWage'];
return this;
}
Map<String, dynamic> toJson() => {
'JobID': JobID,
'JobName': JobName,
'CrewCount': CrewCount,
'Note': Note,
'Tone': Tone,
'MustFill': MustFill,
'PrevailingWage': PrevailingWage
};
getTypeName() => "CoverageWeatherItem";
TypeContext? context = _ctx;
}
class CoverageExplanationSource implements IConvertible
{
String? PolicyName;
String? CascadeLevel;
CoverageExplanationSource({this.PolicyName,this.CascadeLevel});
CoverageExplanationSource.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
PolicyName = json['PolicyName'];
CascadeLevel = json['CascadeLevel'];
return this;
}
Map<String, dynamic> toJson() => {
'PolicyName': PolicyName,
'CascadeLevel': CascadeLevel
};
getTypeName() => "CoverageExplanationSource";
TypeContext? context = _ctx;
}
class CoverageExplanationOverride implements IConvertible
{
String? Who;
String? Consequence;
CoverageExplanationOverride({this.Who,this.Consequence});
CoverageExplanationOverride.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Who = json['Who'];
Consequence = json['Consequence'];
return this;
}
Map<String, dynamic> toJson() => {
'Who': Who,
'Consequence': Consequence
};
getTypeName() => "CoverageExplanationOverride";
TypeContext? context = _ctx;
}
class CoverageExplanation implements IConvertible
{
String? PlainSentence;
String? RuleId;
String? RuleName;
String? Demand;
CoverageExplanationSource? Source;
String? Kind;
String? WhyItExists;
String? WhatWouldChangeIt;
CoverageExplanationOverride? Override;
String? Drill;
CoverageExplanation({this.PlainSentence,this.RuleId,this.RuleName,this.Demand,this.Source,this.Kind,this.WhyItExists,this.WhatWouldChangeIt,this.Override,this.Drill});
CoverageExplanation.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
PlainSentence = json['PlainSentence'];
RuleId = json['RuleId'];
RuleName = json['RuleName'];
Demand = json['Demand'];
Source = JsonConverters.fromJson(json['Source'],'CoverageExplanationSource',context!);
Kind = json['Kind'];
WhyItExists = json['WhyItExists'];
WhatWouldChangeIt = json['WhatWouldChangeIt'];
Override = JsonConverters.fromJson(json['Override'],'CoverageExplanationOverride',context!);
Drill = json['Drill'];
return this;
}
Map<String, dynamic> toJson() => {
'PlainSentence': PlainSentence,
'RuleId': RuleId,
'RuleName': RuleName,
'Demand': Demand,
'Source': JsonConverters.toJson(Source,'CoverageExplanationSource',context!),
'Kind': Kind,
'WhyItExists': WhyItExists,
'WhatWouldChangeIt': WhatWouldChangeIt,
'Override': JsonConverters.toJson(Override,'CoverageExplanationOverride',context!),
'Drill': Drill
};
getTypeName() => "CoverageExplanation";
TypeContext? context = _ctx;
}
class CoverageEffect implements IConvertible
{
String? Icon;
String? Text;
String? RuleId;
CoverageExplanation? Expl;
CoverageEffect({this.Icon,this.Text,this.RuleId,this.Expl});
CoverageEffect.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Icon = json['Icon'];
Text = json['Text'];
RuleId = json['RuleId'];
Expl = JsonConverters.fromJson(json['Expl'],'CoverageExplanation',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Icon': Icon,
'Text': Text,
'RuleId': RuleId,
'Expl': JsonConverters.toJson(Expl,'CoverageExplanation',context!)
};
getTypeName() => "CoverageEffect";
TypeContext? context = _ctx;
}
class CoverageWeatherPreviewResponse implements IConvertible
{
String? Banner;
String? ScopeLine;
List<CoverageWeatherItem>? Items = [];
List<CoverageEffect>? Conseq = [];
int? CustomerCount;
ResponseStatus? ResponseStatus;
CoverageWeatherPreviewResponse({this.Banner,this.ScopeLine,this.Items,this.Conseq,this.CustomerCount,this.ResponseStatus});
CoverageWeatherPreviewResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Banner = json['Banner'];
ScopeLine = json['ScopeLine'];
Items = JsonConverters.fromJson(json['Items'],'List<CoverageWeatherItem>',context!);
Conseq = JsonConverters.fromJson(json['Conseq'],'List<CoverageEffect>',context!);
CustomerCount = json['CustomerCount'];
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Banner': Banner,
'ScopeLine': ScopeLine,
'Items': JsonConverters.toJson(Items,'List<CoverageWeatherItem>',context!),
'Conseq': JsonConverters.toJson(Conseq,'List<CoverageEffect>',context!),
'CustomerCount': CustomerCount,
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "CoverageWeatherPreviewResponse";
TypeContext? context = _ctx;
}
class CoverageWeatherPreviewRequest implements IConvertible
{
DateTime? ScopeDate;
String? BranchId;
CoverageWeatherPreviewRequest({this.ScopeDate,this.BranchId});
CoverageWeatherPreviewRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ScopeDate = JsonConverters.fromJson(json['ScopeDate'],'DateTime',context!);
BranchId = json['BranchId'];
return this;
}
Map<String, dynamic> toJson() => {
'ScopeDate': JsonConverters.toJson(ScopeDate,'DateTime',context!),
'BranchId': BranchId
};
getTypeName() => "CoverageWeatherPreviewRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'CoverageWeatherItem': TypeInfo(TypeOf.Class, create:() => CoverageWeatherItem()),
'CoverageExplanationSource': TypeInfo(TypeOf.Class, create:() => CoverageExplanationSource()),
'CoverageExplanationOverride': TypeInfo(TypeOf.Class, create:() => CoverageExplanationOverride()),
'CoverageExplanation': TypeInfo(TypeOf.Class, create:() => CoverageExplanation()),
'CoverageEffect': TypeInfo(TypeOf.Class, create:() => CoverageEffect()),
'CoverageWeatherPreviewResponse': TypeInfo(TypeOf.Class, create:() => CoverageWeatherPreviewResponse()),
'List<CoverageWeatherItem>': TypeInfo(TypeOf.Class, create:() => <CoverageWeatherItem>[]),
'List<CoverageEffect>': TypeInfo(TypeOf.Class, create:() => <CoverageEffect>[]),
'CoverageWeatherPreviewRequest': TypeInfo(TypeOf.Class, create:() => CoverageWeatherPreviewRequest()),
});
Dart CoverageWeatherPreviewRequest 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 /v1/coverage/weather/preview HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<CoverageWeatherPreviewResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Banner>String</Banner>
<Conseq>
<CoverageEffect>
<Expl>
<Demand>String</Demand>
<Drill>String</Drill>
<Kind>String</Kind>
<Override>
<Consequence>String</Consequence>
<Who>String</Who>
</Override>
<PlainSentence>String</PlainSentence>
<RuleId>String</RuleId>
<RuleName>String</RuleName>
<Source>
<CascadeLevel>String</CascadeLevel>
<PolicyName>String</PolicyName>
</Source>
<WhatWouldChangeIt>String</WhatWouldChangeIt>
<WhyItExists>String</WhyItExists>
</Expl>
<Icon>String</Icon>
<RuleId>String</RuleId>
<Text>String</Text>
</CoverageEffect>
</Conseq>
<CustomerCount>0</CustomerCount>
<Items>
<CoverageWeatherItem>
<CrewCount>0</CrewCount>
<JobID>0</JobID>
<JobName>String</JobName>
<MustFill>false</MustFill>
<Note>String</Note>
<PrevailingWage>false</PrevailingWage>
<Tone>String</Tone>
</CoverageWeatherItem>
</Items>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
<ScopeLine>String</ScopeLine>
</CoverageWeatherPreviewResponse>