late-sdk 0.0.628 → 0.0.630

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 (31) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -0
  3. data/docs/AdCampaignsApi.md +27 -13
  4. data/docs/AdDailyMetrics.md +1 -1
  5. data/docs/AdMetrics.md +1 -1
  6. data/docs/CreateAdCampaignRequest.md +7 -1
  7. data/docs/CreateStandaloneAdRequest.md +4 -0
  8. data/docs/CreateStandaloneAdRequestTranslationsInner.md +30 -0
  9. data/docs/CreateStandaloneAdRequestVideo.md +3 -1
  10. data/docs/GetAdsTimeline200ResponseRowsInner.md +1 -1
  11. data/docs/GetCampaignAnalytics200ResponseAnalyticsDailyInner.md +1 -1
  12. data/lib/zernio-sdk/api/ad_campaigns_api.rb +30 -2
  13. data/lib/zernio-sdk/models/ad_daily_metrics.rb +2 -2
  14. data/lib/zernio-sdk/models/ad_metrics.rb +2 -2
  15. data/lib/zernio-sdk/models/create_ad_campaign_request.rb +46 -4
  16. data/lib/zernio-sdk/models/create_standalone_ad_request.rb +51 -1
  17. data/lib/zernio-sdk/models/create_standalone_ad_request_translations_inner.rb +263 -0
  18. data/lib/zernio-sdk/models/create_standalone_ad_request_video.rb +12 -19
  19. data/lib/zernio-sdk/models/get_ads_timeline200_response_rows_inner.rb +2 -2
  20. data/lib/zernio-sdk/models/get_campaign_analytics200_response_analytics_daily_inner.rb +2 -2
  21. data/lib/zernio-sdk/version.rb +1 -1
  22. data/lib/zernio-sdk.rb +1 -0
  23. data/openapi.yaml +95 -5
  24. data/spec/api/ad_campaigns_api_spec.rb +5 -1
  25. data/spec/models/create_ad_campaign_request_spec.rb +22 -0
  26. data/spec/models/create_standalone_ad_request_spec.rb +12 -0
  27. data/spec/models/create_standalone_ad_request_translations_inner_spec.rb +72 -0
  28. data/spec/models/create_standalone_ad_request_video_spec.rb +6 -0
  29. data/zernio-sdk-0.0.630.gem +0 -0
  30. metadata +6 -2
  31. data/zernio-sdk-0.0.628.gem +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fb3a36da617e2797bb6d0d284c6d49a9e1c6eceacf59344855db2f5fc59842dc
4
- data.tar.gz: e8a14eb77fb4f7aff571448016d2ea9cdefa368d53d6924e0f218c10bbc95b19
3
+ metadata.gz: 3ee8170329c2bab7ac4cd1ffbcb49c451b12b664f75cf0c19c49b42a252d4d28
4
+ data.tar.gz: 330c5e8841706919d35a79c056800fbaaeda22e9babd1c631973d53e06c78beb
5
5
  SHA512:
6
- metadata.gz: f988c0fb3137cdcaac15195aff6011bc6cdc87499262c1801e7abac380fdc6115a5f49d1b9eff49b6e444c691271750bcd998d5b30ba5c11f5e4633331dafb6c
7
- data.tar.gz: 7727c62c02377e594b7ede16ed5af3f965b7f911b6b8740e8e5315ba9085ca1266b8790ea51ed69624faede9c6c956c283dc3810d44283885100f2a5fa8ce0a9
6
+ metadata.gz: 1a0eb796306396b600f0d10e5e9f30cbb419c51be1ea43e15d529d1f2ed699d1b985c2249470f1d037f08e2d74c62da6bd1041970c9f747e6e7279f9e44ac632
7
+ data.tar.gz: 44683ab22f569dca906e054528d86c0fc608accaa3fb117174cbe8505f4bf2130cf51eb8be6c4230b5687738709f57697019d4a72521adf89ad2eadd1d4a79e0
data/README.md CHANGED
@@ -861,6 +861,7 @@ Class | Method | HTTP request | Description
861
861
  - [Zernio::CreateStandaloneAdRequestPromotedObject](docs/CreateStandaloneAdRequestPromotedObject.md)
862
862
  - [Zernio::CreateStandaloneAdRequestRegionsInner](docs/CreateStandaloneAdRequestRegionsInner.md)
863
863
  - [Zernio::CreateStandaloneAdRequestTracking](docs/CreateStandaloneAdRequestTracking.md)
864
+ - [Zernio::CreateStandaloneAdRequestTranslationsInner](docs/CreateStandaloneAdRequestTranslationsInner.md)
864
865
  - [Zernio::CreateStandaloneAdRequestVideo](docs/CreateStandaloneAdRequestVideo.md)
865
866
  - [Zernio::CreateTestLead200Response](docs/CreateTestLead200Response.md)
866
867
  - [Zernio::CreateTestLead200ResponseTestLead](docs/CreateTestLead200ResponseTestLead.md)
@@ -168,11 +168,11 @@ end
168
168
 
169
169
  ## create_ad_campaign
170
170
 
171
- > <CreateAdCampaign201Response> create_ad_campaign(create_ad_campaign_request)
171
+ > <CreateAdCampaign201Response> create_ad_campaign(create_ad_campaign_request, opts)
172
172
 
173
173
  Create a standalone campaign
174
174
 
175
- Creates a campaign WITHOUT its first ad set / ad (the ODAX shell only). Ad sets join it later via `existingCampaignId` on the create endpoints. A budget here is campaign-level (CBO) by definition; omit it for ABO (each ad set carries its own budget). Created `PAUSED` unless `status: ACTIVE`. The campaign materializes in `/v1/ads/tree` via the next sync discovery pass.
175
+ Creates a campaign WITHOUT its first ad set / ad (the ODAX shell only). Ad sets join it later via `existingCampaignId` on the create endpoints. A budget here is campaign-level (CBO) by definition; omit it for ABO (each ad set carries its own budget). Created `PAUSED` unless `status: ACTIVE`. The campaign materializes in `/v1/ads/tree` via the next sync discovery pass. **Idempotency:** send an `Idempotency-Key` header to make retries safe.
176
176
 
177
177
  ### Examples
178
178
 
@@ -187,10 +187,13 @@ end
187
187
 
188
188
  api_instance = Zernio::AdCampaignsApi.new
189
189
  create_ad_campaign_request = Zernio::CreateAdCampaignRequest.new({account_id: 'account_id_example', ad_account_id: 'ad_account_id_example', name: 'name_example', goal: 'engagement'}) # CreateAdCampaignRequest |
