Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
PUT | /voss/subscriptions | PUT voss subscription |
---|
export enum PeriodKindEnum
{
FixedTime = 'FixedTime',
AlignedToBindingPeriod = 'AlignedToBindingPeriod',
AlignedToSubscriptionBillingPeriod = 'AlignedToSubscriptionBillingPeriod',
}
export enum UnitEnum
{
Day = 'Day',
Month = 'Month',
Year = 'Year',
}
// @DataContract(Name="DiscountAgreementTimeLengthRequestDto")
export class DiscountAgreementTimeLengthRequestDto
{
// @DataMember(Name="unit", IsRequired=true)
public unit: UnitEnum;
// @DataMember(Name="value", IsRequired=true)
public value: number;
public constructor(init?: Partial<DiscountAgreementTimeLengthRequestDto>) { (Object as any).assign(this, init); }
}
// @DataContract(Name="SubscriptionDiscountPeriodRequestDto")
export class SubscriptionDiscountPeriodRequestDto
{
// @DataMember(Name="periodKind", IsRequired=true)
public periodKind: PeriodKindEnum;
// @DataMember(Name="length")
public length: DiscountAgreementTimeLengthRequestDto;
// @DataMember(Name="periodIterationCount")
public periodIterationCount?: number;
public constructor(init?: Partial<SubscriptionDiscountPeriodRequestDto>) { (Object as any).assign(this, init); }
}
// @DataContract(Name="SubscriptionDiscountAgreementRequestDto")
export class SubscriptionDiscountAgreementRequestDto
{
// @DataMember(Name="discountAgreementId", IsRequired=true)
public discountAgreementId: string;
// @DataMember(Name="period")
public period: SubscriptionDiscountPeriodRequestDto;
public constructor(init?: Partial<SubscriptionDiscountAgreementRequestDto>) { (Object as any).assign(this, init); }
}
export enum DiscountAgreementsChangeTypeEnum
{
Prospective = 'Prospective',
Retrospective = 'Retrospective',
}
// @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
export class UpdateVossSubscriptions
{
/** @description The company id. Subscription will be fetched of this company */
// @ApiMember(Description="The company id. Subscription will be fetched of this company")
public CompanyId: string;
/** @description Discount agreement data */
// @ApiMember(Description="Discount agreement data")
public DiscountAgreements: SubscriptionDiscountAgreementRequestDto[];
/** @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 */
// @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")
public DiscountAgreementsChangeType: DiscountAgreementsChangeTypeEnum;
/** @description The company id. Subscription will be fetched of this company */
// @ApiMember(Description="The company id. Subscription will be fetched of this company")
public CompanyOwnerId: number;
public constructor(init?: Partial<UpdateVossSubscriptions>) { (Object as any).assign(this, init); }
}
TypeScript 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 {}