Class: MangoPay::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#client_apiKeyObject

Returns the value of attribute client_apiKey.



58
59
60
# File 'lib/mangopay.rb', line 58

def client_apiKey
  @client_apiKey
end

#client_idObject

Returns the value of attribute client_id.



58
59
60
# File 'lib/mangopay.rb', line 58

def client_id
  @client_id
end

#http_max_retriesObject

Returns the value of attribute http_max_retries.



58
59
60
# File 'lib/mangopay.rb', line 58

def http_max_retries
  @http_max_retries
end

#http_open_timeoutObject

Returns the value of attribute http_open_timeout.



58
59
60
# File 'lib/mangopay.rb', line 58

def http_open_timeout
  @http_open_timeout
end

#http_timeoutObject

Returns the value of attribute http_timeout.



58
59
60
# File 'lib/mangopay.rb', line 58

def http_timeout
  @http_timeout
end

#log_fileObject

Returns the value of attribute log_file.



58
59
60
# File 'lib/mangopay.rb', line 58

def log_file
  @log_file
end

#log_trace_headersObject

Returns the value of attribute log_trace_headers.



58
59
60
# File 'lib/mangopay.rb', line 58

def log_trace_headers
  @log_trace_headers
end

#loggerObject

Returns the value of attribute logger.



58
59
60
# File 'lib/mangopay.rb', line 58

def logger
  @logger
end

#preproductionObject

Returns the value of attribute preproduction.



58
59
60
# File 'lib/mangopay.rb', line 58

def preproduction
  @preproduction
end

#root_urlObject

Returns the value of attribute root_url.



58
59
60
# File 'lib/mangopay.rb', line 58

def root_url
  @root_url
end

#temp_dirObject

Returns the value of attribute temp_dir.



58
59
60
# File 'lib/mangopay.rb', line 58

def temp_dir
  @temp_dir
end

#uk_header_flagObject

Returns the value of attribute uk_header_flag.



58
59
60
# File 'lib/mangopay.rb', line 58

def uk_header_flag
  @uk_header_flag
end

#use_sslObject

Returns the value of attribute use_ssl.



58
59
60
# File 'lib/mangopay.rb', line 58

def use_ssl
  @use_ssl
end

Instance Method Details

#apply_configurationObject



64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/mangopay.rb', line 64

def apply_configuration
  MangoPay.configure do |config|
    config.preproduction = @preproduction
    config.client_id = @client_id
    config.client_apiKey = @client_apiKey
    config.log_file = @log_file
    config.log_trace_headers = @log_trace_headers
    config.http_timeout = @http_timeout
    config.http_max_retries = @http_max_retries
    config.http_open_timeout = @http_open_timeout
    config.use_ssl = @use_ssl
    config.logger = @logger
    config.uk_header_flag = @uk_header_flag
  end
end

#use_ssl?Boolean

Returns:

  • (Boolean)


100
101
102
103
104
105
106
# File 'lib/mangopay.rb', line 100

def use_ssl?
  return true unless preproduction == true
  return true unless defined?(@use_ssl)
  return false if @use_ssl == false

  true
end