class Google::Apis::CivicinfoV2::Candidate

Information about a candidate running for elected office.

Attributes

candidate_url[RW]

The URL for the candidate's campaign web site. Corresponds to the JSON property `candidateUrl` @return [String]

channels[RW]

A list of known (social) media channels for this candidate. Corresponds to the JSON property `channels` @return [Array<Google::Apis::CivicinfoV2::Channel>]

email[RW]

The email address for the candidate's campaign. Corresponds to the JSON property `email` @return [String]

name[RW]

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` @return [String]

order_on_ballot[RW]

The order the candidate appears on the ballot for this contest. Corresponds to the JSON property `orderOnBallot` @return [Fixnum]

party[RW]

The full name of the party the candidate is a member of. Corresponds to the JSON property `party` @return [String]

phone[RW]

The voice phone number for the candidate's campaign office. Corresponds to the JSON property `phone` @return [String]

photo_url[RW]

A URL for a photo of the candidate. Corresponds to the JSON property `photoUrl` @return [String]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/civicinfo_v2/classes.rb, line 221
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/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