late-sdk 0.0.899 → 0.0.900

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.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +21 -2
  3. data/docs/AdAccountsApi.md +463 -3
  4. data/docs/AdCampaignsApi.md +4 -4
  5. data/docs/AdTracking.md +20 -0
  6. data/docs/CreateAdCampaign200Response.md +26 -0
  7. data/docs/CreateAdCampaignRequest.md +8 -0
  8. data/docs/CreateCallAdRequest.md +2 -0
  9. data/docs/CreateMessagingAdRequest.md +2 -0
  10. data/docs/CreateStandaloneAdRequest.md +11 -3
  11. data/docs/CtwaAdRequestBody.md +2 -0
  12. data/docs/GetAdComments200ResponseMeta.md +10 -4
  13. data/docs/GetIosFourteenCampaignLimits200Response.md +18 -0
  14. data/docs/GetIosFourteenCampaignLimits200ResponseLimits.md +22 -0
  15. data/docs/HideAdComment200Response.md +22 -0
  16. data/docs/HideAdCommentRequest.md +18 -0
  17. data/docs/ListAdsInstagramAccounts200Response.md +22 -0
  18. data/docs/ListAdsInstagramAccounts200ResponseAccountsInner.md +26 -0
  19. data/docs/ListAdsInstagramAccounts200ResponsePagesInner.md +24 -0
  20. data/docs/ListAdsInstagramAccounts200ResponseResolved.md +22 -0
  21. data/docs/ListAdvertisableApplications200Response.md +18 -0
  22. data/docs/ListAdvertisableApplications200ResponseApplicationsInner.md +24 -0
  23. data/docs/MetaInstagramIdentityRef.md +22 -0
  24. data/docs/ReplyToAdComment200Response.md +20 -0
  25. data/docs/ReplyToAdCommentRequest.md +18 -0
  26. data/docs/TargetingSpec.md +4 -0
  27. data/lib/zernio-sdk/api/ad_accounts_api.rb +512 -4
  28. data/lib/zernio-sdk/api/ad_campaigns_api.rb +3 -3
  29. data/lib/zernio-sdk/models/{create_standalone_ad_request_tracking.rb → ad_tracking.rb} +5 -5
  30. data/lib/zernio-sdk/models/create_ad_campaign200_response.rb +231 -0
  31. data/lib/zernio-sdk/models/create_ad_campaign_request.rb +52 -1
  32. data/lib/zernio-sdk/models/create_call_ad_request.rb +10 -1
  33. data/lib/zernio-sdk/models/create_messaging_ad_request.rb +10 -1
  34. data/lib/zernio-sdk/models/create_standalone_ad_request.rb +98 -4
  35. data/lib/zernio-sdk/models/ctwa_ad_request_body.rb +10 -1
  36. data/lib/zernio-sdk/models/get_ad_comments200_response_meta.rb +36 -46
  37. data/lib/zernio-sdk/models/get_ios_fourteen_campaign_limits200_response.rb +164 -0
  38. data/lib/zernio-sdk/models/get_ios_fourteen_campaign_limits200_response_limits.rb +172 -0
  39. data/lib/zernio-sdk/models/hide_ad_comment200_response.rb +225 -0
  40. data/lib/zernio-sdk/models/hide_ad_comment_request.rb +165 -0
  41. data/lib/zernio-sdk/models/list_ads_instagram_accounts200_response.rb +220 -0
  42. data/lib/zernio-sdk/models/list_ads_instagram_accounts200_response_accounts_inner.rb +287 -0
  43. data/lib/zernio-sdk/models/list_ads_instagram_accounts200_response_pages_inner.rb +210 -0
  44. data/lib/zernio-sdk/models/list_ads_instagram_accounts200_response_resolved.rb +211 -0
  45. data/lib/zernio-sdk/models/list_advertisable_applications200_response.rb +166 -0
  46. data/lib/zernio-sdk/models/list_advertisable_applications200_response_applications_inner.rb +250 -0
  47. data/lib/zernio-sdk/models/meta_instagram_identity_ref.rb +202 -0
  48. data/lib/zernio-sdk/models/reply_to_ad_comment200_response.rb +215 -0
  49. data/lib/zernio-sdk/models/reply_to_ad_comment_request.rb +174 -0
  50. data/lib/zernio-sdk/models/targeting_spec.rb +63 -1
  51. data/lib/zernio-sdk/version.rb +1 -1
  52. data/lib/zernio-sdk.rb +15 -2
  53. data/openapi.yaml +618 -143
  54. data/spec/api/ad_accounts_api_spec.rb +91 -2
  55. data/spec/api/ad_campaigns_api_spec.rb +1 -1
  56. data/spec/models/{create_standalone_ad_request_tracking_spec.rb → ad_tracking_spec.rb} +6 -6
  57. data/spec/models/create_ad_campaign200_response_spec.rb +68 -0
  58. data/spec/models/create_ad_campaign_request_spec.rb +28 -0
  59. data/spec/models/create_call_ad_request_spec.rb +6 -0
  60. data/spec/models/create_messaging_ad_request_spec.rb +6 -0
  61. data/spec/models/create_standalone_ad_request_spec.rb +28 -0
  62. data/spec/models/ctwa_ad_request_body_spec.rb +6 -0
  63. data/spec/models/get_ad_comments200_response_meta_spec.rb +19 -1
  64. data/spec/models/get_ios_fourteen_campaign_limits200_response_limits_spec.rb +48 -0
  65. data/spec/models/get_ios_fourteen_campaign_limits200_response_spec.rb +36 -0
  66. data/spec/models/hide_ad_comment200_response_spec.rb +52 -0
  67. data/spec/models/hide_ad_comment_request_spec.rb +36 -0
  68. data/spec/models/list_ads_instagram_accounts200_response_accounts_inner_spec.rb +64 -0
  69. data/spec/models/list_ads_instagram_accounts200_response_pages_inner_spec.rb +54 -0
  70. data/spec/models/list_ads_instagram_accounts200_response_resolved_spec.rb +52 -0
  71. data/spec/models/list_ads_instagram_accounts200_response_spec.rb +48 -0
  72. data/spec/models/list_advertisable_applications200_response_applications_inner_spec.rb +54 -0
  73. data/spec/models/list_advertisable_applications200_response_spec.rb +36 -0
  74. data/spec/models/meta_instagram_identity_ref_spec.rb +48 -0
  75. data/spec/models/reply_to_ad_comment200_response_spec.rb +46 -0
  76. data/spec/models/reply_to_ad_comment_request_spec.rb +36 -0
  77. data/spec/models/targeting_spec_spec.rb +12 -0
  78. data/zernio-sdk-0.0.900.gem +0 -0
  79. metadata +62 -10
  80. data/docs/CreateStandaloneAdRequestPromotedObject.md +0 -38
  81. data/docs/CreateStandaloneAdRequestTracking.md +0 -20
  82. data/lib/zernio-sdk/models/create_standalone_ad_request_promoted_object.rb +0 -249
  83. data/spec/models/create_standalone_ad_request_promoted_object_spec.rb +0 -96
  84. data/zernio-sdk-0.0.899.gem +0 -0
