Class: MyJohnDeereApi::Request::Collection::Flags

Inherits:
Base
  • Object
show all
Defined in:
lib/my_john_deere_api/request/collection/flags.rb

Instance Attribute Summary

Attributes inherited from Base

#associations, #client

Instance Method Summary collapse

Methods inherited from Base

#all, #count, #each, #initialize

Constructor Details

This class inherits a constructor from MyJohnDeereApi::Request::Collection::Base

Instance Method Details

#create(attributes) ⇒ Object

Create a new flag (NOT YET IMPLEMENTED)

Raises:

  • (NotImplementedError)


22
23
24
# File 'lib/my_john_deere_api/request/collection/flags.rb', line 22

def create(attributes)
  raise NotImplementedError
end

#find(asset_id) ⇒ Object

Retrieve an flag from JD (NOT YET IMPLEMENTED)

Raises:

  • (NotImplementedError)


29
30
31
# File 'lib/my_john_deere_api/request/collection/flags.rb', line 29

def find(asset_id)
  raise NotImplementedError
end

#modelObject

This is the class used to model the data



15
16
17
# File 'lib/my_john_deere_api/request/collection/flags.rb', line 15

def model
  MyJohnDeereApi::Model::Flag
end

#resourceObject

The resource path for the first page in the collection



8
9
10
# File 'lib/my_john_deere_api/request/collection/flags.rb', line 8

def resource
  "/platform/organizations/#{associations[:organization]}/fields/#{associations[:field]}/flags"
end