late-sdk 0.0.860 → 0.0.862

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 (59) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -0
  3. data/docs/AdAccountsApi.md +1 -1
  4. data/docs/AdCampaignsApi.md +5 -5
  5. data/docs/AdInsightsApi.md +1 -1
  6. data/docs/AdLibraryApi.md +9 -7
  7. data/docs/CampaignBidding.md +5 -1
  8. data/docs/ConversionsApi.md +2 -2
  9. data/docs/GetAdsSearchTerms200Response.md +5 -1
  10. data/docs/GetCampaignBidding200Response.md +4 -0
  11. data/docs/GetCampaignTargeting200Response.md +5 -1
  12. data/docs/ListAccountCallouts200Response.md +5 -1
  13. data/docs/ListAdAccounts200Response.md +5 -1
  14. data/docs/ListBidStrategies200Response.md +5 -1
  15. data/docs/ListCampaignNegativeKeywords200Response.md +5 -1
  16. data/docs/ListConversionActions200Response.md +5 -1
  17. data/docs/UpdateCampaignTargeting200Response.md +7 -1
  18. data/docs/UpdateCampaignTargeting200ResponseDevicesInner.md +22 -0
  19. data/docs/UpdateCampaignTargeting200ResponseLanguagesInner.md +22 -0
  20. data/lib/zernio-sdk/api/ad_accounts_api.rb +2 -2
  21. data/lib/zernio-sdk/api/ad_campaigns_api.rb +10 -10
  22. data/lib/zernio-sdk/api/ad_insights_api.rb +2 -2
  23. data/lib/zernio-sdk/api/ad_library_api.rb +14 -11
  24. data/lib/zernio-sdk/api/conversions_api.rb +4 -4
  25. data/lib/zernio-sdk/models/campaign_bidding.rb +25 -4
  26. data/lib/zernio-sdk/models/get_ads_search_terms200_response.rb +25 -4
  27. data/lib/zernio-sdk/models/get_campaign_bidding200_response.rb +21 -1
  28. data/lib/zernio-sdk/models/get_campaign_targeting200_response.rb +25 -4
  29. data/lib/zernio-sdk/models/list_account_callouts200_response.rb +25 -4
  30. data/lib/zernio-sdk/models/list_ad_accounts200_response.rb +25 -4
  31. data/lib/zernio-sdk/models/list_bid_strategies200_response.rb +25 -4
  32. data/lib/zernio-sdk/models/list_campaign_negative_keywords200_response.rb +25 -4
  33. data/lib/zernio-sdk/models/list_conversion_actions200_response.rb +25 -4
  34. data/lib/zernio-sdk/models/update_campaign_targeting200_response.rb +37 -4
  35. data/lib/zernio-sdk/models/update_campaign_targeting200_response_devices_inner.rb +201 -0
  36. data/lib/zernio-sdk/models/update_campaign_targeting200_response_languages_inner.rb +165 -0
  37. data/lib/zernio-sdk/version.rb +1 -1
  38. data/lib/zernio-sdk.rb +2 -0
  39. data/openapi.yaml +93 -28
  40. data/spec/api/ad_accounts_api_spec.rb +1 -1
  41. data/spec/api/ad_campaigns_api_spec.rb +5 -5
  42. data/spec/api/ad_insights_api_spec.rb +1 -1
  43. data/spec/api/ad_library_api_spec.rb +3 -2
  44. data/spec/api/conversions_api_spec.rb +2 -2
  45. data/spec/models/campaign_bidding_spec.rb +12 -0
  46. data/spec/models/get_ads_search_terms200_response_spec.rb +12 -0
  47. data/spec/models/get_campaign_bidding200_response_spec.rb +12 -0
  48. data/spec/models/get_campaign_targeting200_response_spec.rb +12 -0
  49. data/spec/models/list_account_callouts200_response_spec.rb +12 -0
  50. data/spec/models/list_ad_accounts200_response_spec.rb +12 -0
  51. data/spec/models/list_bid_strategies200_response_spec.rb +12 -0
  52. data/spec/models/list_campaign_negative_keywords200_response_spec.rb +12 -0
  53. data/spec/models/list_conversion_actions200_response_spec.rb +12 -0
  54. data/spec/models/update_campaign_targeting200_response_devices_inner_spec.rb +52 -0
  55. data/spec/models/update_campaign_targeting200_response_languages_inner_spec.rb +48 -0
  56. data/spec/models/update_campaign_targeting200_response_spec.rb +18 -0
  57. data/zernio-sdk-0.0.862.gem +0 -0
  58. metadata +11 -3
  59. data/zernio-sdk-0.0.860.gem +0 -0
data/openapi.yaml CHANGED
@@ -8588,6 +8588,8 @@ components:
8588
8588
  properties:
8589
8589
  id: { type: string }
8590
8590
  name: { type: string }
8591
+ cachedAt: { type: [string, "null"], format: date-time, description: "When this data was fetched from Google. Null when it was never served from cache." }
8592
+ stale: { type: boolean, description: "True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read." }
8591
8593
  AdBudget:
8592
8594
  type: object
8593
8595
  description: Budget amount in the ad account's native currency (see the campaign's `currency` field for the code).
@@ -41328,9 +41330,11 @@ paths:
41328
41330
  description: |-
41329
41331
  The actual search queries that triggered your ads, with matched-keyword
41330
41332
  status and spend metrics — the raw material for wasted-spend analysis and
