Portal

<back to all web services

EditUserByVeoliaAdmin

Requires Authentication
Required role:VeoliaAdmin
The following routes are available for this service:
PUT/user/{userid}/byveoliaadmin
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;
}

class ModifyEntityResponse extends ResponseBase implements IConvertible
{
    int? Id;

    ModifyEntityResponse({this.Id});
    ModifyEntityResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        Id = json['Id'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'Id': Id
    });

    getTypeName() => "ModifyEntityResponse";
    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 EditUserByVeoliaAdmin implements IPut, IConvertible
{
    int? UserId;
    String? PhoneNumber;
    String? DisplayName;
    String? PhoneNumberExtension;
    String? PhoneNumberCountryCode;
    String? MobilePhoneNumber;
    String? MobilePhoneNumberCountryCode;
    String? OrganizationUnit;
    String? Position;
    ApplicationUserStatus? Status;
    bool? IsSupplierAdmin;

    EditUserByVeoliaAdmin({this.UserId,this.PhoneNumber,this.DisplayName,this.PhoneNumberExtension,this.PhoneNumberCountryCode,this.MobilePhoneNumber,this.MobilePhoneNumberCountryCode,this.OrganizationUnit,this.Position,this.Status,this.IsSupplierAdmin});
    EditUserByVeoliaAdmin.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        UserId = json['UserId'];
        PhoneNumber = json['PhoneNumber'];
        DisplayName = json['DisplayName'];
        PhoneNumberExtension = json['PhoneNumberExtension'];
        PhoneNumberCountryCode = json['PhoneNumberCountryCode'];
        MobilePhoneNumber = json['MobilePhoneNumber'];
        MobilePhoneNumberCountryCode = json['MobilePhoneNumberCountryCode'];
        OrganizationUnit = json['OrganizationUnit'];
        Position = json['Position'];
        Status = JsonConverters.fromJson(json['Status'],'ApplicationUserStatus',context!);
        IsSupplierAdmin = json['IsSupplierAdmin'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'UserId': UserId,
        'PhoneNumber': PhoneNumber,
        'DisplayName': DisplayName,
        'PhoneNumberExtension': PhoneNumberExtension,
        'PhoneNumberCountryCode': PhoneNumberCountryCode,
        'MobilePhoneNumber': MobilePhoneNumber,
        'MobilePhoneNumberCountryCode': MobilePhoneNumberCountryCode,
        'OrganizationUnit': OrganizationUnit,
        'Position': Position,
        'Status': JsonConverters.toJson(Status,'ApplicationUserStatus',context!),
        'IsSupplierAdmin': IsSupplierAdmin
    };

    getTypeName() => "EditUserByVeoliaAdmin";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'szallitoiportal_be.veolia.hu', types: <String, TypeInfo> {
    'ResponseBase': TypeInfo(TypeOf.AbstractClass),
    'ModifyEntityResponse': TypeInfo(TypeOf.Class, create:() => ModifyEntityResponse()),
    'ApplicationUserStatus': TypeInfo(TypeOf.Enum, enumValues:ApplicationUserStatus.values),
    'EditUserByVeoliaAdmin': TypeInfo(TypeOf.Class, create:() => EditUserByVeoliaAdmin()),
});

Dart EditUserByVeoliaAdmin DTOs

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

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

PUT /user/{userid}/byveoliaadmin HTTP/1.1 
Host: szallitoiportal-be.veolia.hu 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	UserId: 0,
	PhoneNumber: String,
	DisplayName: String,
	PhoneNumberExtension: String,
	PhoneNumberCountryCode: String,
	MobilePhoneNumber: String,
	MobilePhoneNumberCountryCode: String,
	OrganizationUnit: String,
	Position: String,
	Status: 0,
	IsSupplierAdmin: False
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Id: 0,
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}