late-sdk 0.0.665 → 0.0.666

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 (42) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -4
  3. data/docs/SendInboxMessageRequestInteractiveAction.md +3 -1
  4. data/docs/SendInboxMessageRequestInteractiveActionOneOf5.md +2 -4
  5. data/docs/SendInboxMessageRequestInteractiveActionOneOf6.md +2 -2
  6. data/docs/SendInboxMessageRequestInteractiveActionOneOf7.md +4 -4
  7. data/docs/{SendInboxMessageRequestInteractiveActionOneOf6SectionsInner.md → SendInboxMessageRequestInteractiveActionOneOf7SectionsInner.md} +3 -3
  8. data/docs/{SendInboxMessageRequestInteractiveActionOneOf6SectionsInnerProductItemsInner.md → SendInboxMessageRequestInteractiveActionOneOf7SectionsInnerProductItemsInner.md} +2 -2
  9. data/docs/SendInboxMessageRequestInteractiveActionOneOf8.md +4 -2
  10. data/docs/{SendInboxMessageRequestInteractiveActionOneOf7Parameters.md → SendInboxMessageRequestInteractiveActionOneOf8Parameters.md} +2 -2
  11. data/docs/SendInboxMessageRequestInteractiveActionOneOf9.md +18 -0
  12. data/docs/{SendInboxMessageRequestInteractiveActionOneOf8CardsInner.md → SendInboxMessageRequestInteractiveActionOneOf9CardsInner.md} +2 -2
  13. data/docs/WebhookPayloadMessageMetadata.md +4 -0
  14. data/lib/zernio-sdk/models/send_inbox_message_request_interactive.rb +3 -3
  15. data/lib/zernio-sdk/models/send_inbox_message_request_interactive_action.rb +2 -1
  16. data/lib/zernio-sdk/models/send_inbox_message_request_interactive_action_one_of5.rb +42 -46
  17. data/lib/zernio-sdk/models/send_inbox_message_request_interactive_action_one_of6.rb +18 -38
  18. data/lib/zernio-sdk/models/send_inbox_message_request_interactive_action_one_of7.rb +64 -49
  19. data/lib/zernio-sdk/models/{send_inbox_message_request_interactive_action_one_of6_sections_inner.rb → send_inbox_message_request_interactive_action_one_of7_sections_inner.rb} +4 -4
  20. data/lib/zernio-sdk/models/{send_inbox_message_request_interactive_action_one_of6_sections_inner_product_items_inner.rb → send_inbox_message_request_interactive_action_one_of7_sections_inner_product_items_inner.rb} +3 -3
  21. data/lib/zernio-sdk/models/send_inbox_message_request_interactive_action_one_of8.rb +52 -39
  22. data/lib/zernio-sdk/models/{send_inbox_message_request_interactive_action_one_of7_parameters.rb → send_inbox_message_request_interactive_action_one_of8_parameters.rb} +3 -3
  23. data/lib/zernio-sdk/models/send_inbox_message_request_interactive_action_one_of9.rb +185 -0
  24. data/lib/zernio-sdk/models/{send_inbox_message_request_interactive_action_one_of8_cards_inner.rb → send_inbox_message_request_interactive_action_one_of9_cards_inner.rb} +3 -3
  25. data/lib/zernio-sdk/models/webhook_payload_message_metadata.rb +35 -1
  26. data/lib/zernio-sdk/version.rb +1 -1
  27. data/lib/zernio-sdk.rb +5 -4
  28. data/openapi.yaml +35 -1
  29. data/spec/models/send_inbox_message_request_interactive_action_one_of5_spec.rb +5 -7
  30. data/spec/models/send_inbox_message_request_interactive_action_one_of6_spec.rb +1 -1
  31. data/spec/models/{send_inbox_message_request_interactive_action_one_of6_sections_inner_product_items_inner_spec.rb → send_inbox_message_request_interactive_action_one_of7_sections_inner_product_items_inner_spec.rb} +6 -6
  32. data/spec/models/{send_inbox_message_request_interactive_action_one_of6_sections_inner_spec.rb → send_inbox_message_request_interactive_action_one_of7_sections_inner_spec.rb} +6 -6
  33. data/spec/models/send_inbox_message_request_interactive_action_one_of7_spec.rb +2 -6
  34. data/spec/models/{send_inbox_message_request_interactive_action_one_of7_parameters_spec.rb → send_inbox_message_request_interactive_action_one_of8_parameters_spec.rb} +6 -6
  35. data/spec/models/send_inbox_message_request_interactive_action_one_of8_spec.rb +11 -1
  36. data/spec/models/{send_inbox_message_request_interactive_action_one_of8_cards_inner_spec.rb → send_inbox_message_request_interactive_action_one_of9_cards_inner_spec.rb} +6 -6
  37. data/spec/models/send_inbox_message_request_interactive_action_one_of9_spec.rb +36 -0
  38. data/spec/models/send_inbox_message_request_interactive_spec.rb +1 -1
  39. data/spec/models/webhook_payload_message_metadata_spec.rb +16 -0
  40. data/zernio-sdk-0.0.666.gem +0 -0
  41. metadata +22 -18
  42. data/zernio-sdk-0.0.665.gem +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b0cc330c893727d678434989de1bb9061a62d7393fb95962b7420b9df4147ea0
