GET | /sales/wallet/wallettokencreate | Creates a Wallet Token for a user |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class WalletTokenCreateEndpoint extends WalletTokenCreateRequestDto 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;
/**
* ID # of the owner to create the URL for
*/
@ApiMember(DataType="integer", Description="ID # of the owner to create the URL for", IsRequired=true, Name="OwnerId", ParameterType="query")
public Integer OwnerId = null;
/**
* Type of owner to create the URL for
*/
@ApiMember(Description="Type of owner to create the URL for", IsRequired=true, Name="OwnerType", ParameterType="query")
public OwnerType OwnerType = null;
/**
* Person creating the profile. Can be same as OwnerId.
*/
@ApiMember(Description="Person creating the profile. Can be same as OwnerId.", IsRequired=true, Name="CreatorId", ParameterType="query")
public Integer CreatorId = null;
/**
* Page to display when calling the Payment Profile iFrame
*/
@ApiMember(Description="Page to display when calling the Payment Profile iFrame", IsRequired=true, Name="Page", ParameterType="query")
public WalletPage Page = null;
/**
* CSS Theme
*/
@ApiMember(Description="CSS Theme", ParameterType="query")
public String Theme = null;
public Integer RestrictedId = null;
public RestrictedResourceType RestrictedResourceType = null;
/**
* Allows for a payment profile to be deleted
*/
@ApiMember(Description="Allows for a payment profile to be deleted", Name="AllowDeleteProfile", ParameterType="query")
public Boolean AllowDeleteProfile = null;
/**
* Allows for a payment profile to be disabled
*/
@ApiMember(Description="Allows for a payment profile to be disabled", Name="AllowDisableProfile", ParameterType="query")
public Boolean AllowDisableProfile = null;
public String getApiKey() { return ApiKey; }
public WalletTokenCreateEndpoint setApiKey(String value) { this.ApiKey = value; return this; }
public Integer getOwnerId() { return OwnerId; }
public WalletTokenCreateEndpoint setOwnerId(Integer value) { this.OwnerId = value; return this; }
public OwnerType getOwnerType() { return OwnerType; }
public WalletTokenCreateEndpoint setOwnerType(OwnerType value) { this.OwnerType = value; return this; }
public Integer getCreatorId() { return CreatorId; }
public WalletTokenCreateEndpoint setCreatorId(Integer value) { this.CreatorId = value; return this; }
public WalletPage getPage() { return Page; }
public WalletTokenCreateEndpoint setPage(WalletPage value) { this.Page = value; return this; }
public String getTheme() { return Theme; }
public WalletTokenCreateEndpoint setTheme(String value) { this.Theme = value; return this; }
public Integer getRestrictedId() { return RestrictedId; }
public WalletTokenCreateEndpoint setRestrictedId(Integer value) { this.RestrictedId = value; return this; }
public RestrictedResourceType getRestrictedResourceType() { return RestrictedResourceType; }
public WalletTokenCreateEndpoint setRestrictedResourceType(RestrictedResourceType value) { this.RestrictedResourceType = value; return this; }
public Boolean isAllowDeleteProfile() { return AllowDeleteProfile; }
public WalletTokenCreateEndpoint setAllowDeleteProfile(Boolean value) { this.AllowDeleteProfile = value; return this; }
public Boolean isAllowDisableProfile() { return AllowDisableProfile; }
public WalletTokenCreateEndpoint setAllowDisableProfile(Boolean value) { this.AllowDisableProfile = value; return this; }
}
public static class WalletTokenCreateRequestDto extends ApiDtoBase
{
public Integer OwnerId = null;
public OwnerType OwnerType = null;
public Integer CreatorId = null;
public WalletPage Page = null;
public String Theme = null;
public Boolean AllowDeleteProfile = null;
public Boolean AllowDisableProfile = null;
public Integer getOwnerId() { return OwnerId; }
public WalletTokenCreateRequestDto setOwnerId(Integer value) { this.OwnerId = value; return this; }
public OwnerType getOwnerType() { return OwnerType; }
public WalletTokenCreateRequestDto setOwnerType(OwnerType value) { this.OwnerType = value; return this; }
public Integer getCreatorId() { return CreatorId; }
public WalletTokenCreateRequestDto setCreatorId(Integer value) { this.CreatorId = value; return this; }
public WalletPage getPage() { return Page; }
public WalletTokenCreateRequestDto setPage(WalletPage value) { this.Page = value; return this; }
public String getTheme() { return Theme; }
public WalletTokenCreateRequestDto setTheme(String value) { this.Theme = value; return this; }
public Boolean isAllowDeleteProfile() { return AllowDeleteProfile; }
public WalletTokenCreateRequestDto setAllowDeleteProfile(Boolean value) { this.AllowDeleteProfile = value; return this; }
public Boolean isAllowDisableProfile() { return AllowDisableProfile; }
public WalletTokenCreateRequestDto setAllowDisableProfile(Boolean value) { this.AllowDisableProfile = 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; }
}
@DataContract
public static enum OwnerType
{
Unknown(0),
User(1),
ConvUser(2),
TempCart(3),
TempAgmt(4),
Store(5),
Chain(6),
Division(7),
District(8),
AdminType(9),
TempStUser(10),
VaultApi(11),
Company(12),
BackOfficeStore(13),
OrgUser(14),
CartItem(15),
Testing(99),
System(100),
Error(-1);
private final int value;
OwnerType(final int intValue) { value = intValue; }
public int getValue() { return value; }
}
public static enum WalletPage
{
Uninitialized,
Manage,
Add,
AddCard,
AddBank,
AddMini,
AddCardMini,
AddBankMini;
}
public static enum RestrictedResourceType
{
Store,
Chain,
User,
Undefined;
}
public static class WalletTokenCreateResponse extends WalletTokenCreateResponseDto
{
public Boolean Success = null;
public String Message = null;
public String WalletToken = null;
public String WalletOrigin = null;
public String WalletUrl = null;
public Boolean isSuccess() { return Success; }
public WalletTokenCreateResponse setSuccess(Boolean value) { this.Success = value; return this; }
public String getMessage() { return Message; }
public WalletTokenCreateResponse setMessage(String value) { this.Message = value; return this; }
public String getWalletToken() { return WalletToken; }
public WalletTokenCreateResponse setWalletToken(String value) { this.WalletToken = value; return this; }
public String getWalletOrigin() { return WalletOrigin; }
public WalletTokenCreateResponse setWalletOrigin(String value) { this.WalletOrigin = value; return this; }
public String getWalletUrl() { return WalletUrl; }
public WalletTokenCreateResponse setWalletUrl(String value) { this.WalletUrl = value; return this; }
}
public static class WalletTokenCreateResponseDto extends ApiResponseBase
{
public String WalletToken = null;
public String WalletOrigin = null;
public String WalletUrl = null;
public String getWalletToken() { return WalletToken; }
public WalletTokenCreateResponseDto setWalletToken(String value) { this.WalletToken = value; return this; }
public String getWalletOrigin() { return WalletOrigin; }
public WalletTokenCreateResponseDto setWalletOrigin(String value) { this.WalletOrigin = value; return this; }
public String getWalletUrl() { return WalletUrl; }
public WalletTokenCreateResponseDto setWalletUrl(String value) { this.WalletUrl = value; return this; }
}
public static class ApiResponseBase
{
public Boolean Success = null;
public String Message = null;
public Boolean isSuccess() { return Success; }
public ApiResponseBase setSuccess(Boolean value) { this.Success = value; return this; }
public String getMessage() { return Message; }
public ApiResponseBase setMessage(String value) { this.Message = value; return this; }
}
}
Java WalletTokenCreateEndpoint DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /sales/wallet/wallettokencreate HTTP/1.1 Host: clubready.com Accept: text/csv
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"Success":false,"Message":"String","WalletToken":"String","WalletOrigin":"String","WalletUrl":"String"}