late-sdk 0.0.899 → 0.0.901

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 (223) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +81 -8
  3. data/docs/AdAccountsApi.md +1375 -277
  4. data/docs/AdCampaignsApi.md +525 -13
  5. data/docs/AdCreative.md +6 -0
  6. data/docs/AdTracking.md +20 -0
  7. data/docs/AddAccountCalloutsRequest.md +3 -3
  8. data/docs/AddAccountSitelinks201Response.md +20 -0
  9. data/docs/AddAccountSitelinks201ResponseSitelinksInner.md +26 -0
  10. data/docs/AddAccountSitelinksRequest.md +22 -0
  11. data/docs/AddAccountStructuredSnippets201Response.md +20 -0
  12. data/docs/AddAccountStructuredSnippets201ResponseStructuredSnippetsInner.md +22 -0
  13. data/docs/AddAccountStructuredSnippetsRequest.md +22 -0
  14. data/docs/AttachAdGroupAssets201Response.md +24 -0
  15. data/docs/AttachCampaignAssetsRequest.md +4 -4
  16. data/docs/CreateAdCampaign200Response.md +26 -0
  17. data/docs/CreateAdCampaignRequest.md +8 -0
  18. data/docs/CreateCallAdRequest.md +2 -0
  19. data/docs/CreateMessagingAdRequest.md +2 -0
  20. data/docs/CreateStandaloneAdRequest.md +15 -7
  21. data/docs/CreateStandaloneAdRequestAdditionalDescriptionsInner.md +49 -0
  22. data/docs/CreateStandaloneAdRequestAdditionalHeadlinesInner.md +49 -0
  23. data/docs/CtwaAdRequestBody.md +2 -0
  24. data/docs/GetAd200Response.md +5 -1
  25. data/docs/GetAdComments200ResponseMeta.md +10 -4
  26. data/docs/GetIosFourteenCampaignLimits200Response.md +18 -0
  27. data/docs/GetIosFourteenCampaignLimits200ResponseLimits.md +22 -0
  28. data/docs/GoogleAssetUpdate.md +26 -0
  29. data/docs/GoogleRsaDescription.md +20 -0
  30. data/docs/GoogleRsaHeadline.md +20 -0
  31. data/docs/{AttachCampaignAssetsRequestSitelinksInner.md → GoogleSitelink.md} +2 -2
  32. data/docs/{AttachCampaignAssetsRequestStructuredSnippetsInner.md → GoogleStructuredSnippet.md} +2 -2
  33. data/docs/HideAdComment200Response.md +22 -0
  34. data/docs/HideAdCommentRequest.md +18 -0
  35. data/docs/ListAccountCallouts200Response.md +2 -2
  36. data/docs/ListAccountCallouts200ResponseCalloutsInner.md +3 -3
  37. data/docs/ListAccountSitelinks200Response.md +24 -0
  38. data/docs/ListAccountSitelinks200ResponseSitelinksInner.md +32 -0
  39. data/docs/ListAccountStructuredSnippets200Response.md +24 -0
  40. data/docs/ListAccountStructuredSnippets200ResponseStructuredSnippetsInner.md +28 -0
  41. data/docs/ListAdGroupAssets200Response.md +28 -0
  42. data/docs/ListAdGroupAssets200ResponseCalloutsInner.md +22 -0
  43. data/docs/ListAdGroupAssets200ResponseSitelinksInner.md +28 -0
  44. data/docs/ListAdGroupAssets200ResponseStructuredSnippetsInner.md +24 -0
  45. data/docs/ListAdsInstagramAccounts200Response.md +22 -0
  46. data/docs/ListAdsInstagramAccounts200ResponseAccountsInner.md +26 -0
  47. data/docs/ListAdsInstagramAccounts200ResponsePagesInner.md +24 -0
  48. data/docs/ListAdsInstagramAccounts200ResponseResolved.md +22 -0
  49. data/docs/ListAdvertisableApplications200Response.md +18 -0
  50. data/docs/ListAdvertisableApplications200ResponseApplicationsInner.md +24 -0
  51. data/docs/ListCampaignAssets200Response.md +28 -0
  52. data/docs/ListCampaignAssets200ResponseCalloutsInner.md +22 -0
  53. data/docs/ListCampaignAssets200ResponseSitelinksInner.md +28 -0
  54. data/docs/ListCampaignAssets200ResponseStructuredSnippetsInner.md +24 -0
  55. data/docs/MetaInstagramIdentityRef.md +22 -0
  56. data/docs/RemoveAccountCalloutRequest.md +3 -3
  57. data/docs/RemoveAdGroupAssetsRequest.md +24 -0
  58. data/docs/RemoveCampaignAssets200Response.md +18 -0
  59. data/docs/RemoveCampaignAssetsRequest.md +24 -0
  60. data/docs/ReplyToAdComment200Response.md +20 -0
  61. data/docs/ReplyToAdCommentRequest.md +18 -0
  62. data/docs/TargetingSpec.md +4 -0
  63. data/docs/UpdateAccountCallouts200Response.md +20 -0
  64. data/docs/UpdateAccountCalloutsRequest.md +22 -0
  65. data/docs/UpdateAccountCalloutsRequestUpdatesInner.md +20 -0
  66. data/docs/UpdateAccountCalloutsRequestUpdatesInnerCalloutAsset.md +18 -0
  67. data/docs/UpdateAccountSitelinksRequest.md +22 -0
  68. data/docs/UpdateAccountSitelinksRequestUpdatesInner.md +22 -0
  69. data/docs/UpdateAccountSitelinksRequestUpdatesInnerSitelinkAsset.md +24 -0
  70. data/docs/UpdateAccountStructuredSnippetsRequest.md +22 -0
  71. data/docs/UpdateAccountStructuredSnippetsRequestUpdatesInner.md +20 -0
  72. data/docs/UpdateAdRequest.md +6 -0
  73. data/docs/UpdateCampaignAssets200Response.md +18 -0
  74. data/docs/UpdateCampaignAssetsRequest.md +22 -0
  75. data/lib/zernio-sdk/api/ad_accounts_api.rb +1511 -363
  76. data/lib/zernio-sdk/api/ad_campaigns_api.rb +589 -13
  77. data/lib/zernio-sdk/models/ad_creative.rb +112 -1
  78. data/lib/zernio-sdk/models/{create_standalone_ad_request_tracking.rb → ad_tracking.rb} +5 -5
  79. data/lib/zernio-sdk/models/add_account_callouts_request.rb +34 -3
  80. data/lib/zernio-sdk/models/add_account_sitelinks201_response.rb +158 -0
  81. data/lib/zernio-sdk/models/add_account_sitelinks201_response_sitelinks_inner.rb +267 -0
  82. data/lib/zernio-sdk/models/add_account_sitelinks_request.rb +253 -0
  83. data/lib/zernio-sdk/models/add_account_structured_snippets201_response.rb +158 -0
  84. data/lib/zernio-sdk/models/add_account_structured_snippets201_response_structured_snippets_inner.rb +229 -0
  85. data/lib/zernio-sdk/models/add_account_structured_snippets_request.rb +253 -0
  86. data/lib/zernio-sdk/models/attach_ad_group_assets201_response.rb +180 -0
  87. data/lib/zernio-sdk/models/attach_campaign_assets_request.rb +37 -5
  88. data/lib/zernio-sdk/models/create_ad_campaign200_response.rb +231 -0
  89. data/lib/zernio-sdk/models/create_ad_campaign_request.rb +52 -1
  90. data/lib/zernio-sdk/models/create_call_ad_request.rb +10 -1
  91. data/lib/zernio-sdk/models/create_messaging_ad_request.rb +10 -1
  92. data/lib/zernio-sdk/models/create_standalone_ad_request.rb +102 -8
  93. data/lib/zernio-sdk/models/create_standalone_ad_request_additional_descriptions_inner.rb +104 -0
  94. data/lib/zernio-sdk/models/create_standalone_ad_request_additional_headlines_inner.rb +104 -0
  95. data/lib/zernio-sdk/models/ctwa_ad_request_body.rb +10 -1
  96. data/lib/zernio-sdk/models/get_ad200_response.rb +25 -4
  97. data/lib/zernio-sdk/models/get_ad_comments200_response_meta.rb +36 -46
  98. data/lib/zernio-sdk/models/get_ios_fourteen_campaign_limits200_response.rb +164 -0
  99. data/lib/zernio-sdk/models/get_ios_fourteen_campaign_limits200_response_limits.rb +172 -0
  100. data/lib/zernio-sdk/models/google_asset_update.rb +234 -0
  101. data/lib/zernio-sdk/models/google_rsa_description.rb +226 -0
  102. data/lib/zernio-sdk/models/google_rsa_headline.rb +226 -0
  103. data/lib/zernio-sdk/models/{attach_campaign_assets_request_sitelinks_inner.rb → google_sitelink.rb} +3 -3
  104. data/lib/zernio-sdk/models/{attach_campaign_assets_request_structured_snippets_inner.rb → google_structured_snippet.rb} +3 -3
  105. data/lib/zernio-sdk/models/hide_ad_comment200_response.rb +225 -0
  106. data/lib/zernio-sdk/models/hide_ad_comment_request.rb +165 -0
  107. data/lib/zernio-sdk/models/list_account_callouts200_response.rb +2 -2
  108. data/lib/zernio-sdk/models/list_account_callouts200_response_callouts_inner.rb +13 -14
  109. data/lib/zernio-sdk/models/list_account_sitelinks200_response.rb +179 -0
  110. data/lib/zernio-sdk/models/list_account_sitelinks200_response_sitelinks_inner.rb +210 -0
  111. data/lib/zernio-sdk/models/list_account_structured_snippets200_response.rb +179 -0
  112. data/lib/zernio-sdk/models/list_account_structured_snippets200_response_structured_snippets_inner.rb +194 -0
  113. data/lib/zernio-sdk/models/list_ad_group_assets200_response.rb +201 -0
  114. data/lib/zernio-sdk/models/list_ad_group_assets200_response_callouts_inner.rb +165 -0
  115. data/lib/zernio-sdk/models/list_ad_group_assets200_response_sitelinks_inner.rb +192 -0
  116. data/lib/zernio-sdk/models/list_ad_group_assets200_response_structured_snippets_inner.rb +176 -0
  117. data/lib/zernio-sdk/models/list_ads_instagram_accounts200_response.rb +220 -0
  118. data/lib/zernio-sdk/models/list_ads_instagram_accounts200_response_accounts_inner.rb +287 -0
  119. data/lib/zernio-sdk/models/list_ads_instagram_accounts200_response_pages_inner.rb +210 -0
  120. data/lib/zernio-sdk/models/list_ads_instagram_accounts200_response_resolved.rb +211 -0
  121. data/lib/zernio-sdk/models/list_advertisable_applications200_response.rb +166 -0
  122. data/lib/zernio-sdk/models/list_advertisable_applications200_response_applications_inner.rb +250 -0
  123. data/lib/zernio-sdk/models/list_campaign_assets200_response.rb +201 -0
  124. data/lib/zernio-sdk/models/list_campaign_assets200_response_callouts_inner.rb +165 -0
  125. data/lib/zernio-sdk/models/list_campaign_assets200_response_sitelinks_inner.rb +192 -0
  126. data/lib/zernio-sdk/models/list_campaign_assets200_response_structured_snippets_inner.rb +176 -0
  127. data/lib/zernio-sdk/models/meta_instagram_identity_ref.rb +202 -0
  128. data/lib/zernio-sdk/models/remove_account_callout_request.rb +45 -3
  129. data/lib/zernio-sdk/models/remove_ad_group_assets_request.rb +281 -0
  130. data/lib/zernio-sdk/models/remove_campaign_assets200_response.rb +147 -0
  131. data/lib/zernio-sdk/models/remove_campaign_assets_request.rb +281 -0
  132. data/lib/zernio-sdk/models/reply_to_ad_comment200_response.rb +215 -0
  133. data/lib/zernio-sdk/models/reply_to_ad_comment_request.rb +174 -0
  134. data/lib/zernio-sdk/models/targeting_spec.rb +63 -1
  135. data/lib/zernio-sdk/models/update_account_callouts200_response.rb +156 -0
  136. data/lib/zernio-sdk/models/update_account_callouts_request.rb +253 -0
  137. data/lib/zernio-sdk/models/update_account_callouts_request_updates_inner.rb +186 -0
  138. data/lib/zernio-sdk/models/update_account_callouts_request_updates_inner_callout_asset.rb +182 -0
  139. data/lib/zernio-sdk/models/update_account_sitelinks_request.rb +253 -0
  140. data/lib/zernio-sdk/models/update_account_sitelinks_request_updates_inner.rb +216 -0
  141. data/lib/zernio-sdk/models/update_account_sitelinks_request_updates_inner_sitelink_asset.rb +241 -0
  142. data/lib/zernio-sdk/models/update_account_structured_snippets_request.rb +253 -0
  143. data/lib/zernio-sdk/models/update_account_structured_snippets_request_updates_inner.rb +186 -0
  144. data/lib/zernio-sdk/models/update_ad_request.rb +112 -1
  145. data/lib/zernio-sdk/models/update_campaign_assets200_response.rb +147 -0
  146. data/lib/zernio-sdk/models/update_campaign_assets_request.rb +253 -0
  147. data/lib/zernio-sdk/version.rb +1 -1
  148. data/lib/zernio-sdk.rb +55 -4
  149. data/openapi.yaml +2898 -733
  150. data/spec/api/ad_accounts_api_spec.rb +209 -10
  151. data/spec/api/ad_campaigns_api_spec.rb +99 -6
  152. data/spec/models/ad_creative_spec.rb +18 -0
  153. data/spec/models/{create_standalone_ad_request_tracking_spec.rb → ad_tracking_spec.rb} +6 -6
  154. data/spec/models/add_account_sitelinks201_response_sitelinks_inner_spec.rb +60 -0
  155. data/spec/models/add_account_sitelinks201_response_spec.rb +42 -0
  156. data/spec/models/add_account_sitelinks_request_spec.rb +48 -0
  157. data/spec/models/add_account_structured_snippets201_response_spec.rb +42 -0
  158. data/spec/models/add_account_structured_snippets201_response_structured_snippets_inner_spec.rb +52 -0
  159. data/spec/models/add_account_structured_snippets_request_spec.rb +48 -0
  160. data/spec/models/attach_ad_group_assets201_response_spec.rb +54 -0
  161. data/spec/models/create_ad_campaign200_response_spec.rb +68 -0
  162. data/spec/models/create_ad_campaign_request_spec.rb +28 -0
  163. data/spec/models/create_call_ad_request_spec.rb +6 -0
  164. data/spec/models/create_messaging_ad_request_spec.rb +6 -0
  165. data/spec/models/create_standalone_ad_request_additional_descriptions_inner_spec.rb +32 -0
  166. data/spec/models/create_standalone_ad_request_additional_headlines_inner_spec.rb +32 -0
  167. data/spec/models/create_standalone_ad_request_spec.rb +28 -0
  168. data/spec/models/ctwa_ad_request_body_spec.rb +6 -0
  169. data/spec/models/get_ad200_response_spec.rb +12 -0
  170. data/spec/models/get_ad_comments200_response_meta_spec.rb +19 -1
  171. data/spec/models/get_ios_fourteen_campaign_limits200_response_limits_spec.rb +48 -0
  172. data/spec/models/get_ios_fourteen_campaign_limits200_response_spec.rb +36 -0
  173. data/spec/models/google_asset_update_spec.rb +60 -0
  174. data/spec/models/google_rsa_description_spec.rb +46 -0
  175. data/spec/models/google_rsa_headline_spec.rb +46 -0
  176. data/spec/models/{attach_campaign_assets_request_sitelinks_inner_spec.rb → google_sitelink_spec.rb} +6 -6
  177. data/spec/models/{attach_campaign_assets_request_structured_snippets_inner_spec.rb → google_structured_snippet_spec.rb} +6 -6
  178. data/spec/models/hide_ad_comment200_response_spec.rb +52 -0
  179. data/spec/models/hide_ad_comment_request_spec.rb +36 -0
  180. data/spec/models/list_account_callouts200_response_callouts_inner_spec.rb +2 -2
  181. data/spec/models/{create_standalone_ad_request_promoted_object_spec.rb → list_account_sitelinks200_response_sitelinks_inner_spec.rb} +14 -32
  182. data/spec/models/list_account_sitelinks200_response_spec.rb +54 -0
  183. data/spec/models/list_account_structured_snippets200_response_spec.rb +54 -0
  184. data/spec/models/list_account_structured_snippets200_response_structured_snippets_inner_spec.rb +66 -0
  185. data/spec/models/list_ad_group_assets200_response_callouts_inner_spec.rb +48 -0
  186. data/spec/models/list_ad_group_assets200_response_sitelinks_inner_spec.rb +66 -0
  187. data/spec/models/list_ad_group_assets200_response_spec.rb +66 -0
  188. data/spec/models/list_ad_group_assets200_response_structured_snippets_inner_spec.rb +54 -0
  189. data/spec/models/list_ads_instagram_accounts200_response_accounts_inner_spec.rb +64 -0
  190. data/spec/models/list_ads_instagram_accounts200_response_pages_inner_spec.rb +54 -0
  191. data/spec/models/list_ads_instagram_accounts200_response_resolved_spec.rb +52 -0
  192. data/spec/models/list_ads_instagram_accounts200_response_spec.rb +48 -0
  193. data/spec/models/list_advertisable_applications200_response_applications_inner_spec.rb +54 -0
  194. data/spec/models/list_advertisable_applications200_response_spec.rb +36 -0
  195. data/spec/models/list_campaign_assets200_response_callouts_inner_spec.rb +48 -0
  196. data/spec/models/list_campaign_assets200_response_sitelinks_inner_spec.rb +66 -0
  197. data/spec/models/list_campaign_assets200_response_spec.rb +66 -0
  198. data/spec/models/list_campaign_assets200_response_structured_snippets_inner_spec.rb +54 -0
  199. data/spec/models/meta_instagram_identity_ref_spec.rb +48 -0
  200. data/spec/models/remove_ad_group_assets_request_spec.rb +54 -0
  201. data/spec/models/remove_campaign_assets200_response_spec.rb +36 -0
  202. data/spec/models/remove_campaign_assets_request_spec.rb +54 -0
  203. data/spec/models/reply_to_ad_comment200_response_spec.rb +46 -0
  204. data/spec/models/reply_to_ad_comment_request_spec.rb +36 -0
  205. data/spec/models/targeting_spec_spec.rb +12 -0
  206. data/spec/models/update_account_callouts200_response_spec.rb +42 -0
  207. data/spec/models/update_account_callouts_request_spec.rb +48 -0
  208. data/spec/models/update_account_callouts_request_updates_inner_callout_asset_spec.rb +36 -0
  209. data/spec/models/update_account_callouts_request_updates_inner_spec.rb +42 -0
  210. data/spec/models/update_account_sitelinks_request_spec.rb +48 -0
  211. data/spec/models/update_account_sitelinks_request_updates_inner_sitelink_asset_spec.rb +54 -0
  212. data/spec/models/update_account_sitelinks_request_updates_inner_spec.rb +48 -0
  213. data/spec/models/update_account_structured_snippets_request_spec.rb +48 -0
  214. data/spec/models/update_account_structured_snippets_request_updates_inner_spec.rb +42 -0
  215. data/spec/models/update_ad_request_spec.rb +18 -0
  216. data/spec/models/update_campaign_assets200_response_spec.rb +36 -0
  217. data/spec/models/update_campaign_assets_request_spec.rb +48 -0
  218. data/zernio-sdk-0.0.901.gem +0 -0
  219. metadata +222 -18
  220. data/docs/CreateStandaloneAdRequestPromotedObject.md +0 -38
  221. data/docs/CreateStandaloneAdRequestTracking.md +0 -20
  222. data/lib/zernio-sdk/models/create_standalone_ad_request_promoted_object.rb +0 -249
  223. data/zernio-sdk-0.0.899.gem +0 -0
@@ -87,9 +87,88 @@ module Zernio
87
87
  return data, status_code, headers
88
88
  end
89
89
 
90
- # Attach extension assets to a Google Search campaign
91
- # Attach sitelinks, callouts and/or structured snippets to an already-existing Google Search campaign. These are the same builders POST /v1/ads/create uses, but without rebuilding the hierarchy. At least one of sitelinks, callouts or structuredSnippets is required. Google-only. Other platforms have no equivalent extension surface and return 501. Approval status is Google-async; poll `asset.policy_summary` after review. Assets stay in the account library even if the campaign is later deleted.
92
- # @param campaign_id [String] Numeric Google platform campaign id.
90
+ # Attach ad-group assets
91
+ # Creates and attaches sitelinks, callouts and structured snippets in one Google mutation.
92
+ # @param ad_set_id [String] Numeric Google platform id.
93
+ # @param attach_campaign_assets_request [AttachCampaignAssetsRequest]
94
+ # @param [Hash] opts the optional parameters
95
+ # @return [AttachAdGroupAssets201Response]
96
+ def attach_ad_group_assets(ad_set_id, attach_campaign_assets_request, opts = {})
97
+ data, _status_code, _headers = attach_ad_group_assets_with_http_info(ad_set_id, attach_campaign_assets_request, opts)
98
+ data
99
+ end
100
+
101
+ # Attach ad-group assets
102
+ # Creates and attaches sitelinks, callouts and structured snippets in one Google mutation.
103
+ # @param ad_set_id [String] Numeric Google platform id.
104
+ # @param attach_campaign_assets_request [AttachCampaignAssetsRequest]
105
+ # @param [Hash] opts the optional parameters
106
+ # @return [Array<(AttachAdGroupAssets201Response, Integer, Hash)>] AttachAdGroupAssets201Response data, response status code and response headers
107
+ def attach_ad_group_assets_with_http_info(ad_set_id, attach_campaign_assets_request, opts = {})
108
+ if @api_client.config.debugging
109
+ @api_client.config.logger.debug 'Calling API: AdCampaignsApi.attach_ad_group_assets ...'
110
+ end
111
+ # verify the required parameter 'ad_set_id' is set
112
+ if @api_client.config.client_side_validation && ad_set_id.nil?
113
+ fail ArgumentError, "Missing the required parameter 'ad_set_id' when calling AdCampaignsApi.attach_ad_group_assets"
114
+ end
115
+ pattern = Regexp.new(/^\d+$/)
116
+ if @api_client.config.client_side_validation && ad_set_id !~ pattern
117
+ fail ArgumentError, "invalid value for 'ad_set_id' when calling AdCampaignsApi.attach_ad_group_assets, must conform to the pattern #{pattern}."
118
+ end
119
+
120
+ # verify the required parameter 'attach_campaign_assets_request' is set
121
+ if @api_client.config.client_side_validation && attach_campaign_assets_request.nil?
122
+ fail ArgumentError, "Missing the required parameter 'attach_campaign_assets_request' when calling AdCampaignsApi.attach_ad_group_assets"
123
+ end
124
+ # resource path
125
+ local_var_path = '/v1/ads/ad-sets/{adSetId}/assets'.sub('{' + 'adSetId' + '}', CGI.escape(ad_set_id.to_s))
126
+
127
+ # query parameters
128
+ query_params = opts[:query_params] || {}
129
+
130
+ # header parameters
131
+ header_params = opts[:header_params] || {}
132
+ # HTTP header 'Accept' (if needed)
133
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
134
+ # HTTP header 'Content-Type'
135
+ content_type = @api_client.select_header_content_type(['application/json'])
136
+ if !content_type.nil?
137
+ header_params['Content-Type'] = content_type
138
+ end
139
+
140
+ # form parameters
141
+ form_params = opts[:form_params] || {}
142
+
143
+ # http body (model)
144
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(attach_campaign_assets_request)
145
+
146
+ # return_type
147
+ return_type = opts[:debug_return_type] || 'AttachAdGroupAssets201Response'
148
+
149
+ # auth_names
150
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
151
+
152
+ new_options = opts.merge(
153
+ :operation => :"AdCampaignsApi.attach_ad_group_assets",
154
+ :header_params => header_params,
155
+ :query_params => query_params,
156
+ :form_params => form_params,
157
+ :body => post_body,
158
+ :auth_names => auth_names,
159
+ :return_type => return_type
160
+ )
161
+
162
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
163
+ if @api_client.config.debugging
164
+ @api_client.config.logger.debug "API called: AdCampaignsApi#attach_ad_group_assets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
165
+ end
166
+ return data, status_code, headers
167
+ end
168
+
169
+ # Attach campaign assets
170
+ # Creates and attaches sitelinks, callouts and structured snippets in one Google mutation.
171
+ # @param campaign_id [String] Numeric Google platform id.
93
172
  # @param attach_campaign_assets_request [AttachCampaignAssetsRequest]
94
173
  # @param [Hash] opts the optional parameters
95
174
  # @return [AttachCampaignAssets201Response]
@@ -98,9 +177,9 @@ module Zernio
98
177
  data
99
178
  end
100
179
 
101
- # Attach extension assets to a Google Search campaign
102
- # Attach sitelinks, callouts and/or structured snippets to an already-existing Google Search campaign. These are the same builders POST /v1/ads/create uses, but without rebuilding the hierarchy. At least one of sitelinks, callouts or structuredSnippets is required. Google-only. Other platforms have no equivalent extension surface and return 501. Approval status is Google-async; poll &#x60;asset.policy_summary&#x60; after review. Assets stay in the account library even if the campaign is later deleted.
103
- # @param campaign_id [String] Numeric Google platform campaign id.
180
+ # Attach campaign assets
181
+ # Creates and attaches sitelinks, callouts and structured snippets in one Google mutation.
182
+ # @param campaign_id [String] Numeric Google platform id.
104
183
  # @param attach_campaign_assets_request [AttachCampaignAssetsRequest]
105
184
  # @param [Hash] opts the optional parameters
106
185
  # @return [Array<(AttachCampaignAssets201Response, Integer, Hash)>] AttachCampaignAssets201Response data, response status code and response headers
@@ -112,6 +191,11 @@ module Zernio
112
191
  if @api_client.config.client_side_validation && campaign_id.nil?
113
192
  fail ArgumentError, "Missing the required parameter 'campaign_id' when calling AdCampaignsApi.attach_campaign_assets"
114
193
  end
194
+ pattern = Regexp.new(/^\d+$/)
195
+ if @api_client.config.client_side_validation && campaign_id !~ pattern
196
+ fail ArgumentError, "invalid value for 'campaign_id' when calling AdCampaignsApi.attach_campaign_assets, must conform to the pattern #{pattern}."
197
+ end
198
+
115
199
  # verify the required parameter 'attach_campaign_assets_request' is set
116
200
  if @api_client.config.client_side_validation && attach_campaign_assets_request.nil?
117
201
  fail ArgumentError, "Missing the required parameter 'attach_campaign_assets_request' when calling AdCampaignsApi.attach_campaign_assets"
@@ -309,7 +393,7 @@ module Zernio
309
393
  # @param create_ad_campaign_request [CreateAdCampaignRequest]
310
394
  # @param [Hash] opts the optional parameters
311
395
  # @option opts [String] :idempotency_key Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. Only 2xx responses are stored, so a request that failed with a 4xx can be retried with a corrected body under the SAME key.
312
- # @return [CreateAdCampaign201Response]
396
+ # @return [CreateAdCampaign200Response]
313
397
  def create_ad_campaign(create_ad_campaign_request, opts = {})
314
398
  data, _status_code, _headers = create_ad_campaign_with_http_info(create_ad_campaign_request, opts)
315
399
  data
@@ -320,7 +404,7 @@ module Zernio
320
404
  # @param create_ad_campaign_request [CreateAdCampaignRequest]
321
405
  # @param [Hash] opts the optional parameters
322
406
  # @option opts [String] :idempotency_key Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. Only 2xx responses are stored, so a request that failed with a 4xx can be retried with a corrected body under the SAME key.
323
- # @return [Array<(CreateAdCampaign201Response, Integer, Hash)>] CreateAdCampaign201Response data, response status code and response headers
407
+ # @return [Array<(CreateAdCampaign200Response, Integer, Hash)>] CreateAdCampaign200Response data, response status code and response headers
324
408
  def create_ad_campaign_with_http_info(create_ad_campaign_request, opts = {})
325
409
  if @api_client.config.debugging
326
410
  @api_client.config.logger.debug 'Calling API: AdCampaignsApi.create_ad_campaign ...'
@@ -357,7 +441,7 @@ module Zernio
357
441
  post_body = opts[:debug_body] || @api_client.object_to_http_body(create_ad_campaign_request)
358
442
 
359
443
  # return_type
360
- return_type = opts[:debug_return_type] || 'CreateAdCampaign201Response'
444
+ return_type = opts[:debug_return_type] || 'CreateAdCampaign200Response'
361
445
 
362
446
  # auth_names
363
447
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
@@ -1037,7 +1121,7 @@ module Zernio
1037
1121
  end
