| All Verbs | /qry/lcp/configs |
|---|
# 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 Configuration
include ServiceStack::DTO
# @return [String]
attr_accessor :id
# @return [String]
attr_accessor :name
# @return [LCPConfiguration]
attr_accessor :cfg
def self.properties
{
id: { name: 'id' },
name: { name: 'name' },
cfg: { name: 'cfg', type: LCPConfiguration },
}
end
end
class LocalCodePotConfigurations
include ServiceStack::DTO
# @return [String]
attr_accessor :id
# @return [Dictionary]
attr_accessor :configurations
def self.properties
{
id: { name: 'id' },
configurations: { name: 'configurations', type: { String => Configuration } },
}
end
end
class GetLocalCodePotConfigs
include ServiceStack::DTO
def response_type() = LocalCodePotConfigurations
def get_type_name() = 'GetLocalCodePotConfigs'
end
Ruby GetLocalCodePotConfigs DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /qry/lcp/configs HTTP/1.1
Host: s4w2.api.bettor.webhop.biz
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"id":"String","configurations":{"String":{"id":"String","name":"String","cfg":{"isActive":false,"interval":{"start":0,"end":0},"pct":0}}}}