Betting.WebApi

<back to all web services

GetSelfServiceDeviceBettingSession

Requires Authentication
The following routes are available for this service:
GET/qry/self-service-device-betting-sessions/{Id}
"use strict";
export class Ref {
    /** @param {{id?:string,val?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    id;
    /** @type {string} */
    val;
}
/** @typedef {number} */
export var SessionStatus;
(function (SessionStatus) {
    SessionStatus[SessionStatus["Opening"] = 1] = "Opening"
    SessionStatus[SessionStatus["Open"] = 2] = "Open"
    SessionStatus[SessionStatus["Ending"] = 3] = "Ending"
    SessionStatus[SessionStatus["Ended"] = 4] = "Ended"
    SessionStatus[SessionStatus["Rejected"] = 5] = "Rejected"
})(SessionStatus || (SessionStatus = {}));
export class Money {
    /** @param {{amount?:number,currency?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    amount;
    /** @type {string} */
    currency;
}
/** @typedef {number} */
export var TopUpStatus;
(function (TopUpStatus) {
    TopUpStatus[TopUpStatus["Pending"] = 1] = "Pending"
    TopUpStatus[TopUpStatus["Completed"] = 2] = "Completed"
    TopUpStatus[TopUpStatus["Failed"] = 3] = "Failed"
})(TopUpStatus || (TopUpStatus = {}));
export class SessionTopUp {
    /** @param {{id?:string,amount?:Money,clerk?:Ref,status?:TopUpStatus,failureReason?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {?string} */
    id;
    /** @type {?Money} */
    amount;
    /** @type {?Ref} */
    clerk;
    /** @type {TopUpStatus} */
    status;
    /** @type {?string} */
    failureReason;
}
export class SelfServiceDeviceBettingSession {
    /** @param {{id?:string,device?:Ref,location?:Ref,status?:SessionStatus,startedAt?:string,issuedByClerk?:Ref,patronName?:string,initialCredit?:Money,topUps?:RecordList<SessionTopUp>,payoutId?:string,payout?:Money,rejectionReason?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {?string} */
    id;
    /** @type {?Ref} */
    device;
    /** @type {?Ref} */
    location;
    /** @type {SessionStatus} */
    status;
    /** @type {string} */
    startedAt;
    /** @type {?Ref} */
    issuedByClerk;
    /** @type {?string} */
    patronName;
    /** @type {?Money} */
    initialCredit;
    /** @type {?RecordList<SessionTopUp>} */
    topUps;
    /** @type {?string} */
    payoutId;
    /** @type {?Money} */
    payout;
    /** @type {?string} */
    rejectionReason;
}
export class GetSelfServiceDeviceBettingSession {
    /** @param {{id?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {?string} */
    id;
}
/** @typedef T {any} */
export class RecordList extends Array {
    constructor(init) { super(init); Object.assign(this, init) }
}

JavaScript GetSelfServiceDeviceBettingSession DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /qry/self-service-device-betting-sessions/{Id} HTTP/1.1 
Host: api.testenv.webhop.biz 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	id: String,
	device: 
	{
		id: String,
		val: String
	},
	location: 
	{
		id: String,
		val: String
	},
	status: 1,
	startedAt: 0001-01-01,
	issuedByClerk: 
	{
		id: String,
		val: String
	},
	patronName: String,
	initialCredit: 
	{
		amount: 0,
		currency: String
	},
	topUps: 
	[
		{
			id: String,
			amount: 
			{
				amount: 0,
				currency: String
			},
			clerk: 
			{
				id: String,
				val: String
			},
			status: 1,
			failureReason: String
		}
	],
	payoutId: String,
	payout: 
	{
		amount: 0,
		currency: String
	},
	rejectionReason: String
}