1038
1122
 
1039
1123
  # Get ad details
1040
- # Returns an ad with its creative, targeting, status, and performance metrics. The `{adId}` path segment accepts any identifier dialect Zernio indexes for the ad: - the Zernio internal `_id` (24-char hex) - Meta's numeric `platformAdId` (the value shipped in `comment.received` webhooks as `comment.ad.id`) - the creative's `effective_object_story_id` (`{pageId}_{postId}` shape, Facebook side) - the creative's `effective_instagram_media_id` (Instagram side) Any of the four resolve to the same ad. Caller doesn't need a translation step. By default, creative.promotion and creative.creativeFeatures contain stored requested settings, which do not confirm platform application. With `refreshPromotion=true`, Meta promotion metadata is read live and exposed as `ad.creative.promotion` with `promotionStatus`. Only `applied` confirms an offer; `not_returned` means the creative read succeeded without promotion metadata, and `unavailable` means it failed.
1124
+ # Returns an ad with its creative, targeting, status, and performance metrics. Google Search ads include current creative.headlines, creative.descriptions and creative.finalUrls, preserving pinnedField. Top-level cachedAt and stale report cache freshness. Google mutations invalidate this read. RSA enrichment requires a stored advertisingChannelType of SEARCH. Ads with an unknown or other channel return their stored details without a Google read. If RSA enrichment fails, the stored ad is returned with HTTP 200 and without cache metadata. The `{adId}` path segment accepts any identifier dialect Zernio indexes for the ad: - the Zernio internal `_id` (24-char hex) - Meta's numeric `platformAdId` (the value shipped in `comment.received` webhooks as `comment.ad.id`) - the creative's `effective_object_story_id` (`{pageId}_{postId}` shape, Facebook side) - the creative's `effective_instagram_media_id` (Instagram side) Any of the four resolve to the same ad. Caller doesn't need a translation step. By default, creative.promotion and creative.creativeFeatures contain stored requested settings, which do not confirm platform application. With `refreshPromotion=true`, Meta promotion metadata is read live and exposed as `ad.creative.promotion` with `promotionStatus`. Only `applied` confirms an offer; `not_returned` means the creative read succeeded without promotion metadata, and `unavailable` means it failed.
1041
1125
  # @param ad_id [String] Zernio &#x60;_id&#x60; (hex), Meta &#x60;platformAdId&#x60; (numeric), or one of the creative&#39;s effective story/media IDs. See description for details.
1042
1126
  # @param [Hash] opts the optional parameters
1043
1127
  # @option opts [Boolean] :refresh_promotion Meta only. Read current promotion metadata from Meta and include promotionStatus. Omit for stored creative settings with no promotion-specific Graph call. (default to false)
@@ -1048,7 +1132,7 @@ module Zernio
1048
1132
  end
1049
1133
 
1050
1134
  # Get ad details
1051
- # Returns an ad with its creative, targeting, status, and performance metrics. The &#x60;{adId}&#x60; path segment accepts any identifier dialect Zernio indexes for the ad: - the Zernio internal &#x60;_id&#x60; (24-char hex) - Meta&#39;s numeric &#x60;platformAdId&#x60; (the value shipped in &#x60;comment.received&#x60; webhooks as &#x60;comment.ad.id&#x60;) - the creative&#39;s &#x60;effective_object_story_id&#x60; (&#x60;{pageId}_{postId}&#x60; shape, Facebook side) - the creative&#39;s &#x60;effective_instagram_media_id&#x60; (Instagram side) Any of the four resolve to the same ad. Caller doesn&#39;t need a translation step. By default, creative.promotion and creative.creativeFeatures contain stored requested settings, which do not confirm platform application. With &#x60;refreshPromotion&#x3D;true&#x60;, Meta promotion metadata is read live and exposed as &#x60;ad.creative.promotion&#x60; with &#x60;promotionStatus&#x60;. Only &#x60;applied&#x60; confirms an offer; &#x60;not_returned&#x60; means the creative read succeeded without promotion metadata, and &#x60;unavailable&#x60; means it failed.
1135
+ # Returns an ad with its creative, targeting, status, and performance metrics. Google Search ads include current creative.headlines, creative.descriptions and creative.finalUrls, preserving pinnedField. Top-level cachedAt and stale report cache freshness. Google mutations invalidate this read. RSA enrichment requires a stored advertisingChannelType of SEARCH. Ads with an unknown or other channel return their stored details without a Google read. If RSA enrichment fails, the stored ad is returned with HTTP 200 and without cache metadata. The &#x60;{adId}&#x60; path segment accepts any identifier dialect Zernio indexes for the ad: - the Zernio internal &#x60;_id&#x60; (24-char hex) - Meta&#39;s numeric &#x60;platformAdId&#x60; (the value shipped in &#x60;comment.received&#x60; webhooks as &#x60;comment.ad.id&#x60;) - the creative&#39;s &#x60;effective_object_story_id&#x60; (&#x60;{pageId}_{postId}&#x60; shape, Facebook side) - the creative&#39;s &#x60;effective_instagram_media_id&#x60; (Instagram side) Any of the four resolve to the same ad. Caller doesn&#39;t need a translation step. By default, creative.promotion and creative.creativeFeatures contain stored requested settings, which do not confirm platform application. With &#x60;refreshPromotion&#x3D;true&#x60;, Meta promotion metadata is read live and exposed as &#x60;ad.creative.promotion&#x60; with &#x60;promotionStatus&#x60;. Only &#x60;applied&#x60; confirms an offer; &#x60;not_returned&#x60; means the creative read succeeded without promotion metadata, and &#x60;unavailable&#x60; means it failed.
1052
1136
  # @param ad_id [String] Zernio &#x60;_id&#x60; (hex), Meta &#x60;platformAdId&#x60; (numeric), or one of the creative&#39;s effective story/media IDs. See description for details.
1053
1137
  # @param [Hash] opts the optional parameters
1054
1138
  # @option opts [Boolean] :refresh_promotion Meta only. Read current promotion metadata from Meta and include promotionStatus. Omit for stored creative settings with no promotion-specific Graph call. (default to false)
@@ -1677,6 +1761,94 @@ module Zernio
1677
1761
  return data, status_code, headers
1678
1762
  end
1679
1763
 
1764
+ # List ad-group assets
1765
+ # Lists directly attached Google assets. Fresh reads are cached for 10 minutes; exhausted quota may return the last successful read with stale=true. Inherited assets are not included.
1766
+ # @param ad_set_id [String] Numeric Google platform id.
1767
+ # @param account_id [String]
1768
+ # @param [Hash] opts the optional parameters
1769
+ # @option opts [String] :customer_id
1770
+ # @return [ListAdGroupAssets200Response]
1771
+ def list_ad_group_assets(ad_set_id, account_id, opts = {})
1772
+ data, _status_code, _headers = list_ad_group_assets_with_http_info(ad_set_id, account_id, opts)
1773
+ data
1774
+ end
1775
+
1776
+ # List ad-group assets
1777
+ # Lists directly attached Google assets. Fresh reads are cached for 10 minutes; exhausted quota may return the last successful read with stale&#x3D;true. Inherited assets are not included.
1778
+ # @param ad_set_id [String] Numeric Google platform id.
1779
+ # @param account_id [String]
1780
+ # @param [Hash] opts the optional parameters
1781
+ # @option opts [String] :customer_id
1782
+ # @return [Array<(ListAdGroupAssets200Response, Integer, Hash)>] ListAdGroupAssets200Response data, response status code and response headers
1783
+ def list_ad_group_assets_with_http_info(ad_set_id, account_id, opts = {})
1784
+ if @api_client.config.debugging
1785
+ @api_client.config.logger.debug 'Calling API: AdCampaignsApi.list_ad_group_assets ...'
1786
+ end
1787
+ # verify the required parameter 'ad_set_id' is set
1788
+ if @api_client.config.client_side_validation && ad_set_id.nil?
1789
+ fail ArgumentError, "Missing the required parameter 'ad_set_id' when calling AdCampaignsApi.list_ad_group_assets"
1790
+ end
1791
+ pattern = Regexp.new(/^\d+$/)
1792
+ if @api_client.config.client_side_validation && ad_set_id !~ pattern
1793
+ fail ArgumentError, "invalid value for 'ad_set_id' when calling AdCampaignsApi.list_ad_group_assets, must conform to the pattern #{pattern}."
1794
+ end
1795
+
1796
+ # verify the required parameter 'account_id' is set
1797
+ if @api_client.config.client_side_validation && account_id.nil?
1798
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AdCampaignsApi.list_ad_group_assets"
1799
+ end
1800
+ pattern = Regexp.new(/^[a-fA-F0-9]{24}$/)
1801
+ if @api_client.config.client_side_validation && account_id !~ pattern
1802
+ fail ArgumentError, "invalid value for 'account_id' when calling AdCampaignsApi.list_ad_group_assets, must conform to the pattern #{pattern}."
1803
+ end
1804
+
1805
+ pattern = Regexp.new(/^\d+$/)
1806
+ if @api_client.config.client_side_validation && !opts[:'customer_id'].nil? && opts[:'customer_id'] !~ pattern
1807
+ fail ArgumentError, "invalid value for 'opts[:\"customer_id\"]' when calling AdCampaignsApi.list_ad_group_assets, must conform to the pattern #{pattern}."
1808
+ end
1809
+
1810
+ # resource path
1811
+ local_var_path = '/v1/ads/ad-sets/{adSetId}/assets'.sub('{' + 'adSetId' + '}', CGI.escape(ad_set_id.to_s))
1812
+
1813
+ # query parameters
1814
+ query_params = opts[:query_params] || {}
1815
+ query_params[:'accountId'] = account_id
1816
+ query_params[:'customerId'] = opts[:'customer_id'] if !opts[:'customer_id'].nil?
1817
+
1818
+ # header parameters
1819
+ header_params = opts[:header_params] || {}
1820
+ # HTTP header 'Accept' (if needed)
1821
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1822
+
1823
+ # form parameters
1824
+ form_params = opts[:form_params] || {}
1825
+
1826
+ # http body (model)
1827
+ post_body = opts[:debug_body]
1828
+
1829
+ # return_type
1830
+ return_type = opts[:debug_return_type] || 'ListAdGroupAssets200Response'
1831
+
1832
+ # auth_names
1833
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1834
+
1835
+ new_options = opts.merge(
1836
+ :operation => :"AdCampaignsApi.list_ad_group_assets",
1837
+ :header_params => header_params,
1838
+ :query_params => query_params,
1839
+ :form_params => form_params,
1840
+ :body => post_body,
1841
+ :auth_names => auth_names,
1842
+ :return_type => return_type
1843
+ )
1844
+
1845
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1846
+ if @api_client.config.debugging
1847
+ @api_client.config.logger.debug "API called: AdCampaignsApi#list_ad_group_assets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1848
+ end
1849
+ return data, status_code, headers
1850
+ end
1851
+
1680
1852
  # List Search keywords
