| Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
| PUT | /voss/subscriptions | PUT voss subscription |
|---|
namespace BokaMera.API.ServiceModel.Dtos
open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
type PeriodKindEnum =
| FixedTime = 0
| AlignedToBindingPeriod = 1
| AlignedToSubscriptionBillingPeriod = 2
type UnitEnum =
| Day = 0
| Month = 1
| Year = 2
[<DataContract(Name="DiscountAgreementTimeLengthRequestDto")>]
[<AllowNullLiteral>]
type DiscountAgreementTimeLengthRequestDto() =
[<DataMember(Name="unit", IsRequired=true)>]
member val Unit:UnitEnum = new UnitEnum() with get,set
[<DataMember(Name="value", IsRequired=true)>]
member val Value:Int32 = new Int32() with get,set
[<DataContract(Name="SubscriptionDiscountPeriodRequestDto")>]
[<AllowNullLiteral>]
type SubscriptionDiscountPeriodRequestDto() =
[<DataMember(Name="periodKind", IsRequired=true)>]
member val PeriodKind:PeriodKindEnum = new PeriodKindEnum() with get,set
[<DataMember(Name="length")>]
member val Length:DiscountAgreementTimeLengthRequestDto = null with get,set
[<DataMember(Name="periodIterationCount")>]
member val PeriodIterationCount:Nullable<Int32> = new Nullable<Int32>() with get,set
[<DataContract(Name="SubscriptionDiscountAgreementRequestDto")>]
[<AllowNullLiteral>]
type SubscriptionDiscountAgreementRequestDto() =
[<DataMember(Name="discountAgreementId", IsRequired=true)>]
member val DiscountAgreementId:Guid = new Guid() with get,set
[<DataMember(Name="period")>]
member val Period:SubscriptionDiscountPeriodRequestDto = null with get,set
type DiscountAgreementsChangeTypeEnum =
| Prospective = 0
| Retrospective = 1
[<ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)>]
[<AllowNullLiteral>]
type 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")>]
member val CompanyId:Guid = new Guid() with get,set
///<summary>
///Discount agreement data
///</summary>
[<ApiMember(Description="Discount agreement data")>]
member val DiscountAgreements:ResizeArray<SubscriptionDiscountAgreementRequestDto> = null with get,set
///<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\n")>]
member val DiscountAgreementsChangeType:DiscountAgreementsChangeTypeEnum = new DiscountAgreementsChangeTypeEnum() with get,set
///<summary>
///The company id. Subscription will be fetched of this company
///</summary>
[<ApiMember(Description="The company id. Subscription will be fetched of this company")>]
member val CompanyOwnerId:Int32 = new Int32() with get,set
F# 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
{
}