PUT | /users/{UserId} | Update user account info |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class UserAccountRequest extends UserAccountRequestDto implements IRestrictedApiRequest
{
/**
* Api Key - grants access to resources
*/
@ApiMember(DataType="string", Description="Api Key - grants access to resources", IsRequired=true, Name="ApiKey", ParameterType="query")
public String ApiKey = null;
/**
*
*/
@ApiMember(DataType="integer", Description="", IsRequired=true, Name="UserId", ParameterType="query")
public Integer UserId = null;
/**
* StoreId OR ChainId is required
*/
@ApiMember(DataType="integer", Description="StoreId OR ChainId is required", Name="StoreId", ParameterType="query")
public Integer StoreId = null;
/**
* StoreId OR ChainId is required
*/
@ApiMember(DataType="integer", Description="StoreId OR ChainId is required", Name="ChainId", ParameterType="query")
public Integer ChainId = null;
/**
*
*/
@ApiMember(DataType="string", Description="", Name="FirstName", ParameterType="query")
public String FirstName = null;
/**
*
*/
@ApiMember(DataType="string", Description="", Name="LastName", ParameterType="query")
public String LastName = null;
/**
*
*/
@ApiMember(DataType="string", Description="", Name="HomePhone", ParameterType="query")
public String HomePhone = null;
/**
*
*/
@ApiMember(DataType="string", Description="", Name="CellPhone", ParameterType="query")
public String CellPhone = null;
/**
*
*/
@ApiMember(DataType="string", Description="", Name="Address1", ParameterType="query")
public String Address1 = null;
/**
*
*/
@ApiMember(DataType="string", Description="", Name="City", ParameterType="query")
public String City = null;
/**
* (Format:2 characters; Example:'MO')
*/
@ApiMember(DataType="string", Description="(Format:2 characters; Example:'MO')", Name="State", ParameterType="query")
public String State = null;
/**
*
*/
@ApiMember(DataType="string", Description="", Name="Zip", ParameterType="query")
public String Zip = null;
/**
*
*/
@ApiMember(DataType="string", Description="", Name="Email", ParameterType="query")
public String Email = null;
/**
* Gender (Format:'M'|'F')
*/
@ApiMember(DataType="string", Description="Gender (Format:'M'|'F')", Name="Gender", ParameterType="query")
public String Gender = null;
/**
* Date of Birth (Format:YYYY-MM-DD)
*/
@ApiMember(DataType="date", Description="Date of Birth (Format:YYYY-MM-DD)", Name="DateOfBirth", ParameterType="query")
public Date DateOfBirth = 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")
public String Username = 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")
public String ExternalId = null;
/**
* Emergency contact name
*/
@ApiMember(DataType="string", Description="Emergency contact name", Name="EmergencyContactName", ParameterType="query")
public String EmergencyContactName = null;
/**
* Emergency contact phone number
*/
@ApiMember(DataType="string", Description="Emergency contact phone number", Name="EmergencyContactPhone", ParameterType="query")
public String EmergencyContactPhone = null;
/**
* Emergency contact relationship
*/
@ApiMember(DataType="string", Description="Emergency contact relationship", Name="EmergencyContactType", ParameterType="query")
public String EmergencyContactType = null;
/**
* Prospect Type Id
*/
@ApiMember(DataType="integer", Description="Prospect Type Id", Name="ProspectTypeId", ParameterType="query")
public Integer ProspectTypeId = null;
public Integer RestrictedId = null;
public RestrictedResourceType RestrictedResourceType = null;
public String getApiKey() { return ApiKey; }
public UserAccountRequest setApiKey(String value) { this.ApiKey = value; return this; }
public Integer getUserId() { return UserId; }
public UserAccountRequest setUserId(Integer value) { this.UserId = value; return this; }
public Integer getStoreId() { return StoreId; }
public UserAccountRequest setStoreId(Integer value) { this.StoreId = value; return this; }
public Integer getChainId() { return ChainId; }
public UserAccountRequest setChainId(Integer value) { this.ChainId = value; return this; }
public String getFirstName() { return FirstName; }
public UserAccountRequest setFirstName(String value) { this.FirstName = value; return this; }
public String getLastName() { return LastName; }
public UserAccountRequest setLastName(String value) { this.LastName = value; return this; }
public String getHomePhone() { return HomePhone; }
public UserAccountRequest setHomePhone(String value) { this.HomePhone = value; return this; }
public String getCellPhone() { return CellPhone; }
public UserAccountRequest setCellPhone(String value) { this.CellPhone = value; return this; }
public String getAddress1() { return Address1; }
public UserAccountRequest setAddress1(String value) { this.Address1 = value; return this; }
public String getCity() { return City; }
public UserAccountRequest setCity(String value) { this.City = value; return this; }
public String getState() { return State; }
public UserAccountRequest setState(String value) { this.State = value; return this; }
public String getZip() { return Zip; }
public UserAccountRequest setZip(String value) { this.Zip = value; return this; }
public String getEmail() { return Email; }
public UserAccountRequest setEmail(String value) { this.Email = value; return this; }
public String getGender() { return Gender; }
public UserAccountRequest setGender(String value) { this.Gender = value; return this; }
public Date getDateOfBirth() { return DateOfBirth; }
public UserAccountRequest setDateOfBirth(Date value) { this.DateOfBirth = value; return this; }
public String getUsername() { return Username; }
public UserAccountRequest setUsername(String value) { this.Username = value; return this; }
public String getExternalId() { return ExternalId; }
public UserAccountRequest setExternalId(String value) { this.ExternalId = value; return this; }
public String getEmergencyContactName() { return EmergencyContactName; }
public UserAccountRequest setEmergencyContactName(String value) { this.EmergencyContactName = value; return this; }
public String getEmergencyContactPhone() { return EmergencyContactPhone; }
public UserAccountRequest setEmergencyContactPhone(String value) { this.EmergencyContactPhone = value; return this; }
public String getEmergencyContactType() { return EmergencyContactType; }
public UserAccountRequest setEmergencyContactType(String value) { this.EmergencyContactType = value; return this; }
public Integer getProspectTypeId() { return ProspectTypeId; }
public UserAccountRequest setProspectTypeId(Integer value) { this.ProspectTypeId = value; return this; }
public Integer getRestrictedId() { return RestrictedId; }
public UserAccountRequest setRestrictedId(Integer value) { this.RestrictedId = value; return this; }
public RestrictedResourceType getRestrictedResourceType() { return RestrictedResourceType; }
public UserAccountRequest setRestrictedResourceType(RestrictedResourceType value) { this.RestrictedResourceType = value; return this; }
}
public static class UserAccountRequestDto extends ApiDtoBase
{
public Integer UserId = null;
public String FirstName = null;
public String LastName = null;
public String HomePhone = null;
public String CellPhone = null;
public String Address1 = null;
public String City = null;
public String State = null;
public String Zip = null;
public String Email = null;
public String Gender = null;
public Date DateOfBirth = null;
public String Username = null;
public String ExternalId = null;
public String EmergencyContactName = null;
public String EmergencyContactPhone = null;
public String EmergencyContactType = null;
public Integer ProspectTypeId = null;
public Integer getUserId() { return UserId; }
public UserAccountRequestDto setUserId(Integer value) { this.UserId = value; return this; }
public String getFirstName() { return FirstName; }
public UserAccountRequestDto setFirstName(String value) { this.FirstName = value; return this; }
public String getLastName() { return LastName; }
public UserAccountRequestDto setLastName(String value) { this.LastName = value; return this; }
public String getHomePhone() { return HomePhone; }
public UserAccountRequestDto setHomePhone(String value) { this.HomePhone = value; return this; }
public String getCellPhone() { return CellPhone; }
public UserAccountRequestDto setCellPhone(String value) { this.CellPhone = value; return this; }
public String getAddress1() { return Address1; }
public UserAccountRequestDto setAddress1(String value) { this.Address1 = value; return this; }
public String getCity() { return City; }
public UserAccountRequestDto setCity(String value) { this.City = value; return this; }
public String getState() { return State; }
public UserAccountRequestDto setState(String value) { this.State = value; return this; }
public String getZip() { return Zip; }
public UserAccountRequestDto setZip(String value) { this.Zip = value; return this; }
public String getEmail() { return Email; }
public UserAccountRequestDto setEmail(String value) { this.Email = value; return this; }
public String getGender() { return Gender; }
public UserAccountRequestDto setGender(String value) { this.Gender = value; return this; }
public Date getDateOfBirth() { return DateOfBirth; }
public UserAccountRequestDto setDateOfBirth(Date value) { this.DateOfBirth = value; return this; }
public String getUsername() { return Username; }
public UserAccountRequestDto setUsername(String value) { this.Username = value; return this; }
public String getExternalId() { return ExternalId; }
public UserAccountRequestDto setExternalId(String value) { this.ExternalId = value; return this; }
public String getEmergencyContactName() { return EmergencyContactName; }
public UserAccountRequestDto setEmergencyContactName(String value) { this.EmergencyContactName = value; return this; }
public String getEmergencyContactPhone() { return EmergencyContactPhone; }
public UserAccountRequestDto setEmergencyContactPhone(String value) { this.EmergencyContactPhone = value; return this; }
public String getEmergencyContactType() { return EmergencyContactType; }
public UserAccountRequestDto setEmergencyContactType(String value) { this.EmergencyContactType = value; return this; }
public Integer getProspectTypeId() { return ProspectTypeId; }
public UserAccountRequestDto setProspectTypeId(Integer value) { this.ProspectTypeId = value; return this; }
}
public static class ApiDtoBase
{
public String ApiKey = null;
public Integer StoreId = null;
public Integer ChainId = null;
public String getApiKey() { return ApiKey; }
public ApiDtoBase setApiKey(String value) { this.ApiKey = value; return this; }
public Integer getStoreId() { return StoreId; }
public ApiDtoBase setStoreId(Integer value) { this.StoreId = value; return this; }
public Integer getChainId() { return ChainId; }
public ApiDtoBase setChainId(Integer value) { this.ChainId = value; return this; }
}
public static enum RestrictedResourceType
{
Store,
Chain,
User,
Undefined;
}
}
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.
PUT /users/{UserId} HTTP/1.1
Host: clubready.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<UserAccountRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Web.Api.Members.Model">
<ApiKey xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</ApiKey>
<ChainId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</ChainId>
<StoreId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</StoreId>
<Address1 xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</Address1>
<CellPhone xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</CellPhone>
<City xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</City>
<DateOfBirth xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0001-01-01T00:00:00</DateOfBirth>
<Email xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</Email>
<EmergencyContactName xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</EmergencyContactName>
<EmergencyContactPhone xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</EmergencyContactPhone>
<EmergencyContactType xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</EmergencyContactType>
<ExternalId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</ExternalId>
<FirstName xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</FirstName>
<Gender xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</Gender>
<HomePhone xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</HomePhone>
<LastName xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</LastName>
<ProspectTypeId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</ProspectTypeId>
<State xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</State>
<UserId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</UserId>
<Username xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</Username>
<Zip xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</Zip>
</UserAccountRequest>