@@ -14,12 +14,12 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Zernio
17
- # Meta only. Attaches pixel measurement to the ad regardless of the optimization goal (the \"Website events\" tracking row in Ads Manager). `pixelId` becomes the ad's `tracking_specs` (offsite_conversion + fb_pixel); `urlTags` becomes the ad's `url_tags` (click-tracking query params). Applied on the legacy single-creative shape, every ad of the multi-creative shape, and the attach shape. NOTE: tracking lives on the AD object and is not inherited from the ad set, so pass it on EVERY attach call that should carry the pixel.
18
- class CreateStandaloneAdRequestTracking < ApiModelBase
17
+ # Meta only. Attaches pixel measurement to the ad regardless of the optimization goal (the \"Website events\" tracking row in Ads Manager). `pixelId` becomes the ad's `tracking_specs` (offsite_conversion + fb_pixel); `urlTags` is stored on the new creative as `url_tags` and retained on the ad for compatibility. Applied on the legacy single-creative shape, every ad of the multi-creative shape, and the attach shape. NOTE: tracking lives on the AD object and is not inherited from the ad set, so pass it on EVERY attach call that should carry the pixel.
18
+ class AdTracking < ApiModelBase
19
19
  # Meta Pixel ID to attach for offsite-conversion measurement.
20
20
  attr_accessor :pixel_id
21
21
 
22
- # Click-URL params appended to the ad's destination as `url_tags` (e.g. utm_source). Meta dynamic macros ({{ad.id}}, {{campaign.id}}, {{placement}}, ...) are sent through unescaped so Meta expands them; every other character is percent-encoded.
22
+ # Click-URL params stored on the creative as `url_tags` and returned by GET /v1/ads/{adId}/tracking-tags. App-promotion linkUrl stays byte-identical to promotedObject.objectStoreUrl. Meta dynamic macros ({{ad.id}}, {{campaign.id}}, {{placement}}, ...) are sent through unescaped so Meta expands them; every other character is percent-encoded.
23
23
  attr_accessor :url_tags
24
24
 
25
25
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -58,14 +58,14 @@ module Zernio
58
58
  # @param [Hash] attributes Model attributes in the form of hash
59
59
  def initialize(attributes = {})
60
60
  if (!attributes.is_a?(Hash))
61
- fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::CreateStandaloneAdRequestTracking` initialize method"
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::AdTracking` initialize method"
62
62
  end
63
63
 
64
64
  # check to see if the attribute exists and convert string to symbol for hash key
65
65
  acceptable_attribute_map = self.class.acceptable_attribute_map
66
66
  attributes = attributes.each_with_object({}) { |(k, v), h|
67
67
  if (!acceptable_attribute_map.key?(k.to_sym))
68
- fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::CreateStandaloneAdRequestTracking`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
68
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::AdTracking`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
69
69
  end
70
70
  h[k.to_sym] = v
71
71
  }
