Class: Ecfr::AdminService::EditorialNote

Inherits:
Base show all
Defined in:
lib/ecfr/admin_service/editorial_note.rb,
lib/ecfr/admin_service/editorial_note/hierarchy.rb

Defined Under Namespace

Classes: Hierarchy

Constant Summary collapse

EDITORIAL_NOTES_PATH =
"v1/editorial-notes"

Constants inherited from Base

Base::SUPPORTED_ARRAY_ACCESSORS

Instance Attribute Summary collapse

Attributes inherited from Base

#metadata, #request_data, #response_status, #results

Class Method Summary collapse

Methods inherited from Base

base_url, service_name, service_path

Methods inherited from Base

basic_auth_client_options, #each, #initialize, metadata, metadata_key, result_key

Methods included from Extensible

#inherited

Methods included from Ecfr::AttributeMethodDefinition

included, #initialize

Methods inherited from Client

build, cache_key, client, client_pool, delete, execute, get, handle_response, perform, post, purge

Methods included from ParallelClient

included

Constructor Details

This class inherits a constructor from Ecfr::Base

Instance Attribute Details

#editorial_noteString (readonly)

content of the editorial note

Returns:

  • (String)


8
9
# File 'lib/ecfr/admin_service/editorial_note.rb', line 8

attribute :editorial_note,
desc: "content of the editorial note"

#end_dateDate (readonly)

last date the editorial note applies to

Returns:

  • (Date)


11
12
13
# File 'lib/ecfr/admin_service/editorial_note.rb', line 11

attribute :end_date,
type: :date,
desc: "last date the editorial note applies to"

#hierarchies[Hierarchy] (readonly)

the hierarchies of the content this editorial note applies to

Returns:



18
19
20
# File 'lib/ecfr/admin_service/editorial_note.rb', line 18

attribute :hierarchies,
type: Array(Hierarchy),
desc: "the hierarchies of the content this editorial note applies to"

#start_dateDate (readonly)

first date the editorial note applies to

Returns:

  • (Date)


14
15
16
# File 'lib/ecfr/admin_service/editorial_note.rb', line 14

attribute :start_date,
type: :date,
desc: "first date the editorial note applies to"

Class Method Details

.where(args) ⇒ [<EditorialNote>]

Retrieve a list of editorial notes

Parameters:

  • args (<Hash>)

    parameters by which to filter the results; supported args:

    • :title

Returns:



32
33
34
35
36
37
# File 'lib/ecfr/admin_service/editorial_note.rb', line 32

def self.where(args)
  perform(
    :get,
    "#{EDITORIAL_NOTES_PATH}/title-#{args[:title]}.json"
  )
end