Requires any of the roles: | VeoliaAdmin, SupplierAdmin, UserRegistration, User |
GET | /user/{userid} |
---|
import 'package:servicestack/servicestack.dart';
abstract class ResponseBase
{
ResponseStatus? ResponseStatus;
ResponseBase({this.ResponseStatus});
ResponseBase.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "ResponseBase";
TypeContext? context = _ctx;
}
abstract class ModifyRequestBase implements IConcurrencyStamp
{
String? ConcurrencyStamp;
ModifyRequestBase({this.ConcurrencyStamp});
ModifyRequestBase.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ConcurrencyStamp = json['ConcurrencyStamp'];
return this;
}
Map<String, dynamic> toJson() => {
'ConcurrencyStamp': ConcurrencyStamp
};
getTypeName() => "ModifyRequestBase";
TypeContext? context = _ctx;
}
class ApplicationUserStatus
{
static const ApplicationUserStatus Registered = const ApplicationUserStatus._(0);
static const ApplicationUserStatus ConfirmedByUser = const ApplicationUserStatus._(1);
static const ApplicationUserStatus SupplierUserRegistered = const ApplicationUserStatus._(2);
static const ApplicationUserStatus AwaitingSupplierConfirmation = const ApplicationUserStatus._(3);
static const ApplicationUserStatus AwaitingVeoliaConfirmation = const ApplicationUserStatus._(4);
static const ApplicationUserStatus Active = const ApplicationUserStatus._(5);
static const ApplicationUserStatus Rejected = const ApplicationUserStatus._(6);
static const ApplicationUserStatus Deleted = const ApplicationUserStatus._(7);
final int _value;
const ApplicationUserStatus._(this._value);
int get value => _value;
static List<ApplicationUserStatus> get values => const [Registered,ConfirmedByUser,SupplierUserRegistered,AwaitingSupplierConfirmation,AwaitingVeoliaConfirmation,Active,Rejected,Deleted];
}
class UserDetails extends ModifyRequestBase implements IConvertible
{
int? Id;
String? Email;
String? UserName;
String? PhoneNumber;
String? DisplayName;
String? PhoneNumberExtension;
int? PhoneNumberCountryCodeId;
String? PhoneNumberCountryCode;
String? MobilePhoneNumber;
int? MobilePhoneNumberCountryCodeId;
String? MobilePhoneNumberCountryCode;
String? OrganizationUnit;
String? Position;
ApplicationUserStatus? Status;
int? SupplierId;
int? SupplierOwnerId;
Map<String,String?>? Meta;
List<String>? Roles;
bool? IsSupplierAdmin;
UserDetails({this.Id,this.Email,this.UserName,this.PhoneNumber,this.DisplayName,this.PhoneNumberExtension,this.PhoneNumberCountryCodeId,this.PhoneNumberCountryCode,this.MobilePhoneNumber,this.MobilePhoneNumberCountryCodeId,this.MobilePhoneNumberCountryCode,this.OrganizationUnit,this.Position,this.Status,this.SupplierId,this.SupplierOwnerId,this.Meta,this.Roles,this.IsSupplierAdmin});
UserDetails.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
Id = json['Id'];
Email = json['Email'];
UserName = json['UserName'];
PhoneNumber = json['PhoneNumber'];
DisplayName = json['DisplayName'];
PhoneNumberExtension = json['PhoneNumberExtension'];
PhoneNumberCountryCodeId = json['PhoneNumberCountryCodeId'];
PhoneNumberCountryCode = json['PhoneNumberCountryCode'];
MobilePhoneNumber = json['MobilePhoneNumber'];
MobilePhoneNumberCountryCodeId = json['MobilePhoneNumberCountryCodeId'];
MobilePhoneNumberCountryCode = json['MobilePhoneNumberCountryCode'];
OrganizationUnit = json['OrganizationUnit'];
Position = json['Position'];
Status = JsonConverters.fromJson(json['Status'],'ApplicationUserStatus',context!);
SupplierId = json['SupplierId'];
SupplierOwnerId = json['SupplierOwnerId'];
Meta = JsonConverters.toStringMap(json['Meta']);
Roles = JsonConverters.fromJson(json['Roles'],'List<String>',context!);
IsSupplierAdmin = json['IsSupplierAdmin'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'Id': Id,
'Email': Email,
'UserName': UserName,
'PhoneNumber': PhoneNumber,
'DisplayName': DisplayName,
'PhoneNumberExtension': PhoneNumberExtension,
'PhoneNumberCountryCodeId': PhoneNumberCountryCodeId,
'PhoneNumberCountryCode': PhoneNumberCountryCode,
'MobilePhoneNumber': MobilePhoneNumber,
'MobilePhoneNumberCountryCodeId': MobilePhoneNumberCountryCodeId,
'MobilePhoneNumberCountryCode': MobilePhoneNumberCountryCode,
'OrganizationUnit': OrganizationUnit,
'Position': Position,
'Status': JsonConverters.toJson(Status,'ApplicationUserStatus',context!),
'SupplierId': SupplierId,
'SupplierOwnerId': SupplierOwnerId,
'Meta': Meta,
'Roles': JsonConverters.toJson(Roles,'List<String>',context!),
'IsSupplierAdmin': IsSupplierAdmin
});
getTypeName() => "UserDetails";
TypeContext? context = _ctx;
}
class BrowseUserResponse extends ResponseBase implements IConvertible
{
UserDetails? User;
BrowseUserResponse({this.User});
BrowseUserResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
User = JsonConverters.fromJson(json['User'],'UserDetails',context!);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'User': JsonConverters.toJson(User,'UserDetails',context!)
});
getTypeName() => "BrowseUserResponse";
TypeContext? context = _ctx;
}
class BrowseUser implements IGet, IConvertible
{
int? UserId;
BrowseUser({this.UserId});
BrowseUser.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
UserId = json['UserId'];
return this;
}
Map<String, dynamic> toJson() => {
'UserId': UserId
};
getTypeName() => "BrowseUser";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'szallitoiportal_be.veolia.hu', types: <String, TypeInfo> {
'ResponseBase': TypeInfo(TypeOf.AbstractClass),
'ModifyRequestBase': TypeInfo(TypeOf.AbstractClass),
'ApplicationUserStatus': TypeInfo(TypeOf.Enum, enumValues:ApplicationUserStatus.values),
'UserDetails': TypeInfo(TypeOf.Class, create:() => UserDetails()),
'BrowseUserResponse': TypeInfo(TypeOf.Class, create:() => BrowseUserResponse()),
'BrowseUser': TypeInfo(TypeOf.Class, create:() => BrowseUser()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /user/{userid} HTTP/1.1 Host: szallitoiportal-be.veolia.hu Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <BrowseUserResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Portal.ServiceDto"> <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types"> <d2p1:ErrorCode>String</d2p1:ErrorCode> <d2p1:Message>String</d2p1:Message> <d2p1:StackTrace>String</d2p1:StackTrace> <d2p1:Errors> <d2p1:ResponseError> <d2p1:ErrorCode>String</d2p1:ErrorCode> <d2p1:FieldName>String</d2p1:FieldName> <d2p1:Message>String</d2p1:Message> <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:KeyValueOfstringstring> <d5p1:Key>String</d5p1:Key> <d5p1:Value>String</d5p1:Value> </d5p1:KeyValueOfstringstring> </d2p1:Meta> </d2p1:ResponseError> </d2p1:Errors> <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:KeyValueOfstringstring> <d3p1:Key>String</d3p1:Key> <d3p1:Value>String</d3p1:Value> </d3p1:KeyValueOfstringstring> </d2p1:Meta> </ResponseStatus> <User> <ConcurrencyStamp>String</ConcurrencyStamp> <DisplayName>String</DisplayName> <Email>String</Email> <Id>0</Id> <Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:KeyValueOfstringstring> <d3p1:Key>String</d3p1:Key> <d3p1:Value>String</d3p1:Value> </d3p1:KeyValueOfstringstring> </Meta> <MobilePhoneNumber>String</MobilePhoneNumber> <MobilePhoneNumberCountryCode>String</MobilePhoneNumberCountryCode> <MobilePhoneNumberCountryCodeId>0</MobilePhoneNumberCountryCodeId> <OrganizationUnit>String</OrganizationUnit> <PhoneNumber>String</PhoneNumber> <PhoneNumberCountryCode>String</PhoneNumberCountryCode> <PhoneNumberCountryCodeId>0</PhoneNumberCountryCodeId> <PhoneNumberExtension>String</PhoneNumberExtension> <Position>String</Position> <Roles xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:string>String</d3p1:string> </Roles> <Status>Registered</Status> <SupplierId>0</SupplierId> <SupplierOwnerId>0</SupplierOwnerId> <UserName>String</UserName> </User> </BrowseUserResponse>