Class: MyJohnDeereApi::Model::Organization
- Defined in:
- lib/my_john_deere_api/model/organization.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Attributes inherited from Base
#client, #id, #links, #record_type
Instance Method Summary collapse
-
#assets ⇒ Object
assets associated with this organization.
-
#fields ⇒ Object
fields associated with this organization.
-
#member? ⇒ Boolean
Since the member attribute is boolean, we reflect this in the method name instead of using a standard attr_reader.
Methods inherited from Base
Constructor Details
This class inherits a constructor from MyJohnDeereApi::Model::Base
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/my_john_deere_api/model/organization.rb', line 5 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
5 6 7 |
# File 'lib/my_john_deere_api/model/organization.rb', line 5 def type @type end |
Instance Method Details
#assets ⇒ Object
assets associated with this organization
26 27 28 29 |
# File 'lib/my_john_deere_api/model/organization.rb', line 26 def assets return @assets if defined?(@assets) @assets = MyJohnDeereApi::Request::Collection::Assets.new(client, organization: id) end |
#fields ⇒ Object
fields associated with this organization
18 19 20 21 |
# File 'lib/my_john_deere_api/model/organization.rb', line 18 def fields return @fields if defined?(@fields) @fields = MyJohnDeereApi::Request::Collection::Fields.new(client, organization: id) end |
#member? ⇒ Boolean
Since the member attribute is boolean, we reflect this in the method name instead of using a standard attr_reader.
11 12 13 |
# File 'lib/my_john_deere_api/model/organization.rb', line 11 def member? @member end |