late-sdk 0.0.862 → 0.0.864
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.
- checksums.yaml +4 -4
- data/docs/CommentAutomationTemplate.md +2 -0
- data/docs/CreateWhatsAppTemplate200ResponseTemplate.md +3 -1
- data/docs/CreateWhatsAppTemplateRequest.md +3 -1
- data/docs/GetWhatsAppTemplate200ResponseTemplate.md +2 -0
- data/docs/GetWhatsAppTemplates200ResponseTemplatesInner.md +2 -0
- data/docs/SendInboxMessageRequestTemplate.md +2 -0
- data/docs/UpdateWhatsAppTemplateByIdRequest.md +4 -2
- data/docs/UpdateWhatsAppTemplateRequest.md +4 -2
- data/docs/WhatsAppApi.md +4 -4
- data/lib/zernio-sdk/api/whats_app_api.rb +4 -4
- data/lib/zernio-sdk/models/comment_automation_template.rb +23 -1
- data/lib/zernio-sdk/models/create_whats_app_template200_response_template.rb +14 -4
- data/lib/zernio-sdk/models/create_whats_app_template_request.rb +14 -4
- data/lib/zernio-sdk/models/get_whats_app_template200_response_template.rb +11 -1
- data/lib/zernio-sdk/models/get_whats_app_templates200_response_templates_inner.rb +11 -1
- data/lib/zernio-sdk/models/send_inbox_message_request_template.rb +24 -2
- data/lib/zernio-sdk/models/update_whats_app_template_by_id_request.rb +17 -14
- data/lib/zernio-sdk/models/update_whats_app_template_request.rb +17 -14
- data/lib/zernio-sdk/version.rb +1 -1
- data/openapi.yaml +25 -7
- data/spec/api/whats_app_api_spec.rb +2 -2
- data/spec/models/comment_automation_template_spec.rb +10 -0
- data/spec/models/create_whats_app_template200_response_template_spec.rb +6 -0
- data/spec/models/create_whats_app_template_request_spec.rb +6 -0
- data/spec/models/get_whats_app_template200_response_template_spec.rb +6 -0
- data/spec/models/get_whats_app_templates200_response_templates_inner_spec.rb +6 -0
- data/spec/models/send_inbox_message_request_template_spec.rb +10 -0
- data/spec/models/update_whats_app_template_by_id_request_spec.rb +6 -0
- data/spec/models/update_whats_app_template_request_spec.rb +6 -0
- data/zernio-sdk-0.0.864.gem +0 -0
- metadata +2 -2
- data/zernio-sdk-0.0.862.gem +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 149a3ff8f1fc11b9b6c9f9a17d60c55940bd51b9b84cbd031b462d95bbba2ab8
|
|
4
|
+
data.tar.gz: bb1199ce879e30e7ac41ab066b0ccdbfecb6034b8ae4f7d9aeddaf3b16f87aef
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a3a475228fd77b6287de6ae28b388fd92bccc66f2e17dd87de7d14aacff02738bca3d04dc1586f96b1b76eda59d976e75a71c6f8f14fd58c2d43be7e7684b9df
|
|
7
|
+
data.tar.gz: c47b283514656e3829f0fe3fbb09781276d335814293d22ff0f514f0c7ffaa4026e2a1721fb519844fafa67470441f32d134d3242eba2ef181ee8730eb055c52
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **type** | **String** | | |
|
|
8
|
+
| **image_aspect_ratio** | **String** | Facebook only. How Messenger renders each element imageUrl: horizontal (1.91:1, the default) or square (1:1). Instagram has no such setting, so an Instagram automation carrying it is a 400. | [optional] |
|
|
8
9
|
| **elements** | [**Array<CommentAutomationTemplateElement>**](CommentAutomationTemplateElement.md) | | |
|
|
9
10
|
|
|
10
11
|
## Example
|
|
@@ -14,6 +15,7 @@ require 'zernio-sdk'
|
|
|
14
15
|
|
|
15
16
|
instance = Zernio::CommentAutomationTemplate.new(
|
|
16
17
|
type: null,
|
|
18
|
+
image_aspect_ratio: null,
|
|
17
19
|
elements: null
|
|
18
20
|
)
|
|
19
21
|
```
|
|
@@ -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's template library (e.g., \"appointment_reminder\", \"auto_pay_reminder_1\", \"address_update\"). 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<CreateWhatsAppTemplateRequestLibraryTemplateButtonInputsInner>**](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<Object>** | | [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<Object>** | | [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,6 +5,7 @@
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **type** | **String** | Template type. Required for Instagram/Facebook generic templates; ignored on WhatsApp. | [optional] |
|
|
8
|
+
| **image_aspect_ratio** | **String** | Facebook only. Aspect ratio Messenger renders element images at: horizontal (1.91:1, default) or square (1:1). A 400 on Instagram. | [optional] |
|
|
8
9
|
| **elements** | [**Array<SendInboxMessageRequestTemplateElementsInner>**](SendInboxMessageRequestTemplateElementsInner.md) | | [optional] |
|
|
9
10
|
|
|
10
11
|
## Example
|
|
@@ -14,6 +15,7 @@ require 'zernio-sdk'
|
|
|
14
15
|
|
|
15
16
|
instance = Zernio::SendInboxMessageRequestTemplate.new(
|
|
16
17
|
type: null,
|
|
18
|
+
image_aspect_ratio: null,
|
|
17
19
|
elements: null
|
|
18
20
|
)
|
|
19
21
|
```
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **account_id** | **String** | WhatsApp social account ID | |
|
|
8
|
-
| **components** | [**Array<WhatsAppTemplateComponent>**](WhatsAppTemplateComponent.md) | Updated template components |
|
|
8
|
+
| **components** | [**Array<WhatsAppTemplateComponent>**](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<WhatsAppTemplateComponent>**](WhatsAppTemplateComponent.md) | Updated template components |
|
|
9
|
+
| **components** | [**Array<WhatsAppTemplateComponent>**](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'
|
|
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'
|
|
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
|
|
@@ -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'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.
|
|
2595
|
+
# 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.
|
|
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'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.
|
|
2669
|
+
# 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.
|
|
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
|
|
@@ -18,6 +18,9 @@ module Zernio
|
|
|
18
18
|
class CommentAutomationTemplate < ApiModelBase
|
|
19
19
|
attr_accessor :type
|
|
20
20
|
|
|
21
|
+
# Facebook only. How Messenger renders each element imageUrl: horizontal (1.91:1, the default) or square (1:1). Instagram has no such setting, so an Instagram automation carrying it is a 400.
|
|
22
|
+
attr_accessor :image_aspect_ratio
|
|
23
|
+
|
|
21
24
|
attr_accessor :elements
|
|
22
25
|
|
|
23
26
|
class EnumAttributeValidator
|
|
@@ -46,6 +49,7 @@ module Zernio
|
|
|
46
49
|
def self.attribute_map
|
|
47
50
|
{
|
|
48
51
|
:'type' => :'type',
|
|
52
|
+
:'image_aspect_ratio' => :'imageAspectRatio',
|
|
49
53
|
:'elements' => :'elements'
|
|
50
54
|
}
|
|
51
55
|
end
|
|
@@ -64,6 +68,7 @@ module Zernio
|
|
|
64
68
|
def self.openapi_types
|
|
65
69
|
{
|
|
66
70
|
:'type' => :'String',
|
|
71
|
+
:'image_aspect_ratio' => :'String',
|
|
67
72
|
:'elements' => :'Array<CommentAutomationTemplateElement>'
|
|
68
73
|
}
|
|
69
74
|
end
|
|
@@ -96,6 +101,10 @@ module Zernio
|
|
|
96
101
|
self.type = nil
|
|
97
102
|
end
|
|
98
103
|
|
|
104
|
+
if attributes.key?(:'image_aspect_ratio')
|
|
105
|
+
self.image_aspect_ratio = attributes[:'image_aspect_ratio']
|
|
106
|
+
end
|
|
107
|
+
|
|
99
108
|
if attributes.key?(:'elements')
|
|
100
109
|
if (value = attributes[:'elements']).is_a?(Array)
|
|
101
110
|
self.elements = value
|
|
@@ -136,6 +145,8 @@ module Zernio
|
|
|
136
145
|
return false if @type.nil?
|
|
137
146
|
type_validator = EnumAttributeValidator.new('String', ["generic"])
|
|
138
147
|
return false unless type_validator.valid?(@type)
|
|
148
|
+
image_aspect_ratio_validator = EnumAttributeValidator.new('String', ["horizontal", "square"])
|
|
149
|
+
return false unless image_aspect_ratio_validator.valid?(@image_aspect_ratio)
|
|
139
150
|
return false if @elements.nil?
|
|
140
151
|
return false if @elements.length > 10
|
|
141
152
|
return false if @elements.length < 1
|
|
@@ -152,6 +163,16 @@ module Zernio
|
|
|
152
163
|
@type = type
|
|
153
164
|
end
|
|
154
165
|
|
|
166
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
167
|
+
# @param [Object] image_aspect_ratio Object to be assigned
|
|
168
|
+
def image_aspect_ratio=(image_aspect_ratio)
|
|
169
|
+
validator = EnumAttributeValidator.new('String', ["horizontal", "square"])
|
|
170
|
+
unless validator.valid?(image_aspect_ratio)
|
|
171
|
+
fail ArgumentError, "invalid value for \"image_aspect_ratio\", must be one of #{validator.allowable_values}."
|
|
172
|
+
end
|
|
173
|
+
@image_aspect_ratio = image_aspect_ratio
|
|
174
|
+
end
|
|
175
|
+
|
|
155
176
|
# Custom attribute writer method with validation
|
|
156
177
|
# @param [Object] elements Value to be assigned
|
|
157
178
|
def elements=(elements)
|
|
@@ -176,6 +197,7 @@ module Zernio
|
|
|
176
197
|
return true if self.equal?(o)
|
|
177
198
|
self.class == o.class &&
|
|
178
199
|
type == o.type &&
|
|
200
|
+
image_aspect_ratio == o.image_aspect_ratio &&
|
|
179
201
|
elements == o.elements
|
|
180
202
|
end
|
|
181
203
|
|
|
@@ -188,7 +210,7 @@ module Zernio
|
|
|
188
210
|
# Calculates hash code according to all attributes.
|
|
189
211
|
# @return [Integer] Hash code
|
|
190
212
|
def hash
|
|
191
|
-
[type, elements].hash
|
|
213
|
+
[type, image_aspect_ratio, elements].hash
|
|
192
214
|
end
|
|
193
215
|
|
|
194
216
|
# Builds the object from hash
|
|
@@ -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
|
|
@@ -14,11 +14,14 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
|
-
# Platform-dependent template payload. Ignored on Telegram. Instagram / Facebook: a generic template (carousel). Set `type: generic` and provide up to 10 `elements`, each with a `title` (required) and optional `subtitle`, `imageUrl`, and `buttons`. Mutually exclusive with the top-level `buttons` field (sending both is a 400); put the card's buttons on its `elements` instead. WhatsApp: sends an approved WhatsApp template message, the only message type WhatsApp accepts when the 24-hour customer-service window is closed. Provide exactly one element carrying the template reference: `{ \"elements\": [{ \"name\": \"order_update\", \"language\": \"en_US\", \"components\": [...] }] }` (`type` is ignored on WhatsApp). `components` is optional and is forwarded unchanged as the `template.components` array of Meta's Cloud API send payload; use it to fill body/header variables and button parameters, e.g. `[{ \"type\": \"body\", \"parameters\": [{ \"type\": \"text\", \"text\": \"John\" }] }]`. Templates with media headers (image, video, document) must include the header component with its media link here at send time. To send a template to a phone number with no existing conversation, or to have media headers filled in automatically from the template definition, use the create-conversation endpoint (POST /v1/inbox/conversations) instead.
|
|
17
|
+
# Platform-dependent template payload. Ignored on Telegram. Instagram / Facebook: a generic template (carousel). Set `type: generic` and provide up to 10 `elements`, each with a `title` (required) and optional `subtitle`, `imageUrl`, and `buttons`. Mutually exclusive with the top-level `buttons` field (sending both is a 400); put the card's buttons on its `elements` instead. On Facebook, `imageAspectRatio` (`horizontal`, the default, or `square`) sets how Messenger renders the element images; Instagram has no such setting and rejects it. WhatsApp: sends an approved WhatsApp template message, the only message type WhatsApp accepts when the 24-hour customer-service window is closed. Provide exactly one element carrying the template reference: `{ \"elements\": [{ \"name\": \"order_update\", \"language\": \"en_US\", \"components\": [...] }] }` (`type` is ignored on WhatsApp). `components` is optional and is forwarded unchanged as the `template.components` array of Meta's Cloud API send payload; use it to fill body/header variables and button parameters, e.g. `[{ \"type\": \"body\", \"parameters\": [{ \"type\": \"text\", \"text\": \"John\" }] }]`. Templates with media headers (image, video, document) must include the header component with its media link here at send time. To send a template to a phone number with no existing conversation, or to have media headers filled in automatically from the template definition, use the create-conversation endpoint (POST /v1/inbox/conversations) instead.
|
|
18
18
|
class SendInboxMessageRequestTemplate < ApiModelBase
|
|
19
19
|
# Template type. Required for Instagram/Facebook generic templates; ignored on WhatsApp.
|
|
20
20
|
attr_accessor :type
|
|
21
21
|
|
|
22
|
+
# Facebook only. Aspect ratio Messenger renders element images at: horizontal (1.91:1, default) or square (1:1). A 400 on Instagram.
|
|
23
|
+
attr_accessor :image_aspect_ratio
|
|
24
|
+
|
|
22
25
|
attr_accessor :elements
|
|
23
26
|
|
|
24
27
|
class EnumAttributeValidator
|
|
@@ -47,6 +50,7 @@ module Zernio
|
|
|
47
50
|
def self.attribute_map
|
|
48
51
|
{
|
|
49
52
|
:'type' => :'type',
|
|
53
|
+
:'image_aspect_ratio' => :'imageAspectRatio',
|
|
50
54
|
:'elements' => :'elements'
|
|
51
55
|
}
|
|
52
56
|
end
|
|
@@ -65,6 +69,7 @@ module Zernio
|
|
|
65
69
|
def self.openapi_types
|
|
66
70
|
{
|
|
67
71
|
:'type' => :'String',
|
|
72
|
+
:'image_aspect_ratio' => :'String',
|
|
68
73
|
:'elements' => :'Array<SendInboxMessageRequestTemplateElementsInner>'
|
|
69
74
|
}
|
|
70
75
|
end
|
|
@@ -95,6 +100,10 @@ module Zernio
|
|
|
95
100
|
self.type = attributes[:'type']
|
|
96
101
|
end
|
|
97
102
|
|
|
103
|
+
if attributes.key?(:'image_aspect_ratio')
|
|
104
|
+
self.image_aspect_ratio = attributes[:'image_aspect_ratio']
|
|
105
|
+
end
|
|
106
|
+
|
|
98
107
|
if attributes.key?(:'elements')
|
|
99
108
|
if (value = attributes[:'elements']).is_a?(Array)
|
|
100
109
|
self.elements = value
|
|
@@ -120,6 +129,8 @@ module Zernio
|
|
|
120
129
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
121
130
|
type_validator = EnumAttributeValidator.new('String', ["generic"])
|
|
122
131
|
return false unless type_validator.valid?(@type)
|
|
132
|
+
image_aspect_ratio_validator = EnumAttributeValidator.new('String', ["horizontal", "square"])
|
|
133
|
+
return false unless image_aspect_ratio_validator.valid?(@image_aspect_ratio)
|
|
123
134
|
return false if !@elements.nil? && @elements.length > 10
|
|
124
135
|
true
|
|
125
136
|
end
|
|
@@ -134,6 +145,16 @@ module Zernio
|
|
|
134
145
|
@type = type
|
|
135
146
|
end
|
|
136
147
|
|
|
148
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
149
|
+
# @param [Object] image_aspect_ratio Object to be assigned
|
|
150
|
+
def image_aspect_ratio=(image_aspect_ratio)
|
|
151
|
+
validator = EnumAttributeValidator.new('String', ["horizontal", "square"])
|
|
152
|
+
unless validator.valid?(image_aspect_ratio)
|
|
153
|
+
fail ArgumentError, "invalid value for \"image_aspect_ratio\", must be one of #{validator.allowable_values}."
|
|
154
|
+
end
|
|
155
|
+
@image_aspect_ratio = image_aspect_ratio
|
|
156
|
+
end
|
|
157
|
+
|
|
137
158
|
# Custom attribute writer method with validation
|
|
138
159
|
# @param [Object] elements Value to be assigned
|
|
139
160
|
def elements=(elements)
|
|
@@ -154,6 +175,7 @@ module Zernio
|
|
|
154
175
|
return true if self.equal?(o)
|
|
155
176
|
self.class == o.class &&
|
|
156
177
|
type == o.type &&
|
|
178
|
+
image_aspect_ratio == o.image_aspect_ratio &&
|
|
157
179
|
elements == o.elements
|
|
158
180
|
end
|
|
159
181
|
|
|
@@ -166,7 +188,7 @@ module Zernio
|
|
|
166
188
|
# Calculates hash code according to all attributes.
|
|
167
189
|
# @return [Integer] Hash code
|
|
168
190
|
def hash
|
|
169
|
-
[type, elements].hash
|
|
191
|
+
[type, image_aspect_ratio, elements].hash
|
|
170
192
|
end
|
|
171
193
|
|
|
172
194
|
# 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
|
-
|
|
83
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
92
|
-
|
|
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
|
|
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
|
|
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
|
data/lib/zernio-sdk/version.rb
CHANGED
data/openapi.yaml
CHANGED
|
@@ -1625,6 +1625,10 @@ components:
|
|
|
1625
1625
|
required: [type, elements]
|
|
1626
1626
|
properties:
|
|
1627
1627
|
type: { type: string, enum: [generic] }
|
|
1628
|
+
imageAspectRatio:
|
|
1629
|
+
type: string
|
|
1630
|
+
enum: [horizontal, square]
|
|
1631
|
+
description: 'Facebook only. How Messenger renders each element imageUrl: horizontal (1.91:1, the default) or square (1:1). Instagram has no such setting, so an Instagram automation carrying it is a 400.'
|
|
1628
1632
|
elements:
|
|
1629
1633
|
type: array
|
|
1630
1634
|
minItems: 1
|
|
@@ -28067,7 +28071,9 @@ paths:
|
|
|
28067
28071
|
and provide up to 10 `elements`, each with a `title` (required) and
|
|
28068
28072
|
optional `subtitle`, `imageUrl`, and `buttons`. Mutually exclusive with
|
|
28069
28073
|
the top-level `buttons` field (sending both is a 400); put the card's
|
|
28070
|
-
buttons on its `elements` instead.
|
|
28074
|
+
buttons on its `elements` instead. On Facebook, `imageAspectRatio`
|
|
28075
|
+
(`horizontal`, the default, or `square`) sets how Messenger renders the
|
|
28076
|
+
element images; Instagram has no such setting and rejects it.
|
|
28071
28077
|
|
|
28072
28078
|
WhatsApp: sends an approved WhatsApp template message, the only message
|
|
28073
28079
|
type WhatsApp accepts when the 24-hour customer-service window is closed.
|
|
@@ -28084,6 +28090,7 @@ paths:
|
|
|
28084
28090
|
create-conversation endpoint (POST /v1/inbox/conversations) instead.
|
|
28085
28091
|
properties:
|
|
28086
28092
|
type: { type: string, enum: [generic], description: Template type. Required for Instagram/Facebook generic templates; ignored on WhatsApp. }
|
|
28093
|
+
imageAspectRatio: { type: string, enum: [horizontal, square], description: 'Facebook only. Aspect ratio Messenger renders element images at: horizontal (1.91:1, default) or square (1:1). A 400 on Instagram.' }
|
|
28087
28094
|
elements:
|
|
28088
28095
|
type: array
|
|
28089
28096
|
maxItems: 10
|
|
@@ -31230,6 +31237,7 @@ paths:
|
|
|
31230
31237
|
status: { type: string, enum: [APPROVED, PENDING, REJECTED] }
|
|
31231
31238
|
category: { type: string, enum: [AUTHENTICATION, MARKETING, UTILITY] }
|
|
31232
31239
|
language: { type: string }
|
|
31240
|
+
message_send_ttl_seconds: { type: integer, description: 'Only when a custom TTL is set; absent while the category default applies.' }
|
|
31233
31241
|
components:
|
|
31234
31242
|
type: array
|
|
31235
31243
|
items:
|
|
@@ -31319,6 +31327,9 @@ paths:
|
|
|
31319
31327
|
base_url: { type: string }
|
|
31320
31328
|
phone_number:
|
|
31321
31329
|
type: string
|
|
31330
|
+
message_send_ttl_seconds:
|
|
31331
|
+
type: integer
|
|
31332
|
+
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
31333
|
examples:
|
|
31323
31334
|
custom:
|
|
31324
31335
|
summary: Custom template (requires review)
|
|
@@ -31371,6 +31382,7 @@ paths:
|
|
|
31371
31382
|
status: { type: string, description: "APPROVED for library templates, PENDING for custom" }
|
|
31372
31383
|
category: { type: string }
|
|
31373
31384
|
language: { type: string }
|
|
31385
|
+
message_send_ttl_seconds: { type: integer, description: 'Echoed when supplied on the request.' }
|
|
31374
31386
|
'400': { description: "Validation error (invalid name format, missing fields, invalid category)" }
|
|
31375
31387
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
31376
31388
|
'404': { description: WhatsApp account not found }
|
|
@@ -31432,6 +31444,7 @@ paths:
|
|
|
31432
31444
|
type: array
|
|
31433
31445
|
items:
|
|
31434
31446
|
type: object
|
|
31447
|
+
message_send_ttl_seconds: { type: integer, description: 'Only when a custom TTL is set; absent while the category default applies.' }
|
|
31435
31448
|
rejected_reason: { type: string, description: 'Only when status is REJECTED.' }
|
|
31436
31449
|
quality_score: { type: object, description: 'Post-approval quality (GREEN/YELLOW/RED), when Meta reports one.' }
|
|
31437
31450
|
'400': { $ref: '#/components/responses/BadRequest' }
|
|
@@ -31459,7 +31472,7 @@ paths:
|
|
|
31459
31472
|
tags: [WhatsApp]
|
|
31460
31473
|
summary: Update template
|
|
31461
31474
|
description: |
|
|
31462
|
-
Update one variant's components. Name, language and category cannot change after creation.
|
|
31475
|
+
Update one variant's components and/or its message_send_ttl_seconds. Name, language and category cannot change after creation.
|
|
31463
31476
|
|
|
31464
31477
|
Meta stores one template per **name + language**, so a name identifies a family of variants,
|
|
31465
31478
|
each with its own Meta id. Pass `language` to address one variant. Without it, a name with a
|
|
@@ -31491,7 +31504,6 @@ paths:
|
|
|
31491
31504
|
type: object
|
|
31492
31505
|
required:
|
|
31493
31506
|
- accountId
|
|
31494
|
-
- components
|
|
31495
31507
|
properties:
|
|
31496
31508
|
accountId:
|
|
31497
31509
|
type: string
|
|
@@ -31501,10 +31513,13 @@ paths:
|
|
|
31501
31513
|
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
31514
|
components:
|
|
31503
31515
|
type: array
|
|
31504
|
-
description: Updated template components
|
|
31516
|
+
description: 'Updated template components. Optional when only message_send_ttl_seconds changes; at least one of the two is required.'
|
|
31505
31517
|
minItems: 1
|
|
31506
31518
|
items:
|
|
31507
31519
|
$ref: '#/components/schemas/WhatsAppTemplateComponent'
|
|
31520
|
+
message_send_ttl_seconds:
|
|
31521
|
+
type: integer
|
|
31522
|
+
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
31523
|
example:
|
|
31509
31524
|
accountId: "507f1f77bcf86cd799439011"
|
|
31510
31525
|
language: "es"
|
|
@@ -31664,6 +31679,7 @@ paths:
|
|
|
31664
31679
|
type: array
|
|
31665
31680
|
items:
|
|
31666
31681
|
type: object
|
|
31682
|
+
message_send_ttl_seconds: { type: integer, description: 'Only when a custom TTL is set; absent while the category default applies.' }
|
|
31667
31683
|
rejected_reason: { type: string, description: 'Only when status is REJECTED.' }
|
|
31668
31684
|
quality_score: { type: object, description: 'Post-approval quality (GREEN/YELLOW/RED), when Meta reports one.' }
|
|
31669
31685
|
'400': { $ref: '#/components/responses/BadRequest' }
|
|
@@ -31676,7 +31692,7 @@ paths:
|
|
|
31676
31692
|
tags: [WhatsApp]
|
|
31677
31693
|
summary: Update template by id
|
|
31678
31694
|
description: |
|
|
31679
|
-
Update one variant's components by its Meta id. Name, language and category cannot change.
|
|
31695
|
+
Update one variant's components and/or its message_send_ttl_seconds by its Meta id. Name, language and category cannot change.
|
|
31680
31696
|
|
|
31681
31697
|
Meta only allows editing templates in `APPROVED`, `REJECTED` or `PAUSED` state; an approved
|
|
31682
31698
|
template can be edited once per 24 hours and up to 10 times per 30 days. A successful update
|
|
@@ -31701,17 +31717,19 @@ paths:
|
|
|
31701
31717
|
type: object
|
|
31702
31718
|
required:
|
|
31703
31719
|
- accountId
|
|
31704
|
-
- components
|
|
31705
31720
|
properties:
|
|
31706
31721
|
accountId:
|
|
31707
31722
|
type: string
|
|
31708
31723
|
description: WhatsApp social account ID
|
|
31709
31724
|
components:
|
|
31710
31725
|
type: array
|
|
31711
|
-
description: Updated template components
|
|
31726
|
+
description: 'Updated template components. Optional when only message_send_ttl_seconds changes; at least one of the two is required.'
|
|
31712
31727
|
minItems: 1
|
|
31713
31728
|
items:
|
|
31714
31729
|
$ref: '#/components/schemas/WhatsAppTemplateComponent'
|
|
31730
|
+
message_send_ttl_seconds:
|
|
31731
|
+
type: integer
|
|
31732
|
+
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
31733
|
responses:
|
|
31716
31734
|
'200':
|
|
31717
31735
|
description: Template updated successfully
|
|
@@ -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'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.
|
|
501
|
+
# 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.
|
|
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'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.
|
|
514
|
+
# 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.
|
|
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
|
|
@@ -37,6 +37,16 @@ describe Zernio::CommentAutomationTemplate do
|
|
|
37
37
|
end
|
|
38
38
|
end
|
|
39
39
|
|
|
40
|
+
describe 'test attribute "image_aspect_ratio"' do
|
|
41
|
+
it 'should work' do
|
|
42
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
43
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["horizontal", "square"])
|
|
44
|
+
# validator.allowable_values.each do |value|
|
|
45
|
+
# expect { instance.image_aspect_ratio = value }.not_to raise_error
|
|
46
|
+
# end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
40
50
|
describe 'test attribute "elements"' do
|
|
41
51
|
it 'should work' do
|
|
42
52
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -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/
|
|
@@ -37,6 +37,16 @@ describe Zernio::SendInboxMessageRequestTemplate do
|
|
|
37
37
|
end
|
|
38
38
|
end
|
|
39
39
|
|
|
40
|
+
describe 'test attribute "image_aspect_ratio"' do
|
|
41
|
+
it 'should work' do
|
|
42
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
43
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["horizontal", "square"])
|
|
44
|
+
# validator.allowable_values.each do |value|
|
|
45
|
+
# expect { instance.image_aspect_ratio = value }.not_to raise_error
|
|
46
|
+
# end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
40
50
|
describe 'test attribute "elements"' do
|
|
41
51
|
it 'should work' do
|
|
42
52
|
# 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,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: late-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.864
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenAPI-Generator
|
|
@@ -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.
|
|
5803
|
+
- zernio-sdk-0.0.864.gem
|
|
5804
5804
|
- zernio-sdk.gemspec
|
|
5805
5805
|
homepage: https://openapi-generator.tech
|
|
5806
5806
|
licenses:
|
data/zernio-sdk-0.0.862.gem
DELETED
|
Binary file
|