Class: Jbr::Account

Inherits:
Resource show all
Defined in:
lib/jbr/account.rb

Overview

The Jobber account a set of credentials belongs to.

Direct Known Subclasses

Mock::Account

Constant Summary collapse

FIND =

The query that reads the account behind the current credentials.

<<~GRAPHQL
  { account { id name phone } }
GRAPHQL

Instance Method Summary collapse

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from Jbr::Resource

Instance Method Details

#idString?

Returns the account ID.

Returns:

  • (String, nil)

    the account ID.



10
# File 'lib/jbr/account.rb', line 10

def id = node['id']

#nameString?

Returns what the business calls itself.

Returns:

  • (String, nil)

    what the business calls itself.



13
# File 'lib/jbr/account.rb', line 13

def name = node['name']

#phoneString?

Returns the number the business is reached on, as Jobber holds it.

Returns:

  • (String, nil)

    the number the business is reached on, as Jobber holds it.



16
# File 'lib/jbr/account.rb', line 16

def phone = node['phone']