@@ -0,0 +1,231 @@
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 CreateAdCampaign200Response < ApiModelBase
18
+ # Always true.
19
+ attr_accessor :validate_only
20
+
21
+ attr_accessor :ad_account_id
22
+
23
+ # Empty because no campaign was created.
24
+ attr_accessor :campaign_id
25
+
26
+ attr_accessor :objective
27
+
28
+ attr_accessor :status
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
+
52
+ # Attribute mapping from ruby-style variable name to JSON key.
53
+ def self.attribute_map
54
+ {
55
+ :'validate_only' => :'validateOnly',
56
+ :'ad_account_id' => :'adAccountId',
57
+ :'campaign_id' => :'campaignId',
58
+ :'objective' => :'objective',
59
+ :'status' => :'status'
60
+ }
61
+ end
62
+
63
+ # Returns attribute mapping this model knows about
64
+ def self.acceptable_attribute_map
65
+ attribute_map
66
+ end
67
+
68
+ # Returns all the JSON keys this model knows about
69
+ def self.acceptable_attributes
70
+ acceptable_attribute_map.values
71
+ end
72
+
73
+ # Attribute type mapping.
74
+ def self.openapi_types
75
+ {
76
+ :'validate_only' => :'Boolean',
77
+ :'ad_account_id' => :'String',
78
+ :'campaign_id' => :'String',
79
+ :'objective' => :'String',
80
+ :'status' => :'String'
81
+ }
82
+ end
83
+
84
+ # List of attributes with nullable: true
85
+ def self.openapi_nullable
86
+ Set.new([
87
+ ])
88
+ end
89
+
90
+ # Initializes the object
91
+ # @param [Hash] attributes Model attributes in the form of hash
92
+ def initialize(attributes = {})
93
+ if (!attributes.is_a?(Hash))
94
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::CreateAdCampaign200Response` initialize method"
95
+ end
96
+
97
+ # check to see if the attribute exists and convert string to symbol for hash key
98
+ acceptable_attribute_map = self.class.acceptable_attribute_map
99
+ attributes = attributes.each_with_object({}) { |(k, v), h|
100
+ if (!acceptable_attribute_map.key?(k.to_sym))
101
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::CreateAdCampaign200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
102
+ end
103
+ h[k.to_sym] = v
104
+ }
105
+
106
+ if attributes.key?(:'validate_only')
107
+ self.validate_only = attributes[:'validate_only']
108
+ end
109
+
110
+ if attributes.key?(:'ad_account_id')
111
+ self.ad_account_id = attributes[:'ad_account_id']
112
+ end
113
+
114
+ if attributes.key?(:'campaign_id')
115
+ self.campaign_id = attributes[:'campaign_id']
116
+ end
117
+
118
+ if attributes.key?(:'objective')
119
+ self.objective = attributes[:'objective']
120
+ end
121
+
122
+ if attributes.key?(:'status')
123
+ self.status = attributes[:'status']
124
+ end
125
+ end
126
+
127
+ # Show invalid properties with the reasons. Usually used together with valid?
128
+ # @return Array for valid properties with the reasons
129
+ def list_invalid_properties
130
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
131
+ invalid_properties = Array.new
132
+ invalid_properties
133
+ end
134
+
135
+ # Check to see if the all the properties in the model are valid
136
+ # @return true if the model is valid
137
+ def valid?
138
+ warn '[DEPRECATED] the `valid?` method is obsolete'
139
+ campaign_id_validator = EnumAttributeValidator.new('String', [""])
140
+ return false unless campaign_id_validator.valid?(@campaign_id)
141
+ status_validator = EnumAttributeValidator.new('String', ["VALIDATED"])
142
+ return false unless status_validator.valid?(@status)
143
+ true
144
+ end
145
+
146
+ # Custom attribute writer method checking allowed values (enum).
147
+ # @param [Object] campaign_id Object to be assigned
148
+ def campaign_id=(campaign_id)
149
+ validator = EnumAttributeValidator.new('String', [""])
150
+ unless validator.valid?(campaign_id)
151
+ fail ArgumentError, "invalid value for \"campaign_id\", must be one of #{validator.allowable_values}."
152
+ end
153
+ @campaign_id = campaign_id
154
+ end
155
+
156
+ # Custom attribute writer method checking allowed values (enum).
157
+ # @param [Object] status Object to be assigned
158
+ def status=(status)
159
+ validator = EnumAttributeValidator.new('String', ["VALIDATED"])
160
+ unless validator.valid?(status)
161
+ fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
162
+ end
163
+ @status = status
164
+ end
165
+
166
+ # Checks equality by comparing each attribute.
167
+ # @param [Object] Object to be compared
168
+ def ==(o)
169
+ return true if self.equal?(o)
170
+ self.class == o.class &&
171
+ validate_only == o.validate_only &&
172
+ ad_account_id == o.ad_account_id &&
173
+ campaign_id == o.campaign_id &&
174
+ objective == o.objective &&
175
+ status == o.status
176
+ end
177
+
178
+ # @see the `==` method
179
+ # @param [Object] Object to be compared
180
+ def eql?(o)
181
+ self == o
182
+ end
183
+
184
+ # Calculates hash code according to all attributes.
185
+ # @return [Integer] Hash code
186
+ def hash
187
+ [validate_only, ad_account_id, campaign_id, objective, status].hash
188
+ end
189
+
190
+ # Builds the object from hash
191
+ # @param [Hash] attributes Model attributes in the form of hash
192
+ # @return [Object] Returns the model itself
193
+ def self.build_from_hash(attributes)
194
+ return nil unless attributes.is_a?(Hash)
195
+ attributes = attributes.transform_keys(&:to_sym)
196
+ transformed_hash = {}
197
+ openapi_types.each_pair do |key, type|
198
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
199
+ transformed_hash["#{key}"] = nil
200
+ elsif type =~ /\AArray<(.*)>/i
201
+ # check to ensure the input is an array given that the attribute
202
+ # is documented as an array but the input is not
203
+ if attributes[attribute_map[key]].is_a?(Array)
204
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
205
+ end
206
+ elsif !attributes[attribute_map[key]].nil?
207
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
208
+ end
209
+ end
210
+ new(transformed_hash)
211
+ end
212
+
213
+ # Returns the object in the form of hash
214
+ # @return [Hash] Returns the object in the form of hash
215
+ def to_hash
216
+ hash = {}
217
+ self.class.attribute_map.each_pair do |attr, param|
218
+ value = self.send(attr)
219
+ if value.nil?
220
+ is_nullable = self.class.openapi_nullable.include?(attr)
221
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
222
+ end
223
+
224
+ hash[param] = _to_hash(value)
225
+ end
226
+ hash
227
+ end
228
+
229
+ end
230
+
231
+ end
@@ -26,6 +26,17 @@ module Zernio
26
26
  # Mapped to the ODAX objective (same mapping as POST /v1/ads/create).
27
27
  attr_accessor :goal
28
28
 
29
+ # Meta app promotion only. Immutable campaign flag. Set true for iOS 14+ SKAdNetwork campaigns and supply promotedObject.applicationId plus promotedObject.objectStoreUrl. The campaign receives promotedObject only when this flag is true. Cannot be changed on an existing campaign.
30
+ attr_accessor :is_skadnetwork_attribution
31
+
32
+ attr_accessor :promoted_object
33
+
34
+ # Meta only. SKAdNetwork app promotion requires AUCTION.
35
+ attr_accessor :buying_type
36
+
37
+ # Meta only. Runs campaign validation without creating or persisting a campaign; Idempotency-Key storage is bypassed. Returns HTTP 200 with validateOnly true and status VALIDATED.
38
+ attr_accessor :validate_only
39
+
29
40
  attr_accessor :special_ad_categories
30
41
 
31
42
  # Campaign-level (CBO) budget in WHOLE currency units (USD: 50 = $50.00), NOT cents. Meta's own Marketing API takes this same number in minor units, so it is an easy and expensive mix-up. Requires budgetType.
@@ -76,6 +87,10 @@ module Zernio
76
87
  :'ad_account_id' => :'adAccountId',
77
88
  :'name' => :'name',
78
89
  :'goal' => :'goal',
90
+ :'is_skadnetwork_attribution' => :'isSkadnetworkAttribution',
91
+ :'promoted_object' => :'promotedObject',
92
+ :'buying_type' => :'buyingType',
93
+ :'validate_only' => :'validateOnly',
79
94
  :'special_ad_categories' => :'specialAdCategories',
80
95
  :'budget_amount' => :'budgetAmount',
81
96
  :'budget_type' => :'budgetType',
@@ -104,6 +119,10 @@ module Zernio
104
119
  :'ad_account_id' => :'String',
105
120
  :'name' => :'String',
106
121
  :'goal' => :'String',
122
+ :'is_skadnetwork_attribution' => :'Boolean',
123
+ :'promoted_object' => :'AdPromotedObject',
124
+ :'buying_type' => :'String',
125
+ :'validate_only' => :'Boolean',
107
126
  :'special_ad_categories' => :'Array<String>',
108
127
  :'budget_amount' => :'Float',
109
128
  :'budget_type' => :'String',
@@ -161,6 +180,22 @@ module Zernio
161
180
  self.goal = nil
162
181
  end
163
182
 
183
+ if attributes.key?(:'is_skadnetwork_attribution')
184
+ self.is_skadnetwork_attribution = attributes[:'is_skadnetwork_attribution']
185
+ end
186
+
187
+ if attributes.key?(:'promoted_object')
188
+ self.promoted_object = attributes[:'promoted_object']
189
+ end
190
+
191
+ if attributes.key?(:'buying_type')
192
+ self.buying_type = attributes[:'buying_type']
193
+ end
194
+
195
+ if attributes.key?(:'validate_only')
196
+ self.validate_only = attributes[:'validate_only']
197
+ end
198
+
164
199
  if attributes.key?(:'special_ad_categories')
165
200
  if (value = attributes[:'special_ad_categories']).is_a?(Array)
166
201
  self.special_ad_categories = value
@@ -242,6 +277,8 @@ module Zernio
242
277
  return false if @goal.nil?
243
278
  goal_validator = EnumAttributeValidator.new('String', ["engagement", "traffic", "awareness", "video_views", "lead_generation", "lead_conversion", "job_applicants", "conversions", "app_promotion", "catalog_sales", "page_likes"])
244
279
  return false unless goal_validator.valid?(@goal)
280
+ buying_type_validator = EnumAttributeValidator.new('String', ["AUCTION", "RESERVED"])
281
+ return false unless buying_type_validator.valid?(@buying_type)
245
282
  budget_type_validator = EnumAttributeValidator.new('String', ["daily", "lifetime"])
246
283
  return false unless budget_type_validator.valid?(@budget_type)
247
284
  status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
@@ -296,6 +333,16 @@ module Zernio
296
333
  @goal = goal
297
334
  end
298
335
 
336
+ # Custom attribute writer method checking allowed values (enum).
337
+ # @param [Object] buying_type Object to be assigned
338
+ def buying_type=(buying_type)
339
+ validator = EnumAttributeValidator.new('String', ["AUCTION", "RESERVED"])
340
+ unless validator.valid?(buying_type)
341
+ fail ArgumentError, "invalid value for \"buying_type\", must be one of #{validator.allowable_values}."
342
+ end
343
+ @buying_type = buying_type
344
+ end
345
+
299
346
  # Custom attribute writer method checking allowed values (enum).
300
347
  # @param [Object] budget_type Object to be assigned
301
348
  def budget_type=(budget_type)
@@ -350,6 +397,10 @@ module Zernio
350
397
  ad_account_id == o.ad_account_id &&
351
398
  name == o.name &&
352
399
  goal == o.goal &&
400
+ is_skadnetwork_attribution == o.is_skadnetwork_attribution &&
401
+ promoted_object == o.promoted_object &&
402
+ buying_type == o.buying_type &&
403
+ validate_only == o.validate_only &&
353
404
  special_ad_categories == o.special_ad_categories &&
354
405
  budget_amount == o.budget_amount &&
355
406
  budget_type == o.budget_type &&
@@ -369,7 +420,7 @@ module Zernio
369
420
  # Calculates hash code according to all attributes.
370
421
  # @return [Integer] Hash code
371
422
  def hash
372
- [account_id, ad_account_id, name, goal, special_ad_categories, budget_amount, budget_type, status, bid_strategy, bid_amount, roas_average_floor, portfolio_bid_strategy_id].hash
423
+ [account_id, ad_account_id, name, goal, is_skadnetwork_attribution, promoted_object, buying_type, validate_only, special_ad_categories, budget_amount, budget_type, status, bid_strategy, bid_amount, roas_average_floor, portfolio_bid_strategy_id].hash
373
424
  end
374
425
 
375
426
  # Builds the object from hash
@@ -18,6 +18,8 @@ module Zernio
18
18
  # Meta enhancement settings for single or attached ads, and defaults for creatives[]. An item replaces the entire map, including with an empty object.
19
19
  attr_accessor :creative_features
20
20
 
21
+ attr_accessor :tracking
22
+
21
23
  # Facebook or Instagram SocialAccount ID.
22
24
  attr_accessor :account_id
23
25
 
@@ -161,6 +163,7 @@ module Zernio
161
163
  def self.attribute_map
162
164
  {
163
165
  :'creative_features' => :'creativeFeatures',
166
+ :'tracking' => :'tracking',
164
167
  :'account_id' => :'accountId',
165
168
  :'ad_account_id' => :'adAccountId',
166
169
  :'name' => :'name',
@@ -219,6 +222,7 @@ module Zernio
219
222
  def self.openapi_types
220
223
  {
221
224
  :'creative_features' => :'Hash<String, String>',
225
+ :'tracking' => :'AdTracking',
222
226
  :'account_id' => :'String',
223
227
  :'ad_account_id' => :'String',
224
228
  :'name' => :'String',
@@ -298,6 +302,10 @@ module Zernio
298
302
  end
299
303
  end
300
304
 
305
+ if attributes.key?(:'tracking')
306
+ self.tracking = attributes[:'tracking']
307
+ end
308
+
301
309
  if attributes.key?(:'account_id')
302
310
  self.account_id = attributes[:'account_id']
303
311
  else
@@ -937,6 +945,7 @@ module Zernio
937
945
  return true if self.equal?(o)
938
946
  self.class == o.class &&
939
947
  creative_features == o.creative_features &&
948
+ tracking == o.tracking &&
940
949
  account_id == o.account_id &&
941
950
  ad_account_id == o.ad_account_id &&
942
951
  name == o.name &&
@@ -989,7 +998,7 @@ module Zernio
989
998
  # Calculates hash code according to all attributes.
990
999
  # @return [Integer] Hash code
991
1000
  def hash
992
- [creative_features, account_id, ad_account_id, name, existing_post_id, object_story_id, whatsapp_phone_number, 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
1001
+ [creative_features, tracking, account_id, ad_account_id, name, existing_post_id, object_story_id, whatsapp_phone_number, 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
993
1002
  end
994
1003
 
995
1004
  # Builds the object from hash
@@ -18,6 +18,8 @@ module Zernio
18
18
  # Meta enhancement settings for single or attached ads, and defaults for creatives[]. An item replaces the entire map, including with an empty object.
19
19
  attr_accessor :creative_features
20
20
 
21
+ attr_accessor :tracking
22
+
21
23
  # Facebook or Instagram SocialAccount ID.
22
24
  attr_accessor :account_id
23
25
 
@@ -158,6 +160,7 @@ module Zernio
158
160
  def self.attribute_map
159
161
  {
160
162
  :'creative_features' => :'creativeFeatures',
163
+ :'tracking' => :'tracking',
161
164
  :'account_id' => :'accountId',
162
165
  :'ad_account_id' => :'adAccountId',
163
166
  :'name' => :'name',
@@ -215,6 +218,7 @@ module Zernio
215
218
  def self.openapi_types
216
219
  {
217
220
  :'creative_features' => :'Hash<String, String>',
221
+ :'tracking' => :'AdTracking',
218
222
  :'account_id' => :'String',
219
223
  :'ad_account_id' => :'String',
220
224
  :'name' => :'String',
@@ -293,6 +297,10 @@ module Zernio
293
297
  end
294
298
  end
295
299
 
300
+ if attributes.key?(:'tracking')
301
+ self.tracking = attributes[:'tracking']
302
+ end
303
+
296
304
  if attributes.key?(:'account_id')
297
305
  self.account_id = attributes[:'account_id']
298
306
  else
@@ -913,6 +921,7 @@ module Zernio
913
921
  return true if self.equal?(o)
914
922
  self.class == o.class &&
915
923
  creative_features == o.creative_features &&
924
+ tracking == o.tracking &&
916
925
  account_id == o.account_id &&
917
926
  ad_account_id == o.ad_account_id &&
918
927
  name == o.name &&
@@ -964,7 +973,7 @@ module Zernio
964
973
  # Calculates hash code according to all attributes.
965
974
  # @return [Integer] Hash code
966
975
  def hash
967
- [creative_features, account_id, ad_account_id, name, existing_post_id, object_story_id, whatsapp_phone_number, 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
976
+ [creative_features, tracking, account_id, ad_account_id, name, existing_post_id, object_story_id, whatsapp_phone_number, 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
968
977
  end
969
978
 
970
979
  # Builds the object from hash
@@ -55,7 +55,7 @@ module Zernio
55
55
  # Meta only. Multi-advertiser ads: whether Meta may show this ad alongside other advertisers' in one unit. Meta auto-enrols since Aug 2024, so send OPT_OUT to leave. It is a top-level creative field, NOT a `creativeFeatures` key, and Meta rejects it there.
56
56
  attr_accessor :multi_advertiser
57
57
 
58
- # Meta only, single standalone shape only (no creatives[], adSetId, or RESERVED). Dry-run: each node runs Meta's execution_options validate_only and NOTHING is created or persisted. Children need real parents, so a fresh tree validates the campaign + creative (the ad set needs its campaign to exist, so pass existingCampaignId to validate it too; the ad itself is never validatable pre-create). A Meta validation failure returns the 400 verbatim; success returns 200 with per-node results instead of an ad.
58
+ # Meta only. Validates the complete inline campaign, ad set, creative and ad with execution_options validate_only. Nothing is uploaded or created, and validation bypasses Idempotency-Key storage. Supports a single image, existing video.id or existingCreativeId; media pools, new video uploads, creatives[], adSetId and RESERVED buying return 400. Existing campaign or creative nodes are marked skipped. Success returns 200 with per-node results; Meta rejection returns an error.
59
59
  attr_accessor :validate_only
60
60
 
61
61
  # Budget in WHOLE currency units (USD: 50 = $50.00), NOT cents. Meta's own Marketing API takes this same number in minor units, so it is an easy and expensive mix-up. Required on legacy + multi-creative shapes. Inherited on attach. OpenAI Ads requires a $1 minimum (its budget is lifetime-only, see budgetType).
@@ -295,6 +295,18 @@ module Zernio
295
295
  # TikTok only. Creates the ad as a TikTok Upgraded Smart+ campaign: TikTok automates targeting, bidding and delivery. Supports goals `conversions` (Smart+ Web Conversions), `lead_generation` (Smart+ Lead Generation with a website form on `linkUrl`; TikTok Instant Forms not supported) and `app_promotion` (Smart+ App installs; the ad's destination is the app store, so `linkUrl` is not used). The web goals require `promotedObject.pixelId` AND `promotedObject.customEventType`; `app_promotion` requires `promotedObject.applicationId` instead. Targeting works like on any TikTok ad (defaults to `countries: [\"US\"]` when omitted); TikTok automates delivery within it. The budget lives on the Smart+ campaign (Campaign Budget Optimization); a `lifetime` budget additionally requires `endDate`. Cannot be combined with `adSetId`.
296
296
  attr_accessor :smart_plus
297
297
 
298
+ # Meta only. Operating systems and version ranges, such as iOS_ver_14.0_and_above or Android. Emitted as user_os. May also be supplied inside targeting.
299
+ attr_accessor :user_os
300
+
301
+ # Meta only. Device models such as iPhone. Emitted as user_device. May also be supplied inside targeting.
302
+ attr_accessor :user_device
303
+
304
+ # Meta app promotion only. Immutable campaign flag. Set true for iOS 14+ SKAdNetwork campaigns and supply promotedObject.applicationId plus promotedObject.objectStoreUrl. The campaign receives promotedObject only when this flag is true. Cannot be changed on an existing campaign.
305
+ attr_accessor :is_skadnetwork_attribution
306
+
307
+ # Meta ad-set attribution. Required as SKADNETWORK for iOS 14+ app promotion or a SKAdNetwork campaign. Requires AUCTION buying. Standalone Meta ad-set creation is not supported; use this field on /v1/ads/create.
308
+ attr_accessor :campaign_attribution
309
+
298
310
  attr_accessor :promoted_object
299
311
 
300
312
  class EnumAttributeValidator
@@ -420,6 +432,10 @@ module Zernio
420
432
  :'brand_identity' => :'brandIdentity',
421
433
  :'identity_type' => :'identityType',
422
434
  :'smart_plus' => :'smartPlus',
435
+ :'user_os' => :'userOs',
436
+ :'user_device' => :'userDevice',
437
+ :'is_skadnetwork_attribution' => :'isSkadnetworkAttribution',
438
+ :'campaign_attribution' => :'campaignAttribution',
423
439
  :'promoted_object' => :'promotedObject'
424
440
  }
