Requires any of the roles: | bookingsupplier-administrator-write, bookingsupplier-administrator-read, superadmin |
GET | /companies/{CompanyId}/incentives | It gets either incentives which are not read or engaged by the current company/administrator. |
---|
"use strict";
/** @typedef {number} */
export var IncentiveActionType;
(function (IncentiveActionType) {
IncentiveActionType[IncentiveActionType["Upgrade"] = 1] = "Upgrade"
IncentiveActionType[IncentiveActionType["AddOn"] = 2] = "AddOn"
IncentiveActionType[IncentiveActionType["Information"] = 3] = "Information"
})(IncentiveActionType || (IncentiveActionType = {}));
export class LicenseItemsResponse {
/** @param {{Id?:number,Name?:string,AllowedItems?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Id;
/** @type {string} */
Name;
/** @type {number} */
AllowedItems;
}
export class BaseModel {
constructor(init) { Object.assign(this, init) }
}
export class Currency extends BaseModel {
/** @param {{Name?:string,CurrencySign?:string,Active?:boolean,ModifiedDate?:string,Id?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {string} */
Name;
/** @type {string} */
CurrencySign;
/** @type {boolean} */
Active;
/** @type {?string} */
ModifiedDate;
/** @type {string} */
Id;
}
export class Country extends BaseModel {
/** @param {{CurrencyId?:string,CurrencyInfo?:Currency,Name?:string,Culture?:string,TimeZone?:string,ModifiedDate?:string,Id?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {string} */
CurrencyId;
/** @type {Currency} */
CurrencyInfo;
/** @type {string} */
Name;
/** @type {string} */
Culture;
/** @type {string} */
TimeZone;
/** @type {?string} */
ModifiedDate;
/** @type {string} */
Id;
}
export class LicensePrice extends BaseModel {
/** @param {{Country?:Country,MonthlyPayment?:boolean,LicenseTypeId?:number,CountryId?:string,Price?:number,ModifiedDate?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {Country} */
Country;
/** @type {boolean} */
MonthlyPayment;
/** @type {number} */
LicenseTypeId;
/** @type {string} */
CountryId;
/** @type {number} */
Price;
/** @type {?string} */
ModifiedDate;
}
export class LicenseTypeQueryResponse {
/** @param {{Id?:number,Name?:string,Description?:string,IsExtraLicenseOption?:boolean,PeriodOfNoticeDays?:number,Items?:LicenseItemsResponse[],Prices?:LicensePrice[]}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description The license type id */
Id;
/**
* @type {string}
* @description The license type name */
Name;
/**
* @type {string}
* @description The license type description */
Description;
/**
* @type {boolean}
* @description If the license type is not a standard license but instead an extra license option. An example would be sending new letter license. */
IsExtraLicenseOption;
/**
* @type {number}
* @description The period of notice for the license in days. */
PeriodOfNoticeDays;
/**
* @type {LicenseItemsResponse[]}
* @description The license items for the license type */
Items;
/**
* @type {LicensePrice[]}
* @description The license prices in each country for the license type */
Prices;
}
export class IncentiveActionResponse {
/** @param {{Id?:number,Description?:string,ActionType?:IncentiveActionType,Page?:string,Segment?:string,Element?:string,LicenseTypeId?:number,SuggestedLicenseToUpgrade?:LicenseTypeQueryResponse}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Id;
/** @type {string} */
Description;
/** @type {IncentiveActionType} */
ActionType;
/** @type {string} */
Page;
/** @type {string} */
Segment;
/** @type {string} */
Element;
/** @type {?number} */
LicenseTypeId;
/** @type {LicenseTypeQueryResponse} */
SuggestedLicenseToUpgrade;
}
/** @typedef {number} */
export var IncentiveRecurrenceFrequency;
(function (IncentiveRecurrenceFrequency) {
IncentiveRecurrenceFrequency[IncentiveRecurrenceFrequency["OneTime"] = 1] = "OneTime"
IncentiveRecurrenceFrequency[IncentiveRecurrenceFrequency["Weekly"] = 2] = "Weekly"
IncentiveRecurrenceFrequency[IncentiveRecurrenceFrequency["Monthly"] = 3] = "Monthly"
})(IncentiveRecurrenceFrequency || (IncentiveRecurrenceFrequency = {}));
/** @typedef {'LicenseAvailability'|'SmsActivation'|'eAccountingActivation'|'CodeLockActivation'|'SocialActivation'|'OnlinePaymentActivation'|'FollowUpMessageActivation'|'RatingActivation'} */
export var CriteriaType;
(function (CriteriaType) {
CriteriaType["LicenseAvailability"] = "LicenseAvailability"
CriteriaType["SmsActivation"] = "SmsActivation"
CriteriaType["eAccountingActivation"] = "eAccountingActivation"
CriteriaType["CodeLockActivation"] = "CodeLockActivation"
CriteriaType["SocialActivation"] = "SocialActivation"
CriteriaType["OnlinePaymentActivation"] = "OnlinePaymentActivation"
CriteriaType["FollowUpMessageActivation"] = "FollowUpMessageActivation"
CriteriaType["RatingActivation"] = "RatingActivation"
})(CriteriaType || (CriteriaType = {}));
export class IncentiveCriteriaDto {
/** @param {{CriteriaType?:CriteriaType,Value?:string,InvertCondition?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {CriteriaType} */
CriteriaType;
/** @type {string} */
Value;
/** @type {boolean} */
InvertCondition;
}
export class CompanyIncentiveResponse {
/** @param {{Id?:number,Heading?:string,StorageUrl?:string,SuccessButtonText?:string,ActionId?:number,InitialDelayInSeconds?:number,MaxDisplayCount?:number,ValidFrom?:string,ValidTo?:string,Action?:IncentiveActionResponse,Payload?:string,Body?:string,Frequency?:IncentiveRecurrenceFrequency,InitialDeferredDays?:number,RecurrenceInterval?:number,Active?:boolean,CompanyIds?:string[],Criteria?:IncentiveCriteriaDto[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Id;
/** @type {string} */
Heading;
/** @type {string} */
StorageUrl;
/** @type {string} */
SuccessButtonText;
/** @type {number} */
ActionId;
/** @type {number} */
InitialDelayInSeconds;
/** @type {?number} */
MaxDisplayCount;
/** @type {string} */
ValidFrom;
/** @type {string} */
ValidTo;
/** @type {IncentiveActionResponse} */
Action;
/** @type {string} */
Payload;
/** @type {string} */
Body;
/** @type {IncentiveRecurrenceFrequency} */
Frequency;
/** @type {number} */
InitialDeferredDays;
/** @type {number} */
RecurrenceInterval;
/** @type {boolean} */
Active;
/** @type {string[]} */
CompanyIds;
/** @type {IncentiveCriteriaDto[]} */
Criteria;
}
export class CompanyIncentivesQueryResponse {
/** @param {{Incentives?:IList<CompanyIncentiveResponse>,CompanyId?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {IList<CompanyIncentiveResponse>} */
Incentives;
/** @type {string} */
CompanyId;
}
export class CompanyIncentiveQuery {
/** @param {{CompanyId?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description The company id, if empty will use the company id for the user you are logged in with. */
CompanyId;
}
JavaScript CompanyIncentiveQuery 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.
GET /companies/{CompanyId}/incentives HTTP/1.1 Host: api.bookmore.com Accept: text/jsv
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { }