zernio-sdk 0.0.527 → 0.0.529
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 +1 -0
- data/docs/AdsApi.md +8 -0
- data/docs/AssignGoogleBusinessLocation200ResponseAccount.md +2 -2
- data/docs/BatchGetGoogleBusinessReviews200ResponseLocationReviewsInner.md +2 -2
- data/docs/BatchGetGoogleBusinessReviewsRequest.md +4 -2
- data/docs/CreateAdInsightsReportRequest.md +8 -0
- data/docs/CreateStandaloneAdRequest.md +2 -0
- data/docs/CreateStandaloneAdRequestCarouselCardsInner.md +26 -0
- 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/ads_api.rb +12 -0
- 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/create_ad_insights_report_request.rb +43 -1
- data/lib/zernio-sdk/models/create_standalone_ad_request.rb +41 -1
- data/lib/zernio-sdk/models/create_standalone_ad_request_carousel_cards_inner.rb +243 -0
- 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/lib/zernio-sdk.rb +1 -0
- data/openapi.yaml +59 -14
- data/spec/api/ads_api_spec.rb +4 -0
- 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/create_ad_insights_report_request_spec.rb +24 -0
- data/spec/models/create_standalone_ad_request_carousel_cards_inner_spec.rb +60 -0
- data/spec/models/create_standalone_ad_request_spec.rb +6 -0
- data/spec/models/list_inbox_reviews200_response_data_inner_spec.rb +12 -0
- metadata +5 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2e0db6a79e9e00f953f3027692b48bb968aca3afcf369eb2b39a1d3e7fe8c9c4
|
|
4
|
+
data.tar.gz: fadcc6fc532b75244e7488b02a5f115345f7aedd432c284d3ba2e5dd565dd0ef
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b01573d5ee8adf9f841cf202c718f6b7c9080038e83bce3f3aee59fc7d3495428e208cb3f58891bccd1e2a94b58797cdce10982eeeb44b3e411529b821bb4966
|
|
7
|
+
data.tar.gz: c46db1bad44769174f88ce13a5ecc7f81fe4d353485c4ab69fb582f9825296417f38d58928c8a26891c0ebcd2abf10620d56a05bb6a8c6e9c79279ada1b6a22d
|
data/README.md
CHANGED
|
@@ -780,6 +780,7 @@ Class | Method | HTTP request | Description
|
|
|
780
780
|
- [Zernio::CreateStandaloneAdRequestAttributionSpecInner](docs/CreateStandaloneAdRequestAttributionSpecInner.md)
|
|
781
781
|
- [Zernio::CreateStandaloneAdRequestBehaviorsInner](docs/CreateStandaloneAdRequestBehaviorsInner.md)
|
|
782
782
|
- [Zernio::CreateStandaloneAdRequestBrandIdentity](docs/CreateStandaloneAdRequestBrandIdentity.md)
|
|
783
|
+
- [Zernio::CreateStandaloneAdRequestCarouselCardsInner](docs/CreateStandaloneAdRequestCarouselCardsInner.md)
|
|
783
784
|
- [Zernio::CreateStandaloneAdRequestCitiesInner](docs/CreateStandaloneAdRequestCitiesInner.md)
|
|
784
785
|
- [Zernio::CreateStandaloneAdRequestCreativesInner](docs/CreateStandaloneAdRequestCreativesInner.md)
|
|
785
786
|
- [Zernio::CreateStandaloneAdRequestCreativesInnerVideo](docs/CreateStandaloneAdRequestCreativesInnerVideo.md)
|
data/docs/AdsApi.md
CHANGED
|
@@ -2850,6 +2850,10 @@ opts = {
|
|
|
2850
2850
|
level: 'ad', # String | Row granularity
|
|
2851
2851
|
fields: 'fields_example', # String | Comma-separated Graph insights fields (e.g. spend,impressions,frequency,website_purchase_roas). Omitted = Meta's default set.
|
|
2852
2852
|
breakdowns: 'breakdowns_example', # String | Comma-separated Graph breakdowns (e.g. age,gender or publisher_platform).
|
|
2853
|
+
action_breakdowns: 'action_breakdowns_example', # String | Comma-separated Graph action breakdowns. Segments the actions[] arrays in each row.
|
|
2854
|
+
action_attribution_windows: 'action_attribution_windows_example', # String | Comma-separated Meta attribution windows. Action values are returned keyed per window.
|
|
2855
|
+
action_report_time: 'action_report_time_example', # String | When actions are counted: impression, conversion or mixed.
|
|
2856
|
+
use_unified_attribution_setting: true, # Boolean | Use the ad sets' own attribution settings for action counting.
|
|
2853
2857
|
filtering: 'filtering_example', # String | JSON array of Meta filter objects: [{\"field\", \"operator\", \"value\"}]. Applied server-side by Meta.
|
|
2854
2858
|
date_preset: 'date_preset_example', # String | Meta date_preset (e.g. last_7d, last_30d, this_month). Mutually exclusive with fromDate/toDate.
|
|
2855
2859
|
from_date: Date.parse('2013-10-20'), # Date | Start of range (YYYY-MM-DD); requires toDate.
|
|
@@ -2895,6 +2899,10 @@ end
|
|
|
2895
2899
|
| **level** | **String** | Row granularity | [optional] |
|
|
2896
2900
|
| **fields** | **String** | Comma-separated Graph insights fields (e.g. spend,impressions,frequency,website_purchase_roas). Omitted = Meta's default set. | [optional] |
|
|
2897
2901
|
| **breakdowns** | **String** | Comma-separated Graph breakdowns (e.g. age,gender or publisher_platform). | [optional] |
|
|
2902
|
+
| **action_breakdowns** | **String** | Comma-separated Graph action breakdowns. Segments the actions[] arrays in each row. | [optional] |
|
|
2903
|
+
| **action_attribution_windows** | **String** | Comma-separated Meta attribution windows. Action values are returned keyed per window. | [optional] |
|
|
2904
|
+
| **action_report_time** | **String** | When actions are counted: impression, conversion or mixed. | [optional] |
|
|
2905
|
+
| **use_unified_attribution_setting** | **Boolean** | Use the ad sets' own attribution settings for action counting. | [optional] |
|
|
2898
2906
|
| **filtering** | **String** | JSON array of Meta filter objects: [{\"field\", \"operator\", \"value\"}]. Applied server-side by Meta. | [optional] |
|
|
2899
2907
|
| **date_preset** | **String** | Meta date_preset (e.g. last_7d, last_30d, this_month). Mutually exclusive with fromDate/toDate. | [optional] |
|
|
2900
2908
|
| **from_date** | **Date** | Start of range (YYYY-MM-DD); requires toDate. | [optional] |
|
|
@@ -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
|
|
|
@@ -9,6 +9,10 @@
|
|
|
9
9
|
| **level** | **String** | | [optional] |
|
|
10
10
|
| **fields** | **String** | Comma-separated Graph insights fields. | [optional] |
|
|
11
11
|
| **breakdowns** | **String** | Comma-separated Graph breakdowns. | [optional] |
|
|
12
|
+
| **action_breakdowns** | **String** | Comma-separated Graph action breakdowns (e.g. action_type,action_destination). | [optional] |
|
|
13
|
+
| **action_attribution_windows** | **Array<String>** | Meta attribution windows (e.g. [\"7d_click\", \"1d_view\"]). Action values are returned keyed per window. | [optional] |
|
|
14
|
+
| **action_report_time** | **String** | When actions are counted: impression, conversion or mixed. | [optional] |
|
|
15
|
+
| **use_unified_attribution_setting** | **Boolean** | Use the ad sets' own attribution settings for action counting. | [optional] |
|
|
12
16
|
| **filtering** | [**Array<CreateAdInsightsReportRequestFilteringInner>**](CreateAdInsightsReportRequestFilteringInner.md) | Meta filter objects, applied server-side. | [optional] |
|
|
13
17
|
| **date_preset** | **String** | Mutually exclusive with fromDate/toDate. | [optional] |
|
|
14
18
|
| **from_date** | **Date** | | [optional] |
|
|
@@ -26,6 +30,10 @@ instance = Zernio::CreateAdInsightsReportRequest.new(
|
|
|
26
30
|
level: null,
|
|
27
31
|
fields: null,
|
|
28
32
|
breakdowns: null,
|
|
33
|
+
action_breakdowns: null,
|
|
34
|
+
action_attribution_windows: null,
|
|
35
|
+
action_report_time: null,
|
|
36
|
+
use_unified_attribution_setting: null,
|
|
29
37
|
filtering: null,
|
|
30
38
|
date_preset: null,
|
|
31
39
|
from_date: null,
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
| **start_date** | **Time** | Meta only. Ad-set start time (ISO 8601, e.g. \"2026-06-10T09:00:00Z\"), mapped to the ad set's `start_time`. When omitted the ad starts delivering immediately. For lifetime budgets Meta also requires `endDate`. (Same `schedule.startDate` semantics already available on `POST /v1/ads/boost`.) | [optional] |
|
|
58
58
|
| **instagram_account_id** | **String** | Meta only. Override the Instagram account the ad is delivered as — pass an Instagram Business Account ID (e.g. 17841...), mapped to the creative's `instagram_user_id`. When omitted we auto-resolve the IG account linked to the connected Facebook Page (the existing default). Useful when a Page has more than one eligible IG account. | [optional] |
|
|
59
59
|
| **dynamic_creative** | [**CreateStandaloneAdRequestDynamicCreative**](CreateStandaloneAdRequestDynamicCreative.md) | | [optional] |
|
|
60
|
+
| **carousel_cards** | [**Array<CreateStandaloneAdRequestCarouselCardsInner>**](CreateStandaloneAdRequestCarouselCardsInner.md) | Meta only. Hand-built carousel: 2-10 authored cards in DETERMINISTIC order, mapped to the creative's `link_data.child_attachments`. Unlike `dynamicCreative`, you control the card order and per-card copy/link. Requires top-level `body`, `linkUrl` and `callToAction`. Mutually exclusive with `imageUrl`/`video`, `creatives[]`, `dynamicCreative`, `placementAssets`, `existingCreativeId`, `adSetId`, `leadGenFormId` and goal `catalog_sales`. | [optional] |
|
|
60
61
|
| **placement_assets** | [**CreateStandaloneAdRequestPlacementAssets**](CreateStandaloneAdRequestPlacementAssets.md) | | [optional] |
|
|
61
62
|
| **audience_id** | **String** | Custom audience ID for targeting | [optional] |
|
|
62
63
|
| **campaign_type** | **String** | Google only | [optional][default to 'display'] |
|
|
@@ -135,6 +136,7 @@ instance = Zernio::CreateStandaloneAdRequest.new(
|
|
|
135
136
|
start_date: null,
|
|
136
137
|
instagram_account_id: null,
|
|
137
138
|
dynamic_creative: null,
|
|
139
|
+
carousel_cards: null,
|
|
138
140
|
placement_assets: null,
|
|
139
141
|
audience_id: null,
|
|
140
142
|
campaign_type: null,
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Zernio::CreateStandaloneAdRequestCarouselCardsInner
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **image_url** | **String** | Card image; uploaded to the ad account and referenced by hash. | |
|
|
8
|
+
| **link_url** | **String** | Card destination URL. Defaults to the top-level linkUrl. | [optional] |
|
|
9
|
+
| **headline** | **String** | Card headline, shown below the card image. | [optional] |
|
|
10
|
+
| **description** | **String** | Card description, shown under the headline. | [optional] |
|
|
11
|
+
| **call_to_action** | **String** | Card CTA override. Defaults to the top-level callToAction; same enum. | [optional] |
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'zernio-sdk'
|
|
17
|
+
|
|
18
|
+
instance = Zernio::CreateStandaloneAdRequestCarouselCardsInner.new(
|
|
19
|
+
image_url: null,
|
|
20
|
+
link_url: null,
|
|
21
|
+
headline: null,
|
|
22
|
+
description: null,
|
|
23
|
+
call_to_action: null
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|
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
|
|
|
@@ -2841,6 +2841,10 @@ module Zernio
|
|
|
2841
2841
|
# @option opts [String] :level Row granularity
|
|
2842
2842
|
# @option opts [String] :fields Comma-separated Graph insights fields (e.g. spend,impressions,frequency,website_purchase_roas). Omitted = Meta's default set.
|
|
2843
2843
|
# @option opts [String] :breakdowns Comma-separated Graph breakdowns (e.g. age,gender or publisher_platform).
|
|
2844
|
+
# @option opts [String] :action_breakdowns Comma-separated Graph action breakdowns. Segments the actions[] arrays in each row.
|
|
2845
|
+
# @option opts [String] :action_attribution_windows Comma-separated Meta attribution windows. Action values are returned keyed per window.
|
|
2846
|
+
# @option opts [String] :action_report_time When actions are counted: impression, conversion or mixed.
|
|
2847
|
+
# @option opts [Boolean] :use_unified_attribution_setting Use the ad sets' own attribution settings for action counting.
|
|
2844
2848
|
# @option opts [String] :filtering JSON array of Meta filter objects: [{\"field\", \"operator\", \"value\"}]. Applied server-side by Meta.
|
|
2845
2849
|
# @option opts [String] :date_preset Meta date_preset (e.g. last_7d, last_30d, this_month). Mutually exclusive with fromDate/toDate.
|
|
2846
2850
|
# @option opts [Date] :from_date Start of range (YYYY-MM-DD); requires toDate.
|
|
@@ -2862,6 +2866,10 @@ module Zernio
|
|
|
2862
2866
|
# @option opts [String] :level Row granularity
|
|
2863
2867
|
# @option opts [String] :fields Comma-separated Graph insights fields (e.g. spend,impressions,frequency,website_purchase_roas). Omitted = Meta's default set.
|
|
2864
2868
|
# @option opts [String] :breakdowns Comma-separated Graph breakdowns (e.g. age,gender or publisher_platform).
|
|
2869
|
+
# @option opts [String] :action_breakdowns Comma-separated Graph action breakdowns. Segments the actions[] arrays in each row.
|
|
2870
|
+
# @option opts [String] :action_attribution_windows Comma-separated Meta attribution windows. Action values are returned keyed per window.
|
|
2871
|
+
# @option opts [String] :action_report_time When actions are counted: impression, conversion or mixed.
|
|
2872
|
+
# @option opts [Boolean] :use_unified_attribution_setting Use the ad sets' own attribution settings for action counting.
|
|
2865
2873
|
# @option opts [String] :filtering JSON array of Meta filter objects: [{\"field\", \"operator\", \"value\"}]. Applied server-side by Meta.
|
|
2866
2874
|
# @option opts [String] :date_preset Meta date_preset (e.g. last_7d, last_30d, this_month). Mutually exclusive with fromDate/toDate.
|
|
2867
2875
|
# @option opts [Date] :from_date Start of range (YYYY-MM-DD); requires toDate.
|
|
@@ -2904,6 +2912,10 @@ module Zernio
|
|
|
2904
2912
|
query_params[:'level'] = opts[:'level'] if !opts[:'level'].nil?
|
|
2905
2913
|
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
|
2906
2914
|
query_params[:'breakdowns'] = opts[:'breakdowns'] if !opts[:'breakdowns'].nil?
|
|
2915
|
+
query_params[:'actionBreakdowns'] = opts[:'action_breakdowns'] if !opts[:'action_breakdowns'].nil?
|
|
2916
|
+
query_params[:'actionAttributionWindows'] = opts[:'action_attribution_windows'] if !opts[:'action_attribution_windows'].nil?
|
|
2917
|
+
query_params[:'actionReportTime'] = opts[:'action_report_time'] if !opts[:'action_report_time'].nil?
|
|
2918
|
+
query_params[:'useUnifiedAttributionSetting'] = opts[:'use_unified_attribution_setting'] if !opts[:'use_unified_attribution_setting'].nil?
|
|
2907
2919
|
query_params[:'filtering'] = opts[:'filtering'] if !opts[:'filtering'].nil?
|
|
2908
2920
|
query_params[:'datePreset'] = opts[:'date_preset'] if !opts[:'date_preset'].nil?
|
|
2909
2921
|
query_params[:'fromDate'] = opts[:'from_date'] if !opts[:'from_date'].nil?
|
|
@@ -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
|
|
@@ -29,6 +29,18 @@ module Zernio
|
|
|
29
29
|
# Comma-separated Graph breakdowns.
|
|
30
30
|
attr_accessor :breakdowns
|
|
31
31
|
|
|
32
|
+
# Comma-separated Graph action breakdowns (e.g. action_type,action_destination).
|
|
33
|
+
attr_accessor :action_breakdowns
|
|
34
|
+
|
|
35
|
+
# Meta attribution windows (e.g. [\"7d_click\", \"1d_view\"]). Action values are returned keyed per window.
|
|
36
|
+
attr_accessor :action_attribution_windows
|
|
37
|
+
|
|
38
|
+
# When actions are counted: impression, conversion or mixed.
|
|
39
|
+
attr_accessor :action_report_time
|
|
40
|
+
|
|
41
|
+
# Use the ad sets' own attribution settings for action counting.
|
|
42
|
+
attr_accessor :use_unified_attribution_setting
|
|
43
|
+
|
|
32
44
|
# Meta filter objects, applied server-side.
|
|
33
45
|
attr_accessor :filtering
|
|
34
46
|
|
|
@@ -71,6 +83,10 @@ module Zernio
|
|
|
71
83
|
:'level' => :'level',
|
|
72
84
|
:'fields' => :'fields',
|
|
73
85
|
:'breakdowns' => :'breakdowns',
|
|
86
|
+
:'action_breakdowns' => :'actionBreakdowns',
|
|
87
|
+
:'action_attribution_windows' => :'actionAttributionWindows',
|
|
88
|
+
:'action_report_time' => :'actionReportTime',
|
|
89
|
+
:'use_unified_attribution_setting' => :'useUnifiedAttributionSetting',
|
|
74
90
|
:'filtering' => :'filtering',
|
|
75
91
|
:'date_preset' => :'datePreset',
|
|
76
92
|
:'from_date' => :'fromDate',
|
|
@@ -97,6 +113,10 @@ module Zernio
|
|
|
97
113
|
:'level' => :'String',
|
|
98
114
|
:'fields' => :'String',
|
|
99
115
|
:'breakdowns' => :'String',
|
|
116
|
+
:'action_breakdowns' => :'String',
|
|
117
|
+
:'action_attribution_windows' => :'Array<String>',
|
|
118
|
+
:'action_report_time' => :'String',
|
|
119
|
+
:'use_unified_attribution_setting' => :'Boolean',
|
|
100
120
|
:'filtering' => :'Array<CreateAdInsightsReportRequestFilteringInner>',
|
|
101
121
|
:'date_preset' => :'String',
|
|
102
122
|
:'from_date' => :'Date',
|
|
@@ -151,6 +171,24 @@ module Zernio
|
|
|
151
171
|
self.breakdowns = attributes[:'breakdowns']
|
|
152
172
|
end
|
|
153
173
|
|
|
174
|
+
if attributes.key?(:'action_breakdowns')
|
|
175
|
+
self.action_breakdowns = attributes[:'action_breakdowns']
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
if attributes.key?(:'action_attribution_windows')
|
|
179
|
+
if (value = attributes[:'action_attribution_windows']).is_a?(Array)
|
|
180
|
+
self.action_attribution_windows = value
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
if attributes.key?(:'action_report_time')
|
|
185
|
+
self.action_report_time = attributes[:'action_report_time']
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
if attributes.key?(:'use_unified_attribution_setting')
|
|
189
|
+
self.use_unified_attribution_setting = attributes[:'use_unified_attribution_setting']
|
|
190
|
+
end
|
|
191
|
+
|
|
154
192
|
if attributes.key?(:'filtering')
|
|
155
193
|
if (value = attributes[:'filtering']).is_a?(Array)
|
|
156
194
|
self.filtering = value
|
|
@@ -241,6 +279,10 @@ module Zernio
|
|
|
241
279
|
level == o.level &&
|
|
242
280
|
fields == o.fields &&
|
|
243
281
|
breakdowns == o.breakdowns &&
|
|
282
|
+
action_breakdowns == o.action_breakdowns &&
|
|
283
|
+
action_attribution_windows == o.action_attribution_windows &&
|
|
284
|
+
action_report_time == o.action_report_time &&
|
|
285
|
+
use_unified_attribution_setting == o.use_unified_attribution_setting &&
|
|
244
286
|
filtering == o.filtering &&
|
|
245
287
|
date_preset == o.date_preset &&
|
|
246
288
|
from_date == o.from_date &&
|
|
@@ -257,7 +299,7 @@ module Zernio
|
|
|
257
299
|
# Calculates hash code according to all attributes.
|
|
258
300
|
# @return [Integer] Hash code
|
|
259
301
|
def hash
|
|
260
|
-
[account_id, object_id, level, fields, breakdowns, filtering, date_preset, from_date, to_date, time_increment].hash
|
|
302
|
+
[account_id, object_id, level, fields, breakdowns, action_breakdowns, action_attribution_windows, action_report_time, use_unified_attribution_setting, filtering, date_preset, from_date, to_date, time_increment].hash
|
|
261
303
|
end
|
|
262
304
|
|
|
263
305
|
# Builds the object from hash
|