Requires any of the roles: | bookingsupplier-administrator-write, bookingsupplier-administrator-read, superadmin |
POST | /rebatecodes/markaspayed | Mark rebate code as payed | Mark rebate code as payed |
---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports BokaMera.API.ServiceModel.Dtos
Imports BokaMera.API.ServiceModel.Db
Namespace Global
Namespace BokaMera.API.ServiceModel.Db
Public Partial Class ArticleServiceRelation
Inherits BaseModel
<Required>
Public Overridable Property CompanyId As Guid
Public Overridable Property Id As Integer
<Required>
Public Overridable Property ServiceId As Integer
<Required>
Public Overridable Property ArticleId As Integer
End Class
Public Partial Class BaseModel
End Class
End Namespace
Namespace BokaMera.API.ServiceModel.Dtos
Public Partial Class ArticleResponse
Public Sub New()
Services = New List(Of ArticleServiceRelation)
ServiceIds = New List(Of Integer)
End Sub
Public Overridable Property CompanyId As Guid
Public Overridable Property Id As Integer
Public Overridable Property Name As String
Public Overridable Property ArticleTypeId As Integer
Public Overridable Property Description As String
Public Overridable Property ImageUrl As String
Public Overridable Property Active As Boolean
Public Overridable Property Amount As Integer
Public Overridable Property Price As Double
Public Overridable Property CurrencyId As String
Public Overridable Property UpdatedDate As Date
Public Overridable Property CreatedDate As Date
Public Overridable Property Services As List(Of ArticleServiceRelation)
Public Overridable Property ServiceIds As List(Of Integer)
Public Overridable Property PriceSign As String
End Class
Public Partial Class DaysOfWeekResponse
Public Overridable Property Id As Integer
Public Overridable Property DayOfWeek As String
Public Overridable Property DayOfWeekTranslation As String
Public Overridable Property DayOfWeekActive As Nullable(Of Boolean)
Public Overridable Property DayOfWeekSortOrder As Nullable(Of Short)
End Class
<ApiResponse(Description:="You were unauthorized to call this service", StatusCode:=401)>
<ValidateRequest(Validator:="IsAuthenticated")>
Public Partial Class MarkRebateCodeAsPayed
'''<Summary>
'''
'''</Summary>
<ApiMember(Description:="", IsRequired:=true)>
Public Overridable Property CompanyId As Nullable(Of Guid)
'''<Summary>
'''Rebate code id to which you wish to add transaction
'''</Summary>
<ApiMember(Description:="Rebate code id to which you wish to add transaction", IsRequired:=true)>
Public Overridable Property RebateCodeId As Integer
End Class
Public Partial Class RebateCodeCustomerResponse
Public Overridable Property Id As Guid
Public Overridable Property Firstname As String
Public Overridable Property Lastname As String
Public Overridable Property Email As String
Public Overridable Property Phone As String
Public Overridable Property ImageUrl As String
End Class
Public Partial Class RebateCodeResponse
Public Sub New()
DaysOfWeek = New List(Of DaysOfWeekResponse)
Services = New List(Of RebateCodeServiceResponse)
Transactions = New List(Of RebateCodeTransactionQueryResponse)
Customers = New List(Of RebateCodeCustomerResponse)
End Sub
Public Overridable Property Id As Integer
Public Overridable Property CompanyId As Nullable(Of Guid)
Public Overridable Property ValidFrom As Date
Public Overridable Property ValidTo As Date
'''<Summary>
'''If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update.
'''</Summary>
<ApiMember(Description:="If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update.")>
Public Overridable Property FromTime As TimeSpan
'''<Summary>
'''If the price is only valid for a specific time span during a time of day enter the FromTime and ToTime parameters.
'''</Summary>
<ApiMember(Description:="If the price is only valid for a specific time span during a time of day enter the FromTime and ToTime parameters.")>
Public Overridable Property ToTime As TimeSpan
Public Overridable Property CreatedBy As String
Public Overridable Property Created As Date
Public Overridable Property UpdatedBy As String
Public Overridable Property Updated As Date
Public Overridable Property PersonalNote As String
Public Overridable Property RebateCodeSign As String
Public Overridable Property RebateCodeValue As Integer
Public Overridable Property RebateCodeTypeId As Integer
Public Overridable Property Name As String
Public Overridable Property RebateCodeStatusId As Integer
Public Overridable Property StatusName As String
Public Overridable Property MaxNumberOfUses As Integer
Public Overridable Property MaxNumberOfUsesPerCustomer As Integer
Public Overridable Property NumberOfUsesUsed As Integer
Public Overridable Property DaysOfWeek As List(Of DaysOfWeekResponse)
Public Overridable Property Services As List(Of RebateCodeServiceResponse)
Public Overridable Property Article As ArticleResponse
Public Overridable Property Transactions As List(Of RebateCodeTransactionQueryResponse)
Public Overridable Property RemainingAmount As Nullable(Of Double)
Public Overridable Property RemainingUsage As Nullable(Of Integer)
Public Overridable Property Customers As List(Of RebateCodeCustomerResponse)
Public Overridable Property ResponseStatus As ResponseStatus
Public Overridable Property PaymentReceived As Boolean
Public Overridable Property RebateCodeCurrencySign As String
Public Overridable Property ActiveByStatus As Boolean
Public Overridable Property PriceSign As String
Public Overridable Property RebateCodeTypeName As String
End Class
Public Partial Class RebateCodeServiceResponse
Public Overridable Property Id As Integer
Public Overridable Property Name As String
Public Overridable Property Description As String
Public Overridable Property Active As Boolean
End Class
Public Partial Class RebateCodeTransactionQueryResponse
Public Overridable Property Id As Integer
Public Overridable Property CompanyId As Guid
Public Overridable Property Note As String
Public Overridable Property RebateCodeId As Integer
Public Overridable Property RebateCodeSign As String
Public Overridable Property RebateCodeTypeId As Nullable(Of Integer)
Public Overridable Property RebateCodeTypeName As String
Public Overridable Property Amount As Double
Public Overridable Property BookingId As Nullable(Of Integer)
Public Overridable Property UpdatedDate As Date
Public Overridable Property CreatedDate As Date
Public Overridable Property Service As RebateCodeServiceResponse
Public Overridable Property Customer As RebateCodeCustomerResponse
Public Overridable Property PriceSign As String
End Class
End Namespace
End Namespace
VB.NET MarkRebateCodeAsPayed DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /rebatecodes/markaspayed HTTP/1.1
Host: api.bokamera.se
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"CompanyId":"00000000-0000-0000-0000-000000000000","RebateCodeId":0}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"Id":0,"CompanyId":"00000000-0000-0000-0000-000000000000","FromTime":"00:00:00","ToTime":"00:00:00","CreatedBy":"String","UpdatedBy":"String","PersonalNote":"String","RebateCodeSign":"String","RebateCodeValue":0,"RebateCodeTypeId":0,"Name":"String","RebateCodeStatusId":0,"StatusName":"String","MaxNumberOfUses":0,"MaxNumberOfUsesPerCustomer":0,"NumberOfUsesUsed":0,"DaysOfWeek":[{"Id":0,"DayOfWeek":"String","DayOfWeekTranslation":"String","DayOfWeekActive":false,"DayOfWeekSortOrder":0}],"Services":[{"Id":0,"Name":"String","Description":"String","Active":false}],"Article":{"Id":0,"Name":"String","ArticleTypeId":0,"Description":"String","ImageUrl":"String","Active":false,"Amount":0,"Price":0,"CurrencyId":"String","Services":[{"Id":0,"ServiceId":0,"ArticleId":0}],"ServiceIds":[0],"PriceSign":"String"},"Transactions":[{"Id":0,"Note":"String","RebateCodeId":0,"RebateCodeSign":"String","RebateCodeTypeId":0,"RebateCodeTypeName":"String","Amount":0,"BookingId":0,"Service":{"Id":0,"Name":"String","Description":"String","Active":false},"Customer":{"Firstname":"String","Lastname":"String","Email":"String","Phone":"String","ImageUrl":"String"},"PriceSign":"String"}],"RemainingAmount":0,"RemainingUsage":0,"Customers":[{"Firstname":"String","Lastname":"String","Email":"String","Phone":"String","ImageUrl":"String"}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"PaymentReceived":false,"RebateCodeCurrencySign":"String","ActiveByStatus":false,"PriceSign":"String","RebateCodeTypeName":"String"}