PUT | /users/{UserId} | Update user account info |
---|
import java.math.*
import java.util.*
import net.servicestack.client.*
open class UserAccountRequest : UserAccountRequestDto(), IRestrictedApiRequest
{
/**
* Api Key - grants access to resources
*/
@ApiMember(DataType="string", Description="Api Key - grants access to resources", IsRequired=true, Name="ApiKey", ParameterType="query")
var ApiKey:String? = null
/**
*
*/
@ApiMember(DataType="integer", Description="", IsRequired=true, Name="UserId", ParameterType="query")
var UserId:Int? = null
/**
* StoreId OR ChainId is required
*/
@ApiMember(DataType="integer", Description="StoreId OR ChainId is required", Name="StoreId", ParameterType="query")
var StoreId:Int? = null
/**
* StoreId OR ChainId is required
*/
@ApiMember(DataType="integer", Description="StoreId OR ChainId is required", Name="ChainId", ParameterType="query")
var ChainId:Int? = null
/**
*
*/
@ApiMember(DataType="string", Description="", Name="FirstName", ParameterType="query")
var FirstName:String? = null
/**
*
*/
@ApiMember(DataType="string", Description="", Name="LastName", ParameterType="query")
var LastName:String? = null
/**
*
*/
@ApiMember(DataType="string", Description="", Name="HomePhone", ParameterType="query")
var HomePhone:String? = null
/**
*
*/
@ApiMember(DataType="string", Description="", Name="CellPhone", ParameterType="query")
var CellPhone:String? = null
/**
*
*/
@ApiMember(DataType="string", Description="", Name="Address1", ParameterType="query")
var Address1:String? = null
/**
*
*/
@ApiMember(DataType="string", Description="", Name="City", ParameterType="query")
var City:String? = null
/**
* (Format:2 characters; Example:'MO')
*/
@ApiMember(DataType="string", Description="(Format:2 characters; Example:'MO')", Name="State", ParameterType="query")
var State:String? = null
/**
*
*/
@ApiMember(DataType="string", Description="", Name="Zip", ParameterType="query")
var Zip:String? = null
/**
*
*/
@ApiMember(DataType="string", Description="", Name="Email", ParameterType="query")
var Email:String? = null
/**
* Gender (Format:'M'|'F')
*/
@ApiMember(DataType="string", Description="Gender (Format:'M'|'F')", Name="Gender", ParameterType="query")
var Gender:String? = null
/**
* Date of Birth (Format:YYYY-MM-DD)
*/
@ApiMember(DataType="date", Description="Date of Birth (Format:YYYY-MM-DD)", Name="DateOfBirth", ParameterType="query")
var DateOfBirth:Date? = null
/**
* Username should be between 4 and 255 characters long
*/
@ApiMember(DataType="string", Description="Username should be between 4 and 255 characters long", Name="Username", ParameterType="query")
var Username:String? = null
/**
* Unique ID for the user from your system. We store internally as ExternalUserId
*/
@ApiMember(DataType="string", Description="Unique ID for the user from your system. We store internally as ExternalUserId", Name="ExternalId", ParameterType="query")
var ExternalId:String? = null
/**
* Emergency contact name
*/
@ApiMember(DataType="string", Description="Emergency contact name", Name="EmergencyContactName", ParameterType="query")
var EmergencyContactName:String? = null
/**
* Emergency contact phone number
*/
@ApiMember(DataType="string", Description="Emergency contact phone number", Name="EmergencyContactPhone", ParameterType="query")
var EmergencyContactPhone:String? = null
/**
* Emergency contact relationship
*/
@ApiMember(DataType="string", Description="Emergency contact relationship", Name="EmergencyContactType", ParameterType="query")
var EmergencyContactType:String? = null
/**
* Prospect Type Id
*/
@ApiMember(DataType="integer", Description="Prospect Type Id", Name="ProspectTypeId", ParameterType="query")
var ProspectTypeId:Int? = null
var RestrictedId:Int? = null
var RestrictedResourceType:RestrictedResourceType? = null
}
open class UserAccountRequestDto : ApiDtoBase()
{
var UserId:Int? = null
var FirstName:String? = null
var LastName:String? = null
var HomePhone:String? = null
var CellPhone:String? = null
var Address1:String? = null
var City:String? = null
var State:String? = null
var Zip:String? = null
var Email:String? = null
var Gender:String? = null
var DateOfBirth:Date? = null
var Username:String? = null
var ExternalId:String? = null
var EmergencyContactName:String? = null
var EmergencyContactPhone:String? = null
var EmergencyContactType:String? = null
var ProspectTypeId:Int? = null
}
open class ApiDtoBase
{
var ApiKey:String? = null
var StoreId:Int? = null
var ChainId:Int? = null
}
enum class RestrictedResourceType
{
Store,
Chain,
User,
Undefined,
}
Kotlin UserAccountRequest 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 /users/{UserId} HTTP/1.1
Host: clubready.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
ApiKey: String,
UserId: 0,
StoreId: 0,
ChainId: 0,
FirstName: String,
LastName: String,
HomePhone: String,
CellPhone: String,
Address1: String,
City: String,
State: String,
Zip: String,
Email: String,
Gender: String,
DateOfBirth: 0001-01-01,
Username: String,
ExternalId: String,
EmergencyContactName: String,
EmergencyContactPhone: String,
EmergencyContactType: String,
ProspectTypeId: 0,
RestrictedId: 0,
RestrictedResourceType: User
}