Class: PaypalServerSdk::ProxySettings
- Inherits:
-
CoreLibrary::ProxySettings
- Object
- CoreLibrary::ProxySettings
- PaypalServerSdk::ProxySettings
- Defined in:
- lib/paypal_server_sdk/http/proxy_settings.rb
Overview
ProxySettings encapsulates HTTP proxy configuration for Faraday, including optional basic authentication.
Class Method Summary collapse
Class Method Details
.from_env ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/paypal_server_sdk/http/proxy_settings.rb', line 12 def self.from_env address = ENV['PROXY_ADDRESS'] port = ENV['PROXY_PORT'] username = ENV['PROXY_USERNAME'] password = ENV['PROXY_PASSWORD'] return nil if address.nil? || address.strip.empty? new(address: address, port: port, username: username, password: password) end |