Class: Ecfr::AdminService::IbrCfrRange

Inherits:
Base show all
Defined in:
lib/ecfr/admin_service/ibr_cfr_range.rb,
lib/ecfr/admin_service/ibr_cfr_range/address.rb,
lib/ecfr/admin_service/ibr_cfr_range/organization.rb

Defined Under Namespace

Classes: Address, Organization

Constant Summary collapse

IBR_CFR_RANGES_PATH =
"v1/incorporation-by-reference"

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

#addresses[Address] (readonly)

address information for district offices, etc.

Returns:



24
25
26
# File 'lib/ecfr/admin_service/ibr_cfr_range.rb', line 24

attribute :addresses,
type: Array(Address),
desc: "address information for district offices, etc."

#labelString (readonly)

description - generally the agency responsible

Returns:

  • (String)


9
10
# File 'lib/ecfr/admin_service/ibr_cfr_range.rb', line 9

attribute :label,
desc: "description - generally the agency responsible"

#notesString (readonly)

notes about the IBR content

Returns:

  • (String)


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

attribute :notes,
desc: "notes about the IBR content"

#organizations[Organization] (readonly)

array of organizations responsible for IBR materials and more details

Returns:



20
21
22
# File 'lib/ecfr/admin_service/ibr_cfr_range.rb', line 20

attribute :organizations,
type: Array(Organization),
desc: "array of organizations responsible for IBR materials and more details"

#part_rangeString (readonly)

the range of parts the IBR item applies to

Returns:

  • (String)


13
14
# File 'lib/ecfr/admin_service/ibr_cfr_range.rb', line 13

attribute :part_range,
desc: "the range of parts the IBR item applies to"

#titleInteger (readonly)

CFR title number

Returns:

  • (Integer)


16
17
18
# File 'lib/ecfr/admin_service/ibr_cfr_range.rb', line 16

attribute :title,
type: :integer,
desc: "CFR title number"

Class Method Details

.all[<IbrCfrRange>]

Retrieve a summarized list of all IBR information

Returns:

  • ([<IbrCfrRange>])

    an array of IBR information limited to ‘title`, `part_range`, and `label` fields



36
37
38
39
40
41
# File 'lib/ecfr/admin_service/ibr_cfr_range.rb', line 36

def self.all
  perform(
    :get,
    "#{IBR_CFR_RANGES_PATH}.json"
  )
end

.find(title, part_range) ⇒ <IbrCfrRange>

Retrieve a detailed list of IBR information for the request IBR CFR range

Parameters:

  • title (<String, Integer>)

    CFR title

  • part_range (<String>)

    the part range in the form “1-99”

Returns:

  • (<IbrCfrRange>)

    contains all data available for specified params



51
52
53
54
55
56
57
# File 'lib/ecfr/admin_service/ibr_cfr_range.rb', line 51

def self.find(title, part_range)
  perform(
    :get,
    ibr_cfr_range_path(title, part_range),
    perform_options: {attributes_key: "ibr_cfr_range"}
  )
end