zernio-sdk 0.0.552 → 0.0.554

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 (65) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -0
  3. data/docs/AdCampaignsApi.md +3 -3
  4. data/docs/ConnectApi.md +70 -0
  5. data/docs/ConnectOpenAIAdsCredentials200Response.md +22 -0
  6. data/docs/ConnectOpenAIAdsCredentialsRequest.md +24 -0
  7. data/docs/ConversionEvent.md +1 -1
  8. data/docs/ConversionsApi.md +5 -5
  9. data/docs/CreateStandaloneAdRequest.md +8 -8
  10. data/docs/CreateTrackingTagRequest.md +1 -1
  11. data/docs/GetTrackingTag200Response.md +20 -0
  12. data/docs/ListConversionDestinations200ResponseDestinationsInner.md +1 -1
  13. data/docs/SendConversions200Response.md +1 -1
  14. data/docs/SendConversionsRequest.md +3 -3
  15. data/docs/TrackingTagsApi.md +17 -17
  16. data/docs/UpdateAdRequestBudget.md +1 -1
  17. data/docs/UpdateAdSetRequest.md +3 -3
  18. data/lib/zernio-sdk/api/ad_campaigns_api.rb +10 -10
  19. data/lib/zernio-sdk/api/connect_api.rb +68 -0
  20. data/lib/zernio-sdk/api/conversions_api.rb +8 -8
  21. data/lib/zernio-sdk/api/tracking_tags_api.rb +18 -18
  22. data/lib/zernio-sdk/models/account_with_follower_stats.rb +2 -2
  23. data/lib/zernio-sdk/models/ad.rb +2 -2
  24. data/lib/zernio-sdk/models/ad_campaign.rb +2 -2
  25. data/lib/zernio-sdk/models/ad_tree_campaign.rb +2 -2
  26. data/lib/zernio-sdk/models/bulk_update_ad_campaign_status_request_campaigns_inner.rb +2 -2
  27. data/lib/zernio-sdk/models/connect_open_ai_ads_credentials200_response.rb +165 -0
  28. data/lib/zernio-sdk/models/connect_open_ai_ads_credentials_request.rb +212 -0
  29. data/lib/zernio-sdk/models/conversion_event.rb +1 -1
  30. data/lib/zernio-sdk/models/create_standalone_ad_request.rb +8 -8
  31. data/lib/zernio-sdk/models/create_tracking_tag201_response.rb +2 -2
  32. data/lib/zernio-sdk/models/create_tracking_tag_request.rb +1 -1
  33. data/lib/zernio-sdk/models/get_tracking_tag200_response.rb +190 -0
  34. data/lib/zernio-sdk/models/list_conversion_destinations200_response.rb +2 -2
  35. data/lib/zernio-sdk/models/list_conversion_destinations200_response_destinations_inner.rb +1 -1
  36. data/lib/zernio-sdk/models/list_tracking_tags200_response.rb +2 -2
  37. data/lib/zernio-sdk/models/send_conversions200_response.rb +3 -3
  38. data/lib/zernio-sdk/models/send_conversions_request.rb +3 -3
  39. data/lib/zernio-sdk/models/social_account.rb +2 -2
  40. data/lib/zernio-sdk/models/update_ad_campaign_status_request.rb +2 -2
  41. data/lib/zernio-sdk/models/update_ad_request_budget.rb +1 -0
  42. data/lib/zernio-sdk/models/update_ad_set_request.rb +5 -5
  43. data/lib/zernio-sdk/version.rb +1 -1
  44. data/lib/zernio-sdk.rb +3 -0
  45. data/openapi.yaml +176 -71
  46. data/spec/api/ad_campaigns_api_spec.rb +3 -3
  47. data/spec/api/connect_api_spec.rb +12 -0
  48. data/spec/api/conversions_api_spec.rb +4 -4
  49. data/spec/api/tracking_tags_api_spec.rb +8 -8
  50. data/spec/models/account_with_follower_stats_spec.rb +1 -1
  51. data/spec/models/ad_campaign_spec.rb +1 -1
  52. data/spec/models/ad_spec.rb +1 -1
  53. data/spec/models/ad_tree_campaign_spec.rb +1 -1
  54. data/spec/models/bulk_update_ad_campaign_status_request_campaigns_inner_spec.rb +1 -1
  55. data/spec/models/connect_open_ai_ads_credentials200_response_spec.rb +48 -0
  56. data/spec/models/connect_open_ai_ads_credentials_request_spec.rb +54 -0
  57. data/spec/models/create_tracking_tag201_response_spec.rb +1 -1
  58. data/spec/models/get_tracking_tag200_response_spec.rb +46 -0
  59. data/spec/models/list_conversion_destinations200_response_spec.rb +1 -1
  60. data/spec/models/list_tracking_tags200_response_spec.rb +1 -1
  61. data/spec/models/send_conversions200_response_spec.rb +1 -1
  62. data/spec/models/social_account_spec.rb +1 -1
  63. data/spec/models/update_ad_campaign_status_request_spec.rb +1 -1
  64. data/spec/models/update_ad_set_request_spec.rb +1 -1
  65. metadata +1494 -1482
