Class: PaymentsApi::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/payments_api/configuration.rb', line 13

def initialize
  @api_root = 'https://publicapi.payments.service.gov.uk'

  @open_timeout = 10   # connection timeout in seconds
  @read_timeout = 20   # read timeout in seconds

  @request_headers = {
    'User-Agent' => "govuk-pay-ruby-client v#{PaymentsApi::VERSION}",
    'Content-Type' => 'application/json',
    'Accept' => 'application/json'
  }.freeze

  @http_client_class = PaymentsApi::HttpClient
end

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



5
6
7
# File 'lib/payments_api/configuration.rb', line 5

def api_key
  @api_key
end

#api_rootObject

Returns the value of attribute api_root.



5
6
7
# File 'lib/payments_api/configuration.rb', line 5

def api_root
  @api_root
end

#http_client_classObject

Returns the value of attribute http_client_class.



5
6
7
# File 'lib/payments_api/configuration.rb', line 5

def http_client_class
  @http_client_class
end

#loggerObject

Returns the value of attribute logger.



5
6
7
# File 'lib/payments_api/configuration.rb', line 5

def logger
  @logger
end

#open_timeoutObject

Returns the value of attribute open_timeout.



5
6
7
# File 'lib/payments_api/configuration.rb', line 5

def open_timeout
  @open_timeout
end

#read_timeoutObject

Returns the value of attribute read_timeout.



5
6
7
# File 'lib/payments_api/configuration.rb', line 5

def read_timeout
  @read_timeout
end

#request_headersObject

Returns the value of attribute request_headers.



5
6
7
# File 'lib/payments_api/configuration.rb', line 5

def request_headers
  @request_headers
end