425
441
  end
@@ -443,7 +459,7 @@ module Zernio
443
459
  :'campaign_name' => :'String',
444
460
  :'ad_set_name' => :'String',
445
461
  :'ad_name' => :'String',
446
- :'tracking' => :'CreateStandaloneAdRequestTracking',
462
+ :'tracking' => :'AdTracking',
447
463
  :'goal' => :'String',
448
464
  :'optimization_goal' => :'String',
449
465
  :'billing_event' => :'String',
@@ -535,7 +551,11 @@ module Zernio
535
551
  :'brand_identity' => :'CreateStandaloneAdRequestBrandIdentity',
536
552
  :'identity_type' => :'String',
537
553
  :'smart_plus' => :'Boolean',
538
- :'promoted_object' => :'CreateStandaloneAdRequestPromotedObject'
554
+ :'user_os' => :'Array<String>',
555
+ :'user_device' => :'Array<String>',
556
+ :'is_skadnetwork_attribution' => :'Boolean',
557
+ :'campaign_attribution' => :'String',
558
+ :'promoted_object' => :'AdPromotedObject'
539
559
  }
540
560
  end
541
561
 
@@ -1031,6 +1051,26 @@ module Zernio
1031
1051
  self.smart_plus = attributes[:'smart_plus']
1032
1052
  end