41331
- negative-keyword lists. Reads Google's `search_term_view` live; defaults
41332
- to the last 30 days. Rows are ordered by cost, descending. Draws on the
41333
- shared Google Ads operations budget.
41333
+ negative-keyword lists. Reads Google's `search_term_view`, cached for
41334
+ the quota window; defaults to the last 30 days. Rows are ordered by
41335
+ cost, descending. Draws on the shared Google Ads operations budget.
41336
+ The response carries `cachedAt` and `stale`, set when a quota-exhausted
41337
+ call falls back to the last-good copy instead of a live read.
41334
41338
  security:
41335
41339
  - bearerAuth: []
41336
41340
  parameters:
@@ -41371,6 +41375,8 @@ paths:
41371
41375
  type: object
41372
41376
  properties:
41373
41377
  nextPageToken: { type: [string, "null"], description: "Null when the last page was returned." }
41378
+ cachedAt: { type: [string, "null"], format: date-time, description: "When this data was fetched from Google. Null when it was never served from cache." }
41379
+ stale: { type: boolean, description: "True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read." }
41374
41380
  '400': { $ref: '#/components/responses/BadRequest' }
41375
41381
  '401': { $ref: '#/components/responses/Unauthorized' }
41376
41382
  '429': { description: "Google Ads operations budget exhausted; retry later." }
@@ -41386,8 +41392,10 @@ paths:
41386
41392
  description: >-
41387
41393
  Bidding strategy report: type, status, campaign count, clicks, cost, cost per
41388
41394
  conversion, impressions, average CPC and conversions over the date range (default
41389
- last 30 days). Reads Google's `bidding_strategy` resource live. Draws on the shared
41390
- Google Ads operations budget.
41395
+ last 30 days). Reads Google's `bidding_strategy` resource, cached for the quota
41396
+ window. Draws on the shared Google Ads operations budget. The response carries
41397
+ `cachedAt` and `stale`, set when a quota-exhausted call falls back to the
41398
+ last-good copy instead of a live read.
41391
41399
  security:
41392
41400
  - bearerAuth: []
41393
41401
  parameters:
@@ -41408,6 +41416,8 @@ paths:
41408
41416
  strategies:
41409
41417
  type: array
41410
41418
  items: { $ref: '#/components/schemas/PortfolioBidStrategy' }
41419
+ cachedAt: { type: [string, "null"], format: date-time, description: "When this data was fetched from Google. Null when it was never served from cache." }
41420
+ stale: { type: boolean, description: "True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read." }
41411
41421
  '400': { $ref: '#/components/responses/BadRequest' }
41412
41422
  '401': { $ref: '#/components/responses/Unauthorized' }
41413
41423
  '404': { $ref: '#/components/responses/NotFound' }
@@ -41996,9 +42006,12 @@ paths:
41996
42006
  x-platforms: ["google"]
41997
42007
  summary: Read a campaign's current bidding
41998
42008
  description: |
41999
- Live read of the campaign's bidding strategy on Google, for pre-filling the bid strategy
42000
- block before a PUT to /v1/ads/campaigns/{campaignId}. Google Ads only; `platform` is required
42001
- and rejected when it is anything else, since a `campaignId` is not globally unique.
42009
+ Read of the campaign's bidding strategy on Google, cached for the quota window, for
42010
+ pre-filling the bid strategy block before a PUT to /v1/ads/campaigns/{campaignId}.
42011
+ Google Ads only; `platform` is required and rejected when it is anything else, since
42012
+ a `campaignId` is not globally unique. The response carries `cachedAt` and `stale`,
42013
+ set when a quota-exhausted call falls back to the last-good copy instead of a live
42014
+ read.
42002
42015
 
42003
42016
  Maps Google's bidding strategy onto the same triplet PUT accepts: `LOWEST_COST_WITHOUT_CAP`
42004
42017
  (Maximize Conversions, no target), `COST_CAP` + `bidAmount` (Target CPA), `LOWEST_COST_WITH_MIN_ROAS`
@@ -42179,9 +42192,11 @@ paths:
42179
42192
  summary: List campaign-level negative keywords
42180
42193
  description: |
42181
42194
  Returns the campaign-level negative keywords (`campaign_criterion.negative`),
42182
- distinct from the ad-group-level negatives under `GET /v1/ads/keywords`. Read
42183
- live from Google on every call (not synced to Postgres), and gated by the
42184
- shared Google Ads operations budget like every other on-demand Google surface.
42195
+ distinct from the ad-group-level negatives under `GET /v1/ads/keywords`. Cached
42196
+ for the quota window (not synced to Postgres), and gated by the shared Google
42197
+ Ads operations budget like every other on-demand Google surface. The response
42198
+ carries `cachedAt` and `stale`, set when a quota-exhausted call falls back to
42199
+ the last-good copy instead of a live read.
42185
42200
 
42186
42201
  The platform is always discovered from the campaign itself; a non-Google
42187
42202
  campaign returns 501 rather than 404, whether or not `platform` was passed.
@@ -42206,6 +42221,8 @@ paths:
42206
42221
  criterionId: { type: string }
42207
42222
  text: { type: string }
42208
42223
  matchType: { type: string, enum: [exact, phrase, broad] }
42224
+ cachedAt: { type: [string, "null"], format: date-time, description: "When this list was fetched from Google. Null when it was never served from cache." }
42225
+ stale: { type: boolean, description: "True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read." }
42209
42226
  '401': { $ref: '#/components/responses/Unauthorized' }
42210
42227
  '404': { description: Campaign not found }
42211
42228
  '429': { description: Google Ads operations budget exhausted; retry later }
@@ -42435,9 +42452,10 @@ paths:
42435
42452
  summary: Read a Google campaign's device, location, and language targeting
