Class: Google::Apis::PlacesV1::GoogleMapsPlacesV1Review

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 a place.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleMapsPlacesV1Review

Returns a new instance of GoogleMapsPlacesV1Review.



741
742
743
# File 'lib/google/apis/places_v1/classes.rb', line 741

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



712
713
714
# File 'lib/google/apis/places_v1/classes.rb', line 712

def author_attribution
  @author_attribution
end

#original_textGoogle::Apis::PlacesV1::GoogleTypeLocalizedText

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



717
718
719
# File 'lib/google/apis/places_v1/classes.rb', line 717

def original_text
  @original_text
end

#publish_timeString

Output only. Timestamp for the review. Corresponds to the JSON property publishTime

Returns:

  • (String)


722
723
724
# File 'lib/google/apis/places_v1/classes.rb', line 722

def publish_time
  @publish_time
end

#ratingFloat

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

Returns:

  • (Float)


727
728
729
# File 'lib/google/apis/places_v1/classes.rb', line 727

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)


734
735
736
# File 'lib/google/apis/places_v1/classes.rb', line 734

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



739
740
741
# File 'lib/google/apis/places_v1/classes.rb', line 739

def text
  @text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



746
747
748
749
750
751
752
753
# File 'lib/google/apis/places_v1/classes.rb', line 746

def update!(**args)
  @author_attribution = args[:author_attribution] if args.key?(:author_attribution)
  @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)
end