late-sdk 0.0.894 → 0.0.896

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 (109) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +26 -3
  3. data/docs/AdAccountsApi.md +446 -0
  4. data/docs/AdAnalyticsResponse.md +1 -1
  5. data/docs/AdAnalyticsResponseAnalytics.md +22 -0
  6. data/docs/AdCampaign.md +1 -1
  7. data/docs/AdCampaignBudget.md +11 -3
  8. data/docs/AdCampaignsApi.md +149 -3
  9. data/docs/AdInsightsApi.md +1 -1
  10. data/docs/AdNegativeKeywordList.md +26 -0
  11. data/docs/AdNegativeKeywordListKeyword.md +22 -0
  12. data/docs/BoostPostRequest.md +6 -4
  13. data/docs/CampaignAnalyticsResponseAnalytics.md +3 -1
  14. data/docs/CampaignAnalyticsResponseAnalyticsImpressionShareCache.md +20 -0
  15. data/docs/CampaignAnalyticsResponseAnalyticsSummary.md +96 -0
  16. data/docs/CampaignAnalyticsResponseCampaign.md +2 -0
  17. data/docs/CreateAdNegativeKeywordList201Response.md +24 -0
  18. data/docs/CreateAdNegativeKeywordListRequest.md +26 -0
  19. data/docs/CreateCallAdRequest.md +8 -2
  20. data/docs/CreateMessagingAdRequest.md +8 -2
  21. data/docs/CtwaAdRequestBody.md +8 -2
  22. data/docs/CtwaAdRequestBodyCreativesInner.md +7 -3
  23. data/docs/DeleteAdNegativeKeywordList200Response.md +20 -0
  24. data/docs/GetAdAnalytics202Response.md +1 -1
  25. data/docs/GetAdNegativeKeywordList200Response.md +24 -0
  26. data/docs/GetAdNegativeKeywordList200ResponseList.md +28 -0
  27. data/docs/ListAdNegativeKeywordLists200Response.md +24 -0
  28. data/docs/MediaItem.md +1 -1
  29. data/docs/MessagingAdsApi.md +10 -10
  30. data/docs/ReplaceAdNegativeKeywordListKeywords200Response.md +22 -0
  31. data/docs/ReplaceAdNegativeKeywordListKeywordsRequest.md +24 -0
  32. data/docs/ReplaceCampaignNegativeKeywordListsRequest.md +20 -0
  33. data/docs/UpdateAdCampaign200Response.md +1 -1
  34. data/docs/UpdateAdCampaignRequest.md +2 -0
  35. data/docs/UpdateAdNegativeKeywordList200Response.md +20 -0
  36. data/docs/UpdateAdNegativeKeywordListRequest.md +24 -0
  37. data/lib/zernio-sdk/api/ad_accounts_api.rb +500 -0
  38. data/lib/zernio-sdk/api/ad_campaigns_api.rb +160 -6
  39. data/lib/zernio-sdk/api/ad_insights_api.rb +2 -2
  40. data/lib/zernio-sdk/api/messaging_ads_api.rb +8 -8
  41. data/lib/zernio-sdk/models/ad_analytics_response.rb +1 -1
  42. data/lib/zernio-sdk/models/ad_analytics_response_analytics.rb +169 -0
  43. data/lib/zernio-sdk/models/ad_campaign.rb +3 -1
  44. data/lib/zernio-sdk/models/ad_campaign_budget.rb +99 -5
  45. data/lib/zernio-sdk/models/ad_negative_keyword_list.rb +209 -0
  46. data/lib/zernio-sdk/models/ad_negative_keyword_list_keyword.rb +222 -0
  47. data/lib/zernio-sdk/models/boost_post_request.rb +38 -7
  48. data/lib/zernio-sdk/models/campaign_analytics_response_analytics.rb +11 -2
  49. data/lib/zernio-sdk/models/campaign_analytics_response_analytics_impression_share_cache.rb +158 -0
  50. data/lib/zernio-sdk/models/campaign_analytics_response_analytics_summary.rb +550 -0
  51. data/lib/zernio-sdk/models/campaign_analytics_response_campaign.rb +11 -1
  52. data/lib/zernio-sdk/models/create_ad_negative_keyword_list201_response.rb +220 -0
  53. data/lib/zernio-sdk/models/create_ad_negative_keyword_list_request.rb +327 -0
  54. data/lib/zernio-sdk/models/create_call_ad_request.rb +94 -3
  55. data/lib/zernio-sdk/models/create_messaging_ad_request.rb +94 -3
  56. data/lib/zernio-sdk/models/ctwa_ad_request_body.rb +95 -4
  57. data/lib/zernio-sdk/models/ctwa_ad_request_body_creatives_inner.rb +67 -21
  58. data/lib/zernio-sdk/models/ctwa_ad_request_body_creatives_inner_video.rb +1 -1
  59. data/lib/zernio-sdk/models/ctwa_ad_request_body_video.rb +1 -1
  60. data/lib/zernio-sdk/models/{ad_campaign_campaign_budget.rb → delete_ad_negative_keyword_list200_response.rb} +35 -48
  61. data/lib/zernio-sdk/models/get_ad_analytics202_response.rb +1 -1
  62. data/lib/zernio-sdk/models/get_ad_negative_keyword_list200_response.rb +199 -0
  63. data/lib/zernio-sdk/models/get_ad_negative_keyword_list200_response_list.rb +227 -0
  64. data/lib/zernio-sdk/models/list_ad_negative_keyword_lists200_response.rb +201 -0
  65. data/lib/zernio-sdk/models/media_item.rb +1 -0
  66. data/lib/zernio-sdk/models/replace_ad_negative_keyword_list_keywords200_response.rb +189 -0
  67. data/lib/zernio-sdk/models/replace_ad_negative_keyword_list_keywords_request.rb +289 -0
  68. data/lib/zernio-sdk/models/replace_campaign_negative_keyword_lists_request.rb +219 -0
  69. data/lib/zernio-sdk/models/update_ad_campaign200_response.rb +1 -1
  70. data/lib/zernio-sdk/models/update_ad_campaign_request.rb +13 -1
  71. data/lib/zernio-sdk/models/update_ad_campaign_request_budget.rb +1 -1
  72. data/lib/zernio-sdk/models/update_ad_negative_keyword_list200_response.rb +178 -0
  73. data/lib/zernio-sdk/models/update_ad_negative_keyword_list_request.rb +296 -0
  74. data/lib/zernio-sdk/version.rb +1 -1
  75. data/lib/zernio-sdk.rb +16 -1
  76. data/openapi.yaml +981 -43
  77. data/spec/api/ad_accounts_api_spec.rb +82 -0
  78. data/spec/api/ad_campaigns_api_spec.rb +29 -3
  79. data/spec/api/ad_insights_api_spec.rb +1 -1
  80. data/spec/api/messaging_ads_api_spec.rb +4 -4
  81. data/spec/models/ad_analytics_response_analytics_spec.rb +48 -0
  82. data/spec/models/ad_campaign_budget_spec.rb +24 -0
  83. data/spec/models/ad_negative_keyword_list_keyword_spec.rb +52 -0
  84. data/spec/models/ad_negative_keyword_list_spec.rb +60 -0
  85. data/spec/models/boost_post_request_spec.rb +7 -1
  86. data/spec/models/campaign_analytics_response_analytics_impression_share_cache_spec.rb +42 -0
  87. data/spec/models/campaign_analytics_response_analytics_spec.rb +6 -0
  88. data/spec/models/campaign_analytics_response_analytics_summary_spec.rb +270 -0
  89. data/spec/models/campaign_analytics_response_campaign_spec.rb +6 -0
  90. data/spec/models/create_ad_negative_keyword_list201_response_spec.rb +54 -0
  91. data/spec/models/create_ad_negative_keyword_list_request_spec.rb +64 -0
  92. data/spec/models/create_call_ad_request_spec.rb +18 -0
  93. data/spec/models/create_messaging_ad_request_spec.rb +18 -0
  94. data/spec/models/ctwa_ad_request_body_creatives_inner_spec.rb +12 -0
  95. data/spec/models/ctwa_ad_request_body_spec.rb +18 -0
  96. data/spec/models/delete_ad_negative_keyword_list200_response_spec.rb +42 -0
  97. data/spec/models/get_ad_negative_keyword_list200_response_list_spec.rb +66 -0
  98. data/spec/models/get_ad_negative_keyword_list200_response_spec.rb +54 -0
  99. data/spec/models/list_ad_negative_keyword_lists200_response_spec.rb +54 -0
  100. data/spec/models/replace_ad_negative_keyword_list_keywords200_response_spec.rb +48 -0
  101. data/spec/models/replace_ad_negative_keyword_list_keywords_request_spec.rb +58 -0
  102. data/spec/models/{ad_campaign_campaign_budget_spec.rb → replace_campaign_negative_keyword_lists_request_spec.rb} +12 -12
  103. data/spec/models/update_ad_campaign_request_spec.rb +6 -0
  104. data/spec/models/update_ad_negative_keyword_list200_response_spec.rb +42 -0
  105. data/spec/models/update_ad_negative_keyword_list_request_spec.rb +58 -0
  106. data/zernio-sdk-0.0.896.gem +0 -0
  107. metadata +66 -6
  108. data/docs/AdCampaignCampaignBudget.md +0 -20
  109. data/zernio-sdk-0.0.894.gem +0 -0
