Class: Google::Apis::CivicinfoV2::DivisionSearchResult
- Inherits:
-
Object
- Object
- Google::Apis::CivicinfoV2::DivisionSearchResult
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/civicinfo_v2/classes.rb,
lib/google/apis/civicinfo_v2/representations.rb,
lib/google/apis/civicinfo_v2/representations.rb
Overview
Represents a political geographic division that matches the requested query.
Instance Attribute Summary collapse
-
#aliases ⇒ Array<String>
Other Open Civic Data identifiers that refer to the same division -- for example, those that refer to other political divisions whose boundaries are defined to be coterminous with this one.
-
#name ⇒ String
The name of the division.
-
#ocd_id ⇒ String
The unique Open Civic Data identifier for this division Corresponds to the JSON property
ocdId
.
Instance Method Summary collapse
-
#initialize(**args) ⇒ DivisionSearchResult
constructor
A new instance of DivisionSearchResult.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ DivisionSearchResult
Returns a new instance of DivisionSearchResult.
518 519 520 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 518 def initialize(**args) update!(**args) end |
Instance Attribute Details
#aliases ⇒ Array<String>
Other Open Civic Data identifiers that refer to the same division -- for
example, those that refer to other political divisions whose boundaries are
defined to be coterminous with this one. For example, ocd-division/country:us/
state:wy will include an alias of ocd-division/country:us/state:wy/cd:1, since
Wyoming has only one Congressional district.
Corresponds to the JSON property aliases
506 507 508 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 506 def aliases @aliases end |
#name ⇒ String
The name of the division.
Corresponds to the JSON property name
511 512 513 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 511 def name @name end |
#ocd_id ⇒ String
The unique Open Civic Data identifier for this division
Corresponds to the JSON property ocdId
516 517 518 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 516 def ocd_id @ocd_id end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
523 524 525 526 527 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 523 def update!(**args) @aliases = args[:aliases] if args.key?(:aliases) @name = args[:name] if args.key?(:name) @ocd_id = args[:ocd_id] if args.key?(:ocd_id) end |