Six4Win.WebApi

<back to all web services

GetGlobalCodePotConfiguration

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


require 'json'
require 'servicestack'


class ThresholdInterval
    include ServiceStack::DTO

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

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

end

class GCPWinnerCooldownPolicyConfig
    include ServiceStack::DTO

    # @return [TrueClass]
    attr_accessor :is_active
    # @return [Integer]
    attr_accessor :cooldown_interval_in_days

    def self.properties
        {
            is_active: { name: 'isActive' },
            cooldown_interval_in_days: { name: 'cooldownIntervalInDays' },
        }
    end

end

class GCPConfiguration
    include ServiceStack::DTO

    # @return [TrueClass]
    attr_accessor :is_active
    # @return [ThresholdInterval]
    attr_accessor :interval
    # @return [BigDecimal]
    attr_accessor :pct
    # @return [BigDecimal]
    attr_accessor :reserve_pct
    # @return [BigDecimal]
    attr_accessor :total_pct
    # @return [GCPWinnerCooldownPolicyConfig]
    attr_accessor :winner_cooldown_policy

    def self.properties
        {
            is_active: { name: 'isActive' },
            interval: { name: 'interval', type: ThresholdInterval },
            pct: { name: 'pct' },
            reserve_pct: { name: 'reservePct' },
            total_pct: { name: 'totalPct' },
            winner_cooldown_policy: { name: 'winnerCooldownPolicy', type: GCPWinnerCooldownPolicyConfig },
        }
    end

end

class GlobalCodePotConfigurations
    include ServiceStack::DTO

    # @return [String]
    attr_accessor :id
    # @return [GCPConfiguration]
    attr_accessor :cfg

    def self.properties
        {
            id: { name: 'id' },
            cfg: { name: 'cfg', type: GCPConfiguration },
        }
    end

end

class GetGlobalCodePotConfiguration
    include ServiceStack::DTO

    def response_type() = GlobalCodePotConfigurations
    def get_type_name() = 'GetGlobalCodePotConfiguration'
end

Ruby GetGlobalCodePotConfiguration DTOs

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

HTTP + JSV

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

POST /qry/global-code-pot/config HTTP/1.1 
Host: s4w2.api.bettor.webhop.biz 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	id: String,
	cfg: 
	{
		isActive: False,
		interval: 
		{
			start: 0,
			end: 0
		},
		pct: 0,
		reservePct: 0,
		totalPct: 0,
		winnerCooldownPolicy: 
		{
			isActive: False,
			cooldownIntervalInDays: 0
		}
	}
}