| POST | /api/v1/register/confirm |
|---|
import 'package:servicestack/servicestack.dart';
class Status implements IConvertible
{
String? message;
int? statusCode;
Status({this.message,this.statusCode});
Status.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
message = json['message'];
statusCode = json['statusCode'];
return this;
}
Map<String, dynamic> toJson() => {
'message': message,
'statusCode': statusCode
};
getTypeName() => "Status";
TypeContext? context = _ctx;
}
class BaseResponse implements IConvertible
{
Status? status;
BaseResponse({this.status});
BaseResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
status = JsonConverters.fromJson(json['status'],'Status',context!);
return this;
}
Map<String, dynamic> toJson() => {
'status': JsonConverters.toJson(status,'Status',context!)
};
getTypeName() => "BaseResponse";
TypeContext? context = _ctx;
}
class RegisterConfirmResponse extends BaseResponse implements IConvertible
{
String? registrationToken;
RegisterConfirmResponse({this.registrationToken});
RegisterConfirmResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
registrationToken = json['registrationToken'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'registrationToken': registrationToken
});
getTypeName() => "RegisterConfirmResponse";
TypeContext? context = _ctx;
}
class RegisterConfirm implements IConvertible
{
String? phoneNumber;
String? token;
RegisterConfirm({this.phoneNumber,this.token});
RegisterConfirm.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
phoneNumber = json['phoneNumber'];
token = json['token'];
return this;
}
Map<String, dynamic> toJson() => {
'phoneNumber': phoneNumber,
'token': token
};
getTypeName() => "RegisterConfirm";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'pecuario_backend.develsystems.com', types: <String, TypeInfo> {
'Status': TypeInfo(TypeOf.Class, create:() => Status()),
'BaseResponse': TypeInfo(TypeOf.Class, create:() => BaseResponse()),
'RegisterConfirmResponse': TypeInfo(TypeOf.Class, create:() => RegisterConfirmResponse()),
'RegisterConfirm': TypeInfo(TypeOf.Class, create:() => RegisterConfirm()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/v1/register/confirm HTTP/1.1
Host: pecuario-backend.develsystems.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"phoneNumber":"String","token":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"registrationToken":"String"}