Class: MyJohnDeere::Organization

Inherits:
SingleResource show all
Defined in:
lib/myjohndeere/organization.rb

Instance Attribute Summary

Attributes inherited from SingleResource

#deleted

Attributes inherited from Requestable

#access_token, #links

Instance Method Summary collapse

Methods included from JSONAttributes

included

Methods included from RESTMethods

included

Methods inherited from Requestable

#extract_link_with_rel_from_list, get_created_id_from_response_headers

Constructor Details

#initialize(json_object, access_token = nil) ⇒ Organization

Returns a new instance of Organization.



8
9
10
# File 'lib/myjohndeere/organization.rb', line 8

def initialize(json_object, access_token = nil)
  super(json_object, access_token)
end

Instance Method Details

#fieldsObject



12
13
14
# File 'lib/myjohndeere/organization.rb', line 12

def fields
  return MyJohnDeere::Field.list(self.access_token, organization_id: self.id)
end