Class: Commercelayer::Client
- Inherits:
-
Object
- Object
- Commercelayer::Client
- Defined in:
- lib/commercelayer/client.rb
Constant Summary collapse
- MAX_RETRIES =
1
Instance Method Summary collapse
- #authorize! ⇒ Object
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
8 9 10 11 12 13 14 |
# File 'lib/commercelayer/client.rb', line 8 def initialize(={}) @client_id = [:client_id] @client_secret = [:client_secret] @scope = [:scope] @site = [:site] Resource.site = "#{options[:site]}/api/" end |
Instance Method Details
#authorize! ⇒ Object
16 17 18 |
# File 'lib/commercelayer/client.rb', line 16 def Resource. = get_access_token end |