Six4Win.WebApi

<back to all web services

GetGameConfig

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


require 'json'
require 'servicestack'


module RTPStrategies
    RNG = 0
    ACCUMULATOR = 1
end

class CountdownConfiguration
    include ServiceStack::DTO

    # @return [Integer]
    attr_accessor :lockdown_step_from_end
    # @return [Integer]
    attr_accessor :assert_lockdown_step_from_end

    def self.properties
        {
            lockdown_step_from_end: { name: 'lockdownStepFromEnd' },
            assert_lockdown_step_from_end: { name: 'assertLockdownStepFromEnd' },
        }
    end

end

class DrawConfiguration
    include ServiceStack::DTO

    # @return [Integer]
    attr_accessor :intro_interval_in_ms
    # @return [Integer]
    attr_accessor :animation_interval_in_ms
    # @return [Integer]
    attr_accessor :outro_interval_in_ms

    def self.properties
        {
            intro_interval_in_ms: { name: 'introIntervalInMs' },
            animation_interval_in_ms: { name: 'animationIntervalInMs' },
            outro_interval_in_ms: { name: 'outroIntervalInMs' },
        }
    end

end

class HappyHourConfiguration
    include ServiceStack::DTO

    # @return [TrueClass]
    attr_accessor :is_happy_hour
    # @return [BigDecimal]
    attr_accessor :odds_modifier
    # @return [BigDecimal]
    attr_accessor :round_pool_bonus_pct
    # @return [TrueClass]
    attr_accessor :use_only_round_pool_with_no_optimizations
    # @return [TrueClass]
    attr_accessor :override_syphon_combination_count_per_round_threshold
    # @return [BigDecimal]
    attr_accessor :syphon_combination_count_per_round_threshold_pct_override

    def self.properties
        {
            is_happy_hour: { name: 'isHappyHour' },
            odds_modifier: { name: 'oddsModifier' },
            round_pool_bonus_pct: { name: 'roundPoolBonusPct' },
            use_only_round_pool_with_no_optimizations: { name: 'useOnlyRoundPoolWithNoOptimizations' },
            override_syphon_combination_count_per_round_threshold: { name: 'overrideSyphonCombinationCountPerRoundThreshold' },
            syphon_combination_count_per_round_threshold_pct_override: { name: 'syphonCombinationCountPerRoundThresholdPctOverride' },
        }
    end

end

class RoundConfiguration
    include ServiceStack::DTO

    # @return [RecordList]
    attr_accessor :coefficients
    # @return [TrueClass]
    attr_accessor :is_double_triple_active
    # @return [TrueClass]
    attr_accessor :is_jackpot5_active
    # @return [Integer]
    attr_accessor :countdown_duration_in_seconds
    # @return [CountdownConfiguration]
    attr_accessor :countdown_configuration
    # @return [DrawConfiguration]
    attr_accessor :draw_configuration
    # @return [Integer]
    attr_accessor :results_duration_in_seconds
    # @return [RTPStrategies]
    attr_accessor :rtp_strategy
    # @return [HappyHourConfiguration]
    attr_accessor :happy_hour_configuration

    def self.properties
        {
            coefficients: { name: 'coefficients', type: RecordList },
            is_double_triple_active: { name: 'isDoubleTripleActive' },
            is_jackpot5_active: { name: 'isJackpot5Active' },
            countdown_duration_in_seconds: { name: 'countdownDurationInSeconds' },
            countdown_configuration: { name: 'countdownConfiguration', type: CountdownConfiguration },
            draw_configuration: { name: 'drawConfiguration', type: DrawConfiguration },
            results_duration_in_seconds: { name: 'resultsDurationInSeconds' },
            rtp_strategy: { name: 'rtpStrategy' },
            happy_hour_configuration: { name: 'happyHourConfiguration', type: HappyHourConfiguration },
        }
    end

end

class TimePoint
    include ServiceStack::DTO

    # @return [Integer]
    attr_accessor :hour
    # @return [Integer]
    attr_accessor :minute

    def self.properties
        {
            hour: { name: 'hour' },
            minute: { name: 'minute' },
        }
    end

end

class TimeInterval
    include ServiceStack::DTO

    # @return [TimePoint]
    attr_accessor :start
    # @return [TimePoint]
    attr_accessor :end

    def self.properties
        {
            start: { name: 'start', type: TimePoint },
            end: { name: 'end', type: TimePoint },
        }
    end

end

class HappyHourItem
    include ServiceStack::DTO

    # @return [Integer]
    attr_accessor :id
    # @return [TimeInterval]
    attr_accessor :interval
    # @return [BigDecimal]
    attr_accessor :odds_modifier
    # @return [BigDecimal]
    attr_accessor :round_pool_bonus_pct

    def self.properties
        {
            id: { name: 'id' },
            interval: { name: 'interval', type: TimeInterval },
            odds_modifier: { name: 'oddsModifier' },
            round_pool_bonus_pct: { name: 'roundPoolBonusPct' },
        }
    end

end