@@ -87,6 +87,74 @@ module Zernio
87
87
  return data, status_code, headers
88
88
  end
89
89
 
90
+ # Create a negative keyword list
91
+ # Creates one Google Ads shared negative keyword list with optional initial keywords in a single atomic mutation. Daily quota is reserved for every mutate item, so large batches may return 429 before any change. This operation is not idempotent. The list is not attached to any campaign.
92
+ # @param create_ad_negative_keyword_list_request [CreateAdNegativeKeywordListRequest]
93
+ # @param [Hash] opts the optional parameters
94
+ # @return [CreateAdNegativeKeywordList201Response]
95
+ def create_ad_negative_keyword_list(create_ad_negative_keyword_list_request, opts = {})
96
+ data, _status_code, _headers = create_ad_negative_keyword_list_with_http_info(create_ad_negative_keyword_list_request, opts)
97
+ data
98
+ end
99
+
100
+ # Create a negative keyword list
101
+ # Creates one Google Ads shared negative keyword list with optional initial keywords in a single atomic mutation. Daily quota is reserved for every mutate item, so large batches may return 429 before any change. This operation is not idempotent. The list is not attached to any campaign.
102
+ # @param create_ad_negative_keyword_list_request [CreateAdNegativeKeywordListRequest]
103
+ # @param [Hash] opts the optional parameters
104
+ # @return [Array<(CreateAdNegativeKeywordList201Response, Integer, Hash)>] CreateAdNegativeKeywordList201Response data, response status code and response headers
105
+ def create_ad_negative_keyword_list_with_http_info(create_ad_negative_keyword_list_request, opts = {})
106
+ if @api_client.config.debugging
107
+ @api_client.config.logger.debug 'Calling API: AdAccountsApi.create_ad_negative_keyword_list ...'
108
+ end
109
+ # verify the required parameter 'create_ad_negative_keyword_list_request' is set
110
+ if @api_client.config.client_side_validation && create_ad_negative_keyword_list_request.nil?
111
+ fail ArgumentError, "Missing the required parameter 'create_ad_negative_keyword_list_request' when calling AdAccountsApi.create_ad_negative_keyword_list"
112
+ end
113
+ # resource path
114
+ local_var_path = '/v1/ads/accounts/negative-keyword-lists'
115
+
116
+ # query parameters
117
+ query_params = opts[:query_params] || {}
118
+
119
+ # header parameters
120
+ header_params = opts[:header_params] || {}
121
+ # HTTP header 'Accept' (if needed)
122
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
123
+ # HTTP header 'Content-Type'
124
+ content_type = @api_client.select_header_content_type(['application/json'])
125
+ if !content_type.nil?
126
+ header_params['Content-Type'] = content_type
127
+ end
128
+
129
+ # form parameters
130
+ form_params = opts[:form_params] || {}
131
+
132
+ # http body (model)
133
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_ad_negative_keyword_list_request)
134
+
135
+ # return_type
136
+ return_type = opts[:debug_return_type] || 'CreateAdNegativeKeywordList201Response'
137
+
138
+ # auth_names
139
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
140
+
141
+ new_options = opts.merge(
142
+ :operation => :"AdAccountsApi.create_ad_negative_keyword_list",
143
+ :header_params => header_params,
144
+ :query_params => query_params,
145
+ :form_params => form_params,
146
+ :body => post_body,
147
+ :auth_names => auth_names,
148
+ :return_type => return_type
149
+ )
150
+
151
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
152
+ if @api_client.config.debugging
153
+ @api_client.config.logger.debug "API called: AdAccountsApi#create_ad_negative_keyword_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
154
+ end
155
+ return data, status_code, headers
156
+ end
157
+
90
158
  # Create or reuse a custom conversion