1681
1853
  # Returns the Google Search keyword criteria (positive and negative) synced from connected Google Ads accounts, one row per ad-group keyword. Refreshed about once a week per Google Ads customer (the keyword sweep rides the ads discovery pass on a slower slot, to stay inside Google's shared daily API quota), so keywords added on Google can take several days to appear. A customer synced for the first time is populated on the next discovery pass rather than waiting for its weekly slot, and connecting an account or triggering a manual sync refreshes it immediately. Campaign-level negative keywords are not included; only ad-group-level criteria are.
1682
1854
  # @param [Hash] opts the optional parameters
@@ -2059,6 +2231,94 @@ module Zernio
2059
2231
  return data, status_code, headers
2060
2232
  end
2061
2233
 
2234
+ # List campaign assets
2235
+ # Lists directly attached Google assets. Fresh reads are cached for 10 minutes; exhausted quota may return the last successful read with stale=true. Inherited assets are not included.
2236
+ # @param campaign_id [String] Numeric Google platform id.
2237
+ # @param account_id [String]
2238
+ # @param [Hash] opts the optional parameters
2239
+ # @option opts [String] :customer_id
2240
+ # @return [ListCampaignAssets200Response]
2241
+ def list_campaign_assets(campaign_id, account_id, opts = {})
2242
+ data, _status_code, _headers = list_campaign_assets_with_http_info(campaign_id, account_id, opts)
2243
+ data
2244
+ end
2245
+
2246
+ # List campaign assets
2247
+ # Lists directly attached Google assets. Fresh reads are cached for 10 minutes; exhausted quota may return the last successful read with stale&#x3D;true. Inherited assets are not included.
2248
+ # @param campaign_id [String] Numeric Google platform id.
2249
+ # @param account_id [String]
2250
+ # @param [Hash] opts the optional parameters
2251
+ # @option opts [String] :customer_id
2252
+ # @return [Array<(ListCampaignAssets200Response, Integer, Hash)>] ListCampaignAssets200Response data, response status code and response headers
2253
+ def list_campaign_assets_with_http_info(campaign_id, account_id, opts = {})
2254
+ if @api_client.config.debugging
2255
+ @api_client.config.logger.debug 'Calling API: AdCampaignsApi.list_campaign_assets ...'
2256
+ end
2257
+ # verify the required parameter 'campaign_id' is set
2258
+ if @api_client.config.client_side_validation && campaign_id.nil?
2259
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling AdCampaignsApi.list_campaign_assets"
2260
+ end
2261
+ pattern = Regexp.new(/^\d+$/)
2262
+ if @api_client.config.client_side_validation && campaign_id !~ pattern
2263
+ fail ArgumentError, "invalid value for 'campaign_id' when calling AdCampaignsApi.list_campaign_assets, must conform to the pattern #{pattern}."
2264
+ end
2265
+
2266
+ # verify the required parameter 'account_id' is set
2267
+ if @api_client.config.client_side_validation && account_id.nil?
2268
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AdCampaignsApi.list_campaign_assets"
2269
+ end
2270
+ pattern = Regexp.new(/^[a-fA-F0-9]{24}$/)
2271
+ if @api_client.config.client_side_validation && account_id !~ pattern
2272
+ fail ArgumentError, "invalid value for 'account_id' when calling AdCampaignsApi.list_campaign_assets, must conform to the pattern #{pattern}."
2273
+ end
2274
+
2275
+ pattern = Regexp.new(/^\d+$/)
2276
+ if @api_client.config.client_side_validation && !opts[:'customer_id'].nil? && opts[:'customer_id'] !~ pattern
2277
+ fail ArgumentError, "invalid value for 'opts[:\"customer_id\"]' when calling AdCampaignsApi.list_campaign_assets, must conform to the pattern #{pattern}."
2278
+ end
2279
+
2280
+ # resource path
2281
+ local_var_path = '/v1/ads/campaigns/{campaignId}/assets'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))
2282
+
2283
+ # query parameters
2284
+ query_params = opts[:query_params] || {}
2285
+ query_params[:'accountId'] = account_id
2286
+ query_params[:'customerId'] = opts[:'customer_id'] if !opts[:'customer_id'].nil?
2287
+
2288
+ # header parameters
2289
+ header_params = opts[:header_params] || {}
2290
+ # HTTP header 'Accept' (if needed)
2291
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2292
+
2293
+ # form parameters
2294
+ form_params = opts[:form_params] || {}
2295
+
2296
+ # http body (model)
2297
+ post_body = opts[:debug_body]
2298
+
2299
+ # return_type
2300
+ return_type = opts[:debug_return_type] || 'ListCampaignAssets200Response'
2301
+
2302
+ # auth_names
2303
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
2304
+
2305
+ new_options = opts.merge(
2306
+ :operation => :"AdCampaignsApi.list_campaign_assets",
2307
+ :header_params => header_params,
2308
+ :query_params => query_params,
2309
+ :form_params => form_params,
2310
+ :body => post_body,
2311
+ :auth_names => auth_names,
2312
+ :return_type => return_type
2313
+ )
2314
+
2315
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2316
+ if @api_client.config.debugging
2317
+ @api_client.config.logger.debug "API called: AdCampaignsApi#list_campaign_assets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2318
+ end
2319
+ return data, status_code, headers
2320
+ end
2321
+
2062
2322
  # List campaign negative lists
2063
2323
  # Returns shared negative keyword lists attached to the campaign, separate from campaign-level negative keywords. 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.
2064
2324
  # @param campaign_id [String]
@@ -2204,6 +2464,85 @@ module Zernio
2204
2464
  return data, status_code, headers
2205
2465
  end
2206
2466
 
2467
+ # Remove ad-group assets
2468
+ # Removes the specified attachments only. Google assets cannot be deleted. Other attachments remain. assetResourceNames is retained for compatibility.
2469
+ # @param ad_set_id [String] Numeric Google platform id.
2470
+ # @param remove_ad_group_assets_request [RemoveAdGroupAssetsRequest]
2471
+ # @param [Hash] opts the optional parameters
2472
+ # @return [RemoveCampaignAssets200Response]
2473
+ def remove_ad_group_assets(ad_set_id, remove_ad_group_assets_request, opts = {})
2474
+ data, _status_code, _headers = remove_ad_group_assets_with_http_info(ad_set_id, remove_ad_group_assets_request, opts)
2475
+ data
2476
+ end
2477
+
2478
+ # Remove ad-group assets
2479
+ # Removes the specified attachments only. Google assets cannot be deleted. Other attachments remain. assetResourceNames is retained for compatibility.
2480
+ # @param ad_set_id [String] Numeric Google platform id.
2481
+ # @param remove_ad_group_assets_request [RemoveAdGroupAssetsRequest]
2482
+ # @param [Hash] opts the optional parameters
2483
+ # @return [Array<(RemoveCampaignAssets200Response, Integer, Hash)>] RemoveCampaignAssets200Response data, response status code and response headers
2484
+ def remove_ad_group_assets_with_http_info(ad_set_id, remove_ad_group_assets_request, opts = {})
2485
+ if @api_client.config.debugging
2486
+ @api_client.config.logger.debug 'Calling API: AdCampaignsApi.remove_ad_group_assets ...'
2487
+ end
2488
+ # verify the required parameter 'ad_set_id' is set
2489
+ if @api_client.config.client_side_validation && ad_set_id.nil?
2490
+ fail ArgumentError, "Missing the required parameter 'ad_set_id' when calling AdCampaignsApi.remove_ad_group_assets"
2491
+ end
2492
+ pattern = Regexp.new(/^\d+$/)
2493
+ if @api_client.config.client_side_validation && ad_set_id !~ pattern
2494
+ fail ArgumentError, "invalid value for 'ad_set_id' when calling AdCampaignsApi.remove_ad_group_assets, must conform to the pattern #{pattern}."
2495
+ end
2496
+
2497
+ # verify the required parameter 'remove_ad_group_assets_request' is set
2498
+ if @api_client.config.client_side_validation && remove_ad_group_assets_request.nil?
2499
+ fail ArgumentError, "Missing the required parameter 'remove_ad_group_assets_request' when calling AdCampaignsApi.remove_ad_group_assets"
2500
+ end
2501
+ # resource path
2502
+ local_var_path = '/v1/ads/ad-sets/{adSetId}/assets'.sub('{' + 'adSetId' + '}', CGI.escape(ad_set_id.to_s))
2503
+
2504
+ # query parameters
2505
+ query_params = opts[:query_params] || {}
2506
+
2507
+ # header parameters
2508
+ header_params = opts[:header_params] || {}
2509
+ # HTTP header 'Accept' (if needed)
2510
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2511
+ # HTTP header 'Content-Type'
2512
+ content_type = @api_client.select_header_content_type(['application/json'])
2513
+ if !content_type.nil?
2514
+ header_params['Content-Type'] = content_type
2515
+ end
2516
+
2517
+ # form parameters
2518
+ form_params = opts[:form_params] || {}
2519
+
2520
+ # http body (model)
2521
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(remove_ad_group_assets_request)
2522
+
2523
+ # return_type
2524
+ return_type = opts[:debug_return_type] || 'RemoveCampaignAssets200Response'
2525
+
2526
+ # auth_names
2527
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
2528
+
2529
+ new_options = opts.merge(
2530
+ :operation => :"AdCampaignsApi.remove_ad_group_assets",
2531
+ :header_params => header_params,
2532
+ :query_params => query_params,
2533
+ :form_params => form_params,
2534
+ :body => post_body,
2535
+ :auth_names => auth_names,
2536
+ :return_type => return_type
2537
+ )
2538
+
2539
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
2540
+ if @api_client.config.debugging
2541
+ @api_client.config.logger.debug "API called: AdCampaignsApi#remove_ad_group_assets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2542
+ end
2543
+ return data, status_code, headers
2544
+ end
2545
+
2207
2546
  # Remove a Search keyword
