GET | /sales/wallet/wallettokencreate | Creates a Wallet Token for a user |
---|
export class ApiDtoBase
{
public ApiKey: string;
public StoreId?: number;
public ChainId?: number;
public constructor(init?: Partial<ApiDtoBase>) { (Object as any).assign(this, init); }
}
// @DataContract
export 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,
}
export enum WalletPage
{
Uninitialized = 'Uninitialized',
Manage = 'Manage',
Add = 'Add',
AddCard = 'AddCard',
AddBank = 'AddBank',
AddMini = 'AddMini',
AddCardMini = 'AddCardMini',
AddBankMini = 'AddBankMini',
}
export class WalletTokenCreateRequestDto extends ApiDtoBase
{
public OwnerId: number;
public OwnerType: OwnerType;
public CreatorId: number;
public Page: WalletPage;
public Theme?: string;
public AllowDeleteProfile?: boolean;
public AllowDisableProfile?: boolean;
public constructor(init?: Partial<WalletTokenCreateRequestDto>) { super(init); (Object as any).assign(this, init); }
}
export class ApiResponseBase
{
public Success: boolean;
public Message: string;
public constructor(init?: Partial<ApiResponseBase>) { (Object as any).assign(this, init); }
}
export class WalletTokenCreateResponseDto extends ApiResponseBase
{
public WalletToken: string;
public WalletOrigin: string;
public WalletUrl: string;
public constructor(init?: Partial<WalletTokenCreateResponseDto>) { super(init); (Object as any).assign(this, init); }
}
export class WalletTokenCreateResponse extends WalletTokenCreateResponseDto
{
public Success: boolean;
public Message: string;
public WalletToken: string;
public WalletOrigin: string;
public WalletUrl: string;
public constructor(init?: Partial<WalletTokenCreateResponse>) { super(init); (Object as any).assign(this, init); }
}
export enum RestrictedResourceType
{
Store = 'Store',
Chain = 'Chain',
User = 'User',
Undefined = 'Undefined',
}
export 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 ApiKey: string;
/**
* 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 OwnerId: number;
/**
* 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;
/**
* 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 CreatorId: number;
/**
* 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 Page: WalletPage;
/**
* CSS Theme
*/
// @ApiMember(Description="CSS Theme", ParameterType="query")
public Theme: string;
public RestrictedId?: number;
public RestrictedResourceType: RestrictedResourceType;
/**
* Allows for a payment profile to be deleted
*/
// @ApiMember(Description="Allows for a payment profile to be deleted", Name="AllowDeleteProfile", ParameterType="query")
public AllowDeleteProfile?: boolean;
/**
* Allows for a payment profile to be disabled
*/
// @ApiMember(Description="Allows for a payment profile to be disabled", Name="AllowDisableProfile", ParameterType="query")
public AllowDisableProfile?: boolean;
public constructor(init?: Partial<WalletTokenCreateEndpoint>) { super(init); (Object as any).assign(this, init); }
}
TypeScript WalletTokenCreateEndpoint 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.
GET /sales/wallet/wallettokencreate HTTP/1.1 Host: clubready.com Accept: text/jsv
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { Success: False, Message: String, WalletToken: String, WalletOrigin: String, WalletUrl: String }