1033
1053
 
1054
+ if attributes.key?(:'user_os')
1055
+ if (value = attributes[:'user_os']).is_a?(Array)
1056
+ self.user_os = value
1057
+ end
1058
+ end
1059
+
1060
+ if attributes.key?(:'user_device')
1061
+ if (value = attributes[:'user_device']).is_a?(Array)
1062
+ self.user_device = value
1063
+ end
1064
+ end
1065
+
1066
+ if attributes.key?(:'is_skadnetwork_attribution')
1067
+ self.is_skadnetwork_attribution = attributes[:'is_skadnetwork_attribution']
1068
+ end
1069
+
1070
+ if attributes.key?(:'campaign_attribution')
1071
+ self.campaign_attribution = attributes[:'campaign_attribution']
1072
+ end
1073
+
1034
1074
  if attributes.key?(:'promoted_object')
1035
1075
  self.promoted_object = attributes[:'promoted_object']
1036
1076
  end
@@ -1211,6 +1251,14 @@ module Zernio
1211
1251
  invalid_properties.push('invalid value for "dsa_payor", the character length must be smaller than or equal to 100.')
1212
1252
  end
1213
1253
 
1254
+ if !@user_os.nil? && @user_os.length < 1
1255
+ invalid_properties.push('invalid value for "user_os", number of items must be greater than or equal to 1.')
1256
+ end
1257
+
1258
+ if !@user_device.nil? && @user_device.length < 1
1259
+ invalid_properties.push('invalid value for "user_device", number of items must be greater than or equal to 1.')
1260
+ end
1261
+
1214
1262
  invalid_properties
