Method: ChartMogul::Client#initialize
- Defined in:
- lib/chart_mogul/client.rb
#initialize(options = {}) ⇒ Client
Public: Initialize a new ChartMogul::Client.
options - A Hash of options used to initialize the client (default: {}):
:account_token - The Account Token assigned to your account
(default: ENV["CHART_MOGUL_ACCOUNT_TOKEN"]).
:secret_key - The Secret key assigned to your account
(default: ENV["CHART_MOGUL_SECRET_KEY"]).
21 22 23 24 |
# File 'lib/chart_mogul/client.rb', line 21 def initialize(={}) @account_token = .fetch(:account_token, ENV["CHART_MOGUL_ACCOUNT_TOKEN"]) @secret_key = .fetch(:secret_key, ENV["CHART_MOGUL_SECRET_KEY"]) end |