42436
42453
  description: |
42437
42454
  Google Ads compliance requires geo, language, budget, and bidding targeting
42438
- set at creation to stay editable afterwards; this reads the live campaign
42439
- state so an integrator can build an editor around it. Google only; every
42440
- other platform returns 501.
42455
+ set at creation to stay editable afterwards; this reads the campaign state
42456
+ so an integrator can build an editor around it. Cached for the quota window
42457
+ (10 minutes fresh, up to 7 days last-good), not always a live read. Google
42458
+ only; every other platform returns 501.
42441
42459
 
42442
42460
  `devices` always lists all four device types with `included` reflecting
42443
42461
  Google's negative device criteria (a device absent from any negative
@@ -42479,6 +42497,8 @@ paths:
42479
42497
  code: { type: string, description: "Google's language code (ISO 639-1, plus variants such as `zh_CN`). Empty when the campaign's language_constant id is not in Zernio's checked-in table." }
42480
42498
  id: { type: string, description: "Google's languageConstants/{id} numeric id." }
42481
42499
  name: { type: string }
42500
+ cachedAt: { type: [string, "null"], format: date-time, description: "When this targeting was fetched from Google. Null when it was never served from cache." }
42501
+ stale: { type: boolean, description: "True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read." }
42482
42502
  '400': { $ref: '#/components/responses/BadRequest' }
42483
42503
  '401': { $ref: '#/components/responses/Unauthorized' }
42484
42504
  '403':
@@ -42506,6 +42526,10 @@ paths:
42506
42526
 
42507
42527
  `languages` is an array of Google's language codes (ISO 639-1, plus variants
42508
42528
  such as `zh_CN`); an unknown code returns 400.
42529
+
42530
+ The response includes the refreshed `devices`/`locations`/`languages` state
42531
+ read back from Google after the edit, and invalidates the cached copy
42532
+ `GET` on this campaign would otherwise keep serving.
42509
42533
  security:
42510
42534
  - bearerAuth: []
42511
42535
  parameters:
@@ -42566,6 +42590,29 @@ paths:
42566
42590
  properties:
42567
42591
  campaignId: { type: string }
42568
42592
  updated: { type: array, items: { type: string, enum: [devices, locations, languages] }, description: "Which targeting fields were applied." }
42593
+ devices:
42594
+ type: array
42595
+ items:
42596
+ type: object
42597
+ properties:
42598
+ device: { type: string, enum: [MOBILE, DESKTOP, TABLET, CONNECTED_TV] }
42599
+ included: { type: boolean }
42600
+ bidModifier: { type: [number, "null"], description: "Always null on this read; see GET's description." }
42601
+ locations:
42602
+ type: array
42603
+ items:
42604
+ type: object
42605
+ properties:
42606
+ geoTargetId: { type: string, description: "Numeric id from Google's geoTargetConstants/{id}." }
42607
+ negative: { type: boolean, description: "true = excluded location." }
42608
+ languages:
42609
+ type: array
42610
+ items:
42611
+ type: object
42612
+ properties:
42613
+ code: { type: string }
42614
+ id: { type: string }
42615
+ name: { type: string }
42569
42616
  '400': { $ref: '#/components/responses/BadRequest' }
42570
42617
  '401': { $ref: '#/components/responses/Unauthorized' }
42571
42618
  '403':
@@ -45194,7 +45241,11 @@ paths:
45194
45241
  Google Ads compliance row C.75: callout assets linked at the CUSTOMER
45195
45242
  level via `customer_asset` (not a campaign or ad group), so they serve
45196
45243
  fleet-wide across the account. Google only; every other platform
45197
- returns 501. Draws on the shared Google Ads operations budget.
45244
+ returns 501. Cached for the quota window (10 minutes fresh, up to 7
45245
+ days last-good), and gated by the shared Google Ads operations budget
45246
+ on a cache miss. The response carries `cachedAt` and `stale`, set when
45247
+ a quota-exhausted call falls back to the last-good copy instead of a
45248
+ live read.
45198
45249
  security:
45199
45250
  - bearerAuth: []
45200
45251
  parameters:
@@ -45217,11 +45268,14 @@ paths:
45217
45268
  assetId: { type: string }
45218
45269
  text: { type: string }
45219
45270
  status: { type: string, description: "customer_asset.status, e.g. ENABLED, REMOVED, PAUSED." }
45271
+ cachedAt: { type: [string, "null"], format: date-time, description: "When this list was fetched from Google. Null when it was never served from cache." }
45272
+ stale: { type: boolean, description: "True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read." }
45220
45273
  '400': { $ref: '#/components/responses/BadRequest' }
45221
45274
  '401': { $ref: '#/components/responses/Unauthorized' }
45222
45275
  '403':
45223
45276
  description: Ads access required (Ads add-on on legacy plans, included on usage-based plans).
45224
45277
  '404': { $ref: '#/components/responses/NotFound' }
45278
+ '429': { description: Google Ads operations budget exhausted; retry later }
45225
45279
  '501': { description: Only available on Google Ads accounts }
45226
45280
 
45227
45281
  post:
@@ -45424,6 +45478,8 @@ paths:
45424
45478
  minimumDailyBudget: { type: number, description: "Meta only. Minimum daily budget for the account, in the account currency's major units. This is the impressions-billed minimum; other billing events have higher minimums. Absent when the connected token cannot read it." }
45425
45479
  selectable: { type: boolean, description: "Meta and X only. Whether the account can create/run ads now. Absent (treat as true) on other platforms." }
