Class: Jbr::Account
Overview
The Jobber account a set of credentials belongs to.
Direct Known Subclasses
Constant Summary collapse
- FIND =
The query that reads the account behind the current credentials.
<<~GRAPHQL { account { id } } GRAPHQL
Instance Method Summary collapse
-
#id ⇒ String
The account ID, read once and remembered.
Methods inherited from Resource
Constructor Details
This class inherits a constructor from Jbr::Resource
Instance Method Details
#id ⇒ String
Returns the account ID, read once and remembered.
10 11 12 |
# File 'lib/jbr/account.rb', line 10 def id @id ||= @oauth.query(FIND).dig 'account', 'id' end |