Required role: | VeoliaAdmin |
PUT | /user/{userid}/byveoliaadmin |
---|
import Foundation
import ServiceStack
public class EditUserByVeoliaAdmin : IPut, Codable
{
public var userId:Int
public var phoneNumber:String
public var displayName:String
public var phoneNumberExtension:String
public var phoneNumberCountryCode:String
public var mobilePhoneNumber:String
public var mobilePhoneNumberCountryCode:String
public var organizationUnit:String
public var position:String
public var status:ApplicationUserStatus
public var isSupplierAdmin:Bool
required public init(){}
}
public enum ApplicationUserStatus : Int, Codable
{
case Registered = 0
case ConfirmedByUser = 1
case SupplierUserRegistered = 2
case AwaitingSupplierConfirmation = 3
case AwaitingVeoliaConfirmation = 4
case Active = 5
case Rejected = 6
case Deleted = 7
}
public class ModifyEntityResponse : ResponseBase
{
public var id:Int
required public init(){ super.init() }
private enum CodingKeys : String, CodingKey {
case id
}
required public init(from decoder: Decoder) throws {
try super.init(from: decoder)
let container = try decoder.container(keyedBy: CodingKeys.self)
id = try container.decodeIfPresent(Int.self, forKey: .id)
}
public override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder)
var container = encoder.container(keyedBy: CodingKeys.self)
if id != nil { try container.encode(id, forKey: .id) }
}
}
public class ResponseBase : Codable
{
public var responseStatus:ResponseStatus
required public init(){}
}
Swift EditUserByVeoliaAdmin DTOs
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.
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 } } }