91
159
  # Provision the Meta custom conversion an ads flow optimises toward, and hand back the `customConversionId` for `promotedObject.customConversionId` on POST /v1/ads/create. Removes the manual \"create it in Ads Manager first\" step. **Reuse is ours, not Meta's.** Meta's create is not idempotent, so a retried request would otherwise mint a duplicate carrying none of the original's optimisation history. A non-archived conversion with the same `name` on the same `pixelId` is returned instead of created, with `reused: true` and a 200 rather than a 201. `rule` is forwarded verbatim in Meta's own grammar (e.g. `{\"url\": {\"i_contains\": \"thank-you\"}}`); Meta validates it and rejects a malformed one with \"A conversion rule is required at creation time\".
92
160
  # @param account_id [String] Meta ads SocialAccount id.
@@ -297,6 +365,101 @@ module Zernio
297
365
  return data, status_code, headers
298
366
  end
299
367
 
368
+ # Delete a negative keyword list
369
+ # Removes the Google shared negative keyword list. Detach it from all campaigns first; an in-use list is rejected. Only NEGATIVE_KEYWORDS shared sets are supported.
370
+ # @param list_id [String]
371
+ # @param account_id [String]
372
+ # @param [Hash] opts the optional parameters
373
+ # @option opts [String] :customer_id
374
+ # @option opts [String] :platform
375
+ # @return [DeleteAdNegativeKeywordList200Response]
376
+ def delete_ad_negative_keyword_list(list_id, account_id, opts = {})
377
+ data, _status_code, _headers = delete_ad_negative_keyword_list_with_http_info(list_id, account_id, opts)
378
+ data
379
+ end
380
+
381
+ # Delete a negative keyword list
382
+ # Removes the Google shared negative keyword list. Detach it from all campaigns first; an in-use list is rejected. Only NEGATIVE_KEYWORDS shared sets are supported.
383
+ # @param list_id [String]
384
+ # @param account_id [String]
385
+ # @param [Hash] opts the optional parameters
386
+ # @option opts [String] :customer_id
387
+ # @option opts [String] :platform
388
+ # @return [Array<(DeleteAdNegativeKeywordList200Response, Integer, Hash)>] DeleteAdNegativeKeywordList200Response data, response status code and response headers
389
+ def delete_ad_negative_keyword_list_with_http_info(list_id, account_id, opts = {})
390
+ if @api_client.config.debugging
391
+ @api_client.config.logger.debug 'Calling API: AdAccountsApi.delete_ad_negative_keyword_list ...'
392
+ end
393
+ # verify the required parameter 'list_id' is set
394
+ if @api_client.config.client_side_validation && list_id.nil?
395
+ fail ArgumentError, "Missing the required parameter 'list_id' when calling AdAccountsApi.delete_ad_negative_keyword_list"
396
+ end
397
+ pattern = Regexp.new(/^\d+$/)
398
+ if @api_client.config.client_side_validation && list_id !~ pattern
399
+ fail ArgumentError, "invalid value for 'list_id' when calling AdAccountsApi.delete_ad_negative_keyword_list, must conform to the pattern #{pattern}."
400
+ end
401
+
402
+ # verify the required parameter 'account_id' is set
403
+ if @api_client.config.client_side_validation && account_id.nil?
404
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AdAccountsApi.delete_ad_negative_keyword_list"
405
+ end
406
+ pattern = Regexp.new(/^[a-fA-F0-9]{24}$/)
407
+ if @api_client.config.client_side_validation && account_id !~ pattern
408
+ fail ArgumentError, "invalid value for 'account_id' when calling AdAccountsApi.delete_ad_negative_keyword_list, must conform to the pattern #{pattern}."
409
+ end
410
+
411
+ pattern = Regexp.new(/^\d+$/)
412
+ if @api_client.config.client_side_validation && !opts[:'customer_id'].nil? && opts[:'customer_id'] !~ pattern
413
+ fail ArgumentError, "invalid value for 'opts[:\"customer_id\"]' when calling AdAccountsApi.delete_ad_negative_keyword_list, must conform to the pattern #{pattern}."
414
+ end
415
+
416
+ allowable_values = ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter", "openai"]
417
+ if @api_client.config.client_side_validation && opts[:'platform'] && !allowable_values.include?(opts[:'platform'])
418
+ fail ArgumentError, "invalid value for \"platform\", must be one of #{allowable_values}"
419
+ end
420
+ # resource path
421
+ local_var_path = '/v1/ads/accounts/negative-keyword-lists/{listId}'.sub('{' + 'listId' + '}', CGI.escape(list_id.to_s))
422
+
423
+ # query parameters
424
+ query_params = opts[:query_params] || {}
425
+ query_params[:'accountId'] = account_id
426
+ query_params[:'customerId'] = opts[:'customer_id'] if !opts[:'customer_id'].nil?
427
+ query_params[:'platform'] = opts[:'platform'] if !opts[:'platform'].nil?
428
+
429
+ # header parameters
430
+ header_params = opts[:header_params] || {}
431
+ # HTTP header 'Accept' (if needed)
432
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
433
+
434
+ # form parameters
435
+ form_params = opts[:form_params] || {}
436
+
437
+ # http body (model)
438
+ post_body = opts[:debug_body]
439
+
440
+ # return_type
441
+ return_type = opts[:debug_return_type] || 'DeleteAdNegativeKeywordList200Response'
442
+
443
+ # auth_names
444
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
445
+
446
+ new_options = opts.merge(
447
+ :operation => :"AdAccountsApi.delete_ad_negative_keyword_list",
448
+ :header_params => header_params,
449
+ :query_params => query_params,
450
+ :form_params => form_params,
451
+ :body => post_body,
452
+ :auth_names => auth_names,
453
+ :return_type => return_type
454
+ )
455
+
456
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
457
+ if @api_client.config.debugging
458
+ @api_client.config.logger.debug "API called: AdAccountsApi#delete_ad_negative_keyword_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
459
+ end
460
+ return data, status_code, headers
461
+ end
462
+
300
463
  # Delete a value rule set