4
- data.tar.gz: aeda8af28875160bd38d553d255982dafc26a73b5ac13f21c9f84562c9fc1755
3
+ metadata.gz: 014b4a3e2c935be51cfda88e94f014f071111168f3b845c09c103f7835f5ea76
4
+ data.tar.gz: 76508c5193b771242f841ea0ac05956629b8cc08f370f746b51f168563eb0dbe
5
5
  SHA512:
6
- metadata.gz: 3d76846f709cba19df098f13fd5938afa5c9bfdc97734ea9c208b362925879085c055b324ec37bd3baa76062f3f1e16368cc75ebb9e118d3af7ac952d49e0f5d
7
- data.tar.gz: 87ce582abe3122e309ccab15e889c7ebaf183f280eb2edf1d3da422026a6043549d37466cc5ea6ae61fbb2afe46c1b7701ce0281bc7e2645a6440a2817c0808e
6
+ metadata.gz: 1fc60d43791fb1d3462f8c9162e545ccc09bcc01b518b8e6ce13ad576ac684d64a1b8c91d1653b23cea0309edde116e0839c7df60d30fbd1c27a4a9ad392f99d
7
+ data.tar.gz: 951a320ad95e26aea5e908ba59936dcbe2f256fe02fe4c5f56a1f15fd1307090574c2ad0e6b3407e78e86d0bf790e762e6f756b08884b88eb053ea5c5e04ba7f
data/README.md CHANGED
@@ -1774,12 +1774,13 @@ Class | Method | HTTP request | Description
1774
1774
  - [Zernio::SendInboxMessageRequestInteractiveActionOneOf4](docs/SendInboxMessageRequestInteractiveActionOneOf4.md)
1775
1775
  - [Zernio::SendInboxMessageRequestInteractiveActionOneOf5](docs/SendInboxMessageRequestInteractiveActionOneOf5.md)
1776
1776
  - [Zernio::SendInboxMessageRequestInteractiveActionOneOf6](docs/SendInboxMessageRequestInteractiveActionOneOf6.md)
1777
- - [Zernio::SendInboxMessageRequestInteractiveActionOneOf6SectionsInner](docs/SendInboxMessageRequestInteractiveActionOneOf6SectionsInner.md)
1778
- - [Zernio::SendInboxMessageRequestInteractiveActionOneOf6SectionsInnerProductItemsInner](docs/SendInboxMessageRequestInteractiveActionOneOf6SectionsInnerProductItemsInner.md)
1779
1777
  - [Zernio::SendInboxMessageRequestInteractiveActionOneOf7](docs/SendInboxMessageRequestInteractiveActionOneOf7.md)
1780
- - [Zernio::SendInboxMessageRequestInteractiveActionOneOf7Parameters](docs/SendInboxMessageRequestInteractiveActionOneOf7Parameters.md)
1778
+ - [Zernio::SendInboxMessageRequestInteractiveActionOneOf7SectionsInner](docs/SendInboxMessageRequestInteractiveActionOneOf7SectionsInner.md)
1779
+ - [Zernio::SendInboxMessageRequestInteractiveActionOneOf7SectionsInnerProductItemsInner](docs/SendInboxMessageRequestInteractiveActionOneOf7SectionsInnerProductItemsInner.md)
1781
1780
  - [Zernio::SendInboxMessageRequestInteractiveActionOneOf8](docs/SendInboxMessageRequestInteractiveActionOneOf8.md)
1782
- - [Zernio::SendInboxMessageRequestInteractiveActionOneOf8CardsInner](docs/SendInboxMessageRequestInteractiveActionOneOf8CardsInner.md)
1781
+ - [Zernio::SendInboxMessageRequestInteractiveActionOneOf8Parameters](docs/SendInboxMessageRequestInteractiveActionOneOf8Parameters.md)
1782
+ - [Zernio::SendInboxMessageRequestInteractiveActionOneOf9](docs/SendInboxMessageRequestInteractiveActionOneOf9.md)
1783
+ - [Zernio::SendInboxMessageRequestInteractiveActionOneOf9CardsInner](docs/SendInboxMessageRequestInteractiveActionOneOf9CardsInner.md)
1783
1784
  - [Zernio::SendInboxMessageRequestInteractiveActionOneOfSectionsInner](docs/SendInboxMessageRequestInteractiveActionOneOfSectionsInner.md)
