late-sdk 0.0.861 → 0.0.863

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 (30) hide show
  1. checksums.yaml +4 -4
  2. data/docs/AdLibraryApi.md +9 -7
  3. data/docs/CreateWhatsAppTemplate200ResponseTemplate.md +3 -1
  4. data/docs/CreateWhatsAppTemplateRequest.md +3 -1
  5. data/docs/GetWhatsAppTemplate200ResponseTemplate.md +2 -0
  6. data/docs/GetWhatsAppTemplates200ResponseTemplatesInner.md +2 -0
  7. data/docs/UpdateWhatsAppTemplateByIdRequest.md +4 -2
  8. data/docs/UpdateWhatsAppTemplateRequest.md +4 -2
  9. data/docs/WhatsAppApi.md +4 -4
  10. data/lib/zernio-sdk/api/ad_library_api.rb +14 -11
  11. data/lib/zernio-sdk/api/whats_app_api.rb +4 -4
  12. data/lib/zernio-sdk/models/create_whats_app_template200_response_template.rb +14 -4
  13. data/lib/zernio-sdk/models/create_whats_app_template_request.rb +14 -4
  14. data/lib/zernio-sdk/models/get_whats_app_template200_response_template.rb +11 -1
  15. data/lib/zernio-sdk/models/get_whats_app_templates200_response_templates_inner.rb +11 -1
  16. data/lib/zernio-sdk/models/update_whats_app_template_by_id_request.rb +17 -14
  17. data/lib/zernio-sdk/models/update_whats_app_template_request.rb +17 -14
  18. data/lib/zernio-sdk/version.rb +1 -1
  19. data/openapi.yaml +29 -17
  20. data/spec/api/ad_library_api_spec.rb +3 -2
  21. data/spec/api/whats_app_api_spec.rb +2 -2
  22. data/spec/models/create_whats_app_template200_response_template_spec.rb +6 -0
  23. data/spec/models/create_whats_app_template_request_spec.rb +6 -0
  24. data/spec/models/get_whats_app_template200_response_template_spec.rb +6 -0
  25. data/spec/models/get_whats_app_templates200_response_templates_inner_spec.rb +6 -0
  26. data/spec/models/update_whats_app_template_by_id_request_spec.rb +6 -0
  27. data/spec/models/update_whats_app_template_request_spec.rb +6 -0
  28. data/zernio-sdk-0.0.863.gem +0 -0
  29. metadata +3 -3
  30. data/zernio-sdk-0.0.861.gem +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 146640c51fef87c69dd69f069dfefc4e727410b38b284b954e44ca6f74a3c528
4
- data.tar.gz: 34f6fbd4a36b170972e28b46966a506c77a99a051e90ca7bdabf1f4fa086fdb5
3
+ metadata.gz: dcc2524124af3d41e5a5fa09514b3b5c19e1a4af0dcc05def42007646934bd4b
4
+ data.tar.gz: deb9414d41461ec14f7bd167f82fafdf871bdec7894559193bb7ec7e34b16e29
5
5
  SHA512:
6
- metadata.gz: d641c72cfb84ec4316fade42b1d296ae4cb0dce1f1896b03708a12bc7912091537e81206db5550aa837d59bd7ff9d427efb3e919c5fa7c0870049d6198ca5b9b
7
- data.tar.gz: a5a26110e0b1257224bbc256df74c880d1430ce1480a99f71264a5576e451a981c4d0446cec8d763dc00cd3644f725a855915fdd0feb1803c1ec516bb4b2d8cb
6
+ metadata.gz: 36e1371ff4a15bc4910171a44f2c8ce382e2026bac275d9fbbb914561026b416056374c13937052778badc8e0ecf39446be4027bb475f9be337da598961c8dd6
7
+ data.tar.gz: cfc6aef3f29f0bf10f552464b9b3d5ddb757ab397cf02862c1dceff6c3dd83fcc5685ce9a2be95ac038b4be3bdcc70c3079762af6452b143550fe6d286900ef4
data/docs/AdLibraryApi.md CHANGED
@@ -9,11 +9,11 @@ All URIs are relative to *https://zernio.com/api*
9
9
 
10
10
  ## search_ad_library
11
11
 
12
- > <SearchAdLibrary200Response> search_ad_library(account_id, opts)
12
+ > <SearchAdLibrary200Response> search_ad_library(opts)
13
13
 
14
14
  Search the public Ad Library
15
15
 
16
- 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.
16
+ 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.
17
17
 
18
18
  ### Examples
19
19
 
@@ -27,8 +27,9 @@ Zernio.configure do |config|
27
27
  end
28
28
 
29
29
  api_instance = Zernio::AdLibraryApi.new