45426
45480
  unusableReason: { type: [string, "null"], description: "Meta and X only. Human-readable reason when selectable is false; null when selectable." }
45481
+ cachedAt: { type: [string, "null"], format: date-time, description: "Google only. When this list was fetched from Google. Null when it was never served from cache, or on other platforms." }
45482
+ stale: { type: boolean, description: "Google only. True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read. Absent on other platforms." }
45427
45483
  '401': { $ref: '#/components/responses/Unauthorized' }
45428
45484
  '422':
45429
45485
  description: Platform ads connection required (TikTok Ads, X Ads) or Instagram missing linked Facebook account
@@ -47737,19 +47793,18 @@ paths:
47737
47793
  x-platforms: ["meta", "linkedin"]
47738
47794
  summary: Search the public Ad Library
47739
47795
  description: |-
47740
- Competitor and market research over the platform's public ad archive, searched with the
47741
- customer's own connected token (no extra scope): Meta's Ad Library (`GET /ads_archive`) for
47742
- a `facebook` / `instagram` / `metaads` account, LinkedIn's Ad Library (`GET /rest/adLibrary`)
47743
- for a `linkedin` / `linkedinads` account. Rows are returned in the platform's raw shape under
47744
- `data`; `paging.after` is an opaque cursor on both (`null` when exhausted).
47796
+ Competitor and market research over the public ad archives. Meta's Ad Library
47797
+ (`GET /ads_archive`) is searched with Zernio's own developer access, so `platform=meta` needs
47798
+ no connected account at all. LinkedIn's Ad Library (`GET /rest/adLibrary`) runs on a connected
47799
+ `linkedin` / `linkedinads` account, passed as `accountId`. Passing a Meta account as `accountId`
47800
+ also selects Meta. Rows are returned in the platform's raw shape under `data`; `paging.after`
47801
+ is an opaque cursor on both (`null` when exhausted).
47745
47802
 
47746
47803
  **Meta coverage.** Political and social-issue ads are searchable worldwide. Every other ad is
47747
47804
  in the archive only if it was delivered to the EU or UK within the last year, so a US-only
47748
47805
  commercial advertiser is invisible. Spend, impressions and demographics are political-only
47749
- fields and are left out of the default projection; request them via `fields`. Meta serves the
47750
- archive only to people who confirmed their identity and location at facebook.com/ID: until the
47751
- Facebook user behind the connection has done so, the call fails with
47752
- `meta_identity_confirmation_required` (403).
47806
+ fields and are left out of the default projection; request them via `fields`. All customers
47807
+ share Zernio's Meta quota, so a `429` means back off for a minute.
47753
47808
 
47754
47809
  **LinkedIn coverage.** Ads served after June 1 2023, worldwide, kept for a year after their
47755
47810
  last impression. EU-delivered ads carry impression ranges and the disclosed targeting facets.
@@ -47762,7 +47817,8 @@ paths:
47762
47817
  security:
47763
47818
  - bearerAuth: []
47764
47819
  parameters:
47765
- - { name: accountId, in: query, required: true, schema: { type: string }, description: "Zernio SocialAccount id (facebook / instagram / metaads for Meta, linkedin / linkedinads for LinkedIn). Its token is the one that searches." }
47820
+ - { name: platform, in: query, schema: { type: string, enum: [meta, linkedin] }, description: "Which archive to search. `meta` needs no accountId. Required unless accountId is given." }
47821
+ - { name: accountId, in: query, schema: { type: string }, description: "Zernio SocialAccount id. Required for LinkedIn (linkedin / linkedinads: its token searches). Optional for Meta, where any facebook / instagram / metaads account just selects the platform." }
47766
47822
  - { name: q, in: query, schema: { type: string, maxLength: 100 }, description: "Keyword search. Meta does not translate it, so write it in the ads' language. Required unless pageIds (Meta) or advertiser (LinkedIn) is given." }
47767
47823
  - { name: pageIds, in: query, schema: { type: string }, description: "Meta only. Comma-separated Facebook Page ids (max 10) whose ads to list." }
47768
47824
  - { name: advertiser, in: query, schema: { type: string, maxLength: 100 }, description: "LinkedIn only. Advertiser (Page) name to search." }
@@ -47836,9 +47892,10 @@ paths:
47836
47892
  '400': { $ref: '#/components/responses/BadRequest' }
47837
47893
  '401': { $ref: '#/components/responses/Unauthorized' }
47838
47894
  '403':
47839
- description: "Ads access required (legacy plans need the Ads add-on), or, on Meta, `meta_identity_confirmation_required`: the Facebook user behind the connection has not confirmed identity and location at facebook.com/ID."
47895
+ description: Ads access required. Legacy plans need the Ads add-on; included by default on usage-based plans.
47840
47896
  '404': { description: Account not found }
47841
47897
  '501': { description: Only supported on Meta and LinkedIn accounts }
47898
+ '503': { description: "Meta's Ad Library is unavailable on Zernio's side (`PLATFORM_DISABLED`); LinkedIn searches are unaffected." }
47842
47899
 
47843
47900
  /v1/ads/targeting/reach-estimate:
47844
47901
  post:
@@ -48913,6 +48970,11 @@ paths:
48913
48970
  `customerId` is optional: when omitted, it is resolved from the connection's
48914
48971
  accessible Google Ads customers, and the call fails with `400` when more than
48915
48972
  one is accessible (pass `customerId` to disambiguate).