301
464
  # Deletes the rule set (Meta's `POST /{value-rule-set-id}/delete_rule_set`, a custom action edge rather than an HTTP DELETE on its side). Ad sets pointing at it are not modified here; detach them first with `valueRulesApplied: false` on `PUT /v1/ads/ad-sets/{adSetId}`.
302
465
  # @param value_rule_set_id [String] Platform value rule set id.
@@ -522,6 +685,101 @@ module Zernio
522
685
  return data, status_code, headers
523
686
  end
524
687
 
688
+ # Get a negative keyword list
689
+ # Google Ads shared negative keyword lists (shared_set type NEGATIVE_KEYWORDS). Reads are cached for 10 minutes; quota exhaustion may return the last successful result for up to 7 days with stale=true. Customer selection is limited to this connection and its account scope. Includes the keywords and their criterion ids.
690
+ # @param list_id [String]
691
+ # @param account_id [String]
692
+ # @param [Hash] opts the optional parameters
693
+ # @option opts [String] :customer_id
694
+ # @option opts [String] :platform
695
+ # @return [GetAdNegativeKeywordList200Response]
696
+ def get_ad_negative_keyword_list(list_id, account_id, opts = {})
697
+ data, _status_code, _headers = get_ad_negative_keyword_list_with_http_info(list_id, account_id, opts)
698
+ data
699
+ end
700
+
701
+ # Get a negative keyword list
702
+ # Google Ads shared negative keyword lists (shared_set type NEGATIVE_KEYWORDS). Reads are cached for 10 minutes; quota exhaustion may return the last successful result for up to 7 days with stale&#x3D;true. Customer selection is limited to this connection and its account scope. Includes the keywords and their criterion ids.
703
+ # @param list_id [String]
704
+ # @param account_id [String]
705
+ # @param [Hash] opts the optional parameters
706
+ # @option opts [String] :customer_id
707
+ # @option opts [String] :platform
708
+ # @return [Array<(GetAdNegativeKeywordList200Response, Integer, Hash)>] GetAdNegativeKeywordList200Response data, response status code and response headers
709
+ def get_ad_negative_keyword_list_with_http_info(list_id, account_id, opts = {})
710
+ if @api_client.config.debugging
711
+ @api_client.config.logger.debug 'Calling API: AdAccountsApi.get_ad_negative_keyword_list ...'
712
+ end
713
+ # verify the required parameter 'list_id' is set
714
+ if @api_client.config.client_side_validation && list_id.nil?
715
+ fail ArgumentError, "Missing the required parameter 'list_id' when calling AdAccountsApi.get_ad_negative_keyword_list"
716
+ end
717
+ pattern = Regexp.new(/^\d+$/)
718
+ if @api_client.config.client_side_validation && list_id !~ pattern
719
+ fail ArgumentError, "invalid value for 'list_id' when calling AdAccountsApi.get_ad_negative_keyword_list, must conform to the pattern #{pattern}."
720
+ end
721
+
722
+ # verify the required parameter 'account_id' is set
723
+ if @api_client.config.client_side_validation && account_id.nil?
724
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AdAccountsApi.get_ad_negative_keyword_list"
725
+ end
726
+ pattern = Regexp.new(/^[a-fA-F0-9]{24}$/)
727
+ if @api_client.config.client_side_validation && account_id !~ pattern
728
+ fail ArgumentError, "invalid value for 'account_id' when calling AdAccountsApi.get_ad_negative_keyword_list, must conform to the pattern #{pattern}."
729
+ end
730
+
731
+ pattern = Regexp.new(/^\d+$/)
732
+ if @api_client.config.client_side_validation && !opts[:'customer_id'].nil? && opts[:'customer_id'] !~ pattern
733
+ fail ArgumentError, "invalid value for 'opts[:\"customer_id\"]' when calling AdAccountsApi.get_ad_negative_keyword_list, must conform to the pattern #{pattern}."
734
+ end
735
+
736
+ allowable_values = ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter", "openai"]
737
+ if @api_client.config.client_side_validation && opts[:'platform'] && !allowable_values.include?(opts[:'platform'])
738
+ fail ArgumentError, "invalid value for \"platform\", must be one of #{allowable_values}"
739
+ end
740
+ # resource path
741
+ local_var_path = '/v1/ads/accounts/negative-keyword-lists/{listId}'.sub('{' + 'listId' + '}', CGI.escape(list_id.to_s))
742
+
743
+ # query parameters
744
+ query_params = opts[:query_params] || {}
745
+ query_params[:'accountId'] = account_id
746
+ query_params[:'customerId'] = opts[:'customer_id'] if !opts[:'customer_id'].nil?
747
+ query_params[:'platform'] = opts[:'platform'] if !opts[:'platform'].nil?
748
+
749
+ # header parameters
750
+ header_params = opts[:header_params] || {}
751
+ # HTTP header 'Accept' (if needed)
752
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
753
+
754
+ # form parameters
755
+ form_params = opts[:form_params] || {}
756
+
757
+ # http body (model)
758
+ post_body = opts[:debug_body]
759
+
760
+ # return_type
761
+ return_type = opts[:debug_return_type] || 'GetAdNegativeKeywordList200Response'
762
+
763
+ # auth_names
764
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
765
+
766
+ new_options = opts.merge(
767
+ :operation => :"AdAccountsApi.get_ad_negative_keyword_list",
768
+ :header_params => header_params,
769
+ :query_params => query_params,
770
+ :form_params => form_params,
771
+ :body => post_body,
772
+ :auth_names => auth_names,
773
+ :return_type => return_type
774
+ )
775
+
776
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
777
+ if @api_client.config.debugging
778
+ @api_client.config.logger.debug "API called: AdAccountsApi#get_ad_negative_keyword_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
779
+ end
780
+ return data, status_code, headers
781
+ end
782
+
525
783
  # Ad account change / audit log
