Class: AliyunIntelligentCaptcha::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/aliyun_intelligent_captcha/configuration.rb

Constant Summary collapse

DEFAULT_ENDPOINT =
"captcha.cn-shanghai.aliyuncs.com"
DEFAULT_API_VERSION =
"2023-03-05"
DEFAULT_OPEN_TIMEOUT =
2
DEFAULT_READ_TIMEOUT =
5

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



19
20
21
22
23
24
# File 'lib/aliyun_intelligent_captcha/configuration.rb', line 19

def initialize
  @endpoint = DEFAULT_ENDPOINT
  @api_version = DEFAULT_API_VERSION
  @open_timeout = DEFAULT_OPEN_TIMEOUT
  @read_timeout = DEFAULT_READ_TIMEOUT
end

Instance Attribute Details

#access_key_idObject

Returns the value of attribute access_key_id.



10
11
12
# File 'lib/aliyun_intelligent_captcha/configuration.rb', line 10

def access_key_id
  @access_key_id
end

#access_key_secretObject

Returns the value of attribute access_key_secret.



10
11
12
# File 'lib/aliyun_intelligent_captcha/configuration.rb', line 10

def access_key_secret
  @access_key_secret
end

#api_versionObject

Returns the value of attribute api_version.



10
11
12
# File 'lib/aliyun_intelligent_captcha/configuration.rb', line 10

def api_version
  @api_version
end

#endpointObject

Returns the value of attribute endpoint.



10
11
12
# File 'lib/aliyun_intelligent_captcha/configuration.rb', line 10

def endpoint
  @endpoint
end

#loggerObject

Returns the value of attribute logger.



10
11
12
# File 'lib/aliyun_intelligent_captcha/configuration.rb', line 10

def logger
  @logger
end

#open_timeoutObject

Returns the value of attribute open_timeout.



10
11
12
# File 'lib/aliyun_intelligent_captcha/configuration.rb', line 10

def open_timeout
  @open_timeout
end

#read_timeoutObject

Returns the value of attribute read_timeout.



10
11
12
# File 'lib/aliyun_intelligent_captcha/configuration.rb', line 10

def read_timeout
  @read_timeout
end

#scene_idObject

Returns the value of attribute scene_id.



10
11
12
# File 'lib/aliyun_intelligent_captcha/configuration.rb', line 10

def scene_id
  @scene_id
end

Instance Method Details

#to_hObject



26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/aliyun_intelligent_captcha/configuration.rb', line 26

def to_h
  {
    access_key_id: access_key_id,
    access_key_secret: access_key_secret,
    endpoint: endpoint,
    api_version: api_version,
    scene_id: scene_id,
    open_timeout: open_timeout,
    read_timeout: read_timeout,
    logger: logger
  }
end