48973
+
48974
+ The list itself is cached for the quota window (1 hour fresh, up to 7 days
48975
+ last-good; the cache key does not vary on `type`). The response carries
48976
+ `cachedAt` and `stale`, set when a quota-exhausted call falls back to the
48977
+ last-good copy instead of a live read.
48916
48978
  security:
48917
48979
  - bearerAuth: []
48918
48980
  parameters:
@@ -48931,6 +48993,8 @@ paths:
48931
48993
  actions:
48932
48994
  type: array
48933
48995
  items: { $ref: '#/components/schemas/ConversionAction' }
48996
+ cachedAt: { type: [string, "null"], format: date-time, description: "When this list was fetched from Google. Null when it was never served from cache." }
48997
+ stale: { type: boolean, description: "True when Google's daily API quota was exhausted and this is the last successful fetch, not a live read." }
48934
48998
  '400': { $ref: '#/components/responses/BadRequest' }
48935
48999
  '401': { $ref: '#/components/responses/Unauthorized' }
48936
49000
  '403':
@@ -48947,8 +49011,9 @@ paths:
48947
49011
  description: |
48948
49012
  Creates a `WEBPAGE` conversion action (category `DEFAULT`) and returns it with
48949
49013
  its tag snippets, read back after creation since Google never returns them on
48950
- the create response itself. Google-only; other platforms return `501`. Requires
48951
- the Ads add-on.
49014
+ the create response itself. Invalidates the cached list `GET` on this resource
49015
+ would otherwise keep serving. Google-only; other platforms return `501`.
49016
+ Requires the Ads add-on.
48952
49017
  security:
48953
49018
  - bearerAuth: []
48954
49019
  requestBody:
@@ -181,7 +181,7 @@ describe 'AdAccountsApi' do
181
181
 
182
182
  # unit tests for list_account_callouts
183
183
  # List account-level callout extensions
184
- # Google Ads compliance row C.75: callout assets linked at the CUSTOMER level via `customer_asset` (not a campaign or ad group), so they serve fleet-wide across the account. Google only; every other platform returns 501. Draws on the shared Google Ads operations budget.
184
+ # Google Ads compliance row C.75: callout assets linked at the CUSTOMER level via `customer_asset` (not a campaign or ad group), so they serve fleet-wide across the account. Google only; every other platform returns 501. Cached for the quota window (10 minutes fresh, up to 7 days last-good), and gated by the shared Google Ads operations budget on a cache miss. The response carries `cachedAt` and `stale`, set when a quota-exhausted call falls back to the last-good copy instead of a live read.
185
185
  # @param account_id Google ads SocialAccount id.
186
186
  # @param [Hash] opts the optional parameters
187
187
  # @option opts [String] :customer_id Numeric Google Ads customer id (no dashes). Defaults to the account's connected customer.
@@ -284,7 +284,7 @@ describe 'AdCampaignsApi' do
284
284
 
285
285
  # unit tests for get_campaign_bidding
286
286
  # Read a campaign's current bidding
287
- # Live read of the campaign's bidding strategy on Google, for pre-filling the bid strategy block before a PUT to /v1/ads/campaigns/{campaignId}. Google Ads only; `platform` is required and rejected when it is anything else, since a `campaignId` is not globally unique. Maps Google's bidding strategy onto the same triplet PUT accepts: `LOWEST_COST_WITHOUT_CAP` (Maximize Conversions, no target), `COST_CAP` + `bidAmount` (Target CPA), `LOWEST_COST_WITH_MIN_ROAS` + `roasAverageFloor` (Target ROAS), `LOWEST_COST_WITH_BID_CAP` + `bidAmount` (Maximize Clicks with a CPC ceiling). A campaign on a portfolio strategy returns `portfolio` (id + name) and `bidSpec.portfolioBidStrategyId` instead of the triplet. Anything else (Manual CPC, Target Impression Share, ...) returns `bidSpec: null`; show `biddingStrategyType` as-is.
287
+ # Read of the campaign's bidding strategy on Google, cached for the quota window, for pre-filling the bid strategy block before a PUT to /v1/ads/campaigns/{campaignId}. Google Ads only; `platform` is required and rejected when it is anything else, since a `campaignId` is not globally unique. The response carries `cachedAt` and `stale`, set when a quota-exhausted call falls back to the last-good copy instead of a live read. Maps Google's bidding strategy onto the same triplet PUT accepts: `LOWEST_COST_WITHOUT_CAP` (Maximize Conversions, no target), `COST_CAP` + `bidAmount` (Target CPA), `LOWEST_COST_WITH_MIN_ROAS` + `roasAverageFloor` (Target ROAS), `LOWEST_COST_WITH_BID_CAP` + `bidAmount` (Maximize Clicks with a CPC ceiling). A campaign on a portfolio strategy returns `portfolio` (id + name) and `bidSpec.portfolioBidStrategyId` instead of the triplet. Anything else (Manual CPC, Target Impression Share, ...) returns `bidSpec: null`; show `biddingStrategyType` as-is.
288
288
  # @param campaign_id Numeric Google platform campaign id.
289
289
  # @param account_id Zernio Google Ads SocialAccount id: resolves the customer id + refresh token.
290
290
  # @param platform Required: campaign IDs are not globally unique. Only \"google\" is supported today.
@@ -299,7 +299,7 @@ describe 'AdCampaignsApi' do
299
299
 
300
300
  # unit tests for get_campaign_targeting
301
301
  # Read a Google campaign's device, location, and language targeting
