zernio-sdk 0.0.821 → 0.0.823
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 +7 -0
- data/docs/AnalyticsApi.md +78 -0
- data/docs/AnalyticsDeltaEntry.md +34 -0
- data/docs/AnalyticsDeltaEntryMetrics.md +44 -0
- data/docs/AnalyticsDeltaResponse.md +22 -0
- data/docs/BoostPostRequest.md +3 -1
- data/docs/CreateCallAdRequest.md +3 -1
- data/docs/CreateMessagingAdRequest.md +3 -1
- data/docs/CreateStandaloneAdRequest.md +3 -1
- data/docs/CtwaAdRequestBody.md +4 -2
- data/docs/WebhookEventsApi.md +69 -0
- data/docs/WebhookPayloadAnalyticsSynced.md +26 -0
- data/docs/WebhookPayloadAnalyticsSyncedAccount.md +24 -0
- data/docs/WebhookPayloadAnalyticsSyncedSync.md +20 -0
- data/lib/zernio-sdk/api/analytics_api.rb +77 -0
- data/lib/zernio-sdk/api/webhook_events_api.rb +66 -0
- data/lib/zernio-sdk/models/analytics_delta_entry.rb +380 -0
- data/lib/zernio-sdk/models/analytics_delta_entry_metrics.rb +507 -0
- data/lib/zernio-sdk/models/analytics_delta_response.rb +221 -0
- data/lib/zernio-sdk/models/boost_post_request.rb +14 -2
- data/lib/zernio-sdk/models/create_call_ad_request.rb +14 -2
- data/lib/zernio-sdk/models/create_messaging_ad_request.rb +14 -2
- data/lib/zernio-sdk/models/create_standalone_ad_request.rb +14 -2
- data/lib/zernio-sdk/models/ctwa_ad_request_body.rb +17 -5
- data/lib/zernio-sdk/models/webhook_payload_analytics_synced.rb +295 -0
- data/lib/zernio-sdk/models/webhook_payload_analytics_synced_account.rb +244 -0
- data/lib/zernio-sdk/models/webhook_payload_analytics_synced_sync.rb +193 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +6 -0
- data/openapi.yaml +392 -10
- data/spec/api/analytics_api_spec.rb +15 -0
- data/spec/models/analytics_delta_entry_metrics_spec.rb +114 -0
- data/spec/models/analytics_delta_entry_spec.rb +84 -0
- data/spec/models/analytics_delta_response_spec.rb +48 -0
- data/spec/models/boost_post_request_spec.rb +6 -0
- data/spec/models/create_call_ad_request_spec.rb +6 -0
- data/spec/models/create_messaging_ad_request_spec.rb +6 -0
- data/spec/models/create_standalone_ad_request_spec.rb +6 -0
- data/spec/models/create_webhook_settings_request_spec.rb +1 -1
- data/spec/models/ctwa_ad_request_body_spec.rb +6 -0
- data/spec/models/update_webhook_settings_request_spec.rb +1 -1
- data/spec/models/webhook_payload_analytics_synced_account_spec.rb +54 -0
- data/spec/models/webhook_payload_analytics_synced_spec.rb +64 -0
- data/spec/models/webhook_payload_analytics_synced_sync_spec.rb +42 -0
- data/spec/models/webhook_spec.rb +1 -1
- metadata +1773 -1749
|
@@ -0,0 +1,221 @@
|
|
|
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 AnalyticsDeltaResponse < ApiModelBase
|
|
18
|
+
# Changed snapshots, oldest first, in the order the feed received them. Empty on the bootstrap call (no `cursor` supplied) and whenever nothing has changed since your cursor.
|
|
19
|
+
attr_accessor :data
|
|
20
|
+
|
|
21
|
+
# Cursor to send on the next call. ALWAYS present, including on an empty page, so you always have something to advance with, and it never moves backwards. Opaque: pass it back verbatim, and do not parse, construct or compare cursors.
|
|
22
|
+
attr_accessor :next_cursor
|
|
23
|
+
|
|
24
|
+
# True when more changes are already waiting past `nextCursor`, so call again immediately. False means you are caught up: keep `nextCursor` and poll again later. This feed never ends, so `hasMore: false` does NOT mean `nextCursor` is null.
|
|
25
|
+
attr_accessor :has_more
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
def self.attribute_map
|
|
29
|
+
{
|
|
30
|
+
:'data' => :'data',
|
|
31
|
+
:'next_cursor' => :'nextCursor',
|
|
32
|
+
:'has_more' => :'hasMore'
|
|
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
|
+
:'data' => :'Array<AnalyticsDeltaEntry>',
|
|
50
|
+
:'next_cursor' => :'String',
|
|
51
|
+
:'has_more' => :'Boolean'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# List of attributes with nullable: true
|
|
56
|
+
def self.openapi_nullable
|
|
57
|
+
Set.new([
|
|
58
|
+
])
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Initializes the object
|
|
62
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
63
|
+
def initialize(attributes = {})
|
|
64
|
+
if (!attributes.is_a?(Hash))
|
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::AnalyticsDeltaResponse` initialize method"
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
69
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
70
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
71
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
72
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::AnalyticsDeltaResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
73
|
+
end
|
|
74
|
+
h[k.to_sym] = v
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if attributes.key?(:'data')
|
|
78
|
+
if (value = attributes[:'data']).is_a?(Array)
|
|
79
|
+
self.data = value
|
|
80
|
+
end
|
|
81
|
+
else
|
|
82
|
+
self.data = nil
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
if attributes.key?(:'next_cursor')
|
|
86
|
+
self.next_cursor = attributes[:'next_cursor']
|
|
87
|
+
else
|
|
88
|
+
self.next_cursor = nil
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'has_more')
|
|
92
|
+
self.has_more = attributes[:'has_more']
|
|
93
|
+
else
|
|
94
|
+
self.has_more = nil
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
99
|
+
# @return Array for valid properties with the reasons
|
|
100
|
+
def list_invalid_properties
|
|
101
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
102
|
+
invalid_properties = Array.new
|
|
103
|
+
if @data.nil?
|
|
104
|
+
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if @next_cursor.nil?
|
|
108
|
+
invalid_properties.push('invalid value for "next_cursor", next_cursor cannot be nil.')
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if @has_more.nil?
|
|
112
|
+
invalid_properties.push('invalid value for "has_more", has_more cannot be nil.')
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
invalid_properties
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Check to see if the all the properties in the model are valid
|
|
119
|
+
# @return true if the model is valid
|
|
120
|
+
def valid?
|
|
121
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
122
|
+
return false if @data.nil?
|
|
123
|
+
return false if @next_cursor.nil?
|
|
124
|
+
return false if @has_more.nil?
|
|
125
|
+
true
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Custom attribute writer method with validation
|
|
129
|
+
# @param [Object] data Value to be assigned
|
|
130
|
+
def data=(data)
|
|
131
|
+
if data.nil?
|
|
132
|
+
fail ArgumentError, 'data cannot be nil'
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
@data = data
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Custom attribute writer method with validation
|
|
139
|
+
# @param [Object] next_cursor Value to be assigned
|
|
140
|
+
def next_cursor=(next_cursor)
|
|
141
|
+
if next_cursor.nil?
|
|
142
|
+
fail ArgumentError, 'next_cursor cannot be nil'
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
@next_cursor = next_cursor
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Custom attribute writer method with validation
|
|
149
|
+
# @param [Object] has_more Value to be assigned
|
|
150
|
+
def has_more=(has_more)
|
|
151
|
+
if has_more.nil?
|
|
152
|
+
fail ArgumentError, 'has_more cannot be nil'
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
@has_more = has_more
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Checks equality by comparing each attribute.
|
|
159
|
+
# @param [Object] Object to be compared
|
|
160
|
+
def ==(o)
|
|
161
|
+
return true if self.equal?(o)
|
|
162
|
+
self.class == o.class &&
|
|
163
|
+
data == o.data &&
|
|
164
|
+
next_cursor == o.next_cursor &&
|
|
165
|
+
has_more == o.has_more
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# @see the `==` method
|
|
169
|
+
# @param [Object] Object to be compared
|
|
170
|
+
def eql?(o)
|
|
171
|
+
self == o
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Calculates hash code according to all attributes.
|
|
175
|
+
# @return [Integer] Hash code
|
|
176
|
+
def hash
|
|
177
|
+
[data, next_cursor, has_more].hash
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Builds the object from hash
|
|
181
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
182
|
+
# @return [Object] Returns the model itself
|
|
183
|
+
def self.build_from_hash(attributes)
|
|
184
|
+
return nil unless attributes.is_a?(Hash)
|
|
185
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
186
|
+
transformed_hash = {}
|
|
187
|
+
openapi_types.each_pair do |key, type|
|
|
188
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
189
|
+
transformed_hash["#{key}"] = nil
|
|
190
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
191
|
+
# check to ensure the input is an array given that the attribute
|
|
192
|
+
# is documented as an array but the input is not
|
|
193
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
194
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
195
|
+
end
|
|
196
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
197
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
new(transformed_hash)
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Returns the object in the form of hash
|
|
204
|
+
# @return [Hash] Returns the object in the form of hash
|
|
205
|
+
def to_hash
|
|
206
|
+
hash = {}
|
|
207
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
208
|
+
value = self.send(attr)
|
|
209
|
+
if value.nil?
|
|
210
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
211
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
hash[param] = _to_hash(value)
|
|
215
|
+
end
|
|
216
|
+
hash
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
end
|
|
@@ -72,9 +72,12 @@ module Zernio
|
|
|
72
72
|
# Meta (metaads) only. 2-letter ISO country codes the special ad category applies to. Requires specialAdCategories to be set (400 otherwise).
|
|
73
73
|
attr_accessor :special_ad_category_country
|
|
74
74
|
|
|
75
|
-
# Meta only. Regional regulation categories required when the ad set targets certain countries (e.g. SINGAPORE_UNIVERSAL, TAIWAN_UNIVERSAL, THAILAND_UNIVERSAL, AUSTRALIA_FINSERV, INDIA_FINSERV). Forwarded to the ad set.
|
|
75
|
+
# Meta only. Regional regulation categories required when the ad set targets certain countries (e.g. BRAZIL_REGULATION, SINGAPORE_UNIVERSAL, TAIWAN_UNIVERSAL, THAILAND_UNIVERSAL, AUSTRALIA_FINSERV, INDIA_FINSERV, TAIWAN_FINSERV). Forwarded to the ad set.
|
|
76
76
|
attr_accessor :regional_regulated_categories
|
|
77
77
|
|
|
78
|
+
# Meta only. Beneficiary/payer entity IDs for regionalRegulatedCategories. Values are numeric IDs from Meta verification. Keys vary by category (e.g. universal_beneficiary / universal_payer for BRAZIL_REGULATION and THAILAND_UNIVERSAL). If omitted, Meta uses Ads Manager defaults when configured.
|
|
79
|
+
attr_accessor :regional_regulation_identities
|
|
80
|
+
|
|
78
81
|
# Destination URL for the CTA button. Send it together with `callToAction`. **Meta**: adds a top-level `call_to_action` to the post-reference creative. This is what gives a `traffic` boost a clickable destination without replacing the creative and losing the post's social proof. Ignored when `leadGenFormId` is set, which supplies its own destination. Live-verified against a Page-post creative. **TikTok**: maps to `landing_page_url` on the Spark Ad creative (`AdcreateCreatives.landing_page_url`); Spark Ads have no clickable destination without it. Ignored on LinkedIn / Pinterest / X / Google, which infer the destination from the boosted post.
|
|
79
82
|
attr_accessor :link_url
|
|
80
83
|
|
|
@@ -146,6 +149,7 @@ module Zernio
|
|
|
146
149
|
:'special_ad_categories' => :'specialAdCategories',
|
|
147
150
|
:'special_ad_category_country' => :'specialAdCategoryCountry',
|
|
148
151
|
:'regional_regulated_categories' => :'regionalRegulatedCategories',
|
|
152
|
+
:'regional_regulation_identities' => :'regionalRegulationIdentities',
|
|
149
153
|
:'link_url' => :'linkUrl',
|
|
150
154
|
:'call_to_action' => :'callToAction',
|
|
151
155
|
:'spark_auth_code' => :'sparkAuthCode',
|
|
@@ -192,6 +196,7 @@ module Zernio
|
|
|
192
196
|
:'special_ad_categories' => :'Array<String>',
|
|
193
197
|
:'special_ad_category_country' => :'Array<String>',
|
|
194
198
|
:'regional_regulated_categories' => :'Array<String>',
|
|
199
|
+
:'regional_regulation_identities' => :'Hash<String, Integer>',
|
|
195
200
|
:'link_url' => :'String',
|
|
196
201
|
:'call_to_action' => :'String',
|
|
197
202
|
:'spark_auth_code' => :'String',
|
|
@@ -329,6 +334,12 @@ module Zernio
|
|
|
329
334
|
end
|
|
330
335
|
end
|
|
331
336
|
|
|
337
|
+
if attributes.key?(:'regional_regulation_identities')
|
|
338
|
+
if (value = attributes[:'regional_regulation_identities']).is_a?(Hash)
|
|
339
|
+
self.regional_regulation_identities = value
|
|
340
|
+
end
|
|
341
|
+
end
|
|
342
|
+
|
|
332
343
|
if attributes.key?(:'link_url')
|
|
333
344
|
self.link_url = attributes[:'link_url']
|
|
334
345
|
end
|
|
@@ -565,6 +576,7 @@ module Zernio
|
|
|
565
576
|
special_ad_categories == o.special_ad_categories &&
|
|
566
577
|
special_ad_category_country == o.special_ad_category_country &&
|
|
567
578
|
regional_regulated_categories == o.regional_regulated_categories &&
|
|
579
|
+
regional_regulation_identities == o.regional_regulation_identities &&
|
|
568
580
|
link_url == o.link_url &&
|
|
569
581
|
call_to_action == o.call_to_action &&
|
|
570
582
|
spark_auth_code == o.spark_auth_code &&
|
|
@@ -584,7 +596,7 @@ module Zernio
|
|
|
584
596
|
# Calculates hash code according to all attributes.
|
|
585
597
|
# @return [Integer] Hash code
|
|
586
598
|
def hash
|
|
587
|
-
[post_id, platform_post_id, account_id, ad_account_id, name, goal, ad_set_id, budget, instagram_account_id, destination_type, currency, schedule, targeting, raw_targeting, bid_strategy, bid_amount, roas_average_floor, platform_specific_data, tracking, special_ad_categories, special_ad_category_country, regional_regulated_categories, link_url, call_to_action, spark_auth_code, dsa_beneficiary, dsa_payor, lead_gen_form_id, status, optimization_goal].hash
|
|
599
|
+
[post_id, platform_post_id, account_id, ad_account_id, name, goal, ad_set_id, budget, instagram_account_id, destination_type, currency, schedule, targeting, raw_targeting, bid_strategy, bid_amount, roas_average_floor, platform_specific_data, tracking, special_ad_categories, special_ad_category_country, regional_regulated_categories, regional_regulation_identities, link_url, call_to_action, spark_auth_code, dsa_beneficiary, dsa_payor, lead_gen_form_id, status, optimization_goal].hash
|
|
588
600
|
end
|
|
589
601
|
|
|
590
602
|
# Builds the object from hash
|
|
@@ -111,9 +111,12 @@ module Zernio
|
|
|
111
111
|
# Legal entity that pays for the ad. Can differ from `dsaBeneficiary` (for example, an agency paying for a client's ads). Same rules as `dsaBeneficiary`: required for EU targeting unless the ad account has a default payor.
|
|
112
112
|
attr_accessor :dsa_payor
|
|
113
113
|
|
|
114
|
-
# Meta only. Regional regulation categories required when the ad set targets certain countries (e.g. SINGAPORE_UNIVERSAL, TAIWAN_UNIVERSAL, THAILAND_UNIVERSAL, AUSTRALIA_FINSERV, INDIA_FINSERV). Forwarded to the ad set.
|
|
114
|
+
# Meta only. Regional regulation categories required when the ad set targets certain countries (e.g. BRAZIL_REGULATION, SINGAPORE_UNIVERSAL, TAIWAN_UNIVERSAL, THAILAND_UNIVERSAL, AUSTRALIA_FINSERV, INDIA_FINSERV, TAIWAN_FINSERV). Forwarded to the ad set.
|
|
115
115
|
attr_accessor :regional_regulated_categories
|
|
116
116
|
|
|
117
|
+
# Meta only. Beneficiary/payer entity IDs required alongside regionalRegulatedCategories. Values are numeric IDs from the advertiser's Meta verification/authorization setup. Keys depend on the declared category: BRAZIL_REGULATION and THAILAND_UNIVERSAL use universal_beneficiary / universal_payer; SINGAPORE_UNIVERSAL uses singapore_universal_beneficiary / singapore_universal_payer; TAIWAN_UNIVERSAL uses taiwan_universal_beneficiary / taiwan_universal_payer; TAIWAN_FINSERV uses taiwan_finserv_beneficiary / taiwan_finserv_payer; AUSTRALIA_FINSERV uses australia_finserv_beneficiary / australia_finserv_payer; INDIA_FINSERV uses india_finserv_beneficiary / india_finserv_payer. Both beneficiary and payer must be included. If omitted and the advertiser has set defaults in Meta Ads Manager advertising settings, Meta auto-fills them.
|
|
118
|
+
attr_accessor :regional_regulation_identities
|
|
119
|
+
|
|
117
120
|
# E.164 number the CALL_NOW CTA dials (e.g. +34600111222).
|
|
118
121
|
attr_accessor :phone_number
|
|
119
122
|
|
|
@@ -180,6 +183,7 @@ module Zernio
|
|
|
180
183
|
:'dsa_beneficiary' => :'dsaBeneficiary',
|
|
181
184
|
:'dsa_payor' => :'dsaPayor',
|
|
182
185
|
:'regional_regulated_categories' => :'regionalRegulatedCategories',
|
|
186
|
+
:'regional_regulation_identities' => :'regionalRegulationIdentities',
|
|
183
187
|
:'phone_number' => :'phoneNumber',
|
|
184
188
|
:'link_url' => :'linkUrl'
|
|
185
189
|
}
|
|
@@ -233,6 +237,7 @@ module Zernio
|
|
|
233
237
|
:'dsa_beneficiary' => :'String',
|
|
234
238
|
:'dsa_payor' => :'String',
|
|
235
239
|
:'regional_regulated_categories' => :'Array<String>',
|
|
240
|
+
:'regional_regulation_identities' => :'Hash<String, Integer>',
|
|
236
241
|
:'phone_number' => :'String',
|
|
237
242
|
:'link_url' => :'String'
|
|
238
243
|
}
|
|
@@ -431,6 +436,12 @@ module Zernio
|
|
|
431
436
|
end
|
|
432
437
|
end
|
|
433
438
|
|
|
439
|
+
if attributes.key?(:'regional_regulation_identities')
|
|
440
|
+
if (value = attributes[:'regional_regulation_identities']).is_a?(Hash)
|
|
441
|
+
self.regional_regulation_identities = value
|
|
442
|
+
end
|
|
443
|
+
end
|
|
444
|
+
|
|
434
445
|
if attributes.key?(:'phone_number')
|
|
435
446
|
self.phone_number = attributes[:'phone_number']
|
|
436
447
|
else
|
|
@@ -861,6 +872,7 @@ module Zernio
|
|
|
861
872
|
dsa_beneficiary == o.dsa_beneficiary &&
|
|
862
873
|
dsa_payor == o.dsa_payor &&
|
|
863
874
|
regional_regulated_categories == o.regional_regulated_categories &&
|
|
875
|
+
regional_regulation_identities == o.regional_regulation_identities &&
|
|
864
876
|
phone_number == o.phone_number &&
|
|
865
877
|
link_url == o.link_url
|
|
866
878
|
end
|
|
@@ -874,7 +886,7 @@ module Zernio
|
|
|
874
886
|
# Calculates hash code according to all attributes.
|
|
875
887
|
# @return [Integer] Hash code
|
|
876
888
|
def hash
|
|
877
|
-
[account_id, ad_account_id, name, headline, body, image_url, video, welcome_message, creatives, ad_set_id, budget_amount, budget_type, currency, end_date, countries, cities, regions, zips, metros, custom_locations, age_min, age_max, interests, audience_id, placements, advantage_audience, objective, status, campaign_status, bid_strategy, bid_amount, roas_average_floor, dsa_beneficiary, dsa_payor, regional_regulated_categories, phone_number, link_url].hash
|
|
889
|
+
[account_id, ad_account_id, name, headline, body, image_url, video, welcome_message, creatives, ad_set_id, budget_amount, budget_type, currency, end_date, countries, cities, regions, zips, metros, custom_locations, age_min, age_max, interests, audience_id, placements, advantage_audience, objective, status, campaign_status, bid_strategy, bid_amount, roas_average_floor, dsa_beneficiary, dsa_payor, regional_regulated_categories, regional_regulation_identities, phone_number, link_url].hash
|
|
878
890
|
end
|
|
879
891
|
|
|
880
892
|
# Builds the object from hash
|
|
@@ -111,9 +111,12 @@ module Zernio
|
|
|
111
111
|
# Legal entity that pays for the ad. Can differ from `dsaBeneficiary` (for example, an agency paying for a client's ads). Same rules as `dsaBeneficiary`: required for EU targeting unless the ad account has a default payor.
|
|
112
112
|
attr_accessor :dsa_payor
|
|
113
113
|
|
|
114
|
-
# Meta only. Regional regulation categories required when the ad set targets certain countries (e.g. SINGAPORE_UNIVERSAL, TAIWAN_UNIVERSAL, THAILAND_UNIVERSAL, AUSTRALIA_FINSERV, INDIA_FINSERV). Forwarded to the ad set.
|
|
114
|
+
# Meta only. Regional regulation categories required when the ad set targets certain countries (e.g. BRAZIL_REGULATION, SINGAPORE_UNIVERSAL, TAIWAN_UNIVERSAL, THAILAND_UNIVERSAL, AUSTRALIA_FINSERV, INDIA_FINSERV, TAIWAN_FINSERV). Forwarded to the ad set.
|
|
115
115
|
attr_accessor :regional_regulated_categories
|
|
116
116
|
|
|
117
|
+
# Meta only. Beneficiary/payer entity IDs required alongside regionalRegulatedCategories. Values are numeric IDs from the advertiser's Meta verification/authorization setup. Keys depend on the declared category: BRAZIL_REGULATION and THAILAND_UNIVERSAL use universal_beneficiary / universal_payer; SINGAPORE_UNIVERSAL uses singapore_universal_beneficiary / singapore_universal_payer; TAIWAN_UNIVERSAL uses taiwan_universal_beneficiary / taiwan_universal_payer; TAIWAN_FINSERV uses taiwan_finserv_beneficiary / taiwan_finserv_payer; AUSTRALIA_FINSERV uses australia_finserv_beneficiary / australia_finserv_payer; INDIA_FINSERV uses india_finserv_beneficiary / india_finserv_payer. Both beneficiary and payer must be included. If omitted and the advertiser has set defaults in Meta Ads Manager advertising settings, Meta auto-fills them.
|
|
118
|
+
attr_accessor :regional_regulation_identities
|
|
119
|
+
|
|
117
120
|
# Where the conversation opens when the ad is tapped.
|
|
118
121
|
attr_accessor :destination
|
|
119
122
|
|
|
@@ -177,6 +180,7 @@ module Zernio
|
|
|
177
180
|
:'dsa_beneficiary' => :'dsaBeneficiary',
|
|
178
181
|
:'dsa_payor' => :'dsaPayor',
|
|
179
182
|
:'regional_regulated_categories' => :'regionalRegulatedCategories',
|
|
183
|
+
:'regional_regulation_identities' => :'regionalRegulationIdentities',
|
|
180
184
|
:'destination' => :'destination'
|
|
181
185
|
}
|
|
182
186
|
end
|
|
@@ -229,6 +233,7 @@ module Zernio
|
|
|
229
233
|
:'dsa_beneficiary' => :'String',
|
|
230
234
|
:'dsa_payor' => :'String',
|
|
231
235
|
:'regional_regulated_categories' => :'Array<String>',
|
|
236
|
+
:'regional_regulation_identities' => :'Hash<String, Integer>',
|
|
232
237
|
:'destination' => :'String'
|
|
233
238
|
}
|
|
234
239
|
end
|
|
@@ -426,6 +431,12 @@ module Zernio
|
|
|
426
431
|
end
|
|
427
432
|
end
|
|
428
433
|
|
|
434
|
+
if attributes.key?(:'regional_regulation_identities')
|
|
435
|
+
if (value = attributes[:'regional_regulation_identities']).is_a?(Hash)
|
|
436
|
+
self.regional_regulation_identities = value
|
|
437
|
+
end
|
|
438
|
+
end
|
|
439
|
+
|
|
429
440
|
if attributes.key?(:'destination')
|
|
430
441
|
self.destination = attributes[:'destination']
|
|
431
442
|
else
|
|
@@ -837,6 +848,7 @@ module Zernio
|
|
|
837
848
|
dsa_beneficiary == o.dsa_beneficiary &&
|
|
838
849
|
dsa_payor == o.dsa_payor &&
|
|
839
850
|
regional_regulated_categories == o.regional_regulated_categories &&
|
|
851
|
+
regional_regulation_identities == o.regional_regulation_identities &&
|
|
840
852
|
destination == o.destination
|
|
841
853
|
end
|
|
842
854
|
|
|
@@ -849,7 +861,7 @@ module Zernio
|
|
|
849
861
|
# Calculates hash code according to all attributes.
|
|
850
862
|
# @return [Integer] Hash code
|
|
851
863
|
def hash
|
|
852
|
-
[account_id, ad_account_id, name, headline, body, image_url, video, welcome_message, creatives, ad_set_id, budget_amount, budget_type, currency, end_date, countries, cities, regions, zips, metros, custom_locations, age_min, age_max, interests, audience_id, placements, advantage_audience, objective, status, campaign_status, bid_strategy, bid_amount, roas_average_floor, dsa_beneficiary, dsa_payor, regional_regulated_categories, destination].hash
|
|
864
|
+
[account_id, ad_account_id, name, headline, body, image_url, video, welcome_message, creatives, ad_set_id, budget_amount, budget_type, currency, end_date, countries, cities, regions, zips, metros, custom_locations, age_min, age_max, interests, audience_id, placements, advantage_audience, objective, status, campaign_status, bid_strategy, bid_amount, roas_average_floor, dsa_beneficiary, dsa_payor, regional_regulated_categories, regional_regulation_identities, destination].hash
|
|
853
865
|
end
|
|
854
866
|
|
|
855
867
|
# Builds the object from hash
|
|
@@ -183,9 +183,12 @@ module Zernio
|
|
|
183
183
|
# Meta (metaads) only. 2-letter ISO country codes the special ad category applies to. Requires specialAdCategories to be set (400 otherwise). Ignored when joining an existing campaign via existingCampaignId (the existing campaign's category/country already governs it).
|
|
184
184
|
attr_accessor :special_ad_category_country
|
|
185
185
|
|
|
186
|
-
# Meta only. Regional regulation categories required when the ad set targets certain countries. Known values: SINGAPORE_UNIVERSAL, TAIWAN_UNIVERSAL, THAILAND_UNIVERSAL, AUSTRALIA_FINSERV, INDIA_FINSERV, TAIWAN_FINSERV. Meta rejects the ad set without this when the targeting geo includes the corresponding country.
|
|
186
|
+
# Meta only. Regional regulation categories required when the ad set targets certain countries. Known values: BRAZIL_REGULATION, SINGAPORE_UNIVERSAL, TAIWAN_UNIVERSAL, THAILAND_UNIVERSAL, AUSTRALIA_FINSERV, INDIA_FINSERV, TAIWAN_FINSERV. Meta rejects the ad set without this when the targeting geo includes the corresponding country.
|
|
187
187
|
attr_accessor :regional_regulated_categories
|
|
188
188
|
|
|
189
|
+
# Meta only. Beneficiary/payer entity IDs for regionalRegulatedCategories. Values are numeric IDs from Meta verification. Keys vary by category (e.g. universal_beneficiary / universal_payer for BRAZIL_REGULATION and THAILAND_UNIVERSAL). If omitted, Meta uses Ads Manager defaults when configured.
|
|
190
|
+
attr_accessor :regional_regulation_identities
|
|
191
|
+
|
|
189
192
|
# Required for lifetime budgets
|
|
190
193
|
attr_accessor :end_date
|
|
191
194
|
|
|
@@ -362,6 +365,7 @@ module Zernio
|
|
|
362
365
|
:'special_ad_categories' => :'specialAdCategories',
|
|
363
366
|
:'special_ad_category_country' => :'specialAdCategoryCountry',
|
|
364
367
|
:'regional_regulated_categories' => :'regionalRegulatedCategories',
|
|
368
|
+
:'regional_regulation_identities' => :'regionalRegulationIdentities',
|
|
365
369
|
:'end_date' => :'endDate',
|
|
366
370
|
:'start_date' => :'startDate',
|
|
367
371
|
:'instagram_account_id' => :'instagramAccountId',
|
|
@@ -470,6 +474,7 @@ module Zernio
|
|
|
470
474
|
:'special_ad_categories' => :'Array<String>',
|
|
471
475
|
:'special_ad_category_country' => :'Array<String>',
|
|
472
476
|
:'regional_regulated_categories' => :'Array<String>',
|
|
477
|
+
:'regional_regulation_identities' => :'Hash<String, Integer>',
|
|
473
478
|
:'end_date' => :'Time',
|
|
474
479
|
:'start_date' => :'Time',
|
|
475
480
|
:'instagram_account_id' => :'String',
|
|
@@ -811,6 +816,12 @@ module Zernio
|
|
|
811
816
|
end
|
|
812
817
|
end
|
|
813
818
|
|
|
819
|
+
if attributes.key?(:'regional_regulation_identities')
|
|
820
|
+
if (value = attributes[:'regional_regulation_identities']).is_a?(Hash)
|
|
821
|
+
self.regional_regulation_identities = value
|
|
822
|
+
end
|
|
823
|
+
end
|
|
824
|
+
|
|
814
825
|
if attributes.key?(:'end_date')
|
|
815
826
|
self.end_date = attributes[:'end_date']
|
|
816
827
|
end
|
|
@@ -1698,6 +1709,7 @@ module Zernio
|
|
|
1698
1709
|
special_ad_categories == o.special_ad_categories &&
|
|
1699
1710
|
special_ad_category_country == o.special_ad_category_country &&
|
|
1700
1711
|
regional_regulated_categories == o.regional_regulated_categories &&
|
|
1712
|
+
regional_regulation_identities == o.regional_regulation_identities &&
|
|
1701
1713
|
end_date == o.end_date &&
|
|
1702
1714
|
start_date == o.start_date &&
|
|
1703
1715
|
instagram_account_id == o.instagram_account_id &&
|
|
@@ -1741,7 +1753,7 @@ module Zernio
|
|
|
1741
1753
|
# Calculates hash code according to all attributes.
|
|
1742
1754
|
# @return [Integer] Hash code
|
|
1743
1755
|
def hash
|
|
1744
|
-
[account_id, ad_account_id, name, campaign_name, ad_set_name, ad_name, tracking, goal, optimization_goal, billing_event, buying_type, rf_prediction_id, creative_features, multi_advertiser, validate_only, budget_amount, budget_type, status, campaign_status, budget_level, currency, headline, long_headline, body, description, call_to_action, link_url, lead_gen_form_id, image_url, images, video, creatives, ad_set_id, existing_campaign_id, existing_creative_id, business_name, board_id, organization_id, targeting, countries, cities, regions, age_min, age_max, interests, zips, metros, custom_locations, behaviors, work_positions, work_employers, work_industries, income_tier, languages, placements, saved_targeting_id, raw_targeting, special_ad_categories, special_ad_category_country, regional_regulated_categories, end_date, start_date, instagram_account_id, dynamic_creative, carousel_cards, default_locale, translations, placement_assets, audience_id, campaign_type, keywords, negative_keywords, additional_headlines, additional_descriptions, sitelinks, callouts, structured_snippets, advantage_audience, attribution_spec, gender, bid_strategy, bid_amount, roas_average_floor, value_rule_set_id, value_rules_applied, platform_specific_data, dsa_beneficiary, dsa_payor, brand_identity, identity_type, smart_plus, promoted_object].hash
|
|
1756
|
+
[account_id, ad_account_id, name, campaign_name, ad_set_name, ad_name, tracking, goal, optimization_goal, billing_event, buying_type, rf_prediction_id, creative_features, multi_advertiser, validate_only, budget_amount, budget_type, status, campaign_status, budget_level, currency, headline, long_headline, body, description, call_to_action, link_url, lead_gen_form_id, image_url, images, video, creatives, ad_set_id, existing_campaign_id, existing_creative_id, business_name, board_id, organization_id, targeting, countries, cities, regions, age_min, age_max, interests, zips, metros, custom_locations, behaviors, work_positions, work_employers, work_industries, income_tier, languages, placements, saved_targeting_id, raw_targeting, special_ad_categories, special_ad_category_country, regional_regulated_categories, regional_regulation_identities, end_date, start_date, instagram_account_id, dynamic_creative, carousel_cards, default_locale, translations, placement_assets, audience_id, campaign_type, keywords, negative_keywords, additional_headlines, additional_descriptions, sitelinks, callouts, structured_snippets, advantage_audience, attribution_spec, gender, bid_strategy, bid_amount, roas_average_floor, value_rule_set_id, value_rules_applied, platform_specific_data, dsa_beneficiary, dsa_payor, brand_identity, identity_type, smart_plus, promoted_object].hash
|
|
1745
1757
|
end
|
|
1746
1758
|
|
|
1747
1759
|
# Builds the object from hash
|
|
@@ -112,9 +112,12 @@ module Zernio
|
|
|
112
112
|
# Legal entity that pays for the ad. Can differ from `dsaBeneficiary` (for example, an agency paying for a client's ads). Same rules as `dsaBeneficiary`: required for EU targeting unless the ad account has a default payor.
|
|
113
113
|
attr_accessor :dsa_payor
|
|
114
114
|
|
|
115
|
-
# Meta only. Regional regulation categories required when the ad set targets certain countries (e.g. SINGAPORE_UNIVERSAL, TAIWAN_UNIVERSAL, THAILAND_UNIVERSAL, AUSTRALIA_FINSERV, INDIA_FINSERV). Forwarded to the ad set.
|
|
115
|
+
# Meta only. Regional regulation categories required when the ad set targets certain countries (e.g. BRAZIL_REGULATION, SINGAPORE_UNIVERSAL, TAIWAN_UNIVERSAL, THAILAND_UNIVERSAL, AUSTRALIA_FINSERV, INDIA_FINSERV, TAIWAN_FINSERV). Forwarded to the ad set.
|
|
116
116
|
attr_accessor :regional_regulated_categories
|
|
117
117
|
|
|
118
|
+
# Meta only. Beneficiary/payer entity IDs required alongside regionalRegulatedCategories. Values are numeric IDs from the advertiser's Meta verification/authorization setup. Keys depend on the declared category: BRAZIL_REGULATION and THAILAND_UNIVERSAL use universal_beneficiary / universal_payer; SINGAPORE_UNIVERSAL uses singapore_universal_beneficiary / singapore_universal_payer; TAIWAN_UNIVERSAL uses taiwan_universal_beneficiary / taiwan_universal_payer; TAIWAN_FINSERV uses taiwan_finserv_beneficiary / taiwan_finserv_payer; AUSTRALIA_FINSERV uses australia_finserv_beneficiary / australia_finserv_payer; INDIA_FINSERV uses india_finserv_beneficiary / india_finserv_payer. Both beneficiary and payer must be included. If omitted and the advertiser has set defaults in Meta Ads Manager advertising settings, Meta auto-fills them.
|
|
119
|
+
attr_accessor :regional_regulation_identities
|
|
120
|
+
|
|
118
121
|
class EnumAttributeValidator
|
|
119
122
|
attr_reader :datatype
|
|
120
123
|
attr_reader :allowable_values
|
|
@@ -174,7 +177,8 @@ module Zernio
|
|
|
174
177
|
:'roas_average_floor' => :'roasAverageFloor',
|
|
175
178
|
:'dsa_beneficiary' => :'dsaBeneficiary',
|
|
176
179
|
:'dsa_payor' => :'dsaPayor',
|
|
177
|
-
:'regional_regulated_categories' => :'regionalRegulatedCategories'
|
|
180
|
+
:'regional_regulated_categories' => :'regionalRegulatedCategories',
|
|
181
|
+
:'regional_regulation_identities' => :'regionalRegulationIdentities'
|
|
178
182
|
}
|
|
179
183
|
end
|
|
180
184
|
|
|
@@ -225,7 +229,8 @@ module Zernio
|
|
|
225
229
|
:'roas_average_floor' => :'Float',
|
|
226
230
|
:'dsa_beneficiary' => :'String',
|
|
227
231
|
:'dsa_payor' => :'String',
|
|
228
|
-
:'regional_regulated_categories' => :'Array<String>'
|
|
232
|
+
:'regional_regulated_categories' => :'Array<String>',
|
|
233
|
+
:'regional_regulation_identities' => :'Hash<String, Integer>'
|
|
229
234
|
}
|
|
230
235
|
end
|
|
231
236
|
|
|
@@ -414,6 +419,12 @@ module Zernio
|
|
|
414
419
|
self.regional_regulated_categories = value
|
|
415
420
|
end
|
|
416
421
|
end
|
|
422
|
+
|
|
423
|
+
if attributes.key?(:'regional_regulation_identities')
|
|
424
|
+
if (value = attributes[:'regional_regulation_identities']).is_a?(Hash)
|
|
425
|
+
self.regional_regulation_identities = value
|
|
426
|
+
end
|
|
427
|
+
end
|
|
417
428
|
end
|
|
418
429
|
|
|
419
430
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -802,7 +813,8 @@ module Zernio
|
|
|
802
813
|
roas_average_floor == o.roas_average_floor &&
|
|
803
814
|
dsa_beneficiary == o.dsa_beneficiary &&
|
|
804
815
|
dsa_payor == o.dsa_payor &&
|
|
805
|
-
regional_regulated_categories == o.regional_regulated_categories
|
|
816
|
+
regional_regulated_categories == o.regional_regulated_categories &&
|
|
817
|
+
regional_regulation_identities == o.regional_regulation_identities
|
|
806
818
|
end
|
|
807
819
|
|
|
808
820
|
# @see the `==` method
|
|
@@ -814,7 +826,7 @@ module Zernio
|
|
|
814
826
|
# Calculates hash code according to all attributes.
|
|
815
827
|
# @return [Integer] Hash code
|
|
816
828
|
def hash
|
|
817
|
-
[account_id, ad_account_id, name, headline, body, image_url, video, welcome_message, creatives, ad_set_id, budget_amount, budget_type, currency, end_date, countries, cities, regions, zips, metros, custom_locations, age_min, age_max, interests, audience_id, placements, advantage_audience, objective, status, campaign_status, bid_strategy, bid_amount, roas_average_floor, dsa_beneficiary, dsa_payor, regional_regulated_categories].hash
|
|
829
|
+
[account_id, ad_account_id, name, headline, body, image_url, video, welcome_message, creatives, ad_set_id, budget_amount, budget_type, currency, end_date, countries, cities, regions, zips, metros, custom_locations, age_min, age_max, interests, audience_id, placements, advantage_audience, objective, status, campaign_status, bid_strategy, bid_amount, roas_average_floor, dsa_beneficiary, dsa_payor, regional_regulated_categories, regional_regulation_identities].hash
|
|
818
830
|
end
|
|
819
831
|
|
|
820
832
|
# Builds the object from hash
|