Class: Google::Apis::PlacesV1::GoogleMapsPlacesV1PlaceReview

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/places_v1/classes.rb,
lib/google/apis/places_v1/representations.rb,
lib/google/apis/places_v1/representations.rb

Overview

Information about a review of the place.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleMapsPlacesV1PlaceReview

Returns a new instance of GoogleMapsPlacesV1PlaceReview.



795
796
797
# File 'lib/google/apis/places_v1/classes.rb', line 795

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

Instance Attribute Details

#author_attributionGoogle::Apis::PlacesV1::GoogleMapsPlacesV1AuthorAttribution

Information about the author of the UGC data. Used in Photo, and Review. Corresponds to the JSON property authorAttribution



746
747
748
# File 'lib/google/apis/places_v1/classes.rb', line 746

def author_attribution
  @author_attribution
end

#original_language_codeString

Output only. A BCP-47 language code indicating the original language of the review. If the review has been translated, then original_language != language. This field contains the main language tag only, and not the secondary tag indicating country or region. For example, all the English reviews are tagged as 'en', and not 'en-AU' or 'en-UK' and so on.This field is empty if there is only a rating with no review text. Corresponds to the JSON property originalLanguageCode

Returns:

  • (String)


756
757
758
# File 'lib/google/apis/places_v1/classes.rb', line 756

def original_language_code
  @original_language_code
end

#original_textGoogle::Apis::PlacesV1::GoogleTypeLocalizedText

Localized variant of a text in a particular language. Corresponds to the JSON property originalText



761
762
763
# File 'lib/google/apis/places_v1/classes.rb', line 761

def original_text
  @original_text
end

#publish_timeString

Output only. Timestamp for the review, expressed in seconds since epoch. Corresponds to the JSON property publishTime

Returns:

  • (String)


766
767
768
# File 'lib/google/apis/places_v1/classes.rb', line 766

def publish_time
  @publish_time
end

#ratingFloat

Output only. A whole number between 1.0 and 5.0, a.k.a. the number of stars. Corresponds to the JSON property rating

Returns:

  • (Float)


771
772
773
# File 'lib/google/apis/places_v1/classes.rb', line 771

def rating
  @rating
end

#relative_publish_time_descriptionString

Output only. A string of formatted recent time, expressing the review time relative to the current time in a form appropriate for the language and country. Corresponds to the JSON property relativePublishTimeDescription

Returns:

  • (String)


778
779
780
# File 'lib/google/apis/places_v1/classes.rb', line 778

def relative_publish_time_description
  @relative_publish_time_description
end

#textGoogle::Apis::PlacesV1::GoogleTypeLocalizedText

Localized variant of a text in a particular language. Corresponds to the JSON property text



783
784
785
# File 'lib/google/apis/places_v1/classes.rb', line 783

def text
  @text
end

#translatedBoolean Also known as: translated?

Output only. A boolean value indicating if the review was translated from the original language it was written in. If a review has been translated, corresponding to a value of true, Google recommends that you indicate this to your users. For example, you can add the following string, “Translated by Google”, to the review. Corresponds to the JSON property translated

Returns:

  • (Boolean)


792
793
794
# File 'lib/google/apis/places_v1/classes.rb', line 792

def translated
  @translated
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



800
801
802
803
804
805
806
807
808
809
# File 'lib/google/apis/places_v1/classes.rb', line 800

def update!(**args)
  @author_attribution = args[:author_attribution] if args.key?(:author_attribution)
  @original_language_code = args[:original_language_code] if args.key?(:original_language_code)
  @original_text = args[:original_text] if args.key?(:original_text)
  @publish_time = args[:publish_time] if args.key?(:publish_time)
  @rating = args[:rating] if args.key?(:rating)
  @relative_publish_time_description = args[:relative_publish_time_description] if args.key?(:relative_publish_time_description)
  @text = args[:text] if args.key?(:text)
  @translated = args[:translated] if args.key?(:translated)
end