late-sdk 0.0.937 → 0.0.938

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ab87906cefb9d1114509587092f8add4580bec1060ea4454cf4f7066f94a88e4
4
- data.tar.gz: ea4c2949818eaee9bf4e67d2e80252481fce3653fafe0f2b9ed50fbe38998a67
3
+ metadata.gz: 40472c8220c91ebe5acd2558047340cd87d8d631a7bdffbfdff8dcaaf6fd5853
4
+ data.tar.gz: 0a7e03ec8176659f62ab40134e08d76f2658ce74f05026fb27284d27eca9a955
5
5
  SHA512:
6
- metadata.gz: 531f31208261f86a2ef4e6dbb78ee57eb32a0a5c05e28816fad4a42f36dc55e77906d71c3cc8369ce3d492da97371efedc527fa2511cf016e38adb21ca41dd37
7
- data.tar.gz: 6bcd9d0704d2a5d619c5458e337feafbeba1eceed3bd73763e1a5c861d03e2f247e7620fcbd2d3c70415d5f9dec51dac90d37cfa8176c8ffd91b0797a4f60dfa
6
+ metadata.gz: 153a63980050e6249104f711f041dc6a56e5aa8eae9b874f0c7b424d28d7162b1e895d50efaba3288be670eb47e23d8c72fbbc8983c1a443c9a47605e36f8dda
7
+ data.tar.gz: 27ebb4dc6427c5ff5bcb85bf8ed84efd1934fd46c1d96f2bd340a8d88114212eb5bb9f848089fe2bfcee7161205782a095324a47194e21fd53c70431f5e4a56a
data/README.md CHANGED
@@ -175,6 +175,7 @@ Class | Method | HTTP request | Description
175
175
  *Zernio::AdCampaignsApi* | [**duplicate_ad_campaign**](docs/AdCampaignsApi.md#duplicate_ad_campaign) | **POST** /v1/ads/campaigns/{campaignId}/duplicate | Duplicate a campaign
176
176
  *Zernio::AdCampaignsApi* | [**duplicate_ad_set**](docs/AdCampaignsApi.md#duplicate_ad_set) | **POST** /v1/ads/ad-sets/{adSetId}/duplicate | Duplicate an ad set
177
177
  *Zernio::AdCampaignsApi* | [**get_ad**](docs/AdCampaignsApi.md#get_ad) | **GET** /v1/ads/{adId} | Get ad details
178
+ *Zernio::AdCampaignsApi* | [**get_ad_campaign_details**](docs/AdCampaignsApi.md#get_ad_campaign_details) | **GET** /v1/ads/campaigns/{campaignId} | Get live campaign details
178
179
  *Zernio::AdCampaignsApi* | [**get_ad_set_details**](docs/AdCampaignsApi.md#get_ad_set_details) | **GET** /v1/ads/ad-sets/{adSetId} | Get live ad-set details
179
180
  *Zernio::AdCampaignsApi* | [**get_ad_tree**](docs/AdCampaignsApi.md#get_ad_tree) | **GET** /v1/ads/tree | Get campaign tree
180
181
  *Zernio::AdCampaignsApi* | [**get_ads_timeline**](docs/AdCampaignsApi.md#get_ads_timeline) | **GET** /v1/ads/timeline | Get daily account metrics
@@ -1372,6 +1373,7 @@ Class | Method | HTTP request | Description
1372
1373
  - [Zernio::GetAdAccountFinance200ResponseFundingSource](docs/GetAdAccountFinance200ResponseFundingSource.md)
1373
1374
  - [Zernio::GetAdAnalytics202Response](docs/GetAdAnalytics202Response.md)
1374
1375
  - [Zernio::GetAdAudience200Response](docs/GetAdAudience200Response.md)
1376
+ - [Zernio::GetAdCampaignDetails200Response](docs/GetAdCampaignDetails200Response.md)
1375
1377
  - [Zernio::GetAdComments200Response](docs/GetAdComments200Response.md)
1376
1378
  - [Zernio::GetAdComments200ResponseMeta](docs/GetAdComments200ResponseMeta.md)
1377
1379
  - [Zernio::GetAdComments200ResponsePagination](docs/GetAdComments200ResponsePagination.md)
@@ -20,6 +20,7 @@ All URIs are relative to *https://zernio.com/api*
20
20
  | [**duplicate_ad_campaign**](AdCampaignsApi.md#duplicate_ad_campaign) | **POST** /v1/ads/campaigns/{campaignId}/duplicate | Duplicate a campaign |
21
21
  | [**duplicate_ad_set**](AdCampaignsApi.md#duplicate_ad_set) | **POST** /v1/ads/ad-sets/{adSetId}/duplicate | Duplicate an ad set |
22
22
  | [**get_ad**](AdCampaignsApi.md#get_ad) | **GET** /v1/ads/{adId} | Get ad details |
23
+ | [**get_ad_campaign_details**](AdCampaignsApi.md#get_ad_campaign_details) | **GET** /v1/ads/campaigns/{campaignId} | Get live campaign details |
23
24
  | [**get_ad_set_details**](AdCampaignsApi.md#get_ad_set_details) | **GET** /v1/ads/ad-sets/{adSetId} | Get live ad-set details |
24
25
  | [**get_ad_tree**](AdCampaignsApi.md#get_ad_tree) | **GET** /v1/ads/tree | Get campaign tree |
25
26
  | [**get_ads_timeline**](AdCampaignsApi.md#get_ads_timeline) | **GET** /v1/ads/timeline | Get daily account metrics |
@@ -1197,6 +1198,81 @@ end
1197
1198
  - **Accept**: application/json
1198
1199
 
1199
1200
 
1201
+ ## get_ad_campaign_details
1202
+
1203
+ > <GetAdCampaignDetails200Response> get_ad_campaign_details(campaign_id, account_id, opts)
1204
+
1205
+ Get live campaign details
1206
+
1207
+ Reads one campaign live from Meta, returned verbatim, so a caller that knows a campaign id no longer has to page `GET /v1/ads/campaigns` to find it. The default projection covers name, status, objective, buying type, bid strategy, budgets, spend cap, schedule and `issues_info`. `fields` is a raw-passthrough override; unknown fields return Meta's 400 verbatim. A campaign the resolved connection cannot see comes back as Meta's own 400, not a 404.
1208
+
1209
+ ### Examples
1210
+
1211
+ ```ruby
1212
+ require 'time'
1213
+ require 'zernio-sdk'
1214
+ # setup authorization
1215
+ Zernio.configure do |config|
1216
+ # Configure Bearer authorization (JWT): bearerAuth
1217
+ config.access_token = 'YOUR_BEARER_TOKEN'
1218
+ end
1219
+
1220
+ api_instance = Zernio::AdCampaignsApi.new
1221
+ campaign_id = 'campaign_id_example' # String | Meta campaign id (platformCampaignId).
1222
+ account_id = 'account_id_example' # String | Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
1223
+ opts = {
1224
+ fields: 'id,name,status,daily_budget' # String | Comma-separated Graph field override. Supports nested {} projections and Graph field modifiers.
1225
+ }
1226
+
1227
+ begin
1228
+ # Get live campaign details
1229
+ result = api_instance.get_ad_campaign_details(campaign_id, account_id, opts)
1230
+ p result
1231
+ rescue Zernio::ApiError => e
1232
+ puts "Error when calling AdCampaignsApi->get_ad_campaign_details: #{e}"
1233
+ end
1234
+ ```
1235
+
1236
+ #### Using the get_ad_campaign_details_with_http_info variant
1237
+
1238
+ This returns an Array which contains the response data, status code and headers.
1239
+
1240
+ > <Array(<GetAdCampaignDetails200Response>, Integer, Hash)> get_ad_campaign_details_with_http_info(campaign_id, account_id, opts)
1241
+
1242
+ ```ruby
1243
+ begin
1244
+ # Get live campaign details
1245
+ data, status_code, headers = api_instance.get_ad_campaign_details_with_http_info(campaign_id, account_id, opts)
1246
+ p status_code # => 2xx
1247
+ p headers # => { ... }
1248
+ p data # => <GetAdCampaignDetails200Response>
1249
+ rescue Zernio::ApiError => e
1250
+ puts "Error when calling AdCampaignsApi->get_ad_campaign_details_with_http_info: #{e}"
1251
+ end
1252
+ ```
1253
+
1254
+ ### Parameters
1255
+
1256
+ | Name | Type | Description | Notes |
1257
+ | ---- | ---- | ----------- | ----- |
1258
+ | **campaign_id** | **String** | Meta campaign id (platformCampaignId). | |
1259
+ | **account_id** | **String** | Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token. | |
1260
+ | **fields** | **String** | Comma-separated Graph field override. Supports nested {} projections and Graph field modifiers. | [optional] |
1261
+
1262
+ ### Return type
1263
+
1264
+ [**GetAdCampaignDetails200Response**](GetAdCampaignDetails200Response.md)
1265
+
1266
+ ### Authorization
1267
+
1268
+ [bearerAuth](../README.md#bearerAuth)
1269
+
1270
+ ### HTTP request headers
1271
+
1272
+ - **Content-Type**: Not defined
1273
+ - **Accept**: application/json
1274
+
1275
+
1200
1276
  ## get_ad_set_details
1201
1277
 
1202
1278
  > <GetAdSetDetails200Response> get_ad_set_details(ad_set_id, account_id, opts)
@@ -0,0 +1,18 @@
1
+ # Zernio::GetAdCampaignDetails200Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **campaign** | **Object** | Raw Meta campaign; keys are the requested Graph fields. | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'zernio-sdk'
13
+
14
+ instance = Zernio::GetAdCampaignDetails200Response.new(
15
+ campaign: null
16
+ )
17
+ ```
18
+
data/docs/LeadGenApi.md CHANGED
@@ -34,7 +34,7 @@ end
34
34
 
35
35
  api_instance = Zernio::LeadGenApi.new
36
36
  form_id = 'form_id_example' # String | Numeric form id (Meta leadgen_form id or LinkedIn leadForm id).
37
- account_id = 'account_id_example' # String | Connected facebook or linkedin ads account id (selects the platform).
37
+ account_id = 'account_id_example' # String | Connected Meta ads, facebook or linkedin ads account id (selects the platform). A Meta ads connection resolves its Page through the Facebook account linked to the same profile.
38
38
 
39
39
  begin
40
40
  # Archive a lead form
@@ -68,7 +68,7 @@ end
68
68
  | Name | Type | Description | Notes |
69
69
  | ---- | ---- | ----------- | ----- |
70
70
  | **form_id** | **String** | Numeric form id (Meta leadgen_form id or LinkedIn leadForm id). | |
71
- | **account_id** | **String** | Connected facebook or linkedin ads account id (selects the platform). | |
71
+ | **account_id** | **String** | Connected Meta ads, facebook or linkedin ads account id (selects the platform). A Meta ads connection resolves its Page through the Facebook account linked to the same profile. | |
72
72
 
73
73
  ### Return type
74
74
 
@@ -90,7 +90,7 @@ end
90
90
 
91
91
  Create a lead form
92
92
 
93
- Creates a Lead Gen form. The form content goes inside `platformSpecificData` for both platforms (the shape is selected by the accountId's platform). Meta: created on the connected Facebook Page (a facebook account or a metaads business-login account with a selected Page) (POST /{page-id}/leadgen_forms); the old top-level Meta fields (questions, thankYou*, contextCard, …) are DEPRECATED but still accepted while platformSpecificData is absent; mixing both shapes is a 400. LinkedIn: created on the ad account's Company Page. NOT idempotent: a retry creates a second form. Meta prefilled question types (EMAIL, PHONE, FULL_NAME, …) must omit label/key; CUSTOM questions require both. LinkedIn exposes only free-text and multiple-choice questions via API (prefilled-from-profile fields are Campaign Manager UI-only). Requires the Ads add-on.
93
+ Creates a Lead Gen form. The form content goes inside `platformSpecificData` for both platforms (the shape is selected by the accountId's platform). Meta: created on the connected Facebook Page (POST /{page-id}/leadgen_forms), where `accountId` may be the `metaads` ads connection (its Page comes from the Facebook account linked to the same profile) or the Facebook account itself; the old top-level Meta fields (questions, thankYou*, contextCard, …) are DEPRECATED but still accepted while platformSpecificData is absent; mixing both shapes is a 400. LinkedIn: created on the ad account's Company Page. NOT idempotent: a retry creates a second form. Meta prefilled question types (EMAIL, PHONE, FULL_NAME, …) must omit label/key; CUSTOM questions require both. LinkedIn exposes only free-text and multiple-choice questions via API (prefilled-from-profile fields are Campaign Manager UI-only). Requires the Ads add-on.
94
94
 
95
95
  ### Examples
96
96
 
@@ -245,7 +245,7 @@ end
245
245
 
246
246
  api_instance = Zernio::LeadGenApi.new
247
247
  form_id = 'form_id_example' # String | Numeric form id (Meta leadgen_form id or LinkedIn leadForm id).
248
- account_id = 'account_id_example' # String | Connected facebook or linkedin ads account id (selects the platform).
248
+ account_id = 'account_id_example' # String | Connected Meta ads, facebook or linkedin ads account id (selects the platform). A Meta ads connection resolves its Page through the Facebook account linked to the same profile.
249
249
  opts = {
250
250
  fields: 'name,thank_you_page{title,body,button_type,website_url}' # String | Meta only. A Graph field selection passed through verbatim to GET /{form-id}, replacing the default projection, so fields Meta adds later are reachable without an API change. Field names, commas and {} expansion only; anything else (Graph field modifiers such as .limit(), or characters that could open another query parameter) is a 400. Ownership of the form is verified before the selection runs, so this cannot reach any Page but the one accountId manages. Unknown field names are rejected by Meta as a 400.
251
251
  }
@@ -282,7 +282,7 @@ end
282
282
  | Name | Type | Description | Notes |
283
283
  | ---- | ---- | ----------- | ----- |
284
284
  | **form_id** | **String** | Numeric form id (Meta leadgen_form id or LinkedIn leadForm id). | |
285
- | **account_id** | **String** | Connected facebook or linkedin ads account id (selects the platform). | |
285
+ | **account_id** | **String** | Connected Meta ads, facebook or linkedin ads account id (selects the platform). A Meta ads connection resolves its Page through the Facebook account linked to the same profile. | |
286
286
  | **fields** | **String** | Meta only. A Graph field selection passed through verbatim to GET /{form-id}, replacing the default projection, so fields Meta adds later are reachable without an API change. Field names, commas and {} expansion only; anything else (Graph field modifiers such as .limit(), or characters that could open another query parameter) is a 400. Ownership of the form is verified before the selection runs, so this cannot reach any Page but the one accountId manages. Unknown field names are rejected by Meta as a 400. | [optional] |
287
287
 
288
288
  ### Return type
@@ -384,7 +384,7 @@ end
384
384
 
385
385
  List lead forms
386
386
 
387
- Lists the Lead Gen forms owned by the account. Meta: forms on the connected Facebook Page, including a Page selected on a metaads business-login connection. LinkedIn: forms owned by the ad account's Company Page. Pass `adAccountId` (LinkedIn forms are org-owned). Requires the Ads add-on.
387
+ Lists the Lead Gen forms owned by the account. Meta: forms on the connected Facebook Page. Pass either the `metaads` ads connection (the Page is taken from the Facebook account linked to it) or the Facebook account itself. LinkedIn: forms owned by the ad account's Company Page. Pass `adAccountId` (LinkedIn forms are org-owned). Requires the Ads add-on.
388
388
 
389
389
  ### Examples
390
390
 
@@ -398,7 +398,7 @@ Zernio.configure do |config|
398
398
  end
399
399
 
400
400
  api_instance = Zernio::LeadGenApi.new
401
- account_id = 'account_id_example' # String | Connected Facebook, Meta ads business-login or LinkedIn ads account ID.
401
+ account_id = 'account_id_example' # String | Connected Meta ads, Facebook or LinkedIn ads account ID. A Meta ads connection resolves its Page through the Facebook account linked to the same profile.
402
402
  opts = {
403
403
  ad_account_id: 'ad_account_id_example', # String | LinkedIn only: the LinkedIn ad account id (used to resolve the owning organization). Required for LinkedIn.
404
404
  limit: 56, # Integer |
@@ -436,7 +436,7 @@ end
436
436
 
437
437
  | Name | Type | Description | Notes |
438
438
  | ---- | ---- | ----------- | ----- |
439
- | **account_id** | **String** | Connected Facebook, Meta ads business-login or LinkedIn ads account ID. | |
439
+ | **account_id** | **String** | Connected Meta ads, Facebook or LinkedIn ads account ID. A Meta ads connection resolves its Page through the Facebook account linked to the same profile. | |
440
440
  | **ad_account_id** | **String** | LinkedIn only: the LinkedIn ad account id (used to resolve the owning organization). Required for LinkedIn. | [optional] |
441
441
  | **limit** | **Integer** | | [optional][default to 25] |
442
442
  | **cursor** | **String** | | [optional] |
@@ -1183,6 +1183,79 @@ module Zernio
1183
1183
  return data, status_code, headers
1184
1184
  end
1185
1185
 
1186
+ # Get live campaign details
1187
+ # Reads one campaign live from Meta, returned verbatim, so a caller that knows a campaign id no longer has to page `GET /v1/ads/campaigns` to find it. The default projection covers name, status, objective, buying type, bid strategy, budgets, spend cap, schedule and `issues_info`. `fields` is a raw-passthrough override; unknown fields return Meta's 400 verbatim. A campaign the resolved connection cannot see comes back as Meta's own 400, not a 404.
1188
+ # @param campaign_id [String] Meta campaign id (platformCampaignId).
1189
+ # @param account_id [String] Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
1190
+ # @param [Hash] opts the optional parameters
1191
+ # @option opts [String] :fields Comma-separated Graph field override. Supports nested {} projections and Graph field modifiers.
1192
+ # @return [GetAdCampaignDetails200Response]
1193
+ def get_ad_campaign_details(campaign_id, account_id, opts = {})
1194
+ data, _status_code, _headers = get_ad_campaign_details_with_http_info(campaign_id, account_id, opts)
1195
+ data
1196
+ end
1197
+
1198
+ # Get live campaign details
1199
+ # Reads one campaign live from Meta, returned verbatim, so a caller that knows a campaign id no longer has to page &#x60;GET /v1/ads/campaigns&#x60; to find it. The default projection covers name, status, objective, buying type, bid strategy, budgets, spend cap, schedule and &#x60;issues_info&#x60;. &#x60;fields&#x60; is a raw-passthrough override; unknown fields return Meta&#39;s 400 verbatim. A campaign the resolved connection cannot see comes back as Meta&#39;s own 400, not a 404.
1200
+ # @param campaign_id [String] Meta campaign id (platformCampaignId).
1201
+ # @param account_id [String] Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
1202
+ # @param [Hash] opts the optional parameters
1203
+ # @option opts [String] :fields Comma-separated Graph field override. Supports nested {} projections and Graph field modifiers.
1204
+ # @return [Array<(GetAdCampaignDetails200Response, Integer, Hash)>] GetAdCampaignDetails200Response data, response status code and response headers
1205
+ def get_ad_campaign_details_with_http_info(campaign_id, account_id, opts = {})
1206
+ if @api_client.config.debugging
1207
+ @api_client.config.logger.debug 'Calling API: AdCampaignsApi.get_ad_campaign_details ...'
1208
+ end
1209
+ # verify the required parameter 'campaign_id' is set
1210
+ if @api_client.config.client_side_validation && campaign_id.nil?
1211
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling AdCampaignsApi.get_ad_campaign_details"
1212
+ end
1213
+ # verify the required parameter 'account_id' is set
1214
+ if @api_client.config.client_side_validation && account_id.nil?
1215
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AdCampaignsApi.get_ad_campaign_details"
1216
+ end
1217
+ # resource path
1218
+ local_var_path = '/v1/ads/campaigns/{campaignId}'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))
1219
+
1220
+ # query parameters
1221
+ query_params = opts[:query_params] || {}
1222
+ query_params[:'accountId'] = account_id
1223
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
1224
+
1225
+ # header parameters
1226
+ header_params = opts[:header_params] || {}
1227
+ # HTTP header 'Accept' (if needed)
1228
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1229
+
1230
+ # form parameters
1231
+ form_params = opts[:form_params] || {}
1232
+
1233
+ # http body (model)
1234
+ post_body = opts[:debug_body]
1235
+
1236
+ # return_type
1237
+ return_type = opts[:debug_return_type] || 'GetAdCampaignDetails200Response'
1238
+
1239
+ # auth_names
1240
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1241
+
1242
+ new_options = opts.merge(
1243
+ :operation => :"AdCampaignsApi.get_ad_campaign_details",
1244
+ :header_params => header_params,
1245
+ :query_params => query_params,
1246
+ :form_params => form_params,
1247
+ :body => post_body,
1248
+ :auth_names => auth_names,
1249
+ :return_type => return_type
1250
+ )
1251
+
1252
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1253
+ if @api_client.config.debugging
1254
+ @api_client.config.logger.debug "API called: AdCampaignsApi#get_ad_campaign_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1255
+ end
1256
+ return data, status_code, headers
1257
+ end
1258
+
1186
1259
  # Get live ad-set details
1187
1260
  # Reads the ad set live from Meta, returned verbatim. The default projection includes `learning_stage_info` (learning-phase status: LEARNING / SUCCESS / FAIL / WAIVING; Meta omits its `status` key on paused ad sets), delivery settings, budgets, schedule and targeting. `fields` is a raw-passthrough override; unknown fields return Meta's 400 verbatim.
1188
1261
  # @param ad_set_id [String] Meta ad set id (platformAdSetId).
@@ -22,7 +22,7 @@ module Zernio
22
22
  # Archive a lead form
23
23
  # Neither platform hard-deletes a form; this archives it (Meta status=ARCHIVED; LinkedIn state=ARCHIVED via PARTIAL_UPDATE). Meta forms must belong to the Page the accountId manages.
24
24
  # @param form_id [String] Numeric form id (Meta leadgen_form id or LinkedIn leadForm id).
25
- # @param account_id [String] Connected facebook or linkedin ads account id (selects the platform).
25
+ # @param account_id [String] Connected Meta ads, facebook or linkedin ads account id (selects the platform). A Meta ads connection resolves its Page through the Facebook account linked to the same profile.
26
26
  # @param [Hash] opts the optional parameters
27
27
  # @return [ArchiveLeadForm200Response]
28
28
  def archive_lead_form(form_id, account_id, opts = {})
@@ -33,7 +33,7 @@ module Zernio
33
33
  # Archive a lead form
34
34
  # Neither platform hard-deletes a form; this archives it (Meta status&#x3D;ARCHIVED; LinkedIn state&#x3D;ARCHIVED via PARTIAL_UPDATE). Meta forms must belong to the Page the accountId manages.
35
35
  # @param form_id [String] Numeric form id (Meta leadgen_form id or LinkedIn leadForm id).
36
- # @param account_id [String] Connected facebook or linkedin ads account id (selects the platform).
36
+ # @param account_id [String] Connected Meta ads, facebook or linkedin ads account id (selects the platform). A Meta ads connection resolves its Page through the Facebook account linked to the same profile.
37
37
  # @param [Hash] opts the optional parameters
38
38
  # @return [Array<(ArchiveLeadForm200Response, Integer, Hash)>] ArchiveLeadForm200Response data, response status code and response headers
39
39
  def archive_lead_form_with_http_info(form_id, account_id, opts = {})
@@ -90,7 +90,7 @@ module Zernio
90
90
  end
91
91
 
92
92
  # Create a lead form
93
- # Creates a Lead Gen form. The form content goes inside `platformSpecificData` for both platforms (the shape is selected by the accountId's platform). Meta: created on the connected Facebook Page (a facebook account or a metaads business-login account with a selected Page) (POST /{page-id}/leadgen_forms); the old top-level Meta fields (questions, thankYou*, contextCard, …) are DEPRECATED but still accepted while platformSpecificData is absent; mixing both shapes is a 400. LinkedIn: created on the ad account's Company Page. NOT idempotent: a retry creates a second form. Meta prefilled question types (EMAIL, PHONE, FULL_NAME, …) must omit label/key; CUSTOM questions require both. LinkedIn exposes only free-text and multiple-choice questions via API (prefilled-from-profile fields are Campaign Manager UI-only). Requires the Ads add-on.
93
+ # Creates a Lead Gen form. The form content goes inside `platformSpecificData` for both platforms (the shape is selected by the accountId's platform). Meta: created on the connected Facebook Page (POST /{page-id}/leadgen_forms), where `accountId` may be the `metaads` ads connection (its Page comes from the Facebook account linked to the same profile) or the Facebook account itself; the old top-level Meta fields (questions, thankYou*, contextCard, …) are DEPRECATED but still accepted while platformSpecificData is absent; mixing both shapes is a 400. LinkedIn: created on the ad account's Company Page. NOT idempotent: a retry creates a second form. Meta prefilled question types (EMAIL, PHONE, FULL_NAME, …) must omit label/key; CUSTOM questions require both. LinkedIn exposes only free-text and multiple-choice questions via API (prefilled-from-profile fields are Campaign Manager UI-only). Requires the Ads add-on.
94
94
  # @param create_lead_form_request [CreateLeadFormRequest]
95
95
  # @param [Hash] opts the optional parameters
96
96
  # @return [CreateLeadForm200Response]
@@ -100,7 +100,7 @@ module Zernio
100
100
  end
101
101
 
102
102
  # Create a lead form
103
- # Creates a Lead Gen form. The form content goes inside &#x60;platformSpecificData&#x60; for both platforms (the shape is selected by the accountId&#39;s platform). Meta: created on the connected Facebook Page (a facebook account or a metaads business-login account with a selected Page) (POST /{page-id}/leadgen_forms); the old top-level Meta fields (questions, thankYou*, contextCard, …) are DEPRECATED but still accepted while platformSpecificData is absent; mixing both shapes is a 400. LinkedIn: created on the ad account&#39;s Company Page. NOT idempotent: a retry creates a second form. Meta prefilled question types (EMAIL, PHONE, FULL_NAME, …) must omit label/key; CUSTOM questions require both. LinkedIn exposes only free-text and multiple-choice questions via API (prefilled-from-profile fields are Campaign Manager UI-only). Requires the Ads add-on.
103
+ # Creates a Lead Gen form. The form content goes inside &#x60;platformSpecificData&#x60; for both platforms (the shape is selected by the accountId&#39;s platform). Meta: created on the connected Facebook Page (POST /{page-id}/leadgen_forms), where &#x60;accountId&#x60; may be the &#x60;metaads&#x60; ads connection (its Page comes from the Facebook account linked to the same profile) or the Facebook account itself; the old top-level Meta fields (questions, thankYou*, contextCard, …) are DEPRECATED but still accepted while platformSpecificData is absent; mixing both shapes is a 400. LinkedIn: created on the ad account&#39;s Company Page. NOT idempotent: a retry creates a second form. Meta prefilled question types (EMAIL, PHONE, FULL_NAME, …) must omit label/key; CUSTOM questions require both. LinkedIn exposes only free-text and multiple-choice questions via API (prefilled-from-profile fields are Campaign Manager UI-only). Requires the Ads add-on.
104
104
  # @param create_lead_form_request [CreateLeadFormRequest]
105
105
  # @param [Hash] opts the optional parameters
106
106
  # @return [Array<(CreateLeadForm200Response, Integer, Hash)>] CreateLeadForm200Response data, response status code and response headers
@@ -234,7 +234,7 @@ module Zernio
234
234
  # Get a lead form
235
235
  # Returns the full form, including the thank-you page, so a form can be diffed against what was created. Meta forms are scoped to the Page the accountId manages: a form on any other Page is a 404, never a read.
236
236
  # @param form_id [String] Numeric form id (Meta leadgen_form id or LinkedIn leadForm id).
237
- # @param account_id [String] Connected facebook or linkedin ads account id (selects the platform).
237
+ # @param account_id [String] Connected Meta ads, facebook or linkedin ads account id (selects the platform). A Meta ads connection resolves its Page through the Facebook account linked to the same profile.
238
238
  # @param [Hash] opts the optional parameters
239
239
  # @option opts [String] :fields Meta only. A Graph field selection passed through verbatim to GET /{form-id}, replacing the default projection, so fields Meta adds later are reachable without an API change. Field names, commas and {} expansion only; anything else (Graph field modifiers such as .limit(), or characters that could open another query parameter) is a 400. Ownership of the form is verified before the selection runs, so this cannot reach any Page but the one accountId manages. Unknown field names are rejected by Meta as a 400.
240
240
  # @return [GetLeadForm200Response]
@@ -246,7 +246,7 @@ module Zernio
246
246
  # Get a lead form
247
247
  # Returns the full form, including the thank-you page, so a form can be diffed against what was created. Meta forms are scoped to the Page the accountId manages: a form on any other Page is a 404, never a read.
248
248
  # @param form_id [String] Numeric form id (Meta leadgen_form id or LinkedIn leadForm id).
249
- # @param account_id [String] Connected facebook or linkedin ads account id (selects the platform).
249
+ # @param account_id [String] Connected Meta ads, facebook or linkedin ads account id (selects the platform). A Meta ads connection resolves its Page through the Facebook account linked to the same profile.
250
250
  # @param [Hash] opts the optional parameters
251
251
  # @option opts [String] :fields Meta only. A Graph field selection passed through verbatim to GET /{form-id}, replacing the default projection, so fields Meta adds later are reachable without an API change. Field names, commas and {} expansion only; anything else (Graph field modifiers such as .limit(), or characters that could open another query parameter) is a 400. Ownership of the form is verified before the selection runs, so this cannot reach any Page but the one accountId manages. Unknown field names are rejected by Meta as a 400.
252
252
  # @return [Array<(GetLeadForm200Response, Integer, Hash)>] GetLeadForm200Response data, response status code and response headers
@@ -396,8 +396,8 @@ module Zernio
396
396
  end
397
397
 
398
398
  # List lead forms
399
- # Lists the Lead Gen forms owned by the account. Meta: forms on the connected Facebook Page, including a Page selected on a metaads business-login connection. LinkedIn: forms owned by the ad account's Company Page. Pass `adAccountId` (LinkedIn forms are org-owned). Requires the Ads add-on.
400
- # @param account_id [String] Connected Facebook, Meta ads business-login or LinkedIn ads account ID.
399
+ # Lists the Lead Gen forms owned by the account. Meta: forms on the connected Facebook Page. Pass either the `metaads` ads connection (the Page is taken from the Facebook account linked to it) or the Facebook account itself. LinkedIn: forms owned by the ad account's Company Page. Pass `adAccountId` (LinkedIn forms are org-owned). Requires the Ads add-on.
400
+ # @param account_id [String] Connected Meta ads, Facebook or LinkedIn ads account ID. A Meta ads connection resolves its Page through the Facebook account linked to the same profile.
401
401
  # @param [Hash] opts the optional parameters
402
402
  # @option opts [String] :ad_account_id LinkedIn only: the LinkedIn ad account id (used to resolve the owning organization). Required for LinkedIn.
403
403
  # @option opts [Integer] :limit (default to 25)
@@ -409,8 +409,8 @@ module Zernio
409
409
  end
410
410
 
411
411
  # List lead forms
412
- # Lists the Lead Gen forms owned by the account. Meta: forms on the connected Facebook Page, including a Page selected on a metaads business-login connection. LinkedIn: forms owned by the ad account&#39;s Company Page. Pass &#x60;adAccountId&#x60; (LinkedIn forms are org-owned). Requires the Ads add-on.
413
- # @param account_id [String] Connected Facebook, Meta ads business-login or LinkedIn ads account ID.
412
+ # Lists the Lead Gen forms owned by the account. Meta: forms on the connected Facebook Page. Pass either the &#x60;metaads&#x60; ads connection (the Page is taken from the Facebook account linked to it) or the Facebook account itself. LinkedIn: forms owned by the ad account&#39;s Company Page. Pass &#x60;adAccountId&#x60; (LinkedIn forms are org-owned). Requires the Ads add-on.
413
+ # @param account_id [String] Connected Meta ads, Facebook or LinkedIn ads account ID. A Meta ads connection resolves its Page through the Facebook account linked to the same profile.
414
414
  # @param [Hash] opts the optional parameters
415
415
  # @option opts [String] :ad_account_id LinkedIn only: the LinkedIn ad account id (used to resolve the owning organization). Required for LinkedIn.
416
416
  # @option opts [Integer] :limit (default to 25)
@@ -0,0 +1,148 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
5
+
6
+ The version of the OpenAPI document: 1.0.4
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Zernio
17
+ class GetAdCampaignDetails200Response < ApiModelBase
18
+ # Raw Meta campaign; keys are the requested Graph fields.
19
+ attr_accessor :campaign
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'campaign' => :'campaign'
25
+ }
26
+ end
27
+
28
+ # Returns attribute mapping this model knows about
29
+ def self.acceptable_attribute_map
30
+ attribute_map
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ acceptable_attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'campaign' => :'Object'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GetAdCampaignDetails200Response` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ acceptable_attribute_map = self.class.acceptable_attribute_map
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!acceptable_attribute_map.key?(k.to_sym))
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GetAdCampaignDetails200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
63
+ end
64
+ h[k.to_sym] = v
65
+ }
66
+
67
+ if attributes.key?(:'campaign')
68
+ self.campaign = attributes[:'campaign']
69
+ end
70
+ end
71
+
72
+ # Show invalid properties with the reasons. Usually used together with valid?
73
+ # @return Array for valid properties with the reasons
74
+ def list_invalid_properties
75
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
76
+ invalid_properties = Array.new
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ warn '[DEPRECATED] the `valid?` method is obsolete'
84
+ true
85
+ end
86
+
87
+ # Checks equality by comparing each attribute.
88
+ # @param [Object] Object to be compared
89
+ def ==(o)
90
+ return true if self.equal?(o)
91
+ self.class == o.class &&
92
+ campaign == o.campaign
93
+ end
94
+
95
+ # @see the `==` method
96
+ # @param [Object] Object to be compared
97
+ def eql?(o)
98
+ self == o
99
+ end
100
+
101
+ # Calculates hash code according to all attributes.
102
+ # @return [Integer] Hash code
103
+ def hash
104
+ [campaign].hash
105
+ end
106
+
107
+ # Builds the object from hash
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ # @return [Object] Returns the model itself
110
+ def self.build_from_hash(attributes)
111
+ return nil unless attributes.is_a?(Hash)
112
+ attributes = attributes.transform_keys(&:to_sym)
113
+ transformed_hash = {}
114
+ openapi_types.each_pair do |key, type|
115
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
116
+ transformed_hash["#{key}"] = nil
117
+ elsif type =~ /\AArray<(.*)>/i
118
+ # check to ensure the input is an array given that the attribute
119
+ # is documented as an array but the input is not
120
+ if attributes[attribute_map[key]].is_a?(Array)
121
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
122
+ end
123
+ elsif !attributes[attribute_map[key]].nil?
124
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
125
+ end
126
+ end
127
+ new(transformed_hash)
128
+ end
129
+
130
+ # Returns the object in the form of hash
131
+ # @return [Hash] Returns the object in the form of hash
132
+ def to_hash
133
+ hash = {}
134
+ self.class.attribute_map.each_pair do |attr, param|
135
+ value = self.send(attr)
136
+ if value.nil?
137
+ is_nullable = self.class.openapi_nullable.include?(attr)
138
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
139
+ end
140
+
141
+ hash[param] = _to_hash(value)
142
+ end
143
+ hash
144
+ end
145
+
146
+ end
147
+
148
+ end
@@ -11,5 +11,5 @@ Generator version: 7.19.0
11
11
  =end
12
12
 
13
13
  module Zernio
14
- VERSION = '0.0.937'
14
+ VERSION = '0.0.938'
15
15
  end
data/lib/zernio-sdk.rb CHANGED
@@ -589,6 +589,7 @@ require 'zernio-sdk/models/get_ad_account_finance200_response'
589
589
  require 'zernio-sdk/models/get_ad_account_finance200_response_funding_source'
590
590
  require 'zernio-sdk/models/get_ad_analytics202_response'
591
591
  require 'zernio-sdk/models/get_ad_audience200_response'
592
+ require 'zernio-sdk/models/get_ad_campaign_details200_response'
592
593
  require 'zernio-sdk/models/get_ad_comments200_response'
593
594
  require 'zernio-sdk/models/get_ad_comments200_response_meta'
594
595
  require 'zernio-sdk/models/get_ad_comments200_response_pagination'
data/openapi.yaml CHANGED
@@ -44182,6 +44182,39 @@ paths:
44182
44182
  description: "Not a Google Ads account: the connection behind accountId resolves to another platform."
44183
44183
 
44184
44184
  /v1/ads/campaigns/{campaignId}:
44185
+ get:
44186
+ x-resource-group: "ads"
44187
+ operationId: getAdCampaignDetails
44188
+ tags: ["Ad Campaigns"]
44189
+ x-platforms: ["meta"]
44190
+ summary: 'Get live campaign details'
44191
+ description: |-
44192
+ Reads one campaign live from Meta, returned verbatim, so a caller that knows a
44193
+ campaign id no longer has to page `GET /v1/ads/campaigns` to find it. The default
44194
+ projection covers name, status, objective, buying type, bid strategy, budgets,
44195
+ spend cap, schedule and `issues_info`. `fields` is a raw-passthrough override;
44196
+ unknown fields return Meta's 400 verbatim. A campaign the resolved connection
44197
+ cannot see comes back as Meta's own 400, not a 404.
44198
+ security:
44199
+ - bearerAuth: []
44200
+ parameters:
44201
+ - { name: campaignId, in: path, required: true, schema: { type: string }, description: "Meta campaign id (platformCampaignId)." }
44202
+ - { name: accountId, in: query, required: true, schema: { type: string }, description: "Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token." }
44203
+ - { name: fields, in: query, schema: { type: string, example: 'id,name,status,daily_budget' }, description: 'Comma-separated Graph field override. Supports nested {} projections and Graph field modifiers.' }
44204
+ responses:
44205
+ '409': { $ref: '#/components/responses/AccountConnectionRequired' }
44206
+ '404': { $ref: '#/components/responses/AccountUnavailable' }
44207
+ '200':
44208
+ description: The campaign as returned by Meta
44209
+ content:
44210
+ application/json:
44211
+ schema:
44212
+ type: object
44213
+ properties:
44214
+ campaign: { type: object, description: "Raw Meta campaign; keys are the requested Graph fields." }
44215
+ '400': { $ref: '#/components/responses/BadRequest' }
44216
+ '401': { $ref: '#/components/responses/Unauthorized' }
44217
+ '501': { description: Only supported on Meta (facebook/instagram) }
44185
44218
  put:
44186
44219
  x-resource-group: "ads"
44187
44220
  operationId: updateAdCampaign
@@ -45826,6 +45859,7 @@ paths:
45826
45859
  '403':
45827
45860
  description: 'Returned with code `ads_allowance_exceeded` when the team has no payment method on file and has reached the 500 free live ads: add a card to resume.'
45828
45861
  '404': { $ref: '#/components/responses/NotFound' }
45862
+ '429': { description: "Meta admits one write per 30 seconds to a metered object, ad creatives above all. Zernio waits out two of those windows and replays the call before surfacing this, so it only appears when the object is being edited faster than that. Retry in 30 seconds." }
45829
45863
  '422': { description: "The ad has no campaign or ad group on the platform yet, the Google targeting edit asks for something that is create-only (`locations.customLocations`), or a creative field the ad's channel cannot carry: assetGroup on a non-Performance-Max ad, a Google Display field on a Search ad, a pinnedField on a Display headline, or any Google-only field on another platform. A Google creative edit that cannot reach Google at all (the ad has no `platformAdId`, or its ad account cannot be loaded) also returns 422 rather than a 200 that changed nothing." }
45830
45864
  '501': { description: "targeting or creative not supported on the platform (supported on Meta, TikTok, and LinkedIn)" }
45831
45865
  '502': { description: "Meta accepted the request then failed to produce the media (upload session, chunk transfer, processing timeout, or a response with no image hash). Inspect `platformError.reason`." }
@@ -52508,11 +52542,12 @@ paths:
52508
52542
  summary: List lead forms
52509
52543
  description: >
52510
52544
  Lists the Lead Gen forms owned by the account. Meta: forms on the
52511
- connected Facebook Page, including a Page selected on a metaads business-login connection. LinkedIn: forms owned by the ad account's
52512
- Company Page. Pass `adAccountId` (LinkedIn forms are org-owned).
52513
- Requires the Ads add-on.
52545
+ connected Facebook Page. Pass either the `metaads` ads connection (the
52546
+ Page is taken from the Facebook account linked to it) or the Facebook
52547
+ account itself. LinkedIn: forms owned by the ad account's Company Page.
52548
+ Pass `adAccountId` (LinkedIn forms are org-owned). Requires the Ads add-on.
52514
52549
  parameters:
52515
- - { name: accountId, in: query, required: true, schema: { type: string }, description: "Connected Facebook, Meta ads business-login or LinkedIn ads account ID." }
52550
+ - { name: accountId, in: query, required: true, schema: { type: string }, description: "Connected Meta ads, Facebook or LinkedIn ads account ID. A Meta ads connection resolves its Page through the Facebook account linked to the same profile." }
52516
52551
  - { name: adAccountId, in: query, schema: { type: string }, description: "LinkedIn only: the LinkedIn ad account id (used to resolve the owning organization). Required for LinkedIn." }
52517
52552
  - { name: limit, in: query, schema: { type: integer, minimum: 1, maximum: 100, default: 25 } }
52518
52553
  - { name: cursor, in: query, schema: { type: string } }
@@ -52539,9 +52574,10 @@ paths:
52539
52574
  description: >
52540
52575
  Creates a Lead Gen form. The form content goes inside
52541
52576
  `platformSpecificData` for both platforms (the shape is selected by the
52542
- accountId's platform). Meta: created on the connected Facebook Page (a
52543
- facebook account or a metaads business-login account with a selected Page)
52544
- (POST /{page-id}/leadgen_forms); the old top-level Meta fields
52577
+ accountId's platform). Meta: created on the connected Facebook Page
52578
+ (POST /{page-id}/leadgen_forms), where `accountId` may be the `metaads`
52579
+ ads connection (its Page comes from the Facebook account linked to the
52580
+ same profile) or the Facebook account itself; the old top-level Meta fields
52545
52581
  (questions, thankYou*, contextCard, …) are DEPRECATED but still
52546
52582
  accepted while platformSpecificData is absent; mixing both shapes is
52547
52583
  a 400. LinkedIn: created on the ad account's Company Page. NOT
@@ -52700,7 +52736,7 @@ paths:
52700
52736
  accountId manages: a form on any other Page is a 404, never a read.
52701
52737
  parameters:
52702
52738
  - { name: formId, in: path, required: true, schema: { type: string }, description: "Numeric form id (Meta leadgen_form id or LinkedIn leadForm id)." }
52703
- - { name: accountId, in: query, required: true, schema: { type: string }, description: "Connected facebook or linkedin ads account id (selects the platform)." }
52739
+ - { name: accountId, in: query, required: true, schema: { type: string }, description: "Connected Meta ads, facebook or linkedin ads account id (selects the platform). A Meta ads connection resolves its Page through the Facebook account linked to the same profile." }
52704
52740
  - name: fields
52705
52741
  in: query
52706
52742
  schema: { type: string, maxLength: 2000 }
@@ -52739,7 +52775,7 @@ paths:
52739
52775
  description: "Neither platform hard-deletes a form; this archives it (Meta status=ARCHIVED; LinkedIn state=ARCHIVED via PARTIAL_UPDATE). Meta forms must belong to the Page the accountId manages."
52740
52776
  parameters:
52741
52777
  - { name: formId, in: path, required: true, schema: { type: string }, description: "Numeric form id (Meta leadgen_form id or LinkedIn leadForm id)." }
52742
- - { name: accountId, in: query, required: true, schema: { type: string }, description: "Connected facebook or linkedin ads account id (selects the platform)." }
52778
+ - { name: accountId, in: query, required: true, schema: { type: string }, description: "Connected Meta ads, facebook or linkedin ads account id (selects the platform). A Meta ads connection resolves its Page through the Facebook account linked to the same profile." }
52743
52779
  responses:
52744
52780
  '200':
52745
52781
  description: Archived.
@@ -237,6 +237,20 @@ describe 'AdCampaignsApi' do
237
237
  end
238
238
  end
239
239
 
240
+ # unit tests for get_ad_campaign_details
241
+ # Get live campaign details
242
+ # Reads one campaign live from Meta, returned verbatim, so a caller that knows a campaign id no longer has to page &#x60;GET /v1/ads/campaigns&#x60; to find it. The default projection covers name, status, objective, buying type, bid strategy, budgets, spend cap, schedule and &#x60;issues_info&#x60;. &#x60;fields&#x60; is a raw-passthrough override; unknown fields return Meta&#39;s 400 verbatim. A campaign the resolved connection cannot see comes back as Meta&#39;s own 400, not a 404.
243
+ # @param campaign_id Meta campaign id (platformCampaignId).
244
+ # @param account_id Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
245
+ # @param [Hash] opts the optional parameters
246
+ # @option opts [String] :fields Comma-separated Graph field override. Supports nested {} projections and Graph field modifiers.
247
+ # @return [GetAdCampaignDetails200Response]
248
+ describe 'get_ad_campaign_details test' do
249
+ it 'should work' do
250
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
251
+ end
252
+ end
253
+
240
254
  # unit tests for get_ad_set_details
241
255
  # Get live ad-set details
242
256
  # Reads the ad set live from Meta, returned verbatim. The default projection includes &#x60;learning_stage_info&#x60; (learning-phase status: LEARNING / SUCCESS / FAIL / WAIVING; Meta omits its &#x60;status&#x60; key on paused ad sets), delivery settings, budgets, schedule and targeting. &#x60;fields&#x60; is a raw-passthrough override; unknown fields return Meta&#39;s 400 verbatim.
@@ -36,7 +36,7 @@ describe 'LeadGenApi' do
36
36
  # Archive a lead form
37
37
  # Neither platform hard-deletes a form; this archives it (Meta status&#x3D;ARCHIVED; LinkedIn state&#x3D;ARCHIVED via PARTIAL_UPDATE). Meta forms must belong to the Page the accountId manages.
38
38
  # @param form_id Numeric form id (Meta leadgen_form id or LinkedIn leadForm id).
39
- # @param account_id Connected facebook or linkedin ads account id (selects the platform).
39
+ # @param account_id Connected Meta ads, facebook or linkedin ads account id (selects the platform). A Meta ads connection resolves its Page through the Facebook account linked to the same profile.
40
40
  # @param [Hash] opts the optional parameters
41
41
  # @return [ArchiveLeadForm200Response]
42
42
  describe 'archive_lead_form test' do
@@ -47,7 +47,7 @@ describe 'LeadGenApi' do
47
47
 
48
48
  # unit tests for create_lead_form
49
49
  # Create a lead form
50
- # Creates a Lead Gen form. The form content goes inside &#x60;platformSpecificData&#x60; for both platforms (the shape is selected by the accountId&#39;s platform). Meta: created on the connected Facebook Page (a facebook account or a metaads business-login account with a selected Page) (POST /{page-id}/leadgen_forms); the old top-level Meta fields (questions, thankYou*, contextCard, …) are DEPRECATED but still accepted while platformSpecificData is absent; mixing both shapes is a 400. LinkedIn: created on the ad account&#39;s Company Page. NOT idempotent: a retry creates a second form. Meta prefilled question types (EMAIL, PHONE, FULL_NAME, …) must omit label/key; CUSTOM questions require both. LinkedIn exposes only free-text and multiple-choice questions via API (prefilled-from-profile fields are Campaign Manager UI-only). Requires the Ads add-on.
50
+ # Creates a Lead Gen form. The form content goes inside &#x60;platformSpecificData&#x60; for both platforms (the shape is selected by the accountId&#39;s platform). Meta: created on the connected Facebook Page (POST /{page-id}/leadgen_forms), where &#x60;accountId&#x60; may be the &#x60;metaads&#x60; ads connection (its Page comes from the Facebook account linked to the same profile) or the Facebook account itself; the old top-level Meta fields (questions, thankYou*, contextCard, …) are DEPRECATED but still accepted while platformSpecificData is absent; mixing both shapes is a 400. LinkedIn: created on the ad account&#39;s Company Page. NOT idempotent: a retry creates a second form. Meta prefilled question types (EMAIL, PHONE, FULL_NAME, …) must omit label/key; CUSTOM questions require both. LinkedIn exposes only free-text and multiple-choice questions via API (prefilled-from-profile fields are Campaign Manager UI-only). Requires the Ads add-on.
51
51
  # @param create_lead_form_request
52
52
  # @param [Hash] opts the optional parameters
53
53
  # @return [CreateLeadForm200Response]
@@ -74,7 +74,7 @@ describe 'LeadGenApi' do
74
74
  # Get a lead form
75
75
  # Returns the full form, including the thank-you page, so a form can be diffed against what was created. Meta forms are scoped to the Page the accountId manages: a form on any other Page is a 404, never a read.
76
76
  # @param form_id Numeric form id (Meta leadgen_form id or LinkedIn leadForm id).
77
- # @param account_id Connected facebook or linkedin ads account id (selects the platform).
77
+ # @param account_id Connected Meta ads, facebook or linkedin ads account id (selects the platform). A Meta ads connection resolves its Page through the Facebook account linked to the same profile.
78
78
  # @param [Hash] opts the optional parameters
79
79
  # @option opts [String] :fields Meta only. A Graph field selection passed through verbatim to GET /{form-id}, replacing the default projection, so fields Meta adds later are reachable without an API change. Field names, commas and {} expansion only; anything else (Graph field modifiers such as .limit(), or characters that could open another query parameter) is a 400. Ownership of the form is verified before the selection runs, so this cannot reach any Page but the one accountId manages. Unknown field names are rejected by Meta as a 400.
80
80
  # @return [GetLeadForm200Response]
@@ -102,8 +102,8 @@ describe 'LeadGenApi' do
102
102
 
103
103
  # unit tests for list_lead_forms
104
104
  # List lead forms
105
- # Lists the Lead Gen forms owned by the account. Meta: forms on the connected Facebook Page, including a Page selected on a metaads business-login connection. LinkedIn: forms owned by the ad account&#39;s Company Page. Pass &#x60;adAccountId&#x60; (LinkedIn forms are org-owned). Requires the Ads add-on.
106
- # @param account_id Connected Facebook, Meta ads business-login or LinkedIn ads account ID.
105
+ # Lists the Lead Gen forms owned by the account. Meta: forms on the connected Facebook Page. Pass either the &#x60;metaads&#x60; ads connection (the Page is taken from the Facebook account linked to it) or the Facebook account itself. LinkedIn: forms owned by the ad account&#39;s Company Page. Pass &#x60;adAccountId&#x60; (LinkedIn forms are org-owned). Requires the Ads add-on.
106
+ # @param account_id Connected Meta ads, Facebook or LinkedIn ads account ID. A Meta ads connection resolves its Page through the Facebook account linked to the same profile.
107
107
  # @param [Hash] opts the optional parameters
108
108
  # @option opts [String] :ad_account_id LinkedIn only: the LinkedIn ad account id (used to resolve the owning organization). Required for LinkedIn.
109
109
  # @option opts [Integer] :limit
@@ -0,0 +1,36 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
5
+
6
+ The version of the OpenAPI document: 1.0.4
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for Zernio::GetAdCampaignDetails200Response
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Zernio::GetAdCampaignDetails200Response do
21
+ #let(:instance) { Zernio::GetAdCampaignDetails200Response.new }
22
+
23
+ describe 'test an instance of GetAdCampaignDetails200Response' do
24
+ it 'should create an instance of GetAdCampaignDetails200Response' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(Zernio::GetAdCampaignDetails200Response)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "campaign"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ end
34
+ end
35
+
36
+ end
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: late-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.937
4
+ version: 0.0.938
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenAPI-Generator
@@ -671,6 +671,7 @@ files:
671
671
  - docs/GetAdAccountFinance200ResponseFundingSource.md
672
672
  - docs/GetAdAnalytics202Response.md
673
673
  - docs/GetAdAudience200Response.md
674
+ - docs/GetAdCampaignDetails200Response.md
674
675
  - docs/GetAdComments200Response.md
675
676
  - docs/GetAdComments200ResponseMeta.md
676
677
  - docs/GetAdComments200ResponsePagination.md
@@ -2819,6 +2820,7 @@ files:
2819
2820
  - lib/zernio-sdk/models/get_ad_account_finance200_response_funding_source.rb
2820
2821
  - lib/zernio-sdk/models/get_ad_analytics202_response.rb
2821
2822
  - lib/zernio-sdk/models/get_ad_audience200_response.rb
2823
+ - lib/zernio-sdk/models/get_ad_campaign_details200_response.rb
2822
2824
  - lib/zernio-sdk/models/get_ad_comments200_response.rb
2823
2825
  - lib/zernio-sdk/models/get_ad_comments200_response_meta.rb
2824
2826
  - lib/zernio-sdk/models/get_ad_comments200_response_pagination.rb
@@ -4924,6 +4926,7 @@ files:
4924
4926
  - spec/models/get_ad_account_finance200_response_spec.rb
4925
4927
  - spec/models/get_ad_analytics202_response_spec.rb
4926
4928
  - spec/models/get_ad_audience200_response_spec.rb
4929
+ - spec/models/get_ad_campaign_details200_response_spec.rb
4927
4930
  - spec/models/get_ad_comments200_response_meta_spec.rb
4928
4931
  - spec/models/get_ad_comments200_response_pagination_spec.rb
4929
4932
  - spec/models/get_ad_comments200_response_spec.rb
@@ -6388,7 +6391,7 @@ files:
6388
6391
  - spec/models/you_tube_video_retention_response_retention_curve_inner_spec.rb
6389
6392
  - spec/models/you_tube_video_retention_response_spec.rb
6390
6393
  - spec/spec_helper.rb
6391
- - zernio-sdk-0.0.937.gem
6394
+ - zernio-sdk-0.0.938.gem
6392
6395
  - zernio-sdk.gemspec
6393
6396
  homepage: https://openapi-generator.tech
6394
6397
  licenses:
@@ -7264,6 +7267,7 @@ test_files:
7264
7267
  - spec/models/google_business_review_reviewer_spec.rb
7265
7268
  - spec/models/bulk_update_ad_campaign_status200_response_totals_spec.rb
7266
7269
  - spec/models/x_article_entity_one_of4_spec.rb
7270
+ - spec/models/get_ad_campaign_details200_response_spec.rb
7267
7271
  - spec/models/webhook_payload_call_permission_request_spec.rb
7268
7272
  - spec/models/targeting_spec_custom_locations_inner_spec.rb
7269
7273
  - spec/models/duplicate_ad_set_request_spec.rb
Binary file