late-sdk 0.0.762 → 0.0.763
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/README.md +6 -4
- data/docs/GMBReviewsApi.md +76 -0
- data/docs/GetGoogleBusinessReview200Response.md +24 -0
- data/docs/GetGoogleBusinessReviews200Response.md +1 -1
- data/docs/{GetGoogleBusinessReviews200ResponseReviewsInner.md → GoogleBusinessReview.md} +6 -6
- data/docs/{GetGoogleBusinessReviews200ResponseReviewsInnerReviewReply.md → GoogleBusinessReviewReviewReply.md} +2 -2
- data/docs/{GetGoogleBusinessReviews200ResponseReviewsInnerReviewer.md → GoogleBusinessReviewReviewer.md} +2 -2
- data/docs/ListInboxReviews200ResponseDataInner.md +1 -1
- data/docs/{GetGoogleBusinessReviews200ResponseReviewsInnerPhotosInner.md → ListInboxReviews200ResponseDataInnerPhotosInner.md} +2 -2
- data/docs/WebhookEventsApi.md +1 -1
- data/lib/zernio-sdk/api/gmb_reviews_api.rb +72 -0
- data/lib/zernio-sdk/api/webhook_events_api.rb +2 -2
- data/lib/zernio-sdk/models/get_google_business_review200_response.rb +174 -0
- data/lib/zernio-sdk/models/get_google_business_reviews200_response.rb +1 -1
- data/lib/zernio-sdk/models/{get_google_business_reviews200_response_reviews_inner.rb → google_business_review.rb} +13 -12
- data/lib/zernio-sdk/models/{get_google_business_reviews200_response_reviews_inner_review_reply.rb → google_business_review_review_reply.rb} +3 -3
- data/lib/zernio-sdk/models/{get_google_business_reviews200_response_reviews_inner_reviewer.rb → google_business_review_reviewer.rb} +3 -3
- data/lib/zernio-sdk/models/list_inbox_reviews200_response_data_inner.rb +1 -1
- data/lib/zernio-sdk/models/{get_google_business_reviews200_response_reviews_inner_photos_inner.rb → list_inbox_reviews200_response_data_inner_photos_inner.rb} +3 -3
- data/lib/zernio-sdk/models/webhook_payload_message_deleted.rb +1 -1
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +5 -4
- data/openapi.yaml +123 -36
- data/spec/api/gmb_reviews_api_spec.rb +14 -0
- data/spec/models/get_google_business_review200_response_spec.rb +54 -0
- data/spec/models/{get_google_business_reviews200_response_reviews_inner_review_reply_spec.rb → google_business_review_review_reply_spec.rb} +6 -6
- data/spec/models/{get_google_business_reviews200_response_reviews_inner_reviewer_spec.rb → google_business_review_reviewer_spec.rb} +6 -6
- data/spec/models/{get_google_business_reviews200_response_reviews_inner_spec.rb → google_business_review_spec.rb} +6 -6
- data/spec/models/{get_google_business_reviews200_response_reviews_inner_photos_inner_spec.rb → list_inbox_reviews200_response_data_inner_photos_inner_spec.rb} +6 -6
- data/zernio-sdk-0.0.763.gem +0 -0
- metadata +22 -18
- data/zernio-sdk-0.0.762.gem +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8a2f356c9038a223b2618b65bbbd5d78a67fb4a0b5c8ae7dab95d416f24ef35a
|
|
4
|
+
data.tar.gz: b922f8a04e096808e9b00a48578c3f697e15cdcea74136bfa164df16bab93aa1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5c45cc0d1566013db422739b306eae9457af5918e32395eac14b9e0c3c581afd318aac9db798da0eb234a91db475ed60a85a9afcc59059935418124f6ca86da0
|
|
7
|
+
data.tar.gz: a51410949bf9e1e15d23de909725f464a5f79fb0e5c49726c694e3ee7c0226925002b02644d46742d3ab471b6e4cbfc827885cbed604c8624696bbaea397104c
|
data/README.md
CHANGED
|
@@ -366,6 +366,7 @@ Class | Method | HTTP request | Description
|
|
|
366
366
|
*Zernio::GMBPlaceActionsApi* | [**update_google_business_place_action**](docs/GMBPlaceActionsApi.md#update_google_business_place_action) | **PATCH** /v1/accounts/{accountId}/gmb-place-actions | Update action link
|
|
367
367
|
*Zernio::GMBReviewsApi* | [**batch_get_google_business_reviews**](docs/GMBReviewsApi.md#batch_get_google_business_reviews) | **POST** /v1/accounts/{accountId}/gmb-reviews/batch | Batch get reviews
|
|
368
368
|
*Zernio::GMBReviewsApi* | [**delete_google_business_review_reply**](docs/GMBReviewsApi.md#delete_google_business_review_reply) | **DELETE** /v1/accounts/{accountId}/gmb-reviews/{reviewId}/reply | Delete a review reply
|
|
369
|
+
*Zernio::GMBReviewsApi* | [**get_google_business_review**](docs/GMBReviewsApi.md#get_google_business_review) | **GET** /v1/accounts/{accountId}/gmb-reviews/{reviewId} | Get a review
|
|
369
370
|
*Zernio::GMBReviewsApi* | [**get_google_business_reviews**](docs/GMBReviewsApi.md#get_google_business_reviews) | **GET** /v1/accounts/{accountId}/gmb-reviews | Get reviews
|
|
370
371
|
*Zernio::GMBReviewsApi* | [**reply_to_google_business_review**](docs/GMBReviewsApi.md#reply_to_google_business_review) | **POST** /v1/accounts/{accountId}/gmb-reviews/{reviewId}/reply | Reply to a review
|
|
371
372
|
*Zernio::GMBServicesApi* | [**get_google_business_services**](docs/GMBServicesApi.md#get_google_business_services) | **GET** /v1/accounts/{accountId}/gmb-services | Get services
|
|
@@ -1237,11 +1238,8 @@ Class | Method | HTTP request | Description
|
|
|
1237
1238
|
- [Zernio::GetGoogleBusinessPerformance200ResponseMetricsValue](docs/GetGoogleBusinessPerformance200ResponseMetricsValue.md)
|
|
1238
1239
|
- [Zernio::GetGoogleBusinessPerformance200ResponseMetricsValueValuesInner](docs/GetGoogleBusinessPerformance200ResponseMetricsValueValuesInner.md)
|
|
1239
1240
|
- [Zernio::GetGoogleBusinessPerformance400Response](docs/GetGoogleBusinessPerformance400Response.md)
|
|
1241
|
+
- [Zernio::GetGoogleBusinessReview200Response](docs/GetGoogleBusinessReview200Response.md)
|
|
1240
1242
|
- [Zernio::GetGoogleBusinessReviews200Response](docs/GetGoogleBusinessReviews200Response.md)
|
|
1241
|
-
- [Zernio::GetGoogleBusinessReviews200ResponseReviewsInner](docs/GetGoogleBusinessReviews200ResponseReviewsInner.md)
|
|
1242
|
-
- [Zernio::GetGoogleBusinessReviews200ResponseReviewsInnerPhotosInner](docs/GetGoogleBusinessReviews200ResponseReviewsInnerPhotosInner.md)
|
|
1243
|
-
- [Zernio::GetGoogleBusinessReviews200ResponseReviewsInnerReviewReply](docs/GetGoogleBusinessReviews200ResponseReviewsInnerReviewReply.md)
|
|
1244
|
-
- [Zernio::GetGoogleBusinessReviews200ResponseReviewsInnerReviewer](docs/GetGoogleBusinessReviews200ResponseReviewsInnerReviewer.md)
|
|
1245
1243
|
- [Zernio::GetGoogleBusinessSearchKeywords200Response](docs/GetGoogleBusinessSearchKeywords200Response.md)
|
|
1246
1244
|
- [Zernio::GetGoogleBusinessSearchKeywords200ResponseKeywordsInner](docs/GetGoogleBusinessSearchKeywords200ResponseKeywordsInner.md)
|
|
1247
1245
|
- [Zernio::GetGoogleBusinessSearchKeywords200ResponseMonthRange](docs/GetGoogleBusinessSearchKeywords200ResponseMonthRange.md)
|
|
@@ -1457,6 +1455,9 @@ Class | Method | HTTP request | Description
|
|
|
1457
1455
|
- [Zernio::GoogleBusinessPlatformDataEventScheduleStartDate](docs/GoogleBusinessPlatformDataEventScheduleStartDate.md)
|
|
1458
1456
|
- [Zernio::GoogleBusinessPlatformDataEventScheduleStartTime](docs/GoogleBusinessPlatformDataEventScheduleStartTime.md)
|
|
1459
1457
|
- [Zernio::GoogleBusinessPlatformDataOffer](docs/GoogleBusinessPlatformDataOffer.md)
|
|
1458
|
+
- [Zernio::GoogleBusinessReview](docs/GoogleBusinessReview.md)
|
|
1459
|
+
- [Zernio::GoogleBusinessReviewReviewReply](docs/GoogleBusinessReviewReviewReply.md)
|
|
1460
|
+
- [Zernio::GoogleBusinessReviewReviewer](docs/GoogleBusinessReviewReviewer.md)
|
|
1460
1461
|
- [Zernio::HandleOAuthCallbackRequest](docs/HandleOAuthCallbackRequest.md)
|
|
1461
1462
|
- [Zernio::HideInboxComment200Response](docs/HideInboxComment200Response.md)
|
|
1462
1463
|
- [Zernio::HideInboxCommentRequest](docs/HideInboxCommentRequest.md)
|
|
@@ -1611,6 +1612,7 @@ Class | Method | HTTP request | Description
|
|
|
1611
1612
|
- [Zernio::ListInboxMentions200ResponseMeta](docs/ListInboxMentions200ResponseMeta.md)
|
|
1612
1613
|
- [Zernio::ListInboxReviews200Response](docs/ListInboxReviews200Response.md)
|
|
1613
1614
|
- [Zernio::ListInboxReviews200ResponseDataInner](docs/ListInboxReviews200ResponseDataInner.md)
|
|
1615
|
+
- [Zernio::ListInboxReviews200ResponseDataInnerPhotosInner](docs/ListInboxReviews200ResponseDataInnerPhotosInner.md)
|
|
1614
1616
|
- [Zernio::ListInboxReviews200ResponseDataInnerReply](docs/ListInboxReviews200ResponseDataInnerReply.md)
|
|
1615
1617
|
- [Zernio::ListInboxReviews200ResponseDataInnerReviewer](docs/ListInboxReviews200ResponseDataInnerReviewer.md)
|
|
1616
1618
|
- [Zernio::ListInboxReviews200ResponseSummary](docs/ListInboxReviews200ResponseSummary.md)
|
data/docs/GMBReviewsApi.md
CHANGED
|
@@ -6,6 +6,7 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
6
6
|
| ------ | ------------ | ----------- |
|
|
7
7
|
| [**batch_get_google_business_reviews**](GMBReviewsApi.md#batch_get_google_business_reviews) | **POST** /v1/accounts/{accountId}/gmb-reviews/batch | Batch get reviews |
|
|
8
8
|
| [**delete_google_business_review_reply**](GMBReviewsApi.md#delete_google_business_review_reply) | **DELETE** /v1/accounts/{accountId}/gmb-reviews/{reviewId}/reply | Delete a review reply |
|
|
9
|
+
| [**get_google_business_review**](GMBReviewsApi.md#get_google_business_review) | **GET** /v1/accounts/{accountId}/gmb-reviews/{reviewId} | Get a review |
|
|
9
10
|
| [**get_google_business_reviews**](GMBReviewsApi.md#get_google_business_reviews) | **GET** /v1/accounts/{accountId}/gmb-reviews | Get reviews |
|
|
10
11
|
| [**reply_to_google_business_review**](GMBReviewsApi.md#reply_to_google_business_review) | **POST** /v1/accounts/{accountId}/gmb-reviews/{reviewId}/reply | Reply to a review |
|
|
11
12
|
|
|
@@ -152,6 +153,81 @@ end
|
|
|
152
153
|
- **Accept**: application/json
|
|
153
154
|
|
|
154
155
|
|
|
156
|
+
## get_google_business_review
|
|
157
|
+
|
|
158
|
+
> <GetGoogleBusinessReview200Response> get_google_business_review(account_id, review_id, opts)
|
|
159
|
+
|
|
160
|
+
Get a review
|
|
161
|
+
|
|
162
|
+
Returns one Google Business review, in the same shape as the entries of GET /v1/accounts/{accountId}/gmb-reviews. The review is read from the account's selected location unless locationId overrides it, and Google returns 404 for a review id that belongs to another location. Read the review before replying if a human may have answered it already: replies are overwritten in place and Google keeps no history.
|
|
163
|
+
|
|
164
|
+
### Examples
|
|
165
|
+
|
|
166
|
+
```ruby
|
|
167
|
+
require 'time'
|
|
168
|
+
require 'zernio-sdk'
|
|
169
|
+
# setup authorization
|
|
170
|
+
Zernio.configure do |config|
|
|
171
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
172
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
api_instance = Zernio::GMBReviewsApi.new
|
|
176
|
+
account_id = 'account_id_example' # String | The Zernio account ID (from /v1/accounts)
|
|
177
|
+
review_id = 'review_id_example' # String | The review ID portion (e.g. \"AIe9_BGx1234567890\"), not the full resource name
|
|
178
|
+
opts = {
|
|
179
|
+
location_id: 'location_id_example' # String | Override which location to read the review from. If omitted, uses the account's selected location. Use GET /gmb-locations to list valid IDs.
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
begin
|
|
183
|
+
# Get a review
|
|
184
|
+
result = api_instance.get_google_business_review(account_id, review_id, opts)
|
|
185
|
+
p result
|
|
186
|
+
rescue Zernio::ApiError => e
|
|
187
|
+
puts "Error when calling GMBReviewsApi->get_google_business_review: #{e}"
|
|
188
|
+
end
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
#### Using the get_google_business_review_with_http_info variant
|
|
192
|
+
|
|
193
|
+
This returns an Array which contains the response data, status code and headers.
|
|
194
|
+
|
|
195
|
+
> <Array(<GetGoogleBusinessReview200Response>, Integer, Hash)> get_google_business_review_with_http_info(account_id, review_id, opts)
|
|
196
|
+
|
|
197
|
+
```ruby
|
|
198
|
+
begin
|
|
199
|
+
# Get a review
|
|
200
|
+
data, status_code, headers = api_instance.get_google_business_review_with_http_info(account_id, review_id, opts)
|
|
201
|
+
p status_code # => 2xx
|
|
202
|
+
p headers # => { ... }
|
|
203
|
+
p data # => <GetGoogleBusinessReview200Response>
|
|
204
|
+
rescue Zernio::ApiError => e
|
|
205
|
+
puts "Error when calling GMBReviewsApi->get_google_business_review_with_http_info: #{e}"
|
|
206
|
+
end
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Parameters
|
|
210
|
+
|
|
211
|
+
| Name | Type | Description | Notes |
|
|
212
|
+
| ---- | ---- | ----------- | ----- |
|
|
213
|
+
| **account_id** | **String** | The Zernio account ID (from /v1/accounts) | |
|
|
214
|
+
| **review_id** | **String** | The review ID portion (e.g. \"AIe9_BGx1234567890\"), not the full resource name | |
|
|
215
|
+
| **location_id** | **String** | Override which location to read the review from. If omitted, uses the account's selected location. Use GET /gmb-locations to list valid IDs. | [optional] |
|
|
216
|
+
|
|
217
|
+
### Return type
|
|
218
|
+
|
|
219
|
+
[**GetGoogleBusinessReview200Response**](GetGoogleBusinessReview200Response.md)
|
|
220
|
+
|
|
221
|
+
### Authorization
|
|
222
|
+
|
|
223
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
224
|
+
|
|
225
|
+
### HTTP request headers
|
|
226
|
+
|
|
227
|
+
- **Content-Type**: Not defined
|
|
228
|
+
- **Accept**: application/json
|
|
229
|
+
|
|
230
|
+
|
|
155
231
|
## get_google_business_reviews
|
|
156
232
|
|
|
157
233
|
> <GetGoogleBusinessReviews200Response> get_google_business_reviews(account_id, opts)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Zernio::GetGoogleBusinessReview200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **success** | **Boolean** | | [optional] |
|
|
8
|
+
| **account_id** | **String** | | [optional] |
|
|
9
|
+
| **location_id** | **String** | | [optional] |
|
|
10
|
+
| **review** | [**GoogleBusinessReview**](GoogleBusinessReview.md) | | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'zernio-sdk'
|
|
16
|
+
|
|
17
|
+
instance = Zernio::GetGoogleBusinessReview200Response.new(
|
|
18
|
+
success: null,
|
|
19
|
+
account_id: null,
|
|
20
|
+
location_id: null,
|
|
21
|
+
review: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
| **success** | **Boolean** | | [optional] |
|
|
8
8
|
| **account_id** | **String** | | [optional] |
|
|
9
9
|
| **location_id** | **String** | | [optional] |
|
|
10
|
-
| **reviews** | [**Array<
|
|
10
|
+
| **reviews** | [**Array<GoogleBusinessReview>**](GoogleBusinessReview.md) | | [optional] |
|
|
11
11
|
| **average_rating** | **Float** | Overall average rating | [optional] |
|
|
12
12
|
| **total_review_count** | **Integer** | Total number of reviews | [optional] |
|
|
13
13
|
| **next_page_token** | **String** | Token for next page | [optional] |
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Zernio::
|
|
1
|
+
# Zernio::GoogleBusinessReview
|
|
2
2
|
|
|
3
3
|
## Properties
|
|
4
4
|
|
|
@@ -6,22 +6,22 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **id** | **String** | Review ID | [optional] |
|
|
8
8
|
| **name** | **String** | Full resource name | [optional] |
|
|
9
|
-
| **reviewer** | [**
|
|
10
|
-
| **rating** | **Integer** | Numeric star rating | [optional] |
|
|
9
|
+
| **reviewer** | [**GoogleBusinessReviewReviewer**](GoogleBusinessReviewReviewer.md) | | [optional] |
|
|
10
|
+
| **rating** | **Integer** | Numeric star rating (0 when Google sends no rating) | [optional] |
|
|
11
11
|
| **star_rating** | **String** | Google's string rating | [optional] |
|
|
12
12
|
| **comment** | **String** | Review text | [optional] |
|
|
13
13
|
| **create_time** | **Time** | | [optional] |
|
|
14
14
|
| **update_time** | **Time** | | [optional] |
|
|
15
|
-
| **review_reply** | [**
|
|
15
|
+
| **review_reply** | [**GoogleBusinessReviewReviewReply**](GoogleBusinessReviewReviewReply.md) | | [optional] |
|
|
16
16
|
| **photo_count** | **Integer** | Number of photos attached to the review (photos only, videos are not counted) | [optional] |
|
|
17
|
-
| **photos** | [**Array<
|
|
17
|
+
| **photos** | [**Array<ListInboxReviews200ResponseDataInnerPhotosInner>**](ListInboxReviews200ResponseDataInnerPhotosInner.md) | Photos attached to the review by the reviewer | [optional] |
|
|
18
18
|
|
|
19
19
|
## Example
|
|
20
20
|
|
|
21
21
|
```ruby
|
|
22
22
|
require 'zernio-sdk'
|
|
23
23
|
|
|
24
|
-
instance = Zernio::
|
|
24
|
+
instance = Zernio::GoogleBusinessReview.new(
|
|
25
25
|
id: null,
|
|
26
26
|
name: null,
|
|
27
27
|
reviewer: null,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Zernio::
|
|
1
|
+
# Zernio::GoogleBusinessReviewReviewReply
|
|
2
2
|
|
|
3
3
|
## Properties
|
|
4
4
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
```ruby
|
|
13
13
|
require 'zernio-sdk'
|
|
14
14
|
|
|
15
|
-
instance = Zernio::
|
|
15
|
+
instance = Zernio::GoogleBusinessReviewReviewReply.new(
|
|
16
16
|
comment: null,
|
|
17
17
|
update_time: null
|
|
18
18
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Zernio::
|
|
1
|
+
# Zernio::GoogleBusinessReviewReviewer
|
|
2
2
|
|
|
3
3
|
## Properties
|
|
4
4
|
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
```ruby
|
|
14
14
|
require 'zernio-sdk'
|
|
15
15
|
|
|
16
|
-
instance = Zernio::
|
|
16
|
+
instance = Zernio::GoogleBusinessReviewReviewer.new(
|
|
17
17
|
display_name: null,
|
|
18
18
|
profile_photo_url: null,
|
|
19
19
|
is_anonymous: null
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
| **has_reply** | **Boolean** | | [optional] |
|
|
18
18
|
| **has_photos** | **Boolean** | Whether the review has at least one photo. Google Business only; always false for other platforms. | [optional] |
|
|
19
19
|
| **photo_count** | **Integer** | Number of photos attached to the review (photos only; videos are not counted). Google Business only; 0 for other platforms. | [optional] |
|
|
20
|
-
| **photos** | [**Array<
|
|
20
|
+
| **photos** | [**Array<ListInboxReviews200ResponseDataInnerPhotosInner>**](ListInboxReviews200ResponseDataInnerPhotosInner.md) | Photos attached to the review. Google Business only; always an empty array for other platforms. | [optional] |
|
|
21
21
|
| **reply** | [**ListInboxReviews200ResponseDataInnerReply**](ListInboxReviews200ResponseDataInnerReply.md) | | [optional] |
|
|
22
22
|
| **review_url** | **String** | | [optional] |
|
|
23
23
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Zernio::
|
|
1
|
+
# Zernio::ListInboxReviews200ResponseDataInnerPhotosInner
|
|
2
2
|
|
|
3
3
|
## Properties
|
|
4
4
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
```ruby
|
|
12
12
|
require 'zernio-sdk'
|
|
13
13
|
|
|
14
|
-
instance = Zernio::
|
|
14
|
+
instance = Zernio::ListInboxReviews200ResponseDataInnerPhotosInner.new(
|
|
15
15
|
url: null
|
|
16
16
|
)
|
|
17
17
|
```
|
data/docs/WebhookEventsApi.md
CHANGED
|
@@ -810,7 +810,7 @@ nil (empty response body)
|
|
|
810
810
|
|
|
811
811
|
Message deleted event
|
|
812
812
|
|
|
813
|
-
Fired when a sender deletes (unsends) a message. Supported on Instagram (incoming unsend) and WhatsApp
|
|
813
|
+
Fired when a sender deletes (unsends) a message. Supported on Instagram (incoming unsend) and WhatsApp in both directions: an outgoing message the business deleted (via the Cloud API, or from the WhatsApp Business app on a Coexistence number) and an incoming message the customer deleted. Read `message.direction` to tell the two apart. The payload retains the pre-delete text and attachments so API consumers can access the original content for moderation or compliance; the Zernio dashboard UI hides it.
|
|
814
814
|
|
|
815
815
|
### Examples
|
|
816
816
|
|
|
@@ -162,6 +162,78 @@ module Zernio
|
|
|
162
162
|
return data, status_code, headers
|
|
163
163
|
end
|
|
164
164
|
|
|
165
|
+
# Get a review
|
|
166
|
+
# Returns one Google Business review, in the same shape as the entries of GET /v1/accounts/{accountId}/gmb-reviews. The review is read from the account's selected location unless locationId overrides it, and Google returns 404 for a review id that belongs to another location. Read the review before replying if a human may have answered it already: replies are overwritten in place and Google keeps no history.
|
|
167
|
+
# @param account_id [String] The Zernio account ID (from /v1/accounts)
|
|
168
|
+
# @param review_id [String] The review ID portion (e.g. \"AIe9_BGx1234567890\"), not the full resource name
|
|
169
|
+
# @param [Hash] opts the optional parameters
|
|
170
|
+
# @option opts [String] :location_id Override which location to read the review from. If omitted, uses the account's selected location. Use GET /gmb-locations to list valid IDs.
|
|
171
|
+
# @return [GetGoogleBusinessReview200Response]
|
|
172
|
+
def get_google_business_review(account_id, review_id, opts = {})
|
|
173
|
+
data, _status_code, _headers = get_google_business_review_with_http_info(account_id, review_id, opts)
|
|
174
|
+
data
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Get a review
|
|
178
|
+
# Returns one Google Business review, in the same shape as the entries of GET /v1/accounts/{accountId}/gmb-reviews. The review is read from the account's selected location unless locationId overrides it, and Google returns 404 for a review id that belongs to another location. Read the review before replying if a human may have answered it already: replies are overwritten in place and Google keeps no history.
|
|
179
|
+
# @param account_id [String] The Zernio account ID (from /v1/accounts)
|
|
180
|
+
# @param review_id [String] The review ID portion (e.g. \"AIe9_BGx1234567890\"), not the full resource name
|
|
181
|
+
# @param [Hash] opts the optional parameters
|
|
182
|
+
# @option opts [String] :location_id Override which location to read the review from. If omitted, uses the account's selected location. Use GET /gmb-locations to list valid IDs.
|
|
183
|
+
# @return [Array<(GetGoogleBusinessReview200Response, Integer, Hash)>] GetGoogleBusinessReview200Response data, response status code and response headers
|
|
184
|
+
def get_google_business_review_with_http_info(account_id, review_id, opts = {})
|
|
185
|
+
if @api_client.config.debugging
|
|
186
|
+
@api_client.config.logger.debug 'Calling API: GMBReviewsApi.get_google_business_review ...'
|
|
187
|
+
end
|
|
188
|
+
# verify the required parameter 'account_id' is set
|
|
189
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
190
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling GMBReviewsApi.get_google_business_review"
|
|
191
|
+
end
|
|
192
|
+
# verify the required parameter 'review_id' is set
|
|
193
|
+
if @api_client.config.client_side_validation && review_id.nil?
|
|
194
|
+
fail ArgumentError, "Missing the required parameter 'review_id' when calling GMBReviewsApi.get_google_business_review"
|
|
195
|
+
end
|
|
196
|
+
# resource path
|
|
197
|
+
local_var_path = '/v1/accounts/{accountId}/gmb-reviews/{reviewId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'reviewId' + '}', CGI.escape(review_id.to_s))
|
|
198
|
+
|
|
199
|
+
# query parameters
|
|
200
|
+
query_params = opts[:query_params] || {}
|
|
201
|
+
query_params[:'locationId'] = opts[:'location_id'] if !opts[:'location_id'].nil?
|
|
202
|
+
|
|
203
|
+
# header parameters
|
|
204
|
+
header_params = opts[:header_params] || {}
|
|
205
|
+
# HTTP header 'Accept' (if needed)
|
|
206
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
207
|
+
|
|
208
|
+
# form parameters
|
|
209
|
+
form_params = opts[:form_params] || {}
|
|
210
|
+
|
|
211
|
+
# http body (model)
|
|
212
|
+
post_body = opts[:debug_body]
|
|
213
|
+
|
|
214
|
+
# return_type
|
|
215
|
+
return_type = opts[:debug_return_type] || 'GetGoogleBusinessReview200Response'
|
|
216
|
+
|
|
217
|
+
# auth_names
|
|
218
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
219
|
+
|
|
220
|
+
new_options = opts.merge(
|
|
221
|
+
:operation => :"GMBReviewsApi.get_google_business_review",
|
|
222
|
+
:header_params => header_params,
|
|
223
|
+
:query_params => query_params,
|
|
224
|
+
:form_params => form_params,
|
|
225
|
+
:body => post_body,
|
|
226
|
+
:auth_names => auth_names,
|
|
227
|
+
:return_type => return_type
|
|
228
|
+
)
|
|
229
|
+
|
|
230
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
231
|
+
if @api_client.config.debugging
|
|
232
|
+
@api_client.config.logger.debug "API called: GMBReviewsApi#get_google_business_review\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
233
|
+
end
|
|
234
|
+
return data, status_code, headers
|
|
235
|
+
end
|
|
236
|
+
|
|
165
237
|
# Get reviews
|
|
166
238
|
# Returns reviews for a GBP account including ratings, comments, and owner replies. Use nextPageToken for pagination.
|
|
167
239
|
# @param account_id [String] The Zernio account ID (from /v1/accounts)
|
|
@@ -746,7 +746,7 @@ module Zernio
|
|
|
746
746
|
end
|
|
747
747
|
|
|
748
748
|
# Message deleted event
|
|
749
|
-
# Fired when a sender deletes (unsends) a message. Supported on Instagram (incoming unsend) and WhatsApp
|
|
749
|
+
# Fired when a sender deletes (unsends) a message. Supported on Instagram (incoming unsend) and WhatsApp in both directions: an outgoing message the business deleted (via the Cloud API, or from the WhatsApp Business app on a Coexistence number) and an incoming message the customer deleted. Read `message.direction` to tell the two apart. The payload retains the pre-delete text and attachments so API consumers can access the original content for moderation or compliance; the Zernio dashboard UI hides it.
|
|
750
750
|
# @param webhook_payload_message_deleted [WebhookPayloadMessageDeleted]
|
|
751
751
|
# @param [Hash] opts the optional parameters
|
|
752
752
|
# @return [nil]
|
|
@@ -756,7 +756,7 @@ module Zernio
|
|
|
756
756
|
end
|
|
757
757
|
|
|
758
758
|
# Message deleted event
|
|
759
|
-
# Fired when a sender deletes (unsends) a message. Supported on Instagram (incoming unsend) and WhatsApp
|
|
759
|
+
# Fired when a sender deletes (unsends) a message. Supported on Instagram (incoming unsend) and WhatsApp in both directions: an outgoing message the business deleted (via the Cloud API, or from the WhatsApp Business app on a Coexistence number) and an incoming message the customer deleted. Read `message.direction` to tell the two apart. The payload retains the pre-delete text and attachments so API consumers can access the original content for moderation or compliance; the Zernio dashboard UI hides it.
|
|
760
760
|
# @param webhook_payload_message_deleted [WebhookPayloadMessageDeleted]
|
|
761
761
|
# @param [Hash] opts the optional parameters
|
|
762
762
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.4
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Zernio
|
|
17
|
+
class GetGoogleBusinessReview200Response < ApiModelBase
|
|
18
|
+
attr_accessor :success
|
|
19
|
+
|
|
20
|
+
attr_accessor :account_id
|
|
21
|
+
|
|
22
|
+
attr_accessor :location_id
|
|
23
|
+
|
|
24
|
+
attr_accessor :review
|
|
25
|
+
|
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
|
+
def self.attribute_map
|
|
28
|
+
{
|
|
29
|
+
:'success' => :'success',
|
|
30
|
+
:'account_id' => :'accountId',
|
|
31
|
+
:'location_id' => :'locationId',
|
|
32
|
+
:'review' => :'review'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns attribute mapping this model knows about
|
|
37
|
+
def self.acceptable_attribute_map
|
|
38
|
+
attribute_map
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns all the JSON keys this model knows about
|
|
42
|
+
def self.acceptable_attributes
|
|
43
|
+
acceptable_attribute_map.values
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute type mapping.
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'success' => :'Boolean',
|
|
50
|
+
:'account_id' => :'String',
|
|
51
|
+
:'location_id' => :'String',
|
|
52
|
+
:'review' => :'GoogleBusinessReview'
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# List of attributes with nullable: true
|
|
57
|
+
def self.openapi_nullable
|
|
58
|
+
Set.new([
|
|
59
|
+
])
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Initializes the object
|
|
63
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
64
|
+
def initialize(attributes = {})
|
|
65
|
+
if (!attributes.is_a?(Hash))
|
|
66
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GetGoogleBusinessReview200Response` initialize method"
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
70
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
72
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
73
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GetGoogleBusinessReview200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
74
|
+
end
|
|
75
|
+
h[k.to_sym] = v
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'success')
|
|
79
|
+
self.success = attributes[:'success']
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'account_id')
|
|
83
|
+
self.account_id = attributes[:'account_id']
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'location_id')
|
|
87
|
+
self.location_id = attributes[:'location_id']
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'review')
|
|
91
|
+
self.review = attributes[:'review']
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
96
|
+
# @return Array for valid properties with the reasons
|
|
97
|
+
def list_invalid_properties
|
|
98
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
99
|
+
invalid_properties = Array.new
|
|
100
|
+
invalid_properties
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Check to see if the all the properties in the model are valid
|
|
104
|
+
# @return true if the model is valid
|
|
105
|
+
def valid?
|
|
106
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
107
|
+
true
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Checks equality by comparing each attribute.
|
|
111
|
+
# @param [Object] Object to be compared
|
|
112
|
+
def ==(o)
|
|
113
|
+
return true if self.equal?(o)
|
|
114
|
+
self.class == o.class &&
|
|
115
|
+
success == o.success &&
|
|
116
|
+
account_id == o.account_id &&
|
|
117
|
+
location_id == o.location_id &&
|
|
118
|
+
review == o.review
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# @see the `==` method
|
|
122
|
+
# @param [Object] Object to be compared
|
|
123
|
+
def eql?(o)
|
|
124
|
+
self == o
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Calculates hash code according to all attributes.
|
|
128
|
+
# @return [Integer] Hash code
|
|
129
|
+
def hash
|
|
130
|
+
[success, account_id, location_id, review].hash
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Builds the object from hash
|
|
134
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
135
|
+
# @return [Object] Returns the model itself
|
|
136
|
+
def self.build_from_hash(attributes)
|
|
137
|
+
return nil unless attributes.is_a?(Hash)
|
|
138
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
139
|
+
transformed_hash = {}
|
|
140
|
+
openapi_types.each_pair do |key, type|
|
|
141
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
142
|
+
transformed_hash["#{key}"] = nil
|
|
143
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
144
|
+
# check to ensure the input is an array given that the attribute
|
|
145
|
+
# is documented as an array but the input is not
|
|
146
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
147
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
148
|
+
end
|
|
149
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
150
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
151
|
+
end
|
|
152
|
+
end
|
|
153
|
+
new(transformed_hash)
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Returns the object in the form of hash
|
|
157
|
+
# @return [Hash] Returns the object in the form of hash
|
|
158
|
+
def to_hash
|
|
159
|
+
hash = {}
|
|
160
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
161
|
+
value = self.send(attr)
|
|
162
|
+
if value.nil?
|
|
163
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
164
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
hash[param] = _to_hash(value)
|
|
168
|
+
end
|
|
169
|
+
hash
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
end
|
|
@@ -61,7 +61,7 @@ module Zernio
|
|
|
61
61
|
:'success' => :'Boolean',
|
|
62
62
|
:'account_id' => :'String',
|
|
63
63
|
:'location_id' => :'String',
|
|
64
|
-
:'reviews' => :'Array<
|
|
64
|
+
:'reviews' => :'Array<GoogleBusinessReview>',
|
|
65
65
|
:'average_rating' => :'Float',
|
|
66
66
|
:'total_review_count' => :'Integer',
|
|
67
67
|
:'next_page_token' => :'String'
|
|
@@ -14,7 +14,8 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
|
-
|
|
17
|
+
# A Google Business Profile review, as returned by every gmb-reviews read endpoint.
|
|
18
|
+
class GoogleBusinessReview < ApiModelBase
|
|
18
19
|
# Review ID
|
|
19
20
|
attr_accessor :id
|
|
20
21
|
|
|
@@ -23,7 +24,7 @@ module Zernio
|
|
|
23
24
|
|
|
24
25
|
attr_accessor :reviewer
|
|
25
26
|
|
|
26
|
-
# Numeric star rating
|
|
27
|
+
# Numeric star rating (0 when Google sends no rating)
|
|
27
28
|
attr_accessor :rating
|
|
28
29
|
|
|
29
30
|
# Google's string rating
|
|
@@ -98,15 +99,15 @@ module Zernio
|
|
|
98
99
|
{
|
|
99
100
|
:'id' => :'String',
|
|
100
101
|
:'name' => :'String',
|
|
101
|
-
:'reviewer' => :'
|
|
102
|
+
:'reviewer' => :'GoogleBusinessReviewReviewer',
|
|
102
103
|
:'rating' => :'Integer',
|
|
103
104
|
:'star_rating' => :'String',
|
|
104
105
|
:'comment' => :'String',
|
|
105
106
|
:'create_time' => :'Time',
|
|
106
107
|
:'update_time' => :'Time',
|
|
107
|
-
:'review_reply' => :'
|
|
108
|
+
:'review_reply' => :'GoogleBusinessReviewReviewReply',
|
|
108
109
|
:'photo_count' => :'Integer',
|
|
109
|
-
:'photos' => :'Array<
|
|
110
|
+
:'photos' => :'Array<ListInboxReviews200ResponseDataInnerPhotosInner>'
|
|
110
111
|
}
|
|
111
112
|
end
|
|
112
113
|
|
|
@@ -120,14 +121,14 @@ module Zernio
|
|
|
120
121
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
121
122
|
def initialize(attributes = {})
|
|
122
123
|
if (!attributes.is_a?(Hash))
|
|
123
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::
|
|
124
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GoogleBusinessReview` initialize method"
|
|
124
125
|
end
|
|
125
126
|
|
|
126
127
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
127
128
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
128
129
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
129
130
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
130
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::
|
|
131
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GoogleBusinessReview`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
131
132
|
end
|
|
132
133
|
h[k.to_sym] = v
|
|
133
134
|
}
|
|
@@ -188,8 +189,8 @@ module Zernio
|
|
|
188
189
|
invalid_properties.push('invalid value for "rating", must be smaller than or equal to 5.')
|
|
189
190
|
end
|
|
190
191
|
|
|
191
|
-
if !@rating.nil? && @rating <
|
|
192
|
-
invalid_properties.push('invalid value for "rating", must be greater than or equal to
|
|
192
|
+
if !@rating.nil? && @rating < 0
|
|
193
|
+
invalid_properties.push('invalid value for "rating", must be greater than or equal to 0.')
|
|
193
194
|
end
|
|
194
195
|
|
|
195
196
|
invalid_properties
|
|
@@ -200,7 +201,7 @@ module Zernio
|
|
|
200
201
|
def valid?
|
|
201
202
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
202
203
|
return false if !@rating.nil? && @rating > 5
|
|
203
|
-
return false if !@rating.nil? && @rating <
|
|
204
|
+
return false if !@rating.nil? && @rating < 0
|
|
204
205
|
star_rating_validator = EnumAttributeValidator.new('String', ["ONE", "TWO", "THREE", "FOUR", "FIVE"])
|
|
205
206
|
return false unless star_rating_validator.valid?(@star_rating)
|
|
206
207
|
true
|
|
@@ -217,8 +218,8 @@ module Zernio
|
|
|
217
218
|
fail ArgumentError, 'invalid value for "rating", must be smaller than or equal to 5.'
|
|
218
219
|
end
|
|
219
220
|
|
|
220
|
-
if rating <
|
|
221
|
-
fail ArgumentError, 'invalid value for "rating", must be greater than or equal to
|
|
221
|
+
if rating < 0
|
|
222
|
+
fail ArgumentError, 'invalid value for "rating", must be greater than or equal to 0.'
|
|
222
223
|
end
|
|
223
224
|
|
|
224
225
|
@rating = rating
|