190
+ opts = {
191
+ idempotency_key: 'idempotency_key_example' # String | Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. Only 2xx responses are stored, so a request that failed with a 4xx can be retried with a corrected body under the SAME key.
192
+ }
190
193
 
191
194
  begin
192
195
  # Create a standalone campaign
193
- result = api_instance.create_ad_campaign(create_ad_campaign_request)
196
+ result = api_instance.create_ad_campaign(create_ad_campaign_request, opts)
194
197
  p result
195
198
  rescue Zernio::ApiError => e
196
199
  puts "Error when calling AdCampaignsApi->create_ad_campaign: #{e}"
@@ -201,12 +204,12 @@ end
201
204
 
202
205
  This returns an Array which contains the response data, status code and headers.
203
206
 
204
- > <Array(<CreateAdCampaign201Response>, Integer, Hash)> create_ad_campaign_with_http_info(create_ad_campaign_request)
207
+ > <Array(<CreateAdCampaign201Response>, Integer, Hash)> create_ad_campaign_with_http_info(create_ad_campaign_request, opts)
205
208
 
206
209
  ```ruby
207
210
  begin
208
211
  # Create a standalone campaign
209
- data, status_code, headers = api_instance.create_ad_campaign_with_http_info(create_ad_campaign_request)
212
+ data, status_code, headers = api_instance.create_ad_campaign_with_http_info(create_ad_campaign_request, opts)
210
213
  p status_code # => 2xx
211
214
  p headers # => { ... }
212
215
  p data # => <CreateAdCampaign201Response>
@@ -220,6 +223,7 @@ end
220
223
  | Name | Type | Description | Notes |
221
224
  | ---- | ---- | ----------- | ----- |
222
225
  | **create_ad_campaign_request** | [**CreateAdCampaignRequest**](CreateAdCampaignRequest.md) | | |
226
+ | **idempotency_key** | **String** | Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. Only 2xx responses are stored, so a request that failed with a 4xx can be retried with a corrected body under the SAME key. | [optional] |
223
227
 
224
228
  ### Return type
225
229
 
@@ -470,6 +474,7 @@ end
470
474
  api_instance = Zernio::AdCampaignsApi.new
471
475
  ad_id = 'ad_id_example' # String | Zernio ad ID or platform ad ID
472
476
  opts = {
477
+ idempotency_key: 'idempotency_key_example', # String | Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. Only 2xx responses are stored, so a request that failed with a 4xx can be retried with a corrected body under the SAME key.
473
478
  duplicate_ad_request: Zernio::DuplicateAdRequest.new # DuplicateAdRequest |
474
479
  }
475
480
 
@@ -505,6 +510,7 @@ end
505
510
  | Name | Type | Description | Notes |
506
511
  | ---- | ---- | ----------- | ----- |
507
512
  | **ad_id** | **String** | Zernio ad ID or platform ad ID | |
513
+ | **idempotency_key** | **String** | Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. Only 2xx responses are stored, so a request that failed with a 4xx can be retried with a corrected body under the SAME key. | [optional] |
508
514
  | **duplicate_ad_request** | [**DuplicateAdRequest**](DuplicateAdRequest.md) | | [optional] |
509
515
 
510
516
  ### Return type
@@ -523,7 +529,7 @@ end
523
529
 
524
530
  ## duplicate_ad_campaign
525
531
 
526
- > <DuplicateAdCampaign200Response> duplicate_ad_campaign(campaign_id, duplicate_ad_campaign_request)
532
+ > <DuplicateAdCampaign200Response> duplicate_ad_campaign(campaign_id, duplicate_ad_campaign_request, opts)
527
533
 
528
534
  Duplicate a campaign
529
535
 
@@ -543,10 +549,13 @@ end
543
549
  api_instance = Zernio::AdCampaignsApi.new
544
550
  campaign_id = 'campaign_id_example' # String | Source platform campaign ID
545
551
  duplicate_ad_campaign_request = Zernio::DuplicateAdCampaignRequest.new({platform: 'facebook'}) # DuplicateAdCampaignRequest |
552
+ opts = {
553
+ idempotency_key: 'idempotency_key_example' # String | Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. Only 2xx responses are stored, so a request that failed with a 4xx can be retried with a corrected body under the SAME key.
554
+ }
546
555
 
547
556
  begin
548
557
  # Duplicate a campaign
549
- result = api_instance.duplicate_ad_campaign(campaign_id, duplicate_ad_campaign_request)
558
+ result = api_instance.duplicate_ad_campaign(campaign_id, duplicate_ad_campaign_request, opts)
550
559
  p result
551
560
  rescue Zernio::ApiError => e
552
561
  puts "Error when calling AdCampaignsApi->duplicate_ad_campaign: #{e}"
@@ -557,12 +566,12 @@ end
557
566
 
558
567
  This returns an Array which contains the response data, status code and headers.
559
568
 
560
- > <Array(<DuplicateAdCampaign200Response>, Integer, Hash)> duplicate_ad_campaign_with_http_info(campaign_id, duplicate_ad_campaign_request)
569
+ > <Array(<DuplicateAdCampaign200Response>, Integer, Hash)> duplicate_ad_campaign_with_http_info(campaign_id, duplicate_ad_campaign_request, opts)
561
570
 
562
571
  ```ruby
563
572
  begin
564
573
  # Duplicate a campaign
565
- data, status_code, headers = api_instance.duplicate_ad_campaign_with_http_info(campaign_id, duplicate_ad_campaign_request)
574
+ data, status_code, headers = api_instance.duplicate_ad_campaign_with_http_info(campaign_id, duplicate_ad_campaign_request, opts)
566
575
  p status_code # => 2xx
567
576
  p headers # => { ... }
568
577
  p data # => <DuplicateAdCampaign200Response>
@@ -577,6 +586,7 @@ end
577
586
  | ---- | ---- | ----------- | ----- |
578
587
  | **campaign_id** | **String** | Source platform campaign ID | |
579
588
  | **duplicate_ad_campaign_request** | [**DuplicateAdCampaignRequest**](DuplicateAdCampaignRequest.md) | | |
589
+ | **idempotency_key** | **String** | Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. Only 2xx responses are stored, so a request that failed with a 4xx can be retried with a corrected body under the SAME key. | [optional] |
580
590
 
581
591
  ### Return type
582
592
 
@@ -594,7 +604,7 @@ end
594
604
 
595
605
  ## duplicate_ad_set
596
606
 
597
- > <DuplicateAdSet200Response> duplicate_ad_set(ad_set_id, duplicate_ad_set_request)
607
+ > <DuplicateAdSet200Response> duplicate_ad_set(ad_set_id, duplicate_ad_set_request, opts)
598
608
 