30
- account_id = 'account_id_example' # String | Zernio SocialAccount id (facebook / instagram / metaads for Meta, linkedin / linkedinads for LinkedIn). Its token is the one that searches.
31
30
  opts = {
31
+ platform: 'meta', # String | Which archive to search. `meta` needs no accountId. Required unless accountId is given.
32
+ account_id: 'account_id_example', # String | Zernio SocialAccount id. Required for LinkedIn (linkedin / linkedinads: its token searches). Optional for Meta, where any facebook / instagram / metaads account just selects the platform.
32
33
  q: 'q_example', # String | Keyword search. Meta does not translate it, so write it in the ads' language. Required unless pageIds (Meta) or advertiser (LinkedIn) is given.
33
34
  page_ids: 'page_ids_example', # String | Meta only. Comma-separated Facebook Page ids (max 10) whose ads to list.
34
35
  advertiser: 'advertiser_example', # String | LinkedIn only. Advertiser (Page) name to search.
@@ -48,7 +49,7 @@ opts = {
48
49
 
49
50
  begin
50
51
  # Search the public Ad Library
51
- result = api_instance.search_ad_library(account_id, opts)
52
+ result = api_instance.search_ad_library(opts)
52
53
  p result
53
54
  rescue Zernio::ApiError => e
54
55
  puts "Error when calling AdLibraryApi->search_ad_library: #{e}"
@@ -59,12 +60,12 @@ end
59
60
 
60
61
  This returns an Array which contains the response data, status code and headers.
61
62
 
62
- > <Array(<SearchAdLibrary200Response>, Integer, Hash)> search_ad_library_with_http_info(account_id, opts)
63
+ > <Array(<SearchAdLibrary200Response>, Integer, Hash)> search_ad_library_with_http_info(opts)
63
64
 
64
65
  ```ruby
65
66
  begin
66
67
  # Search the public Ad Library
67
- data, status_code, headers = api_instance.search_ad_library_with_http_info(account_id, opts)
68
+ data, status_code, headers = api_instance.search_ad_library_with_http_info(opts)
68
69
  p status_code # => 2xx
69
70
  p headers # => { ... }
70
71
  p data # => <SearchAdLibrary200Response>
@@ -77,7 +78,8 @@ end
77
78
 
78
79
  | Name | Type | Description | Notes |
79
80
  | ---- | ---- | ----------- | ----- |
80
- | **account_id** | **String** | Zernio SocialAccount id (facebook / instagram / metaads for Meta, linkedin / linkedinads for LinkedIn). Its token is the one that searches. | |
81
+ | **platform** | **String** | Which archive to search. &#x60;meta&#x60; needs no accountId. Required unless accountId is given. | [optional] |
82
+ | **account_id** | **String** | Zernio SocialAccount id. Required for LinkedIn (linkedin / linkedinads: its token searches). Optional for Meta, where any facebook / instagram / metaads account just selects the platform. | [optional] |
81
83
  | **q** | **String** | Keyword search. Meta does not translate it, so write it in the ads&#39; language. Required unless pageIds (Meta) or advertiser (LinkedIn) is given. | [optional] |
82
84
  | **page_ids** | **String** | Meta only. Comma-separated Facebook Page ids (max 10) whose ads to list. | [optional] |
83
85
  | **advertiser** | **String** | LinkedIn only. Advertiser (Page) name to search. | [optional] |
@@ -9,6 +9,7 @@
9
9
  | **status** | **String** | APPROVED for library templates, PENDING for custom | [optional] |
10
10
  | **category** | **String** | | [optional] |
11
11
  | **language** | **String** | | [optional] |
12
+ | **message_send_ttl_seconds** | **Integer** | Echoed when supplied on the request. | [optional] |
12
13
 
13
14
  ## Example
14
15
 
@@ -20,7 +21,8 @@ instance = Zernio::CreateWhatsAppTemplate200ResponseTemplate.new(
20
21
  name: null,
21
22
  status: null,
22
23
  category: null,
23
- language: null
24
+ language: null,
25
+ message_send_ttl_seconds: null
24
26
  )
25
27
  ```
26
28
 
@@ -13,6 +13,7 @@
13
13
  | **library_template_name** | **String** | Name of a pre-built template from Meta&#39;s template library (e.g., \&quot;appointment_reminder\&quot;, \&quot;auto_pay_reminder_1\&quot;, \&quot;address_update\&quot;). When provided, the template is pre-approved by Meta with no review wait. Omit components when using this field. | [optional] |
14
14
  | **library_template_body_inputs** | **Object** | Optional body customizations for library templates. Available options depend on the template (e.g., add_contact_number, add_learn_more_link, add_security_recommendation, add_track_package_link, code_expiration_minutes). | [optional] |
15
15
  | **library_template_button_inputs** | [**Array&lt;CreateWhatsAppTemplateRequestLibraryTemplateButtonInputsInner&gt;**](CreateWhatsAppTemplateRequestLibraryTemplateButtonInputsInner.md) | Optional button customizations for library templates. Each item specifies button type and configuration (e.g., URL, phone number, quick reply). | [optional] |
16
+ | **message_send_ttl_seconds** | **Integer** | Delivery validity window in seconds: a message not delivered within it is dropped. Range depends on category: AUTHENTICATION 30 to 900, UTILITY 30 to 43200 (12h), MARKETING 43200 to 2592000 (30 days); -1 restores the 30-day default on AUTHENTICATION and UTILITY. Meta defaults to 600 for AUTHENTICATION and 30 days otherwise. If Meta later recategorises the template, it clears the TTL (read it back to check). | [optional] |
16
17
 
17
18
  ## Example
18
19
 
@@ -28,7 +29,8 @@ instance = Zernio::CreateWhatsAppTemplateRequest.new(
28
29
  components: null,
29
30
  library_template_name: null,
30
31
  library_template_body_inputs: null,
31
- library_template_button_inputs: null
32
+ library_template_button_inputs: null,
33
+ message_send_ttl_seconds: null
32
34
  )
33
35
  ```
34
36
 
@@ -10,6 +10,7 @@
10
10
  | **category** | **String** | | [optional] |
11
11
  | **language** | **String** | The variant actually returned. | [optional] |
12
12
  | **components** | **Array&lt;Object&gt;** | | [optional] |
13
+ | **message_send_ttl_seconds** | **Integer** | Only when a custom TTL is set; absent while the category default applies. | [optional] |
13
14
  | **rejected_reason** | **String** | Only when status is REJECTED. | [optional] |
14
15
  | **quality_score** | **Object** | Post-approval quality (GREEN/YELLOW/RED), when Meta reports one. | [optional] |
15
16
 
@@ -25,6 +26,7 @@ instance = Zernio::GetWhatsAppTemplate200ResponseTemplate.new(
25
26
  category: null,
26
27
  language: null,
27
28
  components: null,
29
+ message_send_ttl_seconds: null,
28
30
  rejected_reason: null,
29
31
  quality_score: null
30
32
  )
@@ -9,6 +9,7 @@
9
9
  | **status** | **String** | | [optional] |
10
10
  | **category** | **String** | | [optional] |
11
11
  | **language** | **String** | | [optional] |
12
+ | **message_send_ttl_seconds** | **Integer** | Only when a custom TTL is set; absent while the category default applies. | [optional] |
12
13
  | **components** | **Array&lt;Object&gt;** | | [optional] |
13
14
 
14
15
  ## Example
@@ -22,6 +23,7 @@ instance = Zernio::GetWhatsAppTemplates200ResponseTemplatesInner.new(
22
23
  status: null,
23
24
  category: null,
24
25
  language: null,
26
+ message_send_ttl_seconds: null,
25
27
  components: null
26
28
  )
27
29
  ```
@@ -5,7 +5,8 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **account_id** | **String** | WhatsApp social account ID | |
8
- | **components** | [**Array&lt;WhatsAppTemplateComponent&gt;**](WhatsAppTemplateComponent.md) | Updated template components | |
8
+ | **components** | [**Array&lt;WhatsAppTemplateComponent&gt;**](WhatsAppTemplateComponent.md) | Updated template components. Optional when only message_send_ttl_seconds changes; at least one of the two is required. | [optional] |
9
+ | **message_send_ttl_seconds** | **Integer** | Delivery validity window in seconds: a message not delivered within it is dropped. Range depends on category: AUTHENTICATION 30 to 900, UTILITY 30 to 43200 (12h), MARKETING 43200 to 2592000 (30 days); -1 restores the 30-day default on AUTHENTICATION and UTILITY. Meta defaults to 600 for AUTHENTICATION and 30 days otherwise. If Meta later recategorises the template, it clears the TTL (read it back to check). | [optional] |
9
10
 
10
11
  ## Example
11
12
 
@@ -14,7 +15,8 @@ require 'zernio-sdk'
14
15
 
15
16
  instance = Zernio::UpdateWhatsAppTemplateByIdRequest.new(
16
17
  account_id: null,
17
- components: null
18
+ components: null,
19
+ message_send_ttl_seconds: null
18
20
  )
19
21
  ```
20
22
 
@@ -6,7 +6,8 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **account_id** | **String** | WhatsApp social account ID | |
8
8
  | **language** | **String** | Language code of the variant to edit (e.g. en_US, es, pt_BR). Required when the family has several languages. Body only: a language query parameter on PATCH is a 400. | [optional] |
9
- | **components** | [**Array&lt;WhatsAppTemplateComponent&gt;**](WhatsAppTemplateComponent.md) | Updated template components | |
9
+ | **components** | [**Array&lt;WhatsAppTemplateComponent&gt;**](WhatsAppTemplateComponent.md) | Updated template components. Optional when only message_send_ttl_seconds changes; at least one of the two is required. | [optional] |
10
+ | **message_send_ttl_seconds** | **Integer** | Delivery validity window in seconds: a message not delivered within it is dropped. Range depends on category: AUTHENTICATION 30 to 900, UTILITY 30 to 43200 (12h), MARKETING 43200 to 2592000 (30 days); -1 restores the 30-day default on AUTHENTICATION and UTILITY. Meta defaults to 600 for AUTHENTICATION and 30 days otherwise. If Meta later recategorises the template, it clears the TTL (read it back to check). | [optional] |
10
11
 
11
12
  ## Example
12
13
 
@@ -16,7 +17,8 @@ require 'zernio-sdk'
16
17
  instance = Zernio::UpdateWhatsAppTemplateRequest.new(
17
18
  account_id: null,
18
19
  language: null,
19
- components: null
20
+ components: null,
21
+ message_send_ttl_seconds: null
20
22
  )
21
23
  ```
22
24
 
data/docs/WhatsAppApi.md CHANGED
@@ -2615,7 +2615,7 @@ end
2615
2615
 
2616
2616
  Update template
2617
2617
 
2618
- Update one variant's components. Name, language and category cannot change after creation. Meta stores one template per **name + language**, so a name identifies a family of variants, each with its own Meta id. Pass `language` to address one variant. Without it, a name with a single variant resolves to that variant; a name with several returns `409 ambiguous_template` with `details.languages`. A bare language (`es`) matches a single regional variant (`es_ES`); if the family has several regional variants for it, that is also a 409. A full code (`es_ES`) must match exactly. Variants in `PENDING_DELETION` are not part of the family. Meta only allows editing templates in `APPROVED`, `REJECTED` or `PAUSED` state; an approved template can be edited once per 24 hours and up to 10 times per 30 days. A successful update sends the variant back to Meta for review, so the `status` returned here is normally `PENDING`. The final outcome arrives on the `whatsapp.template.status_updated` webhook (which carries the variant's `templateId` and `language`). A variant already in `PENDING` cannot be edited again until Meta finishes reviewing it.
2618
+ Update one variant's components and/or its message_send_ttl_seconds. Name, language and category cannot change after creation. Meta stores one template per **name + language**, so a name identifies a family of variants, each with its own Meta id. Pass `language` to address one variant. Without it, a name with a single variant resolves to that variant; a name with several returns `409 ambiguous_template` with `details.languages`. A bare language (`es`) matches a single regional variant (`es_ES`); if the family has several regional variants for it, that is also a 409. A full code (`es_ES`) must match exactly. Variants in `PENDING_DELETION` are not part of the family. Meta only allows editing templates in `APPROVED`, `REJECTED` or `PAUSED` state; an approved template can be edited once per 24 hours and up to 10 times per 30 days. A successful update sends the variant back to Meta for review, so the `status` returned here is normally `PENDING`. The final outcome arrives on the `whatsapp.template.status_updated` webhook (which carries the variant's `templateId` and `language`). A variant already in `PENDING` cannot be edited again until Meta finishes reviewing it.
2619
2619
 
2620
2620
  ### Examples
2621
2621
 
@@ -2630,7 +2630,7 @@ end
2630
2630
 
2631
2631
  api_instance = Zernio::WhatsAppApi.new
2632
2632
  template_name = 'template_name_example' # String | Template name (the family).
2633
- update_whats_app_template_request = Zernio::UpdateWhatsAppTemplateRequest.new({account_id: 'account_id_example', components: [Zernio::WhatsAppBodyComponent.new({type: 'body', text: 'text_example'})]}) # UpdateWhatsAppTemplateRequest |
2633
+ update_whats_app_template_request = Zernio::UpdateWhatsAppTemplateRequest.new({account_id: 'account_id_example'}) # UpdateWhatsAppTemplateRequest |
2634
2634
 
2635
2635
  begin
2636
2636
  # Update template
@@ -2686,7 +2686,7 @@ end
2686
2686
 
2687
2687
  Update template by id
2688
2688
 
