Class: Google::Apis::MybusinessV3::ListReviewsResponse

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

Overview

Response message for MyBusiness.ListReviews.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ ListReviewsResponse

Returns a new instance of ListReviewsResponse



896
897
898
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 896

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

Instance Attribute Details

#average_ratingFloat

The average star rating of all reviews for this location on a scale of 1 to 5. Corresponds to the JSON property averageRating

Returns:

  • (Float)


876
877
878
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 876

def average_rating
  @average_rating
end

#next_page_tokenString

If the number of reviews exceeded the requested page size, this field is populated with a token to fetch the next page of reviews on a subsequent call to ListReviews. If there are no more reviews, this field is not be present in the response. Corresponds to the JSON property nextPageToken

Returns:

  • (String)


884
885
886
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 884

def next_page_token
  @next_page_token
end

#reviewsArray<Google::Apis::MybusinessV3::Review>

The reviews. Corresponds to the JSON property reviews



889
890
891
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 889

def reviews
  @reviews
end

#total_review_countFixnum

The total number of reviews for this location. Corresponds to the JSON property totalReviewCount

Returns:

  • (Fixnum)


894
895
896
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 894

def total_review_count
  @total_review_count
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



901
902
903
904
905
906
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 901

def update!(**args)
  @average_rating = args[:average_rating] if args.key?(:average_rating)
  @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
  @reviews = args[:reviews] if args.key?(:reviews)
  @total_review_count = args[:total_review_count] if args.key?(:total_review_count)
end