| All Verbs | /qry/global-code-pot/accumulations |
|---|
# 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 GCPAccumulation
include ServiceStack::DTO
# @return [BigDecimal]
attr_accessor :amount
# @return [BigDecimal]
attr_accessor :reserve_amount
# @return [GCPConfiguration]
attr_accessor :cfg
def self.properties
{
amount: { name: 'amount' },
reserve_amount: { name: 'reserveAmount' },
cfg: { name: 'cfg', type: GCPConfiguration },
}
end
end
class GlobalCodePotAccumulations
include ServiceStack::DTO
# @return [String]
attr_accessor :id
# @return [GCPAccumulation]
attr_accessor :accumulation
# @return [String]
attr_accessor :current_round_id
def self.properties
{
id: { name: 'id' },
accumulation: { name: 'accumulation', type: GCPAccumulation },
current_round_id: { name: 'currentRoundId' },
}
end
end
class GetGlobalCodePotAccumulation
include ServiceStack::DTO
def response_type() = GlobalCodePotAccumulations
def get_type_name() = 'GetGlobalCodePotAccumulation'
end
Ruby GetGlobalCodePotAccumulation DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /qry/global-code-pot/accumulations HTTP/1.1
Host: s4w1.api.bettor.webhop.biz
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<GetGlobalCodePotAccumulation 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
<GlobalCodePotAccumulations xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Six4Win.ReadModel">
<Accumulation xmlns:d2p1="http://schemas.datacontract.org/2004/07/Six4Win">
<d2p1:Amount>0</d2p1:Amount>
<d2p1:Cfg>
<d2p1:Interval>
<d2p1:End>0</d2p1:End>
<d2p1:Start>0</d2p1:Start>
</d2p1:Interval>
<d2p1:IsActive>false</d2p1:IsActive>
<d2p1:Pct>0</d2p1:Pct>
<d2p1:ReservePct>0</d2p1:ReservePct>
<d2p1:WinnerCooldownPolicy>
<d2p1:CooldownIntervalInDays>0</d2p1:CooldownIntervalInDays>
<d2p1:IsActive>false</d2p1:IsActive>
</d2p1:WinnerCooldownPolicy>
</d2p1:Cfg>
<d2p1:ReserveAmount>0</d2p1:ReserveAmount>
</Accumulation>
<CurrentRoundId>String</CurrentRoundId>
<Id>String</Id>
</GlobalCodePotAccumulations>