| PUT | /v1/forms/kiosk-branches/{BranchId} |
|---|
import 'package:servicestack/servicestack.dart';
class FormKioskBranchApp implements IConvertible
{
String? FormUID;
String? Name;
String? Noun;
bool? Shown;
bool? Offered;
FormKioskBranchApp({this.FormUID,this.Name,this.Noun,this.Shown,this.Offered});
FormKioskBranchApp.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
FormUID = json['FormUID'];
Name = json['Name'];
Noun = json['Noun'];
Shown = json['Shown'];
Offered = json['Offered'];
return this;
}
Map<String, dynamic> toJson() => {
'FormUID': FormUID,
'Name': Name,
'Noun': Noun,
'Shown': Shown,
'Offered': Offered
};
getTypeName() => "FormKioskBranchApp";
TypeContext? context = _ctx;
}
class FormKioskBranchName implements IConvertible
{
String? BranchId;
String? Name;
FormKioskBranchName({this.BranchId,this.Name});
FormKioskBranchName.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
BranchId = json['BranchId'];
Name = json['Name'];
return this;
}
Map<String, dynamic> toJson() => {
'BranchId': BranchId,
'Name': Name
};
getTypeName() => "FormKioskBranchName";
TypeContext? context = _ctx;
}
class FormKioskBranchesResponse implements IConvertible
{
String? BranchName;
List<FormKioskBranchApp>? Apps = [];
int? NotOffered;
List<FormKioskBranchName>? Branches = [];
int? Count;
String? Sentence;
ResponseStatus? ResponseStatus;
FormKioskBranchesResponse({this.BranchName,this.Apps,this.NotOffered,this.Branches,this.Count,this.Sentence,this.ResponseStatus});
FormKioskBranchesResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
BranchName = json['BranchName'];
Apps = JsonConverters.fromJson(json['Apps'],'List<FormKioskBranchApp>',context!);
NotOffered = json['NotOffered'];
Branches = JsonConverters.fromJson(json['Branches'],'List<FormKioskBranchName>',context!);
Count = json['Count'];
Sentence = json['Sentence'];
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'BranchName': BranchName,
'Apps': JsonConverters.toJson(Apps,'List<FormKioskBranchApp>',context!),
'NotOffered': NotOffered,
'Branches': JsonConverters.toJson(Branches,'List<FormKioskBranchName>',context!),
'Count': Count,
'Sentence': Sentence,
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "FormKioskBranchesResponse";
TypeContext? context = _ctx;
}
class FormKioskBranchSetRequest implements IConvertible
{
String? BranchId;
String? FormUID;
bool? Show;
FormKioskBranchSetRequest({this.BranchId,this.FormUID,this.Show});
FormKioskBranchSetRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
BranchId = json['BranchId'];
FormUID = json['FormUID'];
Show = json['Show'];
return this;
}
Map<String, dynamic> toJson() => {
'BranchId': BranchId,
'FormUID': FormUID,
'Show': Show
};
getTypeName() => "FormKioskBranchSetRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'FormKioskBranchApp': TypeInfo(TypeOf.Class, create:() => FormKioskBranchApp()),
'FormKioskBranchName': TypeInfo(TypeOf.Class, create:() => FormKioskBranchName()),
'FormKioskBranchesResponse': TypeInfo(TypeOf.Class, create:() => FormKioskBranchesResponse()),
'List<FormKioskBranchApp>': TypeInfo(TypeOf.Class, create:() => <FormKioskBranchApp>[]),
'List<FormKioskBranchName>': TypeInfo(TypeOf.Class, create:() => <FormKioskBranchName>[]),
'FormKioskBranchSetRequest': TypeInfo(TypeOf.Class, create:() => FormKioskBranchSetRequest()),
});
Dart FormKioskBranchSetRequest 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.
PUT /v1/forms/kiosk-branches/{BranchId} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
BranchId: 00000000000000000000000000000000,
FormUID: 00000000000000000000000000000000,
Show: False
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
BranchName: String,
Apps:
[
{
FormUID: String,
Name: String,
Noun: String,
Shown: False,
Offered: False
}
],
NotOffered: 0,
Branches:
[
{
BranchId: String,
Name: String
}
],
Count: 0,
Sentence: String,
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}