@@ -70,7 +70,7 @@ describe 'AdCampaignsApi' do
70
70
 
71
71
  # unit tests for create_standalone_ad
72
72
  # Create standalone ad
73
- # Creates a paid ad with custom creative across Meta, Google Ads, Pinterest, TikTok, X/Twitter, and LinkedIn. Supports three mutually-exclusive request shapes selected by the body, a legacy single-creative shape (all platforms, default), a Meta-only multi-creative shape via the creatives array (one ad set with N ads sharing budget and targeting), and a Meta-only attach shape via adSetId (adds one new ad to an existing ad set). Per-platform required fields, budget minimums, and video-ad rules are documented on each property below. LinkedIn creates a Single Image or Single Video Ad backed by a Direct Sponsored Content \"dark post\" authored by a Company Page (see `organizationId`); supported goals are engagement, traffic, awareness, and video_views (video ads use the `video` field; video_views requires a video), and traffic ads require `linkUrl`. **Idempotency:** this endpoint is not idempotent at the platform level (a blind retry creates a second campaign/ad set/ad). Send an `Idempotency-Key` header to make retries safe: the first request with a given key creates the ad and we store the response; a retry with the same key replays that exact response (with `Idempotent-Replayed: true`) instead of creating duplicates. Reusing a key with a different body returns 422; a key whose first request is still in flight returns 409 (retry after a short backoff). Keys are scoped to your credential and expire after 24h.
73
+ # Creates a paid ad with custom creative across Meta, Google Ads, Pinterest, TikTok, X/Twitter, LinkedIn, and OpenAI Ads (ChatGPT Ads). Supports three mutually-exclusive request shapes selected by the body, a legacy single-creative shape (all platforms, default), a Meta-only multi-creative shape via the creatives array (one ad set with N ads sharing budget and targeting), and a Meta-only attach shape via adSetId (adds one new ad to an existing ad set). Per-platform required fields, budget minimums, and video-ad rules are documented on each property below. LinkedIn creates a Single Image or Single Video Ad backed by a Direct Sponsored Content \"dark post\" authored by a Company Page (see `organizationId`); supported goals are engagement, traffic, awareness, and video_views (video ads use the `video` field; video_views requires a video), and traffic ads require `linkUrl`. **Idempotency:** this endpoint is not idempotent at the platform level (a blind retry creates a second campaign/ad set/ad). Send an `Idempotency-Key` header to make retries safe: the first request with a given key creates the ad and we store the response; a retry with the same key replays that exact response (with `Idempotent-Replayed: true`) instead of creating duplicates. Reusing a key with a different body returns 422; a key whose first request is still in flight returns 409 (retry after a short backoff). Keys are scoped to your credential and expire after 24h.
74
74
  # @param create_standalone_ad_request
75
75
  # @param [Hash] opts the optional parameters
76
76
  # @option opts [String] :idempotency_key Optional client-generated unique key (e.g. a UUID) that makes create retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
@@ -83,7 +83,7 @@ describe 'AdCampaignsApi' do
83
83
 
84
84
  # unit tests for delete_ad
85
85
  # Cancel an ad
86
- # Cancels the ad on the platform and marks it as cancelled in the database. The ad is preserved for history.
86
+ # Cancels the ad on the platform and marks it as cancelled in the database. The ad is preserved for history. OpenAI Ads has no delete API; the ad is archived instead (a terminal state, the closest equivalent).
87
87
  # @param ad_id
88
88
  # @param [Hash] opts the optional parameters
89
89
  # @return [DeleteAccountGroup200Response]
@@ -260,7 +260,7 @@ describe 'AdCampaignsApi' do
260
260
 
261
261
  # unit tests for update_ad
262
262
  # Update ad
263
- # Patch one or more fields on an ad. Status, budget, targeting, and creative changes are propagated to the platform. Per-platform support: - **Meta** (Facebook + Instagram): all fields supported. - **TikTok**: status, budget, targeting (via `/v2/adgroup/update/`), and creative (via `/v2/ad/update/` patch-style — `headline` is ignored, `body` becomes `ad_text`). - **Pinterest / X / LinkedIn / Google**: status + budget only. Sending `targeting` or `creative` returns 501 with code `unsupported_platform_operation`.
263
+ # Patch one or more fields on an ad. Status, budget, targeting, and creative changes are propagated to the platform. Per-platform support: - **Meta** (Facebook + Instagram): all fields supported. - **TikTok**: status, budget, targeting (via `/v2/adgroup/update/`), and creative (via `/v2/ad/update/` patch-style — `headline` is ignored, `body` becomes `ad_text`). - **Pinterest / X / LinkedIn / Google / OpenAI Ads**: status + budget only. Sending `targeting` or `creative` returns 501 with code `unsupported_platform_operation`. OpenAI Ads budget is lifetime-only (see `budget.type` below).
264
264
  # @param ad_id
