late-sdk 0.0.936 → 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.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +9 -0
  3. data/docs/AdCampaignsApi.md +76 -0
  4. data/docs/GetAdCampaignDetails200Response.md +18 -0
  5. data/docs/GetLeadForm200Response.md +2 -2
  6. data/docs/GetLeadForm200ResponseForm.md +49 -0
  7. data/docs/LeadGenApi.md +19 -13
  8. data/docs/MetaLeadForm.md +58 -0
  9. data/docs/MetaLeadFormContextCard.md +28 -0
  10. data/docs/MetaLeadFormLegalContent.md +22 -0
  11. data/docs/MetaLeadFormLegalContentPrivacyPolicy.md +20 -0
  12. data/docs/MetaLeadFormQuestionsInner.md +34 -0
  13. data/docs/MetaLeadFormThankYouPage.md +38 -0
  14. data/lib/zernio-sdk/api/ad_campaigns_api.rb +73 -0
  15. data/lib/zernio-sdk/api/lead_gen_api.rb +21 -12
  16. data/lib/zernio-sdk/models/get_ad_campaign_details200_response.rb +148 -0
  17. data/lib/zernio-sdk/models/get_lead_form200_response.rb +1 -1
  18. data/lib/zernio-sdk/models/get_lead_form200_response_form.rb +104 -0
  19. data/lib/zernio-sdk/models/meta_lead_form.rb +337 -0
  20. data/lib/zernio-sdk/models/meta_lead_form_context_card.rb +228 -0
  21. data/lib/zernio-sdk/models/meta_lead_form_legal_content.rb +167 -0
  22. data/lib/zernio-sdk/models/meta_lead_form_legal_content_privacy_policy.rb +156 -0
  23. data/lib/zernio-sdk/models/meta_lead_form_questions_inner.rb +229 -0
  24. data/lib/zernio-sdk/models/meta_lead_form_thank_you_page.rb +238 -0
  25. data/lib/zernio-sdk/version.rb +1 -1
  26. data/lib/zernio-sdk.rb +8 -0
  27. data/openapi.yaml +160 -12
  28. data/spec/api/ad_campaigns_api_spec.rb +14 -0
  29. data/spec/api/lead_gen_api_spec.rb +8 -6
  30. data/spec/models/get_ad_campaign_details200_response_spec.rb +36 -0
  31. data/spec/models/get_lead_form200_response_form_spec.rb +32 -0
  32. data/spec/models/meta_lead_form_context_card_spec.rb +70 -0
  33. data/spec/models/meta_lead_form_legal_content_privacy_policy_spec.rb +42 -0
  34. data/spec/models/meta_lead_form_legal_content_spec.rb +48 -0
  35. data/spec/models/meta_lead_form_questions_inner_spec.rb +84 -0
  36. data/spec/models/meta_lead_form_spec.rb +156 -0
  37. data/spec/models/meta_lead_form_thank_you_page_spec.rb +96 -0
  38. data/zernio-sdk-0.0.938.gem +0 -0
  39. metadata +34 -2
  40. data/zernio-sdk-0.0.936.gem +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e88e4c1a283525cb97c3aa96542117e6a6a5dc79f5f5169702ef9b9544f0301c
4
- data.tar.gz: b38003fa69e3a6bb442bb260d34be2012202efe7f86a046ad2b3397e1909694e
3
+ metadata.gz: 40472c8220c91ebe5acd2558047340cd87d8d631a7bdffbfdff8dcaaf6fd5853
4
+ data.tar.gz: 0a7e03ec8176659f62ab40134e08d76f2658ce74f05026fb27284d27eca9a955
5
5
  SHA512:
6
- metadata.gz: '0809a018c6baa5f764c95748a855277bdeb87a803e97a6d7425a5b1e7d2a7ddec24a6d7fc88e3e43c9f6bb194d4c1b39c7b95e55db3f231b3b5538bc5f5805f6'
7
- data.tar.gz: 6224f3c6cc9109a2a95c4ed9c9177d60490706dd56a397eb076fe9ae9c0038d1566cacf97ac67480e1dfeb9e854d3c97d980fcdae9dc4474ba79622b2812ef0c
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)
@@ -1540,6 +1542,7 @@ Class | Method | HTTP request | Description
1540
1542
  - [Zernio::GetIosFourteenCampaignLimits200Response](docs/GetIosFourteenCampaignLimits200Response.md)
