Class: MyJohnDeereApi::Model::Asset
- Includes:
- Helpers::CaseConversion
- Defined in:
- lib/my_john_deere_api/model/asset.rb
Instance Attribute Summary collapse
-
#asset_category ⇒ Object
readonly
Returns the value of attribute asset_category.
-
#asset_sub_type ⇒ Object
readonly
Returns the value of attribute asset_sub_type.
-
#asset_type ⇒ Object
readonly
Returns the value of attribute asset_type.
-
#last_modified_date ⇒ Object
readonly
Returns the value of attribute last_modified_date.
-
#title ⇒ Object
Returns the value of attribute title.
Attributes inherited from Base
#client, #id, #links, #record_type
Instance Method Summary collapse
-
#attributes ⇒ Object
A listing of attributes that can be passed back to John Deere.
-
#locations ⇒ Object
locations associated with this asset.
-
#save ⇒ Object
Save any attribute changes to John Deere.
-
#update(new_attributes) ⇒ Object
Update the attributes in John Deere.
Methods inherited from Base
Constructor Details
This class inherits a constructor from MyJohnDeereApi::Model::Base
Instance Attribute Details
#asset_category ⇒ Object (readonly)
Returns the value of attribute asset_category.
5 6 7 |
# File 'lib/my_john_deere_api/model/asset.rb', line 5 def asset_category @asset_category end |
#asset_sub_type ⇒ Object (readonly)
Returns the value of attribute asset_sub_type.
5 6 7 |
# File 'lib/my_john_deere_api/model/asset.rb', line 5 def asset_sub_type @asset_sub_type end |
#asset_type ⇒ Object (readonly)
Returns the value of attribute asset_type.
5 6 7 |
# File 'lib/my_john_deere_api/model/asset.rb', line 5 def asset_type @asset_type end |
#last_modified_date ⇒ Object (readonly)
Returns the value of attribute last_modified_date.
5 6 7 |
# File 'lib/my_john_deere_api/model/asset.rb', line 5 def last_modified_date @last_modified_date end |
#title ⇒ Object
Returns the value of attribute title.
5 6 7 |
# File 'lib/my_john_deere_api/model/asset.rb', line 5 def title @title end |
Instance Method Details
#attributes ⇒ Object
A listing of attributes that can be passed back to John Deere
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/my_john_deere_api/model/asset.rb', line 10 def attributes { id: id, title: title, asset_category: asset_category, asset_type: asset_type, asset_sub_type: asset_sub_type, organization_id: 'placeholder' } end |
#locations ⇒ Object
locations associated with this asset
50 51 52 53 |
# File 'lib/my_john_deere_api/model/asset.rb', line 50 def locations return @locations if defined?(@locations) @locations = Request::Collection::AssetLocations.new(client, asset: id) end |