Starnet.MontenegroTaxationAuthority.WebApi

<back to all web services

ReportBetCancellations

The following routes are available for this service:
POST/bets/cancel
"use strict";
/** @typedef {number} */
export var BetSource;
(function (BetSource) {
    BetSource[BetSource["Landbase"] = 0] = "Landbase"
    BetSource[BetSource["Web"] = 1] = "Web"
})(BetSource || (BetSource = {}));
export class TransactionDtoBase {
    /** @param {{transaction_id?:string,transaction_time?:string,transaction_amount?:number,game_name?:string,betting_place_id?:string,betting_terminal_id?:string,jmbg?:string,passport_number?:string,source?:BetSource,identification_document_country?:string,identification_document_type?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    transaction_id;
    /** @type {string} */
    transaction_time;
    /** @type {number} */
    transaction_amount;
    /** @type {string} */
    game_name;
    /** @type {string} */
    betting_place_id;
    /** @type {string} */
    betting_terminal_id;
    /** @type {string} */
    jmbg;
    /** @type {string} */
    passport_number;
    /** @type {BetSource} */
    source;
    /** @type {string} */
    identification_document_country;
    /** @type {string} */
    identification_document_type;
}
/** @typedef {number} */
export var RollbackTransactionType;
(function (RollbackTransactionType) {
    RollbackTransactionType[RollbackTransactionType["Bet"] = 0] = "Bet"
    RollbackTransactionType[RollbackTransactionType["Win"] = 1] = "Win"
    RollbackTransactionType[RollbackTransactionType["Jackpot"] = 1] = "Jackpot"
})(RollbackTransactionType || (RollbackTransactionType = {}));
export class RollbackDto extends TransactionDtoBase {
    /** @param {{rollback_transaction_id?:string,ticket_id?:string,rollback_transaction_type?:RollbackTransactionType,transaction_id?:string,transaction_time?:string,transaction_amount?:number,game_name?:string,betting_place_id?:string,betting_terminal_id?:string,jmbg?:string,passport_number?:string,source?:BetSource,identification_document_country?:string,identification_document_type?:string}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {string} */
    rollback_transaction_id;
    /** @type {string} */
    ticket_id;
    /** @type {RollbackTransactionType} */
    rollback_transaction_type;
}
export class ReportBetCancellations {
    /** @param {{betCancellations?:RecordList<RollbackDto>}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {RecordList<RollbackDto>} */
    betCancellations;
}
/** @typedef T {any} */
export class RecordList extends Array {
    constructor(init) { super(init); Object.assign(this, init) }
}

JavaScript ReportBetCancellations DTOs

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

HTTP + XML

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: api.sbbet-prod-mnta.webhop.biz 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<ReportBetCancellations xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Starnet.MontenegroTaxationAuthority.WebApi.ServiceModel">
  <BetCancellations xmlns:d2p1="http://schemas.datacontract.org/2004/07/Starnet.MontenegroTaxationAuthority.Common">
    <d2p1:RollbackDto>
      <d2p1:betting_place_id>String</d2p1:betting_place_id>
      <d2p1:betting_terminal_id>String</d2p1:betting_terminal_id>
      <d2p1:game_name>String</d2p1:game_name>
      <d2p1:identification_document_country>String</d2p1:identification_document_country>
      <d2p1:identification_document_type>String</d2p1:identification_document_type>
      <d2p1:jmbg>String</d2p1:jmbg>
      <d2p1:passport_number>String</d2p1:passport_number>
      <d2p1:source>Landbase</d2p1:source>
      <d2p1:transaction_amount>0</d2p1:transaction_amount>
      <d2p1:transaction_id>String</d2p1:transaction_id>
      <d2p1:transaction_time>0001-01-01T00:00:00</d2p1:transaction_time>
      <d2p1:rollback_transaction_id>String</d2p1:rollback_transaction_id>
      <d2p1:rollback_transaction_type>Bet</d2p1:rollback_transaction_type>
      <d2p1:ticket_id>String</d2p1:ticket_id>
    </d2p1:RollbackDto>
  </BetCancellations>
</ReportBetCancellations>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ResponseStatus xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
  <ErrorCode>String</ErrorCode>
  <Message>String</Message>
  <StackTrace>String</StackTrace>
  <Errors>
    <ResponseError>
      <ErrorCode>String</ErrorCode>
      <FieldName>String</FieldName>
      <Message>String</Message>
      <Meta xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:KeyValueOfstringstring>
          <d4p1:Key>String</d4p1:Key>
          <d4p1:Value>String</d4p1:Value>
        </d4p1:KeyValueOfstringstring>
      </Meta>
    </ResponseError>
  </Errors>
  <Meta xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value>String</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </Meta>
</ResponseStatus>