| POST | /api/v1/set-deviceId/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 SetDeviceIdConfirmResponse extends BaseResponse implements IConvertible
{
String? bearerToken;
SetDeviceIdConfirmResponse({this.bearerToken});
SetDeviceIdConfirmResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
bearerToken = json['bearerToken'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'bearerToken': bearerToken
});
getTypeName() => "SetDeviceIdConfirmResponse";
TypeContext? context = _ctx;
}
class SetDeviceIdConfirm implements IConvertible
{
String? token;
String? phoneNumber;
String? deviceId;
SetDeviceIdConfirm({this.token,this.phoneNumber,this.deviceId});
SetDeviceIdConfirm.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
token = json['token'];
phoneNumber = json['phoneNumber'];
deviceId = json['deviceId'];
return this;
}
Map<String, dynamic> toJson() => {
'token': token,
'phoneNumber': phoneNumber,
'deviceId': deviceId
};
getTypeName() => "SetDeviceIdConfirm";
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()),
'SetDeviceIdConfirmResponse': TypeInfo(TypeOf.Class, create:() => SetDeviceIdConfirmResponse()),
'SetDeviceIdConfirm': TypeInfo(TypeOf.Class, create:() => SetDeviceIdConfirm()),
});
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 /api/v1/set-deviceId/confirm HTTP/1.1
Host: pecuario-backend.develsystems.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
token: String,
phoneNumber: String,
deviceId: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
bearerToken: String
}