302
- # Google Ads compliance requires geo, language, budget, and bidding targeting set at creation to stay editable afterwards; this reads the live campaign state so an integrator can build an editor around it. Google only; every other platform returns 501. `devices` always lists all four device types with `included` reflecting Google's negative device criteria (a device absent from any negative criterion is included by default). This read has no bid-modifier source, so `bidModifier` is always `null` even for a device with one configured.
302
+ # Google Ads compliance requires geo, language, budget, and bidding targeting set at creation to stay editable afterwards; this reads the campaign state so an integrator can build an editor around it. Cached for the quota window (10 minutes fresh, up to 7 days last-good), not always a live read. Google only; every other platform returns 501. `devices` always lists all four device types with `included` reflecting Google's negative device criteria (a device absent from any negative criterion is included by default). This read has no bid-modifier source, so `bidModifier` is always `null` even for a device with one configured.
303
303
  # @param campaign_id Google platform campaign ID
304
304
  # @param [Hash] opts the optional parameters
305
305
  # @option opts [String] :platform Disambiguates when the same campaignId string exists on more than one connected platform.
@@ -400,7 +400,7 @@ describe 'AdCampaignsApi' do
400
400
 
401
401
  # unit tests for list_bid_strategies
402
402
  # List Google Ads portfolio bid strategies
403
- # Bidding strategy report: type, status, campaign count, clicks, cost, cost per conversion, impressions, average CPC and conversions over the date range (default last 30 days). Reads Google's `bidding_strategy` resource live. Draws on the shared Google Ads operations budget.
403
+ # Bidding strategy report: type, status, campaign count, clicks, cost, cost per conversion, impressions, average CPC and conversions over the date range (default last 30 days). Reads Google's `bidding_strategy` resource, cached for the quota window. Draws on the shared Google Ads operations budget. The response carries `cachedAt` and `stale`, set when a quota-exhausted call falls back to the last-good copy instead of a live read.
404
404
  # @param account_id Google ads SocialAccount id.
405
405
  # @param [Hash] opts the optional parameters
406
406
  # @option opts [String] :customer_id Numeric Google Ads customer id (no dashes). Defaults to the account's connected customer.
@@ -415,7 +415,7 @@ describe 'AdCampaignsApi' do
415
415
 
416
416
  # unit tests for list_campaign_negative_keywords
417
417
  # List campaign-level negative keywords
418
- # Returns the campaign-level negative keywords (`campaign_criterion.negative`), distinct from the ad-group-level negatives under `GET /v1/ads/keywords`. Read live from Google on every call (not synced to Postgres), and gated by the shared Google Ads operations budget like every other on-demand Google surface. The platform is always discovered from the campaign itself; a non-Google campaign returns 501 rather than 404, whether or not `platform` was passed.
418
+ # Returns the campaign-level negative keywords (`campaign_criterion.negative`), distinct from the ad-group-level negatives under `GET /v1/ads/keywords`. Cached for the quota window (not synced to Postgres), and gated by the shared Google Ads operations budget like every other on-demand Google surface. The response carries `cachedAt` and `stale`, set when a quota-exhausted call falls back to the last-good copy instead of a live read. The platform is always discovered from the campaign itself; a non-Google campaign returns 501 rather than 404, whether or not `platform` was passed.
419
419
  # @param campaign_id Platform campaign ID
420
420
  # @param [Hash] opts the optional parameters
421
421
  # @option opts [String] :platform Optional and NOT authoritative: the resolved campaign's own platform decides 200 vs 501, never this hint.
@@ -557,7 +557,7 @@ describe 'AdCampaignsApi' do
557
557
 
558
558
  # unit tests for update_campaign_targeting
559
559
  # Edit a Google campaign's device, location, or language targeting
560
- # Google Ads compliance row M.10: geo and language targeting set at creation must stay editable afterwards. Send at least one of `devices`, `locations`, `languages`; each provided field REPLACES that field's existing criteria on the campaign (a full set, not a delta). Fields left out of the body are untouched. Google only; every other platform returns 501. `locations` accepts the same shapes as campaign creation: a bare array of ISO country codes, or an object with `countries`/`regions`/`cities`/`zips`/`metros` key lists (`key` from GET /v1/ads/targeting/search?dimension=geo). Negative (excluded) locations are left untouched by this endpoint. `languages` is an array of Google's language codes (ISO 639-1, plus variants such as `zh_CN`); an unknown code returns 400.
560
+ # Google Ads compliance row M.10: geo and language targeting set at creation must stay editable afterwards. Send at least one of `devices`, `locations`, `languages`; each provided field REPLACES that field's existing criteria on the campaign (a full set, not a delta). Fields left out of the body are untouched. Google only; every other platform returns 501. `locations` accepts the same shapes as campaign creation: a bare array of ISO country codes, or an object with `countries`/`regions`/`cities`/`zips`/`metros` key lists (`key` from GET /v1/ads/targeting/search?dimension=geo). Negative (excluded) locations are left untouched by this endpoint. `languages` is an array of Google's language codes (ISO 639-1, plus variants such as `zh_CN`); an unknown code returns 400. The response includes the refreshed `devices`/`locations`/`languages` state read back from Google after the edit, and invalidates the cached copy `GET` on this campaign would otherwise keep serving.
561
561
  # @param campaign_id Google platform campaign ID
562
562
  # @param update_campaign_targeting_request
563
563
  # @param [Hash] opts the optional parameters
@@ -100,7 +100,7 @@ describe 'AdInsightsApi' do
100
100
 
101
101
  # unit tests for get_ads_search_terms
102
102
  # Google Ads search terms report