1784
1785
  - [Zernio::SendInboxMessageRequestInteractiveActionOneOfSectionsInnerRowsInner](docs/SendInboxMessageRequestInteractiveActionOneOfSectionsInnerRowsInner.md)
1785
1786
  - [Zernio::SendInboxMessageRequestInteractiveBody](docs/SendInboxMessageRequestInteractiveBody.md)
@@ -22,7 +22,8 @@ Zernio::SendInboxMessageRequestInteractiveAction.openapi_one_of
22
22
  # :'SendInboxMessageRequestInteractiveActionOneOf5',
23
23
  # :'SendInboxMessageRequestInteractiveActionOneOf6',
24
24
  # :'SendInboxMessageRequestInteractiveActionOneOf7',
25
- # :'SendInboxMessageRequestInteractiveActionOneOf8'
25
+ # :'SendInboxMessageRequestInteractiveActionOneOf8',
26
+ # :'SendInboxMessageRequestInteractiveActionOneOf9'
26
27
  # ]
27
28
  ```
28
29
 
@@ -59,5 +60,6 @@ Zernio::SendInboxMessageRequestInteractiveAction.build(data_that_doesnt_match)
59
60
  - `SendInboxMessageRequestInteractiveActionOneOf6`
60
61
  - `SendInboxMessageRequestInteractiveActionOneOf7`
61
62
  - `SendInboxMessageRequestInteractiveActionOneOf8`
63
+ - `SendInboxMessageRequestInteractiveActionOneOf9`
62
64
  - `nil` (if no type matches)
63
65
 
@@ -4,8 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **catalog_id** | **String** | Meta catalog ID connected to the WhatsApp Business Account. | |
8
- | **product_retailer_id** | **String** | Retailer ID (SKU) of the product inside the catalog. | |
7
+ | **name** | **String** | | |
9
8
 
10
9
  ## Example
11
10
 
@@ -13,8 +12,7 @@
13
12
  require 'zernio-sdk'
14
13
 
15
14
  instance = Zernio::SendInboxMessageRequestInteractiveActionOneOf5.new(
16
- catalog_id: null,
17
- product_retailer_id: null
15
+ name: null
18
16
  )
19
17
  ```
20
18
 
@@ -5,7 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **catalog_id** | **String** | Meta catalog ID connected to the WhatsApp Business Account. | |
8
- | **sections** | [**Array<SendInboxMessageRequestInteractiveActionOneOf6SectionsInner>**](SendInboxMessageRequestInteractiveActionOneOf6SectionsInner.md) | 1-10 sections. Total products across all sections cannot exceed 30. | |
8
+ | **product_retailer_id** | **String** | Retailer ID (SKU) of the product inside the catalog. | |
9
9
 
10
10
  ## Example
11
11
 
@@ -14,7 +14,7 @@ require 'zernio-sdk'
14
14
 
15
15
  instance = Zernio::SendInboxMessageRequestInteractiveActionOneOf6.new(
16
16
  catalog_id: null,
17
- sections: null
17
+ product_retailer_id: null
18
18
  )
19
19
  ```
20
20
 
@@ -4,8 +4,8 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **name** | **String** | | |
8
- | **parameters** | [**SendInboxMessageRequestInteractiveActionOneOf7Parameters**](SendInboxMessageRequestInteractiveActionOneOf7Parameters.md) | | [optional] |
7
+ | **catalog_id** | **String** | Meta catalog ID connected to the WhatsApp Business Account. | |
8
+ | **sections** | [**Array<SendInboxMessageRequestInteractiveActionOneOf7SectionsInner>**](SendInboxMessageRequestInteractiveActionOneOf7SectionsInner.md) | 1-10 sections. Total products across all sections cannot exceed 30. | |
9
9
 
10
10
  ## Example
11
11
 
@@ -13,8 +13,8 @@
13
13
  require 'zernio-sdk'
14
14
 
15
15
  instance = Zernio::SendInboxMessageRequestInteractiveActionOneOf7.new(
16
- name: null,
17
- parameters: null
16
+ catalog_id: null,
17
+ sections: null
18
18
  )
19
19
  ```
20
20
 
@@ -1,18 +1,18 @@
1
- # Zernio::SendInboxMessageRequestInteractiveActionOneOf6SectionsInner
1
+ # Zernio::SendInboxMessageRequestInteractiveActionOneOf7SectionsInner
2
2
 
