GET | /sales/wallet/wallettokencreate | Creates a Wallet Token for a user |
---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports ClubReady.Web.Api.Sales.Wallet
Imports ClubReady.Sales.Wallet
Imports ClubReady.Core.Api.Models
Imports ClubReadyGateway.Vault
Imports ClubReady.Web.Api
Namespace Global
Namespace ClubReady.Core.Api.Models
Public Partial Class ApiDtoBase
Public Overridable Property ApiKey As String
Public Overridable Property StoreId As Nullable(Of Integer)
Public Overridable Property ChainId As Nullable(Of Integer)
End Class
Public Partial Class ApiResponseBase
Public Overridable Property Success As Boolean
Public Overridable Property Message As String
End Class
End Namespace
Namespace ClubReady.Sales.Wallet
Public Enum WalletPage
Uninitialized
Manage
Add
AddCard
AddBank
AddMini
AddCardMini
AddBankMini
End Enum
Public Partial Class WalletTokenCreateRequestDto
Inherits ApiDtoBase
Public Overridable Property OwnerId As Integer
Public Overridable Property OwnerType As OwnerType
Public Overridable Property CreatorId As Integer
Public Overridable Property Page As WalletPage
Public Overridable Property Theme As String
Public Overridable Property AllowDeleteProfile As Nullable(Of Boolean)
Public Overridable Property AllowDisableProfile As Nullable(Of Boolean)
End Class
Public Partial Class WalletTokenCreateResponseDto
Inherits ApiResponseBase
Public Overridable Property WalletToken As String
Public Overridable Property WalletOrigin As String
Public Overridable Property WalletUrl As String
End Class
End Namespace
Namespace ClubReady.Web.Api
Public Enum RestrictedResourceType
Store
Chain
User
Undefined
End Enum
End Namespace
Namespace ClubReady.Web.Api.Sales.Wallet
Public Partial Class WalletTokenCreateEndpoint
Inherits WalletTokenCreateRequestDto
Implements IRestrictedApiRequest
'''<Summary>
'''Api Key - grants access to resources
'''</Summary>
<ApiMember(DataType:="string", Description:="Api Key - grants access to resources", IsRequired:=true, Name:="ApiKey", ParameterType:="query")>
Public Overridable Property ApiKey As String
'''<Summary>
'''ID # of the owner to create the URL for
'''</Summary>
<ApiMember(DataType:="integer", Description:="ID # of the owner to create the URL for", IsRequired:=true, Name:="OwnerId", ParameterType:="query")>
Public Overridable Property OwnerId As Integer
'''<Summary>
'''Type of owner to create the URL for
'''</Summary>
<ApiMember(Description:="Type of owner to create the URL for", IsRequired:=true, Name:="OwnerType", ParameterType:="query")>
Public Overridable Property OwnerType As OwnerType
'''<Summary>
'''Person creating the profile. Can be same as OwnerId.
'''</Summary>
<ApiMember(Description:="Person creating the profile. Can be same as OwnerId.", IsRequired:=true, Name:="CreatorId", ParameterType:="query")>
Public Overridable Property CreatorId As Integer
'''<Summary>
'''Page to display when calling the Payment Profile iFrame
'''</Summary>
<ApiMember(Description:="Page to display when calling the Payment Profile iFrame", IsRequired:=true, Name:="Page", ParameterType:="query")>
Public Overridable Property Page As WalletPage
'''<Summary>
'''CSS Theme
'''</Summary>
<ApiMember(Description:="CSS Theme", ParameterType:="query")>
Public Overridable Property Theme As String
Public Overridable Property RestrictedId As Nullable(Of Integer)
Public Overridable Property RestrictedResourceType As RestrictedResourceType
'''<Summary>
'''Allows for a payment profile to be deleted
'''</Summary>
<ApiMember(Description:="Allows for a payment profile to be deleted", Name:="AllowDeleteProfile", ParameterType:="query")>
Public Overridable Property AllowDeleteProfile As Nullable(Of Boolean)
'''<Summary>
'''Allows for a payment profile to be disabled
'''</Summary>
<ApiMember(Description:="Allows for a payment profile to be disabled", Name:="AllowDisableProfile", ParameterType:="query")>
Public Overridable Property AllowDisableProfile As Nullable(Of Boolean)
End Class
Public Partial Class WalletTokenCreateResponse
Inherits WalletTokenCreateResponseDto
Public Overridable Property Success As Boolean
Public Overridable Property Message As String
Public Overridable Property WalletToken As String
Public Overridable Property WalletOrigin As String
Public Overridable Property WalletUrl As String
End Class
End Namespace
Namespace ClubReadyGateway.Vault
<DataContract>
Public 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
End Enum
End Namespace
End Namespace
VB.NET WalletTokenCreateEndpoint DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
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/json
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"Success":false,"Message":"String","WalletToken":"String","WalletOrigin":"String","WalletUrl":"String"}