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 what a list of them was asked and narrowed to.
Direct Known Subclasses
Account, Client, Invoice, Job, Jobs, LineItem, 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: {}, filter: nil) ⇒ Resource
constructor
A new instance of Resource.
Constructor Details
#initialize(oauth: nil, node: {}, includes: {}, filter: nil) ⇒ Resource
Returns a new instance of Resource.
9 10 11 12 13 14 15 |
# File 'lib/jbr/resource.rb', line 9 def initialize(oauth: nil, node: {}, includes: {}, filter: nil) @oauth = oauth @node = node @id = node['id'] @includes = includes @filter = filter end |
Instance Attribute Details
#id ⇒ String? (readonly)
Returns the Jobber ID, from the node it came in or once one was created.
18 19 20 |
# File 'lib/jbr/resource.rb', line 18 def id @id end |