| POST | /bets/cancel |
|---|
"use strict";
export class Reference {
/** @param {{id?:string,value?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
id;
/** @type {string} */
value;
}
/** @typedef {number} */
export var ProductCategory;
(function (ProductCategory) {
ProductCategory[ProductCategory["Sportsbook"] = 0] = "Sportsbook"
ProductCategory[ProductCategory["RNG"] = 1] = "RNG"
})(ProductCategory || (ProductCategory = {}));
export class ProductReference {
/** @param {{id?:string,value?:string,category?:ProductCategory,productProvider?:Reference}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
id;
/** @type {string} */
value;
/** @type {ProductCategory} */
category;
/** @type {Reference} */
productProvider;
}
export class ProductInstanceRef {
/** @param {{id?:string,name?:string,product?:ProductReference}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
id;
/** @type {string} */
name;
/** @type {ProductReference} */
product;
}
export class Origin {
/** @param {{device?:Reference,location?:Reference,locationGroup?:Reference,organization?:Reference,productInstance?:ProductInstanceRef}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {Reference} */
device;
/** @type {Reference} */
location;
/** @type {Reference} */
locationGroup;
/** @type {Reference} */
organization;
/** @type {ProductInstanceRef} */
productInstance;
}
/** @typedef {number} */
export var PaymentOrigin;
(function (PaymentOrigin) {
PaymentOrigin[PaymentOrigin["POS"] = 0] = "POS"
PaymentOrigin[PaymentOrigin["SMS"] = 1] = "SMS"
PaymentOrigin[PaymentOrigin["Internet"] = 2] = "Internet"
})(PaymentOrigin || (PaymentOrigin = {}));
export class PayinRecap {
/** @param {{payin?:number,taxAmount?:number,stake?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
payin;
/** @type {number} */
taxAmount;
/** @type {number} */
stake;
}
export class BetCancelation {
/** @param {{id?:string,origin?:Origin,betCanceledAt?:string,paymentOrigin?:PaymentOrigin,payinRecap?:PayinRecap}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
id;
/** @type {Origin} */
origin;
/** @type {string} */
betCanceledAt;
/** @type {PaymentOrigin} */
paymentOrigin;
/** @type {PayinRecap} */
payinRecap;
}
export class ReportBetCancelations {
/** @param {{betCancelations?:BetCancelation[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {BetCancelation[]} */
betCancelations;
}
JavaScript ReportBetCancelations DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /bets/cancel HTTP/1.1
Host: fbihtaapi.bettor.webhop.biz
Accept: application/json
Content-Type: application/json
Content-Length: length
{"betCancelations":[{"id":"String","origin":{"device":{"id":"String","value":"String"},"location":{"id":"String","value":"String"},"locationGroup":{"id":"String","value":"String"},"organization":{"id":"String","value":"String"},"productInstance":{"id":"String","name":"String","product":{"id":"String","value":"String","category":0,"productProvider":{"id":"String","value":"String"}}}},"betCanceledAt":"0001-01-01T00:00:00.0000000Z","paymentOrigin":0,"payinRecap":{"payin":0,"taxAmount":0,"stake":0}}]}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}