Class: ModernPricing::Client
- Inherits:
-
Object
- Object
- ModernPricing::Client
- Includes:
- HTTParty, Connection, Scores
- Defined in:
- lib/modern-pricing/client.rb,
lib/modern-pricing/client/scores.rb,
lib/modern-pricing/client/connection.rb
Defined Under Namespace
Modules: Connection, Scores
Instance Method Summary collapse
-
#initialize(access_token = nil) ⇒ Client
constructor
A new instance of Client.
Methods included from Scores
Methods included from Connection
Constructor Details
#initialize(access_token = nil) ⇒ Client
Returns a new instance of Client.
14 15 16 17 |
# File 'lib/modern-pricing/client.rb', line 14 def initialize(access_token = nil) access_token ||= ENV["MODERN_PRICING_API_KEY"] self.class..merge!(headers: { 'Authorization' => "Token #{access_token}" }) end |