2208
2547
  # Removes one keyword criterion (positive or negative) from its ad group (M.140).
2209
2548
  # @param keyword_id [String] Zernio keyword ID (not the Google criterion ID)
@@ -2267,6 +2606,85 @@ module Zernio
2267
2606
  return data, status_code, headers
2268
2607
  end
2269
2608
 
2609
+ # Remove campaign assets
2610
+ # Removes the specified attachments only. Google assets cannot be deleted. Other attachments remain. assetResourceNames is retained for compatibility.
2611
+ # @param campaign_id [String] Numeric Google platform id.
2612
+ # @param remove_campaign_assets_request [RemoveCampaignAssetsRequest]
2613
+ # @param [Hash] opts the optional parameters
2614
+ # @return [RemoveCampaignAssets200Response]
2615
+ def remove_campaign_assets(campaign_id, remove_campaign_assets_request, opts = {})
2616
+ data, _status_code, _headers = remove_campaign_assets_with_http_info(campaign_id, remove_campaign_assets_request, opts)
2617
+ data
2618
+ end
2619
+
2620
+ # Remove campaign assets
2621
+ # Removes the specified attachments only. Google assets cannot be deleted. Other attachments remain. assetResourceNames is retained for compatibility.
2622
+ # @param campaign_id [String] Numeric Google platform id.
2623
+ # @param remove_campaign_assets_request [RemoveCampaignAssetsRequest]
2624
+ # @param [Hash] opts the optional parameters
2625
+ # @return [Array<(RemoveCampaignAssets200Response, Integer, Hash)>] RemoveCampaignAssets200Response data, response status code and response headers
2626
+ def remove_campaign_assets_with_http_info(campaign_id, remove_campaign_assets_request, opts = {})
2627
+ if @api_client.config.debugging
2628
+ @api_client.config.logger.debug 'Calling API: AdCampaignsApi.remove_campaign_assets ...'
2629
+ end
2630
+ # verify the required parameter 'campaign_id' is set
2631
+ if @api_client.config.client_side_validation && campaign_id.nil?
2632
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling AdCampaignsApi.remove_campaign_assets"
2633
+ end
2634
+ pattern = Regexp.new(/^\d+$/)
2635
+ if @api_client.config.client_side_validation && campaign_id !~ pattern
2636
+ fail ArgumentError, "invalid value for 'campaign_id' when calling AdCampaignsApi.remove_campaign_assets, must conform to the pattern #{pattern}."
2637
+ end
2638
+
2639
+ # verify the required parameter 'remove_campaign_assets_request' is set
2640
+ if @api_client.config.client_side_validation && remove_campaign_assets_request.nil?
2641
+ fail ArgumentError, "Missing the required parameter 'remove_campaign_assets_request' when calling AdCampaignsApi.remove_campaign_assets"
2642
+ end
2643
+ # resource path
2644
+ local_var_path = '/v1/ads/campaigns/{campaignId}/assets'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))
2645
+
2646
+ # query parameters
2647
+ query_params = opts[:query_params] || {}
2648
+
2649
+ # header parameters
2650
+ header_params = opts[:header_params] || {}
2651
+ # HTTP header 'Accept' (if needed)
2652
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2653
+ # HTTP header 'Content-Type'
2654
+ content_type = @api_client.select_header_content_type(['application/json'])
2655
+ if !content_type.nil?
2656
+ header_params['Content-Type'] = content_type
2657
+ end
2658
+
2659
+ # form parameters
2660
+ form_params = opts[:form_params] || {}
2661
+
2662
+ # http body (model)
2663
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(remove_campaign_assets_request)
2664
+
2665
+ # return_type
2666
+ return_type = opts[:debug_return_type] || 'RemoveCampaignAssets200Response'
2667
+
2668
+ # auth_names
2669
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
2670
+
2671
+ new_options = opts.merge(
2672
+ :operation => :"AdCampaignsApi.remove_campaign_assets",
2673
+ :header_params => header_params,
2674
+ :query_params => query_params,
2675
+ :form_params => form_params,
2676
+ :body => post_body,
2677
+ :auth_names => auth_names,
2678
+ :return_type => return_type
2679
+ )
2680
+
2681
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
2682
+ if @api_client.config.debugging
2683
+ @api_client.config.logger.debug "API called: AdCampaignsApi#remove_campaign_assets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2684
+ end
2685
+ return data, status_code, headers
2686
+ end
2687
+
2270
2688
  # Replace campaign negative lists
2271
2689
  # Sets the full desired set of shared negative keyword list associations on this campaign. Send listIds=[] to detach all negative keyword lists. Only campaign_shared_set links are changed; the lists and their keywords are preserved. Every list must belong to the campaign customer and have type NEGATIVE_KEYWORDS.
2272
2690
  # @param campaign_id [String]
@@ -2421,7 +2839,7 @@ module Zernio
2421
2839
  end
2422
2840
 
2423
2841
  # Update ad
2424
- # Patch one or more fields on an ad. Status, budget, targeting, and creative changes are propagated to the platform. Per-platform support: - **Meta** (Facebook + Instagram): all fields supported. - **TikTok**: status, budget, targeting (via `/v2/adgroup/update/`), and creative (via `/v2/ad/update/` patch-style: `headline` is ignored, `body` becomes `ad_text`). - **Google**: status, budget, KEYWORD edits via `targeting.keywords` / `targeting.negativeKeywords`, and DEVICE bid adjustments via `targeting.devices`. Each list you send becomes the FULL new set of its kind (criteria not in the list are removed); a kind left out is untouched. Any other `targeting` field returns 400: Google cannot mutate broad targeting post-create without recreating the campaign. `creative` returns 501. - **LinkedIn**: status, budget, targeting (countries or regions, excludedLocations (countries), the B2B facets, and audience segments; applied to the LinkedIn Campaign via PARTIAL_UPDATE, and REPLACES the campaign's entire targetingCriteria, not a merge), and creative (uploads new media, creates a replacement inline creative on the same campaign, pauses the old one). - **Pinterest / X / OpenAI Ads**: status + budget only. Sending `targeting` or `creative` returns 501 with code `unsupported_platform_operation`. OpenAI Ads budget is lifetime-only (see `budget.type` below). **Google keyword replacement:** These edits affect the ad's entire ad group, including sibling ads. Positive (`targeting.keywords`) and negative (`targeting.negativeKeywords`) sets are independent: omit a field to leave that set unchanged, or send `[]` to remove every keyword of that kind. Zernio compares each supplied set with Google's live criteria by case-insensitive keyword text and match type. A matching criterion is left untouched, retaining its criterion ID, enabled/paused status, keyword-level bid overrides, labels, and criterion-associated history/statistics. Zernio does not reset its quality score; Google continues to calculate scores and statistics normally. Text comparison does not trim whitespace. A bare string or an object without `matchType` means `broad`, not the existing criterion's match type. For example, resending an existing `{ \"text\": \"plumber\", \"matchType\": \"exact\" }` preserves it; sending `\"plumber\"` instead removes that EXACT criterion and requests a BROAD one. Changing text or match type removes criteria no longer requested and creates any missing criteria. New criteria get new IDs and do not inherit removed criteria's bid overrides, labels, or history. Historical reporting for a removed criterion is not transferred to its replacement. To add keywords without replacing a set, use [POST /v1/ads/keywords](https://docs.zernio.com/ad-campaigns/add-ad-keywords). Use `PATCH /v1/ads/keywords/{keywordId}` to pause/enable one keyword, or `DELETE /v1/ads/keywords/{keywordId}` to remove it.
2842
+ # Patch one or more fields on an ad. Status, budget, targeting, and creative changes are propagated to the platform. Per-platform support: - **Meta** (Facebook + Instagram): all fields supported. - **TikTok**: status, budget, targeting (via `/v2/adgroup/update/`), and creative (via `/v2/ad/update/` patch-style: `headline` is ignored, `body` becomes `ad_text`). - **Google**: status, budget, KEYWORD edits via `targeting.keywords` / `targeting.negativeKeywords`, and DEVICE bid adjustments via `targeting.devices`. Each list you send becomes the FULL new set of its kind (criteria not in the list are removed); a kind left out is untouched. Any other `targeting` field returns 400: Google cannot mutate broad targeting post-create without recreating the campaign. RSA text updates use top-level `headlines`, `descriptions` and `finalUrls`. Each supplied array replaces the full list; omit a field to preserve it. Use 3-15 headlines (1-30 characters) and 2-4 descriptions (1-90 characters). Omit an asset to remove it; omit pinnedField on an included asset to unpin it. Updates do not pad or truncate text. The legacy creative fields remain unsupported for Google. - **LinkedIn**: status, budget, targeting (countries or regions, excludedLocations (countries), the B2B facets, and audience segments; applied to the LinkedIn Campaign via PARTIAL_UPDATE, and REPLACES the campaign's entire targetingCriteria, not a merge), and creative (uploads new media, creates a replacement inline creative on the same campaign, pauses the old one). - **Pinterest / X / OpenAI Ads**: status + budget only. Sending `targeting` or `creative` returns 501 with code `unsupported_platform_operation`. OpenAI Ads budget is lifetime-only (see `budget.type` below). **Google keyword replacement:** These edits affect the ad's entire ad group, including sibling ads. Positive (`targeting.keywords`) and negative (`targeting.negativeKeywords`) sets are independent: omit a field to leave that set unchanged, or send `[]` to remove every keyword of that kind. Zernio compares each supplied set with Google's live criteria by case-insensitive keyword text and match type. A matching criterion is left untouched, retaining its criterion ID, enabled/paused status, keyword-level bid overrides, labels, and criterion-associated history/statistics. Zernio does not reset its quality score; Google continues to calculate scores and statistics normally. Text comparison does not trim whitespace. A bare string or an object without `matchType` means `broad`, not the existing criterion's match type. For example, resending an existing `{ \"text\": \"plumber\", \"matchType\": \"exact\" }` preserves it; sending `\"plumber\"` instead removes that EXACT criterion and requests a BROAD one. Changing text or match type removes criteria no longer requested and creates any missing criteria. New criteria get new IDs and do not inherit removed criteria's bid overrides, labels, or history. Historical reporting for a removed criterion is not transferred to its replacement. To add keywords without replacing a set, use [POST /v1/ads/keywords](https://docs.zernio.com/ad-campaigns/add-ad-keywords). Use `PATCH /v1/ads/keywords/{keywordId}` to pause/enable one keyword, or `DELETE /v1/ads/keywords/{keywordId}` to remove it.
2425
2843
  # @param ad_id [String]
