Portal

<back to all web services

BrowseUser

Requires Authentication
Requires any of the roles:VeoliaAdmin, SupplierAdmin, UserRegistration, User
The following routes are available for this service:
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()),
});

Dart BrowseUser DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

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: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"User":{"Id":0,"Email":"String","UserName":"String","PhoneNumber":"String","DisplayName":"String","PhoneNumberExtension":"String","PhoneNumberCountryCodeId":0,"PhoneNumberCountryCode":"String","MobilePhoneNumber":"String","MobilePhoneNumberCountryCodeId":0,"MobilePhoneNumberCountryCode":"String","OrganizationUnit":"String","Position":"String","Status":0,"SupplierId":0,"SupplierOwnerId":0,"Meta":{"String":"String"},"Roles":["String"],"IsSupplierAdmin":true,"ConcurrencyStamp":"String"},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}