599
609
  Duplicate an ad set
600
610
 
@@ -614,10 +624,13 @@ end
614
624
  api_instance = Zernio::AdCampaignsApi.new
615
625
  ad_set_id = 'ad_set_id_example' # String | Source platform ad set ID
616
626
  duplicate_ad_set_request = Zernio::DuplicateAdSetRequest.new({platform: 'facebook'}) # DuplicateAdSetRequest |
627
+ opts = {
628
+ idempotency_key: 'idempotency_key_example' # String | Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. Only 2xx responses are stored, so a request that failed with a 4xx can be retried with a corrected body under the SAME key.
629
+ }
617
630
 
618
631
  begin
619
632
  # Duplicate an ad set
620
- result = api_instance.duplicate_ad_set(ad_set_id, duplicate_ad_set_request)
633
+ result = api_instance.duplicate_ad_set(ad_set_id, duplicate_ad_set_request, opts)
621
634
  p result
622
635
  rescue Zernio::ApiError => e
623
636
  puts "Error when calling AdCampaignsApi->duplicate_ad_set: #{e}"
@@ -628,12 +641,12 @@ end
628
641
 
629
642
  This returns an Array which contains the response data, status code and headers.
630
643
 
631
- > <Array(<DuplicateAdSet200Response>, Integer, Hash)> duplicate_ad_set_with_http_info(ad_set_id, duplicate_ad_set_request)
644
+ > <Array(<DuplicateAdSet200Response>, Integer, Hash)> duplicate_ad_set_with_http_info(ad_set_id, duplicate_ad_set_request, opts)
632
645
 
633
646
  ```ruby
634
647
  begin
635
648
  # Duplicate an ad set
636
- data, status_code, headers = api_instance.duplicate_ad_set_with_http_info(ad_set_id, duplicate_ad_set_request)
649
+ data, status_code, headers = api_instance.duplicate_ad_set_with_http_info(ad_set_id, duplicate_ad_set_request, opts)
637
650
  p status_code # => 2xx
638
651
  p headers # => { ... }
639
652
  p data # => <DuplicateAdSet200Response>
@@ -648,6 +661,7 @@ end
648
661
  | ---- | ---- | ----------- | ----- |
649
662
  | **ad_set_id** | **String** | Source platform ad set ID | |
650
663
  | **duplicate_ad_set_request** | [**DuplicateAdSetRequest**](DuplicateAdSetRequest.md) | | |
664
+ | **idempotency_key** | **String** | Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. Only 2xx responses are stored, so a request that failed with a 4xx can be retried with a corrected body under the SAME key. | [optional] |
651
665
 
652
666
  ### Return type
653
667
 
@@ -12,7 +12,7 @@
12
12
  | **cpc** | **Float** | Cost per click | [optional] |
13
13
  | **cpm** | **Float** | Cost per 1000 impressions | [optional] |
14
14
  | **engagement** | **Integer** | | [optional] |
15
- | **conversions** | **Integer** | Count of conversion events over the requested date range. Meta: events matching the campaign&#39;s promoted_object.custom_event_type (PURCHASE, LEAD, etc.). Google: the account&#39;s tracked conversions. X and LinkedIn: their reported website/lead conversions (added 2026-07). 0 for non-conversion campaigns or when no events have fired. | [optional] |
15
+ | **conversions** | **Float** | Count of conversion events over the requested date range. FRACTIONAL: attribution splits one conversion across touchpoints and Google additionally reports modeled conversions, so values like 0.347 are normal. Meta: events matching the campaign&#39;s promoted_object.custom_event_type (PURCHASE, LEAD, etc.). Google: the account&#39;s tracked conversions. X and LinkedIn: their reported website/lead conversions (added 2026-07). 0 for non-conversion campaigns or when no events have fired. | [optional] |
16
16
  | **cost_per_conversion** | **Float** | Derived spend / conversions in the same currency as spend. 0 when conversions is 0. | [optional] |
17
17
  | **actions** | **Hash&lt;String, Integer&gt;** | Per-action-type counts summed over the date range, keyed by the platform&#39;s action-type names. Meta: raw Insights action_type keys (link_click, offsite_conversion.fb_pixel_purchase, onsite_conversion.lead_grouped, ...) — both engagement and conversion events. X: conversion types (purchase, sign_up, site_visit, download, custom). LinkedIn: conversion types (post_click, post_view, lead_gen). Google returns {} (its per-action names aren&#39;t synced per ad). Empty object when no actions are reported. NOTE: keys differ by platform, so branch on the ad&#39;s platform when interpreting them. | [optional] |
18
18
  | **action_values** | **Hash&lt;String, Float&gt;** | Monetary mirror of &#x60;actions&#x60;, from Meta&#39;s Insights &#x60;action_values[]&#x60; array. Same keying — values are the revenue attributed to each action_type, in ad-account native currency (same unit as &#x60;spend&#x60;; see the campaign node&#39;s &#x60;currency&#x60; field). Use this to compute revenue-per-event (e.g. avg purchase value). Meta-only; other platforms return {}. | [optional] |
data/docs/AdMetrics.md CHANGED
@@ -12,7 +12,7 @@
12
12
  | **cpc** | **Float** | Cost per click | [optional] |
13
13
  | **cpm** | **Float** | Cost per 1000 impressions | [optional] |
14
14
  | **engagement** | **Integer** | | [optional] |
15
- | **conversions** | **Integer** | Count of conversion events over the requested date range. Meta: events matching the campaign&#39;s promoted_object.custom_event_type (PURCHASE, LEAD, etc.). Google: the account&#39;s tracked conversions. X and LinkedIn: their reported website/lead conversions (added 2026-07). 0 for non-conversion campaigns or when no events have fired. | [optional] |
15
+ | **conversions** | **Float** | Count of conversion events over the requested date range. FRACTIONAL: attribution splits one conversion across touchpoints and Google additionally reports modeled conversions, so values like 0.347 are normal. Meta: events matching the campaign&#39;s promoted_object.custom_event_type (PURCHASE, LEAD, etc.). Google: the account&#39;s tracked conversions. X and LinkedIn: their reported website/lead conversions (added 2026-07). 0 for non-conversion campaigns or when no events have fired. | [optional] |
16
16
  | **cost_per_conversion** | **Float** | Derived spend / conversions in the same currency as spend. 0 when conversions is 0. | [optional] |
17
17
  | **actions** | **Hash&lt;String, Integer&gt;** | Per-action-type counts summed over the date range, keyed by the platform&#39;s action-type names. Meta: raw Insights action_type keys (link_click, offsite_conversion.fb_pixel_purchase, onsite_conversion.lead_grouped, ...) — both engagement and conversion events. X: conversion types (purchase, sign_up, site_visit, download, custom). LinkedIn: conversion types (post_click, post_view, lead_gen). Google returns {} (its per-action names aren&#39;t synced per ad). Empty object when no actions are reported. NOTE: keys differ by platform, so branch on the ad&#39;s platform when interpreting them. | [optional] |
18
18
  | **action_values** | **Hash&lt;String, Float&gt;** | Monetary mirror of &#x60;actions&#x60;, from Meta&#39;s Insights &#x60;action_values[]&#x60; array. Same keying — values are the revenue attributed to each action_type, in ad-account native currency (same unit as &#x60;spend&#x60;; see the campaign node&#39;s &#x60;currency&#x60; field). Use this to compute revenue-per-event (e.g. avg purchase value). Meta-only; other platforms return {}. | [optional] |
@@ -12,6 +12,9 @@
12
12
  | **budget_amount** | **Float** | Campaign-level (CBO) budget in whole currency units. Requires budgetType. | [optional] |
13
13
  | **budget_type** | **String** | | [optional] |
14
14
  | **status** | **String** | | [optional][default to &#39;PAUSED&#39;] |
15
+ | **bid_strategy** | **String** | Campaign bid strategy. Meta puts &#x60;bid_strategy&#x60; where the budget lives, so this applies only alongside a campaign budget (CBO). Previously settable only via &#x60;PUT /v1/ads/campaigns/{campaignId}&#x60;. | [optional] |
16
+ | **bid_amount** | **Float** | Whole currency units (USD: 5 &#x3D; $5.00). Required for LOWEST_COST_WITH_BID_CAP and COST_CAP; ignored otherwise. | [optional] |
17
+ | **roas_average_floor** | **Float** | Decimal ROAS multiplier (2.0 &#x3D; 2.0x). Required for LOWEST_COST_WITH_MIN_ROAS. | [optional] |
15
18
 
16
19
  ## Example
17
20
 
@@ -26,7 +29,10 @@ instance = Zernio::CreateAdCampaignRequest.new(
26
29
  special_ad_categories: null,
27
30
  budget_amount: null,
28
31
  budget_type: null,
29
- status: null
32
+ status: null,
33
+ bid_strategy: null,
34
+ bid_amount: null,
35
+ roas_average_floor: null
30
36
  )
31
37
  ```