2426
2844
  # @param update_ad_request [UpdateAdRequest]
2427
2845
  # @param [Hash] opts the optional parameters
@@ -2432,7 +2850,7 @@ module Zernio
2432
2850
  end
2433
2851
 
2434
2852
  # Update ad
2435
- # Patch one or more fields on an ad. Status, budget, targeting, and creative changes are propagated to the platform. Per-platform support: - **Meta** (Facebook + Instagram): all fields supported. - **TikTok**: status, budget, targeting (via &#x60;/v2/adgroup/update/&#x60;), and creative (via &#x60;/v2/ad/update/&#x60; patch-style: &#x60;headline&#x60; is ignored, &#x60;body&#x60; becomes &#x60;ad_text&#x60;). - **Google**: status, budget, KEYWORD edits via &#x60;targeting.keywords&#x60; / &#x60;targeting.negativeKeywords&#x60;, and DEVICE bid adjustments via &#x60;targeting.devices&#x60;. Each list you send becomes the FULL new set of its kind (criteria not in the list are removed); a kind left out is untouched. Any other &#x60;targeting&#x60; field returns 400: Google cannot mutate broad targeting post-create without recreating the campaign. &#x60;creative&#x60; returns 501. - **LinkedIn**: status, budget, targeting (countries or regions, excludedLocations (countries), the B2B facets, and audience segments; applied to the LinkedIn Campaign via PARTIAL_UPDATE, and REPLACES the campaign&#39;s entire targetingCriteria, not a merge), and creative (uploads new media, creates a replacement inline creative on the same campaign, pauses the old one). - **Pinterest / X / OpenAI Ads**: status + budget only. Sending &#x60;targeting&#x60; or &#x60;creative&#x60; returns 501 with code &#x60;unsupported_platform_operation&#x60;. OpenAI Ads budget is lifetime-only (see &#x60;budget.type&#x60; below). **Google keyword replacement:** These edits affect the ad&#39;s entire ad group, including sibling ads. Positive (&#x60;targeting.keywords&#x60;) and negative (&#x60;targeting.negativeKeywords&#x60;) sets are independent: omit a field to leave that set unchanged, or send &#x60;[]&#x60; to remove every keyword of that kind. Zernio compares each supplied set with Google&#39;s live criteria by case-insensitive keyword text and match type. A matching criterion is left untouched, retaining its criterion ID, enabled/paused status, keyword-level bid overrides, labels, and criterion-associated history/statistics. Zernio does not reset its quality score; Google continues to calculate scores and statistics normally. Text comparison does not trim whitespace. A bare string or an object without &#x60;matchType&#x60; means &#x60;broad&#x60;, not the existing criterion&#39;s match type. For example, resending an existing &#x60;{ \&quot;text\&quot;: \&quot;plumber\&quot;, \&quot;matchType\&quot;: \&quot;exact\&quot; }&#x60; preserves it; sending &#x60;\&quot;plumber\&quot;&#x60; instead removes that EXACT criterion and requests a BROAD one. Changing text or match type removes criteria no longer requested and creates any missing criteria. New criteria get new IDs and do not inherit removed criteria&#39;s bid overrides, labels, or history. Historical reporting for a removed criterion is not transferred to its replacement. To add keywords without replacing a set, use [POST /v1/ads/keywords](https://docs.zernio.com/ad-campaigns/add-ad-keywords). Use &#x60;PATCH /v1/ads/keywords/{keywordId}&#x60; to pause/enable one keyword, or &#x60;DELETE /v1/ads/keywords/{keywordId}&#x60; to remove it.
2853
+ # Patch one or more fields on an ad. Status, budget, targeting, and creative changes are propagated to the platform. Per-platform support: - **Meta** (Facebook + Instagram): all fields supported. - **TikTok**: status, budget, targeting (via &#x60;/v2/adgroup/update/&#x60;), and creative (via &#x60;/v2/ad/update/&#x60; patch-style: &#x60;headline&#x60; is ignored, &#x60;body&#x60; becomes &#x60;ad_text&#x60;). - **Google**: status, budget, KEYWORD edits via &#x60;targeting.keywords&#x60; / &#x60;targeting.negativeKeywords&#x60;, and DEVICE bid adjustments via &#x60;targeting.devices&#x60;. Each list you send becomes the FULL new set of its kind (criteria not in the list are removed); a kind left out is untouched. Any other &#x60;targeting&#x60; field returns 400: Google cannot mutate broad targeting post-create without recreating the campaign. RSA text updates use top-level &#x60;headlines&#x60;, &#x60;descriptions&#x60; and &#x60;finalUrls&#x60;. Each supplied array replaces the full list; omit a field to preserve it. Use 3-15 headlines (1-30 characters) and 2-4 descriptions (1-90 characters). Omit an asset to remove it; omit pinnedField on an included asset to unpin it. Updates do not pad or truncate text. The legacy creative fields remain unsupported for Google. - **LinkedIn**: status, budget, targeting (countries or regions, excludedLocations (countries), the B2B facets, and audience segments; applied to the LinkedIn Campaign via PARTIAL_UPDATE, and REPLACES the campaign&#39;s entire targetingCriteria, not a merge), and creative (uploads new media, creates a replacement inline creative on the same campaign, pauses the old one). - **Pinterest / X / OpenAI Ads**: status + budget only. Sending &#x60;targeting&#x60; or &#x60;creative&#x60; returns 501 with code &#x60;unsupported_platform_operation&#x60;. OpenAI Ads budget is lifetime-only (see &#x60;budget.type&#x60; below). **Google keyword replacement:** These edits affect the ad&#39;s entire ad group, including sibling ads. Positive (&#x60;targeting.keywords&#x60;) and negative (&#x60;targeting.negativeKeywords&#x60;) sets are independent: omit a field to leave that set unchanged, or send &#x60;[]&#x60; to remove every keyword of that kind. Zernio compares each supplied set with Google&#39;s live criteria by case-insensitive keyword text and match type. A matching criterion is left untouched, retaining its criterion ID, enabled/paused status, keyword-level bid overrides, labels, and criterion-associated history/statistics. Zernio does not reset its quality score; Google continues to calculate scores and statistics normally. Text comparison does not trim whitespace. A bare string or an object without &#x60;matchType&#x60; means &#x60;broad&#x60;, not the existing criterion&#39;s match type. For example, resending an existing &#x60;{ \&quot;text\&quot;: \&quot;plumber\&quot;, \&quot;matchType\&quot;: \&quot;exact\&quot; }&#x60; preserves it; sending &#x60;\&quot;plumber\&quot;&#x60; instead removes that EXACT criterion and requests a BROAD one. Changing text or match type removes criteria no longer requested and creates any missing criteria. New criteria get new IDs and do not inherit removed criteria&#39;s bid overrides, labels, or history. Historical reporting for a removed criterion is not transferred to its replacement. To add keywords without replacing a set, use [POST /v1/ads/keywords](https://docs.zernio.com/ad-campaigns/add-ad-keywords). Use &#x60;PATCH /v1/ads/keywords/{keywordId}&#x60; to pause/enable one keyword, or &#x60;DELETE /v1/ads/keywords/{keywordId}&#x60; to remove it.
2436
2854
  # @param ad_id [String]
2437
2855
  # @param update_ad_request [UpdateAdRequest]
2438
2856
  # @param [Hash] opts the optional parameters
@@ -2642,6 +3060,85 @@ module Zernio
2642
3060
  return data, status_code, headers
2643
3061
  end
2644
3062
 
