Six4Win.WebApi

<back to all web services

RequestSuperWinReschedule

Requires Authentication
The following routes are available for this service:
POST/cmd/reschedule/super-win
package dtos

import (
	"time"
)

type SuperWinPoolState int

const (
	SuperWinPoolStateIdle         SuperWinPoolState = 0
	SuperWinPoolStateAccumulating SuperWinPoolState = 1
	SuperWinPoolStateAwarding     SuperWinPoolState = 2
)

type BettingApp struct {
	Name    *string `json:"name,omitempty"`
	Version *string `json:"version,omitempty"`
}

type Ref struct {
	Id  string `json:"id"`
	Val string `json:"val"`
}

type RefEx struct {
	Ref
	Data RecordDictionary[string, string] `json:"data"`
}

type Origin struct {
	Application   *BettingApp `json:"application,omitempty"`
	Ip            *string     `json:"ip,omitempty"`
	Organization  *RefEx      `json:"organization,omitempty"`
	Region        *Ref        `json:"region,omitempty"`
	LocationGroup *Ref        `json:"locationGroup,omitempty"`
	Location      *RefEx      `json:"location,omitempty"`
	Device        *RefEx      `json:"device,omitempty"`
	Clerk         *Ref        `json:"clerk,omitempty"`
}

type SuperWinWinner struct {
	IsDrawn                     bool      `json:"isDrawn,omitempty"`
	DrawnAtUtc                  time.Time `json:"drawnAtUtc,omitempty"`
	RoundId                     *string   `json:"roundId,omitempty"`
	BetId                       *string   `json:"betId,omitempty"`
	SlipId                      *string   `json:"slipId,omitempty"`
	Origin                      *Origin   `json:"origin,omitempty"`
	Bettor                      *Ref      `json:"bettor,omitempty"`
	Code                        *string   `json:"code,omitempty"`
	Amount                      float64   `json:"amount,omitempty"`
	LocationAddressOrBettorInfo *string   `json:"locationAddressOrBettorInfo,omitempty"`
}

type SuperWinPrize struct {
	Id          int             `json:"id,omitempty"`
	Amount      float64         `json:"amount,omitempty"`
	ScheduledAt time.Time       `json:"scheduledAt,omitempty"`
	Winner      *SuperWinWinner `json:"winner,omitempty"`
}

type SuperWinPool struct {
	Id       int                        `json:"id,omitempty"`
	State    SuperWinPoolState          `json:"state,omitempty"`
	Amount   float64                    `json:"amount,omitempty"`
	Schedule *RecordList[SuperWinPrize] `json:"schedule,omitempty"`
}

type SuperWinState struct {
	CurrentDate     *string                              `json:"currentDate,omitempty"`
	AvailableAmount float64                              `json:"availableAmount,omitempty"`
	Pools           *RecordDictionary[int, SuperWinPool] `json:"pools,omitempty"`
}

type RequestSuperWinReschedule struct {
	Id    *string        `json:"id,omitempty"`
	State *SuperWinState `json:"state,omitempty"`
}

type RecordDictionary[TKey any, TVal any] map[TKey]TVal

type RecordList[T any] []T

