Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
PUT | /voss/subscriptions | PUT voss subscription |
---|
"use strict";
/** @typedef {'FixedTime'|'AlignedToBindingPeriod'|'AlignedToSubscriptionBillingPeriod'} */
export var PeriodKindEnum;
(function (PeriodKindEnum) {
PeriodKindEnum["FixedTime"] = "FixedTime"
PeriodKindEnum["AlignedToBindingPeriod"] = "AlignedToBindingPeriod"
PeriodKindEnum["AlignedToSubscriptionBillingPeriod"] = "AlignedToSubscriptionBillingPeriod"
})(PeriodKindEnum || (PeriodKindEnum = {}));
/** @typedef {'Day'|'Month'|'Year'} */
export var UnitEnum;
(function (UnitEnum) {
UnitEnum["Day"] = "Day"
UnitEnum["Month"] = "Month"
UnitEnum["Year"] = "Year"
})(UnitEnum || (UnitEnum = {}));
export class DiscountAgreementTimeLengthRequestDto {
/** @param {{unit?:UnitEnum,value?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {UnitEnum} */
unit;
/** @type {number} */
value;
}
export class SubscriptionDiscountPeriodRequestDto {
/** @param {{periodKind?:PeriodKindEnum,length?:DiscountAgreementTimeLengthRequestDto,periodIterationCount?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {PeriodKindEnum} */
periodKind;
/** @type {DiscountAgreementTimeLengthRequestDto} */
length;
/** @type {?number} */
periodIterationCount;
}
export class SubscriptionDiscountAgreementRequestDto {
/** @param {{discountAgreementId?:string,period?:SubscriptionDiscountPeriodRequestDto}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
discountAgreementId;
/** @type {SubscriptionDiscountPeriodRequestDto} */
period;
}
/** @typedef {'Prospective'|'Retrospective'} */
export var DiscountAgreementsChangeTypeEnum;
(function (DiscountAgreementsChangeTypeEnum) {
DiscountAgreementsChangeTypeEnum["Prospective"] = "Prospective"
DiscountAgreementsChangeTypeEnum["Retrospective"] = "Retrospective"
})(DiscountAgreementsChangeTypeEnum || (DiscountAgreementsChangeTypeEnum = {}));
export class UpdateVossSubscriptions {
/** @param {{CompanyId?:string,DiscountAgreements?:SubscriptionDiscountAgreementRequestDto[],DiscountAgreementsChangeType?:DiscountAgreementsChangeTypeEnum,CompanyOwnerId?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description The company id. Subscription will be fetched of this company */
CompanyId;
/**
* @type {SubscriptionDiscountAgreementRequestDto[]}
* @description Discount agreement data */
DiscountAgreements;
/**
* @type {DiscountAgreementsChangeTypeEnum}
* @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
*/
DiscountAgreementsChangeType;
/**
* @type {number}
* @description The company id. Subscription will be fetched of this company */
CompanyOwnerId;
}
JavaScript UpdateVossSubscriptions DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=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 {}