Class: Google::Apis::CivicinfoV2::CivicinfoSchemaV2Candidate

Inherits:
Object
  • Object
show all
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

Information about a candidate running for elected office.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CivicinfoSchemaV2Candidate

Returns a new instance of CivicinfoSchemaV2Candidate.



435
436
437
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 435

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#candidate_urlString

The URL for the candidate's campaign web site. Corresponds to the JSON property candidateUrl

Returns:

  • (String)


396
397
398
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 396

def candidate_url
  @candidate_url
end

#channelsArray<Google::Apis::CivicinfoV2::CivicinfoSchemaV2Channel>

A list of known (social) media channels for this candidate. Corresponds to the JSON property channels



401
402
403
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 401

def channels
  @channels
end

#emailString

The email address for the candidate's campaign. Corresponds to the JSON property email

Returns:

  • (String)


406
407
408
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 406

def email
  @email
end

#nameString

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

Returns:

  • (String)


413
414
415
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 413

def name
  @name
end

#order_on_ballotFixnum

The order the candidate appears on the ballot for this contest. Corresponds to the JSON property orderOnBallot

Returns:

  • (Fixnum)


418
419
420
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 418

def order_on_ballot
  @order_on_ballot
end

#partyString

The full name of the party the candidate is a member of. Corresponds to the JSON property party

Returns:

  • (String)


423
424
425
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 423

def party
  @party
end

#phoneString

The voice phone number for the candidate's campaign office. Corresponds to the JSON property phone

Returns:

  • (String)


428
429
430
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 428

def phone
  @phone
end

#photo_urlString

A URL for a photo of the candidate. Corresponds to the JSON property photoUrl

Returns:

  • (String)


433
434
435
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 433

def photo_url
  @photo_url
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



440
441
442
443
444
445
446
447
448
449
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 440

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