1215
1263
  end
1216
1264
 
@@ -1286,6 +1334,10 @@ module Zernio
1286
1334
  return false if !@dsa_payor.nil? && @dsa_payor.to_s.length > 100
1287
1335
  identity_type_validator = EnumAttributeValidator.new('String', ["TT_USER", "CUSTOMIZED_USER"])
1288
1336
  return false unless identity_type_validator.valid?(@identity_type)
1337
+ return false if !@user_os.nil? && @user_os.length < 1
1338
+ return false if !@user_device.nil? && @user_device.length < 1
1339
+ campaign_attribution_validator = EnumAttributeValidator.new('String', ["AEM", "SKADNETWORK"])
1340
+ return false unless campaign_attribution_validator.valid?(@campaign_attribution)
1289
1341
  true
1290
1342
  end
1291
1343
 
@@ -1867,6 +1919,44 @@ module Zernio
1867
1919
  @identity_type = identity_type
1868
1920
  end
1869
1921
 
1922
+ # Custom attribute writer method with validation
1923
+ # @param [Object] user_os Value to be assigned
1924
+ def user_os=(user_os)
1925
+ if user_os.nil?
1926
+ fail ArgumentError, 'user_os cannot be nil'
1927
+ end
1928
+
1929
+ if user_os.length < 1
1930
+ fail ArgumentError, 'invalid value for "user_os", number of items must be greater than or equal to 1.'
1931
+ end
1932
+
1933
+ @user_os = user_os
1934
+ end
1935
+
1936
+ # Custom attribute writer method with validation
1937
+ # @param [Object] user_device Value to be assigned
1938
+ def user_device=(user_device)
1939
+ if user_device.nil?
1940
+ fail ArgumentError, 'user_device cannot be nil'
1941
+ end
1942
+
1943
+ if user_device.length < 1
1944
+ fail ArgumentError, 'invalid value for "user_device", number of items must be greater than or equal to 1.'
1945
+ end
1946
+
1947
+ @user_device = user_device
1948
+ end
1949
+
1950
+ # Custom attribute writer method checking allowed values (enum).
1951
+ # @param [Object] campaign_attribution Object to be assigned
1952
+ def campaign_attribution=(campaign_attribution)
1953
+ validator = EnumAttributeValidator.new('String', ["AEM", "SKADNETWORK"])
1954
+ unless validator.valid?(campaign_attribution)
1955
+ fail ArgumentError, "invalid value for \"campaign_attribution\", must be one of #{validator.allowable_values}."
1956
+ end
1957
+ @campaign_attribution = campaign_attribution
1958
+ end
1959
+
1870
1960
  # Checks equality by comparing each attribute.