103
- # The actual search queries that triggered your ads, with matched-keyword status and spend metrics — the raw material for wasted-spend analysis and negative-keyword lists. Reads Google's `search_term_view` live; defaults to the last 30 days. Rows are ordered by cost, descending. Draws on the shared Google Ads operations budget.
103
+ # The actual search queries that triggered your ads, with matched-keyword status and spend metrics — the raw material for wasted-spend analysis and negative-keyword lists. Reads Google's `search_term_view`, cached for the quota window; defaults to the last 30 days. Rows are ordered by cost, descending. Draws on the shared Google Ads operations budget. The response carries `cachedAt` and `stale`, set when a quota-exhausted call falls back to the last-good copy instead of a live read.
104
104
  # @param account_id Google ads SocialAccount id.
105
105
  # @param [Hash] opts the optional parameters
106
106
  # @option opts [String] :customer_id Numeric Google Ads customer id (no dashes). Defaults to the account's connected customer.
@@ -34,9 +34,10 @@ describe 'AdLibraryApi' do
34
34
 
35
35
  # unit tests for search_ad_library
36
36
  # Search the public Ad Library
37
- # Competitor and market research over the platform's public ad archive, searched with the customer's own connected token (no extra scope): Meta's Ad Library (`GET /ads_archive`) for a `facebook` / `instagram` / `metaads` account, LinkedIn's Ad Library (`GET /rest/adLibrary`) for a `linkedin` / `linkedinads` account. Rows are returned in the platform's raw shape under `data`; `paging.after` is an opaque cursor on both (`null` when exhausted). **Meta coverage.** Political and social-issue ads are searchable worldwide. Every other ad is in the archive only if it was delivered to the EU or UK within the last year, so a US-only commercial advertiser is invisible. Spend, impressions and demographics are political-only fields and are left out of the default projection; request them via `fields`. Meta serves the archive only to people who confirmed their identity and location at facebook.com/ID: until the Facebook user behind the connection has done so, the call fails with `meta_identity_confirmation_required` (403). **LinkedIn coverage.** Ads served after June 1 2023, worldwide, kept for a year after their last impression. EU-delivered ads carry impression ranges and the disclosed targeting facets. Pages are capped at 25 ads (`limit` > 25 is a 400); `after` is the next offset. Which params apply: `q`, `countries`, `since`, `until`, `limit`, `after` on both; `pageIds`, `adType`, `status`, `platforms`, `mediaType`, `languages`, `searchType`, `fields` are Meta-only; `advertiser` is LinkedIn-only. Passing a param the account's platform does not support is a 400 naming the param.
38
- # @param account_id Zernio SocialAccount id (facebook / instagram / metaads for Meta, linkedin / linkedinads for LinkedIn). Its token is the one that searches.
37
+ # Competitor and market research over the public ad archives. Meta's Ad Library (`GET /ads_archive`) is searched with Zernio's own developer access, so `platform=meta` needs no connected account at all. LinkedIn's Ad Library (`GET /rest/adLibrary`) runs on a connected `linkedin` / `linkedinads` account, passed as `accountId`. Passing a Meta account as `accountId` also selects Meta. Rows are returned in the platform's raw shape under `data`; `paging.after` is an opaque cursor on both (`null` when exhausted). **Meta coverage.** Political and social-issue ads are searchable worldwide. Every other ad is in the archive only if it was delivered to the EU or UK within the last year, so a US-only commercial advertiser is invisible. Spend, impressions and demographics are political-only fields and are left out of the default projection; request them via `fields`. All customers share Zernio's Meta quota, so a `429` means back off for a minute. **LinkedIn coverage.** Ads served after June 1 2023, worldwide, kept for a year after their last impression. EU-delivered ads carry impression ranges and the disclosed targeting facets. Pages are capped at 25 ads (`limit` > 25 is a 400); `after` is the next offset. Which params apply: `q`, `countries`, `since`, `until`, `limit`, `after` on both; `pageIds`, `adType`, `status`, `platforms`, `mediaType`, `languages`, `searchType`, `fields` are Meta-only; `advertiser` is LinkedIn-only. Passing a param the account's platform does not support is a 400 naming the param.
39
38
  # @param [Hash] opts the optional parameters
39
+ # @option opts [String] :platform Which archive to search. `meta` needs no accountId. Required unless accountId is given.
40
+ # @option opts [String] :account_id Zernio SocialAccount id. Required for LinkedIn (linkedin / linkedinads: its token searches). Optional for Meta, where any facebook / instagram / metaads account just selects the platform.
40
41
  # @option opts [String] :q Keyword search. Meta does not translate it, so write it in the ads' language. Required unless pageIds (Meta) or advertiser (LinkedIn) is given.
41
42
  # @option opts [String] :page_ids Meta only. Comma-separated Facebook Page ids (max 10) whose ads to list.
42
43
  # @option opts [String] :advertiser LinkedIn only. Advertiser (Page) name to search.
@@ -60,7 +60,7 @@ describe 'ConversionsApi' do
60
60
 
61
61
  # unit tests for create_conversion_action
62
62
  # Create a website conversion action
63
- # Creates a `WEBPAGE` conversion action (category `DEFAULT`) and returns it with its tag snippets, read back after creation since Google never returns them on the create response itself. Google-only; other platforms return `501`. Requires the Ads add-on.
63
+ # Creates a `WEBPAGE` conversion action (category `DEFAULT`) and returns it with its tag snippets, read back after creation since Google never returns them on the create response itself. Invalidates the cached list `GET` on this resource would otherwise keep serving. Google-only; other platforms return `501`. Requires the Ads add-on.
64
64
  # @param create_conversion_action_request
65
65
  # @param [Hash] opts the optional parameters
