| POST | /twofa/enable |
|---|
import 'package:servicestack/servicestack.dart';
class TwoFAEnableSubmitResponse implements IConvertible
{
List<String>? RecoveryCodes;
TwoFAEnableSubmitResponse({this.RecoveryCodes});
TwoFAEnableSubmitResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
RecoveryCodes = JsonConverters.fromJson(json['RecoveryCodes'],'List<String>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'RecoveryCodes': JsonConverters.toJson(RecoveryCodes,'List<String>',context!)
};
getTypeName() => "TwoFAEnableSubmitResponse";
TypeContext? context = _ctx;
}
class TwoFAEnableSubmitRequest implements IConvertible
{
// @Required()
int? VerificationCode;
TwoFAEnableSubmitRequest({this.VerificationCode});
TwoFAEnableSubmitRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
VerificationCode = json['VerificationCode'];
return this;
}
Map<String, dynamic> toJson() => {
'VerificationCode': VerificationCode
};
getTypeName() => "TwoFAEnableSubmitRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'duengageapi.uat.scadsoftware.com', types: <String, TypeInfo> {
'TwoFAEnableSubmitResponse': TypeInfo(TypeOf.Class, create:() => TwoFAEnableSubmitResponse()),
'TwoFAEnableSubmitRequest': TypeInfo(TypeOf.Class, create:() => TwoFAEnableSubmitRequest()),
});
Dart TwoFAEnableSubmitRequest 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.
POST /twofa/enable HTTP/1.1
Host: duengageapi.uat.scadsoftware.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
VerificationCode: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
RecoveryCodes:
[
String
]
}