| All Verbs | /qry/lcp/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 LCPConfiguration
include ServiceStack::DTO
# @return [TrueClass]
attr_accessor :is_active
# @return [ThresholdInterval]
attr_accessor :interval
# @return [BigDecimal]
attr_accessor :pct
def self.properties
{
is_active: { name: 'isActive' },
interval: { name: 'interval', type: ThresholdInterval },
pct: { name: 'pct' },
}
end
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 WinnerByCode
include ServiceStack::DTO
# @return [String]
attr_accessor :round_id
# @return [DateTime]
attr_accessor :drawn_at_utc
# @return [String]
attr_accessor :slip_id
# @return [String]
attr_accessor :bet_id
# @return [String]
attr_accessor :code
# @return [BigDecimal]
attr_accessor :amount
# @return [Origin]
attr_accessor :origin
# @return [Ref]
attr_accessor :bettor
# @return [String]
attr_accessor :location_address_or_bettor_info
def self.properties
{
round_id: { name: 'roundId' },
drawn_at_utc: { name: 'drawnAtUtc', type: DateTime },
slip_id: { name: 'slipId' },
bet_id: { name: 'betId' },
code: { name: 'code' },
amount: { name: 'amount' },
origin: { name: 'origin', type: Origin },
bettor: { name: 'bettor', type: Ref },
location_address_or_bettor_info: { name: 'locationAddressOrBettorInfo' },
}
end
end
class LCPAccumulation
include ServiceStack::DTO
# @return [String]
attr_accessor :loc_id
# @return [String]
attr_accessor :loc_name
# @return [BigDecimal]
attr_accessor :amount
# @return [BigDecimal]
attr_accessor :threshold
# @return [LCPConfiguration]
attr_accessor :cfg
# @return [Queue]
attr_accessor :winners
def self.properties
{
loc_id: { name: 'locId' },
loc_name: { name: 'locName' },
amount: { name: 'amount' },
threshold: { name: 'threshold' },
cfg: { name: 'cfg', type: LCPConfiguration },
winners: { name: 'winners', type: [WinnerByCode] },
}
end
end
class LocalCodePotAccumulations
include ServiceStack::DTO
# @return [String]
attr_accessor :id
# @return [Dictionary]
attr_accessor :accumulations
# @return [String]
attr_accessor :current_round_id
# @return [String]
attr_accessor :inert_code
def self.properties
{
id: { name: 'id' },
accumulations: { name: 'accumulations', type: { String => LCPAccumulation } },
current_round_id: { name: 'currentRoundId' },
inert_code: { name: 'inertCode' },
}
end
end
class GetLocalCodePotAccumulations
include ServiceStack::DTO
def response_type() = LocalCodePotAccumulations
def get_type_name() = 'GetLocalCodePotAccumulations'
end
class RecordDictionary < Hash
end
Ruby GetLocalCodePotAccumulations 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/lcp/accumulations HTTP/1.1
Host: s4w2.api.bettor.webhop.biz
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<GetLocalCodePotAccumulations 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
<LocalCodePotAccumulations xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Six4Win.ReadModel">
<Accumulations xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:KeyValueOfstringLCPAccumulationQC5r2uXE>
<d2p1:Key>String</d2p1:Key>
<d2p1:Value xmlns:d4p1="http://schemas.datacontract.org/2004/07/Six4Win">
<d4p1:Amount>0</d4p1:Amount>
<d4p1:Cfg>
<d4p1:Interval>
<d4p1:End>0</d4p1:End>
<d4p1:Start>0</d4p1:Start>
</d4p1:Interval>
<d4p1:IsActive>false</d4p1:IsActive>
<d4p1:Pct>0</d4p1:Pct>
</d4p1:Cfg>
<d4p1:LocId>String</d4p1:LocId>
<d4p1:LocName>String</d4p1:LocName>
<d4p1:Threshold>0</d4p1:Threshold>
<d4p1:Winners xmlns:d5p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
<d5p1:_array />
<d5p1:_head>0</d5p1:_head>
<d5p1:_size>0</d5p1:_size>
<d5p1:_tail>0</d5p1:_tail>
<d5p1:_version>0</d5p1:_version>
</d4p1:Winners>
</d2p1:Value>
</d2p1:KeyValueOfstringLCPAccumulationQC5r2uXE>
</Accumulations>
<CurrentRoundId>String</CurrentRoundId>
<Id>String</Id>
<InertCode>String</InertCode>
</LocalCodePotAccumulations>