1871
1961
  # @param [Object] Object to be compared
1872
1962
  def ==(o)
@@ -1970,6 +2060,10 @@ module Zernio
1970
2060
  brand_identity == o.brand_identity &&
1971
2061
  identity_type == o.identity_type &&
1972
2062
  smart_plus == o.smart_plus &&
2063
+ user_os == o.user_os &&
2064
+ user_device == o.user_device &&
2065
+ is_skadnetwork_attribution == o.is_skadnetwork_attribution &&
2066
+ campaign_attribution == o.campaign_attribution &&
1973
2067
  promoted_object == o.promoted_object
1974
2068
  end
1975
2069
 
@@ -1982,7 +2076,7 @@ module Zernio
1982
2076
  # Calculates hash code according to all attributes.
1983
2077
  # @return [Integer] Hash code
1984
2078
  def hash
1985
- [account_id, ad_account_id, name, campaign_name, ad_set_name, ad_name, tracking, goal, optimization_goal, billing_event, buying_type, rf_prediction_id, promotion, creative_features, multi_advertiser, validate_only, budget_amount, budget_type, status, campaign_status, budget_level, currency, headline, long_headline, body, description, bodies, headlines, descriptions, 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, campaign_negative_keywords, additional_headlines, additional_descriptions, sitelinks, callouts, structured_snippets, advantage_audience, attribution_spec, gender, bid_strategy, bid_amount, roas_average_floor, portfolio_bid_strategy_id, value_rule_set_id, value_rules_applied, platform_specific_data, dsa_beneficiary, dsa_payor, brand_identity, identity_type, smart_plus, promoted_object].hash
2079
+ [account_id, ad_account_id, name, campaign_name, ad_set_name, ad_name, tracking, goal, optimization_goal, billing_event, buying_type, rf_prediction_id, promotion, creative_features, multi_advertiser, validate_only, budget_amount, budget_type, status, campaign_status, budget_level, currency, headline, long_headline, body, description, bodies, headlines, descriptions, 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, campaign_negative_keywords, additional_headlines, additional_descriptions, sitelinks, callouts, structured_snippets, advantage_audience, attribution_spec, gender, bid_strategy, bid_amount, roas_average_floor, portfolio_bid_strategy_id, value_rule_set_id, value_rules_applied, platform_specific_data, dsa_beneficiary, dsa_payor, brand_identity, identity_type, smart_plus, user_os, user_device, is_skadnetwork_attribution, campaign_attribution, promoted_object].hash
1986
2080
  end
1987
2081
 
1988
2082
  # Builds the object from hash