3
3
  ## Properties
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **title** | **String** | Optional section header. | [optional] |
8
- | **product_items** | [**Array<SendInboxMessageRequestInteractiveActionOneOf6SectionsInnerProductItemsInner>**](SendInboxMessageRequestInteractiveActionOneOf6SectionsInnerProductItemsInner.md) | | |
8
+ | **product_items** | [**Array<SendInboxMessageRequestInteractiveActionOneOf7SectionsInnerProductItemsInner>**](SendInboxMessageRequestInteractiveActionOneOf7SectionsInnerProductItemsInner.md) | | |
9
9
 
10
10
  ## Example
11
11
 
12
12
  ```ruby
13
13
  require 'zernio-sdk'
14
14
 
15
- instance = Zernio::SendInboxMessageRequestInteractiveActionOneOf6SectionsInner.new(
15
+ instance = Zernio::SendInboxMessageRequestInteractiveActionOneOf7SectionsInner.new(
16
16
  title: null,
17
17
  product_items: null
18
18
  )
@@ -1,4 +1,4 @@
1
- # Zernio::SendInboxMessageRequestInteractiveActionOneOf6SectionsInnerProductItemsInner
1
+ # Zernio::SendInboxMessageRequestInteractiveActionOneOf7SectionsInnerProductItemsInner
2
2
 
3
3
  ## Properties
4
4
 
@@ -11,7 +11,7 @@
11
11
  ```ruby
12
12
  require 'zernio-sdk'
13
13
 
