Sha256: c3a85d8de9b61f68c35b8ff25ab3489f70cec6e321024d9629aac648225094e0

Contents?: true

Size: 1.49 KB

Versions: 1

Compression:

Stored size: 1.49 KB

Contents

# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.

# typed: true
# frozen_string_literal: true

require 'faraday'
require 'faraday/multipart'
require 'sorbet-runtime'

module DingSDK
  extend T::Sig


  SERVERS = [
    'https://api.ding.live/v1', # 1 - The production Ding API server
  ].freeze
  # Contains the list of servers available to the SDK

  class SDKConfiguration < ::DingSDK::Utils::FieldAugmented
    extend T::Sig

    field :client, T.nilable(Faraday::Connection)
    field :security, Shared::Security
    field :server_url, T.nilable(String)
    field :language, String
    field :openapi_doc_version, String
    field :sdk_version, String
    field :gen_version, String
    field :user_agent, String
  
    
    sig { params(client: Faraday::Connection, security: T.nilable(Shared::Security), server_url: T.nilable(String), server_idx: T.nilable(Integer)).void }
    def initialize(client, security, server_url, server_idx)
      @client = client
      @server_url = server_url
      @server_idx = server_idx.nil? ? 0 : server_idx
      @language = 'ruby'
      @openapi_doc_version = '1.0.0'
      @sdk_version = '0.8.0'
      @gen_version = '2.263.3'
      @user_agent = 'speakeasy-sdk/ruby 0.8.0 2.263.3 1.0.0 ding_sdk'
    end

    sig { returns([String, T::Hash[Symbol, String]]) }
    def get_server_details
      return [@server_url.delete_suffix('/'), {}] if !@server_url.nil?
      @server_idx = 0 if @server_idx.nil?
          

      [SERVERS[@server_idx], {}]
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ding_sdk-0.8.0 lib/ding_sdk/sdkconfiguration.rb