zernio-sdk 0.0.527 → 0.0.528
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/docs/AssignGoogleBusinessLocation200ResponseAccount.md +2 -2
- data/docs/BatchGetGoogleBusinessReviews200ResponseLocationReviewsInner.md +2 -2
- data/docs/BatchGetGoogleBusinessReviewsRequest.md +4 -2
- data/docs/GMBReviewsApi.md +1 -1
- data/docs/ListInboxComments200ResponseDataInner.md +4 -4
- data/docs/ListInboxReviews200ResponseDataInner.md +5 -1
- data/docs/SelectGoogleBusinessLocation200ResponseAccount.md +2 -2
- data/lib/zernio-sdk/api/gmb_reviews_api.rb +2 -2
- data/lib/zernio-sdk/models/assign_google_business_location200_response_account.rb +2 -0
- data/lib/zernio-sdk/models/batch_get_google_business_reviews200_response_location_reviews_inner.rb +2 -2
- data/lib/zernio-sdk/models/batch_get_google_business_reviews_request.rb +60 -5
- data/lib/zernio-sdk/models/list_inbox_comments200_response_data_inner.rb +4 -0
- data/lib/zernio-sdk/models/list_inbox_reviews200_response_data_inner.rb +23 -1
- data/lib/zernio-sdk/models/select_google_business_location200_response_account.rb +2 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/openapi.yaml +27 -14
- data/spec/api/gmb_reviews_api_spec.rb +1 -1
- data/spec/models/batch_get_google_business_reviews_request_spec.rb +10 -0
- data/spec/models/list_inbox_reviews200_response_data_inner_spec.rb +12 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c2512b46748f0d6cfcc7050fb70e9e94abe230e6bb68d9949d75808ac1fe393e
|
|
4
|
+
data.tar.gz: 24ae76e6fb6124854c7d0f98b0577d1c79439a58a3f920a554e7d2144b431a4e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 20214a9e6724ec1127a30da6268d7b2fbb0bf25e4f6e453cec50462fbba8c80ffd2d0373e6a3834737f36dddd909e721f1f33de66c829c9bab9f11aebcd5ef79
|
|
7
|
+
data.tar.gz: ac5951dbf679d2c3ebe3aa184ad460830a6c534e50905b0f9a7141e1ff48a577b465127def86097c6359cd249d555bd832f8e3db1a24a3b0d5cf168057cc3e4b
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
| **username** | **String** | | [optional] |
|
|
10
10
|
| **display_name** | **String** | | [optional] |
|
|
11
11
|
| **is_active** | **Boolean** | | [optional] |
|
|
12
|
-
| **selected_location_name** | **String** |
|
|
13
|
-
| **selected_location_id** | **String** |
|
|
12
|
+
| **selected_location_name** | **String** | Human-readable location display name (e.g. \"Snap Fitness Dianella\"), NOT a resource name. Do not use it to build API paths. | [optional] |
|
|
13
|
+
| **selected_location_id** | **String** | Bare GBP location id (digits only). Combine with the GBP account id as accounts/{gbpAccountId}/locations/{selectedLocationId} to form the location resource names that gmb-reviews/batch expects in locationNames. | [optional] |
|
|
14
14
|
|
|
15
15
|
## Example
|
|
16
16
|
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **name** | **String** |
|
|
8
|
-
| **review** | **Object** | The review object (
|
|
7
|
+
| **name** | **String** | LOCATION resource name the review belongs to (accounts/{accountId}/locations/{locationId}) - NOT the review resource name. Use it to attribute the review to a location; the review identity is review.reviewId (full review resource name at review.name). | [optional] |
|
|
8
|
+
| **review** | **Object** | The review object: reviewId (the review's identity), name (full review resource name, accounts/*/locations/*/reviews/*), starRating, comment, reviewer, createTime, updateTime, reviewReply, and reviewMediaItems (review photos/videos; photo items carry thumbnailUrl, video items carry videoUrl) | [optional] |
|
|
9
9
|
|
|
10
10
|
## Example
|
|
11
11
|
|
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **location_names** | **Array<String>** | Array of full location resource names (e.g. ['accounts/123/locations/456']) | |
|
|
7
|
+
| **location_names** | **Array<String>** | Array of full location resource names (e.g. ['accounts/123/locations/456']). Max 50 per request (Google's batchGetReviews cap); chunk larger sets into multiple requests. | |
|
|
8
8
|
| **page_size** | **Integer** | Number of reviews per page (max 50) | [optional][default to 50] |
|
|
9
9
|
| **page_token** | **String** | Pagination token from previous response | [optional] |
|
|
10
|
+
| **order_by** | **String** | Sort order requested from Google. Defaults to 'updateTime desc' (newest first), which allows early-stopping pagination once results cross your date window. | [optional][default to 'updateTime desc'] |
|
|
10
11
|
|
|
11
12
|
## Example
|
|
12
13
|
|
|
@@ -16,7 +17,8 @@ require 'zernio-sdk'
|
|
|
16
17
|
instance = Zernio::BatchGetGoogleBusinessReviewsRequest.new(
|
|
17
18
|
location_names: null,
|
|
18
19
|
page_size: null,
|
|
19
|
-
page_token: null
|
|
20
|
+
page_token: null,
|
|
21
|
+
order_by: null
|
|
20
22
|
)
|
|
21
23
|
```
|
|
22
24
|
|
data/docs/GMBReviewsApi.md
CHANGED
|
@@ -16,7 +16,7 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
16
16
|
|
|
17
17
|
Batch get reviews
|
|
18
18
|
|
|
19
|
-
Fetches reviews across multiple locations in a single request. More efficient than calling GET /gmb-reviews per location for multi-location businesses. Returns a flat
|
|
19
|
+
Fetches reviews across multiple locations in a single request. More efficient than calling GET /gmb-reviews per location for multi-location businesses. Returns a flat locationReviews array (not grouped by location): each item carries the location resource name it belongs to (`name`) plus the review object (`review`), whose identity is `review.reviewId`. Reviews are requested from Google ordered by `orderBy` (default `updateTime desc`, newest first), so callers polling for recent reviews can stop paginating once they cross their date window. Note: this endpoint does not return aggregate metrics (averageRating / totalReviewCount). For those, use the single-location GET /gmb-reviews endpoint.
|
|
20
20
|
|
|
21
21
|
### Examples
|
|
22
22
|
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
| **platform** | **String** | | [optional] |
|
|
9
9
|
| **account_id** | **String** | | [optional] |
|
|
10
10
|
| **account_username** | **String** | | [optional] |
|
|
11
|
-
| **content** | **String** |
|
|
12
|
-
| **picture** | **String** |
|
|
13
|
-
| **permalink** | **String** |
|
|
11
|
+
| **content** | **String** | The post text/caption. On ad rows (isAd: true) this is the AD NAME, not the underlying post's caption — the creative text isn't exposed here. | [optional] |
|
|
12
|
+
| **picture** | **String** | Post media thumbnail. On ad rows this is the ad creative thumbnail. | [optional] |
|
|
13
|
+
| **permalink** | **String** | Public URL of the post. On ad rows: the Facebook dark-post URL (facebook placement) or the IG media permalink (instagram placement); may be null when unknown. | [optional] |
|
|
14
14
|
| **created_time** | **Time** | | [optional] |
|
|
15
15
|
| **comment_count** | **Integer** | | [optional] |
|
|
16
|
-
| **like_count** | **Integer** |
|
|
16
|
+
| **like_count** | **Integer** | Not fetched for ad rows (always 0 there). | [optional] |
|
|
17
17
|
| **cid** | **String** | Bluesky content identifier | [optional] |
|
|
18
18
|
| **subreddit** | **String** | Reddit subreddit name | [optional] |
|
|
19
19
|
| **is_ad** | **Boolean** | True when this row is an ad (boosted/dark post). `platform` is then the placement (facebook = the Page dark post / instagram = the IG media), `id` is `{adId}:{placement}`, and the thread is at GET /v1/ads/{adId}/comments?placement={placement}. | [optional] |
|
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **id** | **String** |
|
|
7
|
+
| **id** | **String** | Review identifier. For Google Business this is the full review resource name (accounts/{accountId}/locations/{locationId}/reviews/{reviewId}), so it also encodes the location. | [optional] |
|
|
8
8
|
| **platform** | **String** | | [optional] |
|
|
9
9
|
| **account_id** | **String** | | [optional] |
|
|
10
10
|
| **account_username** | **String** | | [optional] |
|
|
11
|
+
| **location_id** | **String** | Bare GBP location id the review belongs to. Google Business only; absent for other platforms. | [optional] |
|
|
12
|
+
| **location_name** | **String** | Human-readable GBP location display name. Google Business only; absent for other platforms. | [optional] |
|
|
11
13
|
| **reviewer** | [**ListInboxReviews200ResponseDataInnerReviewer**](ListInboxReviews200ResponseDataInnerReviewer.md) | | [optional] |
|
|
12
14
|
| **rating** | **Integer** | | [optional] |
|
|
13
15
|
| **text** | **String** | | [optional] |
|
|
@@ -29,6 +31,8 @@ instance = Zernio::ListInboxReviews200ResponseDataInner.new(
|
|
|
29
31
|
platform: null,
|
|
30
32
|
account_id: null,
|
|
31
33
|
account_username: null,
|
|
34
|
+
location_id: null,
|
|
35
|
+
location_name: null,
|
|
32
36
|
reviewer: null,
|
|
33
37
|
rating: null,
|
|
34
38
|
text: null,
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
| **username** | **String** | | [optional] |
|
|
10
10
|
| **display_name** | **String** | | [optional] |
|
|
11
11
|
| **is_active** | **Boolean** | | [optional] |
|
|
12
|
-
| **selected_location_name** | **String** |
|
|
13
|
-
| **selected_location_id** | **String** |
|
|
12
|
+
| **selected_location_name** | **String** | Human-readable location display name, NOT a resource name. Do not use it to build API paths. | [optional] |
|
|
13
|
+
| **selected_location_id** | **String** | Bare GBP location id. Combine with the GBP account id as accounts/{gbpAccountId}/locations/{selectedLocationId} to form the location resource names that gmb-reviews/batch expects in locationNames. | [optional] |
|
|
14
14
|
|
|
15
15
|
## Example
|
|
16
16
|
|
|
@@ -20,7 +20,7 @@ module Zernio
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Batch get reviews
|
|
23
|
-
# Fetches reviews across multiple locations in a single request. More efficient than calling GET /gmb-reviews per location for multi-location businesses. Returns a flat
|
|
23
|
+
# Fetches reviews across multiple locations in a single request. More efficient than calling GET /gmb-reviews per location for multi-location businesses. Returns a flat locationReviews array (not grouped by location): each item carries the location resource name it belongs to (`name`) plus the review object (`review`), whose identity is `review.reviewId`. Reviews are requested from Google ordered by `orderBy` (default `updateTime desc`, newest first), so callers polling for recent reviews can stop paginating once they cross their date window. Note: this endpoint does not return aggregate metrics (averageRating / totalReviewCount). For those, use the single-location GET /gmb-reviews endpoint.
|
|
24
24
|
# @param account_id [String]
|
|
25
25
|
# @param batch_get_google_business_reviews_request [BatchGetGoogleBusinessReviewsRequest]
|
|
26
26
|
# @param [Hash] opts the optional parameters
|
|
@@ -31,7 +31,7 @@ module Zernio
|
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
# Batch get reviews
|
|
34
|
-
# Fetches reviews across multiple locations in a single request. More efficient than calling GET /gmb-reviews per location for multi-location businesses. Returns a flat
|
|
34
|
+
# Fetches reviews across multiple locations in a single request. More efficient than calling GET /gmb-reviews per location for multi-location businesses. Returns a flat locationReviews array (not grouped by location): each item carries the location resource name it belongs to (`name`) plus the review object (`review`), whose identity is `review.reviewId`. Reviews are requested from Google ordered by `orderBy` (default `updateTime desc`, newest first), so callers polling for recent reviews can stop paginating once they cross their date window. Note: this endpoint does not return aggregate metrics (averageRating / totalReviewCount). For those, use the single-location GET /gmb-reviews endpoint.
|
|
35
35
|
# @param account_id [String]
|
|
36
36
|
# @param batch_get_google_business_reviews_request [BatchGetGoogleBusinessReviewsRequest]
|
|
37
37
|
# @param [Hash] opts the optional parameters
|
|
@@ -25,8 +25,10 @@ module Zernio
|
|
|
25
25
|
|
|
26
26
|
attr_accessor :is_active
|
|
27
27
|
|
|
28
|
+
# Human-readable location display name (e.g. \"Snap Fitness Dianella\"), NOT a resource name. Do not use it to build API paths.
|
|
28
29
|
attr_accessor :selected_location_name
|
|
29
30
|
|
|
31
|
+
# Bare GBP location id (digits only). Combine with the GBP account id as accounts/{gbpAccountId}/locations/{selectedLocationId} to form the location resource names that gmb-reviews/batch expects in locationNames.
|
|
30
32
|
attr_accessor :selected_location_id
|
|
31
33
|
|
|
32
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
data/lib/zernio-sdk/models/batch_get_google_business_reviews200_response_location_reviews_inner.rb
CHANGED
|
@@ -15,10 +15,10 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
17
|
class BatchGetGoogleBusinessReviews200ResponseLocationReviewsInner < ApiModelBase
|
|
18
|
-
#
|
|
18
|
+
# LOCATION resource name the review belongs to (accounts/{accountId}/locations/{locationId}) - NOT the review resource name. Use it to attribute the review to a location; the review identity is review.reviewId (full review resource name at review.name).
|
|
19
19
|
attr_accessor :name
|
|
20
20
|
|
|
21
|
-
# The review object (
|
|
21
|
+
# The review object: reviewId (the review's identity), name (full review resource name, accounts/*/locations/*/reviews/*), starRating, comment, reviewer, createTime, updateTime, reviewReply, and reviewMediaItems (review photos/videos; photo items carry thumbnailUrl, video items carry videoUrl)
|
|
22
22
|
attr_accessor :review
|
|
23
23
|
|
|
24
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -15,7 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
17
|
class BatchGetGoogleBusinessReviewsRequest < ApiModelBase
|
|
18
|
-
# Array of full location resource names (e.g. ['accounts/123/locations/456'])
|
|
18
|
+
# Array of full location resource names (e.g. ['accounts/123/locations/456']). Max 50 per request (Google's batchGetReviews cap); chunk larger sets into multiple requests.
|
|
19
19
|
attr_accessor :location_names
|
|
20
20
|
|
|
21
21
|
# Number of reviews per page (max 50)
|
|
@@ -24,12 +24,38 @@ module Zernio
|
|
|
24
24
|
# Pagination token from previous response
|
|
25
25
|
attr_accessor :page_token
|
|
26
26
|
|
|
27
|
+
# Sort order requested from Google. Defaults to 'updateTime desc' (newest first), which allows early-stopping pagination once results cross your date window.
|
|
28
|
+
attr_accessor :order_by
|
|
29
|
+
|
|
30
|
+
class EnumAttributeValidator
|
|
31
|
+
attr_reader :datatype
|
|
32
|
+
attr_reader :allowable_values
|
|
33
|
+
|
|
34
|
+
def initialize(datatype, allowable_values)
|
|
35
|
+
@allowable_values = allowable_values.map do |value|
|
|
36
|
+
case datatype.to_s
|
|
37
|
+
when /Integer/i
|
|
38
|
+
value.to_i
|
|
39
|
+
when /Float/i
|
|
40
|
+
value.to_f
|
|
41
|
+
else
|
|
42
|
+
value
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def valid?(value)
|
|
48
|
+
!value || allowable_values.include?(value)
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
27
52
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
53
|
def self.attribute_map
|
|
29
54
|
{
|
|
30
55
|
:'location_names' => :'locationNames',
|
|
31
56
|
:'page_size' => :'pageSize',
|
|
32
|
-
:'page_token' => :'pageToken'
|
|
57
|
+
:'page_token' => :'pageToken',
|
|
58
|
+
:'order_by' => :'orderBy'
|
|
33
59
|
}
|
|
34
60
|
end
|
|
35
61
|
|
|
@@ -48,7 +74,8 @@ module Zernio
|
|
|
48
74
|
{
|
|
49
75
|
:'location_names' => :'Array<String>',
|
|
50
76
|
:'page_size' => :'Integer',
|
|
51
|
-
:'page_token' => :'String'
|
|
77
|
+
:'page_token' => :'String',
|
|
78
|
+
:'order_by' => :'String'
|
|
52
79
|
}
|
|
53
80
|
end
|
|
54
81
|
|
|
@@ -91,6 +118,12 @@ module Zernio
|
|
|
91
118
|
if attributes.key?(:'page_token')
|
|
92
119
|
self.page_token = attributes[:'page_token']
|
|
93
120
|
end
|
|
121
|
+
|
|
122
|
+
if attributes.key?(:'order_by')
|
|
123
|
+
self.order_by = attributes[:'order_by']
|
|
124
|
+
else
|
|
125
|
+
self.order_by = 'updateTime desc'
|
|
126
|
+
end
|
|
94
127
|
end
|
|
95
128
|
|
|
96
129
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -102,6 +135,10 @@ module Zernio
|
|
|
102
135
|
invalid_properties.push('invalid value for "location_names", location_names cannot be nil.')
|
|
103
136
|
end
|
|
104
137
|
|
|
138
|
+
if @location_names.length > 50
|
|
139
|
+
invalid_properties.push('invalid value for "location_names", number of items must be less than or equal to 50.')
|
|
140
|
+
end
|
|
141
|
+
|
|
105
142
|
if @location_names.length < 1
|
|
106
143
|
invalid_properties.push('invalid value for "location_names", number of items must be greater than or equal to 1.')
|
|
107
144
|
end
|
|
@@ -126,10 +163,13 @@ module Zernio
|
|
|
126
163
|
def valid?
|
|
127
164
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
128
165
|
return false if @location_names.nil?
|
|
166
|
+
return false if @location_names.length > 50
|
|
129
167
|
return false if @location_names.length < 1
|
|
130
168
|
return false if !@page_size.nil? && @page_size > 50
|
|
131
169
|
return false if !@page_size.nil? && @page_size < 1
|
|
132
170
|
return false if !@page_token.nil? && @page_token.to_s.length < 1
|
|
171
|
+
order_by_validator = EnumAttributeValidator.new('String', ["updateTime desc", "rating", "rating desc"])
|
|
172
|
+
return false unless order_by_validator.valid?(@order_by)
|
|
133
173
|
true
|
|
134
174
|
end
|
|
135
175
|
|
|
@@ -140,6 +180,10 @@ module Zernio
|
|
|
140
180
|
fail ArgumentError, 'location_names cannot be nil'
|
|
141
181
|
end
|
|
142
182
|
|
|
183
|
+
if location_names.length > 50
|
|
184
|
+
fail ArgumentError, 'invalid value for "location_names", number of items must be less than or equal to 50.'
|
|
185
|
+
end
|
|
186
|
+
|
|
143
187
|
if location_names.length < 1
|
|
144
188
|
fail ArgumentError, 'invalid value for "location_names", number of items must be greater than or equal to 1.'
|
|
145
189
|
end
|
|
@@ -179,6 +223,16 @@ module Zernio
|
|
|
179
223
|
@page_token = page_token
|
|
180
224
|
end
|
|
181
225
|
|
|
226
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
227
|
+
# @param [Object] order_by Object to be assigned
|
|
228
|
+
def order_by=(order_by)
|
|
229
|
+
validator = EnumAttributeValidator.new('String', ["updateTime desc", "rating", "rating desc"])
|
|
230
|
+
unless validator.valid?(order_by)
|
|
231
|
+
fail ArgumentError, "invalid value for \"order_by\", must be one of #{validator.allowable_values}."
|
|
232
|
+
end
|
|
233
|
+
@order_by = order_by
|
|
234
|
+
end
|
|
235
|
+
|
|
182
236
|
# Checks equality by comparing each attribute.
|
|
183
237
|
# @param [Object] Object to be compared
|
|
184
238
|
def ==(o)
|
|
@@ -186,7 +240,8 @@ module Zernio
|
|
|
186
240
|
self.class == o.class &&
|
|
187
241
|
location_names == o.location_names &&
|
|
188
242
|
page_size == o.page_size &&
|
|
189
|
-
page_token == o.page_token
|
|
243
|
+
page_token == o.page_token &&
|
|
244
|
+
order_by == o.order_by
|
|
190
245
|
end
|
|
191
246
|
|
|
192
247
|
# @see the `==` method
|
|
@@ -198,7 +253,7 @@ module Zernio
|
|
|
198
253
|
# Calculates hash code according to all attributes.
|
|
199
254
|
# @return [Integer] Hash code
|
|
200
255
|
def hash
|
|
201
|
-
[location_names, page_size, page_token].hash
|
|
256
|
+
[location_names, page_size, page_token, order_by].hash
|
|
202
257
|
end
|
|
203
258
|
|
|
204
259
|
# Builds the object from hash
|
|
@@ -23,16 +23,20 @@ module Zernio
|
|
|
23
23
|
|
|
24
24
|
attr_accessor :account_username
|
|
25
25
|
|
|
26
|
+
# The post text/caption. On ad rows (isAd: true) this is the AD NAME, not the underlying post's caption — the creative text isn't exposed here.
|
|
26
27
|
attr_accessor :content
|
|
27
28
|
|
|
29
|
+
# Post media thumbnail. On ad rows this is the ad creative thumbnail.
|
|
28
30
|
attr_accessor :picture
|
|
29
31
|
|
|
32
|
+
# Public URL of the post. On ad rows: the Facebook dark-post URL (facebook placement) or the IG media permalink (instagram placement); may be null when unknown.
|
|
30
33
|
attr_accessor :permalink
|
|
31
34
|
|
|
32
35
|
attr_accessor :created_time
|
|
33
36
|
|
|
34
37
|
attr_accessor :comment_count
|
|
35
38
|
|
|
39
|
+
# Not fetched for ad rows (always 0 there).
|
|
36
40
|
attr_accessor :like_count
|
|
37
41
|
|
|
38
42
|
# Bluesky content identifier
|
|
@@ -15,6 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
17
|
class ListInboxReviews200ResponseDataInner < ApiModelBase
|
|
18
|
+
# Review identifier. For Google Business this is the full review resource name (accounts/{accountId}/locations/{locationId}/reviews/{reviewId}), so it also encodes the location.
|
|
18
19
|
attr_accessor :id
|
|
19
20
|
|
|
20
21
|
attr_accessor :platform
|
|
@@ -23,6 +24,12 @@ module Zernio
|
|
|
23
24
|
|
|
24
25
|
attr_accessor :account_username
|
|
25
26
|
|
|
27
|
+
# Bare GBP location id the review belongs to. Google Business only; absent for other platforms.
|
|
28
|
+
attr_accessor :location_id
|
|
29
|
+
|
|
30
|
+
# Human-readable GBP location display name. Google Business only; absent for other platforms.
|
|
31
|
+
attr_accessor :location_name
|
|
32
|
+
|
|
26
33
|
attr_accessor :reviewer
|
|
27
34
|
|
|
28
35
|
attr_accessor :rating
|
|
@@ -53,6 +60,8 @@ module Zernio
|
|
|
53
60
|
:'platform' => :'platform',
|
|
54
61
|
:'account_id' => :'accountId',
|
|
55
62
|
:'account_username' => :'accountUsername',
|
|
63
|
+
:'location_id' => :'locationId',
|
|
64
|
+
:'location_name' => :'locationName',
|
|
56
65
|
:'reviewer' => :'reviewer',
|
|
57
66
|
:'rating' => :'rating',
|
|
58
67
|
:'text' => :'text',
|
|
@@ -83,6 +92,8 @@ module Zernio
|
|
|
83
92
|
:'platform' => :'String',
|
|
84
93
|
:'account_id' => :'String',
|
|
85
94
|
:'account_username' => :'String',
|
|
95
|
+
:'location_id' => :'String',
|
|
96
|
+
:'location_name' => :'String',
|
|
86
97
|
:'reviewer' => :'ListInboxReviews200ResponseDataInnerReviewer',
|
|
87
98
|
:'rating' => :'Integer',
|
|
88
99
|
:'text' => :'String',
|
|
@@ -99,6 +110,7 @@ module Zernio
|
|
|
99
110
|
# List of attributes with nullable: true
|
|
100
111
|
def self.openapi_nullable
|
|
101
112
|
Set.new([
|
|
113
|
+
:'location_name',
|
|
102
114
|
:'review_url'
|
|
103
115
|
])
|
|
104
116
|
end
|
|
@@ -135,6 +147,14 @@ module Zernio
|
|
|
135
147
|
self.account_username = attributes[:'account_username']
|
|
136
148
|
end
|
|
137
149
|
|
|
150
|
+
if attributes.key?(:'location_id')
|
|
151
|
+
self.location_id = attributes[:'location_id']
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
if attributes.key?(:'location_name')
|
|
155
|
+
self.location_name = attributes[:'location_name']
|
|
156
|
+
end
|
|
157
|
+
|
|
138
158
|
if attributes.key?(:'reviewer')
|
|
139
159
|
self.reviewer = attributes[:'reviewer']
|
|
140
160
|
end
|
|
@@ -202,6 +222,8 @@ module Zernio
|
|
|
202
222
|
platform == o.platform &&
|
|
203
223
|
account_id == o.account_id &&
|
|
204
224
|
account_username == o.account_username &&
|
|
225
|
+
location_id == o.location_id &&
|
|
226
|
+
location_name == o.location_name &&
|
|
205
227
|
reviewer == o.reviewer &&
|
|
206
228
|
rating == o.rating &&
|
|
207
229
|
text == o.text &&
|
|
@@ -223,7 +245,7 @@ module Zernio
|
|
|
223
245
|
# Calculates hash code according to all attributes.
|
|
224
246
|
# @return [Integer] Hash code
|
|
225
247
|
def hash
|
|
226
|
-
[id, platform, account_id, account_username, reviewer, rating, text, created, has_reply, has_photos, photo_count, photos, reply, review_url].hash
|
|
248
|
+
[id, platform, account_id, account_username, location_id, location_name, reviewer, rating, text, created, has_reply, has_photos, photo_count, photos, reply, review_url].hash
|
|
227
249
|
end
|
|
228
250
|
|
|
229
251
|
# Builds the object from hash
|
|
@@ -26,8 +26,10 @@ module Zernio
|
|
|
26
26
|
|
|
27
27
|
attr_accessor :is_active
|
|
28
28
|
|
|
29
|
+
# Human-readable location display name, NOT a resource name. Do not use it to build API paths.
|
|
29
30
|
attr_accessor :selected_location_name
|
|
30
31
|
|
|
32
|
+
# Bare GBP location id. Combine with the GBP account id as accounts/{gbpAccountId}/locations/{selectedLocationId} to form the location resource names that gmb-reviews/batch expects in locationNames.
|
|
31
33
|
attr_accessor :selected_location_id
|
|
32
34
|
|
|
33
35
|
class EnumAttributeValidator
|
data/lib/zernio-sdk/version.rb
CHANGED
data/openapi.yaml
CHANGED
|
@@ -14244,8 +14244,8 @@ paths:
|
|
|
14244
14244
|
username: { type: string }
|
|
14245
14245
|
displayName: { type: string }
|
|
14246
14246
|
isActive: { type: boolean }
|
|
14247
|
-
selectedLocationName: { type: string }
|
|
14248
|
-
selectedLocationId: { type: string }
|
|
14247
|
+
selectedLocationName: { type: string, description: 'Human-readable location display name, NOT a resource name. Do not use it to build API paths.' }
|
|
14248
|
+
selectedLocationId: { type: string, description: 'Bare GBP location id. Combine with the GBP account id as accounts/{gbpAccountId}/locations/{selectedLocationId} to form the location resource names that gmb-reviews/batch expects in locationNames.' }
|
|
14249
14249
|
example:
|
|
14250
14250
|
message: "Google Business location connected successfully"
|
|
14251
14251
|
redirect_url: "https://yourdomain.com/integrations/callback?connected=googlebusiness&profileId=507f1f77bcf86cd799439011&username=My+Coffee+Shop"
|
|
@@ -16083,7 +16083,12 @@ paths:
|
|
|
16083
16083
|
description: |
|
|
16084
16084
|
Fetches reviews across multiple locations in a single request.
|
|
16085
16085
|
More efficient than calling GET /gmb-reviews per location for multi-location businesses.
|
|
16086
|
-
Returns a flat
|
|
16086
|
+
Returns a flat locationReviews array (not grouped by location): each item carries
|
|
16087
|
+
the location resource name it belongs to (`name`) plus the review object (`review`),
|
|
16088
|
+
whose identity is `review.reviewId`.
|
|
16089
|
+
Reviews are requested from Google ordered by `orderBy` (default `updateTime desc`,
|
|
16090
|
+
newest first), so callers polling for recent reviews can stop paginating once they
|
|
16091
|
+
cross their date window.
|
|
16087
16092
|
Note: this endpoint does not return aggregate metrics (averageRating / totalReviewCount).
|
|
16088
16093
|
For those, use the single-location GET /gmb-reviews endpoint.
|
|
16089
16094
|
parameters:
|
|
@@ -16104,8 +16109,9 @@ paths:
|
|
|
16104
16109
|
locationNames:
|
|
16105
16110
|
type: array
|
|
16106
16111
|
minItems: 1
|
|
16112
|
+
maxItems: 50
|
|
16107
16113
|
items: { type: string, pattern: '^accounts/[^/]+/locations/[^/]+$' }
|
|
16108
|
-
description: "Array of full location resource names (e.g. ['accounts/123/locations/456'])"
|
|
16114
|
+
description: "Array of full location resource names (e.g. ['accounts/123/locations/456']). Max 50 per request (Google's batchGetReviews cap); chunk larger sets into multiple requests."
|
|
16109
16115
|
pageSize:
|
|
16110
16116
|
type: integer
|
|
16111
16117
|
minimum: 1
|
|
@@ -16116,6 +16122,11 @@ paths:
|
|
|
16116
16122
|
type: string
|
|
16117
16123
|
minLength: 1
|
|
16118
16124
|
description: Pagination token from previous response
|
|
16125
|
+
orderBy:
|
|
16126
|
+
type: string
|
|
16127
|
+
enum: ['updateTime desc', 'rating', 'rating desc']
|
|
16128
|
+
default: 'updateTime desc'
|
|
16129
|
+
description: "Sort order requested from Google. Defaults to 'updateTime desc' (newest first), which allows early-stopping pagination once results cross your date window."
|
|
16119
16130
|
example:
|
|
16120
16131
|
locationNames: ["accounts/123/locations/456", "accounts/123/locations/789"]
|
|
16121
16132
|
pageSize: 50
|
|
@@ -16134,8 +16145,8 @@ paths:
|
|
|
16134
16145
|
items:
|
|
16135
16146
|
type: object
|
|
16136
16147
|
properties:
|
|
16137
|
-
name: { type: string, description:
|
|
16138
|
-
review: { type: object, description: "The review object (
|
|
16148
|
+
name: { type: string, description: 'LOCATION resource name the review belongs to (accounts/{accountId}/locations/{locationId}) - NOT the review resource name. Use it to attribute the review to a location; the review identity is review.reviewId (full review resource name at review.name).' }
|
|
16149
|
+
review: { type: object, description: "The review object: reviewId (the review's identity), name (full review resource name, accounts/*/locations/*/reviews/*), starRating, comment, reviewer, createTime, updateTime, reviewReply, and reviewMediaItems (review photos/videos; photo items carry thumbnailUrl, video items carry videoUrl)" }
|
|
16139
16150
|
nextPageToken: { type: string }
|
|
16140
16151
|
'400':
|
|
16141
16152
|
description: Invalid request
|
|
@@ -18704,8 +18715,8 @@ paths:
|
|
|
18704
18715
|
username: { type: string }
|
|
18705
18716
|
displayName: { type: string }
|
|
18706
18717
|
isActive: { type: boolean }
|
|
18707
|
-
selectedLocationName: { type: string }
|
|
18708
|
-
selectedLocationId: { type: string }
|
|
18718
|
+
selectedLocationName: { type: string, description: 'Human-readable location display name (e.g. "Snap Fitness Dianella"), NOT a resource name. Do not use it to build API paths.' }
|
|
18719
|
+
selectedLocationId: { type: string, description: 'Bare GBP location id (digits only). Combine with the GBP account id as accounts/{gbpAccountId}/locations/{selectedLocationId} to form the location resource names that gmb-reviews/batch expects in locationNames.' }
|
|
18709
18720
|
example:
|
|
18710
18721
|
message: "Google Business location assigned to profile successfully"
|
|
18711
18722
|
account:
|
|
@@ -18715,7 +18726,7 @@ paths:
|
|
|
18715
18726
|
displayName: "Snap Fitness Dianella"
|
|
18716
18727
|
isActive: true
|
|
18717
18728
|
selectedLocationName: "Snap Fitness Dianella"
|
|
18718
|
-
selectedLocationId: "
|
|
18729
|
+
selectedLocationId: "12345678901234567890"
|
|
18719
18730
|
'400': { description: 'Invalid body, or selected location not found under the Google account' }
|
|
18720
18731
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
18721
18732
|
'403': { description: 'Payment required, or target profile exceeds plan limit' }
|
|
@@ -22788,12 +22799,12 @@ paths:
|
|
|
22788
22799
|
platform: { type: string }
|
|
22789
22800
|
accountId: { type: string }
|
|
22790
22801
|
accountUsername: { type: string }
|
|
22791
|
-
content: { type: string }
|
|
22792
|
-
picture: { type: [string, "null"] }
|
|
22793
|
-
permalink: { type: [string, "null"] }
|
|
22802
|
+
content: { type: string, description: "The post text/caption. On ad rows (isAd: true) this is the AD NAME, not the underlying post's caption — the creative text isn't exposed here." }
|
|
22803
|
+
picture: { type: [string, "null"], description: 'Post media thumbnail. On ad rows this is the ad creative thumbnail.' }
|
|
22804
|
+
permalink: { type: [string, "null"], description: 'Public URL of the post. On ad rows: the Facebook dark-post URL (facebook placement) or the IG media permalink (instagram placement); may be null when unknown.' }
|
|
22794
22805
|
createdTime: { type: string, format: date-time }
|
|
22795
22806
|
commentCount: { type: integer }
|
|
22796
|
-
likeCount: { type: integer }
|
|
22807
|
+
likeCount: { type: integer, description: 'Not fetched for ad rows (always 0 there).' }
|
|
22797
22808
|
cid: { type: [string, "null"], description: Bluesky content identifier }
|
|
22798
22809
|
subreddit: { type: [string, "null"], description: Reddit subreddit name }
|
|
22799
22810
|
isAd: { type: boolean, description: "True when this row is an ad (boosted/dark post). `platform` is then the placement (facebook = the Page dark post / instagram = the IG media), `id` is `{adId}:{placement}`, and the thread is at GET /v1/ads/{adId}/comments?placement={placement}." }
|
|
@@ -23948,10 +23959,12 @@ paths:
|
|
|
23948
23959
|
items:
|
|
23949
23960
|
type: object
|
|
23950
23961
|
properties:
|
|
23951
|
-
id: { type: string }
|
|
23962
|
+
id: { type: string, description: 'Review identifier. For Google Business this is the full review resource name (accounts/{accountId}/locations/{locationId}/reviews/{reviewId}), so it also encodes the location.' }
|
|
23952
23963
|
platform: { type: string }
|
|
23953
23964
|
accountId: { type: string }
|
|
23954
23965
|
accountUsername: { type: string }
|
|
23966
|
+
locationId: { type: string, description: 'Bare GBP location id the review belongs to. Google Business only; absent for other platforms.' }
|
|
23967
|
+
locationName: { type: [string, "null"], description: 'Human-readable GBP location display name. Google Business only; absent for other platforms.' }
|
|
23955
23968
|
reviewer:
|
|
23956
23969
|
type: object
|
|
23957
23970
|
properties:
|
|
@@ -34,7 +34,7 @@ describe 'GMBReviewsApi' do
|
|
|
34
34
|
|
|
35
35
|
# unit tests for batch_get_google_business_reviews
|
|
36
36
|
# Batch get reviews
|
|
37
|
-
# Fetches reviews across multiple locations in a single request. More efficient than calling GET /gmb-reviews per location for multi-location businesses. Returns a flat
|
|
37
|
+
# Fetches reviews across multiple locations in a single request. More efficient than calling GET /gmb-reviews per location for multi-location businesses. Returns a flat locationReviews array (not grouped by location): each item carries the location resource name it belongs to (`name`) plus the review object (`review`), whose identity is `review.reviewId`. Reviews are requested from Google ordered by `orderBy` (default `updateTime desc`, newest first), so callers polling for recent reviews can stop paginating once they cross their date window. Note: this endpoint does not return aggregate metrics (averageRating / totalReviewCount). For those, use the single-location GET /gmb-reviews endpoint.
|
|
38
38
|
# @param account_id
|
|
39
39
|
# @param batch_get_google_business_reviews_request
|
|
40
40
|
# @param [Hash] opts the optional parameters
|
|
@@ -45,4 +45,14 @@ describe Zernio::BatchGetGoogleBusinessReviewsRequest do
|
|
|
45
45
|
end
|
|
46
46
|
end
|
|
47
47
|
|
|
48
|
+
describe 'test attribute "order_by"' do
|
|
49
|
+
it 'should work' do
|
|
50
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
51
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["updateTime desc", "rating", "rating desc"])
|
|
52
|
+
# validator.allowable_values.each do |value|
|
|
53
|
+
# expect { instance.order_by = value }.not_to raise_error
|
|
54
|
+
# end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
48
58
|
end
|
|
@@ -51,6 +51,18 @@ describe Zernio::ListInboxReviews200ResponseDataInner do
|
|
|
51
51
|
end
|
|
52
52
|
end
|
|
53
53
|
|
|
54
|
+
describe 'test attribute "location_id"' do
|
|
55
|
+
it 'should work' do
|
|
56
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
describe 'test attribute "location_name"' do
|
|
61
|
+
it 'should work' do
|
|
62
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
54
66
|
describe 'test attribute "reviewer"' do
|
|
55
67
|
it 'should work' do
|
|
56
68
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|