2689
- Update one variant's components by its Meta id. Name, language and category cannot change. Meta only allows editing templates in `APPROVED`, `REJECTED` or `PAUSED` state; an approved template can be edited once per 24 hours and up to 10 times per 30 days. A successful update sends the variant back to Meta for review, so the `status` returned here is normally `PENDING`. The final outcome arrives on the `whatsapp.template.status_updated` webhook (which carries the variant's `templateId` and `language`). A variant already in `PENDING` cannot be edited again until Meta finishes reviewing it.
2689
+ Update one variant's components and/or its message_send_ttl_seconds by its Meta id. Name, language and category cannot change. Meta only allows editing templates in `APPROVED`, `REJECTED` or `PAUSED` state; an approved template can be edited once per 24 hours and up to 10 times per 30 days. A successful update sends the variant back to Meta for review, so the `status` returned here is normally `PENDING`. The final outcome arrives on the `whatsapp.template.status_updated` webhook (which carries the variant's `templateId` and `language`). A variant already in `PENDING` cannot be edited again until Meta finishes reviewing it.
2690
2690
 
2691
2691
  ### Examples
2692
2692
 
@@ -2701,7 +2701,7 @@ end
2701
2701
 
2702
2702
  api_instance = Zernio::WhatsAppApi.new
2703
2703
  template_id = 'template_id_example' # String | Meta template id (numeric).
2704
- update_whats_app_template_by_id_request = Zernio::UpdateWhatsAppTemplateByIdRequest.new({account_id: 'account_id_example', components: [Zernio::WhatsAppBodyComponent.new({type: 'body', text: 'text_example'})]}) # UpdateWhatsAppTemplateByIdRequest |
2704
+ update_whats_app_template_by_id_request = Zernio::UpdateWhatsAppTemplateByIdRequest.new({account_id: 'account_id_example'}) # UpdateWhatsAppTemplateByIdRequest |
2705
2705
 
2706
2706
  begin
2707
2707
  # Update template by id
@@ -20,9 +20,10 @@ module Zernio
20
20
  @api_client = api_client
21
21
  end
22
22
  # Search the public Ad Library
23
- # 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.
24
- # @param account_id [String] Zernio SocialAccount id (facebook / instagram / metaads for Meta, linkedin / linkedinads for LinkedIn). Its token is the one that searches.
23
+ # 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.
25
24
  # @param [Hash] opts the optional parameters
25
+ # @option opts [String] :platform Which archive to search. &#x60;meta&#x60; needs no accountId. Required unless accountId is given.
26
+ # @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.
26
27
  # @option opts [String] :q Keyword search. Meta does not translate it, so write it in the ads&#39; language. Required unless pageIds (Meta) or advertiser (LinkedIn) is given.
27
28
  # @option opts [String] :page_ids Meta only. Comma-separated Facebook Page ids (max 10) whose ads to list.
28
29
  # @option opts [String] :advertiser LinkedIn only. Advertiser (Page) name to search.
@@ -39,15 +40,16 @@ module Zernio
39
40
  # @option opts [Integer] :limit Rows per page. LinkedIn accepts at most 25. (default to 25)
40
41
  # @option opts [String] :after paging.after of the previous page.
41
42
  # @return [SearchAdLibrary200Response]
42
- def search_ad_library(account_id, opts = {})
43
- data, _status_code, _headers = search_ad_library_with_http_info(account_id, opts)
43
+ def search_ad_library(opts = {})
44
+ data, _status_code, _headers = search_ad_library_with_http_info(opts)
44
45
  data
45
46
  end
46
47
 
47
48
  # Search the public Ad Library
48
- # Competitor and market research over the platform&#39;s public ad archive, searched with the customer&#39;s own connected token (no extra scope): Meta&#39;s Ad Library (&#x60;GET /ads_archive&#x60;) for a &#x60;facebook&#x60; / &#x60;instagram&#x60; / &#x60;metaads&#x60; account, LinkedIn&#39;s Ad Library (&#x60;GET /rest/adLibrary&#x60;) for a &#x60;linkedin&#x60; / &#x60;linkedinads&#x60; account. Rows are returned in the platform&#39;s raw shape under &#x60;data&#x60;; &#x60;paging.after&#x60; is an opaque cursor on both (&#x60;null&#x60; 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 &#x60;fields&#x60;. 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 &#x60;meta_identity_confirmation_required&#x60; (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 (&#x60;limit&#x60; &gt; 25 is a 400); &#x60;after&#x60; is the next offset. Which params apply: &#x60;q&#x60;, &#x60;countries&#x60;, &#x60;since&#x60;, &#x60;until&#x60;, &#x60;limit&#x60;, &#x60;after&#x60; on both; &#x60;pageIds&#x60;, &#x60;adType&#x60;, &#x60;status&#x60;, &#x60;platforms&#x60;, &#x60;mediaType&#x60;, &#x60;languages&#x60;, &#x60;searchType&#x60;, &#x60;fields&#x60; are Meta-only; &#x60;advertiser&#x60; is LinkedIn-only. Passing a param the account&#39;s platform does not support is a 400 naming the param.
49
- # @param account_id [String] Zernio SocialAccount id (facebook / instagram / metaads for Meta, linkedin / linkedinads for LinkedIn). Its token is the one that searches.
49
+ # Competitor and market research over the public ad archives. Meta&#39;s Ad Library (&#x60;GET /ads_archive&#x60;) is searched with Zernio&#39;s own developer access, so &#x60;platform&#x3D;meta&#x60; needs no connected account at all. LinkedIn&#39;s Ad Library (&#x60;GET /rest/adLibrary&#x60;) runs on a connected &#x60;linkedin&#x60; / &#x60;linkedinads&#x60; account, passed as &#x60;accountId&#x60;. Passing a Meta account as &#x60;accountId&#x60; also selects Meta. Rows are returned in the platform&#39;s raw shape under &#x60;data&#x60;; &#x60;paging.after&#x60; is an opaque cursor on both (&#x60;null&#x60; 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 &#x60;fields&#x60;. All customers share Zernio&#39;s Meta quota, so a &#x60;429&#x60; 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 (&#x60;limit&#x60; &gt; 25 is a 400); &#x60;after&#x60; is the next offset. Which params apply: &#x60;q&#x60;, &#x60;countries&#x60;, &#x60;since&#x60;, &#x60;until&#x60;, &#x60;limit&#x60;, &#x60;after&#x60; on both; &#x60;pageIds&#x60;, &#x60;adType&#x60;, &#x60;status&#x60;, &#x60;platforms&#x60;, &#x60;mediaType&#x60;, &#x60;languages&#x60;, &#x60;searchType&#x60;, &#x60;fields&#x60; are Meta-only; &#x60;advertiser&#x60; is LinkedIn-only. Passing a param the account&#39;s platform does not support is a 400 naming the param.
50
50
  # @param [Hash] opts the optional parameters
51
+ # @option opts [String] :platform Which archive to search. &#x60;meta&#x60; needs no accountId. Required unless accountId is given.
52
+ # @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.
51
53
  # @option opts [String] :q Keyword search. Meta does not translate it, so write it in the ads&#39; language. Required unless pageIds (Meta) or advertiser (LinkedIn) is given.
52
54
  # @option opts [String] :page_ids Meta only. Comma-separated Facebook Page ids (max 10) whose ads to list.
53
55
  # @option opts [String] :advertiser LinkedIn only. Advertiser (Page) name to search.
@@ -64,13 +66,13 @@ module Zernio
64
66
  # @option opts [Integer] :limit Rows per page. LinkedIn accepts at most 25. (default to 25)
65
67
  # @option opts [String] :after paging.after of the previous page.
66
68
  # @return [Array<(SearchAdLibrary200Response, Integer, Hash)>] SearchAdLibrary200Response data, response status code and response headers
67
- def search_ad_library_with_http_info(account_id, opts = {})
69
+ def search_ad_library_with_http_info(opts = {})
68
70
  if @api_client.config.debugging
69
71
  @api_client.config.logger.debug 'Calling API: AdLibraryApi.search_ad_library ...'
70
72
  end
71
- # verify the required parameter 'account_id' is set
72
- if @api_client.config.client_side_validation && account_id.nil?
73
- fail ArgumentError, "Missing the required parameter 'account_id' when calling AdLibraryApi.search_ad_library"
73
+ allowable_values = ["meta", "linkedin"]
74
+ if @api_client.config.client_side_validation && opts[:'platform'] && !allowable_values.include?(opts[:'platform'])
75
+ fail ArgumentError, "invalid value for \"platform\", must be one of #{allowable_values}"
74
76
  end
75
77
  if @api_client.config.client_side_validation && !opts[:'q'].nil? && opts[:'q'].to_s.length > 100
76
78
  fail ArgumentError, 'invalid value for "opts[:"q"]" when calling AdLibraryApi.search_ad_library, the character length must be smaller than or equal to 100.'
@@ -109,7 +111,8 @@ module Zernio
109
111
 
110
112
  # query parameters
111
113
  query_params = opts[:query_params] || {}
112
- query_params[:'accountId'] = account_id
114
+ query_params[:'platform'] = opts[:'platform'] if !opts[:'platform'].nil?
115
+ query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?
113
116
  query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
114
117
  query_params[:'pageIds'] = opts[:'page_ids'] if !opts[:'page_ids'].nil?
115
118
  query_params[:'advertiser'] = opts[:'advertiser'] if !opts[:'advertiser'].nil?
@@ -2581,7 +2581,7 @@ module Zernio
2581
2581
  end
2582
2582
 
2583
2583
  # Update template