265
265
  # @param update_ad_request
266
266
  # @param [Hash] opts the optional parameters
@@ -113,6 +113,18 @@ describe 'ConnectApi' do
113
113
  end
114
114
  end
115
115
 
116
+ # unit tests for connect_open_ai_ads_credentials
117
+ # Connect an OpenAI Ads account
118
+ # Connect an OpenAI Ads account using an API key from ChatGPT Ads Manager. The key grants full campaign write access on OpenAI's side (OpenAI does not offer a read-only key scope). Zernio uses it to read ads and performance, and to create and manage campaigns you set up through Zernio (create, status, budget, and cancel). Campaigns created directly in ChatGPT Ads Manager can still be managed there.
119
+ # @param connect_open_ai_ads_credentials_request
120
+ # @param [Hash] opts the optional parameters
121
+ # @return [ConnectOpenAIAdsCredentials200Response]
122
+ describe 'connect_open_ai_ads_credentials test' do
123
+ it 'should work' do
124
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
125
+ end
126
+ end
127
+
116
128
  # unit tests for connect_whats_app_credentials
117
129
  # Connect WhatsApp via credentials
118
130
  # Connect a WhatsApp Business Account by providing Meta credentials directly. This is the headless alternative to the Embedded Signup browser flow. To get the required credentials: 1. Go to Meta Business Suite (business.facebook.com) 2. Create or select a WhatsApp Business Account 3. In Business Settings > System Users, create a System User 4. Assign it the whatsapp_business_management and whatsapp_business_messaging permissions 5. Generate a permanent access token 6. Get the WABA ID from WhatsApp Manager > Account Tools > Phone Numbers 7. Get the Phone Number ID from the same page (click on the number)
@@ -60,7 +60,7 @@ describe 'ConversionsApi' do
60
60
 
61
61
  # unit tests for create_conversion_destination
62
62
  # Create a conversion destination
63
- # Create a new conversion destination on the platform. Supported for LinkedIn (conversion rule) and Google Ads (conversion action). Meta manages destinations in its own UI and returns 405. **LinkedIn:** creation is NOT idempotent. A retry creates a second destination. Deduplicate before retrying. **Google Ads:** calling with a name that already exists reuses the existing conversion action transparently (the response is identical to a fresh create). Calling with the same name but a different category returns a typed `IDEMPOTENCY_CONFLICT` (409) rather than silently returning the mismatched action. **LinkedIn:** the rule is created with `conversionMethod=CONVERSIONS_API` and (by default) auto-associated with all of the ad account's campaigns via `autoAssociationType=ALL_CAMPAIGNS`. Pass `autoAssociationType: NONE` to opt out and manage associations explicitly via the associations endpoints below. 365-day attribution windows are only valid for `SUBMIT_APPLICATION`, `PURCHASE`, `ADD_TO_CART`, `QUALIFIED_LEAD`, and `LEAD` rule types; the API rejects other combinations locally. **Google Ads:** the conversion action is created with `type=UPLOAD_CLICKS` (required for API-uploaded offline conversions, immutable after creation). The `type` field carries the Google `ConversionActionCategory` enum value, e.g. `PURCHASE`, `SUBSCRIBE_PAID`, `SIGNUP`, `IMPORTED_LEAD`, `BOOK_APPOINTMENT`. Unified standard event names (e.g. `Purchase`, `Subscribe`, `CompleteRegistration`, `Lead`, `Schedule`) are resolved to their Google category equivalents automatically. The action defaults to secondary (non-primary) to avoid immediately steering Smart Bidding; pass `primaryForGoal: true` to opt in.
63
+ # Create a new conversion destination on the platform. Supported for LinkedIn (conversion rule) and Google Ads (conversion action). Meta and OpenAI Ads pixels are created via their own tracking-tags flow instead (`POST /v1/accounts/{accountId}/tracking-tags`); this endpoint returns 405 for both. **LinkedIn:** creation is NOT idempotent. A retry creates a second destination. Deduplicate before retrying. **Google Ads:** calling with a name that already exists reuses the existing conversion action transparently (the response is identical to a fresh create). Calling with the same name but a different category returns a typed `IDEMPOTENCY_CONFLICT` (409) rather than silently returning the mismatched action. **LinkedIn:** the rule is created with `conversionMethod=CONVERSIONS_API` and (by default) auto-associated with all of the ad account's campaigns via `autoAssociationType=ALL_CAMPAIGNS`. Pass `autoAssociationType: NONE` to opt out and manage associations explicitly via the associations endpoints below. 365-day attribution windows are only valid for `SUBMIT_APPLICATION`, `PURCHASE`, `ADD_TO_CART`, `QUALIFIED_LEAD`, and `LEAD` rule types; the API rejects other combinations locally. **Google Ads:** the conversion action is created with `type=UPLOAD_CLICKS` (required for API-uploaded offline conversions, immutable after creation). The `type` field carries the Google `ConversionActionCategory` enum value, e.g. `PURCHASE`, `SUBSCRIBE_PAID`, `SIGNUP`, `IMPORTED_LEAD`, `BOOK_APPOINTMENT`. Unified standard event names (e.g. `Purchase`, `Subscribe`, `CompleteRegistration`, `Lead`, `Schedule`) are resolved to their Google category equivalents automatically. The action defaults to secondary (non-primary) to avoid immediately steering Smart Bidding; pass `primaryForGoal: true` to opt in.
64
64
  # @param account_id SocialAccount ID (linkedinads or googleads).
