Six4Win.WebApi

<back to all web services

GetSuperWinAccumulations

The following routes are available for this service:
All Verbs/qry/super-win/accumulations
# frozen_string_literal: true
# encoding: utf-8


require 'json'
require 'servicestack'


module SuperWinPoolState
    IDLE = 0
    ACCUMULATING = 1
    AWARDING = 2
end

class BettingApp
    include ServiceStack::DTO

    # @return [String]
    attr_accessor :name
    # @return [String]
    attr_accessor :version

    def self.properties
        {
            name: { name: 'name' },
            version: { name: 'version' },
        }
    end

end

class Ref
    include ServiceStack::DTO

    # @return [String]
    attr_accessor :id
    # @return [String]
    attr_accessor :val

    def self.properties
        {
            id: { name: 'id' },
            val: { name: 'val' },
        }
    end

end

class RefEx < Ref
    # @return [RecordDictionary]
    attr_accessor :data

    def self.properties
        {
            data: { name: 'data', type: RecordDictionary },
        }
    end

end

class Origin
    include ServiceStack::DTO

    # @return [BettingApp]
    attr_accessor :application
    # @return [String]
    attr_accessor :ip
    # @return [RefEx]
    attr_accessor :organization
    # @return [Ref]
    attr_accessor :region
    # @return [Ref]
    attr_accessor :location_group
    # @return [RefEx]
    attr_accessor :location
    # @return [RefEx]
    attr_accessor :device
    # @return [Ref]
    attr_accessor :clerk

    def self.properties
        {
            application: { name: 'application', type: BettingApp },
            ip: { name: 'ip' },
            organization: { name: 'organization', type: RefEx },
            region: { name: 'region', type: Ref },
            location_group: { name: 'locationGroup', type: Ref },
            location: { name: 'location', type: RefEx },
            device: { name: 'device', type: RefEx },
            clerk: { name: 'clerk', type: Ref },
        }
    end

end

class SuperWinWinner
    include ServiceStack::DTO

    # @return [TrueClass]
    attr_accessor :is_drawn
    # @return [DateTime]
    attr_accessor :drawn_at_utc
    # @return [String]
    attr_accessor :round_id
    # @return [String]
    attr_accessor :bet_id
    # @return [String]
    attr_accessor :slip_id
    # @return [Origin]
    attr_accessor :origin
    # @return [Ref]
    attr_accessor :bettor
    # @return [String]
    attr_accessor :code
    # @return [BigDecimal]
    attr_accessor :amount
    # @return [String]
    attr_accessor :location_address_or_bettor_info

    def self.properties
        {
            is_drawn: { name: 'isDrawn' },
            drawn_at_utc: { name: 'drawnAtUtc', type: DateTime },
            round_id: { name: 'roundId' },
            bet_id: { name: 'betId' },
            slip_id: { name: 'slipId' },
            origin: { name: 'origin', type: Origin },
            bettor: { name: 'bettor', type: Ref },
            code: { name: 'code' },
            amount: { name: 'amount' },
            location_address_or_bettor_info: { name: 'locationAddressOrBettorInfo' },
        }
    end

end

class SuperWinPrize
    include ServiceStack::DTO

    # @return [Integer]
    attr_accessor :id
    # @return [BigDecimal]
    attr_accessor :amount
    # @return [DateTime]
    attr_accessor :scheduled_at
    # @return [SuperWinWinner]
    attr_accessor :winner

    def self.properties
        {
            id: { name: 'id' },
            amount: { name: 'amount' },
            scheduled_at: { name: 'scheduledAt', type: DateTime },
            winner: { name: 'winner', type: SuperWinWinner },
        }
    end

end

class SuperWinPool
    include ServiceStack::DTO

    # @return [Integer]
    attr_accessor :id
    # @return [SuperWinPoolState]
    attr_accessor :state
    # @return [BigDecimal]
    attr_accessor :amount
    # @return [RecordList]
    attr_accessor :schedule

    def self.properties
        {
            id: { name: 'id' },
            state: { name: 'state' },
            amount: { name: 'amount' },
            schedule: { name: 'schedule', type: RecordList },
        }
    end

end

class SuperWinState
    include ServiceStack::DTO

    # @return [String]
    attr_accessor :current_date
    # @return [BigDecimal]
    attr_accessor :available_amount
    # @return [RecordDictionary]
    attr_accessor :pools

    def self.properties
        {
            current_date: { name: 'currentDate' },
            available_amount: { name: 'availableAmount' },
            pools: { name: 'pools', type: RecordDictionary },
        }
    end

end

class SuperWinStateDoc
    include ServiceStack::DTO

    # @return [String]
    attr_accessor :id
    # @return [SuperWinState]
    attr_accessor :state
    # @return [String]
    attr_accessor :change_vector

    def self.properties
        {
            id: { name: 'id' },
            state: { name: 'state', type: SuperWinState },
            change_vector: { name: 'changeVector' },
        }
    end

end

class GetSuperWinAccumulations
    include ServiceStack::DTO

    def response_type() = SuperWinStateDoc
    def get_type_name() = 'GetSuperWinAccumulations'
end

class RecordDictionary < Hash
end

class RecordList < Array
end

Ruby GetSuperWinAccumulations 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 /qry/super-win/accumulations HTTP/1.1 
Host: s4w2.api.bettor.webhop.biz 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<GetSuperWinAccumulations xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Six4Win.WebApi.ServiceModel" />
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<SuperWinStateDoc xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Six4Win.ReadModel">
  <ChangeVector>String</ChangeVector>
  <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>
</SuperWinStateDoc>