2584
- # Update one variant's components. Name, language and category cannot change after creation. Meta stores one template per **name + language**, so a name identifies a family of variants, each with its own Meta id. Pass `language` to address one variant. Without it, a name with a single variant resolves to that variant; a name with several returns `409 ambiguous_template` with `details.languages`. A bare language (`es`) matches a single regional variant (`es_ES`); if the family has several regional variants for it, that is also a 409. A full code (`es_ES`) must match exactly. Variants in `PENDING_DELETION` are not part of the family. Meta only allows editing templates in `APPROVED`, `REJECTED` or `PAUSED` state; an approved template can be edited once per 24 hours and up to 10 times per 30 days. A successful update sends the variant back to Meta for review, so the `status` returned here is normally `PENDING`. The final outcome arrives on the `whatsapp.template.status_updated` webhook (which carries the variant's `templateId` and `language`). A variant already in `PENDING` cannot be edited again until Meta finishes reviewing it.
2584
+ # Update one variant's components and/or its message_send_ttl_seconds. Name, language and category cannot change after creation. Meta stores one template per **name + language**, so a name identifies a family of variants, each with its own Meta id. Pass `language` to address one variant. Without it, a name with a single variant resolves to that variant; a name with several returns `409 ambiguous_template` with `details.languages`. A bare language (`es`) matches a single regional variant (`es_ES`); if the family has several regional variants for it, that is also a 409. A full code (`es_ES`) must match exactly. Variants in `PENDING_DELETION` are not part of the family. Meta only allows editing templates in `APPROVED`, `REJECTED` or `PAUSED` state; an approved template can be edited once per 24 hours and up to 10 times per 30 days. A successful update sends the variant back to Meta for review, so the `status` returned here is normally `PENDING`. The final outcome arrives on the `whatsapp.template.status_updated` webhook (which carries the variant's `templateId` and `language`). A variant already in `PENDING` cannot be edited again until Meta finishes reviewing it.
2585
2585
  # @param template_name [String] Template name (the family).
2586
2586
  # @param update_whats_app_template_request [UpdateWhatsAppTemplateRequest]
2587
2587
  # @param [Hash] opts the optional parameters
@@ -2592,7 +2592,7 @@ module Zernio
2592
2592
  end
2593
2593
 
2594
2594
  # Update template
2595
- # Update one variant&#39;s components. Name, language and category cannot change after creation. Meta stores one template per **name + language**, so a name identifies a family of variants, each with its own Meta id. Pass &#x60;language&#x60; to address one variant. Without it, a name with a single variant resolves to that variant; a name with several returns &#x60;409 ambiguous_template&#x60; with &#x60;details.languages&#x60;. A bare language (&#x60;es&#x60;) matches a single regional variant (&#x60;es_ES&#x60;); if the family has several regional variants for it, that is also a 409. A full code (&#x60;es_ES&#x60;) must match exactly. Variants in &#x60;PENDING_DELETION&#x60; are not part of the family. Meta only allows editing templates in &#x60;APPROVED&#x60;, &#x60;REJECTED&#x60; or &#x60;PAUSED&#x60; state; an approved template can be edited once per 24 hours and up to 10 times per 30 days. A successful update sends the variant back to Meta for review, so the &#x60;status&#x60; returned here is normally &#x60;PENDING&#x60;. The final outcome arrives on the &#x60;whatsapp.template.status_updated&#x60; webhook (which carries the variant&#39;s &#x60;templateId&#x60; and &#x60;language&#x60;). A variant already in &#x60;PENDING&#x60; cannot be edited again until Meta finishes reviewing it.
2595
+ # Update one variant&#39;s components and/or its message_send_ttl_seconds. Name, language and category cannot change after creation. Meta stores one template per **name + language**, so a name identifies a family of variants, each with its own Meta id. Pass &#x60;language&#x60; to address one variant. Without it, a name with a single variant resolves to that variant; a name with several returns &#x60;409 ambiguous_template&#x60; with &#x60;details.languages&#x60;. A bare language (&#x60;es&#x60;) matches a single regional variant (&#x60;es_ES&#x60;); if the family has several regional variants for it, that is also a 409. A full code (&#x60;es_ES&#x60;) must match exactly. Variants in &#x60;PENDING_DELETION&#x60; are not part of the family. Meta only allows editing templates in &#x60;APPROVED&#x60;, &#x60;REJECTED&#x60; or &#x60;PAUSED&#x60; state; an approved template can be edited once per 24 hours and up to 10 times per 30 days. A successful update sends the variant back to Meta for review, so the &#x60;status&#x60; returned here is normally &#x60;PENDING&#x60;. The final outcome arrives on the &#x60;whatsapp.template.status_updated&#x60; webhook (which carries the variant&#39;s &#x60;templateId&#x60; and &#x60;language&#x60;). A variant already in &#x60;PENDING&#x60; cannot be edited again until Meta finishes reviewing it.
2596
2596
  # @param template_name [String] Template name (the family).
2597
2597
  # @param update_whats_app_template_request [UpdateWhatsAppTemplateRequest]
2598
2598
  # @param [Hash] opts the optional parameters
@@ -2655,7 +2655,7 @@ module Zernio
2655
2655
  end
2656
2656
 
2657
2657
  # Update template by id
2658
- # Update one variant's components by its Meta id. Name, language and category cannot change. Meta only allows editing templates in `APPROVED`, `REJECTED` or `PAUSED` state; an approved template can be edited once per 24 hours and up to 10 times per 30 days. A successful update sends the variant back to Meta for review, so the `status` returned here is normally `PENDING`. The final outcome arrives on the `whatsapp.template.status_updated` webhook (which carries the variant's `templateId` and `language`). A variant already in `PENDING` cannot be edited again until Meta finishes reviewing it.
2658
+ # Update one variant's components and/or its message_send_ttl_seconds by its Meta id. Name, language and category cannot change. Meta only allows editing templates in `APPROVED`, `REJECTED` or `PAUSED` state; an approved template can be edited once per 24 hours and up to 10 times per 30 days. A successful update sends the variant back to Meta for review, so the `status` returned here is normally `PENDING`. The final outcome arrives on the `whatsapp.template.status_updated` webhook (which carries the variant's `templateId` and `language`). A variant already in `PENDING` cannot be edited again until Meta finishes reviewing it.
2659
2659
  # @param template_id [String] Meta template id (numeric).
2660
2660
  # @param update_whats_app_template_by_id_request [UpdateWhatsAppTemplateByIdRequest]
2661
2661
  # @param [Hash] opts the optional parameters
@@ -2666,7 +2666,7 @@ module Zernio
2666
2666
  end
2667
2667
 
2668
2668
  # Update template by id
2669
- # Update one variant&#39;s components by its Meta id. Name, language and category cannot change. Meta only allows editing templates in &#x60;APPROVED&#x60;, &#x60;REJECTED&#x60; or &#x60;PAUSED&#x60; state; an approved template can be edited once per 24 hours and up to 10 times per 30 days. A successful update sends the variant back to Meta for review, so the &#x60;status&#x60; returned here is normally &#x60;PENDING&#x60;. The final outcome arrives on the &#x60;whatsapp.template.status_updated&#x60; webhook (which carries the variant&#39;s &#x60;templateId&#x60; and &#x60;language&#x60;). A variant already in &#x60;PENDING&#x60; cannot be edited again until Meta finishes reviewing it.
2669
+ # Update one variant&#39;s components and/or its message_send_ttl_seconds by its Meta id. Name, language and category cannot change. Meta only allows editing templates in &#x60;APPROVED&#x60;, &#x60;REJECTED&#x60; or &#x60;PAUSED&#x60; state; an approved template can be edited once per 24 hours and up to 10 times per 30 days. A successful update sends the variant back to Meta for review, so the &#x60;status&#x60; returned here is normally &#x60;PENDING&#x60;. The final outcome arrives on the &#x60;whatsapp.template.status_updated&#x60; webhook (which carries the variant&#39;s &#x60;templateId&#x60; and &#x60;language&#x60;). A variant already in &#x60;PENDING&#x60; cannot be edited again until Meta finishes reviewing it.
2670
2670
  # @param template_id [String] Meta template id (numeric).
2671
2671
  # @param update_whats_app_template_by_id_request [UpdateWhatsAppTemplateByIdRequest]
2672
2672
  # @param [Hash] opts the optional parameters
@@ -26,6 +26,9 @@ module Zernio
26
26
 
27
27
  attr_accessor :language
28
28
 
29
+ # Echoed when supplied on the request.
30
+ attr_accessor :message_send_ttl_seconds
31
+
29
32
  # Attribute mapping from ruby-style variable name to JSON key.
30
33
  def self.attribute_map
31
34
  {
@@ -33,7 +36,8 @@ module Zernio
33
36
  :'name' => :'name',
34
37
  :'status' => :'status',
35
38
  :'category' => :'category',
36
- :'language' => :'language'
39
+ :'language' => :'language',
40
+ :'message_send_ttl_seconds' => :'message_send_ttl_seconds'
37
41
  }
38
42
  end
39
43
 
@@ -54,7 +58,8 @@ module Zernio
54
58
  :'name' => :'String',
55
59
  :'status' => :'String',
56
60
  :'category' => :'String',
57
- :'language' => :'String'
61
+ :'language' => :'String',
62
+ :'message_send_ttl_seconds' => :'Integer'
58
63
  }