526
784
  # Account-level audit log from Meta's `/act_X/activities`: who changed what and when (creates, edits, status flips, budget changes...) with Meta's translated event names and the structured before/after in `extra_data`. Rows are returned verbatim. Meta has no server-side per-object filter on this edge, so `objectId` filters the returned page client-side (combine with paging to walk history for one campaign/ad set/ad).
527
785
  # @param account_id [String] Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
@@ -1058,6 +1316,90 @@ module Zernio
1058
1316
  return data, status_code, headers
1059
1317
  end
1060
1318
 
1319
+ # List negative keyword lists
1320
+ # Google Ads shared negative keyword lists (shared_set type NEGATIVE_KEYWORDS). Reads are cached for 10 minutes; quota exhaustion may return the last successful result for up to 7 days with stale=true. Customer selection is limited to this connection and its account scope.
1321
+ # @param account_id [String]
1322
+ # @param [Hash] opts the optional parameters
1323
+ # @option opts [String] :customer_id
1324
+ # @option opts [String] :platform
1325
+ # @return [ListAdNegativeKeywordLists200Response]
1326
+ def list_ad_negative_keyword_lists(account_id, opts = {})
1327
+ data, _status_code, _headers = list_ad_negative_keyword_lists_with_http_info(account_id, opts)
1328
+ data
1329
+ end
1330
+
1331
+ # List negative keyword lists
1332
+ # Google Ads shared negative keyword lists (shared_set type NEGATIVE_KEYWORDS). Reads are cached for 10 minutes; quota exhaustion may return the last successful result for up to 7 days with stale&#x3D;true. Customer selection is limited to this connection and its account scope.
1333
+ # @param account_id [String]
1334
+ # @param [Hash] opts the optional parameters
1335
+ # @option opts [String] :customer_id
1336
+ # @option opts [String] :platform
1337
+ # @return [Array<(ListAdNegativeKeywordLists200Response, Integer, Hash)>] ListAdNegativeKeywordLists200Response data, response status code and response headers
1338
+ def list_ad_negative_keyword_lists_with_http_info(account_id, opts = {})
1339
+ if @api_client.config.debugging
1340
+ @api_client.config.logger.debug 'Calling API: AdAccountsApi.list_ad_negative_keyword_lists ...'
1341
+ end
1342
+ # verify the required parameter 'account_id' is set
1343
+ if @api_client.config.client_side_validation && account_id.nil?
1344
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AdAccountsApi.list_ad_negative_keyword_lists"
1345
+ end
1346
+ pattern = Regexp.new(/^[a-fA-F0-9]{24}$/)
1347
+ if @api_client.config.client_side_validation && account_id !~ pattern
1348
+ fail ArgumentError, "invalid value for 'account_id' when calling AdAccountsApi.list_ad_negative_keyword_lists, must conform to the pattern #{pattern}."
1349
+ end
1350
+
1351
+ pattern = Regexp.new(/^\d+$/)
1352
+ if @api_client.config.client_side_validation && !opts[:'customer_id'].nil? && opts[:'customer_id'] !~ pattern
1353
+ fail ArgumentError, "invalid value for 'opts[:\"customer_id\"]' when calling AdAccountsApi.list_ad_negative_keyword_lists, must conform to the pattern #{pattern}."
1354
+ end
1355
+
1356
+ allowable_values = ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter", "openai"]
1357
+ if @api_client.config.client_side_validation && opts[:'platform'] && !allowable_values.include?(opts[:'platform'])
1358
+ fail ArgumentError, "invalid value for \"platform\", must be one of #{allowable_values}"
1359
+ end
1360
+ # resource path
1361
+ local_var_path = '/v1/ads/accounts/negative-keyword-lists'
1362
+
1363
+ # query parameters
1364
+ query_params = opts[:query_params] || {}
1365
+ query_params[:'accountId'] = account_id
1366
+ query_params[:'customerId'] = opts[:'customer_id'] if !opts[:'customer_id'].nil?
1367
+ query_params[:'platform'] = opts[:'platform'] if !opts[:'platform'].nil?
1368
+
1369
+ # header parameters
1370
+ header_params = opts[:header_params] || {}
1371
+ # HTTP header 'Accept' (if needed)
1372
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1373
+
1374
+ # form parameters
1375
+ form_params = opts[:form_params] || {}
1376
+
1377
+ # http body (model)
1378
+ post_body = opts[:debug_body]
1379
+
1380
+ # return_type
1381
+ return_type = opts[:debug_return_type] || 'ListAdNegativeKeywordLists200Response'
1382
+
1383
+ # auth_names
1384
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1385
+
1386
+ new_options = opts.merge(
1387
+ :operation => :"AdAccountsApi.list_ad_negative_keyword_lists",
1388
+ :header_params => header_params,
1389
+ :query_params => query_params,
1390
+ :form_params => form_params,
1391
+ :body => post_body,
1392
+ :auth_names => auth_names,
1393
+ :return_type => return_type
1394
+ )
1395
+
1396
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1397
+ if @api_client.config.debugging
1398
+ @api_client.config.logger.debug "API called: AdAccountsApi#list_ad_negative_keyword_lists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1399
+ end
1400
+ return data, status_code, headers
1401
+ end
1402
+
1061
1403
  # A/B tests and lift studies
