Class: Paypal::REST::Connection
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Paypal::REST::Connection
- Defined in:
- lib/paypal/rest/connection.rb
Instance Method Summary collapse
-
#initialize(&block) ⇒ Connection
constructor
A new instance of Connection.
Constructor Details
#initialize(&block) ⇒ Connection
Returns a new instance of Connection.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/paypal/rest/connection.rb', line 8 def initialize(&block) connection = Faraday.new(url: config.api_endpoint) do |faraday| faraday.request :retry faraday.response :logger, logger, bodies: config.log_response_bodies block.call(faraday) if Util.present?(block) end super(connection) end |