59
64
  end
60
65
 
@@ -99,6 +104,10 @@ module Zernio
99
104
  if attributes.key?(:'language')
100
105
  self.language = attributes[:'language']
101
106
  end
107
+
108
+ if attributes.key?(:'message_send_ttl_seconds')
109
+ self.message_send_ttl_seconds = attributes[:'message_send_ttl_seconds']
110
+ end
102
111
  end
103
112
 
104
113
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -125,7 +134,8 @@ module Zernio
125
134
  name == o.name &&
126
135
  status == o.status &&
127
136
  category == o.category &&
128
- language == o.language
137
+ language == o.language &&
138
+ message_send_ttl_seconds == o.message_send_ttl_seconds
129
139
  end
130
140
 
131
141
  # @see the `==` method
@@ -137,7 +147,7 @@ module Zernio
137
147
  # Calculates hash code according to all attributes.
138
148
  # @return [Integer] Hash code
139
149
  def hash
140
- [id, name, status, category, language].hash
150
+ [id, name, status, category, language, message_send_ttl_seconds].hash
141
151
  end
142
152
 
143
153
  # Builds the object from hash
@@ -42,6 +42,9 @@ module Zernio
42
42
  # Optional button customizations for library templates. Each item specifies button type and configuration (e.g., URL, phone number, quick reply).
43
43
  attr_accessor :library_template_button_inputs
44
44
 
45
+ # Delivery validity window in seconds: a message not delivered within it is dropped. Range depends on category: AUTHENTICATION 30 to 900, UTILITY 30 to 43200 (12h), MARKETING 43200 to 2592000 (30 days); -1 restores the 30-day default on AUTHENTICATION and UTILITY. Meta defaults to 600 for AUTHENTICATION and 30 days otherwise. If Meta later recategorises the template, it clears the TTL (read it back to check).
46
+ attr_accessor :message_send_ttl_seconds
47
+
45
48
  class EnumAttributeValidator
46
49
  attr_reader :datatype
47
50
  attr_reader :allowable_values
@@ -75,7 +78,8 @@ module Zernio
75
78
  :'components' => :'components',
76
79
  :'library_template_name' => :'library_template_name',
77
80
  :'library_template_body_inputs' => :'library_template_body_inputs',
78
- :'library_template_button_inputs' => :'library_template_button_inputs'
81
+ :'library_template_button_inputs' => :'library_template_button_inputs',
82
+ :'message_send_ttl_seconds' => :'message_send_ttl_seconds'
79
83
  }
80
84
  end
81
85
 
@@ -100,7 +104,8 @@ module Zernio
100
104
  :'components' => :'Array<WhatsAppTemplateComponent>',
101
105
  :'library_template_name' => :'String',
102
106
  :'library_template_body_inputs' => :'Object',
103
- :'library_template_button_inputs' => :'Array<CreateWhatsAppTemplateRequestLibraryTemplateButtonInputsInner>'
107
+ :'library_template_button_inputs' => :'Array<CreateWhatsAppTemplateRequestLibraryTemplateButtonInputsInner>',
108
+ :'message_send_ttl_seconds' => :'Integer'
104
109
  }
105
110
  end
106
111
 
@@ -173,6 +178,10 @@ module Zernio
173
178
  self.library_template_button_inputs = value
174
179
  end
175
180
  end
181
+
182
+ if attributes.key?(:'message_send_ttl_seconds')
183
+ self.message_send_ttl_seconds = attributes[:'message_send_ttl_seconds']
184
+ end
176
185
  end
177
186
 
178
187
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -307,7 +316,8 @@ module Zernio
307
316
  components == o.components &&
308
317
  library_template_name == o.library_template_name &&
309
318
  library_template_body_inputs == o.library_template_body_inputs &&
310
- library_template_button_inputs == o.library_template_button_inputs
319
+ library_template_button_inputs == o.library_template_button_inputs &&
320
+ message_send_ttl_seconds == o.message_send_ttl_seconds
311
321
  end
312
322
 
313
323
  # @see the `==` method
@@ -319,7 +329,7 @@ module Zernio
319
329
  # Calculates hash code according to all attributes.
320
330
  # @return [Integer] Hash code
321
331
  def hash
322
- [account_id, name, category, language, parameter_format, components, library_template_name, library_template_body_inputs, library_template_button_inputs].hash
332
+ [account_id, name, category, language, parameter_format, components, library_template_name, library_template_body_inputs, library_template_button_inputs, message_send_ttl_seconds].hash
323
333
  end
324
334
 
325
335
  # Builds the object from hash
@@ -29,6 +29,9 @@ module Zernio
29
29
 
30
30
  attr_accessor :components
31
31
 
32
+ # Only when a custom TTL is set; absent while the category default applies.
33
+ attr_accessor :message_send_ttl_seconds
34
+
32
35
  # Only when status is REJECTED.
33
36
  attr_accessor :rejected_reason
34
37
 
@@ -44,6 +47,7 @@ module Zernio
44
47
  :'category' => :'category',
45
48
  :'language' => :'language',
46
49
  :'components' => :'components',
50
+ :'message_send_ttl_seconds' => :'message_send_ttl_seconds',
47
51
  :'rejected_reason' => :'rejected_reason',
48
52
  :'quality_score' => :'quality_score'
49
53
  }
@@ -68,6 +72,7 @@ module Zernio
68
72
  :'category' => :'String',
69
73
  :'language' => :'String',
70
74
  :'components' => :'Array<Object>',
75
+ :'message_send_ttl_seconds' => :'Integer',
71
76
  :'rejected_reason' => :'String',
72
77
  :'quality_score' => :'Object'
73
78
  }
@@ -121,6 +126,10 @@ module Zernio
121
126
  end
122
127
  end
123
128
 
129
+ if attributes.key?(:'message_send_ttl_seconds')
130
+ self.message_send_ttl_seconds = attributes[:'message_send_ttl_seconds']
131
+ end
132
+
124
133
  if attributes.key?(:'rejected_reason')
125
134
  self.rejected_reason = attributes[:'rejected_reason']
126
135
  end
@@ -156,6 +165,7 @@ module Zernio
156
165
  category == o.category &&
157
166
  language == o.language &&
158
167
  components == o.components &&
168
+ message_send_ttl_seconds == o.message_send_ttl_seconds &&
159
169
  rejected_reason == o.rejected_reason &&
160
170
  quality_score == o.quality_score
161
171
  end
@@ -169,7 +179,7 @@ module Zernio
169
179
  # Calculates hash code according to all attributes.
170
180
  # @return [Integer] Hash code
171
181
  def hash
172
- [id, name, status, category, language, components, rejected_reason, quality_score].hash
182
+ [id, name, status, category, language, components, message_send_ttl_seconds, rejected_reason, quality_score].hash
173
183
  end
174
184
 
175
185
  # Builds the object from hash
@@ -26,6 +26,9 @@ module Zernio
26
26
 
27
27
  attr_accessor :language
28
28
 
29
+ # Only when a custom TTL is set; absent while the category default applies.
30
+ attr_accessor :message_send_ttl_seconds
31
+
29
32
  attr_accessor :components
30
33
 
31
34
  class EnumAttributeValidator
@@ -58,6 +61,7 @@ module Zernio
58
61
  :'status' => :'status',
59
62
  :'category' => :'category',
60
63
  :'language' => :'language',
64
+ :'message_send_ttl_seconds' => :'message_send_ttl_seconds',
61
65
  :'components' => :'components'
62
66
  }
63
67
  end
@@ -80,6 +84,7 @@ module Zernio
80
84
  :'status' => :'String',
81
85
  :'category' => :'String',
82
86
  :'language' => :'String',
87
+ :'message_send_ttl_seconds' => :'Integer',
83
88
  :'components' => :'Array<Object>'
84
89
  }
85
90
  end
@@ -126,6 +131,10 @@ module Zernio
126
131
  self.language = attributes[:'language']
127
132
  end
128
133
 
134
+ if attributes.key?(:'message_send_ttl_seconds')
135
+ self.message_send_ttl_seconds = attributes[:'message_send_ttl_seconds']
136
+ end
137
+
129
138
  if attributes.key?(:'components')
130
139
  if (value = attributes[:'components']).is_a?(Array)
131
140
  self.components = value
@@ -182,6 +191,7 @@ module Zernio
182
191
  status == o.status &&
183
192
  category == o.category &&
184
193
  language == o.language &&
194
+ message_send_ttl_seconds == o.message_send_ttl_seconds &&
185
195
  components == o.components
186
196
  end
187
197
 
@@ -194,7 +204,7 @@ module Zernio
194
204
  # Calculates hash code according to all attributes.
195
205
  # @return [Integer] Hash code
196
206
  def hash
197
- [id, name, status, category, language, components].hash
207
+ [id, name, status, category, language, message_send_ttl_seconds, components].hash
198
208
  end
199
209
 
200
210
  # Builds the object from hash
@@ -18,14 +18,18 @@ module Zernio
18
18
  # WhatsApp social account ID
19
19
  attr_accessor :account_id
20
20
 
21
- # Updated template components
21
+ # Updated template components. Optional when only message_send_ttl_seconds changes; at least one of the two is required.
22
22
  attr_accessor :components
23
23
 