1062
1404
  # Lists the ad account's A/B tests and lift studies (Meta's `/act_X/ad_studies`), rows returned verbatim. The default projection covers id, name, type, timing and cells with split percentages; `fields` is a raw-passthrough override.
1063
1405
  # @param account_id [String] Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
@@ -1595,6 +1937,85 @@ module Zernio
1595
1937
  return data, status_code, headers
1596
1938
  end
1597
1939
 
1940
+ # Replace negative list keywords
1941
+ # Replaces the full desired keyword set. Existing keywords are diffed by normalized text and match type; creates and removals are applied atomically in one mutation. Unchanged criteria retain their ids. Send an empty keywords array to clear the list. Changes affect every campaign using this list. Each create or removal consumes one daily operation; the entire batch must fit the remaining quota.
1942
+ # @param list_id [String]
1943
+ # @param replace_ad_negative_keyword_list_keywords_request [ReplaceAdNegativeKeywordListKeywordsRequest]
1944
+ # @param [Hash] opts the optional parameters
1945
+ # @return [ReplaceAdNegativeKeywordListKeywords200Response]
1946
+ def replace_ad_negative_keyword_list_keywords(list_id, replace_ad_negative_keyword_list_keywords_request, opts = {})
1947
+ data, _status_code, _headers = replace_ad_negative_keyword_list_keywords_with_http_info(list_id, replace_ad_negative_keyword_list_keywords_request, opts)
1948
+ data
1949
+ end
1950
+
1951
+ # Replace negative list keywords
1952
+ # Replaces the full desired keyword set. Existing keywords are diffed by normalized text and match type; creates and removals are applied atomically in one mutation. Unchanged criteria retain their ids. Send an empty keywords array to clear the list. Changes affect every campaign using this list. Each create or removal consumes one daily operation; the entire batch must fit the remaining quota.
1953
+ # @param list_id [String]
1954
+ # @param replace_ad_negative_keyword_list_keywords_request [ReplaceAdNegativeKeywordListKeywordsRequest]
1955
+ # @param [Hash] opts the optional parameters
1956
+ # @return [Array<(ReplaceAdNegativeKeywordListKeywords200Response, Integer, Hash)>] ReplaceAdNegativeKeywordListKeywords200Response data, response status code and response headers
1957
+ def replace_ad_negative_keyword_list_keywords_with_http_info(list_id, replace_ad_negative_keyword_list_keywords_request, opts = {})
1958
+ if @api_client.config.debugging
1959
+ @api_client.config.logger.debug 'Calling API: AdAccountsApi.replace_ad_negative_keyword_list_keywords ...'
1960
+ end
1961
+ # verify the required parameter 'list_id' is set
1962
+ if @api_client.config.client_side_validation && list_id.nil?
1963
+ fail ArgumentError, "Missing the required parameter 'list_id' when calling AdAccountsApi.replace_ad_negative_keyword_list_keywords"
1964
+ end
1965
+ pattern = Regexp.new(/^\d+$/)
1966
+ if @api_client.config.client_side_validation && list_id !~ pattern
1967
+ fail ArgumentError, "invalid value for 'list_id' when calling AdAccountsApi.replace_ad_negative_keyword_list_keywords, must conform to the pattern #{pattern}."
1968
+ end
1969
+
1970
+ # verify the required parameter 'replace_ad_negative_keyword_list_keywords_request' is set
1971
+ if @api_client.config.client_side_validation && replace_ad_negative_keyword_list_keywords_request.nil?
1972
+ fail ArgumentError, "Missing the required parameter 'replace_ad_negative_keyword_list_keywords_request' when calling AdAccountsApi.replace_ad_negative_keyword_list_keywords"
1973
+ end
1974
+ # resource path
1975
+ local_var_path = '/v1/ads/accounts/negative-keyword-lists/{listId}/keywords'.sub('{' + 'listId' + '}', CGI.escape(list_id.to_s))
1976
+
1977
+ # query parameters
1978
+ query_params = opts[:query_params] || {}
1979
+
1980
+ # header parameters
1981
+ header_params = opts[:header_params] || {}
1982
+ # HTTP header 'Accept' (if needed)
1983
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1984
+ # HTTP header 'Content-Type'
1985
+ content_type = @api_client.select_header_content_type(['application/json'])
1986
+ if !content_type.nil?
1987
+ header_params['Content-Type'] = content_type
1988
+ end
1989
+
1990
+ # form parameters
1991
+ form_params = opts[:form_params] || {}
1992
+
1993
+ # http body (model)
1994
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(replace_ad_negative_keyword_list_keywords_request)
1995
+
1996
+ # return_type
1997
+ return_type = opts[:debug_return_type] || 'ReplaceAdNegativeKeywordListKeywords200Response'
1998
+
1999
+ # auth_names
2000
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
2001
+
2002
+ new_options = opts.merge(
2003
+ :operation => :"AdAccountsApi.replace_ad_negative_keyword_list_keywords",
2004
+ :header_params => header_params,
2005
+ :query_params => query_params,
2006
+ :form_params => form_params,
2007
+ :body => post_body,
2008
+ :auth_names => auth_names,
2009
+ :return_type => return_type
2010
+ )
2011
+
2012
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2013
+ if @api_client.config.debugging
2014
+ @api_client.config.logger.debug "API called: AdAccountsApi#replace_ad_negative_keyword_list_keywords\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2015
+ end
2016
+ return data, status_code, headers
2017
+ end
2018
+
1598
2019
  # Update ad account settings
