Class: Jbr::Resource
- Inherits:
-
Object
- Object
- Jbr::Resource
- Defined in:
- lib/jbr/resource.rb
Overview
What every Jobber resource shares: the node Jobber answered with, the credentials it was read through, and the paging that every list of them arrives in.
Direct Known Subclasses
Account, Client, Invoice, Job, Jobs, Property, Quote, Request, Visit, Visits
Instance Attribute Summary collapse
-
#id ⇒ String?
readonly
The Jobber ID, from the node it came in or once one was created.
Instance Method Summary collapse
-
#initialize(oauth: nil, node: {}, includes: {}) ⇒ Resource
constructor
A new instance of Resource.
Constructor Details
#initialize(oauth: nil, node: {}, includes: {}) ⇒ Resource
Returns a new instance of Resource.
8 9 10 11 12 13 |
# File 'lib/jbr/resource.rb', line 8 def initialize(oauth: nil, node: {}, includes: {}) @oauth = oauth @node = node @id = node['id'] @includes = includes end |
Instance Attribute Details
#id ⇒ String? (readonly)
Returns the Jobber ID, from the node it came in or once one was created.
16 17 18 |
# File 'lib/jbr/resource.rb', line 16 def id @id end |