1541
1543
  - [Zernio::GetIosFourteenCampaignLimits200ResponseLimits](docs/GetIosFourteenCampaignLimits200ResponseLimits.md)
1542
1544
  - [Zernio::GetLeadForm200Response](docs/GetLeadForm200Response.md)
1545
+ - [Zernio::GetLeadForm200ResponseForm](docs/GetLeadForm200ResponseForm.md)
1543
1546
  - [Zernio::GetLinkedInAggregateAnalytics200Response](docs/GetLinkedInAggregateAnalytics200Response.md)
1544
1547
  - [Zernio::GetLinkedInAggregateAnalytics400Response](docs/GetLinkedInAggregateAnalytics400Response.md)
1545
1548
  - [Zernio::GetLinkedInAggregateAnalytics402Response](docs/GetLinkedInAggregateAnalytics402Response.md)
@@ -2038,8 +2041,14 @@ Class | Method | HTTP request | Description
2038
2041
  - [Zernio::MediaUploadResponse](docs/MediaUploadResponse.md)
2039
2042
  - [Zernio::MetaAdsPlatformData](docs/MetaAdsPlatformData.md)
2040
2043
  - [Zernio::MetaInstagramIdentityRef](docs/MetaInstagramIdentityRef.md)
2044
+ - [Zernio::MetaLeadForm](docs/MetaLeadForm.md)
2045
+ - [Zernio::MetaLeadFormContextCard](docs/MetaLeadFormContextCard.md)
2046
+ - [Zernio::MetaLeadFormLegalContent](docs/MetaLeadFormLegalContent.md)
2047
+ - [Zernio::MetaLeadFormLegalContentPrivacyPolicy](docs/MetaLeadFormLegalContentPrivacyPolicy.md)
2041
2048
  - [Zernio::MetaLeadFormPlatformData](docs/MetaLeadFormPlatformData.md)
2042
2049
  - [Zernio::MetaLeadFormPlatformDataContextCard](docs/MetaLeadFormPlatformDataContextCard.md)
2050
+ - [Zernio::MetaLeadFormQuestionsInner](docs/MetaLeadFormQuestionsInner.md)
2051
+ - [Zernio::MetaLeadFormThankYouPage](docs/MetaLeadFormThankYouPage.md)
2043
2052
  - [Zernio::Money](docs/Money.md)
2044
2053
  - [Zernio::MoneyAmount](docs/MoneyAmount.md)
