Class: ModernPricing::Client

Inherits:
Object
  • Object
show all
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

Methods included from Scores

#scores

Methods included from Connection

#delete, #get, #post, #put

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.default_options.merge!(headers: { 'Authorization' => "Token #{access_token}" })
end