65
65
  # @param create_conversion_destination_request
66
66
  # @param [Hash] opts the optional parameters
@@ -145,8 +145,8 @@ describe 'ConversionsApi' do
145
145
 
146
146
  # unit tests for list_conversion_destinations
147
147
  # List conversion destinations
148
- # Returns the list of pixels (Meta), conversion actions (Google), or conversion rules (LinkedIn) accessible to the connected ads account. Use the returned `id` as `destinationId` when posting to `POST /v1/ads/conversions`. For Google and LinkedIn, each destination's `type` reflects the conversion type (PURCHASE, LEAD, SIGN_UP, etc.) — the event type is locked to the destination. For Meta, `type` is absent: pixels accept any event name per request. For LinkedIn, destinations are returned across every sponsored ad account the connected token can access; the `adAccountId` field on each destination identifies the parent ad account and is required for subsequent CRUD calls (update, delete, associations, metrics).
149
- # @param account_id SocialAccount ID (metaads, googleads, linkedinads, or tiktokads).
148
+ # Returns the list of pixels (Meta), conversion actions (Google), conversion rules (LinkedIn), or pixels (OpenAI Ads) accessible to the connected ads account. Use the returned `id` as `destinationId` when posting to `POST /v1/ads/conversions`. For Google and LinkedIn, each destination's `type` reflects the conversion type (PURCHASE, LEAD, SIGN_UP, etc.) — the event type is locked to the destination. For Meta and OpenAI Ads, `type` is absent: pixels accept any event name per request. For LinkedIn, destinations are returned across every sponsored ad account the connected token can access; the `adAccountId` field on each destination identifies the parent ad account and is required for subsequent CRUD calls (update, delete, associations, metrics).
149
+ # @param account_id SocialAccount ID (metaads, googleads, linkedinads, tiktokads, or openaiads).
150
150
  # @param [Hash] opts the optional parameters
151
151
  # @return [ListConversionDestinations200Response]
152
152
  describe 'list_conversion_destinations test' do
@@ -172,7 +172,7 @@ describe 'ConversionsApi' do
172
172
 
173
173
  # unit tests for send_conversions
174
174
  # Send conversion events