3063
+ # Update ad-group assets
3064
+ # Edits existing Google assets in place. Send updates with assetResourceName and the fields to change. An asset is shared: changes affect every attachment using it. Omitted fields stay unchanged. The operation consumes the Google operations budget and invalidates affected cached lists.
3065
+ # @param ad_set_id [String] Numeric Google platform id.
3066
+ # @param update_campaign_assets_request [UpdateCampaignAssetsRequest]
3067
+ # @param [Hash] opts the optional parameters
3068
+ # @return [UpdateCampaignAssets200Response]
3069
+ def update_ad_group_assets(ad_set_id, update_campaign_assets_request, opts = {})
3070
+ data, _status_code, _headers = update_ad_group_assets_with_http_info(ad_set_id, update_campaign_assets_request, opts)
3071
+ data
3072
+ end
3073
+
3074
+ # Update ad-group assets
3075
+ # Edits existing Google assets in place. Send updates with assetResourceName and the fields to change. An asset is shared: changes affect every attachment using it. Omitted fields stay unchanged. The operation consumes the Google operations budget and invalidates affected cached lists.
3076
+ # @param ad_set_id [String] Numeric Google platform id.
3077
+ # @param update_campaign_assets_request [UpdateCampaignAssetsRequest]
3078
+ # @param [Hash] opts the optional parameters
3079
+ # @return [Array<(UpdateCampaignAssets200Response, Integer, Hash)>] UpdateCampaignAssets200Response data, response status code and response headers
3080
+ def update_ad_group_assets_with_http_info(ad_set_id, update_campaign_assets_request, opts = {})
3081
+ if @api_client.config.debugging
3082
+ @api_client.config.logger.debug 'Calling API: AdCampaignsApi.update_ad_group_assets ...'
3083
+ end
3084
+ # verify the required parameter 'ad_set_id' is set
3085
+ if @api_client.config.client_side_validation && ad_set_id.nil?
3086
+ fail ArgumentError, "Missing the required parameter 'ad_set_id' when calling AdCampaignsApi.update_ad_group_assets"
3087
+ end
3088
+ pattern = Regexp.new(/^\d+$/)
3089
+ if @api_client.config.client_side_validation && ad_set_id !~ pattern
3090
+ fail ArgumentError, "invalid value for 'ad_set_id' when calling AdCampaignsApi.update_ad_group_assets, must conform to the pattern #{pattern}."
3091
+ end
3092
+
3093
+ # verify the required parameter 'update_campaign_assets_request' is set
3094
+ if @api_client.config.client_side_validation && update_campaign_assets_request.nil?
3095
+ fail ArgumentError, "Missing the required parameter 'update_campaign_assets_request' when calling AdCampaignsApi.update_ad_group_assets"
3096
+ end
3097
+ # resource path
3098
+ local_var_path = '/v1/ads/ad-sets/{adSetId}/assets'.sub('{' + 'adSetId' + '}', CGI.escape(ad_set_id.to_s))
3099
+
3100
+ # query parameters
3101
+ query_params = opts[:query_params] || {}
3102
+
3103
+ # header parameters
3104
+ header_params = opts[:header_params] || {}
3105
+ # HTTP header 'Accept' (if needed)
3106
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
3107
+ # HTTP header 'Content-Type'
3108
+ content_type = @api_client.select_header_content_type(['application/json'])
3109
+ if !content_type.nil?
3110
+ header_params['Content-Type'] = content_type
3111
+ end
3112
+
3113
+ # form parameters
3114
+ form_params = opts[:form_params] || {}
3115
+
3116
+ # http body (model)
3117
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_campaign_assets_request)
3118
+
3119
+ # return_type
3120
+ return_type = opts[:debug_return_type] || 'UpdateCampaignAssets200Response'
3121
+
3122
+ # auth_names
3123
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
3124
+
3125
+ new_options = opts.merge(
3126
+ :operation => :"AdCampaignsApi.update_ad_group_assets",
3127
+ :header_params => header_params,
3128
+ :query_params => query_params,
3129
+ :form_params => form_params,
3130
+ :body => post_body,
3131
+ :auth_names => auth_names,
3132
+ :return_type => return_type
3133
+ )
3134
+
3135
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
3136
+ if @api_client.config.debugging
3137
+ @api_client.config.logger.debug "API called: AdCampaignsApi#update_ad_group_assets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3138
+ end
3139
+ return data, status_code, headers
3140
+ end
3141
+
2645
3142
  # Pause or enable a Search keyword
2646
3143
  # Changes `ad_group_criterion.status` for one keyword criterion (M.140). Negative keywords have no status on Google and cannot be paused or enabled.
2647
3144
  # @param keyword_id [String] Zernio keyword ID (not the Google criterion ID)
@@ -3012,6 +3509,85 @@ module Zernio
3012
3509
  return data, status_code, headers
3013
3510
  end
3014
3511
 
3512
+ # Update campaign assets
3513
+ # Edits existing Google assets in place. Send updates with assetResourceName and the fields to change. An asset is shared: changes affect every attachment using it. Omitted fields stay unchanged. The operation consumes the Google operations budget and invalidates affected cached lists.
3514
+ # @param campaign_id [String] Numeric Google platform id.
3515
+ # @param update_campaign_assets_request [UpdateCampaignAssetsRequest]
3516
+ # @param [Hash] opts the optional parameters
3517
+ # @return [UpdateCampaignAssets200Response]
3518
+ def update_campaign_assets(campaign_id, update_campaign_assets_request, opts = {})
3519
+ data, _status_code, _headers = update_campaign_assets_with_http_info(campaign_id, update_campaign_assets_request, opts)
3520
+ data
3521
+ end
3522
+
3523
+ # Update campaign assets
3524
+ # Edits existing Google assets in place. Send updates with assetResourceName and the fields to change. An asset is shared: changes affect every attachment using it. Omitted fields stay unchanged. The operation consumes the Google operations budget and invalidates affected cached lists.
3525
+ # @param campaign_id [String] Numeric Google platform id.
3526
+ # @param update_campaign_assets_request [UpdateCampaignAssetsRequest]
3527
+ # @param [Hash] opts the optional parameters
3528
+ # @return [Array<(UpdateCampaignAssets200Response, Integer, Hash)>] UpdateCampaignAssets200Response data, response status code and response headers
3529
+ def update_campaign_assets_with_http_info(campaign_id, update_campaign_assets_request, opts = {})
3530
+ if @api_client.config.debugging
3531
+ @api_client.config.logger.debug 'Calling API: AdCampaignsApi.update_campaign_assets ...'
3532
+ end
3533
+ # verify the required parameter 'campaign_id' is set
3534
+ if @api_client.config.client_side_validation && campaign_id.nil?
3535
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling AdCampaignsApi.update_campaign_assets"
3536
+ end
3537
+ pattern = Regexp.new(/^\d+$/)
3538
+ if @api_client.config.client_side_validation && campaign_id !~ pattern
3539
+ fail ArgumentError, "invalid value for 'campaign_id' when calling AdCampaignsApi.update_campaign_assets, must conform to the pattern #{pattern}."
3540
+ end
3541
+
3542
+ # verify the required parameter 'update_campaign_assets_request' is set
3543
+ if @api_client.config.client_side_validation && update_campaign_assets_request.nil?
3544
+ fail ArgumentError, "Missing the required parameter 'update_campaign_assets_request' when calling AdCampaignsApi.update_campaign_assets"
3545
+ end
3546
+ # resource path
3547
+ local_var_path = '/v1/ads/campaigns/{campaignId}/assets'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))
3548
+
3549
+ # query parameters
3550
+ query_params = opts[:query_params] || {}
3551
+
3552
+ # header parameters
3553
+ header_params = opts[:header_params] || {}
3554
+ # HTTP header 'Accept' (if needed)
3555
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
3556
+ # HTTP header 'Content-Type'
3557
+ content_type = @api_client.select_header_content_type(['application/json'])
3558
+ if !content_type.nil?
3559
+ header_params['Content-Type'] = content_type
3560
+ end
3561
+
3562
+ # form parameters
3563
+ form_params = opts[:form_params] || {}
3564
+
3565
+ # http body (model)
3566
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_campaign_assets_request)
3567
+
3568
+ # return_type
3569
+ return_type = opts[:debug_return_type] || 'UpdateCampaignAssets200Response'
3570
+
3571
+ # auth_names
3572
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
3573
+
3574
+ new_options = opts.merge(
3575
+ :operation => :"AdCampaignsApi.update_campaign_assets",
3576
+ :header_params => header_params,
3577
+ :query_params => query_params,
3578
+ :form_params => form_params,
3579
+ :body => post_body,
3580
+ :auth_names => auth_names,
3581
+ :return_type => return_type
3582
+ )
3583
+
3584
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
3585
+ if @api_client.config.debugging
3586
+ @api_client.config.logger.debug "API called: AdCampaignsApi#update_campaign_assets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3587
+ end
3588
+ return data, status_code, headers
3589
+ end
3590
+
3015
3591
  # Edit a Google campaign's device, location, or language targeting
3016
3592
  # Google Ads compliance row M.10: geo and language targeting set at creation must stay editable afterwards. Send at least one of `devices`, `locations`, `languages`; each provided field REPLACES that field's existing criteria on the campaign (a full set, not a delta). Fields left out of the body are untouched. Google only; every other platform returns 501. `locations` accepts the same shapes as campaign creation: a bare array of ISO country codes, or an object with `countries`/`regions`/`cities`/`zips`/`metros` key lists (`key` from GET /v1/ads/targeting/search?dimension=geo). Negative (excluded) locations are left untouched by this endpoint. `languages` is an array of Google's language codes (ISO 639-1, plus variants such as `zh_CN`); an unknown code returns 400. The response includes the refreshed `devices`/`locations`/`languages` state read back from Google after the edit, and invalidates the cached copy `GET` on this campaign would otherwise keep serving.
3017
3593
  # @param campaign_id [String] Google platform campaign ID