| GET | /v1/onboarding/status |
|---|
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 GetOnboardingStatusRequest implements IConvertible
{
GetOnboardingStatusRequest();
GetOnboardingStatusRequest.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "GetOnboardingStatusRequest";
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>[]),
'GetOnboardingStatusRequest': TypeInfo(TypeOf.Class, create:() => GetOnboardingStatusRequest()),
});
Dart GetOnboardingStatusRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/onboarding/status HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
TenantName: String,
PropertyTerm: String,
Steps:
[
{
Key: String,
Chapter: String,
Title: String,
Why: String,
HelpHtml: String,
Icon: String,
CtaLabel: String,
CtaRoute: String,
Required: False,
State: 0,
Done: False,
AutoDetected: False,
Count: 0,
Requires:
[
String
],
DetectsCount: False,
LockKey: String,
Locked:
{
Reason: String,
FeatureKey: String,
FeatureName: String,
ModuleKey: String,
ModuleName: String,
ExpiresAt: 0001-01-01,
RequestedAt: 0001-01-01
},
InTrial: False,
TrialEndsAt: 0001-01-01
}
],
TotalSteps: 0,
DoneSteps: 0,
SatisfiedSteps: 0,
RequiredTotal: 0,
RequiredDone: 0,
PercentComplete: 0,
IsComplete: False,
Dismissed: False,
Chapters:
[
{
Name: String,
Color: String,
Total: 0,
Satisfied: 0,
Full: False,
Progress: String,
LockReason: String
}
],
DriverServices:
[
{
Key: String,
Mode: String,
Name: String,
What: String,
Allowed: False,
Enabled: False,
InPack: False,
Adds:
[
String
],
GoScreens: String,
Fleet: False,
InFlight: 0
}
],
DriverServicesOn: False,
ModulesOn: 0,
ModulesSkipped: 0,
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}