zernio-sdk 0.0.1275 → 0.0.1276
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/AdAudiencesApi.md +1 -1
- data/docs/UploadedOrDerivedAudience.md +30 -6
- data/lib/zernio-sdk/api/ad_audiences_api.rb +2 -2
- data/lib/zernio-sdk/models/list_ad_audiences200_response_audiences_inner.rb +2 -2
- data/lib/zernio-sdk/models/uploaded_or_derived_audience.rb +252 -15
- data/lib/zernio-sdk/version.rb +1 -1
- data/openapi.yaml +1 -1
- data/spec/api/ad_audiences_api_spec.rb +1 -1
- data/spec/models/list_ad_audiences200_response_audiences_inner_spec.rb +1 -1
- data/spec/models/uploaded_or_derived_audience_spec.rb +93 -1
- 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: 03c77fdcb2a67c496d311d5c1455961a78caadc766855a7d88a092458b0a92e3
|
|
4
|
+
data.tar.gz: aab9b2398b60d7662aee18385c18ed1fd1553b38bc38f5e0bd4c647ca66019df
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fe94bee5983af27954d692a0c5c787b6571c8dc0fe36c431f457a8f3abf614fbdc18d708be7196859a4041172ca940fb0eb2a10b8b4283edced8008efdd65444
|
|
7
|
+
data.tar.gz: 03221cb7beb2de1545ccae213ee829d2ed9fb82c2321f43e875a98f4c68e7dcd26e60631f0dfdf1e23f0b3034ba37d98bf5f93d1429acb87f470adcaf7824e41
|
data/docs/AdAudiencesApi.md
CHANGED
|
@@ -90,7 +90,7 @@ end
|
|
|
90
90
|
|
|
91
91
|
Create custom audience
|
|
92
92
|
|
|
93
|
-
Create a custom audience. `customer_list` is supported on Meta, Google, X, LinkedIn, TikTok, and Pinterest
|
|
93
|
+
Create a custom audience. `customer_list` is supported on Meta, Google, X, LinkedIn, TikTok, and Pinterest. `website` (pixel/tag visitors) and `lookalike` are supported on Meta, TikTok, Pinterest and Google. `meta_engagement` is Meta-only, `tiktok_engagement` TikTok-only, `pinterest_engagement` Pinterest-only; `company_list`, `engagement` and `website_retargeting` are LinkedIn-only. A type sent to a platform that does not support it is a 422 `FEATURE_NOT_AVAILABLE`. Per-platform rules for `website`: - Meta: `pixelId` required, `retentionDays` 1-180, optional `urlContains` or raw `rule`. `event` is not accepted. - TikTok: `pixelId` required, `retentionDays` one of 7, 14, 30, 60, 90, 180. `event` is a TikTok pixel event (default `PAGE BROWSE`; also `CLICK BUTTON`, `PIXEL SUBMIT FORM`, `CONTACT`, `DOWNLOAD`, `PIXEL ADD PAYMENT INFO`, `COMPLETE PAYMENT`, `INITIATE CHECKOUT`, `COMPLETE REGISTRATION`, `PRODUCT DETAIL PAGE BROWSE`, `PIXEL SEARCH`, `PIXEL ADD TO CART`, `PLACE AN ORDER`, `PIXEL ADD TO WISHLIST`, `PIXEL SUBSCRIBE`), optional `urlContains`. - Pinterest: `pixelId` is the Pinterest tag id, `retentionDays` 1-540, optional `event` (e.g. `checkout`, `addtocart`). Pinterest matches URLs exactly, so `urlContains` is a 400 there. - Google: no `pixelId` (the account's Google tag is used), `retentionDays` 1-540, `urlContains` defaults to `/` (all visitors). Built as a rule-based user list with prepopulation requested. Per-platform rules for `lookalike`: Meta takes `ratio` (0.01-0.20); Pinterest takes `ratio` in whole percents (0.01-0.10) and `country` US, CA or GB; TikTok and Google take `size` (narrow, balanced, broad) instead of `ratio`. TikTok needs a seed with at least 1,000 matched people. `saved_targeting` stores a reusable TargetingSpec (no member upload, no adAccountId) that you reference later via `savedTargetingId` on `POST /v1/ads/create`. How the audience gets filled depends on the type: - `customer_list` is created empty. Add members with `POST /v1/ads/audiences/{audienceId}/users`. On TikTok and Pinterest the audience is provisioned lazily on that first upload (until then its status is `pending`). - `company_list` is filled AT CREATION from the `companies` array below, which is required. To change the list afterwards send the new full list to `POST /v1/ads/audiences/{audienceId}/companies` (a replace, not a merge). The `/users` endpoint rejects these audiences with a 422. - `website`, `website_retargeting`, `engagement`, `meta_engagement`, `tiktok_engagement`, `pinterest_engagement` and `lookalike` fill themselves from the pixel, engagement source or seed audience you point them at. They take no member upload at all. Create is not idempotent, never auto-retry.
|
|
94
94
|
|
|
95
95
|
### Examples
|
|
96
96
|
|
|
@@ -15,16 +15,28 @@
|
|
|
15
15
|
| **lookback_days** | **Integer** | Required for engagement audiences. Rolling window. | [optional] |
|
|
16
16
|
| **engagement_sources** | **Array<String>** | Required for engagement audiences. Campaign URNs for the ad source types, organization URNs for pages and events. LinkedIn creates one rule per source, all sharing the same trigger and lookbackDays. | [optional] |
|
|
17
17
|
| **companies** | [**Array<UploadedOrDerivedAudienceCompaniesInner>**](UploadedOrDerivedAudienceCompaniesInner.md) | Required for company_list audiences (LinkedIn only): plain-text company rows for account targeting. Each row needs at least one identifier. Not hashed, LinkedIn matches these against its own company graph. LinkedIn recommends 1,000+ companies for a usable match rate and takes up to 48h to process the list. Replace the list later with POST /v1/ads/audiences/{audienceId}/companies. | [optional] |
|
|
18
|
-
| **pixel_id** | **String** | Required
|
|
19
|
-
| **retention_days** | **Integer** | Required for website (max 180
|
|
18
|
+
| **pixel_id** | **String** | website: the Meta pixel, TikTok pixel or Pinterest tag id. Required on those three, rejected on Google. | [optional] |
|
|
19
|
+
| **retention_days** | **Integer** | Required for website (Meta max 180, TikTok 7/14/30/60/90/180, Pinterest and Google max 540), meta_engagement (max 365) and tiktok_engagement (7/14/30/60/90/180; organic and live video and most business-account events only 7/14/30). | [optional] |
|
|
20
20
|
| **engagement_source** | **String** | Required for meta_engagement audiences (Meta only): what people engaged with. `page` = a Facebook Page, `instagram` = an IG professional account, `video` = a video. | [optional] |
|
|
21
21
|
| **source_id** | **String** | Required for meta_engagement: the Page / IG account / video id. | [optional] |
|
|
22
|
-
| **event** | **String** | meta_engagement
|
|
22
|
+
| **event** | **String** | meta_engagement: the engagement event; defaults per source (page → page_engaged, instagram → ig_business_profile_all, video → video_watched). Ignored when `rule` is provided. website on TikTok: the pixel event (default `PAGE BROWSE`). website on Pinterest: the tag event (`pagevisit`, `signup`, `checkout`, `viewcategory`, `search`, `addtocart`, `watchvideo`, `lead`, `custom` or a partner-defined event). tiktok_engagement (required): the TikTok engagement event, validated per `source` (TikTok's filter values, spaces included): - ads: `CLICK`, `IMPRESSION`, `PLAY 2S`, `PLAY 6S`, `PLAY 25`, `PLAY 50`, `PLAY 75`, `PLAY OVER`, and the `ENGAGEMENT APP PROFILE` / `ENGAGEMENT TIKTOK INSTANT` / `ENGAGEMENT COLLECTION ADS` `CLICK` and `IMPRESSION` events. - organic_video: `ORGANIC VIDEO PLAY 2S`, `ORGANIC VIDEO PLAY 6S`, `ORGANIC VIDEO PLAY OVER`, `ORGANIC VIDEO ENGAGEMENT`. - live_video: `LIVE VIDEO VIEW`, `LIVE VIDEO ENGAGEMENT`. - business_account: `BUSINESS ACCOUNT PROFILE FOLLOW`, `BUSINESS ACCOUNT PROFILE VISIT`, `BUSINESS ACCOUNT ENGAGEMENT`, `BUSINESS ACCOUNT PLAY 2S`, `BUSINESS ACCOUNT PLAY 6S`, `BUSINESS ACCOUNT PLAY OVER` and the rest of TikTok's business-account events. An unknown value is a 400 that lists the valid ones. | [optional] |
|
|
23
23
|
| **source_audience_id** | **String** | Required for lookalike audiences | [optional] |
|
|
24
24
|
| **country** | **String** | 2-letter code, required for lookalike audiences | [optional] |
|
|
25
|
-
| **ratio** | **Float** |
|
|
26
|
-
| **
|
|
27
|
-
| **
|
|
25
|
+
| **ratio** | **Float** | lookalike on Meta (0.01-0.20) and Pinterest (0.01-0.10, whole percents). Rejected on TikTok and Google. | [optional] |
|
|
26
|
+
| **size** | **String** | lookalike on TikTok and Google: audience breadth. Rejected on Meta and Pinterest. | [optional] |
|
|
27
|
+
| **source** | **String** | Required for tiktok_engagement: what people engaged with. | [optional] |
|
|
28
|
+
| **source_ids** | **Array<String>** | tiktok_engagement: ad group / campaign ids for `ads`, video ids for `organic_video` and `live_video` (max 10). Required except for `business_account`. | [optional] |
|
|
29
|
+
| **identity_id** | **String** | tiktok_engagement: the TikTok identity that owns the videos or business account. Required for organic_video, live_video and business_account. | [optional] |
|
|
30
|
+
| **identity_type** | **String** | tiktok_engagement: type of `identityId`. | [optional] |
|
|
31
|
+
| **identity_authorized_bc_id** | **String** | tiktok_engagement: required when identityType is BC_AUTH_TT. | [optional] |
|
|
32
|
+
| **engager_type** | **Integer** | pinterest_engagement: Pinterest's `engager_type`, passed through when set. | [optional] |
|
|
33
|
+
| **engagement_type** | **String** | pinterest_engagement: limit to one engagement action. | [optional] |
|
|
34
|
+
| **engagement_domains** | **Array<String>** | pinterest_engagement: people who engaged with Pins from these domains. The domain must be claimed on the Pinterest account or Pinterest rejects it. | [optional] |
|
|
35
|
+
| **campaign_ids** | **Array<String>** | pinterest_engagement: people who engaged with these campaigns' ads. | [optional] |
|
|
36
|
+
| **ad_ids** | **Array<String>** | pinterest_engagement: people who engaged with these ads. | [optional] |
|
|
37
|
+
| **pin_ids** | **Array<String>** | pinterest_engagement: people who engaged with these Pins. At least one of engagementDomains, campaignIds, adIds or pinIds is required. | [optional] |
|
|
38
|
+
| **url_contains** | **String** | website on Meta, TikTok and Google. Narrows the audience from all visitors to visitors of URLs containing this substring. Ignored when `rule` is supplied. A 400 on Pinterest, which only matches exact URLs. | [optional] |
|
|
39
|
+
| **rule** | **Object** | Meta only (a 400 elsewhere). Optional raw Meta rule, replacing the one we build. Omit it for all visitors of `pixelId`, or use `urlContains` for the common page-match case. For `website` this is Meta's Flexible Audience Rule and is VALIDATED before we call Meta: every entry in `inclusions.rules` (and `exclusions.rules`) must carry `event_sources`, `retention_seconds` AND `filter`. Meta rejects a rule missing any of the three with code 100 / subcode 1713098 (\"Invalid rule JSON format\"), so a bad shape is a 400 here instead. The pre-2018 flat shapes (`{url: ...}`, `{event: ...}`) are not accepted by Meta at all (subcode 1870029). Example, visitors of /checkout in the last 30 days: `{\"inclusions\":{\"operator\":\"or\",\"rules\":[{\"event_sources\":[{\"id\":\"<pixelId>\",\"type\":\"pixel\"}],\"retention_seconds\":2592000,\"filter\":{\"operator\":\"and\",\"filters\":[{\"field\":\"url\",\"operator\":\"i_contains\",\"value\":\"/checkout\"}]}}]}}` Note Meta DERIVES `retention_days` from `retention_seconds` and stores `event_sources[].id` as a number, so a rule read back will not be byte-identical to the one you sent. For `meta_engagement` the rule is forwarded verbatim and NOT validated: that type has two dialects (the `video` source uses a legacy flat array), so no single schema covers both. | [optional] |
|
|
28
40
|
| **customer_file_source** | **String** | Data source declaration for GDPR compliance (customer_list only) | [optional] |
|
|
29
41
|
|
|
30
42
|
## Example
|
|
@@ -52,6 +64,18 @@ instance = Zernio::UploadedOrDerivedAudience.new(
|
|
|
52
64
|
source_audience_id: null,
|
|
53
65
|
country: null,
|
|
54
66
|
ratio: null,
|
|
67
|
+
size: null,
|
|
68
|
+
source: null,
|
|
69
|
+
source_ids: null,
|
|
70
|
+
identity_id: null,
|
|
71
|
+
identity_type: null,
|
|
72
|
+
identity_authorized_bc_id: null,
|
|
73
|
+
engager_type: null,
|
|
74
|
+
engagement_type: null,
|
|
75
|
+
engagement_domains: null,
|
|
76
|
+
campaign_ids: null,
|
|
77
|
+
ad_ids: null,
|
|
78
|
+
pin_ids: null,
|
|
55
79
|
url_contains: null,
|
|
56
80
|
rule: null,
|
|
57
81
|
customer_file_source: null
|
|
@@ -94,7 +94,7 @@ module Zernio
|
|
|
94
94
|
end
|
|
95
95
|
|
|
96
96
|
# Create custom audience
|
|
97
|
-
# Create a custom audience. `customer_list` is supported on Meta, Google, X, LinkedIn, TikTok, and Pinterest
|
|
97
|
+
# Create a custom audience. `customer_list` is supported on Meta, Google, X, LinkedIn, TikTok, and Pinterest. `website` (pixel/tag visitors) and `lookalike` are supported on Meta, TikTok, Pinterest and Google. `meta_engagement` is Meta-only, `tiktok_engagement` TikTok-only, `pinterest_engagement` Pinterest-only; `company_list`, `engagement` and `website_retargeting` are LinkedIn-only. A type sent to a platform that does not support it is a 422 `FEATURE_NOT_AVAILABLE`. Per-platform rules for `website`: - Meta: `pixelId` required, `retentionDays` 1-180, optional `urlContains` or raw `rule`. `event` is not accepted. - TikTok: `pixelId` required, `retentionDays` one of 7, 14, 30, 60, 90, 180. `event` is a TikTok pixel event (default `PAGE BROWSE`; also `CLICK BUTTON`, `PIXEL SUBMIT FORM`, `CONTACT`, `DOWNLOAD`, `PIXEL ADD PAYMENT INFO`, `COMPLETE PAYMENT`, `INITIATE CHECKOUT`, `COMPLETE REGISTRATION`, `PRODUCT DETAIL PAGE BROWSE`, `PIXEL SEARCH`, `PIXEL ADD TO CART`, `PLACE AN ORDER`, `PIXEL ADD TO WISHLIST`, `PIXEL SUBSCRIBE`), optional `urlContains`. - Pinterest: `pixelId` is the Pinterest tag id, `retentionDays` 1-540, optional `event` (e.g. `checkout`, `addtocart`). Pinterest matches URLs exactly, so `urlContains` is a 400 there. - Google: no `pixelId` (the account's Google tag is used), `retentionDays` 1-540, `urlContains` defaults to `/` (all visitors). Built as a rule-based user list with prepopulation requested. Per-platform rules for `lookalike`: Meta takes `ratio` (0.01-0.20); Pinterest takes `ratio` in whole percents (0.01-0.10) and `country` US, CA or GB; TikTok and Google take `size` (narrow, balanced, broad) instead of `ratio`. TikTok needs a seed with at least 1,000 matched people. `saved_targeting` stores a reusable TargetingSpec (no member upload, no adAccountId) that you reference later via `savedTargetingId` on `POST /v1/ads/create`. How the audience gets filled depends on the type: - `customer_list` is created empty. Add members with `POST /v1/ads/audiences/{audienceId}/users`. On TikTok and Pinterest the audience is provisioned lazily on that first upload (until then its status is `pending`). - `company_list` is filled AT CREATION from the `companies` array below, which is required. To change the list afterwards send the new full list to `POST /v1/ads/audiences/{audienceId}/companies` (a replace, not a merge). The `/users` endpoint rejects these audiences with a 422. - `website`, `website_retargeting`, `engagement`, `meta_engagement`, `tiktok_engagement`, `pinterest_engagement` and `lookalike` fill themselves from the pixel, engagement source or seed audience you point them at. They take no member upload at all. Create is not idempotent, never auto-retry.
|
|
98
98
|
# @param create_ad_audience_request [CreateAdAudienceRequest]
|
|
99
99
|
# @param [Hash] opts the optional parameters
|
|
100
100
|
# @return [CreateAdAudience201Response]
|
|
@@ -104,7 +104,7 @@ module Zernio
|
|
|
104
104
|
end
|
|
105
105
|
|
|
106
106
|
# Create custom audience
|
|
107
|
-
# Create a custom audience. `customer_list` is supported on Meta, Google, X, LinkedIn, TikTok, and Pinterest
|
|
107
|
+
# Create a custom audience. `customer_list` is supported on Meta, Google, X, LinkedIn, TikTok, and Pinterest. `website` (pixel/tag visitors) and `lookalike` are supported on Meta, TikTok, Pinterest and Google. `meta_engagement` is Meta-only, `tiktok_engagement` TikTok-only, `pinterest_engagement` Pinterest-only; `company_list`, `engagement` and `website_retargeting` are LinkedIn-only. A type sent to a platform that does not support it is a 422 `FEATURE_NOT_AVAILABLE`. Per-platform rules for `website`: - Meta: `pixelId` required, `retentionDays` 1-180, optional `urlContains` or raw `rule`. `event` is not accepted. - TikTok: `pixelId` required, `retentionDays` one of 7, 14, 30, 60, 90, 180. `event` is a TikTok pixel event (default `PAGE BROWSE`; also `CLICK BUTTON`, `PIXEL SUBMIT FORM`, `CONTACT`, `DOWNLOAD`, `PIXEL ADD PAYMENT INFO`, `COMPLETE PAYMENT`, `INITIATE CHECKOUT`, `COMPLETE REGISTRATION`, `PRODUCT DETAIL PAGE BROWSE`, `PIXEL SEARCH`, `PIXEL ADD TO CART`, `PLACE AN ORDER`, `PIXEL ADD TO WISHLIST`, `PIXEL SUBSCRIBE`), optional `urlContains`. - Pinterest: `pixelId` is the Pinterest tag id, `retentionDays` 1-540, optional `event` (e.g. `checkout`, `addtocart`). Pinterest matches URLs exactly, so `urlContains` is a 400 there. - Google: no `pixelId` (the account's Google tag is used), `retentionDays` 1-540, `urlContains` defaults to `/` (all visitors). Built as a rule-based user list with prepopulation requested. Per-platform rules for `lookalike`: Meta takes `ratio` (0.01-0.20); Pinterest takes `ratio` in whole percents (0.01-0.10) and `country` US, CA or GB; TikTok and Google take `size` (narrow, balanced, broad) instead of `ratio`. TikTok needs a seed with at least 1,000 matched people. `saved_targeting` stores a reusable TargetingSpec (no member upload, no adAccountId) that you reference later via `savedTargetingId` on `POST /v1/ads/create`. How the audience gets filled depends on the type: - `customer_list` is created empty. Add members with `POST /v1/ads/audiences/{audienceId}/users`. On TikTok and Pinterest the audience is provisioned lazily on that first upload (until then its status is `pending`). - `company_list` is filled AT CREATION from the `companies` array below, which is required. To change the list afterwards send the new full list to `POST /v1/ads/audiences/{audienceId}/companies` (a replace, not a merge). The `/users` endpoint rejects these audiences with a 422. - `website`, `website_retargeting`, `engagement`, `meta_engagement`, `tiktok_engagement`, `pinterest_engagement` and `lookalike` fill themselves from the pixel, engagement source or seed audience you point them at. They take no member upload at all. Create is not idempotent, never auto-retry.
|
|
108
108
|
# @param create_ad_audience_request [CreateAdAudienceRequest]
|
|
109
109
|
# @param [Hash] opts the optional parameters
|
|
110
110
|
# @return [Array<(CreateAdAudience201Response, Integer, Hash)>] CreateAdAudience201Response data, response status code and response headers
|
|
@@ -178,7 +178,7 @@ module Zernio
|
|
|
178
178
|
# @return true if the model is valid
|
|
179
179
|
def valid?
|
|
180
180
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
181
|
-
type_validator = EnumAttributeValidator.new('String', ["customer_list", "company_list", "engagement", "meta_engagement", "website", "website_retargeting", "lookalike", "saved_targeting"])
|
|
181
|
+
type_validator = EnumAttributeValidator.new('String', ["customer_list", "company_list", "engagement", "meta_engagement", "tiktok_engagement", "pinterest_engagement", "website", "website_retargeting", "lookalike", "saved_targeting"])
|
|
182
182
|
return false unless type_validator.valid?(@type)
|
|
183
183
|
true
|
|
184
184
|
end
|
|
@@ -186,7 +186,7 @@ module Zernio
|
|
|
186
186
|
# Custom attribute writer method checking allowed values (enum).
|
|
187
187
|
# @param [Object] type Object to be assigned
|
|
188
188
|
def type=(type)
|
|
189
|
-
validator = EnumAttributeValidator.new('String', ["customer_list", "company_list", "engagement", "meta_engagement", "website", "website_retargeting", "lookalike", "saved_targeting"])
|
|
189
|
+
validator = EnumAttributeValidator.new('String', ["customer_list", "company_list", "engagement", "meta_engagement", "tiktok_engagement", "pinterest_engagement", "website", "website_retargeting", "lookalike", "saved_targeting"])
|
|
190
190
|
unless validator.valid?(type)
|
|
191
191
|
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
|
192
192
|
end
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
|
-
# customer_list, website, or
|
|
17
|
+
# customer_list, website, lookalike or engagement audience (uploaded or derived from a source).
|
|
18
18
|
class UploadedOrDerivedAudience < ApiModelBase
|
|
19
19
|
attr_accessor :account_id
|
|
20
20
|
|
|
@@ -45,10 +45,10 @@ module Zernio
|
|
|
45
45
|
# Required for company_list audiences (LinkedIn only): plain-text company rows for account targeting. Each row needs at least one identifier. Not hashed, LinkedIn matches these against its own company graph. LinkedIn recommends 1,000+ companies for a usable match rate and takes up to 48h to process the list. Replace the list later with POST /v1/ads/audiences/{audienceId}/companies.
|
|
46
46
|
attr_accessor :companies
|
|
47
47
|
|
|
48
|
-
# Required
|
|
48
|
+
# website: the Meta pixel, TikTok pixel or Pinterest tag id. Required on those three, rejected on Google.
|
|
49
49
|
attr_accessor :pixel_id
|
|
50
50
|
|
|
51
|
-
# Required for website (max 180
|
|
51
|
+
# Required for website (Meta max 180, TikTok 7/14/30/60/90/180, Pinterest and Google max 540), meta_engagement (max 365) and tiktok_engagement (7/14/30/60/90/180; organic and live video and most business-account events only 7/14/30).
|
|
52
52
|
attr_accessor :retention_days
|
|
53
53
|
|
|
54
54
|
# Required for meta_engagement audiences (Meta only): what people engaged with. `page` = a Facebook Page, `instagram` = an IG professional account, `video` = a video.
|
|
@@ -57,7 +57,7 @@ module Zernio
|
|
|
57
57
|
# Required for meta_engagement: the Page / IG account / video id.
|
|
58
58
|
attr_accessor :source_id
|
|
59
59
|
|
|
60
|
-
# meta_engagement
|
|
60
|
+
# meta_engagement: the engagement event; defaults per source (page → page_engaged, instagram → ig_business_profile_all, video → video_watched). Ignored when `rule` is provided. website on TikTok: the pixel event (default `PAGE BROWSE`). website on Pinterest: the tag event (`pagevisit`, `signup`, `checkout`, `viewcategory`, `search`, `addtocart`, `watchvideo`, `lead`, `custom` or a partner-defined event). tiktok_engagement (required): the TikTok engagement event, validated per `source` (TikTok's filter values, spaces included): - ads: `CLICK`, `IMPRESSION`, `PLAY 2S`, `PLAY 6S`, `PLAY 25`, `PLAY 50`, `PLAY 75`, `PLAY OVER`, and the `ENGAGEMENT APP PROFILE` / `ENGAGEMENT TIKTOK INSTANT` / `ENGAGEMENT COLLECTION ADS` `CLICK` and `IMPRESSION` events. - organic_video: `ORGANIC VIDEO PLAY 2S`, `ORGANIC VIDEO PLAY 6S`, `ORGANIC VIDEO PLAY OVER`, `ORGANIC VIDEO ENGAGEMENT`. - live_video: `LIVE VIDEO VIEW`, `LIVE VIDEO ENGAGEMENT`. - business_account: `BUSINESS ACCOUNT PROFILE FOLLOW`, `BUSINESS ACCOUNT PROFILE VISIT`, `BUSINESS ACCOUNT ENGAGEMENT`, `BUSINESS ACCOUNT PLAY 2S`, `BUSINESS ACCOUNT PLAY 6S`, `BUSINESS ACCOUNT PLAY OVER` and the rest of TikTok's business-account events. An unknown value is a 400 that lists the valid ones.
|
|
61
61
|
attr_accessor :event
|
|
62
62
|
|
|
63
63
|
# Required for lookalike audiences
|
|
@@ -66,13 +66,49 @@ module Zernio
|
|
|
66
66
|
# 2-letter code, required for lookalike audiences
|
|
67
67
|
attr_accessor :country
|
|
68
68
|
|
|
69
|
-
#
|
|
69
|
+
# lookalike on Meta (0.01-0.20) and Pinterest (0.01-0.10, whole percents). Rejected on TikTok and Google.
|
|
70
70
|
attr_accessor :ratio
|
|
71
71
|
|
|
72
|
-
#
|
|
72
|
+
# lookalike on TikTok and Google: audience breadth. Rejected on Meta and Pinterest.
|
|
73
|
+
attr_accessor :size
|
|
74
|
+
|
|
75
|
+
# Required for tiktok_engagement: what people engaged with.
|
|
76
|
+
attr_accessor :source
|
|
77
|
+
|
|
78
|
+
# tiktok_engagement: ad group / campaign ids for `ads`, video ids for `organic_video` and `live_video` (max 10). Required except for `business_account`.
|
|
79
|
+
attr_accessor :source_ids
|
|
80
|
+
|
|
81
|
+
# tiktok_engagement: the TikTok identity that owns the videos or business account. Required for organic_video, live_video and business_account.
|
|
82
|
+
attr_accessor :identity_id
|
|
83
|
+
|
|
84
|
+
# tiktok_engagement: type of `identityId`.
|
|
85
|
+
attr_accessor :identity_type
|
|
86
|
+
|
|
87
|
+
# tiktok_engagement: required when identityType is BC_AUTH_TT.
|
|
88
|
+
attr_accessor :identity_authorized_bc_id
|
|
89
|
+
|
|
90
|
+
# pinterest_engagement: Pinterest's `engager_type`, passed through when set.
|
|
91
|
+
attr_accessor :engager_type
|
|
92
|
+
|
|
93
|
+
# pinterest_engagement: limit to one engagement action.
|
|
94
|
+
attr_accessor :engagement_type
|
|
95
|
+
|
|
96
|
+
# pinterest_engagement: people who engaged with Pins from these domains. The domain must be claimed on the Pinterest account or Pinterest rejects it.
|
|
97
|
+
attr_accessor :engagement_domains
|
|
98
|
+
|
|
99
|
+
# pinterest_engagement: people who engaged with these campaigns' ads.
|
|
100
|
+
attr_accessor :campaign_ids
|
|
101
|
+
|
|
102
|
+
# pinterest_engagement: people who engaged with these ads.
|
|
103
|
+
attr_accessor :ad_ids
|
|
104
|
+
|
|
105
|
+
# pinterest_engagement: people who engaged with these Pins. At least one of engagementDomains, campaignIds, adIds or pinIds is required.
|
|
106
|
+
attr_accessor :pin_ids
|
|
107
|
+
|
|
108
|
+
# website on Meta, TikTok and Google. Narrows the audience from all visitors to visitors of URLs containing this substring. Ignored when `rule` is supplied. A 400 on Pinterest, which only matches exact URLs.
|
|
73
109
|
attr_accessor :url_contains
|
|
74
110
|
|
|
75
|
-
# Optional raw Meta rule, replacing the one we build. Omit it for all visitors of `pixelId`, or use `urlContains` for the common page-match case. For `website` this is Meta's Flexible Audience Rule and is VALIDATED before we call Meta: every entry in `inclusions.rules` (and `exclusions.rules`) must carry `event_sources`, `retention_seconds` AND `filter`. Meta rejects a rule missing any of the three with code 100 / subcode 1713098 (\"Invalid rule JSON format\"), so a bad shape is a 400 here instead. The pre-2018 flat shapes (`{url: ...}`, `{event: ...}`) are not accepted by Meta at all (subcode 1870029). Example, visitors of /checkout in the last 30 days: `{\"inclusions\":{\"operator\":\"or\",\"rules\":[{\"event_sources\":[{\"id\":\"<pixelId>\",\"type\":\"pixel\"}],\"retention_seconds\":2592000,\"filter\":{\"operator\":\"and\",\"filters\":[{\"field\":\"url\",\"operator\":\"i_contains\",\"value\":\"/checkout\"}]}}]}}` Note Meta DERIVES `retention_days` from `retention_seconds` and stores `event_sources[].id` as a number, so a rule read back will not be byte-identical to the one you sent. For `meta_engagement` the rule is forwarded verbatim and NOT validated: that type has two dialects (the `video` source uses a legacy flat array), so no single schema covers both.
|
|
111
|
+
# Meta only (a 400 elsewhere). Optional raw Meta rule, replacing the one we build. Omit it for all visitors of `pixelId`, or use `urlContains` for the common page-match case. For `website` this is Meta's Flexible Audience Rule and is VALIDATED before we call Meta: every entry in `inclusions.rules` (and `exclusions.rules`) must carry `event_sources`, `retention_seconds` AND `filter`. Meta rejects a rule missing any of the three with code 100 / subcode 1713098 (\"Invalid rule JSON format\"), so a bad shape is a 400 here instead. The pre-2018 flat shapes (`{url: ...}`, `{event: ...}`) are not accepted by Meta at all (subcode 1870029). Example, visitors of /checkout in the last 30 days: `{\"inclusions\":{\"operator\":\"or\",\"rules\":[{\"event_sources\":[{\"id\":\"<pixelId>\",\"type\":\"pixel\"}],\"retention_seconds\":2592000,\"filter\":{\"operator\":\"and\",\"filters\":[{\"field\":\"url\",\"operator\":\"i_contains\",\"value\":\"/checkout\"}]}}]}}` Note Meta DERIVES `retention_days` from `retention_seconds` and stores `event_sources[].id` as a number, so a rule read back will not be byte-identical to the one you sent. For `meta_engagement` the rule is forwarded verbatim and NOT validated: that type has two dialects (the `video` source uses a legacy flat array), so no single schema covers both.
|
|
76
112
|
attr_accessor :rule
|
|
77
113
|
|
|
78
114
|
# Data source declaration for GDPR compliance (customer_list only)
|
|
@@ -122,6 +158,18 @@ module Zernio
|
|
|
122
158
|
:'source_audience_id' => :'sourceAudienceId',
|
|
123
159
|
:'country' => :'country',
|
|
124
160
|
:'ratio' => :'ratio',
|
|
161
|
+
:'size' => :'size',
|
|
162
|
+
:'source' => :'source',
|
|
163
|
+
:'source_ids' => :'sourceIds',
|
|
164
|
+
:'identity_id' => :'identityId',
|
|
165
|
+
:'identity_type' => :'identityType',
|
|
166
|
+
:'identity_authorized_bc_id' => :'identityAuthorizedBcId',
|
|
167
|
+
:'engager_type' => :'engagerType',
|
|
168
|
+
:'engagement_type' => :'engagementType',
|
|
169
|
+
:'engagement_domains' => :'engagementDomains',
|
|
170
|
+
:'campaign_ids' => :'campaignIds',
|
|
171
|
+
:'ad_ids' => :'adIds',
|
|
172
|
+
:'pin_ids' => :'pinIds',
|
|
125
173
|
:'url_contains' => :'urlContains',
|
|
126
174
|
:'rule' => :'rule',
|
|
127
175
|
:'customer_file_source' => :'customerFileSource'
|
|
@@ -160,6 +208,18 @@ module Zernio
|
|
|
160
208
|
:'source_audience_id' => :'String',
|
|
161
209
|
:'country' => :'String',
|
|
162
210
|
:'ratio' => :'Float',
|
|
211
|
+
:'size' => :'String',
|
|
212
|
+
:'source' => :'String',
|
|
213
|
+
:'source_ids' => :'Array<String>',
|
|
214
|
+
:'identity_id' => :'String',
|
|
215
|
+
:'identity_type' => :'String',
|
|
216
|
+
:'identity_authorized_bc_id' => :'String',
|
|
217
|
+
:'engager_type' => :'Integer',
|
|
218
|
+
:'engagement_type' => :'String',
|
|
219
|
+
:'engagement_domains' => :'Array<String>',
|
|
220
|
+
:'campaign_ids' => :'Array<String>',
|
|
221
|
+
:'ad_ids' => :'Array<String>',
|
|
222
|
+
:'pin_ids' => :'Array<String>',
|
|
163
223
|
:'url_contains' => :'String',
|
|
164
224
|
:'rule' => :'Object',
|
|
165
225
|
:'customer_file_source' => :'String'
|
|
@@ -278,6 +338,64 @@ module Zernio
|
|
|
278
338
|
self.ratio = attributes[:'ratio']
|
|
279
339
|
end
|
|
280
340
|
|
|
341
|
+
if attributes.key?(:'size')
|
|
342
|
+
self.size = attributes[:'size']
|
|
343
|
+
end
|
|
344
|
+
|
|
345
|
+
if attributes.key?(:'source')
|
|
346
|
+
self.source = attributes[:'source']
|
|
347
|
+
end
|
|
348
|
+
|
|
349
|
+
if attributes.key?(:'source_ids')
|
|
350
|
+
if (value = attributes[:'source_ids']).is_a?(Array)
|
|
351
|
+
self.source_ids = value
|
|
352
|
+
end
|
|
353
|
+
end
|
|
354
|
+
|
|
355
|
+
if attributes.key?(:'identity_id')
|
|
356
|
+
self.identity_id = attributes[:'identity_id']
|
|
357
|
+
end
|
|
358
|
+
|
|
359
|
+
if attributes.key?(:'identity_type')
|
|
360
|
+
self.identity_type = attributes[:'identity_type']
|
|
361
|
+
end
|
|
362
|
+
|
|
363
|
+
if attributes.key?(:'identity_authorized_bc_id')
|
|
364
|
+
self.identity_authorized_bc_id = attributes[:'identity_authorized_bc_id']
|
|
365
|
+
end
|
|
366
|
+
|
|
367
|
+
if attributes.key?(:'engager_type')
|
|
368
|
+
self.engager_type = attributes[:'engager_type']
|
|
369
|
+
end
|
|
370
|
+
|
|
371
|
+
if attributes.key?(:'engagement_type')
|
|
372
|
+
self.engagement_type = attributes[:'engagement_type']
|
|
373
|
+
end
|
|
374
|
+
|
|
375
|
+
if attributes.key?(:'engagement_domains')
|
|
376
|
+
if (value = attributes[:'engagement_domains']).is_a?(Array)
|
|
377
|
+
self.engagement_domains = value
|
|
378
|
+
end
|
|
379
|
+
end
|
|
380
|
+
|
|
381
|
+
if attributes.key?(:'campaign_ids')
|
|
382
|
+
if (value = attributes[:'campaign_ids']).is_a?(Array)
|
|
383
|
+
self.campaign_ids = value
|
|
384
|
+
end
|
|
385
|
+
end
|
|
386
|
+
|
|
387
|
+
if attributes.key?(:'ad_ids')
|
|
388
|
+
if (value = attributes[:'ad_ids']).is_a?(Array)
|
|
389
|
+
self.ad_ids = value
|
|
390
|
+
end
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
if attributes.key?(:'pin_ids')
|
|
394
|
+
if (value = attributes[:'pin_ids']).is_a?(Array)
|
|
395
|
+
self.pin_ids = value
|
|
396
|
+
end
|
|
397
|
+
end
|
|
398
|
+
|
|
281
399
|
if attributes.key?(:'url_contains')
|
|
282
400
|
self.url_contains = attributes[:'url_contains']
|
|
283
401
|
end
|
|
@@ -340,14 +458,18 @@ module Zernio
|
|
|
340
458
|
invalid_properties.push('invalid value for "companies", number of items must be greater than or equal to 1.')
|
|
341
459
|
end
|
|
342
460
|
|
|
343
|
-
if !@retention_days.nil? && @retention_days >
|
|
344
|
-
invalid_properties.push('invalid value for "retention_days", must be smaller than or equal to
|
|
461
|
+
if !@retention_days.nil? && @retention_days > 540
|
|
462
|
+
invalid_properties.push('invalid value for "retention_days", must be smaller than or equal to 540.')
|
|
345
463
|
end
|
|
346
464
|
|
|
347
465
|
if !@retention_days.nil? && @retention_days < 1
|
|
348
466
|
invalid_properties.push('invalid value for "retention_days", must be greater than or equal to 1.')
|
|
349
467
|
end
|
|
350
468
|
|
|
469
|
+
if !@event.nil? && @event.to_s.length > 100
|
|
470
|
+
invalid_properties.push('invalid value for "event", the character length must be smaller than or equal to 100.')
|
|
471
|
+
end
|
|
472
|
+
|
|
351
473
|
if !@ratio.nil? && @ratio > 0.2
|
|
352
474
|
invalid_properties.push('invalid value for "ratio", must be smaller than or equal to 0.2.')
|
|
353
475
|
end
|
|
@@ -356,6 +478,14 @@ module Zernio
|
|
|
356
478
|
invalid_properties.push('invalid value for "ratio", must be greater than or equal to 0.01.')
|
|
357
479
|
end
|
|
358
480
|
|
|
481
|
+
if !@source_ids.nil? && @source_ids.length > 50
|
|
482
|
+
invalid_properties.push('invalid value for "source_ids", number of items must be less than or equal to 50.')
|
|
483
|
+
end
|
|
484
|
+
|
|
485
|
+
if !@source_ids.nil? && @source_ids.length < 1
|
|
486
|
+
invalid_properties.push('invalid value for "source_ids", number of items must be greater than or equal to 1.')
|
|
487
|
+
end
|
|
488
|
+
|
|
359
489
|
invalid_properties
|
|
360
490
|
end
|
|
361
491
|
|
|
@@ -368,7 +498,7 @@ module Zernio
|
|
|
368
498
|
return false if @name.nil?
|
|
369
499
|
return false if @name.to_s.length > 255
|
|
370
500
|
return false if @type.nil?
|
|
371
|
-
type_validator = EnumAttributeValidator.new('String', ["customer_list", "company_list", "engagement", "meta_engagement", "website", "website_retargeting", "lookalike"])
|
|
501
|
+
type_validator = EnumAttributeValidator.new('String', ["customer_list", "company_list", "engagement", "meta_engagement", "tiktok_engagement", "pinterest_engagement", "website", "website_retargeting", "lookalike"])
|
|
372
502
|
return false unless type_validator.valid?(@type)
|
|
373
503
|
return false if !@match_rules.nil? && @match_rules.length > 50
|
|
374
504
|
return false if !@match_rules.nil? && @match_rules.length < 1
|
|
@@ -380,12 +510,25 @@ module Zernio
|
|
|
380
510
|
return false if !@engagement_sources.nil? && @engagement_sources.length < 1
|
|
381
511
|
return false if !@companies.nil? && @companies.length > 300000
|
|
382
512
|
return false if !@companies.nil? && @companies.length < 1
|
|
383
|
-
return false if !@retention_days.nil? && @retention_days >
|
|
513
|
+
return false if !@retention_days.nil? && @retention_days > 540
|
|
384
514
|
return false if !@retention_days.nil? && @retention_days < 1
|
|
385
515
|
engagement_source_validator = EnumAttributeValidator.new('String', ["page", "instagram", "video"])
|
|
386
516
|
return false unless engagement_source_validator.valid?(@engagement_source)
|
|
517
|
+
return false if !@event.nil? && @event.to_s.length > 100
|
|
387
518
|
return false if !@ratio.nil? && @ratio > 0.2
|
|
388
519
|
return false if !@ratio.nil? && @ratio < 0.01
|
|
520
|
+
size_validator = EnumAttributeValidator.new('String', ["narrow", "balanced", "broad"])
|
|
521
|
+
return false unless size_validator.valid?(@size)
|
|
522
|
+
source_validator = EnumAttributeValidator.new('String', ["ads", "organic_video", "live_video", "business_account"])
|
|
523
|
+
return false unless source_validator.valid?(@source)
|
|
524
|
+
return false if !@source_ids.nil? && @source_ids.length > 50
|
|
525
|
+
return false if !@source_ids.nil? && @source_ids.length < 1
|
|
526
|
+
identity_type_validator = EnumAttributeValidator.new('String', ["TT_USER", "BC_AUTH_TT"])
|
|
527
|
+
return false unless identity_type_validator.valid?(@identity_type)
|
|
528
|
+
engager_type_validator = EnumAttributeValidator.new('Integer', [1, 2])
|
|
529
|
+
return false unless engager_type_validator.valid?(@engager_type)
|
|
530
|
+
engagement_type_validator = EnumAttributeValidator.new('String', ["click", "save", "closeup", "comment", "like"])
|
|
531
|
+
return false unless engagement_type_validator.valid?(@engagement_type)
|
|
389
532
|
true
|
|
390
533
|
end
|
|
391
534
|
|
|
@@ -426,7 +569,7 @@ module Zernio
|
|
|
426
569
|
# Custom attribute writer method checking allowed values (enum).
|
|
427
570
|
# @param [Object] type Object to be assigned
|
|
428
571
|
def type=(type)
|
|
429
|
-
validator = EnumAttributeValidator.new('String', ["customer_list", "company_list", "engagement", "meta_engagement", "website", "website_retargeting", "lookalike"])
|
|
572
|
+
validator = EnumAttributeValidator.new('String', ["customer_list", "company_list", "engagement", "meta_engagement", "tiktok_engagement", "pinterest_engagement", "website", "website_retargeting", "lookalike"])
|
|
430
573
|
unless validator.valid?(type)
|
|
431
574
|
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
|
432
575
|
end
|
|
@@ -514,8 +657,8 @@ module Zernio
|
|
|
514
657
|
fail ArgumentError, 'retention_days cannot be nil'
|
|
515
658
|
end
|
|
516
659
|
|
|
517
|
-
if retention_days >
|
|
518
|
-
fail ArgumentError, 'invalid value for "retention_days", must be smaller than or equal to
|
|
660
|
+
if retention_days > 540
|
|
661
|
+
fail ArgumentError, 'invalid value for "retention_days", must be smaller than or equal to 540.'
|
|
519
662
|
end
|
|
520
663
|
|
|
521
664
|
if retention_days < 1
|
|
@@ -535,6 +678,20 @@ module Zernio
|
|
|
535
678
|
@engagement_source = engagement_source
|
|
536
679
|
end
|
|
537
680
|
|
|
681
|
+
# Custom attribute writer method with validation
|
|
682
|
+
# @param [Object] event Value to be assigned
|
|
683
|
+
def event=(event)
|
|
684
|
+
if event.nil?
|
|
685
|
+
fail ArgumentError, 'event cannot be nil'
|
|
686
|
+
end
|
|
687
|
+
|
|
688
|
+
if event.to_s.length > 100
|
|
689
|
+
fail ArgumentError, 'invalid value for "event", the character length must be smaller than or equal to 100.'
|
|
690
|
+
end
|
|
691
|
+
|
|
692
|
+
@event = event
|
|
693
|
+
end
|
|
694
|
+
|
|
538
695
|
# Custom attribute writer method with validation
|
|
539
696
|
# @param [Object] ratio Value to be assigned
|
|
540
697
|
def ratio=(ratio)
|
|
@@ -553,6 +710,74 @@ module Zernio
|
|
|
553
710
|
@ratio = ratio
|
|
554
711
|
end
|
|
555
712
|
|
|
713
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
714
|
+
# @param [Object] size Object to be assigned
|
|
715
|
+
def size=(size)
|
|
716
|
+
validator = EnumAttributeValidator.new('String', ["narrow", "balanced", "broad"])
|
|
717
|
+
unless validator.valid?(size)
|
|
718
|
+
fail ArgumentError, "invalid value for \"size\", must be one of #{validator.allowable_values}."
|
|
719
|
+
end
|
|
720
|
+
@size = size
|
|
721
|
+
end
|
|
722
|
+
|
|
723
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
724
|
+
# @param [Object] source Object to be assigned
|
|
725
|
+
def source=(source)
|
|
726
|
+
validator = EnumAttributeValidator.new('String', ["ads", "organic_video", "live_video", "business_account"])
|
|
727
|
+
unless validator.valid?(source)
|
|
728
|
+
fail ArgumentError, "invalid value for \"source\", must be one of #{validator.allowable_values}."
|
|
729
|
+
end
|
|
730
|
+
@source = source
|
|
731
|
+
end
|
|
732
|
+
|
|
733
|
+
# Custom attribute writer method with validation
|
|
734
|
+
# @param [Object] source_ids Value to be assigned
|
|
735
|
+
def source_ids=(source_ids)
|
|
736
|
+
if source_ids.nil?
|
|
737
|
+
fail ArgumentError, 'source_ids cannot be nil'
|
|
738
|
+
end
|
|
739
|
+
|
|
740
|
+
if source_ids.length > 50
|
|
741
|
+
fail ArgumentError, 'invalid value for "source_ids", number of items must be less than or equal to 50.'
|
|
742
|
+
end
|
|
743
|
+
|
|
744
|
+
if source_ids.length < 1
|
|
745
|
+
fail ArgumentError, 'invalid value for "source_ids", number of items must be greater than or equal to 1.'
|
|
746
|
+
end
|
|
747
|
+
|
|
748
|
+
@source_ids = source_ids
|
|
749
|
+
end
|
|
750
|
+
|
|
751
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
752
|
+
# @param [Object] identity_type Object to be assigned
|
|
753
|
+
def identity_type=(identity_type)
|
|
754
|
+
validator = EnumAttributeValidator.new('String', ["TT_USER", "BC_AUTH_TT"])
|
|
755
|
+
unless validator.valid?(identity_type)
|
|
756
|
+
fail ArgumentError, "invalid value for \"identity_type\", must be one of #{validator.allowable_values}."
|
|
757
|
+
end
|
|
758
|
+
@identity_type = identity_type
|
|
759
|
+
end
|
|
760
|
+
|
|
761
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
762
|
+
# @param [Object] engager_type Object to be assigned
|
|
763
|
+
def engager_type=(engager_type)
|
|
764
|
+
validator = EnumAttributeValidator.new('Integer', [1, 2])
|
|
765
|
+
unless validator.valid?(engager_type)
|
|
766
|
+
fail ArgumentError, "invalid value for \"engager_type\", must be one of #{validator.allowable_values}."
|
|
767
|
+
end
|
|
768
|
+
@engager_type = engager_type
|
|
769
|
+
end
|
|
770
|
+
|
|
771
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
772
|
+
# @param [Object] engagement_type Object to be assigned
|
|
773
|
+
def engagement_type=(engagement_type)
|
|
774
|
+
validator = EnumAttributeValidator.new('String', ["click", "save", "closeup", "comment", "like"])
|
|
775
|
+
unless validator.valid?(engagement_type)
|
|
776
|
+
fail ArgumentError, "invalid value for \"engagement_type\", must be one of #{validator.allowable_values}."
|
|
777
|
+
end
|
|
778
|
+
@engagement_type = engagement_type
|
|
779
|
+
end
|
|
780
|
+
|
|
556
781
|
# Checks equality by comparing each attribute.
|
|
557
782
|
# @param [Object] Object to be compared
|
|
558
783
|
def ==(o)
|
|
@@ -577,6 +802,18 @@ module Zernio
|
|
|
577
802
|
source_audience_id == o.source_audience_id &&
|
|
578
803
|
country == o.country &&
|
|
579
804
|
ratio == o.ratio &&
|
|
805
|
+
size == o.size &&
|
|
806
|
+
source == o.source &&
|
|
807
|
+
source_ids == o.source_ids &&
|
|
808
|
+
identity_id == o.identity_id &&
|
|
809
|
+
identity_type == o.identity_type &&
|
|
810
|
+
identity_authorized_bc_id == o.identity_authorized_bc_id &&
|
|
811
|
+
engager_type == o.engager_type &&
|
|
812
|
+
engagement_type == o.engagement_type &&
|
|
813
|
+
engagement_domains == o.engagement_domains &&
|
|
814
|
+
campaign_ids == o.campaign_ids &&
|
|
815
|
+
ad_ids == o.ad_ids &&
|
|
816
|
+
pin_ids == o.pin_ids &&
|
|
580
817
|
url_contains == o.url_contains &&
|
|
581
818
|
rule == o.rule &&
|
|
582
819
|
customer_file_source == o.customer_file_source
|
|
@@ -591,7 +828,7 @@ module Zernio
|
|
|
591
828
|
# Calculates hash code according to all attributes.
|
|
592
829
|
# @return [Integer] Hash code
|
|
593
830
|
def hash
|
|
594
|
-
[account_id, ad_account_id, name, description, type, match_rules, source_type, trigger, lookback_days, engagement_sources, companies, pixel_id, retention_days, engagement_source, source_id, event, source_audience_id, country, ratio, url_contains, rule, customer_file_source].hash
|
|
831
|
+
[account_id, ad_account_id, name, description, type, match_rules, source_type, trigger, lookback_days, engagement_sources, companies, pixel_id, retention_days, engagement_source, source_id, event, source_audience_id, country, ratio, size, source, source_ids, identity_id, identity_type, identity_authorized_bc_id, engager_type, engagement_type, engagement_domains, campaign_ids, ad_ids, pin_ids, url_contains, rule, customer_file_source].hash
|
|
595
832
|
end
|
|
596
833
|
|
|
597
834
|
# Builds the object from hash
|
data/lib/zernio-sdk/version.rb
CHANGED