Class: Paymill::Request::Connection
- Inherits:
-
Object
- Object
- Paymill::Request::Connection
- Includes:
- Helpers
- Defined in:
- lib/paymill/request/connection.rb
Instance Attribute Summary collapse
-
#https ⇒ Object
readonly
Returns the value of attribute https.
Instance Method Summary collapse
-
#initialize(request_info) ⇒ Connection
constructor
A new instance of Connection.
- #request ⇒ Object
- #setup_https ⇒ Object
Methods included from Helpers
#flatten_hash_keys, #normalize_params
Constructor Details
permalink #initialize(request_info) ⇒ Connection
Returns a new instance of Connection.
7 8 9 |
# File 'lib/paymill/request/connection.rb', line 7 def initialize(request_info) @info = request_info end |
Instance Attribute Details
permalink #https ⇒ Object (readonly)
Returns the value of attribute https.
5 6 7 |
# File 'lib/paymill/request/connection.rb', line 5 def https @https end |
Instance Method Details
permalink #request ⇒ Object
[View source]
16 17 18 19 20 21 22 |
# File 'lib/paymill/request/connection.rb', line 16 def request response = https.start do |connection| https.request(https_request) end log_request_info(response) response end |
permalink #setup_https ⇒ Object
[View source]
11 12 13 14 |
# File 'lib/paymill/request/connection.rb', line 11 def setup_https @https = Net::HTTP.new(Paymill.api_base, Paymill.api_port) @https.use_ssl = true end |