BokaMera.API.Host

<back to all web services

UpdateVossSubscriptionScheduledChange

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
PUT/voss/subscriptions/{SubscriptionId}/scheduledChanges/{Id}Update voss subscription scheduled changeUpdate a pending subscription scheduled change in the VOSS System. Already executed scheduled changes cannot be updated.
"use strict";
/** @typedef {'AtSubscriptionBillingPeriodEnd'|'AtBindingPeriodEnd'} */
export var TypeEnum;
(function (TypeEnum) {
    TypeEnum["AtSubscriptionBillingPeriodEnd"] = "AtSubscriptionBillingPeriodEnd"
    TypeEnum["AtBindingPeriodEnd"] = "AtBindingPeriodEnd"
})(TypeEnum || (TypeEnum = {}));
/** @typedef {'Active'|'Terminated'} */
export var StatusEnum;
(function (StatusEnum) {
    StatusEnum["Active"] = "Active"
    StatusEnum["Terminated"] = "Terminated"
})(StatusEnum || (StatusEnum = {}));
export class SubscriptionScheduledChangePackageResult {
    /** @param {{id?:string,versionId?:string,name?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    id;
    /** @type {string} */
    versionId;
    /** @type {string} */
    name;
}
export class SubscriptionScheduledChangeTierResult {
    /** @param {{id?:string,name?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    id;
    /** @type {string} */
    name;
}
export class SubscriptionScheduledChangePlanResult {
    /** @param {{id?:string,name?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    id;
    /** @type {string} */
    name;
}
export class SubscriptionScheduledChangeSalesInformationResult {
    /** @param {{salesPersonId?:string,salesDepartmentId?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    salesPersonId;
    /** @type {string} */
    salesDepartmentId;
}
export class SubscriptionScheduledChangeResult {
    /** @param {{type?:TypeEnum,status?:StatusEnum,id?:string,package?:SubscriptionScheduledChangePackageResult,tier?:SubscriptionScheduledChangeTierResult,plan?:SubscriptionScheduledChangePlanResult,scheduledDate?:string,salesInformation?:SubscriptionScheduledChangeSalesInformationResult}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {TypeEnum} */
    type;
    /** @type {StatusEnum} */
    status;
    /** @type {string} */
    id;
    /** @type {SubscriptionScheduledChangePackageResult} */
    package;
    /** @type {SubscriptionScheduledChangeTierResult} */
    tier;
    /** @type {SubscriptionScheduledChangePlanResult} */
    plan;
    /** @type {string} */
    scheduledDate;
    /** @type {SubscriptionScheduledChangeSalesInformationResult} */
    salesInformation;
}
export class UpdateVossSubscriptionScheduledChange {
    /** @param {{SubscriptionId?:string,Id?:string,Type?:TypeEnum,VersionId?:string,PackageId?:string,TierId?:string,PlanId?:string,PeriodIterationCount?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description The subscription id */
    SubscriptionId;
    /**
     * @type {string}
     * @description The subscription scheduled change id */
    Id;
    /**
     * @type {TypeEnum}
     * @description Controls when the scheduled change will be executed:  <br />AtSubscriptionBillingPeriodEnd - after the currently latest subscription billing period ends  <br />AtBindingPeriodEnd - after the currently latest subscription binding period ends */
    Type;
    /**
     * @type {?string}
     * @description Optional package version id; if omitted the current version of the subscription package is used */
    VersionId;
    /**
     * @type {?string}
     * @description The id of a package which will be active after the scheduled change is executed; if provided the tier id and plan id have to be provided as well */
    PackageId;
    /**
     * @type {?string}
     * @description The id of a tier which will be active after the scheduled change is executed; can be omitted if PlanId is provided instead */
    TierId;
    /**
     * @type {?string}
     * @description The id of a plan which will be active after the scheduled change is executed; can be omitted if TierId is provided instead */
    PlanId;
    /**
     * @type {?number}
     * @description How many periods (counting from the latest period) must pass before the scheduled change is executed; if omitted the change is executed on the latest period end */
    PeriodIterationCount;
}

JavaScript UpdateVossSubscriptionScheduledChange 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/{SubscriptionId}/scheduledChanges/{Id} HTTP/1.1 
Host: testapi.bokamera.se 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"Type":"AtSubscriptionBillingPeriodEnd","VersionId":"00000000-0000-0000-0000-000000000000","PackageId":"00000000-0000-0000-0000-000000000000","TierId":"00000000-0000-0000-0000-000000000000","PlanId":"00000000-0000-0000-0000-000000000000","PeriodIterationCount":0}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"type":"AtSubscriptionBillingPeriodEnd","status":"Pending"}