Six4Win.WebApi

<back to all web services

GetRoundIntegrity

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


require 'json'
require 'servicestack'


module CheckStatus
    OK = 1
    ERROR = 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 JackPot5Winner
    include ServiceStack::DTO

    # @return [String]
    attr_accessor :bet_id
    # @return [Integer]
    attr_accessor :nr_of_combinations
    # @return [BigDecimal]
    attr_accessor :winnings_amount
    # @return [Origin]
    attr_accessor :origin
    # @return [Ref]
    attr_accessor :bettor
    # @return [Dictionary]
    attr_accessor :payload

    def self.properties
        {
            bet_id: { name: 'betId' },
            nr_of_combinations: { name: 'nrOfCombinations' },
            winnings_amount: { name: 'winningsAmount' },
            origin: { name: 'origin', type: Origin },
            bettor: { name: 'bettor', type: Ref },
            payload: { name: 'payload' },
        }
    end

end

class Jackpot5Info
    include ServiceStack::DTO

    # @return [TrueClass]
    attr_accessor :is_hit
    # @return [BigDecimal]
    attr_accessor :amount_accumulated
    # @return [BigDecimal]
    attr_accessor :amount_awarded
    # @return [Integer]
    attr_accessor :nr_of_winners
    # @return [List]
    attr_accessor :jack_pot5_winners

    def self.properties
        {
            is_hit: { name: 'isHit' },
            amount_accumulated: { name: 'amountAccumulated' },
            amount_awarded: { name: 'amountAwarded' },
            nr_of_winners: { name: 'nrOfWinners' },
            jack_pot5_winners: { name: 'jackPot5Winners', type: [JackPot5Winner] },
        }
    end

end

class RoundIntegrityCheckResult
    include ServiceStack::DTO

    # @return [CheckStatus]
    attr_accessor :status
    # @return [BigDecimal]
    attr_accessor :extra_winnings
    # @return [Integer]
    attr_accessor :bet_count
    # @return [Jackpot5Info]
    attr_accessor :jp_info

    def self.properties
        {
            status: { name: 'status' },
            extra_winnings: { name: 'extraWinnings' },
            bet_count: { name: 'betCount' },
            jp_info: { name: 'jpInfo', type: Jackpot5Info },
        }
    end

end

class GetRoundIntegrity
    include ServiceStack::DTO

    # @return [String]
    attr_accessor :round_id

    def self.properties
        {
            round_id: { name: 'roundId' },
        }
    end

    def response_type() = RoundIntegrityCheckResult
    def get_type_name() = 'GetRoundIntegrity'
end

class RecordDictionary < Hash
end

Ruby GetRoundIntegrity DTOs

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

HTTP + OTHER

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

POST /qry/rounds/integrity HTTP/1.1 
Host: s4w1.api.bettor.webhop.biz 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"roundId":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"status":1,"extraWinnings":0,"betCount":0,"jpInfo":{"isHit":false,"amountAccumulated":0,"amountAwarded":0,"nrOfWinners":0,"jackPot5Winners":[{"betId":"String","nrOfCombinations":0,"winningsAmount":0,"origin":{"application":{"name":"String","version":"String"},"ip":"String","organization":{"data":{"String":"String"},"id":"String","val":"String"},"region":{"id":"String","val":"String"},"locationGroup":{"id":"String","val":"String"},"location":{"data":{"String":"String"},"id":"String","val":"String"},"device":{"data":{"String":"String"},"id":"String","val":"String"},"clerk":{"id":"String","val":"String"}},"bettor":{"id":"String","val":"String"},"payload":{"String":"String"}}]}}