class HappyHourConfig
    include ServiceStack::DTO

    # @return [TrueClass]
    attr_accessor :is_active
    # @return [List]
    attr_accessor :items
    # @return [TrueClass]
    attr_accessor :use_only_round_pool_with_no_optimizations
    # @return [TrueClass]
    attr_accessor :override_syphon_combination_count_per_round_threshold
    # @return [BigDecimal]
    attr_accessor :syphon_combination_count_per_round_threshold_pct_override

    def self.properties
        {
            is_active: { name: 'isActive' },
            items: { name: 'items', type: [HappyHourItem] },
            use_only_round_pool_with_no_optimizations: { name: 'useOnlyRoundPoolWithNoOptimizations' },
            override_syphon_combination_count_per_round_threshold: { name: 'overrideSyphonCombinationCountPerRoundThreshold' },
            syphon_combination_count_per_round_threshold_pct_override: { name: 'syphonCombinationCountPerRoundThresholdPctOverride' },
        }
    end

end

class GameConfiguration
    include ServiceStack::DTO

    # @return [String]
    attr_accessor :id
    # @return [Integer]
    attr_accessor :queue_size
    # @return [RoundConfiguration]
    attr_accessor :round_configuration
    # @return [HappyHourConfig]
    attr_accessor :happy_hour_config

    def self.properties
        {
            id: { name: 'id' },
            queue_size: { name: 'queueSize' },
            round_configuration: { name: 'roundConfiguration', type: RoundConfiguration },
            happy_hour_config: { name: 'happyHourConfig', type: HappyHourConfig },
        }
    end

end

class GetGameConfig
    include ServiceStack::DTO

    # @return [String]
    attr_accessor :location_id

    def self.properties
        {
            location_id: { name: 'locationId' },
        }
    end

    def response_type() = GameConfiguration
    def get_type_name() = 'GetGameConfig'
end

class RecordList < Array
end

Ruby GetGameConfig 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/config/game HTTP/1.1 
Host: s4w1.api.bettor.webhop.biz 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

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

<GameConfiguration xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Six4Win.ReadModel">
  <HappyHourConfig xmlns:d2p1="http://schemas.datacontract.org/2004/07/Six4Win">
    <d2p1:IsActive>false</d2p1:IsActive>
    <d2p1:Items>
      <d2p1:HappyHourConfig.HappyHourItem>
        <d2p1:Id>0</d2p1:Id>
        <d2p1:Interval>
          <d2p1:End>
            <d2p1:Hour>0</d2p1:Hour>
            <d2p1:Minute>0</d2p1:Minute>
          </d2p1:End>
          <d2p1:Start>
            <d2p1:Hour>0</d2p1:Hour>
            <d2p1:Minute>0</d2p1:Minute>
          </d2p1:Start>
        </d2p1:Interval>
        <d2p1:OddsModifier>0</d2p1:OddsModifier>
        <d2p1:RoundPoolBonusPct>0</d2p1:RoundPoolBonusPct>
      </d2p1:HappyHourConfig.HappyHourItem>
    </d2p1:Items>
    <d2p1:OverrideSyphonCombinationCountPerRoundThreshold>false</d2p1:OverrideSyphonCombinationCountPerRoundThreshold>
    <d2p1:SyphonCombinationCountPerRoundThresholdPctOverride>0</d2p1:SyphonCombinationCountPerRoundThresholdPctOverride>
    <d2p1:UseOnlyRoundPoolWithNoOptimizations>false</d2p1:UseOnlyRoundPoolWithNoOptimizations>
  </HappyHourConfig>
  <Id>String</Id>
  <QueueSize>0</QueueSize>
  <RoundConfiguration xmlns:d2p1="http://schemas.datacontract.org/2004/07/Six4Win">
    <d2p1:Coefficients xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:float>0</d3p1:float>
    </d2p1:Coefficients>
    <d2p1:CountdownConfiguration>
      <d2p1:AssertLockdownStepFromEnd>0</d2p1:AssertLockdownStepFromEnd>
      <d2p1:LockdownStepFromEnd>0</d2p1:LockdownStepFromEnd>
    </d2p1:CountdownConfiguration>
    <d2p1:CountdownDurationInSeconds>0</d2p1:CountdownDurationInSeconds>
    <d2p1:DrawConfiguration>
      <d2p1:AnimationIntervalInMs>0</d2p1:AnimationIntervalInMs>
      <d2p1:IntroIntervalInMs>0</d2p1:IntroIntervalInMs>
      <d2p1:OutroIntervalInMs>0</d2p1:OutroIntervalInMs>
    </d2p1:DrawConfiguration>
    <d2p1:HappyHourConfiguration>
      <d2p1:IsHappyHour>false</d2p1:IsHappyHour>
      <d2p1:OddsModifier>0</d2p1:OddsModifier>
      <d2p1:OverrideSyphonCombinationCountPerRoundThreshold>false</d2p1:OverrideSyphonCombinationCountPerRoundThreshold>
      <d2p1:RoundPoolBonusPct>0</d2p1:RoundPoolBonusPct>
      <d2p1:SyphonCombinationCountPerRoundThresholdPctOverride>0</d2p1:SyphonCombinationCountPerRoundThresholdPctOverride>
      <d2p1:UseOnlyRoundPoolWithNoOptimizations>false</d2p1:UseOnlyRoundPoolWithNoOptimizations>
    </d2p1:HappyHourConfiguration>
    <d2p1:IsDoubleTripleActive>false</d2p1:IsDoubleTripleActive>
    <d2p1:IsJackpot5Active>false</d2p1:IsJackpot5Active>
    <d2p1:RTPStrategy>RNG</d2p1:RTPStrategy>
    <d2p1:ResultsDurationInSeconds>0</d2p1:ResultsDurationInSeconds>
  </RoundConfiguration>
</GameConfiguration>