| PUT | /v1/account |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
import com.google.gson.annotations.*;
import com.google.gson.reflect.*;
public class dtos
{
@DataContract
public static class PutAccountRequest
{
@DataMember(Name="emailAddress")
@SerializedName("emailAddress")
public String emailAddress = null;
@DataMember(Name="fullName")
@SerializedName("fullName")
public String fullName = null;
@DataMember(Name="profileImageId")
@SerializedName("profileImageId")
public String profileImageId = null;
@DataMember(Name="signatureImageId")
@SerializedName("signatureImageId")
public String signatureImageId = null;
@DataMember(Name="signatureFont")
@SerializedName("signatureFont")
public String signatureFont = null;
@DataMember(Name="signatureAppearance")
@SerializedName("signatureAppearance")
public SignatureAppearance signatureAppearance = null;
public String getEmailAddress() { return emailAddress; }
public PutAccountRequest setEmailAddress(String value) { this.emailAddress = value; return this; }
public String getFullName() { return fullName; }
public PutAccountRequest setFullName(String value) { this.fullName = value; return this; }
public String getProfileImageId() { return profileImageId; }
public PutAccountRequest setProfileImageId(String value) { this.profileImageId = value; return this; }
public String getSignatureImageId() { return signatureImageId; }
public PutAccountRequest setSignatureImageId(String value) { this.signatureImageId = value; return this; }
public String getSignatureFont() { return signatureFont; }
public PutAccountRequest setSignatureFont(String value) { this.signatureFont = value; return this; }
public SignatureAppearance getSignatureAppearance() { return signatureAppearance; }
public PutAccountRequest setSignatureAppearance(SignatureAppearance value) { this.signatureAppearance = value; return this; }
}
public static enum SignatureAppearance
{
None,
Text,
Upload;
}
@DataContract
public static class PutAccountResponse extends V2BaseResponse
{
@DataMember(Name="data")
@SerializedName("data")
public PutAccountResponseData data = null;
public PutAccountResponseData getData() { return data; }
public PutAccountResponse setData(PutAccountResponseData value) { this.data = value; return this; }
}
@DataContract
public static class V2BaseResponse
{
@DataMember(Name="responseStatus")
@SerializedName("responseStatus")
public ResponseStatus responseStatus = null;
public ResponseStatus getResponseStatus() { return responseStatus; }
public V2BaseResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
}
@DataContract
public static class PutAccountResponseData
{
@DataMember(Name="oneTimeToken")
@SerializedName("oneTimeToken")
public String oneTimeToken = null;
public String getOneTimeToken() { return oneTimeToken; }
public PutAccountResponseData setOneTimeToken(String value) { this.oneTimeToken = value; return this; }
}
}
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 /v1/account HTTP/1.1
Host: api.booklinker.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
newEmail: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
success: False,
oneTimeToken: String,
responseStatus:
{
errorCode: String,
message: String,
stackTrace: String,
errors:
[
{
errorCode: String,
fieldName: String,
message: String,
meta:
{
String: String
}
}
],
meta:
{
String: String
}
},
errorCode: String,
message: String,
stackTrace: String,
errors:
[
{
errorCode: String,
fieldName: String,
message: String,
meta:
{
String: String
}
}
],
meta:
{
String: String
}
}