Sha256: f31ce36924c83816025cbd1d65e55388b7bd3649cbc9820705096147ad76c7ac

Contents?: true

Size: 1.77 KB

Versions: 9

Compression:

Stored size: 1.77 KB

Contents

# bandwidth
#
# This file was automatically generated by APIMATIC v2.0
# ( https://apimatic.io ).

module Bandwidth
  #  bandwidth client class.
  class Client
    attr_reader :config
    # Access to messaging_client controller.
    # @return [Messaging::Client] Returns the client instance.
    def messaging_client
      @messaging_client ||= Messaging::Client.new(config: config)
    end
    # Access to voice_client controller.
    # @return [Voice::Client] Returns the client instance.
    def voice_client
      @voice_client ||= Voice::Client.new(config: config)
    end

    def initialize(timeout: 60, max_retries: 0, retry_interval: 1,
                   backoff_factor: 1, environment: Environment::PRODUCTION,
                   messaging_basic_auth_user_name: 'TODO: Replace',
                   messaging_basic_auth_password: 'TODO: Replace',
                   voice_basic_auth_user_name: 'TODO: Replace',
                   voice_basic_auth_password: 'TODO: Replace', config: nil)
      @config = if config.nil?
                  Configuration.new(timeout: timeout, max_retries: max_retries,
                                    retry_interval: retry_interval,
                                    backoff_factor: backoff_factor,
                                    environment: environment,
                                    messaging_basic_auth_user_name: messaging_basic_auth_user_name,
                                    messaging_basic_auth_password: messaging_basic_auth_password,
                                    voice_basic_auth_user_name: voice_basic_auth_user_name,
                                    voice_basic_auth_password: voice_basic_auth_password)
                else
                  config
                end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
bandwidth-sdk-3.1.0 lib/bandwidth/client.rb
bandwidth-sdk-3.0.0 lib/bandwidth/client.rb
bandwidth-sdk-2.2.2 lib/bandwidth/client.rb
bandwidth-sdk-2.2.1 lib/bandwidth/client.rb
bandwidth-sdk-2.2.0 lib/bandwidth/client.rb
bandwidth-sdk-2.1.1 lib/bandwidth/client.rb
bandwidth-sdk-2.1.0 lib/bandwidth/client.rb
bandwidth-sdk-2.0.0 lib/bandwidth/client.rb
bandwidth-sdk-1.0.2 lib/bandwidth/client.rb