BokaMera.API.Host

<back to all web services

UpdateVossDiscountAgreements

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
PUT/voss/discountAgreementsPUT Discount agreements
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 UpdateVossDiscountAgreements
{
    /**
    * Discount agreement data
    */
    @ApiMember(Description="Discount agreement data", IsRequired=true)
    open var DiscountAgreementId:UUID? = null

    /**
    * Discount agreement period data. Iteration count must be added
    */
    @ApiMember(Description="Discount agreement period data. Iteration count must be added", IsRequired=true)
    open var DiscountPeriod:UpdateDiscountPeriodRequestDto? = null

    /**
    * Discount agreement status. Published is default.
    */
    @ApiMember(Description="Discount agreement status. Published is default.", IsRequired=true)
    open var DiscountAgreementStatus:DiscountAgreementStatusEnum? = null

    open var Name:String? = null
    open var Description:String? = null
    open var ValidFrom:Date? = null
    open var ValidTo:Date? = null
}

@DataContract(Name="UpdateDiscountPeriodRequestDto")
open class UpdateDiscountPeriodRequestDto
{
    @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 DiscountAgreementStatusEnum
{
    Draft,
    Staged,
    Published,
    Archived,
    Discarded,
}

Kotlin UpdateVossDiscountAgreements DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

PUT /voss/discountAgreements HTTP/1.1 
Host: api.bokamera.se 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"DiscountAgreementStatus":"Draft","Name":"String","Description":"String","ValidTo":"0001-01-01T00:00:00"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{}