Class: MyJohnDeereApi::Request::Collection::Fields
- Defined in:
- lib/my_john_deere_api/request/collection/fields.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#find(field_id) ⇒ Object
Retrieve a field from JD.
-
#model ⇒ Object
This is the class used to model the data.
-
#resource ⇒ Object
The resource path for the first page in the collection.
Methods inherited from Base
#accessor, #all, #count, #each, #initialize
Constructor Details
This class inherits a constructor from MyJohnDeereApi::Request::Collection::Base
Instance Method Details
#find(field_id) ⇒ Object
Retrieve a field from JD
22 23 24 |
# File 'lib/my_john_deere_api/request/collection/fields.rb', line 22 def find(field_id) Individual::Field.new(client, field_id, organization: associations[:organization]).object end |
#model ⇒ Object
This is the class used to model the data
15 16 17 |
# File 'lib/my_john_deere_api/request/collection/fields.rb', line 15 def model MyJohnDeereApi::Model::Field end |
#resource ⇒ Object
The resource path for the first page in the collection
8 9 10 |
# File 'lib/my_john_deere_api/request/collection/fields.rb', line 8 def resource "/organizations/#{associations[:organization]}/fields" end |