| Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
| PUT | /voss/subscriptions | PUT voss subscription |
|---|
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.VossIntegration.ApiTools.Model
Imports BokaMera.VossIntegration.ApiTools.Enums
Namespace Global
Namespace BokaMera.API.ServiceModel.Dtos
<ApiResponse(Description:="You were unauthorized to call this service", StatusCode:=401)>
Public Partial Class UpdateVossSubscriptions
'''<Summary>
'''The company id. Subscription will be fetched of this company
'''</Summary>
<ApiMember(Description:="The company id. Subscription will be fetched of this company")>
Public Overridable Property CompanyId As Guid
'''<Summary>
'''Discount agreement data
'''</Summary>
<ApiMember(Description:="Discount agreement data")>
Public Overridable Property DiscountAgreements As List(Of SubscriptionDiscountAgreementRequestDto) = New List(Of SubscriptionDiscountAgreementRequestDto)
'''<Summary>
''' Discount agreements change type controls how already occured transactions are treated <br />Retrospective - all future and past not invoiced transactions will be recalculated with new discount agreements <br />Prospective - discounts will apply only for future transactions
'''</Summary>
<ApiMember(Description:=" Discount agreements change type controls how already occured transactions are treated <br />Retrospective - all future and past not invoiced transactions will be recalculated with new discount agreements <br />Prospective - discounts will apply only for future transactions
")>
Public Overridable Property DiscountAgreementsChangeType As DiscountAgreementsChangeTypeEnum
'''<Summary>
'''The company id. Subscription will be fetched of this company
'''</Summary>
<ApiMember(Description:="The company id. Subscription will be fetched of this company")>
Public Overridable Property CompanyOwnerId As Integer
End Class
End Namespace
Namespace BokaMera.VossIntegration.ApiTools.Enums
Public Enum PeriodKindEnum
FixedTime
AlignedToBindingPeriod
AlignedToSubscriptionBillingPeriod
End Enum
End Namespace
Namespace BokaMera.VossIntegration.ApiTools.Model
<DataContract(Name:="DiscountAgreementTimeLengthRequestDto")>
Public Partial Class DiscountAgreementTimeLengthRequestDto
<DataMember(Name:="unit", IsRequired:=true)>
Public Overridable Property Unit As UnitEnum
<DataMember(Name:="value", IsRequired:=true)>
Public Overridable Property Value As Integer
Public Enum UnitEnum
Day
Month
Year
End Enum
End Class
<DataContract(Name:="SubscriptionDiscountAgreementRequestDto")>
Public Partial Class SubscriptionDiscountAgreementRequestDto
<DataMember(Name:="discountAgreementId", IsRequired:=true)>
Public Overridable Property DiscountAgreementId As Guid
<DataMember(Name:="period")>
Public Overridable Property Period As SubscriptionDiscountPeriodRequestDto
End Class
<DataContract(Name:="SubscriptionDiscountPeriodRequestDto")>
Public Partial Class SubscriptionDiscountPeriodRequestDto
<DataMember(Name:="periodKind", IsRequired:=true)>
Public Overridable Property PeriodKind As PeriodKindEnum
<DataMember(Name:="length")>
Public Overridable Property Length As DiscountAgreementTimeLengthRequestDto
<DataMember(Name:="periodIterationCount")>
Public Overridable Property PeriodIterationCount As Integer?
End Class
End Namespace
End Namespace
VB.NET UpdateVossSubscriptions 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.
PUT /voss/subscriptions HTTP/1.1
Host: api.bokamera.se
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
DiscountAgreements:
[
{
}
],
DiscountAgreementsChangeType: Prospective,
CompanyOwnerId: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
}