Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
POST | /billing/company/creditcard | Add a new credit card with Ticket Id from payment solution. | Add new credit card from payment solution with their ticket id. |
---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports BokaMera.API.ServiceModel.Dtos
Namespace Global
Namespace BokaMera.API.ServiceModel.Dtos
Public Partial Class CompanyCreditCardQueryResponse
'''<Summary>
'''The credit card id
'''</Summary>
<ApiMember(Description:="The credit card id")>
Public Overridable Property Id As Integer
'''<Summary>
'''The credit card name
'''</Summary>
<ApiMember(Description:="The credit card name")>
Public Overridable Property Name As String
'''<Summary>
'''If the credit card is active
'''</Summary>
<ApiMember(Description:="If the credit card is active")>
Public Overridable Property Active As Boolean
'''<Summary>
'''If the credit card is valid (active and not expired)
'''</Summary>
<ApiMember(Description:="If the credit card is valid (active and not expired)")>
Public Overridable Property IsValid As Boolean
'''<Summary>
'''The credit card type
'''</Summary>
<ApiMember(Description:="The credit card type")>
Public Overridable Property Type As String
'''<Summary>
'''The credit card expiration Year
'''</Summary>
<ApiMember(Description:="The credit card expiration Year")>
Public Overridable Property ExpYear As String
'''<Summary>
'''The credit card expiration month
'''</Summary>
<ApiMember(Description:="The credit card expiration month")>
Public Overridable Property ExpMonth As String
'''<Summary>
'''The credit card ticket name. This is secret information and won't be displayed
'''</Summary>
<ApiMember(Description:="The credit card ticket name. This is secret information and won't be displayed")>
Public Overridable Property TicketId As String
'''<Summary>
'''The date when the credit card was saved.
'''</Summary>
<ApiMember(Description:="The date when the credit card was saved.")>
Public Overridable Property Created As Nullable(Of Date)
'''<Summary>
'''The date when the credit card was updated.
'''</Summary>
<ApiMember(Description:="The date when the credit card was updated.")>
Public Overridable Property Updated As Nullable(Of Date)
End Class
<ApiResponse(Description:="You were unauthorized to call this service", StatusCode:=401)>
<ValidateRequest(Validator:="IsAuthenticated")>
Public Partial Class CreateCompanyCreditCard
Implements ICompany
'''<Summary>
'''The company id, if empty will use the company id for the user you are logged in with.
'''</Summary>
<ApiMember(Description:="The company id, if empty will use the company id for the user you are logged in with.")>
Public Overridable Property CompanyId As Nullable(Of Guid)
'''<Summary>
'''The credit card name
'''</Summary>
<ApiMember(Description:="The credit card name")>
Public Overridable Property Name As String
'''<Summary>
'''The credit card type. In example Mastercard, Visa
'''</Summary>
<ApiMember(Description:="The credit card type. In example Mastercard, Visa")>
Public Overridable Property Type As String
'''<Summary>
'''The credit card expiration Year
'''</Summary>
<ApiMember(Description:="The credit card expiration Year")>
Public Overridable Property ExpYear As String
'''<Summary>
'''The credit card expiration month
'''</Summary>
<ApiMember(Description:="The credit card expiration month")>
Public Overridable Property ExpMonth As String
'''<Summary>
'''The credit card ticket name. This is secret information and won't be displayed
'''</Summary>
<ApiMember(Description:="The credit card ticket name. This is secret information and won't be displayed")>
Public Overridable Property TicketId As String
End Class
End Namespace
End Namespace
VB.NET CreateCompanyCreditCard 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.
POST /billing/company/creditcard HTTP/1.1
Host: api.bokamera.se
Accept: application/json
Content-Type: application/json
Content-Length: length
{"CompanyId":"00000000-0000-0000-0000-000000000000","Name":"String","Type":"String","ExpYear":"String","ExpMonth":"String","TicketId":"String"}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"Id":0,"Name":"String","Active":false,"IsValid":false,"Type":"String","ExpYear":"String","ExpMonth":"String","TicketId":"String","Created":"0001-01-01T00:00:00","Updated":"0001-01-01T00:00:00"}