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



1636
1637
1638
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1636

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)


1621
1622
1623
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1621

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)


1634
1635
1636
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1634

def next_page_token
  @next_page_token
end

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

The reviews. Corresponds to the JSON property reviews



1615
1616
1617
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1615

def reviews
  @reviews
end

#total_review_countFixnum

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

Returns:

  • (Fixnum)


1626
1627
1628
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1626

def total_review_count
  @total_review_count
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1641
1642
1643
1644
1645
1646
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1641

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