| Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
| GET | /articles/payments | Query payment logs | Query payment logs |
|---|
Imports System
Imports System.IO
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 ArticleType
Inherits BaseModel
Public Overridable Property ArticleTypeId As Integer
<Required>
Public Overridable Property ArticleTypeName As String
Public Overridable Property ArticleTypeDescription As String
End Class
Public Partial Class BaseModel
End Class
Public Partial Class Currency
Inherits BaseModel
<Required>
Public Overridable Property Name As String
<Required>
Public Overridable Property CurrencySign As String
<Required>
Public Overridable Property Active As Boolean
Public Overridable Property ModifiedDate As DateTimeOffset?
<Required>
Public Overridable Property Id As String
End Class
Public Partial Class PaymentLog
Inherits BaseModel
<References(GetType(Currency))>
Public Overridable Property CurrencyId As String
Public Overridable Property CurrencyInfo As Currency
<Required>
Public Overridable Property CompanyId As Guid
Public Overridable Property Id As Integer
<Required>
Public Overridable Property InternalReferenceId As String
<Required>
Public Overridable Property ArticleTypeId As Integer
Public Overridable Property PaymentReferenceId As String
Public Overridable Property PaymentProviderId As Integer?
Public Overridable Property OrderItemReferenceId As String
Public Overridable Property Amount As Double?
Public Overridable Property VAT As Decimal?
Public Overridable Property AmountCredited As Double?
Public Overridable Property Comments As String
<Required>
Public Overridable Property Created As Date
<Required>
Public Overridable Property Updated As Date
Public Overridable Property ModifiedDate As DateTimeOffset?
End Class
End Namespace
Namespace BokaMera.API.ServiceModel.Dtos
Public Partial Class AccessKeyTypeResponse
Public Overridable Property Id As Integer
Public Overridable Property KeyType As String
Public Overridable Property Description As String
End Class
Public Partial Class CurrencyInfoResponse
'''<Summary>
'''The currency id
'''</Summary>
<ApiMember(Description:="The currency id")>
Public Overridable Property Id As String
'''<Summary>
'''The currency id
'''</Summary>
<ApiMember(Description:="The currency id")>
Public Overridable Property Name As String
'''<Summary>
'''The currency id
'''</Summary>
<ApiMember(Description:="The currency id")>
Public Overridable Property CurrencySign As String
End Class
<ValidateRequest(Validator:="IsAuthenticated")>
Public Partial Class PaymentLogQuery
Inherits QueryDb(Of PaymentLog, PaymentLogQueryResponse)
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 Guid? Implements ICompany.CompanyId
'''<Summary>
'''Start of interval to query for payments when they where created. UTC+0 and parameter as defined by date-time - RFC3339
'''</Summary>
<ApiMember(DataType:="dateTime", Description:="Start of interval to query for payments when they where created. UTC+0 and parameter as defined by date-time - RFC3339", ParameterType:="query")>
Public Overridable Property CreatedFrom As Date?
'''<Summary>
'''End of interval to query for payments when they where created. UTC+0 and parameter as defined by date-time - RFC3339
'''</Summary>
<ApiMember(DataType:="dateTime", Description:="End of interval to query for payments when they where created. UTC+0 and parameter as defined by date-time - RFC3339", ParameterType:="query")>
Public Overridable Property CreatedTo As Date?
'''<Summary>
'''Article type (Could be Service, rebate code types, etc..
'''</Summary>
<ApiMember(Description:="Article type (Could be Service, rebate code types, etc..", IsRequired:=true)>
Public Overridable Property ArticleTypeId As Integer?
'''<Summary>
'''
'''</Summary>
<ApiMember(Description:="")>
Public Overridable Property IncludeArticleType As Boolean
End Class
Public Partial Class PaymentLogQueryResponse
'''<Summary>
'''The payment log id
'''</Summary>
<ApiMember(Description:="The payment log id")>
Public Overridable Property Id As Integer
'''<Summary>
'''The internal reference id, could be reference to a booking, rebate code, gift card etc.
'''</Summary>
<ApiMember(Description:="The internal reference id, could be reference to a booking, rebate code, gift card etc.")>
Public Overridable Property InternalReference As Integer
'''<Summary>
'''The payment reference id
'''</Summary>
<ApiMember(Description:="The payment reference id")>
Public Overridable Property PaymentReferenceId As String
'''<Summary>
'''The payment order item reference id
'''</Summary>
<ApiMember(Description:="The payment order item reference id")>
Public Overridable Property OrderItemReferenceId As String
'''<Summary>
'''The payment reference id
'''</Summary>
<ApiMember(Description:="The payment reference id")>
Public Overridable Property PaymentProviderId As Integer?
'''<Summary>
'''The payment amount
'''</Summary>
<ApiMember(Description:="The payment amount")>
Public Overridable Property Amount As Double
'''<Summary>
'''The article type
'''</Summary>
<ApiMember(Description:="The article type")>
Public Overridable Property ArticleType As ArticleType
'''<Summary>
'''The payment VAT in percent
'''</Summary>
<ApiMember(Description:="The payment VAT in percent")>
Public Overridable Property VAT As Decimal
'''<Summary>
'''The payment amount that is credited
'''</Summary>
<ApiMember(Description:="The payment amount that is credited")>
Public Overridable Property AmountCredited As Double
'''<Summary>
'''The payment currency id
'''</Summary>
<ApiMember(Description:="The payment currency id")>
Public Overridable Property CurrencyId As String
'''<Summary>
'''The payment currency info
'''</Summary>
<ApiMember(Description:="The payment currency info")>
Public Overridable Property CurrencyInfo As CurrencyInfoResponse
'''<Summary>
'''Comments that could be added to the event log item
'''</Summary>
<ApiMember(Description:="Comments that could be added to the event log item")>
Public Overridable Property Comments As String
'''<Summary>
'''The date when the payment items was created
'''</Summary>
<ApiMember(Description:="The date when the payment items was created")>
Public Overridable Property Created As Date
'''<Summary>
'''The date when the payment items were updated.
'''</Summary>
<ApiMember(Description:="The date when the payment items were updated.")>
Public Overridable Property Updated As Date
End Class
End Namespace
Namespace ServiceStack
<DataContract>
Public Partial Class QueryBase
'''<Summary>
'''Skip over a given number of elements in a sequence and then return the remainder. Use this when you need paging.<br/><br/><strong>Example:</strong><br/><code>?skip=10&orderBy=Id</code>
'''</Summary>
<DataMember(Order:=1)>
Public Overridable Property Skip As Integer?
'''<Summary>
'''Return a given number of elements in a sequence and then skip over the remainder. Use this when you need paging.<br/><br/><strong>Example:</strong><br/><code>?take=20</code>
'''</Summary>
<DataMember(Order:=2)>
Public Overridable Property Take As Integer?
'''<Summary>
'''Comma separated list of fields to order by. Prefix the field name with a minus if you wan't to invert the sort for that field.<br/><br/><strong>Example:</strong><br/><code>?orderBy=Id,-Age,FirstName</code>
'''</Summary>
<DataMember(Order:=3)>
Public Overridable Property OrderBy As String
'''<Summary>
'''Comma separated list of fields to order by in descending order. Prefix the field name with a minus if you wan't to invert the sort for that field.<br/><br/><strong>Example:</strong><br/><code>?orderByDesc=Id,-Age,FirstName</code>
'''</Summary>
<DataMember(Order:=4)>
Public Overridable Property OrderByDesc As String
'''<Summary>
'''Include any of the aggregates <code>AVG, COUNT, FIRST, LAST, MAX, MIN, SUM</code> in your result set. The results will be returned in the meta field.<br/><br/><strong>Example:</strong><br/><code>?include=COUNT(*) as Total</code><br/><br/>or multiple fields with<br/><code>?include=Count(*) Total, Min(Age), AVG(Age) AverageAge</code><br/></br>or unique with<br/><code>?include=COUNT(DISTINCT LivingStatus) as UniqueStatus</code>
'''</Summary>
<DataMember(Order:=5)>
Public Overridable Property Include As String
<DataMember(Order:=6)>
Public Overridable Property Fields As String
<DataMember(Order:=7)>
Public Overridable Property Meta As Dictionary(Of String, String)
End Class
Public Partial Class QueryDb(Of From, Into)
Inherits QueryBase
End Class
<DataContract>
Public Partial Class QueryResponse(Of T)
<DataMember(Order:=1)>
Public Overridable Property Offset As Integer
<DataMember(Order:=2)>
Public Overridable Property Total As Integer
<DataMember(Order:=3)>
Public Overridable Property Results As List(Of AccessKeyTypeResponse)
<DataMember(Order:=4)>
Public Overridable Property Meta As Dictionary(Of String, String)
<DataMember(Order:=5)>
Public Overridable Property ResponseStatus As ResponseStatus
End Class
End Namespace
End Namespace
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.
GET /articles/payments HTTP/1.1 Host: api.bokamera.se Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"Offset":0,"Total":0,"Results":[{"Id":0,"InternalReference":0,"PaymentReferenceId":"String","OrderItemReferenceId":"String","PaymentProviderId":0,"Amount":0,"ArticleType":{"ArticleTypeId":0,"ArticleTypeName":"String","ArticleTypeDescription":"String"},"VAT":0,"AmountCredited":0,"CurrencyId":"String","CurrencyInfo":{"Id":"String","Name":"String","CurrencySign":"String"},"Comments":"String"}],"Meta":{"String":"String"},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}