Class: Google::Apis::CivicinfoV2::Candidate
- Inherits:
- 
      Object
      
        - Object
- Google::Apis::CivicinfoV2::Candidate
 
- Defined in:
- generated/google/apis/civicinfo_v2/classes.rb,
 generated/google/apis/civicinfo_v2/representations.rb,
 generated/google/apis/civicinfo_v2/representations.rb
Overview
Information about a candidate running for elected office.
Instance Attribute Summary collapse
- 
  
    
      #candidate_url  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The URL for the candidate's campaign web site. 
- 
  
    
      #channels  ⇒ Array<Google::Apis::CivicinfoV2::Channel> 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    A list of known (social) media channels for this candidate. 
- 
  
    
      #email  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The email address for the candidate's campaign. 
- 
  
    
      #name  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The candidate's name. 
- 
  
    
      #order_on_ballot  ⇒ Fixnum 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The order the candidate appears on the ballot for this contest. 
- 
  
    
      #party  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The full name of the party the candidate is a member of. 
- 
  
    
      #phone  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The voice phone number for the candidate's campaign office. 
- 
  
    
      #photo_url  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    A URL for a photo of the candidate. 
Instance Method Summary collapse
- 
  
    
      #initialize(**args)  ⇒ Candidate 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Candidate. 
- 
  
    
      #update!(**args)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Update properties of this object. 
Methods included from Google::Apis::Core::JsonObjectSupport
Methods included from Google::Apis::Core::Hashable
Constructor Details
#initialize(**args) ⇒ Candidate
Returns a new instance of Candidate
| 221 222 223 | # File 'generated/google/apis/civicinfo_v2/classes.rb', line 221 def initialize(**args) update!(**args) end | 
Instance Attribute Details
#candidate_url ⇒ String
The URL for the candidate's campaign web site.
Corresponds to the JSON property candidateUrl
| 182 183 184 | # File 'generated/google/apis/civicinfo_v2/classes.rb', line 182 def candidate_url @candidate_url end | 
#channels ⇒ Array<Google::Apis::CivicinfoV2::Channel>
A list of known (social) media channels for this candidate.
Corresponds to the JSON property channels
| 187 188 189 | # File 'generated/google/apis/civicinfo_v2/classes.rb', line 187 def channels @channels end | 
#email ⇒ String
The email address for the candidate's campaign.
Corresponds to the JSON property email
| 192 193 194 | # File 'generated/google/apis/civicinfo_v2/classes.rb', line 192 def email @email end | 
#name ⇒ String
The candidate's name. If this is a joint ticket it will indicate the name of
the candidate at the top of a ticket followed by a / and that name of
candidate at the bottom of the ticket. e.g. "Mitt Romney / Paul Ryan"
Corresponds to the JSON property name
| 199 200 201 | # File 'generated/google/apis/civicinfo_v2/classes.rb', line 199 def name @name end | 
#order_on_ballot ⇒ Fixnum
The order the candidate appears on the ballot for this contest.
Corresponds to the JSON property orderOnBallot
| 204 205 206 | # File 'generated/google/apis/civicinfo_v2/classes.rb', line 204 def order_on_ballot @order_on_ballot end | 
#party ⇒ String
The full name of the party the candidate is a member of.
Corresponds to the JSON property party
| 209 210 211 | # File 'generated/google/apis/civicinfo_v2/classes.rb', line 209 def party @party end | 
#phone ⇒ String
The voice phone number for the candidate's campaign office.
Corresponds to the JSON property phone
| 214 215 216 | # File 'generated/google/apis/civicinfo_v2/classes.rb', line 214 def phone @phone end | 
#photo_url ⇒ String
A URL for a photo of the candidate.
Corresponds to the JSON property photoUrl
| 219 220 221 | # File 'generated/google/apis/civicinfo_v2/classes.rb', line 219 def photo_url @photo_url end | 
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
| 226 227 228 229 230 231 232 233 234 235 | # File 'generated/google/apis/civicinfo_v2/classes.rb', line 226 def update!(**args) @candidate_url = args[:candidate_url] if args.key?(:candidate_url) @channels = args[:channels] if args.key?(:channels) @email = args[:email] if args.key?(:email) @name = args[:name] if args.key?(:name) @order_on_ballot = args[:order_on_ballot] if args.key?(:order_on_ballot) @party = args[:party] if args.key?(:party) @phone = args[:phone] if args.key?(:phone) @photo_url = args[:photo_url] if args.key?(:photo_url) end |