66
66
  # @return [CreateConversionAction201Response]
@@ -143,7 +143,7 @@ describe 'ConversionsApi' do
143
143
 
144
144
  # unit tests for list_conversion_actions
145
145
  # List conversion actions and their tag snippets
146
- # Lists Google Ads conversion actions on the resolved customer, all types by default. Each action's `tagSnippets` (global site tag + event snippet) is included when Google has them for that action's type, e.g. `WEBPAGE`. Google-only; other platforms return `501`. Requires the Ads add-on. `customerId` is optional: when omitted, it is resolved from the connection's accessible Google Ads customers, and the call fails with `400` when more than one is accessible (pass `customerId` to disambiguate).
146
+ # Lists Google Ads conversion actions on the resolved customer, all types by default. Each action's `tagSnippets` (global site tag + event snippet) is included when Google has them for that action's type, e.g. `WEBPAGE`. Google-only; other platforms return `501`. Requires the Ads add-on. `customerId` is optional: when omitted, it is resolved from the connection's accessible Google Ads customers, and the call fails with `400` when more than one is accessible (pass `customerId` to disambiguate). The list itself is cached for the quota window (1 hour fresh, up to 7 days last-good; the cache key does not vary on `type`). The response carries `cachedAt` and `stale`, set when a quota-exhausted call falls back to the last-good copy instead of a live read.
147
147
  # @param account_id SocialAccount _id (must be a googleads account).
148
148
  # @param [Hash] opts the optional parameters
149
149
  # @option opts [String] :customer_id Google Ads customer id (digits only). Resolved automatically when the connection has exactly one accessible customer.
@@ -55,4 +55,16 @@ describe Zernio::CampaignBidding do
55
55
  end
56
56
  end
57
57
 
58
+ describe 'test attribute "cached_at"' do
59
+ it 'should work' do
60
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
61
+ end
62
+ end
63
+
64
+ describe 'test attribute "stale"' do
65
+ it 'should work' do
66
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
67
+ end
68
+ end
69
+
58
70
  end
@@ -45,4 +45,16 @@ describe Zernio::GetAdsSearchTerms200Response do
45
45
  end
46
46
  end
47
47
 
48
+ describe 'test attribute "cached_at"' 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
+ describe 'test attribute "stale"' do
55
+ it 'should work' do
56
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
57
+ end
58
+ end
59
+
48
60
  end
@@ -55,6 +55,18 @@ describe Zernio::GetCampaignBidding200Response do
55
55
  end
56
56
  end
57
57
 
58
+ describe 'test attribute "cached_at"' do
59
+ it 'should work' do
60
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
61
+ end
62
+ end
63
+
64
+ describe 'test attribute "stale"' do
65
+ it 'should work' do
66
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
67
+ end
68
+ end
69
+
58
70
  describe 'test attribute "campaign_id"' do
59
71
  it 'should work' do
60
72
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -45,4 +45,16 @@ describe Zernio::GetCampaignTargeting200Response do
45
45
  end
46
46
  end
47
47
 
48
+ describe 'test attribute "cached_at"' 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
+ describe 'test attribute "stale"' do
55
+ it 'should work' do
56
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
57
+ end
58
+ end
59
+
48
60
  end
@@ -39,4 +39,16 @@ describe Zernio::ListAccountCallouts200Response do
39
39
  end
40
40
  end
41
41
 
42
+ describe 'test attribute "cached_at"' 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 "stale"' 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
+
42
54
  end
@@ -33,4 +33,16 @@ describe Zernio::ListAdAccounts200Response do
33
33
  end
34
34
  end
35
35
 
36
+ describe 'test attribute "cached_at"' 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 "stale"' 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
+
36
48
  end
@@ -45,4 +45,16 @@ describe Zernio::ListBidStrategies200Response do
45
45
  end
46
46
  end
47
47
 
48
+ describe 'test attribute "cached_at"' 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
+ describe 'test attribute "stale"' do
55
+ it 'should work' do
56
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
57
+ end
58
+ end
59
+
48
60
  end
@@ -33,4 +33,16 @@ describe Zernio::ListCampaignNegativeKeywords200Response do
33
33
  end
34
34
  end
35
35
 
36
+ describe 'test attribute "cached_at"' 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 "stale"' 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
+
36
48
  end
@@ -39,4 +39,16 @@ describe Zernio::ListConversionActions200Response do
39
39
  end
40
40
  end
41
41
 
42
+ describe 'test attribute "cached_at"' 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 "stale"' 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
+
42
54
  end
@@ -0,0 +1,52 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
5
+
6
+ The version of the OpenAPI document: 1.0.4
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for Zernio::UpdateCampaignTargeting200ResponseDevicesInner
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Zernio::UpdateCampaignTargeting200ResponseDevicesInner do
21
+ #let(:instance) { Zernio::UpdateCampaignTargeting200ResponseDevicesInner.new }
22
+
23
+ describe 'test an instance of UpdateCampaignTargeting200ResponseDevicesInner' do
24
+ it 'should create an instance of UpdateCampaignTargeting200ResponseDevicesInner' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(Zernio::UpdateCampaignTargeting200ResponseDevicesInner)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "device"' 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', ["MOBILE", "DESKTOP", "TABLET", "CONNECTED_TV"])
34
+ # validator.allowable_values.each do |value|
35
+ # expect { instance.device = value }.not_to raise_error
36
+ # end
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "included"' 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
+ describe 'test attribute "bid_modifier"' do
47
+ it 'should work' do
48
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
49
+ end
50
+ end
51
+
52
+ end