Six4Win.WebApi

<back to all web services

ConfigureAccumulator

Requires Authentication
The following routes are available for this service:
POST/cmd/configure/accumulator
<?php namespace dtos;

use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};


class AccumulatorConfiguration extends AccumulatorConfiguration implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $id=null,
        /** @var DateTime */
        public DateTime $updatedAt=new DateTime()
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['id'])) $this->id = $o['id'];
        if (isset($o['updatedAt'])) $this->updatedAt = JsonConverters::from('DateTime', $o['updatedAt']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->id)) $o['id'] = $this->id;
        if (isset($this->updatedAt)) $o['updatedAt'] = JsonConverters::to('DateTime', $this->updatedAt);
        return empty($o) ? new class(){} : $o;
    }
}

class ConfigureAccumulator implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $id=null,
        /** @var AccumulatorConfiguration|null */
        public ?AccumulatorConfiguration $configuration=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['id'])) $this->id = $o['id'];
        if (isset($o['configuration'])) $this->configuration = JsonConverters::from('AccumulatorConfiguration', $o['configuration']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->id)) $o['id'] = $this->id;
        if (isset($this->configuration)) $o['configuration'] = JsonConverters::to('AccumulatorConfiguration', $this->configuration);
        return empty($o) ? new class(){} : $o;
    }
}

PHP ConfigureAccumulator DTOs

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

HTTP + OTHER

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

POST /cmd/configure/accumulator HTTP/1.1 
Host: s4w2.api.bettor.cc 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"id":"String","configuration":{"pools":[{"id":0,"name":"String","rtp":0,"reserveRTP":0,"totalRTP":0}],"prevalentStake":0,"purgeThresholdModifier":0,"locationOptimizationLevel":0,"jackPot5ThresholdInterval":{"start":0,"end":0},"deviationCategorySpanInPct":0,"deviationCategoryThresholdAmount":0,"roundPoolCircuitBreakerThreshold":0,"lowWinCountAffinityInPct":0,"winCountOrderAffinity":[{"order":0,"probability":0}],"highRollerSettings":{"pools":[{"id":0,"name":"String","isActive":false,"contributionToRoundPoolPct":0,"caps":{"plusCoef":0,"minusCoef":0,"maxAmountInPrevalentStakes":0}}],"categoryThresholds":[{"category":0,"threshold":0}]},"overflowCoefficientPoolsToRound":false,"antiSyphonProtectionOverride":false,"fraudDetectionConfig":{"antiSyphon":{"combinationCountPerRoundThresholdPct":0,"excludedLocations":[{"id":"String","val":"String"}],"includeRoundPctAsBettorSyphonCriteria":false,"isActive":false}},"debugConfig":{"logLocationStats":false,"logBettorSats":false}}}
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"}}