Greyhounds.WebApi

<back to all web services

ConfigureAccumulator

The following routes are available for this service:
POST/configure/accumulator
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Greyhounds.WebApi.ServiceModel
Imports Greyhounds.ReadModel
Imports Greyhounds.ReadModel.BackOffice

Namespace Global

    Namespace Greyhounds.ReadModel

        Public Partial Class AccumulatorConfiguration
            Public Overridable Property Id As String
            Public Overridable Property Pools As List(Of Pool)
            Public Overridable Property PrevalentStake As Decimal
            Public Overridable Property LocationOptimizationLevel As LocationOptimizationLevel
            Public Overridable Property JackPotThresholdInterval As ThresholdInterval
        End Namespace

        Namespace Greyhounds.ReadModel.BackOffice

            Public Partial Class Pool
                Public Overridable Property Id As Integer
                Public Overridable Property Name As String
                Public Overridable Property Coefficient As Decimal
                Public Overridable Property RTP As Decimal
                Public Overridable Property Threshold As Decimal
                Public Overridable Property Balance As Decimal
            End Class
        End Class

        Public Enum LocationOptimizationLevel
            None = 0
            Low = 1
            Medium = 2
            High = 3
        End Enum

        Public Partial Class ThresholdInterval
            Public Overridable Property Start As Decimal
            Public Overridable Property [End] As Decimal
        End Class
    End Namespace

    Namespace Greyhounds.WebApi.ServiceModel

        Public Partial Class ConfigureAccumulator
            Public Overridable Property Id As String
            Public Overridable Property Configuration As AccumulatorConfiguration
        End Class
    End Namespace
End Namespace

VB.NET ConfigureAccumulator DTOs

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

HTTP + CSV

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/csv
Content-Type: text/csv
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/csv
Content-Length: length

{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}