Sha256: 2edb77e18f3247c3afb5e2cb9d7620ee9fdfcf97e8ae7b615cec3f37767768c4

Contents?: true

Size: 1.47 KB

Versions: 1

Compression:

Stored size: 1.47 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 StackOne
  extend T::Sig


  SERVERS = [
    'https://api.stackone.com', 
  ].freeze
  # Contains the list of servers available to the SDK

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

    field :client, T.nilable(Faraday::Connection)
    field :security, Shared::Security
    field :server_url, T.nilable(String)
    field :server, 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_idx = server_idx.nil? ? 0 : server_idx
      @language = 'ruby'
      @openapi_doc_version = '1.0.0'
      @sdk_version = '0.0.2'
      @gen_version = '2.237.2'
      @user_agent = 'speakeasy-sdk/ruby 0.0.2 2.237.2 1.0.0 stackone_client'
    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
stackone_client-0.0.2 lib/stackone/sdkconfiguration.rb