Class: Jbr::Resource

Inherits:
Object
  • Object
show all
Defined in:
lib/jbr/resource.rb

Overview

What every Jobber resource shares: the credentials it is read or written through.

Direct Known Subclasses

Account, Client, Invoice, Job, Property, Quote, Request, Visit

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(oauth:) ⇒ Resource

Returns a new instance of Resource.

Parameters:

  • oauth (OAuth)

    the credentials to reach Jobber with.



5
6
7
# File 'lib/jbr/resource.rb', line 5

def initialize(oauth:)
  @oauth = oauth
end

Instance Attribute Details

#idString? (readonly)

Returns the Jobber ID, once the resource has been read or created.

Returns:

  • (String, nil)

    the Jobber ID, once the resource has been read or created.



10
11
12
# File 'lib/jbr/resource.rb', line 10

def id
  @id
end