BokaMera.API.Host

<back to all web services

UpdateVossSubscriptions

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
PUT/voss/subscriptionsPUT voss subscription
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports BokaMera.API.ServiceModel.Dtos
Imports VossIntegration.ApiTools.Model
Imports 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
            Public Sub New()
                DiscountAgreements = New List(Of SubscriptionDiscountAgreementRequestDto)
            End Sub

            '''<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)

            '''<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 VossIntegration.ApiTools.Enums

        Public Enum PeriodKindEnum
            FixedTime
            AlignedToBindingPeriod
            AlignedToSubscriptionBillingPeriod
        End Enum
    End Namespace

    Namespace 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 Nullable(Of 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 .other suffix or ?format=other

HTTP + OTHER

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: testapi.bokamera.se 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"DiscountAgreements":[{}],"DiscountAgreementsChangeType":"Prospective","CompanyOwnerId":0}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{}