Class: HelpScout::API::Client
- Inherits:
-
Object
- Object
- HelpScout::API::Client
- Defined in:
- lib/help_scout/api/client.rb
Instance Attribute Summary collapse
-
#authorize ⇒ Object
readonly
Returns the value of attribute authorize.
Instance Method Summary collapse
- #connection ⇒ Object
-
#initialize(authorize: true) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(authorize: true) ⇒ Client
Returns a new instance of Client.
8 9 10 |
# File 'lib/help_scout/api/client.rb', line 8 def initialize(authorize: true) @authorize = end |
Instance Attribute Details
#authorize ⇒ Object (readonly)
Returns the value of attribute authorize.
6 7 8 |
# File 'lib/help_scout/api/client.rb', line 6 def @authorize end |
Instance Method Details
#connection ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/help_scout/api/client.rb', line 12 def connection @_connection ||= build_connection.tap do |conn| if HelpScout::API::AccessToken.refresh! conn.request(:authorization, 'Bearer', access_token) if access_token end end end |