1599
2020
  # Sets the default DSA beneficiary and payor on a Meta ad account (EU DSA, Article 26). Set them once and every EU-targeted call to `/v1/ads/create`, `/v1/ads/boost` and `/v1/ads/ctwa` on that ad account can omit `dsaBeneficiary`/`dsaPayor`: Meta applies the defaults automatically. The values are written to the ad account on Meta, the same setting Ads Manager edits. Nothing is stored in Zernio, and defaults already set in Ads Manager work identically. Zernio never guesses these values for you. Beneficiary and payor are legal disclosures shown to EU users, so you must provide the entity names explicitly. Use `GET /v1/ads/dsa-recommendations` to offer suggestions in your UI. If `defaultDsaPayor` is omitted, the beneficiary is also set as the payor, which covers the common case where the same entity benefits from and pays for the ads. Read the current values back with `GET /v1/ads/dsa-defaults`. Currently supported for Meta accounts only; other platforms return 400.
1600
2021
  # @param update_ad_account_request [UpdateAdAccountRequest]
@@ -1663,6 +2084,85 @@ module Zernio
1663
2084
  return data, status_code, headers
1664
2085
  end
1665
2086
 
2087
+ # Rename a negative keyword list
2088
+ # Renames a shared negative keyword list. Keywords and campaign associations are unchanged. Use the keywords endpoint to edit the desired keyword set.
2089
+ # @param list_id [String]
2090
+ # @param update_ad_negative_keyword_list_request [UpdateAdNegativeKeywordListRequest]
2091
+ # @param [Hash] opts the optional parameters
2092
+ # @return [UpdateAdNegativeKeywordList200Response]
2093
+ def update_ad_negative_keyword_list(list_id, update_ad_negative_keyword_list_request, opts = {})
2094
+ data, _status_code, _headers = update_ad_negative_keyword_list_with_http_info(list_id, update_ad_negative_keyword_list_request, opts)
2095
+ data
2096
+ end
2097
+
2098
+ # Rename a negative keyword list
2099
+ # Renames a shared negative keyword list. Keywords and campaign associations are unchanged. Use the keywords endpoint to edit the desired keyword set.
2100
+ # @param list_id [String]
2101
+ # @param update_ad_negative_keyword_list_request [UpdateAdNegativeKeywordListRequest]
2102
+ # @param [Hash] opts the optional parameters
2103
+ # @return [Array<(UpdateAdNegativeKeywordList200Response, Integer, Hash)>] UpdateAdNegativeKeywordList200Response data, response status code and response headers
2104
+ def update_ad_negative_keyword_list_with_http_info(list_id, update_ad_negative_keyword_list_request, opts = {})
2105
+ if @api_client.config.debugging
2106
+ @api_client.config.logger.debug 'Calling API: AdAccountsApi.update_ad_negative_keyword_list ...'
2107
+ end
2108
+ # verify the required parameter 'list_id' is set
2109
+ if @api_client.config.client_side_validation && list_id.nil?
2110
+ fail ArgumentError, "Missing the required parameter 'list_id' when calling AdAccountsApi.update_ad_negative_keyword_list"
2111
+ end
2112
+ pattern = Regexp.new(/^\d+$/)
2113
+ if @api_client.config.client_side_validation && list_id !~ pattern
2114
+ fail ArgumentError, "invalid value for 'list_id' when calling AdAccountsApi.update_ad_negative_keyword_list, must conform to the pattern #{pattern}."
2115
+ end
2116
+
2117
+ # verify the required parameter 'update_ad_negative_keyword_list_request' is set
2118
+ if @api_client.config.client_side_validation && update_ad_negative_keyword_list_request.nil?
2119
+ fail ArgumentError, "Missing the required parameter 'update_ad_negative_keyword_list_request' when calling AdAccountsApi.update_ad_negative_keyword_list"
2120
+ end
2121
+ # resource path
2122
+ local_var_path = '/v1/ads/accounts/negative-keyword-lists/{listId}'.sub('{' + 'listId' + '}', CGI.escape(list_id.to_s))
2123
+
2124
+ # query parameters
2125
+ query_params = opts[:query_params] || {}
2126
+
2127
+ # header parameters
2128
+ header_params = opts[:header_params] || {}
2129
+ # HTTP header 'Accept' (if needed)
2130
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2131
+ # HTTP header 'Content-Type'
2132
+ content_type = @api_client.select_header_content_type(['application/json'])
2133
+ if !content_type.nil?
2134
+ header_params['Content-Type'] = content_type
2135
+ end
2136
+
2137
+ # form parameters
2138
+ form_params = opts[:form_params] || {}
2139
+
2140
+ # http body (model)
2141
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_ad_negative_keyword_list_request)
2142
+
2143
+ # return_type
2144
+ return_type = opts[:debug_return_type] || 'UpdateAdNegativeKeywordList200Response'
2145
+
2146
+ # auth_names
2147
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
2148
+
2149
+ new_options = opts.merge(
2150
+ :operation => :"AdAccountsApi.update_ad_negative_keyword_list",
2151
+ :header_params => header_params,
2152
+ :query_params => query_params,
2153
+ :form_params => form_params,
2154
+ :body => post_body,
2155
+ :auth_names => auth_names,
2156
+ :return_type => return_type
2157
+ )
2158
+
2159
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2160
+ if @api_client.config.debugging
2161
+ @api_client.config.logger.debug "API called: AdAccountsApi#update_ad_negative_keyword_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2162
+ end
2163
+ return data, status_code, headers
2164
+ end
2165
+
1666
2166
  # Replace a value rule set
1667
2167
  # **THIS IS A FULL REPLACE, NOT A PATCH.** Meta's update is declarative: the body you send becomes the rule set. - `GET /v1/ads/value-rule-sets/{valueRuleSetId}` FIRST. - Keep a rule or criterion by echoing its `id`. - Create one by including the object WITHOUT an `id`. - Delete one by OMITTING it from the array. There is no warning and no undo. `name` and `rules` are both required for exactly this reason: a partial body would silently destroy every rule left out. **Rule order is semantic**: the array order you send is the evaluation order, and only the first matching rule adjusts the bid for an overlapping audience. Existing rule sets created elsewhere may contain `LOCATION_DMA` criteria. Those went inert on 2026-06-22 and are rejected here; migrate them to `LOCATION_COMSCORE_MARKET`.
1668
2168
  # @param value_rule_set_id [String] Platform value rule set id.