All Verbs | /citizen/register |
---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class CoreRS implements IConvertible
{
String? Code;
String? ErrorMessage;
String? ErrorStackTrace;
CoreRS({this.Code,this.ErrorMessage,this.ErrorStackTrace});
CoreRS.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Code = json['Code'];
ErrorMessage = json['ErrorMessage'];
ErrorStackTrace = json['ErrorStackTrace'];
return this;
}
Map<String, dynamic> toJson() => {
'Code': Code,
'ErrorMessage': ErrorMessage,
'ErrorStackTrace': ErrorStackTrace
};
getTypeName() => "CoreRS";
TypeContext? context = _ctx;
}
class RegisterCitizenRS extends CoreRS implements IConvertible
{
String? Data;
RegisterCitizenRS({this.Data});
RegisterCitizenRS.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
Data = json['Data'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'Data': Data
});
getTypeName() => "RegisterCitizenRS";
TypeContext? context = _ctx;
}
class RegisterCitizenRQ implements IConvertible
{
String? Id;
String? Email;
String? DisplayName;
String? PhoneNumber;
int? Provider;
String? ProviderId;
String? MobileId;
String? MobileOS;
String? Password;
String? CreatedUser;
RegisterCitizenRQ({this.Id,this.Email,this.DisplayName,this.PhoneNumber,this.Provider,this.ProviderId,this.MobileId,this.MobileOS,this.Password,this.CreatedUser});
RegisterCitizenRQ.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
Email = json['Email'];
DisplayName = json['DisplayName'];
PhoneNumber = json['PhoneNumber'];
Provider = json['Provider'];
ProviderId = json['ProviderId'];
MobileId = json['MobileId'];
MobileOS = json['MobileOS'];
Password = json['Password'];
CreatedUser = json['CreatedUser'];
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'Email': Email,
'DisplayName': DisplayName,
'PhoneNumber': PhoneNumber,
'Provider': Provider,
'ProviderId': ProviderId,
'MobileId': MobileId,
'MobileOS': MobileOS,
'Password': Password,
'CreatedUser': CreatedUser
};
getTypeName() => "RegisterCitizenRQ";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'ws.jimsnwa.com', types: <String, TypeInfo> {
'CoreRS': TypeInfo(TypeOf.Class, create:() => CoreRS()),
'RegisterCitizenRS': TypeInfo(TypeOf.Class, create:() => RegisterCitizenRS()),
'RegisterCitizenRQ': TypeInfo(TypeOf.Class, create:() => RegisterCitizenRQ()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /citizen/register HTTP/1.1
Host: ws.jimsnwa.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"Id":"String","Email":"String","DisplayName":"String","PhoneNumber":"String","Provider":0,"ProviderId":"String","MobileId":"String","MobileOS":"String","Password":"String","CreatedUser":"String"}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"Data":"String","Code":"String","ErrorMessage":"String","ErrorStackTrace":"String"}