14
- instance = Zernio::SendInboxMessageRequestInteractiveActionOneOf6SectionsInnerProductItemsInner.new(
14
+ instance = Zernio::SendInboxMessageRequestInteractiveActionOneOf7SectionsInnerProductItemsInner.new(
15
15
  product_retailer_id: null
16
16
  )
17
17
  ```
@@ -4,7 +4,8 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **cards** | [**Array<SendInboxMessageRequestInteractiveActionOneOf8CardsInner>**](SendInboxMessageRequestInteractiveActionOneOf8CardsInner.md) | | |
7
+ | **name** | **String** | | |
8
+ | **parameters** | [**SendInboxMessageRequestInteractiveActionOneOf8Parameters**](SendInboxMessageRequestInteractiveActionOneOf8Parameters.md) | | [optional] |
8
9
 
9
10
  ## Example
10
11
 
@@ -12,7 +13,8 @@
12
13
  require 'zernio-sdk'
13
14
 
14
15
  instance = Zernio::SendInboxMessageRequestInteractiveActionOneOf8.new(
15
- cards: null
16
+ name: null,
17
+ parameters: null
16
18
  )
17
19
  ```
18
20
 
@@ -1,4 +1,4 @@
1
- # Zernio::SendInboxMessageRequestInteractiveActionOneOf7Parameters
1
+ # Zernio::SendInboxMessageRequestInteractiveActionOneOf8Parameters
2
2
 
3
3
  ## Properties
4
4
 
@@ -11,7 +11,7 @@
11
11
  ```ruby
12
12
  require 'zernio-sdk'
13
13
 
14
- instance = Zernio::SendInboxMessageRequestInteractiveActionOneOf7Parameters.new(
14
+ instance = Zernio::SendInboxMessageRequestInteractiveActionOneOf8Parameters.new(
15
15
  thumbnail_product_retailer_id: null
16
16
  )
17
17
  ```
@@ -0,0 +1,18 @@
1
+ # Zernio::SendInboxMessageRequestInteractiveActionOneOf9
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **cards** | [**Array<SendInboxMessageRequestInteractiveActionOneOf9CardsInner>**](SendInboxMessageRequestInteractiveActionOneOf9CardsInner.md) | | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'zernio-sdk'
13
+
14
+ instance = Zernio::SendInboxMessageRequestInteractiveActionOneOf9.new(
15
+ cards: null
16
+ )
17
+ ```
18
+
@@ -1,4 +1,4 @@
1
- # Zernio::SendInboxMessageRequestInteractiveActionOneOf8CardsInner
1
+ # Zernio::SendInboxMessageRequestInteractiveActionOneOf9CardsInner
2
2
 
3
3
  ## Properties
4
4
 
@@ -15,7 +15,7 @@
15
15
  ```ruby
16
16
  require 'zernio-sdk'
17
17
 
18
- instance = Zernio::SendInboxMessageRequestInteractiveActionOneOf8CardsInner.new(
18
+ instance = Zernio::SendInboxMessageRequestInteractiveActionOneOf9CardsInner.new(
19
19
  card_index: null,
20
20
  type: null,
21
21
  header: null,
@@ -15,6 +15,8 @@
15
15
  | **flow_response_data** | **Hash<String, Object>** | WhatsApp only. Parsed Flow response JSON. Populated when `flowResponseJson` is valid JSON; otherwise omitted. Keys and value types depend on the specific Flow that was submitted. | [optional] |
16
16
  | **order** | [**WebhookPayloadMessageMetadataOrder**](WebhookPayloadMessageMetadataOrder.md) | | [optional] |
17
17
  | **referred_product** | [**WebhookPayloadMessageMetadataReferredProduct**](WebhookPayloadMessageMetadataReferredProduct.md) | | [optional] |
18
+ | **contacts** | **Array<Hash<String, Object>>** | WhatsApp only. Contact cards the user shared, forwarded verbatim from Meta. Read `contactsOrigin` before treating any number here as the sender's own. | [optional] |
19
+ | **contacts_origin** | **String** | WhatsApp only. How the contact card was shared. `contact_request` means the user tapped a `request_contact_info` button, so the number is their own and consented. `other` means they picked a card from their address book: it may be anyone's, and must NOT be stored as the sender's identity. Omitted when Meta sends no origin. | [optional] |
18
20
  | **story_reply** | [**WebhookPayloadMessageMetadataStoryReply**](WebhookPayloadMessageMetadataStoryReply.md) | | [optional] |
19
21
  | **is_story_mention** | **Boolean** | Instagram only. True when the message was generated by an IG user mentioning the account in their own story (`story_mention` attachment type). Mutually exclusive in practice with `storyReply`. | [optional] |
20
22
  | **referral** | [**WebhookPayloadMessageMetadataReferral**](WebhookPayloadMessageMetadataReferral.md) | | [optional] |
@@ -36,6 +38,8 @@ instance = Zernio::WebhookPayloadMessageMetadata.new(
36
38
  flow_response_data: null,
37
39
  order: null,
38
40
  referred_product: null,
41
+ contacts: null,
42
+ contacts_origin: null,
39
43
  story_reply: null,
40
44
  is_story_mention: null,
41
45
  referral: null
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Zernio
17
- # WhatsApp-only. Rich interactive payload for list messages, CTA URL buttons, Flow prompts, location requests, voice-call buttons, and commerce messages (single product, product list, catalog, and carousel). When set, takes priority over `buttons` and `quickReplies`. The shape mirrors Meta's Cloud API `interactive` object verbatim, so any payload that works against Meta directly will also work here. Use `buttons` / `quickReplies` for simple button replies (WhatsApp's `interactive.type: \"button\"`): the abstraction caps at 3 buttons and handles the auto-conversion for you. Use this field only for the types listed in the enum below. All interactive messages are session messages: they can only be sent inside the 24-hour customer service window opened by the user's last inbound message. Commerce types (`product`, `product_list`, `catalog_message`, and product carousels) require a Meta catalog connected to the WhatsApp Business Account in Commerce Manager. Media carousels (image/video cards) do not need a catalog. For `product`, `body` is optional (WhatsApp renders the product card itself) and `header` is not allowed (the product image is the header). For `product_list`, a `header` with `type: \"text\"` is required. For `carousel`, top-level `header`/`footer` are not supported; media goes on each card instead. For `voice_call`, the message renders WhatsApp's native call button; tapping it starts a voice call to your business number. Requires WhatsApp Business Calling to be enabled on the sending number. The optional `parameters.payload` string is echoed back on the `calls` webhook (as `cta_payload`) for attribution. For `location_request_message`, `action` may be omitted (we default it to `{ \"name\": \"send_location\" }`). WhatsApp renders a localized \"Send location\" button; the user's reply arrives as a regular location message in the conversation. For `catalog_message`, `action` may also be omitted (we default it to `{ \"name\": \"catalog_message\" }`). Tap events come back via the `message.received` webhook with `metadata.interactiveType` set to `list_reply` or `nfm_reply`. Carts submitted from commerce messages arrive as `metadata.order`; product inquiries arrive as `metadata.referredProduct`.
17
+ # WhatsApp-only. Rich interactive payload for list messages, CTA URL buttons, Flow prompts, location requests, voice-call buttons, and commerce messages (single product, product list, catalog, and carousel). When set, takes priority over `buttons` and `quickReplies`. The shape mirrors Meta's Cloud API `interactive` object verbatim, so any payload that works against Meta directly will also work here. Use `buttons` / `quickReplies` for simple button replies (WhatsApp's `interactive.type: \"button\"`): the abstraction caps at 3 buttons and handles the auto-conversion for you. Use this field only for the types listed in the enum below. All interactive messages are session messages: they can only be sent inside the 24-hour customer service window opened by the user's last inbound message. Commerce types (`product`, `product_list`, `catalog_message`, and product carousels) require a Meta catalog connected to the WhatsApp Business Account in Commerce Manager. Media carousels (image/video cards) do not need a catalog. For `product`, `body` is optional (WhatsApp renders the product card itself) and `header` is not allowed (the product image is the header). For `product_list`, a `header` with `type: \"text\"` is required. For `carousel`, top-level `header`/`footer` are not supported; media goes on each card instead. For `voice_call`, the message renders WhatsApp's native call button; tapping it starts a voice call to your business number. Requires WhatsApp Business Calling to be enabled on the sending number. The optional `parameters.payload` string is echoed back on the `calls` webhook (as `cta_payload`) for attribution. For `location_request_message`, `action` may be omitted (we default it to `{ \"name\": \"send_location\" }`). WhatsApp renders a localized \"Send location\" button; the user's reply arrives as a regular location message in the conversation. For `request_contact_info`, `action` may be omitted (we default it to `{ \"name\": \"request_contact_info\" }`). WhatsApp renders a localized share button that cannot be relabelled, so put the reason for asking in `body.text`: this is a consent prompt, and a bare request converts badly. The reply arrives as an inbound `contacts` message with `metadata.contactsOrigin` set to `contact_request`, and we fold the shared number back into the contact automatically. A `contacts` message with origin `other` is a card the user picked from their address book and is NOT proof of their own number. For `catalog_message`, `action` may also be omitted (we default it to `{ \"name\": \"catalog_message\" }`). Tap events come back via the `message.received` webhook with `metadata.interactiveType` set to `list_reply` or `nfm_reply`. Carts submitted from commerce messages arrive as `metadata.order`; product inquiries arrive as `metadata.referredProduct`.
18
18
  class SendInboxMessageRequestInteractive < ApiModelBase
19
19
  # Which interactive layout to render.
20
20
  attr_accessor :type
@@ -143,7 +143,7 @@ module Zernio
143
143
  def valid?
144
144
  warn '[DEPRECATED] the `valid?` method is obsolete'
145
145
  return false if @type.nil?
146
- type_validator = EnumAttributeValidator.new('String', ["list", "cta_url", "flow", "location_request_message", "voice_call", "product", "product_list", "catalog_message", "carousel"])
146
+ type_validator = EnumAttributeValidator.new('String', ["list", "cta_url", "flow", "location_request_message", "request_contact_info", "voice_call", "product", "product_list", "catalog_message", "carousel"])
147
147
  return false unless type_validator.valid?(@type)
148
148
  true
149
149
  end
@@ -151,7 +151,7 @@ module Zernio
151
151
  # Custom attribute writer method checking allowed values (enum).
152
152
  # @param [Object] type Object to be assigned
153
153
  def type=(type)
154
- validator = EnumAttributeValidator.new('String', ["list", "cta_url", "flow", "location_request_message", "voice_call", "product", "product_list", "catalog_message", "carousel"])
154
+ validator = EnumAttributeValidator.new('String', ["list", "cta_url", "flow", "location_request_message", "request_contact_info", "voice_call", "product", "product_list", "catalog_message", "carousel"])
155
155
  unless validator.valid?(type)
156
156
  fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
157
157
  end
@@ -27,7 +27,8 @@ module Zernio
27
27
  :'SendInboxMessageRequestInteractiveActionOneOf5',
28
28
  :'SendInboxMessageRequestInteractiveActionOneOf6',
29
29
  :'SendInboxMessageRequestInteractiveActionOneOf7',
30
- :'SendInboxMessageRequestInteractiveActionOneOf8'
30
+ :'SendInboxMessageRequestInteractiveActionOneOf8',
31
+ :'SendInboxMessageRequestInteractiveActionOneOf9'
31
32
  ]
32
33
  end
33
34
 
@@ -14,19 +14,36 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Zernio
17
- # Single-product action. `type` on the parent must be `product`. Requires a Meta catalog connected to the WhatsApp Business Account in Commerce Manager.
17
+ # Contact-info request action. `type` on the parent must be `request_contact_info`. May be omitted entirely; it is defaulted.
18
18
  class SendInboxMessageRequestInteractiveActionOneOf5 < ApiModelBase
19
- # Meta catalog ID connected to the WhatsApp Business Account.
20
- attr_accessor :catalog_id
19
+ attr_accessor :name
20
+
21
+ class EnumAttributeValidator
22
+ attr_reader :datatype
23
+ attr_reader :allowable_values
24
+
25
+ def initialize(datatype, allowable_values)
26
+ @allowable_values = allowable_values.map do |value|
27
+ case datatype.to_s
28
+ when /Integer/i
29
+ value.to_i
30
+ when /Float/i
31
+ value.to_f
32
+ else
33
+ value
34
+ end
35
+ end
36
+ end
21
37
 
22
- # Retailer ID (SKU) of the product inside the catalog.
23
- attr_accessor :product_retailer_id
38
+ def valid?(value)
39
+ !value || allowable_values.include?(value)
40
+ end
41
+ end
24
42
 
25
43
  # Attribute mapping from ruby-style variable name to JSON key.
26
44
  def self.attribute_map
27
45
  {
28
- :'catalog_id' => :'catalog_id',
29
- :'product_retailer_id' => :'product_retailer_id'
46
+ :'name' => :'name'
30
47
  }
31
48
  end
32
49
 
@@ -43,8 +60,7 @@ module Zernio
43
60
  # Attribute type mapping.
44
61
  def self.openapi_types
45
62
  {
46
- :'catalog_id' => :'String',
47
- :'product_retailer_id' => :'String'
63
+ :'name' => :'String'
48
64
  }
49
65
  end
50
66
 
@@ -70,16 +86,10 @@ module Zernio
70
86
  h[k.to_sym] = v
71
87
  }
72
88
 
73
- if attributes.key?(:'catalog_id')
74
- self.catalog_id = attributes[:'catalog_id']
75
- else
76
- self.catalog_id = nil
77
- end
78
-
79
- if attributes.key?(:'product_retailer_id')
80
- self.product_retailer_id = attributes[:'product_retailer_id']
89
+ if attributes.key?(:'name')
90
+ self.name = attributes[:'name']
81
91
  else
82
- self.product_retailer_id = nil
92
+ self.name = nil
83
93
  end
84
94
  end
85
95
 
@@ -88,12 +98,8 @@ module Zernio
88
98
  def list_invalid_properties
89
99
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
90
100
  invalid_properties = Array.new
91
- if @catalog_id.nil?
92
- invalid_properties.push('invalid value for "catalog_id", catalog_id cannot be nil.')
93
- end
94
-
95
- if @product_retailer_id.nil?
96
- invalid_properties.push('invalid value for "product_retailer_id", product_retailer_id cannot be nil.')
101
+ if @name.nil?
102
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
97
103
  end
98
104
 
99
105
  invalid_properties
@@ -103,29 +109,20 @@ module Zernio
103
109
  # @return true if the model is valid
104
110
  def valid?
105
111
  warn '[DEPRECATED] the `valid?` method is obsolete'
106
- return false if @catalog_id.nil?
107
- return false if @product_retailer_id.nil?
112
+ return false if @name.nil?
113
+ name_validator = EnumAttributeValidator.new('String', ["request_contact_info"])
114
+ return false unless name_validator.valid?(@name)
108
115
  true
109
116
  end
110
117
 
111
- # Custom attribute writer method with validation
112
- # @param [Object] catalog_id Value to be assigned
113
- def catalog_id=(catalog_id)
114
- if catalog_id.nil?
115
- fail ArgumentError, 'catalog_id cannot be nil'
118
+ # Custom attribute writer method checking allowed values (enum).
119
+ # @param [Object] name Object to be assigned
120
+ def name=(name)
121
+ validator = EnumAttributeValidator.new('String', ["request_contact_info"])
122
+ unless validator.valid?(name)
123
+ fail ArgumentError, "invalid value for \"name\", must be one of #{validator.allowable_values}."
116
124
  end
117
-
118
- @catalog_id = catalog_id
119
- end
120
-
121
- # Custom attribute writer method with validation
122
- # @param [Object] product_retailer_id Value to be assigned
123
- def product_retailer_id=(product_retailer_id)
124
- if product_retailer_id.nil?
125
- fail ArgumentError, 'product_retailer_id cannot be nil'
126
- end
127
-
128
- @product_retailer_id = product_retailer_id
125
+ @name = name
129
126
  end
130
127
 
131
128
  # Checks equality by comparing each attribute.
@@ -133,8 +130,7 @@ module Zernio
133
130
  def ==(o)
134
131
  return true if self.equal?(o)
135
132
  self.class == o.class &&
136
- catalog_id == o.catalog_id &&
137
- product_retailer_id == o.product_retailer_id
133
+ name == o.name
138
134
  end
139
135
 
140
136
  # @see the `==` method
@@ -146,7 +142,7 @@ module Zernio
146
142
  # Calculates hash code according to all attributes.
147
143
  # @return [Integer] Hash code
148
144
  def hash
149
- [catalog_id, product_retailer_id].hash
145
+ [name].hash
150
146
  end
151
147
 
152
148
  # Builds the object from hash
@@ -14,19 +14,19 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Zernio
17
- # Multi-product action. `type` on the parent must be `product_list`. Requires a Meta catalog connected to the WhatsApp Business Account in Commerce Manager.
17
+ # Single-product action. `type` on the parent must be `product`. Requires a Meta catalog connected to the WhatsApp Business Account in Commerce Manager.
18
18
  class SendInboxMessageRequestInteractiveActionOneOf6 < ApiModelBase
19
19
  # Meta catalog ID connected to the WhatsApp Business Account.
20
20
  attr_accessor :catalog_id
21
21
 
22
- # 1-10 sections. Total products across all sections cannot exceed 30.
23
- attr_accessor :sections
22
+ # Retailer ID (SKU) of the product inside the catalog.
23
+ attr_accessor :product_retailer_id
24
24
 
25
25
  # Attribute mapping from ruby-style variable name to JSON key.
26
26
  def self.attribute_map
27
27
  {
28
28
  :'catalog_id' => :'catalog_id',
29
- :'sections' => :'sections'
29
+ :'product_retailer_id' => :'product_retailer_id'
30
30
  }
31
31
  end
32
32
 
@@ -44,7 +44,7 @@ module Zernio
44
44
  def self.openapi_types
45
45
  {
46
46
  :'catalog_id' => :'String',
47
- :'sections' => :'Array<SendInboxMessageRequestInteractiveActionOneOf6SectionsInner>'
47
+ :'product_retailer_id' => :'String'
48
48
  }
49
49
  end
50
50
 
@@ -76,12 +76,10 @@ module Zernio
76
76
  self.catalog_id = nil
77
77
  end
78
78
 
79
- if attributes.key?(:'sections')
80
- if (value = attributes[:'sections']).is_a?(Array)
81
- self.sections = value
82
- end
79
+ if attributes.key?(:'product_retailer_id')
80
+ self.product_retailer_id = attributes[:'product_retailer_id']
83
81
  else
84
- self.sections = nil
82
+ self.product_retailer_id = nil
85
83
  end
86
84
  end
87
85
 
@@ -94,16 +92,8 @@ module Zernio
94
92
  invalid_properties.push('invalid value for "catalog_id", catalog_id cannot be nil.')
95
93
  end
96
94
 
97
- if @sections.nil?
98
- invalid_properties.push('invalid value for "sections", sections cannot be nil.')
99
- end
100
-
101
- if @sections.length > 10
102
- invalid_properties.push('invalid value for "sections", number of items must be less than or equal to 10.')
103
- end
104
-
105
- if @sections.length < 1
106
- invalid_properties.push('invalid value for "sections", number of items must be greater than or equal to 1.')
95
+ if @product_retailer_id.nil?
96
+ invalid_properties.push('invalid value for "product_retailer_id", product_retailer_id cannot be nil.')
107
97
  end
108
98
 
109
99
  invalid_properties
@@ -114,9 +104,7 @@ module Zernio
114
104
  def valid?
115
105
  warn '[DEPRECATED] the `valid?` method is obsolete'
116
106
  return false if @catalog_id.nil?
117
- return false if @sections.nil?
118
- return false if @sections.length > 10
119
- return false if @sections.length < 1
107
+ return false if @product_retailer_id.nil?
120
108
  true
121
109
  end
122
110
 
@@ -131,21 +119,13 @@ module Zernio
131
119
  end
132
120
 
133
121
  # Custom attribute writer method with validation
134
- # @param [Object] sections Value to be assigned
135
- def sections=(sections)
136
- if sections.nil?
137
- fail ArgumentError, 'sections cannot be nil'
138
- end
139
-
140
- if sections.length > 10
141
- fail ArgumentError, 'invalid value for "sections", number of items must be less than or equal to 10.'
142
- end
143
-
144
- if sections.length < 1
145
- fail ArgumentError, 'invalid value for "sections", number of items must be greater than or equal to 1.'
122
+ # @param [Object] product_retailer_id Value to be assigned
123
+ def product_retailer_id=(product_retailer_id)
124
+ if product_retailer_id.nil?
125
+ fail ArgumentError, 'product_retailer_id cannot be nil'
146
126
  end
147
127
 
148
- @sections = sections
128
+ @product_retailer_id = product_retailer_id
149
129
  end
150
130
 
151
131
  # Checks equality by comparing each attribute.
@@ -154,7 +134,7 @@ module Zernio
154
134
  return true if self.equal?(o)
155
135
  self.class == o.class &&
156
136
  catalog_id == o.catalog_id &&
157
- sections == o.sections
137
+ product_retailer_id == o.product_retailer_id
158
138
  end
159
139
 
160
140
  # @see the `==` method
@@ -166,7 +146,7 @@ module Zernio
166
146
  # Calculates hash code according to all attributes.
167
147
  # @return [Integer] Hash code
168
148
  def hash
169
- [catalog_id, sections].hash
149
+ [catalog_id, product_retailer_id].hash
170
150
  end
171
151
 
172
152
  # Builds the object from hash