24
+ # Delivery validity window in seconds: a message not delivered within it is dropped. Range depends on category: AUTHENTICATION 30 to 900, UTILITY 30 to 43200 (12h), MARKETING 43200 to 2592000 (30 days); -1 restores the 30-day default on AUTHENTICATION and UTILITY. Meta defaults to 600 for AUTHENTICATION and 30 days otherwise. If Meta later recategorises the template, it clears the TTL (read it back to check).
25
+ attr_accessor :message_send_ttl_seconds
26
+
24
27
  # Attribute mapping from ruby-style variable name to JSON key.
25
28
  def self.attribute_map
26
29
  {
27
30
  :'account_id' => :'accountId',
28
- :'components' => :'components'
31
+ :'components' => :'components',
32
+ :'message_send_ttl_seconds' => :'message_send_ttl_seconds'
29
33
  }
30
34
  end
31
35
 
@@ -43,7 +47,8 @@ module Zernio
43
47
  def self.openapi_types
44
48
  {
45
49
  :'account_id' => :'String',
46
- :'components' => :'Array<WhatsAppTemplateComponent>'
50
+ :'components' => :'Array<WhatsAppTemplateComponent>',
51
+ :'message_send_ttl_seconds' => :'Integer'
47
52
  }
48
53
  end
49
54
 
@@ -79,8 +84,10 @@ module Zernio
79
84
  if (value = attributes[:'components']).is_a?(Array)
80
85
  self.components = value
81
86
  end
82
- else
83
- self.components = nil
87
+ end
88
+
89
+ if attributes.key?(:'message_send_ttl_seconds')
90
+ self.message_send_ttl_seconds = attributes[:'message_send_ttl_seconds']
84
91
  end
85
92
  end
86
93
 
@@ -93,11 +100,7 @@ module Zernio
93
100
  invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
94
101
  end
95
102
 
96
- if @components.nil?
97
- invalid_properties.push('invalid value for "components", components cannot be nil.')
98
- end
99
-
100
- if @components.length < 1
103
+ if !@components.nil? && @components.length < 1
101
104
  invalid_properties.push('invalid value for "components", number of items must be greater than or equal to 1.')
102
105
  end
103
106
 
@@ -109,8 +112,7 @@ module Zernio
109
112
  def valid?
110
113
  warn '[DEPRECATED] the `valid?` method is obsolete'
111
114
  return false if @account_id.nil?
112
- return false if @components.nil?
113
- return false if @components.length < 1
115
+ return false if !@components.nil? && @components.length < 1
114
116
  true
115
117
  end
116
118
 
@@ -144,7 +146,8 @@ module Zernio
144
146
  return true if self.equal?(o)
145
147
  self.class == o.class &&
146
148
  account_id == o.account_id &&
147
- components == o.components
149
+ components == o.components &&
150
+ message_send_ttl_seconds == o.message_send_ttl_seconds
148
151
  end
149
152
 
150
153
  # @see the `==` method
@@ -156,7 +159,7 @@ module Zernio
156
159
  # Calculates hash code according to all attributes.
157
160
  # @return [Integer] Hash code
158
161
  def hash
159
- [account_id, components].hash
162
+ [account_id, components, message_send_ttl_seconds].hash
160
163
  end
161
164
 
162
165
  # Builds the object from hash
@@ -21,15 +21,19 @@ module Zernio
21
21
  # Language code of the variant to edit (e.g. en_US, es, pt_BR). Required when the family has several languages. Body only: a language query parameter on PATCH is a 400.
22
22
  attr_accessor :language
23
23
 
24
- # Updated template components
24
+ # Updated template components. Optional when only message_send_ttl_seconds changes; at least one of the two is required.
25
25
  attr_accessor :components
26
26
 
27
+ # Delivery validity window in seconds: a message not delivered within it is dropped. Range depends on category: AUTHENTICATION 30 to 900, UTILITY 30 to 43200 (12h), MARKETING 43200 to 2592000 (30 days); -1 restores the 30-day default on AUTHENTICATION and UTILITY. Meta defaults to 600 for AUTHENTICATION and 30 days otherwise. If Meta later recategorises the template, it clears the TTL (read it back to check).
28
+ attr_accessor :message_send_ttl_seconds
29
+
27
30
  # Attribute mapping from ruby-style variable name to JSON key.
28
31
  def self.attribute_map
29
32
  {
30
33
  :'account_id' => :'accountId',
31
34
  :'language' => :'language',
32
- :'components' => :'components'
35
+ :'components' => :'components',
36
+ :'message_send_ttl_seconds' => :'message_send_ttl_seconds'
33
37
  }
34
38
  end
35
39
 
@@ -48,7 +52,8 @@ module Zernio
48
52
  {
49
53
  :'account_id' => :'String',
50
54
  :'language' => :'String',
51
- :'components' => :'Array<WhatsAppTemplateComponent>'
55
+ :'components' => :'Array<WhatsAppTemplateComponent>',
56
+ :'message_send_ttl_seconds' => :'Integer'
52
57
  }
53
58
  end
54
59
 
@@ -88,8 +93,10 @@ module Zernio
88
93
  if (value = attributes[:'components']).is_a?(Array)
89
94
  self.components = value
90
95
  end
91
- else
92
- self.components = nil
96
+ end
97
+
98
+ if attributes.key?(:'message_send_ttl_seconds')
99
+ self.message_send_ttl_seconds = attributes[:'message_send_ttl_seconds']
93
100
  end
94
101
  end
95
102
 
@@ -102,11 +109,7 @@ module Zernio
102
109
  invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
103
110
  end
104
111
 
105
- if @components.nil?
106
- invalid_properties.push('invalid value for "components", components cannot be nil.')
107
- end
108
-
109
- if @components.length < 1
112
+ if !@components.nil? && @components.length < 1
110
113
  invalid_properties.push('invalid value for "components", number of items must be greater than or equal to 1.')
111
114
  end
112
115
 
@@ -118,8 +121,7 @@ module Zernio
118
121
  def valid?
119
122
  warn '[DEPRECATED] the `valid?` method is obsolete'
120
123
  return false if @account_id.nil?
121
- return false if @components.nil?
122
- return false if @components.length < 1
124
+ return false if !@components.nil? && @components.length < 1
123
125
  true
124
126
  end
125
127
 
@@ -154,7 +156,8 @@ module Zernio
154
156
  self.class == o.class &&
155
157
  account_id == o.account_id &&
156
158
  language == o.language &&
157
- components == o.components
159
+ components == o.components &&
160
+ message_send_ttl_seconds == o.message_send_ttl_seconds
158
161
  end
159
162
 
160
163
  # @see the `==` method
@@ -166,7 +169,7 @@ module Zernio
166
169
  # Calculates hash code according to all attributes.
167
170
  # @return [Integer] Hash code
168
171
  def hash
169
- [account_id, language, components].hash
172
+ [account_id, language, components, message_send_ttl_seconds].hash
170
173
  end
171
174
 
172
175
  # Builds the object from hash
@@ -11,5 +11,5 @@ Generator version: 7.19.0
11
11
  =end
12
12
 
13
13
  module Zernio
14
- VERSION = '0.0.861'
14
+ VERSION = '0.0.863'
15
15
  end
data/openapi.yaml CHANGED
@@ -31230,6 +31230,7 @@ paths:
31230
31230
  status: { type: string, enum: [APPROVED, PENDING, REJECTED] }
31231
31231
  category: { type: string, enum: [AUTHENTICATION, MARKETING, UTILITY] }
31232
31232
  language: { type: string }
31233
+ message_send_ttl_seconds: { type: integer, description: 'Only when a custom TTL is set; absent while the category default applies.' }
31233
31234
  components:
31234
31235
  type: array
31235
31236
  items:
@@ -31319,6 +31320,9 @@ paths:
31319
31320
  base_url: { type: string }
31320
31321
  phone_number:
31321
31322
  type: string
31323
+ message_send_ttl_seconds:
31324
+ type: integer
31325
+ description: 'Delivery validity window in seconds: a message not delivered within it is dropped. Range depends on category: AUTHENTICATION 30 to 900, UTILITY 30 to 43200 (12h), MARKETING 43200 to 2592000 (30 days); -1 restores the 30-day default on AUTHENTICATION and UTILITY. Meta defaults to 600 for AUTHENTICATION and 30 days otherwise. If Meta later recategorises the template, it clears the TTL (read it back to check).'
31322
31326
  examples:
31323
31327
  custom:
31324
31328
  summary: Custom template (requires review)
@@ -31371,6 +31375,7 @@ paths:
31371
31375
  status: { type: string, description: "APPROVED for library templates, PENDING for custom" }
31372
31376
  category: { type: string }
31373
31377
  language: { type: string }
31378
+ message_send_ttl_seconds: { type: integer, description: 'Echoed when supplied on the request.' }
31374
31379
  '400': { description: "Validation error (invalid name format, missing fields, invalid category)" }
31375
31380
  '401': { $ref: '#/components/responses/Unauthorized' }
31376
31381
  '404': { description: WhatsApp account not found }
@@ -31432,6 +31437,7 @@ paths:
31432
31437
  type: array
31433
31438
  items:
31434
31439
  type: object
31440
+ message_send_ttl_seconds: { type: integer, description: 'Only when a custom TTL is set; absent while the category default applies.' }
31435
31441
  rejected_reason: { type: string, description: 'Only when status is REJECTED.' }