175
- # Relay one or more conversion events to the target ad platform's native Conversions API. Platform is inferred from the provided `accountId`. Requires the Ads add-on. Supported platforms: - Meta (`metaads`) via Graph API - Google Ads (`googleads`) via Data Manager API `ingestEvents` - LinkedIn (`linkedinads`) via `/rest/conversionEvents` - TikTok (`tiktokads`) via the Offline Events API `/offline/batch/` — OFFLINE conversions only `destinationId` semantics differ per platform: - Meta: pixel (dataset) ID, e.g. `123456789012345` - Google: conversion action resource name, e.g. `customers/1234567890/conversionActions/987654321` - LinkedIn: conversion rule ID or URN, e.g. `104012` or `urn:lla:llaPartnerConversion:104012` - TikTok: Offline Event Set ID, e.g. `7057103914977558530` TikTok notes: this path sends OFFLINE conversions (in-store / CRM / call-center), not web-pixel events. Each event must carry an email or phone (TikTok requires at least one). The connected TikTok ads account must have granted the Offline Events permission; older grants must reconnect. Callers can list valid destinations via `GET /v1/accounts/{accountId}/conversion-destinations`. All PII (email, phone, names, external IDs) is hashed with SHA-256 server-side per each platform's normalization spec, including Google's Gmail-specific dot/plus-suffix stripping. Send plaintext. LinkedIn `externalIds` are passed through as plaintext per LinkedIn's spec; only emails and phones are hashed. For LinkedIn, the connected account must have been authorized after the Conversions API rollout (i.e. the OAuth grant must include `rw_conversions`). Older accounts must reconnect. Batching is handled automatically. Meta caps at 1000 events per request and rejects the entire batch if any event is malformed. Google caps at 2000. LinkedIn caps at 5000 and is also all-or-nothing per chunk. Dedup: pass a stable `eventId` on every event. Meta and LinkedIn use it to dedupe against browser-side pixel/Insight Tag events; Google maps it to `transactionId`. Per-platform `eventName` semantics: - Meta: free-form. Standard names (Purchase, Lead, ...) match Meta's built-in events; custom strings are accepted. - Google: ignored. The conversion action's category determines the event type. Send the standard name closest to your action for documentation, but the platform will not branch on it. - LinkedIn: ignored. The conversion rule's `type` (LEAD, PURCHASE, etc.) is locked to the destination at rule-creation time. Send the standard name for documentation; LinkedIn does not branch on it.
175
+ # Relay one or more conversion events to the target ad platform's native Conversions API. Platform is inferred from the provided `accountId`. Requires the Ads add-on. Supported platforms: - Meta (`metaads`) via Graph API - Google Ads (`googleads`) via Data Manager API `ingestEvents` - LinkedIn (`linkedinads`) via `/rest/conversionEvents` - TikTok (`tiktokads`) via the Offline Events API `/offline/batch/` — OFFLINE conversions only - OpenAI Ads (`openaiads`) via its Conversions API (a separate host, `bzr.openai.com`) `destinationId` semantics differ per platform: - Meta: pixel (dataset) ID, e.g. `123456789012345` - Google: conversion action resource name, e.g. `customers/1234567890/conversionActions/987654321` - LinkedIn: conversion rule ID or URN, e.g. `104012` or `urn:lla:llaPartnerConversion:104012` - TikTok: Offline Event Set ID, e.g. `7057103914977558530` - OpenAI Ads: pixel wire id (numeric `pixel_id`, distinct from the internal pixel id), as returned by `GET /v1/accounts/{accountId}/conversion-destinations` TikTok notes: this path sends OFFLINE conversions (in-store / CRM / call-center), not web-pixel events. Each event must carry an email or phone (TikTok requires at least one). The connected TikTok ads account must have granted the Offline Events permission; older grants must reconnect. OpenAI Ads notes: requires a tracking tag (pixel) to already exist on the account — returns 422 with code `TRACKING_TAG_REQUIRED` if `POST /v1/accounts/{accountId}/tracking-tags` hasn't been called yet. Callers can list valid destinations via `GET /v1/accounts/{accountId}/conversion-destinations`. All PII (email, phone, names, external IDs) is hashed with SHA-256 server-side per each platform's normalization spec, including Google's Gmail-specific dot/plus-suffix stripping. Send plaintext. LinkedIn `externalIds` are passed through as plaintext per LinkedIn's spec; only emails and phones are hashed. For LinkedIn, the connected account must have been authorized after the Conversions API rollout (i.e. the OAuth grant must include `rw_conversions`). Older accounts must reconnect. Batching is handled automatically. Meta caps at 1000 events per request and rejects the entire batch if any event is malformed. Google caps at 2000. LinkedIn caps at 5000 and is also all-or-nothing per chunk. OpenAI Ads caps at 1000 per request; larger submissions are split into 1000-event chunks, each all-or-nothing (a malformed event fails every event in that chunk, not the whole request). Dedup: pass a stable `eventId` on every event. Meta and LinkedIn use it to dedupe against browser-side pixel/Insight Tag events; Google maps it to `transactionId`. Per-platform `eventName` semantics: - Meta: free-form. Standard names (Purchase, Lead, ...) match Meta's built-in events; custom strings are accepted. - Google: ignored. The conversion action's category determines the event type. Send the standard name closest to your action for documentation, but the platform will not branch on it. - LinkedIn: ignored. The conversion rule's `type` (LEAD, PURCHASE, etc.) is locked to the destination at rule-creation time. Send the standard name for documentation; LinkedIn does not branch on it. - OpenAI Ads: a fixed subset of standard names (Purchase, Lead, AddToCart, ViewContent, InitiateCheckout, CompleteRegistration, Subscribe, StartTrial, Schedule) maps 1:1 onto OpenAI's own event-type enum; any other standard name or custom string is sent as `type: custom` with the name preserved.
176
176
  # @param send_conversions_request
177
177
  # @param [Hash] opts the optional parameters
178
178
  # @return [SendConversions200Response]
@@ -48,8 +48,8 @@ describe 'TrackingTagsApi' do
48
48
 
