Six4Win.WebApi

<back to all web services

ConfigureLocalCodePot

Requires Authentication
The following routes are available for this service:
POST/cmd/configure/lcp
# 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 ConfigureLocalCodePot
    include ServiceStack::DTO

    # @return [String]
    attr_accessor :id
    # @return [String]
    attr_accessor :scope_id
    # @return [String]
    attr_accessor :scope_name
    # @return [LCPConfiguration]
    attr_accessor :configuration

    def self.properties
        {
            id: { name: 'id' },
            scope_id: { name: 'scopeId' },
            scope_name: { name: 'scopeName' },
            configuration: { name: 'configuration', type: LCPConfiguration },
        }
    end

    def response_type() = ServiceStack::ResponseStatus
    def get_type_name() = 'ConfigureLocalCodePot'
end

Ruby ConfigureLocalCodePot DTOs

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

HTTP + CSV

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

POST /cmd/configure/lcp HTTP/1.1 
Host: s4w1.api.bettor.webhop.biz 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"id":"String","scopeId":"String","scopeName":"String","configuration":{"isActive":false,"interval":{"start":0,"end":0},"pct":0}}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}