31436
31442
  quality_score: { type: object, description: 'Post-approval quality (GREEN/YELLOW/RED), when Meta reports one.' }
31437
31443
  '400': { $ref: '#/components/responses/BadRequest' }
@@ -31459,7 +31465,7 @@ paths:
31459
31465
  tags: [WhatsApp]
31460
31466
  summary: Update template
31461
31467
  description: |
31462
- Update one variant's components. Name, language and category cannot change after creation.
31468
+ Update one variant's components and/or its message_send_ttl_seconds. Name, language and category cannot change after creation.
31463
31469
 
31464
31470
  Meta stores one template per **name + language**, so a name identifies a family of variants,
31465
31471
  each with its own Meta id. Pass `language` to address one variant. Without it, a name with a
@@ -31491,7 +31497,6 @@ paths:
31491
31497
  type: object
31492
31498
  required:
31493
31499
  - accountId
31494
- - components
31495
31500
  properties:
31496
31501
  accountId:
31497
31502
  type: string
@@ -31501,10 +31506,13 @@ paths:
31501
31506
  description: 'Language code of the variant to edit (e.g. en_US, es, pt_BR). Required when the family has several languages. Body only: a language query parameter on PATCH is a 400.'
31502
31507
  components:
31503
31508
  type: array
31504
- description: Updated template components
31509
+ description: 'Updated template components. Optional when only message_send_ttl_seconds changes; at least one of the two is required.'
31505
31510
  minItems: 1
31506
31511
  items:
31507
31512
  $ref: '#/components/schemas/WhatsAppTemplateComponent'
31513
+ message_send_ttl_seconds:
31514
+ type: integer
31515
+ description: 'Delivery validity window in seconds: a message not delivered within it is dropped. Range depends on category: AUTHENTICATION 30 to 900, UTILITY 30 to 43200 (12h), MARKETING 43200 to 2592000 (30 days); -1 restores the 30-day default on AUTHENTICATION and UTILITY. Meta defaults to 600 for AUTHENTICATION and 30 days otherwise. If Meta later recategorises the template, it clears the TTL (read it back to check).'
31508
31516
  example:
31509
31517
  accountId: "507f1f77bcf86cd799439011"
31510
31518
  language: "es"
@@ -31664,6 +31672,7 @@ paths:
31664
31672
  type: array
31665
31673
  items:
31666
31674
  type: object
31675
+ message_send_ttl_seconds: { type: integer, description: 'Only when a custom TTL is set; absent while the category default applies.' }
31667
31676
  rejected_reason: { type: string, description: 'Only when status is REJECTED.' }
31668
31677
  quality_score: { type: object, description: 'Post-approval quality (GREEN/YELLOW/RED), when Meta reports one.' }
31669
31678
  '400': { $ref: '#/components/responses/BadRequest' }
@@ -31676,7 +31685,7 @@ paths:
31676
31685
  tags: [WhatsApp]
31677
31686
  summary: Update template by id
31678
31687
  description: |
31679
- Update one variant's components by its Meta id. Name, language and category cannot change.
31688
+ Update one variant's components and/or its message_send_ttl_seconds by its Meta id. Name, language and category cannot change.
31680
31689
 
31681
31690
  Meta only allows editing templates in `APPROVED`, `REJECTED` or `PAUSED` state; an approved
31682
31691
  template can be edited once per 24 hours and up to 10 times per 30 days. A successful update
@@ -31701,17 +31710,19 @@ paths:
31701
31710
  type: object
31702
31711
  required:
31703
31712
  - accountId
31704
- - components
31705
31713
  properties:
31706
31714
  accountId:
31707
31715
  type: string
31708
31716
  description: WhatsApp social account ID
31709
31717
  components:
31710
31718
  type: array
31711
- description: Updated template components
31719
+ description: 'Updated template components. Optional when only message_send_ttl_seconds changes; at least one of the two is required.'
31712
31720
  minItems: 1
31713
31721
  items:
31714
31722
  $ref: '#/components/schemas/WhatsAppTemplateComponent'
31723
+ message_send_ttl_seconds:
31724
+ type: integer
31725
+ description: 'Delivery validity window in seconds: a message not delivered within it is dropped. Range depends on category: AUTHENTICATION 30 to 900, UTILITY 30 to 43200 (12h), MARKETING 43200 to 2592000 (30 days); -1 restores the 30-day default on AUTHENTICATION and UTILITY. Meta defaults to 600 for AUTHENTICATION and 30 days otherwise. If Meta later recategorises the template, it clears the TTL (read it back to check).'
31715
31726
  responses:
31716
31727
  '200':
31717
31728
  description: Template updated successfully
@@ -47793,19 +47804,18 @@ paths:
47793
47804
  x-platforms: ["meta", "linkedin"]
47794
47805
  summary: Search the public Ad Library
47795
47806
  description: |-
47796
- Competitor and market research over the platform's public ad archive, searched with the
47797
- customer's own connected token (no extra scope): Meta's Ad Library (`GET /ads_archive`) for
47798
- a `facebook` / `instagram` / `metaads` account, LinkedIn's Ad Library (`GET /rest/adLibrary`)
47799
- for a `linkedin` / `linkedinads` account. Rows are returned in the platform's raw shape under
47800
- `data`; `paging.after` is an opaque cursor on both (`null` when exhausted).
47807
+ Competitor and market research over the public ad archives. Meta's Ad Library
47808
+ (`GET /ads_archive`) is searched with Zernio's own developer access, so `platform=meta` needs
47809
+ no connected account at all. LinkedIn's Ad Library (`GET /rest/adLibrary`) runs on a connected
47810
+ `linkedin` / `linkedinads` account, passed as `accountId`. Passing a Meta account as `accountId`
47811
+ also selects Meta. Rows are returned in the platform's raw shape under `data`; `paging.after`
47812
+ is an opaque cursor on both (`null` when exhausted).
47801
47813
 
47802
47814
  **Meta coverage.** Political and social-issue ads are searchable worldwide. Every other ad is
47803
47815
  in the archive only if it was delivered to the EU or UK within the last year, so a US-only
47804
47816
  commercial advertiser is invisible. Spend, impressions and demographics are political-only
47805
- fields and are left out of the default projection; request them via `fields`. Meta serves the
47806
- archive only to people who confirmed their identity and location at facebook.com/ID: until the
47807
- Facebook user behind the connection has done so, the call fails with
47808
- `meta_identity_confirmation_required` (403).
47817
+ fields and are left out of the default projection; request them via `fields`. All customers
47818
+ share Zernio's Meta quota, so a `429` means back off for a minute.
47809
47819
 
47810
47820
  **LinkedIn coverage.** Ads served after June 1 2023, worldwide, kept for a year after their
47811
47821
  last impression. EU-delivered ads carry impression ranges and the disclosed targeting facets.
@@ -47818,7 +47828,8 @@ paths:
47818
47828
  security:
47819
47829
  - bearerAuth: []
47820
47830
  parameters:
