GET | /sales/wallet/wallettokencreate | Creates a Wallet Token for a user |
---|
import java.math.*
import java.util.*
import net.servicestack.client.*
open class WalletTokenCreateEndpoint : WalletTokenCreateRequestDto(), 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
/**
* 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")
var OwnerId:Int? = 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")
var 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")
var CreatorId:Int? = 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")
var Page:WalletPage? = null
/**
* CSS Theme
*/
@ApiMember(Description="CSS Theme", ParameterType="query")
var Theme:String? = null
var RestrictedId:Int? = null
var 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")
var AllowDeleteProfile:Boolean? = null
/**
* Allows for a payment profile to be disabled
*/
@ApiMember(Description="Allows for a payment profile to be disabled", Name="AllowDisableProfile", ParameterType="query")
var AllowDisableProfile:Boolean? = null
}
open class WalletTokenCreateRequestDto : ApiDtoBase()
{
var OwnerId:Int? = null
var OwnerType:OwnerType? = null
var CreatorId:Int? = null
var Page:WalletPage? = null
var Theme:String? = null
var AllowDeleteProfile:Boolean? = null
var AllowDisableProfile:Boolean? = null
}
open class ApiDtoBase
{
var ApiKey:String? = null
var StoreId:Int? = null
var ChainId:Int? = null
}
@DataContract
enum class OwnerType(val value:Int)
{
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),
}
enum class WalletPage
{
Uninitialized,
Manage,
Add,
AddCard,
AddBank,
AddMini,
AddCardMini,
AddBankMini,
}
enum class RestrictedResourceType
{
Store,
Chain,
User,
Undefined,
}
open class WalletTokenCreateResponse : WalletTokenCreateResponseDto()
{
var Success:Boolean? = null
var Message:String? = null
var WalletToken:String? = null
var WalletOrigin:String? = null
var WalletUrl:String? = null
}
open class WalletTokenCreateResponseDto : ApiResponseBase()
{
var WalletToken:String? = null
var WalletOrigin:String? = null
var WalletUrl:String? = null
}
open class ApiResponseBase
{
var Success:Boolean? = null
var Message:String? = null
}
Kotlin WalletTokenCreateEndpoint DTOs
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.
GET /sales/wallet/wallettokencreate HTTP/1.1 Host: clubready.com Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <WalletTokenCreateResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Web.Api.Sales.Wallet"> <Message xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</Message> <Success xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">false</Success> <WalletOrigin xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Sales.Wallet">String</WalletOrigin> <WalletToken xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Sales.Wallet">String</WalletToken> <WalletUrl xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Sales.Wallet">String</WalletUrl> </WalletTokenCreateResponse>