49
49
  # unit tests for create_tracking_tag
50
50
  # Create a tracking tag
51
- # Creates a Meta Pixel on the given ad account (`POST /act_{id}/adspixels` — `name` is the only input). Returns the created tag including its install `code`. The pixel is owned by the Business Manager that owns the ad account; a pixel created on a personal (non-BM) ad account ends up with `ownerBusinessId: null` and can't be shared with other ad accounts. Creating a pixel does NOT install it — install the returned `code` snippet on the site, or send events server-side via `POST /v1/ads/conversions`. The check `installed` is derived from `lastFiredTime`. NOT idempotent: each call creates a new pixel. Do not retry blindly on timeout. Meta only (platform `metaads`); other platforms return 405.
52
- # @param account_id Meta ads SocialAccount id (platform `metaads`).
51
+ # Meta: creates a Meta Pixel on the given ad account (`POST /act_{id}/adspixels` — `name` is the only input). Returns the created tag including its install `code`. The pixel is owned by the Business Manager that owns the ad account; a pixel created on a personal (non-BM) ad account ends up with `ownerBusinessId: null` and can't be shared with other ad accounts. Creating a Meta pixel does NOT install it — install the returned `code` snippet on the site, or send events server-side via `POST /v1/ads/conversions`. The check `installed` is derived from `lastFiredTime`. OpenAI Ads: creates an OpenAI pixel AND provisions a Conversions API key for it in the same call (`adAccountId` is required by this endpoint but ignored — one API key maps to exactly one ad account, so there's nothing to select). Returns 422 (`FEATURE_NOT_AVAILABLE`) if the ad account isn't enabled for pixel management; contact your OpenAI partner representative to enable it. There is no delete API for OpenAI pixels. If the pixel is created but the Conversions API key provisioning then fails, the pixel is left live on OpenAI (it cannot be cleaned up) and the error message names the surviving pixel id and warns against retrying, since a retry would create a second, orphaned pixel. NOT idempotent on either platform: each call creates a new pixel (and, for OpenAI, a new Conversions API key). Do not retry blindly on timeout. Meta (platform `metaads`) and OpenAI Ads (platform `openaiads`); other platforms return 405.
52
+ # @param account_id Ads SocialAccount id (platform `metaads` or `openaiads`).
53
53
  # @param create_tracking_tag_request
54
54
  # @param [Hash] opts the optional parameters
55
55
  # @return [CreateTrackingTag201Response]
@@ -73,11 +73,11 @@ describe 'TrackingTagsApi' do
73
73
 
74
74
  # unit tests for get_tracking_tag
75
75
  # Get a tracking tag
76
- # Returns the full tag record including the base-code `code` snippet, `lastFiredTime`, `ownerBusinessId`, `isUnavailable`, etc. Meta only (platform `metaads`); other platforms return 405.
76
+ # Returns the full tag record including the base-code `code` snippet, `lastFiredTime`, `ownerBusinessId`, `isUnavailable`, etc. Meta only (platform `metaads`); other platforms return 405. OpenAI Ads has no get-by-id endpoint, so it 405s here too — use `GET /v1/accounts/{accountId}/tracking-tags` (list) instead.
77
77
  # @param account_id
78
78
  # @param tag_id Pixel id.
79
79
  # @param [Hash] opts the optional parameters
80
- # @return [CreateTrackingTag201Response]
80
+ # @return [GetTrackingTag200Response]
81
81
  describe 'get_tracking_tag test' do
82
82
  it 'should work' do
83
83
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -115,10 +115,10 @@ describe 'TrackingTagsApi' do
115
115
 
116
116
  # unit tests for list_tracking_tags
117
117
  # List tracking tags
118
- # Returns the tracking tags (Meta Pixels) the connected ads account can see. Pass `?adAccountId=act_...` to scope the list to a single ad account; omit it to list every pixel reachable by the token (the name is then suffixed with the ad account it was discovered on, for disambiguation). The list view omits `code` — call `getTrackingTag` for the install snippet and full detail. Meta only today (platform `metaads`); other platforms return 405. The `accountId` must be the Meta *ads* SocialAccount created by the Ads add-on connect flow, not a Facebook/Instagram posting account. Get your `act_...` ids from `GET /v1/ads/accounts`.
119
- # @param account_id Meta ads SocialAccount id (platform `metaads`).
118
+ # Returns the tracking tags (Meta Pixels, or OpenAI Ads pixels) the connected ads account can see. Pass `?adAccountId=act_...` (Meta only) to scope the list to a single ad account; omit it to list every pixel reachable by the token (the name is then suffixed with the ad account it was discovered on, for disambiguation). The list view omits `code` — call `getTrackingTag` for the install snippet and full detail (Meta only; OpenAI Ads has no get-by-id endpoint). Meta (platform `metaads`) and OpenAI Ads (platform `openaiads`); other platforms return 405. The `accountId` must be the ads SocialAccount created by the Ads add-on connect flow (Meta) or the OpenAI Ads connect flow, not a Facebook/Instagram posting account. Get your Meta `act_...` ids from `GET /v1/ads/accounts`; `adAccountId` is ignored for OpenAI Ads (one API key maps to exactly one ad account).
119
+ # @param account_id Ads SocialAccount id (platform `metaads` or `openaiads`).
120
120
  # @param [Hash] opts the optional parameters
