| All Verbs | /qry/configurations/productInstances |
|---|
"use strict";
/** @typedef {number} */
export var PayinConstraintType;
(function (PayinConstraintType) {
PayinConstraintType[PayinConstraintType["SingleBet"] = 0] = "SingleBet"
PayinConstraintType[PayinConstraintType["MultiBet"] = 1] = "MultiBet"
PayinConstraintType[PayinConstraintType["SystemBet"] = 2] = "SystemBet"
})(PayinConstraintType || (PayinConstraintType = {}));
export class Money {
/** @param {{amount?:number,currency?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
amount;
/** @type {string} */
currency;
}
export class PayinConstraint {
/** @param {{type?:PayinConstraintType,min?:Money,default?:Money,warningThreshold?:Money,max?:Money}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {PayinConstraintType} */
type;
/** @type {Money} */
min;
/** @type {Money} */
default;
/** @type {Money} */
warningThreshold;
/** @type {Money} */
max;
}
/** @typedef {number} */
export var WinningsCapType;
(function (WinningsCapType) {
WinningsCapType[WinningsCapType["SingleBet"] = 0] = "SingleBet"
WinningsCapType[WinningsCapType["MultiBet"] = 1] = "MultiBet"
WinningsCapType[WinningsCapType["SystemBet"] = 2] = "SystemBet"
})(WinningsCapType || (WinningsCapType = {}));
export class WinningsCap {
/** @param {{type?:WinningsCapType,cap?:Money}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {WinningsCapType} */
type;
/** @type {Money} */
cap;
}
export class BettingPolicies {
/** @param {{payinConstraints?:RecordList<PayinConstraint>,payinTaxationPolicyId?:string,winningsCaps?:RecordList<WinningsCap>,winningsTaxationPolicyId?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {RecordList<PayinConstraint>} */
payinConstraints;
/** @type {string} */
payinTaxationPolicyId;
/** @type {RecordList<WinningsCap>} */
winningsCaps;
/** @type {string} */
winningsTaxationPolicyId;
}
export class ProductInstanceConfiguration {
/** @param {{id?:string,bettingPolicies?:BettingPolicies,apiUrl?:string,settings?:{ [index:string]: string; }}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
id;
/** @type {BettingPolicies} */
bettingPolicies;
/** @type {string} */
apiUrl;
/** @type {{ [index:string]: string; }} */
settings;
}
export class BettingApp {
/** @param {{name?:string,version?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
name;
/** @type {string} */
version;
}
export class Ref {
/** @param {{id?:string,val?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
id;
/** @type {string} */
val;
}
export class RefEx extends Ref {
/** @param {{data?:RecordDictionary<string, string>,id?:string,val?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {RecordDictionary<string, string>} */
data;
}
export class Origin {
/** @param {{application?:BettingApp,ip?:string,organization?:RefEx,region?:Ref,locationGroup?:Ref,location?:RefEx,device?:RefEx,clerk?:Ref}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {BettingApp} */
application;
/** @type {string} */
ip;
/** @type {RefEx} */
organization;
/** @type {Ref} */
region;
/** @type {Ref} */
locationGroup;
/** @type {RefEx} */
location;
/** @type {RefEx} */
device;
/** @type {Ref} */
clerk;
}
export class GetProductInstanceConfiguration {
/** @param {{id?:string,origin?:Origin}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
id;
/** @type {Origin} */
origin;
}
class Dictionary {}
/** @typedef TKey {any} */
/** @typedef TVal {any} */
export class RecordDictionary extends Dictionary {
constructor(init) { super(init); Object.assign(this, init) }
}
/** @typedef T {any} */
export class RecordList extends Array {
constructor(init) { super(init); Object.assign(this, init) }
}
JavaScript GetProductInstanceConfiguration 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.
POST /qry/configurations/productInstances HTTP/1.1
Host: api.beto2.webhop.biz
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
id: String,
origin:
{
application:
{
name: String,
version: String
},
ip: String,
organization:
{
data:
{
String: String
},
id: String,
val: String
},
region:
{
id: String,
val: String
},
locationGroup:
{
id: String,
val: String
},
location:
{
data:
{
String: String
},
id: String,
val: String
},
device:
{
data:
{
String: String
},
id: String,
val: String
},
clerk:
{
id: String,
val: String
}
}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
id: String,
bettingPolicies:
{
payinConstraints:
[
{
type: 0,
min:
{
amount: 0,
currency: String
},
default:
{
amount: 0,
currency: String
},
warningThreshold:
{
amount: 0,
currency: String
},
max:
{
amount: 0,
currency: String
}
}
],
payinTaxationPolicyId: String,
winningsCaps:
[
{
type: 0,
cap:
{
amount: 0,
currency: String
}
}
],
winningsTaxationPolicyId: String
},
apiUrl: String,
settings:
{
String: String
}
}