| POST | /v1/onboarding/dismiss |
|---|
import 'package:servicestack/servicestack.dart';
class OnboardingLock implements IConvertible
{
String? Reason;
String? FeatureKey;
String? FeatureName;
String? ModuleKey;
String? ModuleName;
DateTime? ExpiresAt;
DateTime? RequestedAt;
OnboardingLock({this.Reason,this.FeatureKey,this.FeatureName,this.ModuleKey,this.ModuleName,this.ExpiresAt,this.RequestedAt});
OnboardingLock.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Reason = json['Reason'];
FeatureKey = json['FeatureKey'];
FeatureName = json['FeatureName'];
ModuleKey = json['ModuleKey'];
ModuleName = json['ModuleName'];
ExpiresAt = JsonConverters.fromJson(json['ExpiresAt'],'DateTime',context!);
RequestedAt = JsonConverters.fromJson(json['RequestedAt'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Reason': Reason,
'FeatureKey': FeatureKey,
'FeatureName': FeatureName,
'ModuleKey': ModuleKey,
'ModuleName': ModuleName,
'ExpiresAt': JsonConverters.toJson(ExpiresAt,'DateTime',context!),
'RequestedAt': JsonConverters.toJson(RequestedAt,'DateTime',context!)
};
getTypeName() => "OnboardingLock";
TypeContext? context = _ctx;
}
class OnboardingStep implements IConvertible
{
String? Key;
String? Chapter;
String? Title;
String? Why;
String? HelpHtml;
String? Icon;
String? CtaLabel;
String? CtaRoute;
bool? Required;
int? State;
bool? Done;
bool? AutoDetected;
int? Count;
List<String>? Requires = [];
bool? DetectsCount;
String? LockKey;
OnboardingLock? Locked;
bool? InTrial;
DateTime? TrialEndsAt;
OnboardingStep({this.Key,this.Chapter,this.Title,this.Why,this.HelpHtml,this.Icon,this.CtaLabel,this.CtaRoute,this.Required,this.State,this.Done,this.AutoDetected,this.Count,this.Requires,this.DetectsCount,this.LockKey,this.Locked,this.InTrial,this.TrialEndsAt});
OnboardingStep.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Key = json['Key'];
Chapter = json['Chapter'];
Title = json['Title'];
Why = json['Why'];
HelpHtml = json['HelpHtml'];
Icon = json['Icon'];
CtaLabel = json['CtaLabel'];
CtaRoute = json['CtaRoute'];
Required = json['Required'];
State = json['State'];
Done = json['Done'];
AutoDetected = json['AutoDetected'];
Count = json['Count'];
Requires = JsonConverters.fromJson(json['Requires'],'List<String>',context!);
DetectsCount = json['DetectsCount'];
LockKey = json['LockKey'];
Locked = JsonConverters.fromJson(json['Locked'],'OnboardingLock',context!);
InTrial = json['InTrial'];
TrialEndsAt = JsonConverters.fromJson(json['TrialEndsAt'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Key': Key,
'Chapter': Chapter,
'Title': Title,
'Why': Why,
'HelpHtml': HelpHtml,
'Icon': Icon,
'CtaLabel': CtaLabel,
'CtaRoute': CtaRoute,
'Required': Required,
'State': State,
'Done': Done,
'AutoDetected': AutoDetected,
'Count': Count,
'Requires': JsonConverters.toJson(Requires,'List<String>',context!),
'DetectsCount': DetectsCount,
'LockKey': LockKey,
'Locked': JsonConverters.toJson(Locked,'OnboardingLock',context!),
'InTrial': InTrial,
'TrialEndsAt': JsonConverters.toJson(TrialEndsAt,'DateTime',context!)
};
getTypeName() => "OnboardingStep";
TypeContext? context = _ctx;
}
class OnboardingChapter implements IConvertible
{
String? Name;
String? Color;
int? Total;
int? Satisfied;
bool? Full;
String? Progress;
String? LockReason;
OnboardingChapter({this.Name,this.Color,this.Total,this.Satisfied,this.Full,this.Progress,this.LockReason});
OnboardingChapter.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Name = json['Name'];
Color = json['Color'];
Total = json['Total'];
Satisfied = json['Satisfied'];
Full = json['Full'];
Progress = json['Progress'];
LockReason = json['LockReason'];
return this;
}
Map<String, dynamic> toJson() => {
'Name': Name,
'Color': Color,
'Total': Total,
'Satisfied': Satisfied,
'Full': Full,
'Progress': Progress,
'LockReason': LockReason
};
getTypeName() => "OnboardingChapter";
TypeContext? context = _ctx;
}
class DispatchModuleView implements IConvertible
{
String? Key;
String? Mode;
String? Name;
String? What;
bool? Allowed;
bool? Enabled;
bool? InPack;
List<String>? Adds = [];
String? GoScreens;
bool? Fleet;
int? InFlight;
DispatchModuleView({this.Key,this.Mode,this.Name,this.What,this.Allowed,this.Enabled,this.InPack,this.Adds,this.GoScreens,this.Fleet,this.InFlight});
DispatchModuleView.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Key = json['Key'];
Mode = json['Mode'];
Name = json['Name'];
What = json['What'];
Allowed = json['Allowed'];
Enabled = json['Enabled'];
InPack = json['InPack'];
Adds = JsonConverters.fromJson(json['Adds'],'List<String>',context!);
GoScreens = json['GoScreens'];
Fleet = json['Fleet'];
InFlight = json['InFlight'];
return this;
}
Map<String, dynamic> toJson() => {
'Key': Key,
'Mode': Mode,
'Name': Name,
'What': What,
'Allowed': Allowed,
'Enabled': Enabled,
'InPack': InPack,
'Adds': JsonConverters.toJson(Adds,'List<String>',context!),
'GoScreens': GoScreens,
'Fleet': Fleet,
'InFlight': InFlight
};
getTypeName() => "DispatchModuleView";
TypeContext? context = _ctx;
}
class OnboardingStatus implements IConvertible
{
String? TenantName;
String? PropertyTerm;
List<OnboardingStep>? Steps = [];
int? TotalSteps;
int? DoneSteps;
int? SatisfiedSteps;
int? RequiredTotal;
int? RequiredDone;
int? PercentComplete;
bool? IsComplete;
bool? Dismissed;
List<OnboardingChapter>? Chapters = [];
List<DispatchModuleView>? DriverServices = [];
bool? DriverServicesOn;
int? ModulesOn;
int? ModulesSkipped;
ResponseStatus? ResponseStatus;
OnboardingStatus({this.TenantName,this.PropertyTerm,this.Steps,this.TotalSteps,this.DoneSteps,this.SatisfiedSteps,this.RequiredTotal,this.RequiredDone,this.PercentComplete,this.IsComplete,this.Dismissed,this.Chapters,this.DriverServices,this.DriverServicesOn,this.ModulesOn,this.ModulesSkipped,this.ResponseStatus});
OnboardingStatus.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
TenantName = json['TenantName'];
PropertyTerm = json['PropertyTerm'];
Steps = JsonConverters.fromJson(json['Steps'],'List<OnboardingStep>',context!);
TotalSteps = json['TotalSteps'];
DoneSteps = json['DoneSteps'];
SatisfiedSteps = json['SatisfiedSteps'];
RequiredTotal = json['RequiredTotal'];
RequiredDone = json['RequiredDone'];
PercentComplete = json['PercentComplete'];
IsComplete = json['IsComplete'];
Dismissed = json['Dismissed'];
Chapters = JsonConverters.fromJson(json['Chapters'],'List<OnboardingChapter>',context!);
DriverServices = JsonConverters.fromJson(json['DriverServices'],'List<DispatchModuleView>',context!);
DriverServicesOn = json['DriverServicesOn'];
ModulesOn = json['ModulesOn'];
ModulesSkipped = json['ModulesSkipped'];
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'TenantName': TenantName,
'PropertyTerm': PropertyTerm,
'Steps': JsonConverters.toJson(Steps,'List<OnboardingStep>',context!),
'TotalSteps': TotalSteps,
'DoneSteps': DoneSteps,
'SatisfiedSteps': SatisfiedSteps,
'RequiredTotal': RequiredTotal,
'RequiredDone': RequiredDone,
'PercentComplete': PercentComplete,
'IsComplete': IsComplete,
'Dismissed': Dismissed,
'Chapters': JsonConverters.toJson(Chapters,'List<OnboardingChapter>',context!),
'DriverServices': JsonConverters.toJson(DriverServices,'List<DispatchModuleView>',context!),
'DriverServicesOn': DriverServicesOn,
'ModulesOn': ModulesOn,
'ModulesSkipped': ModulesSkipped,
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "OnboardingStatus";
TypeContext? context = _ctx;
}
class DismissOnboardingRequest implements IConvertible
{
bool? Dismissed;
DismissOnboardingRequest({this.Dismissed});
DismissOnboardingRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Dismissed = json['Dismissed'];
return this;
}
Map<String, dynamic> toJson() => {
'Dismissed': Dismissed
};
getTypeName() => "DismissOnboardingRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'OnboardingLock': TypeInfo(TypeOf.Class, create:() => OnboardingLock()),
'OnboardingStep': TypeInfo(TypeOf.Class, create:() => OnboardingStep()),
'OnboardingChapter': TypeInfo(TypeOf.Class, create:() => OnboardingChapter()),
'DispatchModuleView': TypeInfo(TypeOf.Class, create:() => DispatchModuleView()),
'OnboardingStatus': TypeInfo(TypeOf.Class, create:() => OnboardingStatus()),
'List<OnboardingStep>': TypeInfo(TypeOf.Class, create:() => <OnboardingStep>[]),
'List<OnboardingChapter>': TypeInfo(TypeOf.Class, create:() => <OnboardingChapter>[]),
'List<DispatchModuleView>': TypeInfo(TypeOf.Class, create:() => <DispatchModuleView>[]),
'DismissOnboardingRequest': TypeInfo(TypeOf.Class, create:() => DismissOnboardingRequest()),
});
Dart DismissOnboardingRequest 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.
POST /v1/onboarding/dismiss HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<DismissOnboardingRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Dismissed>false</Dismissed>
</DismissOnboardingRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<OnboardingStatus xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Chapters>
<OnboardingChapter>
<Color>String</Color>
<Full>false</Full>
<LockReason>String</LockReason>
<Name>String</Name>
<Progress>String</Progress>
<Satisfied>0</Satisfied>
<Total>0</Total>
</OnboardingChapter>
</Chapters>
<Dismissed>false</Dismissed>
<DoneSteps>0</DoneSteps>
<DriverServices>
<DispatchModuleView>
<Adds xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</Adds>
<Allowed>false</Allowed>
<Enabled>false</Enabled>
<Fleet>false</Fleet>
<GoScreens>String</GoScreens>
<InFlight>0</InFlight>
<InPack>false</InPack>
<Key>String</Key>
<Mode>String</Mode>
<Name>String</Name>
<What>String</What>
</DispatchModuleView>
</DriverServices>
<DriverServicesOn>false</DriverServicesOn>
<IsComplete>false</IsComplete>
<ModulesOn>0</ModulesOn>
<ModulesSkipped>0</ModulesSkipped>
<PercentComplete>0</PercentComplete>
<PropertyTerm>String</PropertyTerm>
<RequiredDone>0</RequiredDone>
<RequiredTotal>0</RequiredTotal>
<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>
<SatisfiedSteps>0</SatisfiedSteps>
<Steps>
<OnboardingStep>
<AutoDetected>false</AutoDetected>
<Chapter>String</Chapter>
<Count>0</Count>
<CtaLabel>String</CtaLabel>
<CtaRoute>String</CtaRoute>
<DetectsCount>false</DetectsCount>
<Done>false</Done>
<HelpHtml>String</HelpHtml>
<Icon>String</Icon>
<InTrial>false</InTrial>
<Key>String</Key>
<LockKey>String</LockKey>
<Locked>
<ExpiresAt>0001-01-01T00:00:00</ExpiresAt>
<FeatureKey>String</FeatureKey>
<FeatureName>String</FeatureName>
<ModuleKey>String</ModuleKey>
<ModuleName>String</ModuleName>
<Reason>String</Reason>
<RequestedAt>0001-01-01T00:00:00</RequestedAt>
</Locked>
<Required>false</Required>
<Requires xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</Requires>
<State>0</State>
<Title>String</Title>
<TrialEndsAt>0001-01-01T00:00:00</TrialEndsAt>
<Why>String</Why>
</OnboardingStep>
</Steps>
<TenantName>String</TenantName>
<TotalSteps>0</TotalSteps>
</OnboardingStatus>