Class: RunApi::Core::PricingClient
- Defined in:
- lib/runapi/core/pricing.rb
Overview
Standalone live Pricing client with optional API authentication.
Constant Summary
Constants inherited from Pricing
RunApi::Core::Pricing::QUOTES_ENDPOINT, RunApi::Core::Pricing::SCHEDULES_ENDPOINT
Instance Method Summary collapse
-
#close ⇒ Object
Closes the SDK-created HTTP client.
-
#initialize(api_key: nil, **options) ⇒ PricingClient
constructor
A new instance of PricingClient.
Methods inherited from Pricing
Constructor Details
#initialize(api_key: nil, **options) ⇒ PricingClient
Returns a new instance of PricingClient.
85 86 87 88 89 90 91 92 |
# File 'lib/runapi/core/pricing.rb', line 85 def initialize(api_key: nil, **) = Core::ClientOptions.new( api_key: Core::Auth.resolve_optional_api_key(api_key), ** ) @owns_http_client = .http_client.nil? super(.http_client || Core::HttpClient.new()) end |
Instance Method Details
#close ⇒ Object
Closes the SDK-created HTTP client. Injected clients remain caller-owned.
95 96 97 |
# File 'lib/runapi/core/pricing.rb', line 95 def close @http.close if @owns_http_client end |