32
38
 
@@ -63,6 +63,8 @@
63
63
  | **instagram_account_id** | **String** | Meta only. Override the Instagram account the ad is delivered as — pass an Instagram Business Account ID (e.g. 17841...), mapped to the creative&#39;s &#x60;instagram_user_id&#x60;. When omitted we auto-resolve the IG account linked to the connected Facebook Page (the existing default). Useful when a Page has more than one eligible IG account. | [optional] |
64
64
  | **dynamic_creative** | [**CreateStandaloneAdRequestDynamicCreative**](CreateStandaloneAdRequestDynamicCreative.md) | | [optional] |
65
65
  | **carousel_cards** | [**Array&lt;CreateStandaloneAdRequestCarouselCardsInner&gt;**](CreateStandaloneAdRequestCarouselCardsInner.md) | Meta only. Hand-built carousel: 2-10 authored cards in DETERMINISTIC order, mapped to the creative&#39;s &#x60;link_data.child_attachments&#x60;. Unlike &#x60;dynamicCreative&#x60;, you control the card order and per-card copy/link. Requires top-level &#x60;body&#x60;, &#x60;linkUrl&#x60; and &#x60;callToAction&#x60;. Mutually exclusive with &#x60;imageUrl&#x60;/&#x60;video&#x60;, &#x60;creatives[]&#x60;, &#x60;dynamicCreative&#x60;, &#x60;placementAssets&#x60;, &#x60;existingCreativeId&#x60;, &#x60;adSetId&#x60;, &#x60;leadGenFormId&#x60; and goal &#x60;catalog_sales&#x60;. | [optional] |
