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
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*


@ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
open class UpdateVossSubscriptions
{
    /**
    * The company id. Subscription will be fetched of this company
    */
    @ApiMember(Description="The company id. Subscription will be fetched of this company")
    open var CompanyId:UUID? = null

    /**
    * Discount agreement data
    */
    @ApiMember(Description="Discount agreement data")
    open var DiscountAgreements:ArrayList<SubscriptionDiscountAgreementRequestDto> = ArrayList<SubscriptionDiscountAgreementRequestDto>()

    /**
    *     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
    */
    @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\n")
    open var DiscountAgreementsChangeType:DiscountAgreementsChangeTypeEnum? = null

    /**
    * The company id. Subscription will be fetched of this company
    */
    @ApiMember(Description="The company id. Subscription will be fetched of this company")
    open var CompanyOwnerId:Int? = null
}

@DataContract(Name="SubscriptionDiscountAgreementRequestDto")
open class SubscriptionDiscountAgreementRequestDto
{
    @DataMember(Name="discountAgreementId", IsRequired=true)
    @SerializedName("discountAgreementId")
    open var DiscountAgreementId:UUID? = null

    @DataMember(Name="period")
    @SerializedName("period")
    open var Period:SubscriptionDiscountPeriodRequestDto? = null
}

@DataContract(Name="SubscriptionDiscountPeriodRequestDto")
open class SubscriptionDiscountPeriodRequestDto
{
    @DataMember(Name="periodKind", IsRequired=true)
    @SerializedName("periodKind")
    open var PeriodKind:PeriodKindEnum? = null

    @DataMember(Name="length")
    @SerializedName("length")
    open var Length:DiscountAgreementTimeLengthRequestDto? = null

    @DataMember(Name="periodIterationCount")
    @SerializedName("periodIterationCount")
    open var PeriodIterationCount:Int? = null
}

enum class PeriodKindEnum
{
    FixedTime,
    AlignedToBindingPeriod,
    AlignedToSubscriptionBillingPeriod,
}

@DataContract(Name="DiscountAgreementTimeLengthRequestDto")
open class DiscountAgreementTimeLengthRequestDto
{
    @DataMember(Name="unit", IsRequired=true)
    @SerializedName("unit")
    open var Unit:UnitEnum? = null

    @DataMember(Name="value", IsRequired=true)
    @SerializedName("value")
    open var Value:Int? = null
}

enum class UnitEnum
{
    Day,
    Month,
    Year,
}

enum class DiscountAgreementsChangeTypeEnum
{
    Prospective,
    Retrospective,
}

Kotlin UpdateVossSubscriptions DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

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/csv
Content-Type: text/csv
Content-Length: length

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

{}