121
- # @option opts [String] :ad_account_id Optional. Scope to one ad account, e.g. `act_123456789`.
121
+ # @option opts [String] :ad_account_id Optional, Meta only. Scope to one ad account, e.g. `act_123456789`. Ignored for OpenAI Ads.
122
122
  # @return [ListTrackingTags200Response]
123
123
  describe 'list_tracking_tags test' do
124
124
  it 'should work' do
@@ -160,7 +160,7 @@ describe 'TrackingTagsApi' do
160
160
  # @param tag_id Pixel id.
161
161
  # @param update_tracking_tag_request
162
162
  # @param [Hash] opts the optional parameters
163
- # @return [CreateTrackingTag201Response]
163
+ # @return [GetTrackingTag200Response]
164
164
  describe 'update_tracking_tag test' do
165
165
  it 'should work' do
166
166
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -36,7 +36,7 @@ describe Zernio::AccountWithFollowerStats do
36
36
  describe 'test attribute "platform"' do
37
37
  it 'should work' do
38
38
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["tiktok", "instagram", "facebook", "youtube", "linkedin", "twitter", "threads", "pinterest", "reddit", "bluesky", "googlebusiness", "telegram", "snapchat", "discord", "whatsapp", "linkedinads", "metaads", "pinterestads", "tiktokads", "xads", "googleads"])
39
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["tiktok", "instagram", "facebook", "youtube", "linkedin", "twitter", "threads", "pinterest", "reddit", "bluesky", "googlebusiness", "telegram", "snapchat", "discord", "whatsapp", "linkedinads", "metaads", "pinterestads", "tiktokads", "xads", "googleads", "openaiads"])
40
40
  # validator.allowable_values.each do |value|
41
41
  # expect { instance.platform = value }.not_to raise_error
42
42
  # end
@@ -36,7 +36,7 @@ describe Zernio::AdCampaign do
36
36
  describe 'test attribute "platform"' do
37
37
  it 'should work' do
38
38
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter"])
39
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter", "openai"])
40
40
  # validator.allowable_values.each do |value|
41
41
  # expect { instance.platform = value }.not_to raise_error
42
42
  # end
@@ -42,7 +42,7 @@ describe Zernio::Ad do
42
42
  describe 'test attribute "platform"' do
43
43
  it 'should work' do
44
44
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter"])
45
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter", "openai"])
46
46
  # validator.allowable_values.each do |value|
47
47
  # expect { instance.platform = value }.not_to raise_error
48
48
  # end
@@ -36,7 +36,7 @@ describe Zernio::AdTreeCampaign do
36
36
  describe 'test attribute "platform"' do
37
37
  it 'should work' do
38
38
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter"])
39
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter", "openai"])
40
40
  # validator.allowable_values.each do |value|
41
41
  # expect { instance.platform = value }.not_to raise_error
42
42
  # end
@@ -36,7 +36,7 @@ describe Zernio::BulkUpdateAdCampaignStatusRequestCampaignsInner do
36
36
  describe 'test attribute "platform"' do
37
37
  it 'should work' do
38
38
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter"])
39
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter", "openai"])
40
40
  # validator.allowable_values.each do |value|
41
41
  # expect { instance.platform = value }.not_to raise_error
42
42
  # end
@@ -0,0 +1,48 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
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::ConnectOpenAIAdsCredentials200Response
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Zernio::ConnectOpenAIAdsCredentials200Response do
21
+ #let(:instance) { Zernio::ConnectOpenAIAdsCredentials200Response.new }
22
+
23
+ describe 'test an instance of ConnectOpenAIAdsCredentials200Response' do
24
+ it 'should create an instance of ConnectOpenAIAdsCredentials200Response' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(Zernio::ConnectOpenAIAdsCredentials200Response)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "account_id"' 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
+ describe 'test attribute "ad_account_name"' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
+ end
40
+ end
41
+
42
+ describe 'test attribute "redirect_url"' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
+ end
46
+ end
47
+
48
+ end
@@ -0,0 +1,54 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
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::ConnectOpenAIAdsCredentialsRequest
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Zernio::ConnectOpenAIAdsCredentialsRequest do
21
+ #let(:instance) { Zernio::ConnectOpenAIAdsCredentialsRequest.new }
22
+
23
+ describe 'test an instance of ConnectOpenAIAdsCredentialsRequest' do
24
+ it 'should create an instance of ConnectOpenAIAdsCredentialsRequest' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(Zernio::ConnectOpenAIAdsCredentialsRequest)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "api_key"' 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
+ describe 'test attribute "profile_id"' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
+ end
40
+ end
41
+
42
+ describe 'test attribute "state"' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
+ end
46
+ end
47
+
48
+ describe 'test attribute "redirect_uri"' do
49
+ it 'should work' do
50
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
51
+ end
52
+ end
53
+
54
+ end
@@ -30,7 +30,7 @@ describe Zernio::CreateTrackingTag201Response do
30
30
  describe 'test attribute "platform"' do
