| POST | /configure/accumulator |
|---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
Object = TypeVar('Object')
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Pool:
id: int = 0
name: Optional[str] = None
coefficient: Decimal = decimal.Decimal(0)
rtp: Decimal = decimal.Decimal(0)
threshold: Decimal = decimal.Decimal(0)
balance: Decimal = decimal.Decimal(0)
class LocationOptimizationLevel(IntEnum):
NONE = 0
LOW = 1
MEDIUM = 2
HIGH = 3
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ThresholdInterval:
start: Decimal = decimal.Decimal(0)
end: Decimal = decimal.Decimal(0)
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AccumulatorConfiguration:
id: Optional[str] = None
pools: Optional[List[Pool]] = None
prevalent_stake: Decimal = decimal.Decimal(0)
location_optimization_level: Optional[LocationOptimizationLevel] = None
jack_pot_threshold_interval: Optional[ThresholdInterval] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ConfigureAccumulator:
id: Optional[str] = None
configuration: Optional[AccumulatorConfiguration] = None
Python ConfigureAccumulator DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /configure/accumulator HTTP/1.1
Host: grh1.api.bettor.webhop.biz
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"id":"String","configuration":{"pools":[{"id":0,"name":"String","rtp":0}],"prevalentStake":0,"locationOptimizationLevel":0,"jackPotThresholdInterval":{"start":0,"end":0}}}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}