2045
2054
  - [Zernio::MoveAccountToProfile200Response](docs/MoveAccountToProfile200Response.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
+
@@ -5,7 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **status** | **String** | | [optional] |
8
- | **form** | **Object** | | [optional] |
8
+ | **form** | [**GetLeadForm200ResponseForm**](GetLeadForm200ResponseForm.md) | | [optional] |
9
9
 
10
10
  ## Example
11
11
 
@@ -13,7 +13,7 @@
13
13
  require 'zernio-sdk'
14
14
 
15
15
  instance = Zernio::GetLeadForm200Response.new(
16
- status: null,
16
+ status: success,
17
17
  form: null
18
18
  )
19
19
  ```
@@ -0,0 +1,49 @@
1
+ # Zernio::GetLeadForm200ResponseForm
2
+
3
+ ## Class instance methods
4
+
5
+ ### `openapi_one_of`
6
+
7
+ Returns the list of classes defined in oneOf.
8
+
9
+ #### Example
10
+
11
+ ```ruby
12
+ require 'zernio-sdk'
13
+
14
+ Zernio::GetLeadForm200ResponseForm.openapi_one_of
15
+ # =>
16
+ # [
17
+ # :'MetaLeadForm',
18
+ # :'Object'
19
+ # ]
20
+ ```
21
+
22
+ ### build
23
+
24
+ Find the appropriate object from the `openapi_one_of` list and casts the data into it.
25
+
26
+ #### Example
27
+
28
+ ```ruby
29
+ require 'zernio-sdk'
30
+
31
+ Zernio::GetLeadForm200ResponseForm.build(data)
32
+ # => #<MetaLeadForm:0x00007fdd4aab02a0>
33
+
34
+ Zernio::GetLeadForm200ResponseForm.build(data_that_doesnt_match)
35
+ # => nil
36
+ ```
37
+
38
+ #### Parameters
39
+
40
+ | Name | Type | Description |
41
+ | ---- | ---- | ----------- |
42
+ | **data** | **Mixed** | data to be matched against the list of oneOf items |
43
+
44
+ #### Return type
45
+
46
+ - `MetaLeadForm`
47
+ - `Object`
48
+ - `nil` (if no type matches)
49
+
data/docs/LeadGenApi.md CHANGED
@@ -19,7 +19,7 @@ All URIs are relative to *https://zernio.com/api*
19
19
 
20
20
  Archive a lead form
21
21
 
22
- Neither platform hard-deletes a form; this archives it (Meta status=ARCHIVED; LinkedIn state=ARCHIVED via PARTIAL_UPDATE).
22
+ 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.
23
23
 
24
24
  ### Examples
25
25
 
@@ -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
 
@@ -226,10 +226,12 @@ end
226
226
 
227
227
  ## get_lead_form
228
228
 
229
- > <GetLeadForm200Response> get_lead_form(form_id, account_id)
229
+ > <GetLeadForm200Response> get_lead_form(form_id, account_id, opts)
230
230
 
231
231
  Get a lead form
232
232
 
233
+ 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.
234
+
233
235
  ### Examples
234
236
 
235
237
  ```ruby
@@ -243,11 +245,14 @@ end
243
245
 
244
246
  api_instance = Zernio::LeadGenApi.new
245
247
  form_id = 'form_id_example' # String | Numeric form id (Meta leadgen_form id or LinkedIn leadForm id).
246
- 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
+ opts = {
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
+ }
247
252
 
248
253
  begin
249
254
  # Get a lead form
250
- result = api_instance.get_lead_form(form_id, account_id)
255
+ result = api_instance.get_lead_form(form_id, account_id, opts)
251
256
  p result
252
257
  rescue Zernio::ApiError => e
253
258
  puts "Error when calling LeadGenApi->get_lead_form: #{e}"
@@ -258,12 +263,12 @@ end
258
263
 
259
264
  This returns an Array which contains the response data, status code and headers.
260
265
 
261
- > <Array(<GetLeadForm200Response>, Integer, Hash)> get_lead_form_with_http_info(form_id, account_id)
266
+ > <Array(<GetLeadForm200Response>, Integer, Hash)> get_lead_form_with_http_info(form_id, account_id, opts)
262
267
 
263
268
  ```ruby
264
269
  begin
265
270
  # Get a lead form
266
- data, status_code, headers = api_instance.get_lead_form_with_http_info(form_id, account_id)
271
+ data, status_code, headers = api_instance.get_lead_form_with_http_info(form_id, account_id, opts)
267
272
  p status_code # => 2xx
268
273
  p headers # => { ... }
269
274
  p data # => <GetLeadForm200Response>
@@ -277,7 +282,8 @@ end
277
282
  | Name | Type | Description | Notes |
278
283
  | ---- | ---- | ----------- | ----- |
279
284
  | **form_id** | **String** | Numeric form id (Meta leadgen_form id or LinkedIn leadForm id). | |
280
- | **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
+ | **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] |
281
287
 
282
288
  ### Return type
283
289
 
@@ -378,7 +384,7 @@ end
378
384
 
379
385
  List lead forms
380
386
 
381
- 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.
382
388
 
383
389
  ### Examples
384
390
 
@@ -392,7 +398,7 @@ Zernio.configure do |config|
392
398
  end
393
399
 
394
400
  api_instance = Zernio::LeadGenApi.new
395
- 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.
396
402
  opts = {
397
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.
398
404
  limit: 56, # Integer |
@@ -430,7 +436,7 @@ end
430
436
 
431
437
  | Name | Type | Description | Notes |
432
438
  | ---- | ---- | ----------- | ----- |
433
- | **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. | |
434
440
  | **ad_account_id** | **String** | LinkedIn only: the LinkedIn ad account id (used to resolve the owning organization). Required for LinkedIn. | [optional] |
435
441
  | **limit** | **Integer** | | [optional][default to 25] |
436
442
  | **cursor** | **String** | | [optional] |
@@ -0,0 +1,58 @@
1
+ # Zernio::MetaLeadForm
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | | [optional] |
8
+ | **name** | **String** | | [optional] |
9
+ | **status** | **String** | One of ACTIVE, ARCHIVED, DELETED or DRAFT. | [optional] |
10
+ | **locale** | **String** | | [optional] |
11
+ | **created_time** | **Time** | | [optional] |
12
+ | **page_id** | **String** | Owning Facebook Page. A form on any other Page is a 404, whether read or archived. | [optional] |
13
+ | **leads_count** | **Integer** | | [optional] |
14
+ | **organic_leads_count** | **Integer** | | [optional] |
15
+ | **expired_leads_count** | **Integer** | Leads Meta has aged out of the retention window. | [optional] |
16
+ | **privacy_policy_url** | **String** | | [optional] |
17
+ | **follow_up_action_url** | **String** | | [optional] |
18
+ | **follow_up_action_text** | **String** | | [optional] |
19
+ | **question_page_custom_headline** | **String** | | [optional] |
20
+ | **is_optimized_for_quality** | **Boolean** | | [optional] |
21
+ | **block_display_for_non_targeted_viewer** | **Boolean** | | [optional] |
22
+ | **allow_organic_lead** | **Boolean** | Whether the form can also be submitted from an organic Page post. | [optional] |
23
+ | **tracking_parameters** | [**Array&lt;BoostPostRequestTrackingUrlTagsInner&gt;**](BoostPostRequestTrackingUrlTagsInner.md) | Custom key/value pairs attached to every lead of this form. | [optional] |
24
+ | **legal_content** | [**MetaLeadFormLegalContent**](MetaLeadFormLegalContent.md) | | [optional] |
25
+ | **context_card** | [**MetaLeadFormContextCard**](MetaLeadFormContextCard.md) | | [optional] |
26
+ | **thank_you_page** | [**MetaLeadFormThankYouPage**](MetaLeadFormThankYouPage.md) | | [optional] |
27
+ | **questions** | [**Array&lt;MetaLeadFormQuestionsInner&gt;**](MetaLeadFormQuestionsInner.md) | | [optional] |
28
+
29
+ ## Example
30
+
31
+ ```ruby
32
+ require 'zernio-sdk'
33
+
34
+ instance = Zernio::MetaLeadForm.new(
35
+ id: null,
36
+ name: null,
37
+ status: null,
38
+ locale: en_US,
39
+ created_time: null,
40
+ page_id: null,
41
+ leads_count: null,
42
+ organic_leads_count: null,
43
+ expired_leads_count: null,
44
+ privacy_policy_url: null,
45
+ follow_up_action_url: null,
46
+ follow_up_action_text: null,
47
+ question_page_custom_headline: null,
48
+ is_optimized_for_quality: null,
49
+ block_display_for_non_targeted_viewer: null,
50
+ allow_organic_lead: null,
51
+ tracking_parameters: null,
52
+ legal_content: null,
53
+ context_card: null,
54
+ thank_you_page: null,
55
+ questions: null
56
+ )
57
+ ```
58
+
@@ -0,0 +1,28 @@
1
+ # Zernio::MetaLeadFormContextCard
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | | [optional] |
8
+ | **title** | **String** | | [optional] |
9
+ | **style** | **String** | | [optional] |
10
+ | **content** | **Array&lt;String&gt;** | | [optional] |
11
+ | **button_text** | **String** | | [optional] |
12
+ | **cover_photo** | [**CreateTestLead200ResponseTestLead**](CreateTestLead200ResponseTestLead.md) | | [optional] |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'zernio-sdk'
18
+
19
+ instance = Zernio::MetaLeadFormContextCard.new(
20
+ id: null,
21
+ title: null,
22
+ style: null,
23
+ content: null,
24
+ button_text: null,
25
+ cover_photo: null
26
+ )
27
+ ```
28
+
@@ -0,0 +1,22 @@
1
+ # Zernio::MetaLeadFormLegalContent
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | | [optional] |
8
+ | **privacy_policy** | [**MetaLeadFormLegalContentPrivacyPolicy**](MetaLeadFormLegalContentPrivacyPolicy.md) | | [optional] |
9
+ | **custom_disclaimer** | **Object** | Set in Meta form builder only; there is no create parameter for it. | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'zernio-sdk'
15
+
16
+ instance = Zernio::MetaLeadFormLegalContent.new(
17
+ id: null,
18
+ privacy_policy: null,
19
+ custom_disclaimer: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,20 @@
1
+ # Zernio::MetaLeadFormLegalContentPrivacyPolicy
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **url** | **String** | | [optional] |
8
+ | **link_text** | **String** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zernio-sdk'
14
+
15
+ instance = Zernio::MetaLeadFormLegalContentPrivacyPolicy.new(
16
+ url: null,
17
+ link_text: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,34 @@
1
+ # Zernio::MetaLeadFormQuestionsInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | | [optional] |
8
+ | **key** | **String** | | [optional] |
9
+ | **label** | **String** | | [optional] |
10
+ | **type** | **String** | EMAIL, PHONE, FULL_NAME, CUSTOM, ... | [optional] |
11
+ | **inline_context** | **String** | | [optional] |
12
+ | **options** | [**Array&lt;BoostPostRequestTrackingUrlTagsInner&gt;**](BoostPostRequestTrackingUrlTagsInner.md) | | [optional] |
13
+ | **conditional_questions_group_id** | **String** | READ-ONLY. Conditional logic can only be authored in Meta form builder; Meta has no create parameter for it. | [optional] |
14
+ | **conditional_questions_choices** | **Array&lt;Object&gt;** | READ-ONLY. Which answers reveal the conditional group. | [optional] |
15
+ | **dependent_conditional_questions** | **Array&lt;Object&gt;** | READ-ONLY. Questions revealed by the conditional group. | [optional] |
16
+
17
+ ## Example
18
+
19
+ ```ruby
20
+ require 'zernio-sdk'
21
+
22
+ instance = Zernio::MetaLeadFormQuestionsInner.new(
23
+ id: null,
24
+ key: null,
25
+ label: null,
26
+ type: null,
27
+ inline_context: null,
28
+ options: null,
29
+ conditional_questions_group_id: null,
30
+ conditional_questions_choices: null,
31
+ dependent_conditional_questions: null
32
+ )
33
+ ```
34
+
@@ -0,0 +1,38 @@
1
+ # Zernio::MetaLeadFormThankYouPage
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | | [optional] |
8
+ | **title** | **String** | | [optional] |
9
+ | **body** | **String** | | [optional] |
10
+ | **button_text** | **String** | | [optional] |
11
+ | **button_type** | **String** | | [optional] |
12
+ | **website_url** | **String** | | [optional] |
13
+ | **enable_messenger** | **Boolean** | | [optional] |
14
+ | **status** | **String** | | [optional] |
15
+ | **lead_gen_use_case** | **String** | | [optional] |
16
+ | **business_phone_number** | **String** | | [optional] |
17
+ | **country_code** | **String** | | [optional] |
18
+
19
+ ## Example
20
+
21
+ ```ruby
22
+ require 'zernio-sdk'
23
+
24
+ instance = Zernio::MetaLeadFormThankYouPage.new(
25
+ id: null,
26
+ title: null,
27
+ body: null,
28
+ button_text: null,
29
+ button_type: VIEW_WEBSITE,
30
+ website_url: null,
31
+ enable_messenger: null,
32
+ status: null,
33
+ lead_gen_use_case: null,
34
+ business_phone_number: null,
35
+ country_code: null
36
+ )
37
+ ```
38
+
@@ -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).