66
+ | **default_locale** | **String** | Meta only. Language the top-level copy is written in (e.g. &#x60;en&#x60;, &#x60;pt_BR&#x60;), used by the &#x60;translations&#x60; default rule. Defaults to &#x60;en&#x60;. Meta rejects a language asset feed whose default rule carries no locales of its own. | [optional] |
67
+ | **translations** | [**Array&lt;CreateStandaloneAdRequestTranslationsInner&gt;**](CreateStandaloneAdRequestTranslationsInner.md) | Meta only. Multi-language ads (Dynamic Language Optimization): ONE ad carrying per-locale copy and, optionally, per-locale media — the \&quot;Languages\&quot; toggle in Ads Manager. Keeps social proof (likes/comments/shares) on a SINGLE post instead of splitting it across one ad per language. The ad&#39;s top-level copy and media are the DEFAULT every unlisted locale falls back to, and a variant inherits any field it omits, so send only what differs per language. Media shared across languages is uploaded once. Mutually exclusive with &#x60;dynamicCreative&#x60;, &#x60;placementAssets&#x60;, &#x60;carouselCards&#x60; and &#x60;existingCreativeId&#x60; — Meta allows one &#x60;asset_feed_spec&#x60; shape per creative. | [optional] |
66
68
  | **placement_assets** | [**CreateStandaloneAdRequestPlacementAssets**](CreateStandaloneAdRequestPlacementAssets.md) | | [optional] |
67
69
  | **audience_id** | **String** | Custom audience ID for targeting | [optional] |
68
70
  | **campaign_type** | **String** | Google only | [optional][default to &#39;display&#39;] |
@@ -147,6 +149,8 @@ instance = Zernio::CreateStandaloneAdRequest.new(
147
149
  instagram_account_id: null,
148
150
  dynamic_creative: null,
149
151
  carousel_cards: null,
152
+ default_locale: null,
153
+ translations: null,
150
154
  placement_assets: null,
151
155
  audience_id: null,
152
156
  campaign_type: null,
@@ -0,0 +1,30 @@
1
+ # Zernio::CreateStandaloneAdRequestTranslationsInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **locale** | **String** | Language code, resolved to Meta&#39;s numeric locale id. Bare codes target the &#39;(All)&#39; umbrella (&#x60;es&#x60; &#x3D; every Spanish variant); region-qualified codes target the variant (&#x60;pt_BR&#x60;, &#x60;en_GB&#x60;). | |
8
+ | **headline** | **String** | Headline for this language. Inherits the top-level &#x60;headline&#x60; when omitted. | [optional] |
9
+ | **body** | **String** | Primary text for this language. Inherits the top-level &#x60;body&#x60; when omitted. | [optional] |
10
+ | **description** | **String** | Link description for this language. Inherits the top-level &#x60;description&#x60; when omitted. | [optional] |
11
+ | **image_url** | **String** | Image for this language. Inherits the ad&#39;s &#x60;imageUrl&#x60; when omitted. The feed is all-image OR all-video. | [optional] |
12
+ | **video_url** | **String** | Video for this language. Inherits the ad&#39;s &#x60;video.url&#x60; when omitted. The feed is all-image OR all-video. | [optional] |
13
+ | **thumbnail_url** | **String** | Poster frame for this language&#39;s video. | [optional] |
14
+
15
+ ## Example
16
+
17
+ ```ruby
18
+ require 'zernio-sdk'
19
+
20
+ instance = Zernio::CreateStandaloneAdRequestTranslationsInner.new(
21
+ locale: null,
22
+ headline: null,
23
+ body: null,
24
+ description: null,
25
+ image_url: null,
26
+ video_url: null,
27
+ thumbnail_url: null
28
+ )
29
+ ```
30
+
@@ -4,7 +4,8 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **url** | **String** | Public URL of the video. Meta: uploaded via chunked transfer on /act_X/advideos, then the request blocks on Meta&#39;s transcoding until status.video_status &#x3D;&#x3D;&#x3D; &#39;ready&#39;. LinkedIn: uploaded via the Videos API (multipart), then the request blocks until LinkedIn finishes transcoding (status AVAILABLE) — short clips take ~10-30s. | |
7
+ | **url** | **String** | Public URL of the video. Meta: uploaded via chunked transfer on /act_X/advideos, then the request blocks on Meta&#39;s transcoding until status.video_status &#x3D;&#x3D;&#x3D; &#39;ready&#39;. LinkedIn: uploaded via the Videos API (multipart), then the request blocks until LinkedIn finishes transcoding (status AVAILABLE) — short clips take ~10-30s. Provide either &#x60;url&#x60; or &#x60;id&#x60;. | [optional] |
8
+ | **id** | **String** | Meta only. Reuse a video ALREADY uploaded to this ad account instead of re-uploading the file: pass the &#x60;videoId&#x60; returned by a previous create. Wins over &#x60;url&#x60;, so N ads that differ only in copy share one upload (&#x60;existingCreativeId&#x60; only covers the identical-copy case). Provide either &#x60;url&#x60; or &#x60;id&#x60;. | [optional] |
8
9
  | **thumbnail_url** | **String** | Public URL of a still-image thumbnail for the video. OPTIONAL: when omitted on Meta, the poster is auto-generated from Meta&#39;s own preferred video thumbnail (the same candidates Ads Manager shows), so video ads publish without supplying one. Provide it to control the poster frame exactly (uploaded as an ad image and referenced in object_story_spec.video_data). Ignored by LinkedIn (auto-generated poster frame). | [optional] |
9
10
 
10
11
  ## Example
@@ -14,6 +15,7 @@ require 'zernio-sdk'
14
15
 
15
16
  instance = Zernio::CreateStandaloneAdRequestVideo.new(
16
17
  url: null,
18
+ id: null,
17
19
  thumbnail_url: null
18
20
  )
19
21
  ```
@@ -13,7 +13,7 @@
13
13
  | **ctr** | **Float** | Click-through rate as a percentage (0–100). | [optional] |
14
14
  | **cpc** | **Float** | Cost per click in native currency. | [optional] |
15
15
  | **cpm** | **Float** | Cost per 1000 impressions in native currency. | [optional] |
16
- | **conversions** | **Integer** | Sum of conversion events over the range. Meta: events matching the campaign optimization goal. Google: tracked conversions. X / LinkedIn: reported website/lead conversions (added 2026-07). | [optional] |
16
+ | **conversions** | **Float** | Sum of conversion events over the range. Fractional values are normal (attribution splitting + Google modeled conversions). Meta: events matching the campaign optimization goal. Google: tracked conversions. X / LinkedIn: reported website/lead conversions (added 2026-07). | [optional] |
17
17
  | **cost_per_conversion** | **Float** | | [optional] |
18
18
  | **actions** | **Hash&lt;String, Float&gt;** | Per-action-type counts merged across all ads on this day. Keys are platform-native action types. | [optional] |
19
19
  | **action_values** | **Hash&lt;String, Float&gt;** | Monetary mirror of &#x60;actions&#x60; in native currency. | [optional] |
@@ -12,7 +12,7 @@
12
12
  | **cpc** | **Float** | Cost per click | [optional] |
13
13
  | **cpm** | **Float** | Cost per 1000 impressions | [optional] |
14
14
  | **engagement** | **Integer** | | [optional] |
15
- | **conversions** | **Integer** | Count of conversion events over the requested date range. Meta: events matching the campaign&#39;s promoted_object.custom_event_type (PURCHASE, LEAD, etc.). Google: the account&#39;s tracked conversions. X and LinkedIn: their reported website/lead conversions (added 2026-07). 0 for non-conversion campaigns or when no events have fired. | [optional] |
15
+ | **conversions** | **Float** | Count of conversion events over the requested date range. FRACTIONAL: attribution splits one conversion across touchpoints and Google additionally reports modeled conversions, so values like 0.347 are normal. Meta: events matching the campaign&#39;s promoted_object.custom_event_type (PURCHASE, LEAD, etc.). Google: the account&#39;s tracked conversions. X and LinkedIn: their reported website/lead conversions (added 2026-07). 0 for non-conversion campaigns or when no events have fired. | [optional] |
16
16
  | **cost_per_conversion** | **Float** | Derived spend / conversions in the same currency as spend. 0 when conversions is 0. | [optional] |
17
17
  | **actions** | **Hash&lt;String, Integer&gt;** | Per-action-type counts summed over the date range, keyed by the platform&#39;s action-type names. Meta: raw Insights action_type keys (link_click, offsite_conversion.fb_pixel_purchase, onsite_conversion.lead_grouped, ...) — both engagement and conversion events. X: conversion types (purchase, sign_up, site_visit, download, custom). LinkedIn: conversion types (post_click, post_view, lead_gen). Google returns {} (its per-action names aren&#39;t synced per ad). Empty object when no actions are reported. NOTE: keys differ by platform, so branch on the ad&#39;s platform when interpreting them. | [optional] |
18
18
  | **action_values** | **Hash&lt;String, Float&gt;** | Monetary mirror of &#x60;actions&#x60;, from Meta&#39;s Insights &#x60;action_values[]&#x60; array. Same keying — values are the revenue attributed to each action_type, in ad-account native currency (same unit as &#x60;spend&#x60;; see the campaign node&#39;s &#x60;currency&#x60; field). Use this to compute revenue-per-event (e.g. avg purchase value). Meta-only; other platforms return {}. | [optional] |
@@ -156,9 +156,10 @@ module Zernio
156
156
  end
157
157
 
158
158
  # Create a standalone campaign
159
- # Creates a campaign WITHOUT its first ad set / ad (the ODAX shell only). Ad sets join it later via `existingCampaignId` on the create endpoints. A budget here is campaign-level (CBO) by definition; omit it for ABO (each ad set carries its own budget). Created `PAUSED` unless `status: ACTIVE`. The campaign materializes in `/v1/ads/tree` via the next sync discovery pass.
159
+ # Creates a campaign WITHOUT its first ad set / ad (the ODAX shell only). Ad sets join it later via `existingCampaignId` on the create endpoints. A budget here is campaign-level (CBO) by definition; omit it for ABO (each ad set carries its own budget). Created `PAUSED` unless `status: ACTIVE`. The campaign materializes in `/v1/ads/tree` via the next sync discovery pass. **Idempotency:** send an `Idempotency-Key` header to make retries safe.
160
160
  # @param create_ad_campaign_request [CreateAdCampaignRequest]
161
161
  # @param [Hash] opts the optional parameters
162
+ # @option opts [String] :idempotency_key Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. Only 2xx responses are stored, so a request that failed with a 4xx can be retried with a corrected body under the SAME key.
162
163
  # @return [CreateAdCampaign201Response]
163
164
  def create_ad_campaign(create_ad_campaign_request, opts = {})
164
165
  data, _status_code, _headers = create_ad_campaign_with_http_info(create_ad_campaign_request, opts)
@@ -166,9 +167,10 @@ module Zernio
166
167
  end
167
168
 
168
169
  # Create a standalone campaign
169
- # Creates a campaign WITHOUT its first ad set / ad (the ODAX shell only). Ad sets join it later via &#x60;existingCampaignId&#x60; on the create endpoints. A budget here is campaign-level (CBO) by definition; omit it for ABO (each ad set carries its own budget). Created &#x60;PAUSED&#x60; unless &#x60;status: ACTIVE&#x60;. The campaign materializes in &#x60;/v1/ads/tree&#x60; via the next sync discovery pass.
170
+ # Creates a campaign WITHOUT its first ad set / ad (the ODAX shell only). Ad sets join it later via &#x60;existingCampaignId&#x60; on the create endpoints. A budget here is campaign-level (CBO) by definition; omit it for ABO (each ad set carries its own budget). Created &#x60;PAUSED&#x60; unless &#x60;status: ACTIVE&#x60;. The campaign materializes in &#x60;/v1/ads/tree&#x60; via the next sync discovery pass. **Idempotency:** send an &#x60;Idempotency-Key&#x60; header to make retries safe.
170
171
  # @param create_ad_campaign_request [CreateAdCampaignRequest]
171
172
  # @param [Hash] opts the optional parameters
173
+ # @option opts [String] :idempotency_key Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. Only 2xx responses are stored, so a request that failed with a 4xx can be retried with a corrected body under the SAME key.
172
174
  # @return [Array<(CreateAdCampaign201Response, Integer, Hash)>] CreateAdCampaign201Response data, response status code and response headers
173
175
  def create_ad_campaign_with_http_info(create_ad_campaign_request, opts = {})
174
176
  if @api_client.config.debugging
@@ -178,6 +180,10 @@ module Zernio
178
180
  if @api_client.config.client_side_validation && create_ad_campaign_request.nil?
179
181
  fail ArgumentError, "Missing the required parameter 'create_ad_campaign_request' when calling AdCampaignsApi.create_ad_campaign"
180
182
  end
183
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
184
+ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AdCampaignsApi.create_ad_campaign, the character length must be smaller than or equal to 255.'
185
+ end
186
+
181
187
  # resource path
182
188
  local_var_path = '/v1/ads/campaigns'
183
189
 
@@ -193,6 +199,7 @@ module Zernio
193
199
  if !content_type.nil?
194
200
  header_params['Content-Type'] = content_type
195
201
  end
202
+ header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
196
203
 
197
204
  # form parameters
198
205
  form_params = opts[:form_params] || {}
@@ -439,6 +446,7 @@ module Zernio
439
446
  # Duplicates a single ad via Meta's native `POST /{ad-id}/copies`. The copy is created paused. `adSetId` retargets the copy into another ad set; omitted = the source's own ad set. Accepts the Zernio ad id or the platform ad id. Sync discovery is triggered automatically (`syncAfter: false` to skip).
440
447
  # @param ad_id [String] Zernio ad ID or platform ad ID
441
448
  # @param [Hash] opts the optional parameters
449
+ # @option opts [String] :idempotency_key Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. Only 2xx responses are stored, so a request that failed with a 4xx can be retried with a corrected body under the SAME key.
442
450
  # @option opts [DuplicateAdRequest] :duplicate_ad_request
443
451
  # @return [DuplicateAd200Response]
444
452
  def duplicate_ad(ad_id, opts = {})
@@ -450,6 +458,7 @@ module Zernio
450
458
  # Duplicates a single ad via Meta&#39;s native &#x60;POST /{ad-id}/copies&#x60;. The copy is created paused. &#x60;adSetId&#x60; retargets the copy into another ad set; omitted &#x3D; the source&#39;s own ad set. Accepts the Zernio ad id or the platform ad id. Sync discovery is triggered automatically (&#x60;syncAfter: false&#x60; to skip).
451
459
  # @param ad_id [String] Zernio ad ID or platform ad ID
452
460
  # @param [Hash] opts the optional parameters
461
+ # @option opts [String] :idempotency_key Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. Only 2xx responses are stored, so a request that failed with a 4xx can be retried with a corrected body under the SAME key.
453
462
  # @option opts [DuplicateAdRequest] :duplicate_ad_request
454
463
  # @return [Array<(DuplicateAd200Response, Integer, Hash)>] DuplicateAd200Response data, response status code and response headers
455
464
  def duplicate_ad_with_http_info(ad_id, opts = {})
@@ -460,6 +469,10 @@ module Zernio
460
469
  if @api_client.config.client_side_validation && ad_id.nil?
461
470
  fail ArgumentError, "Missing the required parameter 'ad_id' when calling AdCampaignsApi.duplicate_ad"
462
471
  end
472
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
473
+ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AdCampaignsApi.duplicate_ad, the character length must be smaller than or equal to 255.'
474
+ end
475
+
463
476
  # resource path
464
477
  local_var_path = '/v1/ads/{adId}/duplicate'.sub('{' + 'adId' + '}', CGI.escape(ad_id.to_s))
465
478
 
@@ -475,6 +488,7 @@ module Zernio
475
488
  if !content_type.nil?
476
489
  header_params['Content-Type'] = content_type
477
490
  end
491
+ header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
478
492
 
479
493
  # form parameters
480
494
  form_params = opts[:form_params] || {}
@@ -510,6 +524,7 @@ module Zernio
510
524
  # @param campaign_id [String] Source platform campaign ID
511
525
  # @param duplicate_ad_campaign_request [DuplicateAdCampaignRequest]
512
526
  # @param [Hash] opts the optional parameters
527
+ # @option opts [String] :idempotency_key Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. Only 2xx responses are stored, so a request that failed with a 4xx can be retried with a corrected body under the SAME key.
513
528
  # @return [DuplicateAdCampaign200Response]
514
529
  def duplicate_ad_campaign(campaign_id, duplicate_ad_campaign_request, opts = {})
515
530
  data, _status_code, _headers = duplicate_ad_campaign_with_http_info(campaign_id, duplicate_ad_campaign_request, opts)
@@ -521,6 +536,7 @@ module Zernio
521
536
  # @param campaign_id [String] Source platform campaign ID
522
537
  # @param duplicate_ad_campaign_request [DuplicateAdCampaignRequest]
523
538
  # @param [Hash] opts the optional parameters
539
+ # @option opts [String] :idempotency_key Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. Only 2xx responses are stored, so a request that failed with a 4xx can be retried with a corrected body under the SAME key.
524
540
  # @return [Array<(DuplicateAdCampaign200Response, Integer, Hash)>] DuplicateAdCampaign200Response data, response status code and response headers
525
541
  def duplicate_ad_campaign_with_http_info(campaign_id, duplicate_ad_campaign_request, opts = {})
526
542
  if @api_client.config.debugging
@@ -534,6 +550,10 @@ module Zernio
534
550
  if @api_client.config.client_side_validation && duplicate_ad_campaign_request.nil?
535
551
  fail ArgumentError, "Missing the required parameter 'duplicate_ad_campaign_request' when calling AdCampaignsApi.duplicate_ad_campaign"
536
552
  end
553
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
554
+ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AdCampaignsApi.duplicate_ad_campaign, the character length must be smaller than or equal to 255.'
555
+ end
556
+
537
557
  # resource path
538
558
  local_var_path = '/v1/ads/campaigns/{campaignId}/duplicate'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))
539
559
 
@@ -549,6 +569,7 @@ module Zernio
549
569
  if !content_type.nil?
550
570
  header_params['Content-Type'] = content_type
551
571
  end
572
+ header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
552
573
 
553
574
  # form parameters
554
575
  form_params = opts[:form_params] || {}
@@ -584,6 +605,7 @@ module Zernio
584
605
  # @param ad_set_id [String] Source platform ad set ID
585
606
  # @param duplicate_ad_set_request [DuplicateAdSetRequest]
586
607
  # @param [Hash] opts the optional parameters
608
+ # @option opts [String] :idempotency_key Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. Only 2xx responses are stored, so a request that failed with a 4xx can be retried with a corrected body under the SAME key.
587
609
  # @return [DuplicateAdSet200Response]
588
610
  def duplicate_ad_set(ad_set_id, duplicate_ad_set_request, opts = {})
589
611
  data, _status_code, _headers = duplicate_ad_set_with_http_info(ad_set_id, duplicate_ad_set_request, opts)
@@ -595,6 +617,7 @@ module Zernio
595
617
  # @param ad_set_id [String] Source platform ad set ID
596
618
  # @param duplicate_ad_set_request [DuplicateAdSetRequest]
597
619
  # @param [Hash] opts the optional parameters
620
+ # @option opts [String] :idempotency_key Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. Only 2xx responses are stored, so a request that failed with a 4xx can be retried with a corrected body under the SAME key.
598
621
  # @return [Array<(DuplicateAdSet200Response, Integer, Hash)>] DuplicateAdSet200Response data, response status code and response headers
599
622
  def duplicate_ad_set_with_http_info(ad_set_id, duplicate_ad_set_request, opts = {})
600
623
  if @api_client.config.debugging
@@ -608,6 +631,10 @@ module Zernio
608
631
  if @api_client.config.client_side_validation && duplicate_ad_set_request.nil?
609
632
  fail ArgumentError, "Missing the required parameter 'duplicate_ad_set_request' when calling AdCampaignsApi.duplicate_ad_set"
610
633
  end
634
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
635
+ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AdCampaignsApi.duplicate_ad_set, the character length must be smaller than or equal to 255.'
636
+ end
637
+
611
638
  # resource path
612
639
  local_var_path = '/v1/ads/ad-sets/{adSetId}/duplicate'.sub('{' + 'adSetId' + '}', CGI.escape(ad_set_id.to_s))
613
640
 
@@ -623,6 +650,7 @@ module Zernio
623
650
  if !content_type.nil?
624
651
  header_params['Content-Type'] = content_type
625
652
  end
653
+ header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
626
654
 
627
655
  # form parameters
628
656
  form_params = opts[:form_params] || {}
@@ -35,7 +35,7 @@ module Zernio
35
35
 
36
36
  attr_accessor :engagement
37
37
 
38
- # Count of conversion events over the requested date range. Meta: events matching the campaign's promoted_object.custom_event_type (PURCHASE, LEAD, etc.). Google: the account's tracked conversions. X and LinkedIn: their reported website/lead conversions (added 2026-07). 0 for non-conversion campaigns or when no events have fired.
38
+ # Count of conversion events over the requested date range. FRACTIONAL: attribution splits one conversion across touchpoints and Google additionally reports modeled conversions, so values like 0.347 are normal. Meta: events matching the campaign's promoted_object.custom_event_type (PURCHASE, LEAD, etc.). Google: the account's tracked conversions. X and LinkedIn: their reported website/lead conversions (added 2026-07). 0 for non-conversion campaigns or when no events have fired.
39
39
  attr_accessor :conversions
40
40
 
41
41
  # Derived spend / conversions in the same currency as spend. 0 when conversions is 0.
@@ -138,7 +138,7 @@ module Zernio
138
138
  :'cpc' => :'Float',
139
139
  :'cpm' => :'Float',
140
140
  :'engagement' => :'Integer',
141
- :'conversions' => :'Integer',
141
+ :'conversions' => :'Float',
142
142
  :'cost_per_conversion' => :'Float',
143
143
  :'actions' => :'Hash<String, Integer>',
144
144
  :'action_values' => :'Hash<String, Float>',
@@ -34,7 +34,7 @@ module Zernio
34
34
 
35
35
  attr_accessor :engagement
36
36
 
37
- # Count of conversion events over the requested date range. Meta: events matching the campaign's promoted_object.custom_event_type (PURCHASE, LEAD, etc.). Google: the account's tracked conversions. X and LinkedIn: their reported website/lead conversions (added 2026-07). 0 for non-conversion campaigns or when no events have fired.
37
+ # Count of conversion events over the requested date range. FRACTIONAL: attribution splits one conversion across touchpoints and Google additionally reports modeled conversions, so values like 0.347 are normal. Meta: events matching the campaign's promoted_object.custom_event_type (PURCHASE, LEAD, etc.). Google: the account's tracked conversions. X and LinkedIn: their reported website/lead conversions (added 2026-07). 0 for non-conversion campaigns or when no events have fired.
38
38
  attr_accessor :conversions
39
39
 
40
40
  # Derived spend / conversions in the same currency as spend. 0 when conversions is 0.
@@ -133,7 +133,7 @@ module Zernio
133
133
  :'cpc' => :'Float',
134
134
  :'cpm' => :'Float',
135
135
  :'engagement' => :'Integer',
136
- :'conversions' => :'Integer',
136
+ :'conversions' => :'Float',
137
137
  :'cost_per_conversion' => :'Float',
138
138
  :'actions' => :'Hash<String, Integer>',
139
139
  :'action_values' => :'Hash<String, Float>',
@@ -35,6 +35,15 @@ module Zernio
35
35
 
36
36
  attr_accessor :status
37
37
 
38
+ # Campaign bid strategy. Meta puts `bid_strategy` where the budget lives, so this applies only alongside a campaign budget (CBO). Previously settable only via `PUT /v1/ads/campaigns/{campaignId}`.
39
+ attr_accessor :bid_strategy
40
+
41
+ # Whole currency units (USD: 5 = $5.00). Required for LOWEST_COST_WITH_BID_CAP and COST_CAP; ignored otherwise.
42
+ attr_accessor :bid_amount
43
+
44
+ # Decimal ROAS multiplier (2.0 = 2.0x). Required for LOWEST_COST_WITH_MIN_ROAS.
45
+ attr_accessor :roas_average_floor
46
+
38
47
  class EnumAttributeValidator
39
48
  attr_reader :datatype
40
49
  attr_reader :allowable_values
@@ -67,7 +76,10 @@ module Zernio
67
76
  :'special_ad_categories' => :'specialAdCategories',
68
77
  :'budget_amount' => :'budgetAmount',
69
78
  :'budget_type' => :'budgetType',
70
- :'status' => :'status'
79
+ :'status' => :'status',
80
+ :'bid_strategy' => :'bidStrategy',
81
+ :'bid_amount' => :'bidAmount',
82
+ :'roas_average_floor' => :'roasAverageFloor'
71
83
  }
72
84
  end
73
85
 
@@ -91,7 +103,10 @@ module Zernio
91
103
  :'special_ad_categories' => :'Array<String>',
92
104
  :'budget_amount' => :'Float',
93
105
  :'budget_type' => :'String',
94
- :'status' => :'String'
106
+ :'status' => :'String',
107
+ :'bid_strategy' => :'String',
108
+ :'bid_amount' => :'Float',
109
+ :'roas_average_floor' => :'Float'
95
110
  }
96
111
  end
97
112
 
@@ -160,6 +175,18 @@ module Zernio
160
175
  else
161
176
  self.status = 'PAUSED'
162
177
  end
178
+
179
+ if attributes.key?(:'bid_strategy')
180
+ self.bid_strategy = attributes[:'bid_strategy']
181
+ end
182
+
183
+ if attributes.key?(:'bid_amount')
184
+ self.bid_amount = attributes[:'bid_amount']
185
+ end
186
+
187
+ if attributes.key?(:'roas_average_floor')
188
+ self.roas_average_floor = attributes[:'roas_average_floor']
189
+ end
163
190
  end
164
191
 
165
192
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -205,6 +232,8 @@ module Zernio
205
232
  return false unless budget_type_validator.valid?(@budget_type)
206
233
  status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
207
234
  return false unless status_validator.valid?(@status)
235
+ bid_strategy_validator = EnumAttributeValidator.new('String', ["LOWEST_COST_WITHOUT_CAP", "LOWEST_COST_WITH_BID_CAP", "COST_CAP", "LOWEST_COST_WITH_MIN_ROAS"])
236
+ return false unless bid_strategy_validator.valid?(@bid_strategy)
208
237
  true
209
238
  end
210
239
 
@@ -272,6 +301,16 @@ module Zernio
272
301
  @status = status
273
302
  end
274
303
 
304
+ # Custom attribute writer method checking allowed values (enum).
305
+ # @param [Object] bid_strategy Object to be assigned
306
+ def bid_strategy=(bid_strategy)
307
+ validator = EnumAttributeValidator.new('String', ["LOWEST_COST_WITHOUT_CAP", "LOWEST_COST_WITH_BID_CAP", "COST_CAP", "LOWEST_COST_WITH_MIN_ROAS"])
308
+ unless validator.valid?(bid_strategy)
309
+ fail ArgumentError, "invalid value for \"bid_strategy\", must be one of #{validator.allowable_values}."
310
+ end
311
+ @bid_strategy = bid_strategy
312
+ end
313
+
275
314
  # Checks equality by comparing each attribute.
276
315
  # @param [Object] Object to be compared
277
316
  def ==(o)
@@ -284,7 +323,10 @@ module Zernio
284
323
  special_ad_categories == o.special_ad_categories &&
285
324
  budget_amount == o.budget_amount &&
286
325
  budget_type == o.budget_type &&
287
- status == o.status
326
+ status == o.status &&
327
+ bid_strategy == o.bid_strategy &&
328
+ bid_amount == o.bid_amount &&
329
+ roas_average_floor == o.roas_average_floor
288
330
  end
289
331
 
290
332
  # @see the `==` method
@@ -296,7 +338,7 @@ module Zernio
296
338
  # Calculates hash code according to all attributes.
297
339
  # @return [Integer] Hash code
298
340
  def hash
299
- [account_id, ad_account_id, name, goal, special_ad_categories, budget_amount, budget_type, status].hash
341
+ [account_id, ad_account_id, name, goal, special_ad_categories, budget_amount, budget_type, status, bid_strategy, bid_amount, roas_average_floor].hash
300
342
  end
301
343
 
302
344
  # Builds the object from hash