Class: Printavo::Resources::Account
- Defined in:
- lib/printavo/resources/account.rb
Overview
Singleton resource — Printavo exposes one account per API credential.
Use client.account.find (no ID argument required).
Constant Summary collapse
- FIND_QUERY =
File.read(File.join(__dir__, '../graphql/account/find.graphql')).freeze
Instance Method Summary collapse
-
#find ⇒ Printavo::Account
Returns the account associated with the current API credentials.
Methods inherited from Base
#all_pages, #each_page, #initialize
Constructor Details
This class inherits a constructor from Printavo::Resources::Base
Instance Method Details
#find ⇒ Printavo::Account
Returns the account associated with the current API credentials.
19 20 21 22 |
# File 'lib/printavo/resources/account.rb', line 19 def find data = @graphql.query(FIND_QUERY) Printavo::Account.new(data['account']) end |