47821
- - { 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." }
47831
+ - { name: platform, in: query, schema: { type: string, enum: [meta, linkedin] }, description: "Which archive to search. `meta` needs no accountId. Required unless accountId is given." }
47832
+ - { 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." }
47822
47833
  - { 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." }
47823
47834
  - { name: pageIds, in: query, schema: { type: string }, description: "Meta only. Comma-separated Facebook Page ids (max 10) whose ads to list." }
47824
47835
  - { name: advertiser, in: query, schema: { type: string, maxLength: 100 }, description: "LinkedIn only. Advertiser (Page) name to search." }
@@ -47892,9 +47903,10 @@ paths:
47892
47903
  '400': { $ref: '#/components/responses/BadRequest' }
47893
47904
  '401': { $ref: '#/components/responses/Unauthorized' }
47894
47905
  '403':
47895
- 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."
47906
+ description: Ads access required. Legacy plans need the Ads add-on; included by default on usage-based plans.
47896
47907
  '404': { description: Account not found }
47897
47908
  '501': { description: Only supported on Meta and LinkedIn accounts }
47909
+ '503': { description: "Meta's Ad Library is unavailable on Zernio's side (`PLATFORM_DISABLED`); LinkedIn searches are unaffected." }
47898
47910
 
47899
47911
  /v1/ads/targeting/reach-estimate:
47900
47912
  post:
@@ -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&#39;s public ad archive, searched with the customer&#39;s own connected token (no extra scope): Meta&#39;s Ad Library (&#x60;GET /ads_archive&#x60;) for a &#x60;facebook&#x60; / &#x60;instagram&#x60; / &#x60;metaads&#x60; account, LinkedIn&#39;s Ad Library (&#x60;GET /rest/adLibrary&#x60;) for a &#x60;linkedin&#x60; / &#x60;linkedinads&#x60; account. Rows are returned in the platform&#39;s raw shape under &#x60;data&#x60;; &#x60;paging.after&#x60; is an opaque cursor on both (&#x60;null&#x60; 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 &#x60;fields&#x60;. 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 &#x60;meta_identity_confirmation_required&#x60; (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 (&#x60;limit&#x60; &gt; 25 is a 400); &#x60;after&#x60; is the next offset. Which params apply: &#x60;q&#x60;, &#x60;countries&#x60;, &#x60;since&#x60;, &#x60;until&#x60;, &#x60;limit&#x60;, &#x60;after&#x60; on both; &#x60;pageIds&#x60;, &#x60;adType&#x60;, &#x60;status&#x60;, &#x60;platforms&#x60;, &#x60;mediaType&#x60;, &#x60;languages&#x60;, &#x60;searchType&#x60;, &#x60;fields&#x60; are Meta-only; &#x60;advertiser&#x60; is LinkedIn-only. Passing a param the account&#39;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&#39;s Ad Library (&#x60;GET /ads_archive&#x60;) is searched with Zernio&#39;s own developer access, so &#x60;platform&#x3D;meta&#x60; needs no connected account at all. LinkedIn&#39;s Ad Library (&#x60;GET /rest/adLibrary&#x60;) runs on a connected &#x60;linkedin&#x60; / &#x60;linkedinads&#x60; account, passed as &#x60;accountId&#x60;. Passing a Meta account as &#x60;accountId&#x60; also selects Meta. Rows are returned in the platform&#39;s raw shape under &#x60;data&#x60;; &#x60;paging.after&#x60; is an opaque cursor on both (&#x60;null&#x60; 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 &#x60;fields&#x60;. All customers share Zernio&#39;s Meta quota, so a &#x60;429&#x60; 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 (&#x60;limit&#x60; &gt; 25 is a 400); &#x60;after&#x60; is the next offset. Which params apply: &#x60;q&#x60;, &#x60;countries&#x60;, &#x60;since&#x60;, &#x60;until&#x60;, &#x60;limit&#x60;, &#x60;after&#x60; on both; &#x60;pageIds&#x60;, &#x60;adType&#x60;, &#x60;status&#x60;, &#x60;platforms&#x60;, &#x60;mediaType&#x60;, &#x60;languages&#x60;, &#x60;searchType&#x60;, &#x60;fields&#x60; are Meta-only; &#x60;advertiser&#x60; is LinkedIn-only. Passing a param the account&#39;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. &#x60;meta&#x60; 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&#39; 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.
@@ -498,7 +498,7 @@ describe 'WhatsAppApi' do
498
498
 
499
499
  # unit tests for update_whats_app_template
500
500
  # Update template
501
- # Update one variant&#39;s components. Name, language and category cannot change after creation. Meta stores one template per **name + language**, so a name identifies a family of variants, each with its own Meta id. Pass &#x60;language&#x60; to address one variant. Without it, a name with a single variant resolves to that variant; a name with several returns &#x60;409 ambiguous_template&#x60; with &#x60;details.languages&#x60;. A bare language (&#x60;es&#x60;) matches a single regional variant (&#x60;es_ES&#x60;); if the family has several regional variants for it, that is also a 409. A full code (&#x60;es_ES&#x60;) must match exactly. Variants in &#x60;PENDING_DELETION&#x60; are not part of the family. Meta only allows editing templates in &#x60;APPROVED&#x60;, &#x60;REJECTED&#x60; or &#x60;PAUSED&#x60; state; an approved template can be edited once per 24 hours and up to 10 times per 30 days. A successful update sends the variant back to Meta for review, so the &#x60;status&#x60; returned here is normally &#x60;PENDING&#x60;. The final outcome arrives on the &#x60;whatsapp.template.status_updated&#x60; webhook (which carries the variant&#39;s &#x60;templateId&#x60; and &#x60;language&#x60;). A variant already in &#x60;PENDING&#x60; cannot be edited again until Meta finishes reviewing it.
501
+ # Update one variant&#39;s components and/or its message_send_ttl_seconds. Name, language and category cannot change after creation. Meta stores one template per **name + language**, so a name identifies a family of variants, each with its own Meta id. Pass &#x60;language&#x60; to address one variant. Without it, a name with a single variant resolves to that variant; a name with several returns &#x60;409 ambiguous_template&#x60; with &#x60;details.languages&#x60;. A bare language (&#x60;es&#x60;) matches a single regional variant (&#x60;es_ES&#x60;); if the family has several regional variants for it, that is also a 409. A full code (&#x60;es_ES&#x60;) must match exactly. Variants in &#x60;PENDING_DELETION&#x60; are not part of the family. Meta only allows editing templates in &#x60;APPROVED&#x60;, &#x60;REJECTED&#x60; or &#x60;PAUSED&#x60; state; an approved template can be edited once per 24 hours and up to 10 times per 30 days. A successful update sends the variant back to Meta for review, so the &#x60;status&#x60; returned here is normally &#x60;PENDING&#x60;. The final outcome arrives on the &#x60;whatsapp.template.status_updated&#x60; webhook (which carries the variant&#39;s &#x60;templateId&#x60; and &#x60;language&#x60;). A variant already in &#x60;PENDING&#x60; cannot be edited again until Meta finishes reviewing it.
502
502
  # @param template_name Template name (the family).
503
503
  # @param update_whats_app_template_request
504
504
  # @param [Hash] opts the optional parameters
@@ -511,7 +511,7 @@ describe 'WhatsAppApi' do
511
511
 
512
512
  # unit tests for update_whats_app_template_by_id
513
513
  # Update template by id
514
- # Update one variant&#39;s components by its Meta id. Name, language and category cannot change. Meta only allows editing templates in &#x60;APPROVED&#x60;, &#x60;REJECTED&#x60; or &#x60;PAUSED&#x60; state; an approved template can be edited once per 24 hours and up to 10 times per 30 days. A successful update sends the variant back to Meta for review, so the &#x60;status&#x60; returned here is normally &#x60;PENDING&#x60;. The final outcome arrives on the &#x60;whatsapp.template.status_updated&#x60; webhook (which carries the variant&#39;s &#x60;templateId&#x60; and &#x60;language&#x60;). A variant already in &#x60;PENDING&#x60; cannot be edited again until Meta finishes reviewing it.
514
+ # Update one variant&#39;s components and/or its message_send_ttl_seconds by its Meta id. Name, language and category cannot change. Meta only allows editing templates in &#x60;APPROVED&#x60;, &#x60;REJECTED&#x60; or &#x60;PAUSED&#x60; state; an approved template can be edited once per 24 hours and up to 10 times per 30 days. A successful update sends the variant back to Meta for review, so the &#x60;status&#x60; returned here is normally &#x60;PENDING&#x60;. The final outcome arrives on the &#x60;whatsapp.template.status_updated&#x60; webhook (which carries the variant&#39;s &#x60;templateId&#x60; and &#x60;language&#x60;). A variant already in &#x60;PENDING&#x60; cannot be edited again until Meta finishes reviewing it.
515
515
  # @param template_id Meta template id (numeric).
516
516
  # @param update_whats_app_template_by_id_request
517
517
  # @param [Hash] opts the optional parameters
@@ -57,4 +57,10 @@ describe Zernio::CreateWhatsAppTemplate200ResponseTemplate do
57
57
  end
58
58
  end
59
59
 
60
+ describe 'test attribute "message_send_ttl_seconds"' do
61
+ it 'should work' do
62
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
63
+ end
64
+ end
65
+
60
66
  end
@@ -89,4 +89,10 @@ describe Zernio::CreateWhatsAppTemplateRequest do
89
89
  end
90
90
  end
91
91
 
92
+ describe 'test attribute "message_send_ttl_seconds"' do
93
+ it 'should work' do
94
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
95
+ end
96
+ end
97
+
92
98
  end
@@ -63,6 +63,12 @@ describe Zernio::GetWhatsAppTemplate200ResponseTemplate do
63
63
  end
64
64
  end
65
65
 
66
+ describe 'test attribute "message_send_ttl_seconds"' do
67
+ it 'should work' do
68
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
69
+ end
70
+ end
71
+
66
72
  describe 'test attribute "rejected_reason"' do
67
73
  it 'should work' do
68
74
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -65,6 +65,12 @@ describe Zernio::GetWhatsAppTemplates200ResponseTemplatesInner do
65
65
  end
66
66
  end
67
67
 
68
+ describe 'test attribute "message_send_ttl_seconds"' do
69
+ it 'should work' do
70
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
71
+ end
72
+ end
73
+
68
74
  describe 'test attribute "components"' do
69
75
  it 'should work' do
70
76
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -39,4 +39,10 @@ describe Zernio::UpdateWhatsAppTemplateByIdRequest do
39
39
  end
40
40
  end
41
41
 
42
+ describe 'test attribute "message_send_ttl_seconds"' 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
+
42
48
  end
@@ -45,4 +45,10 @@ describe Zernio::UpdateWhatsAppTemplateRequest do
45
45
  end
46
46
  end
47
47
 
48
+ describe 'test attribute "message_send_ttl_seconds"' 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
+
48
54
  end
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: late-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.861
4
+ version: 0.0.863
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenAPI-Generator
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-09-07 00:00:00.000000000 Z
11
+ date: 2026-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -5800,7 +5800,7 @@ files:
5800
5800
  - spec/models/you_tube_video_retention_response_retention_curve_inner_spec.rb
5801
5801
  - spec/models/you_tube_video_retention_response_spec.rb
5802
5802
  - spec/spec_helper.rb
5803
- - zernio-sdk-0.0.861.gem
5803
+ - zernio-sdk-0.0.863.gem
5804
5804
  - zernio-sdk.gemspec
5805
5805
  homepage: https://openapi-generator.tech
5806
5806
  licenses:
Binary file