Go RequestSuperWinReschedule 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 /cmd/reschedule/super-win HTTP/1.1 
Host: s4w2.api.bettor.webhop.biz 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<RequestSuperWinReschedule xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Six4Win.WebApi.ServiceModel">
  <Id>String</Id>
  <State xmlns:d2p1="http://schemas.datacontract.org/2004/07/Six4Win">
    <d2p1:AvailableAmount>0</d2p1:AvailableAmount>
    <d2p1:CurrentDate>String</d2p1:CurrentDate>
    <d2p1:Pools xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfintSuperWinPoolQC5r2uXE>
        <d3p1:Key>0</d3p1:Key>
        <d3p1:Value>
          <d2p1:Amount>0</d2p1:Amount>
          <d2p1:Id>0</d2p1:Id>
          <d2p1:Schedule>
            <d2p1:SuperWinPrize>
              <d2p1:Amount>0</d2p1:Amount>
              <d2p1:Id>0</d2p1:Id>
              <d2p1:ScheduledAt>0001-01-01T00:00:00</d2p1:ScheduledAt>
              <d2p1:Winner>
                <d2p1:Amount>0</d2p1:Amount>
                <d2p1:BetId>String</d2p1:BetId>
                <d2p1:Bettor xmlns:d9p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
                  <d9p1:_x003C_Id_x003E_k__BackingField>String</d9p1:_x003C_Id_x003E_k__BackingField>
                  <d9p1:_x003C_Val_x003E_k__BackingField>String</d9p1:_x003C_Val_x003E_k__BackingField>
                </d2p1:Bettor>
                <d2p1:Code>String</d2p1:Code>
                <d2p1:DrawnAtUtc>0001-01-01T00:00:00</d2p1:DrawnAtUtc>
                <d2p1:IsDrawn>false</d2p1:IsDrawn>
                <d2p1:LocationAddressOrBettorInfo>String</d2p1:LocationAddressOrBettorInfo>
                <d2p1:Origin xmlns:d9p1="http://schemas.datacontract.org/2004/07/Betting.Common">
                  <d9p1:Application>
                    <d9p1:Name>String</d9p1:Name>
                    <d9p1:Version>String</d9p1:Version>
                  </d9p1:Application>
                  <d9p1:Clerk xmlns:d10p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
                    <d10p1:_x003C_Id_x003E_k__BackingField>String</d10p1:_x003C_Id_x003E_k__BackingField>
                    <d10p1:_x003C_Val_x003E_k__BackingField>String</d10p1:_x003C_Val_x003E_k__BackingField>
                  </d9p1:Clerk>
                  <d9p1:Device xmlns:d10p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
                    <d10p1:_x003C_Id_x003E_k__BackingField>String</d10p1:_x003C_Id_x003E_k__BackingField>
                    <d10p1:_x003C_Val_x003E_k__BackingField>String</d10p1:_x003C_Val_x003E_k__BackingField>
                    <d10p1:_x003C_Data_x003E_k__BackingField>
                      <d3p1:KeyValueOfstringstring>
                        <d3p1:Key>String</d3p1:Key>
                        <d3p1:Value>String</d3p1:Value>
                      </d3p1:KeyValueOfstringstring>
                    </d10p1:_x003C_Data_x003E_k__BackingField>
                  </d9p1:Device>
                  <d9p1:IP>String</d9p1:IP>
                  <d9p1:Location xmlns:d10p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
                    <d10p1:_x003C_Id_x003E_k__BackingField>String</d10p1:_x003C_Id_x003E_k__BackingField>
                    <d10p1:_x003C_Val_x003E_k__BackingField>String</d10p1:_x003C_Val_x003E_k__BackingField>
                    <d10p1:_x003C_Data_x003E_k__BackingField>
                      <d3p1:KeyValueOfstringstring>
                        <d3p1:Key>String</d3p1:Key>
                        <d3p1:Value>String</d3p1:Value>
                      </d3p1:KeyValueOfstringstring>
                    </d10p1:_x003C_Data_x003E_k__BackingField>
                  </d9p1:Location>
                  <d9p1:LocationGroup xmlns:d10p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
                    <d10p1:_x003C_Id_x003E_k__BackingField>String</d10p1:_x003C_Id_x003E_k__BackingField>
                    <d10p1:_x003C_Val_x003E_k__BackingField>String</d10p1:_x003C_Val_x003E_k__BackingField>
                  </d9p1:LocationGroup>
                  <d9p1:Organization xmlns:d10p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
                    <d10p1:_x003C_Id_x003E_k__BackingField>String</d10p1:_x003C_Id_x003E_k__BackingField>
                    <d10p1:_x003C_Val_x003E_k__BackingField>String</d10p1:_x003C_Val_x003E_k__BackingField>
                    <d10p1:_x003C_Data_x003E_k__BackingField>
                      <d3p1:KeyValueOfstringstring>
                        <d3p1:Key>String</d3p1:Key>
                        <d3p1:Value>String</d3p1:Value>
                      </d3p1:KeyValueOfstringstring>
                    </d10p1:_x003C_Data_x003E_k__BackingField>
                  </d9p1:Organization>
                  <d9p1:Region xmlns:d10p1="http://schemas.datacontract.org/2004/07/Starnet.Common">
                    <d10p1:_x003C_Id_x003E_k__BackingField>String</d10p1:_x003C_Id_x003E_k__BackingField>
                    <d10p1:_x003C_Val_x003E_k__BackingField>String</d10p1:_x003C_Val_x003E_k__BackingField>
                  </d9p1:Region>
                </d2p1:Origin>
                <d2p1:RoundId>String</d2p1:RoundId>
                <d2p1:SlipId>String</d2p1:SlipId>
              </d2p1:Winner>
            </d2p1:SuperWinPrize>
          </d2p1:Schedule>
          <d2p1:State>Idle</d2p1:State>
        </d3p1:Value>
      </d3p1:KeyValueOfintSuperWinPoolQC5r2uXE>
    </d2p1:Pools>
  </State>
</RequestSuperWinReschedule>
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>