31
31
  it 'should work' do
32
32
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["metaads"])
33
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["metaads", "openaiads"])
34
34
  # validator.allowable_values.each do |value|
35
35
  # expect { instance.platform = value }.not_to raise_error
36
36
  # end
@@ -0,0 +1,46 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
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::GetTrackingTag200Response
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Zernio::GetTrackingTag200Response do
21
+ #let(:instance) { Zernio::GetTrackingTag200Response.new }
22
+
23
+ describe 'test an instance of GetTrackingTag200Response' do
24
+ it 'should create an instance of GetTrackingTag200Response' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(Zernio::GetTrackingTag200Response)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "platform"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["metaads"])
34
+ # validator.allowable_values.each do |value|
35
+ # expect { instance.platform = value }.not_to raise_error
36
+ # end
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "tag"' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
43
+ end
44
+ end
45
+
46
+ end
@@ -30,7 +30,7 @@ describe Zernio::ListConversionDestinations200Response do
30
30
  describe 'test attribute "platform"' do
31
31
  it 'should work' do
32
32
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["metaads", "googleads", "linkedinads", "tiktokads"])
33
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["metaads", "googleads", "linkedinads", "tiktokads", "openaiads"])
34
34
  # validator.allowable_values.each do |value|
35
35
  # expect { instance.platform = value }.not_to raise_error
36
36
  # end
@@ -30,7 +30,7 @@ describe Zernio::ListTrackingTags200Response do
30
30
  describe 'test attribute "platform"' do
31
31
  it 'should work' do
32
32
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["metaads"])
33
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["metaads", "openaiads"])
34
34
  # validator.allowable_values.each do |value|
35
35
  # expect { instance.platform = value }.not_to raise_error
36
36
  # end
@@ -30,7 +30,7 @@ describe Zernio::SendConversions200Response do
30
30
  describe 'test attribute "platform"' do
31
31
  it 'should work' do
32
32
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["metaads", "googleads", "linkedinads", "tiktokads"])
33
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["metaads", "googleads", "linkedinads", "tiktokads", "openaiads"])
34
34
  # validator.allowable_values.each do |value|
35
35
  # expect { instance.platform = value }.not_to raise_error
36
36
  # end
@@ -36,7 +36,7 @@ describe Zernio::SocialAccount do
36
36
  describe 'test attribute "platform"' do
37
37
  it 'should work' do
38
38
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["tiktok", "instagram", "facebook", "youtube", "linkedin", "twitter", "threads", "pinterest", "reddit", "bluesky", "googlebusiness", "telegram", "snapchat", "discord", "whatsapp", "linkedinads", "metaads", "pinterestads", "tiktokads", "xads", "googleads"])
39
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["tiktok", "instagram", "facebook", "youtube", "linkedin", "twitter", "threads", "pinterest", "reddit", "bluesky", "googlebusiness", "telegram", "snapchat", "discord", "whatsapp", "linkedinads", "metaads", "pinterestads", "tiktokads", "xads", "googleads", "openaiads"])
40
40
  # validator.allowable_values.each do |value|
41
41
  # expect { instance.platform = value }.not_to raise_error
42
42
  # end
@@ -40,7 +40,7 @@ describe Zernio::UpdateAdCampaignStatusRequest do
40
40
  describe 'test attribute "platform"' do
41
41
  it 'should work' do
42
42
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
43
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter"])
43
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter", "openai"])
44
44
  # validator.allowable_values.each do |value|
45
45
  # expect { instance.platform = value }.not_to raise_error
46
46
  # end
@@ -30,7 +30,7 @@ describe Zernio::UpdateAdSetRequest do
30
30
  describe 'test attribute "platform"' do
31
31
  it 'should work' do
32
32
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter"])
33
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter", "openai"])
34
34
  # validator.allowable_values.each do |value|
35
35
  # expect { instance.platform = value }.not_to raise_error
36
36
  # end