wavix-ruby-sdk 1.5.0 → 2.0.0
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/.fern/metadata.json +3 -3
- data/.fern/replay.lock +13 -1
- data/lib/wavix/client.rb +1 -1
- data/lib/wavix/types/whats_app_contact_marketing_preference_event_data.rb +13 -0
- data/lib/wavix/types/whats_app_contact_marketing_resumed_event.rb +16 -0
- data/lib/wavix/types/whats_app_contact_marketing_stopped_event.rb +16 -0
- data/lib/wavix/types/whats_app_event.rb +18 -0
- data/lib/wavix/types/whats_app_event_list_response.rb +15 -0
- data/lib/wavix/types/whats_app_event_type.rb +32 -0
- data/lib/wavix/types/whats_app_inbound_audio_content.rb +11 -0
- data/lib/wavix/types/whats_app_inbound_button_reply.rb +12 -0
- data/lib/wavix/types/whats_app_inbound_button_reply_content.rb +11 -0
- data/lib/wavix/types/whats_app_inbound_contact_card.rb +14 -0
- data/lib/wavix/types/whats_app_inbound_contacts_content.rb +11 -0
- data/lib/wavix/types/whats_app_inbound_content.rb +51 -0
- data/lib/wavix/types/whats_app_inbound_context.rb +10 -0
- data/lib/wavix/types/whats_app_inbound_document_content.rb +10 -0
- data/lib/wavix/types/whats_app_inbound_flow_response_content.rb +11 -0
- data/lib/wavix/types/whats_app_inbound_image_content.rb +10 -0
- data/lib/wavix/types/whats_app_inbound_list_reply.rb +14 -0
- data/lib/wavix/types/whats_app_inbound_list_reply_content.rb +11 -0
- data/lib/wavix/types/whats_app_inbound_location.rb +16 -0
- data/lib/wavix/types/whats_app_inbound_location_content.rb +10 -0
- data/lib/wavix/types/whats_app_inbound_media.rb +19 -0
- data/lib/wavix/types/whats_app_inbound_message_content.rb +20 -0
- data/lib/wavix/types/whats_app_inbound_message_content_type.rb +23 -0
- data/lib/wavix/types/whats_app_inbound_reaction.rb +12 -0
- data/lib/wavix/types/whats_app_inbound_reaction_content.rb +11 -0
- data/lib/wavix/types/whats_app_inbound_referral.rb +21 -0
- data/lib/wavix/types/whats_app_inbound_referral_source_type.rb +12 -0
- data/lib/wavix/types/whats_app_inbound_sticker_content.rb +10 -0
- data/lib/wavix/types/whats_app_inbound_text_content.rb +10 -0
- data/lib/wavix/types/whats_app_inbound_video_content.rb +10 -0
- data/lib/wavix/types/whats_app_message.rb +2 -0
- data/lib/wavix/types/whats_app_message_delivered_event.rb +16 -0
- data/lib/wavix/types/whats_app_message_error.rb +20 -0
- data/lib/wavix/types/whats_app_message_error_action.rb +14 -0
- data/lib/wavix/types/whats_app_message_error_code.rb +23 -0
- data/lib/wavix/types/whats_app_message_failed_event.rb +15 -0
- data/lib/wavix/types/whats_app_message_failed_event_data.rb +20 -0
- data/lib/wavix/types/whats_app_message_failed_event_data_status.rb +13 -0
- data/lib/wavix/types/whats_app_message_list_item.rb +6 -0
- data/lib/wavix/types/whats_app_message_list_item_status.rb +1 -0
- data/lib/wavix/types/whats_app_message_read_event.rb +16 -0
- data/lib/wavix/types/whats_app_message_received_event.rb +15 -0
- data/lib/wavix/types/whats_app_message_received_event_data.rb +25 -0
- data/lib/wavix/types/whats_app_message_send_request.rb +5 -2
- data/lib/wavix/types/whats_app_message_sent_event.rb +16 -0
- data/lib/wavix/types/whats_app_message_status.rb +1 -0
- data/lib/wavix/types/whats_app_message_status_event_data.rb +17 -0
- data/lib/wavix/types/whats_app_messages_group_event.rb +30 -0
- data/lib/wavix/types/whats_app_problem.rb +2 -0
- data/lib/wavix/types/whats_app_send_audio_content.rb +11 -0
- data/lib/wavix/types/whats_app_send_buttons.rb +18 -0
- data/lib/wavix/types/whats_app_send_buttons_content.rb +11 -0
- data/lib/wavix/types/whats_app_send_content.rb +36 -0
- data/lib/wavix/types/whats_app_send_document_content.rb +11 -0
- data/lib/wavix/types/whats_app_send_image_content.rb +11 -0
- data/lib/wavix/types/whats_app_send_list.rb +20 -0
- data/lib/wavix/types/whats_app_send_list_content.rb +11 -0
- data/lib/wavix/types/whats_app_send_list_row.rb +15 -0
- data/lib/wavix/types/whats_app_send_list_section.rb +13 -0
- data/lib/wavix/types/whats_app_send_media.rb +15 -0
- data/lib/wavix/types/whats_app_send_reply_button.rb +13 -0
- data/lib/wavix/types/whats_app_send_text_content.rb +11 -0
- data/lib/wavix/types/whats_app_send_video_content.rb +11 -0
- data/lib/wavix/types/whats_app_sender_banned_event.rb +15 -0
- data/lib/wavix/types/whats_app_sender_connected_event.rb +16 -0
- data/lib/wavix/types/whats_app_sender_disconnected_event.rb +16 -0
- data/lib/wavix/types/whats_app_sender_event_data.rb +17 -0
- data/lib/wavix/types/whats_app_sender_event_data_quality_rating.rb +14 -0
- data/lib/wavix/types/whats_app_sender_event_data_status.rb +21 -0
- data/lib/wavix/types/whats_app_sender_flagged_event.rb +16 -0
- data/lib/wavix/types/whats_app_sender_previous_attributes.rb +13 -0
- data/lib/wavix/types/whats_app_sender_previous_attributes_quality_rating.rb +14 -0
- data/lib/wavix/types/whats_app_sender_previous_attributes_status.rb +21 -0
- data/lib/wavix/types/whats_app_sender_quality_changed_event.rb +16 -0
- data/lib/wavix/types/whats_app_sender_restricted_event.rb +16 -0
- data/lib/wavix/types/whats_app_sender_updated_event.rb +16 -0
- data/lib/wavix/types/whats_app_senders_group_event.rb +30 -0
- data/lib/wavix/types/whats_app_template_approved_event.rb +16 -0
- data/lib/wavix/types/whats_app_template_category_changed_event.rb +16 -0
- data/lib/wavix/types/whats_app_template_disabled_event.rb +16 -0
- data/lib/wavix/types/whats_app_template_event_data.rb +23 -0
- data/lib/wavix/types/whats_app_template_event_data_category.rb +13 -0
- data/lib/wavix/types/whats_app_template_event_data_quality_rating.rb +14 -0
- data/lib/wavix/types/whats_app_template_event_data_status.rb +21 -0
- data/lib/wavix/types/whats_app_template_flagged_event.rb +16 -0
- data/lib/wavix/types/whats_app_template_paused_event.rb +15 -0
- data/lib/wavix/types/whats_app_template_previous_attributes.rb +16 -0
- data/lib/wavix/types/whats_app_template_previous_attributes_category.rb +13 -0
- data/lib/wavix/types/whats_app_template_previous_attributes_quality_rating.rb +14 -0
- data/lib/wavix/types/whats_app_template_previous_attributes_status.rb +21 -0
- data/lib/wavix/types/whats_app_template_quality_changed_event.rb +16 -0
- data/lib/wavix/types/whats_app_template_rejected_event.rb +15 -0
- data/lib/wavix/types/whats_app_template_updated_event.rb +16 -0
- data/lib/wavix/types/whats_app_templates_group_event.rb +32 -0
- data/lib/wavix/types/whats_app_webhook.rb +22 -0
- data/lib/wavix/types/whats_app_webhook_create_request.rb +12 -0
- data/lib/wavix/types/whats_app_webhook_group.rb +13 -0
- data/lib/wavix/types/whats_app_webhook_list_response.rb +10 -0
- data/lib/wavix/types/whats_app_webhook_response.rb +10 -0
- data/lib/wavix/types/whats_app_webhook_test_event.rb +14 -0
- data/lib/wavix/types/whats_app_webhook_test_event_data.rb +10 -0
- data/lib/wavix/types/whats_app_webhook_test_response.rb +10 -0
- data/lib/wavix/types/whats_app_webhook_test_result.rb +14 -0
- data/lib/wavix/types/whats_app_webhook_test_result_outcome.rb +16 -0
- data/lib/wavix/types/whats_app_webhook_update_request.rb +14 -0
- data/lib/wavix/version.rb +1 -1
- data/lib/wavix.rb +99 -0
- data/reference.md +1 -1
- metadata +101 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2291b7cc0a4ca908c56c344a7e53e57344ecd88693632579a596efc8c797ee83
|
|
4
|
+
data.tar.gz: bc644c9b30dae26bf44fe6cb30f18543784162ab4ccdbf9408d9e3b771ecc009
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a5c9cb47eea52ed99d31c77b4cee899c7d8b7b55866df01af285bef673e14cb649f124c1262db6a712a73653d40866ae71fff8e9d8036515db53b6144f624d2f
|
|
7
|
+
data.tar.gz: c2e389635b8e3d5d51abf5721bcb8a9c4c65f604af68ae636888de7f25a87d8f1bc7a6084c03b1fbdfe812ac07b65a2f541b9d482059f0822ed593f9eb97b277
|
data/.fern/metadata.json
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"cliVersion": "5.45.3",
|
|
3
3
|
"generatorName": "fernapi/fern-ruby-sdk",
|
|
4
4
|
"generatorVersion": "1.13.1",
|
|
5
|
-
"originGitCommit": "
|
|
5
|
+
"originGitCommit": "d053dce9ee7bd69d72f7279248deb332f643836f",
|
|
6
6
|
"originGitCommitIsDirty": false,
|
|
7
7
|
"invokedBy": "ci",
|
|
8
|
-
"requestedVersion": "
|
|
8
|
+
"requestedVersion": "2.0.0",
|
|
9
9
|
"ciProvider": "github",
|
|
10
|
-
"sdkVersion": "
|
|
10
|
+
"sdkVersion": "2.0.0"
|
|
11
11
|
}
|
data/.fern/replay.lock
CHANGED
|
@@ -24,5 +24,17 @@ generations:
|
|
|
24
24
|
cli_version: unknown
|
|
25
25
|
generator_versions:
|
|
26
26
|
fernapi/fern-ruby-sdk: 1.13.1
|
|
27
|
-
|
|
27
|
+
- commit_sha: 2c97e6418df34108cdaf06704c39c86391057904
|
|
28
|
+
tree_hash: 36d286d8e834d3787d5036139297b1eb64dc820e
|
|
29
|
+
timestamp: 2026-11-17T05:56:41.613Z
|
|
30
|
+
cli_version: unknown
|
|
31
|
+
generator_versions:
|
|
32
|
+
fernapi/fern-ruby-sdk: 1.13.1
|
|
33
|
+
- commit_sha: 96b5ddb0276ffaae2b3b915498acfccc31bfa54e
|
|
34
|
+
tree_hash: d8cbc95e1a9f1cb0fdd27d7b77e9b0651cbbce2b
|
|
35
|
+
timestamp: 2026-11-19T07:18:52.734Z
|
|
36
|
+
cli_version: unknown
|
|
37
|
+
generator_versions:
|
|
38
|
+
fernapi/fern-ruby-sdk: 1.13.1
|
|
39
|
+
current_generation: 96b5ddb0276ffaae2b3b915498acfccc31bfa54e
|
|
28
40
|
patches: []
|
data/lib/wavix/client.rb
CHANGED
|
@@ -11,7 +11,7 @@ module Wavix
|
|
|
11
11
|
@raw_client = Wavix::Internal::Http::RawClient.new(
|
|
12
12
|
base_url: base_url || Wavix::Environment::DEFAULT,
|
|
13
13
|
headers: {
|
|
14
|
-
"User-Agent" => "wavix-ruby-sdk/
|
|
14
|
+
"User-Agent" => "wavix-ruby-sdk/2.0.0",
|
|
15
15
|
"X-Fern-Language" => "Ruby",
|
|
16
16
|
Authorization: "Bearer #{token}"
|
|
17
17
|
},
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Data of a `whatsapp.contact.marketing_stopped` or `whatsapp.contact.marketing_resumed` event. It names the contact
|
|
6
|
+
# and the sender the choice applies to.
|
|
7
|
+
class WhatsAppContactMarketingPreferenceEventData < Internal::Types::Model
|
|
8
|
+
field :from, -> { String }, optional: false, nullable: false
|
|
9
|
+
|
|
10
|
+
field :to, -> { String }, optional: false, nullable: false
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Event of type `whatsapp.contact.marketing_resumed`. A contact asked to receive marketing messages from one of your
|
|
6
|
+
# senders again. Posted to your webhook and returned by [List WhatsApp
|
|
7
|
+
# events](https://docs.wavix.com/api-reference/whatsapp/list-whatsapp-events).
|
|
8
|
+
class WhatsAppContactMarketingResumedEvent < Internal::Types::Model
|
|
9
|
+
field :id, -> { String }, optional: false, nullable: false
|
|
10
|
+
|
|
11
|
+
field :timestamp, -> { String }, optional: false, nullable: false
|
|
12
|
+
|
|
13
|
+
field :data, -> { Wavix::Types::WhatsAppContactMarketingPreferenceEventData }, optional: false, nullable: false
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Event of type `whatsapp.contact.marketing_stopped`. A contact asked to stop marketing messages from one of your
|
|
6
|
+
# senders. Posted to your webhook and returned by [List WhatsApp
|
|
7
|
+
# events](https://docs.wavix.com/api-reference/whatsapp/list-whatsapp-events).
|
|
8
|
+
class WhatsAppContactMarketingStoppedEvent < Internal::Types::Model
|
|
9
|
+
field :id, -> { String }, optional: false, nullable: false
|
|
10
|
+
|
|
11
|
+
field :timestamp, -> { String }, optional: false, nullable: false
|
|
12
|
+
|
|
13
|
+
field :data, -> { Wavix::Types::WhatsAppContactMarketingPreferenceEventData }, optional: false, nullable: false
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# A WhatsApp event returned by [List WhatsApp
|
|
6
|
+
# events](https://docs.wavix.com/api-reference/whatsapp/list-whatsapp-events). It has the same fields as the event
|
|
7
|
+
# Wavix posts to your webhook, and `type` decides the shape of `data`.
|
|
8
|
+
class WhatsAppEvent < Internal::Types::Model
|
|
9
|
+
field :id, -> { String }, optional: false, nullable: false
|
|
10
|
+
|
|
11
|
+
field :type, -> { String }, optional: false, nullable: false
|
|
12
|
+
|
|
13
|
+
field :timestamp, -> { String }, optional: false, nullable: false
|
|
14
|
+
|
|
15
|
+
field :data, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# A paginated list of your account's WhatsApp events, returned by [List WhatsApp
|
|
6
|
+
# events](https://docs.wavix.com/api-reference/whatsapp/list-whatsapp-events).
|
|
7
|
+
class WhatsAppEventListResponse < Internal::Types::Model
|
|
8
|
+
field :events, -> { Internal::Types::Array[Wavix::Types::WhatsAppEvent] }, optional: false, nullable: false
|
|
9
|
+
|
|
10
|
+
field :next_cursor, -> { String }, optional: false, nullable: true
|
|
11
|
+
|
|
12
|
+
field :has_more, -> { Internal::Types::Boolean }, optional: false, nullable: false
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
module WhatsAppEventType
|
|
6
|
+
extend Wavix::Internal::Types::Enum
|
|
7
|
+
|
|
8
|
+
WHATSAPP_MESSAGE_RECEIVED = "whatsapp.message.received"
|
|
9
|
+
WHATSAPP_MESSAGE_SENT = "whatsapp.message.sent"
|
|
10
|
+
WHATSAPP_MESSAGE_DELIVERED = "whatsapp.message.delivered"
|
|
11
|
+
WHATSAPP_MESSAGE_READ = "whatsapp.message.read"
|
|
12
|
+
WHATSAPP_MESSAGE_FAILED = "whatsapp.message.failed"
|
|
13
|
+
WHATSAPP_CONTACT_MARKETING_STOPPED = "whatsapp.contact.marketing_stopped"
|
|
14
|
+
WHATSAPP_CONTACT_MARKETING_RESUMED = "whatsapp.contact.marketing_resumed"
|
|
15
|
+
WHATSAPP_TEMPLATE_APPROVED = "whatsapp.template.approved"
|
|
16
|
+
WHATSAPP_TEMPLATE_REJECTED = "whatsapp.template.rejected"
|
|
17
|
+
WHATSAPP_TEMPLATE_PAUSED = "whatsapp.template.paused"
|
|
18
|
+
WHATSAPP_TEMPLATE_DISABLED = "whatsapp.template.disabled"
|
|
19
|
+
WHATSAPP_TEMPLATE_FLAGGED = "whatsapp.template.flagged"
|
|
20
|
+
WHATSAPP_TEMPLATE_CATEGORY_CHANGED = "whatsapp.template.category_changed"
|
|
21
|
+
WHATSAPP_TEMPLATE_QUALITY_CHANGED = "whatsapp.template.quality_changed"
|
|
22
|
+
WHATSAPP_TEMPLATE_UPDATED = "whatsapp.template.updated"
|
|
23
|
+
WHATSAPP_SENDER_CONNECTED = "whatsapp.sender.connected"
|
|
24
|
+
WHATSAPP_SENDER_RESTRICTED = "whatsapp.sender.restricted"
|
|
25
|
+
WHATSAPP_SENDER_FLAGGED = "whatsapp.sender.flagged"
|
|
26
|
+
WHATSAPP_SENDER_BANNED = "whatsapp.sender.banned"
|
|
27
|
+
WHATSAPP_SENDER_DISCONNECTED = "whatsapp.sender.disconnected"
|
|
28
|
+
WHATSAPP_SENDER_QUALITY_CHANGED = "whatsapp.sender.quality_changed"
|
|
29
|
+
WHATSAPP_SENDER_UPDATED = "whatsapp.sender.updated"
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Content of a received message that is an audio file or voice note. Returned in `content` of a
|
|
6
|
+
# `whatsapp.message.received` event.
|
|
7
|
+
class WhatsAppInboundAudioContent < Internal::Types::Model
|
|
8
|
+
field :audio, -> { Wavix::Types::WhatsAppInboundMedia }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# A tap on a quick reply button. Returned in `content.button_reply` of a `whatsapp.message.received` event.
|
|
6
|
+
class WhatsAppInboundButtonReply < Internal::Types::Model
|
|
7
|
+
field :id, -> { String }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :title, -> { String }, optional: false, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Content of a received message that is a tap on a button of a message you sent. Returned in `content` of a
|
|
6
|
+
# `whatsapp.message.received` event.
|
|
7
|
+
class WhatsAppInboundButtonReplyContent < Internal::Types::Model
|
|
8
|
+
field :button_reply, -> { Wavix::Types::WhatsAppInboundButtonReply }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# A contact card in a received message. Returned in `content.contacts` of a `whatsapp.message.received` event.
|
|
6
|
+
class WhatsAppInboundContactCard < Internal::Types::Model
|
|
7
|
+
field :name, -> { String }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :phones, -> { Internal::Types::Array[String] }, optional: false, nullable: false
|
|
10
|
+
|
|
11
|
+
field :emails, -> { Internal::Types::Array[String] }, optional: false, nullable: false
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Content of a received message that is one or more contact cards. Returned in `content` of a
|
|
6
|
+
# `whatsapp.message.received` event.
|
|
7
|
+
class WhatsAppInboundContactsContent < Internal::Types::Model
|
|
8
|
+
field :contacts, -> { Internal::Types::Array[Wavix::Types::WhatsAppInboundContactCard] }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Content of a received message. Returned in `content` of a `whatsapp.message.received` event. The `type` field
|
|
6
|
+
# decides which other field holds the content. Wavix can add content types, so ignore a message whose `type` you
|
|
7
|
+
# don't recognize. Possible values:
|
|
8
|
+
#
|
|
9
|
+
# - `text` — Text.
|
|
10
|
+
# - `image` — An image, with an optional caption.
|
|
11
|
+
# - `video` — A video, with an optional caption.
|
|
12
|
+
# - `audio` — An audio file or a voice note.
|
|
13
|
+
# - `document` — A document, with its file name and an optional caption.
|
|
14
|
+
# - `sticker` — A sticker.
|
|
15
|
+
# - `location` — A location.
|
|
16
|
+
# - `contacts` — One or more contact cards.
|
|
17
|
+
# - `reaction` — An emoji reaction to an earlier message, or the removal of one.
|
|
18
|
+
# - `button_reply` — A tap on a quick reply button of a message you sent.
|
|
19
|
+
# - `list_reply` — An item picked from a list in a message you sent.
|
|
20
|
+
# - `flow_response` — The response to a WhatsApp Flow the contact completed.
|
|
21
|
+
class WhatsAppInboundContent < Internal::Types::Model
|
|
22
|
+
extend Wavix::Internal::Types::Union
|
|
23
|
+
|
|
24
|
+
discriminant :type
|
|
25
|
+
|
|
26
|
+
member -> { Wavix::Types::WhatsAppInboundTextContent }, key: "TEXT"
|
|
27
|
+
|
|
28
|
+
member -> { Wavix::Types::WhatsAppInboundImageContent }, key: "IMAGE"
|
|
29
|
+
|
|
30
|
+
member -> { Wavix::Types::WhatsAppInboundVideoContent }, key: "VIDEO"
|
|
31
|
+
|
|
32
|
+
member -> { Wavix::Types::WhatsAppInboundAudioContent }, key: "AUDIO"
|
|
33
|
+
|
|
34
|
+
member -> { Wavix::Types::WhatsAppInboundDocumentContent }, key: "DOCUMENT"
|
|
35
|
+
|
|
36
|
+
member -> { Wavix::Types::WhatsAppInboundStickerContent }, key: "STICKER"
|
|
37
|
+
|
|
38
|
+
member -> { Wavix::Types::WhatsAppInboundLocationContent }, key: "LOCATION"
|
|
39
|
+
|
|
40
|
+
member -> { Wavix::Types::WhatsAppInboundContactsContent }, key: "CONTACTS"
|
|
41
|
+
|
|
42
|
+
member -> { Wavix::Types::WhatsAppInboundReactionContent }, key: "REACTION"
|
|
43
|
+
|
|
44
|
+
member -> { Wavix::Types::WhatsAppInboundButtonReplyContent }, key: "BUTTON_REPLY"
|
|
45
|
+
|
|
46
|
+
member -> { Wavix::Types::WhatsAppInboundListReplyContent }, key: "LIST_REPLY"
|
|
47
|
+
|
|
48
|
+
member -> { Wavix::Types::WhatsAppInboundFlowResponseContent }, key: "FLOW_RESPONSE"
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# The message a received message replies to. Returned in `context` of a `whatsapp.message.received` event.
|
|
6
|
+
class WhatsAppInboundContext < Internal::Types::Model
|
|
7
|
+
field :message_uuid, -> { String }, optional: false, nullable: true
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Content of a received message that is a document. Returned in `content` of a `whatsapp.message.received` event.
|
|
6
|
+
class WhatsAppInboundDocumentContent < Internal::Types::Model
|
|
7
|
+
field :document, -> { Wavix::Types::WhatsAppInboundMedia }, optional: false, nullable: false
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Content of a received message that is the response to a WhatsApp Flow the contact completed. Returned in `content`
|
|
6
|
+
# of a `whatsapp.message.received` event.
|
|
7
|
+
class WhatsAppInboundFlowResponseContent < Internal::Types::Model
|
|
8
|
+
field :flow_response, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Content of a received message that is an image. Returned in `content` of a `whatsapp.message.received` event.
|
|
6
|
+
class WhatsAppInboundImageContent < Internal::Types::Model
|
|
7
|
+
field :image, -> { Wavix::Types::WhatsAppInboundMedia }, optional: false, nullable: false
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# An item picked from a list. Returned in `content.list_reply` of a `whatsapp.message.received` event.
|
|
6
|
+
class WhatsAppInboundListReply < Internal::Types::Model
|
|
7
|
+
field :id, -> { String }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :title, -> { String }, optional: false, nullable: false
|
|
10
|
+
|
|
11
|
+
field :description, -> { String }, optional: false, nullable: true
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Content of a received message that is an item picked from a list in a message you sent. Returned in `content` of a
|
|
6
|
+
# `whatsapp.message.received` event.
|
|
7
|
+
class WhatsAppInboundListReplyContent < Internal::Types::Model
|
|
8
|
+
field :list_reply, -> { Wavix::Types::WhatsAppInboundListReply }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# A location in a received message. Returned in `content.location` of a `whatsapp.message.received` event.
|
|
6
|
+
class WhatsAppInboundLocation < Internal::Types::Model
|
|
7
|
+
field :latitude, -> { Integer }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :longitude, -> { Integer }, optional: false, nullable: false
|
|
10
|
+
|
|
11
|
+
field :name, -> { String }, optional: false, nullable: true
|
|
12
|
+
|
|
13
|
+
field :address, -> { String }, optional: false, nullable: true
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Content of a received message that is a location. Returned in `content` of a `whatsapp.message.received` event.
|
|
6
|
+
class WhatsAppInboundLocationContent < Internal::Types::Model
|
|
7
|
+
field :location, -> { Wavix::Types::WhatsAppInboundLocation }, optional: false, nullable: false
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# A media file in a received message. Returned in the `image`, `video`, `audio`, `document`, or `sticker` field of
|
|
6
|
+
# the content of a `whatsapp.message.received` event.
|
|
7
|
+
class WhatsAppInboundMedia < Internal::Types::Model
|
|
8
|
+
field :id, -> { String }, optional: false, nullable: false
|
|
9
|
+
|
|
10
|
+
field :url, -> { String }, optional: false, nullable: false
|
|
11
|
+
|
|
12
|
+
field :mime_type, -> { String }, optional: false, nullable: false
|
|
13
|
+
|
|
14
|
+
field :caption, -> { String }, optional: false, nullable: true
|
|
15
|
+
|
|
16
|
+
field :filename, -> { String }, optional: false, nullable: true
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Content of a WhatsApp message that one of your WhatsApp senders received. Returned in `content` by [List WhatsApp
|
|
6
|
+
# messages](https://docs.wavix.com/api-reference/whatsapp/list-whatsapp-messages) and [Retrieve a WhatsApp
|
|
7
|
+
# message](https://docs.wavix.com/api-reference/whatsapp/retrieve-a-whatsapp-message).
|
|
8
|
+
class WhatsAppInboundMessageContent < Internal::Types::Model
|
|
9
|
+
field :type, -> { Wavix::Types::WhatsAppInboundMessageContentType }, optional: false, nullable: false
|
|
10
|
+
|
|
11
|
+
field :text, -> { String }, optional: true, nullable: false
|
|
12
|
+
|
|
13
|
+
field :media_id, -> { String }, optional: true, nullable: false
|
|
14
|
+
|
|
15
|
+
field :media_url, -> { String }, optional: true, nullable: false
|
|
16
|
+
|
|
17
|
+
field :mime_type, -> { String }, optional: true, nullable: false
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
module WhatsAppInboundMessageContentType
|
|
6
|
+
extend Wavix::Internal::Types::Enum
|
|
7
|
+
|
|
8
|
+
TEXT = "text"
|
|
9
|
+
IMAGE = "image"
|
|
10
|
+
VIDEO = "video"
|
|
11
|
+
DOCUMENT = "document"
|
|
12
|
+
AUDIO = "audio"
|
|
13
|
+
STICKER = "sticker"
|
|
14
|
+
LOCATION = "location"
|
|
15
|
+
CONTACTS = "contacts"
|
|
16
|
+
REACTION = "reaction"
|
|
17
|
+
BUTTON_REPLY = "button_reply"
|
|
18
|
+
LIST_REPLY = "list_reply"
|
|
19
|
+
FLOW_RESPONSE = "flow_response"
|
|
20
|
+
UNSUPPORTED = "unsupported"
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# A reaction in a received message. Returned in `content.reaction` of a `whatsapp.message.received` event.
|
|
6
|
+
class WhatsAppInboundReaction < Internal::Types::Model
|
|
7
|
+
field :message_uuid, -> { String }, optional: false, nullable: true
|
|
8
|
+
|
|
9
|
+
field :emoji, -> { String }, optional: false, nullable: true
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Content of a received message that is a reaction to an earlier message. Returned in `content` of a
|
|
6
|
+
# `whatsapp.message.received` event.
|
|
7
|
+
class WhatsAppInboundReactionContent < Internal::Types::Model
|
|
8
|
+
field :reaction, -> { Wavix::Types::WhatsAppInboundReaction }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# The ad or post that brought the contact to the conversation. Returned in `referral` of a
|
|
6
|
+
# `whatsapp.message.received` event when the contact tapped a click-to-WhatsApp ad.
|
|
7
|
+
class WhatsAppInboundReferral < Internal::Types::Model
|
|
8
|
+
field :source_type, -> { Wavix::Types::WhatsAppInboundReferralSourceType }, optional: false, nullable: false
|
|
9
|
+
|
|
10
|
+
field :source_id, -> { String }, optional: false, nullable: false
|
|
11
|
+
|
|
12
|
+
field :source_url, -> { String }, optional: false, nullable: false
|
|
13
|
+
|
|
14
|
+
field :headline, -> { String }, optional: false, nullable: true
|
|
15
|
+
|
|
16
|
+
field :body, -> { String }, optional: false, nullable: true
|
|
17
|
+
|
|
18
|
+
field :click_id, -> { String }, optional: false, nullable: true
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Content of a received message that is a sticker. Returned in `content` of a `whatsapp.message.received` event.
|
|
6
|
+
class WhatsAppInboundStickerContent < Internal::Types::Model
|
|
7
|
+
field :sticker, -> { Wavix::Types::WhatsAppInboundMedia }, optional: false, nullable: false
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Content of a received message that is text. Returned in `content` of a `whatsapp.message.received` event.
|
|
6
|
+
class WhatsAppInboundTextContent < Internal::Types::Model
|
|
7
|
+
field :text, -> { String }, optional: false, nullable: false
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Content of a received message that is a video. Returned in `content` of a `whatsapp.message.received` event.
|
|
6
|
+
class WhatsAppInboundVideoContent < Internal::Types::Model
|
|
7
|
+
field :video, -> { Wavix::Types::WhatsAppInboundMedia }, optional: false, nullable: false
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -14,6 +14,8 @@ module Wavix
|
|
|
14
14
|
|
|
15
15
|
field :template, -> { Wavix::Types::WhatsAppMessageTemplate }, optional: false, nullable: true
|
|
16
16
|
|
|
17
|
+
field :service_window_open_until, -> { String }, optional: true, nullable: false
|
|
18
|
+
|
|
17
19
|
field :created_at, -> { String }, optional: false, nullable: false
|
|
18
20
|
end
|
|
19
21
|
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Event of type `whatsapp.message.delivered`. A message you sent was delivered to the recipient. Posted to your
|
|
6
|
+
# webhook and returned by [List WhatsApp
|
|
7
|
+
# events](https://docs.wavix.com/api-reference/whatsapp/list-whatsapp-events).
|
|
8
|
+
class WhatsAppMessageDeliveredEvent < Internal::Types::Model
|
|
9
|
+
field :id, -> { String }, optional: false, nullable: false
|
|
10
|
+
|
|
11
|
+
field :timestamp, -> { String }, optional: false, nullable: false
|
|
12
|
+
|
|
13
|
+
field :data, -> { Wavix::Types::WhatsAppMessageStatusEventData }, optional: false, nullable: false
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
# Why a message you sent wasn't delivered. Returned in `whatsapp.message.failed` events and when you retrieve or
|
|
6
|
+
# list WhatsApp messages. Wavix retries temporary failures itself, so you get an error only after Wavix stops
|
|
7
|
+
# retrying.
|
|
8
|
+
class WhatsAppMessageError < Internal::Types::Model
|
|
9
|
+
field :code, -> { Wavix::Types::WhatsAppMessageErrorCode }, optional: false, nullable: false
|
|
10
|
+
|
|
11
|
+
field :subcode, -> { String }, optional: true, nullable: false
|
|
12
|
+
|
|
13
|
+
field :message, -> { String }, optional: false, nullable: false
|
|
14
|
+
|
|
15
|
+
field :action, -> { Wavix::Types::WhatsAppMessageErrorAction }, optional: false, nullable: false
|
|
16
|
+
|
|
17
|
+
field :docs_url, -> { String }, optional: false, nullable: false
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Wavix
|
|
4
|
+
module Types
|
|
5
|
+
module WhatsAppMessageErrorAction
|
|
6
|
+
extend Wavix::Internal::Types::Enum
|
|
7
|
+
|
|
8
|
+
RESEND_LATER = "resend_later"
|
|
9
|
+
FIX_AND_RESEND = "fix_and_resend"
|
|
10
|
+
DO_NOT_RESEND = "do_not_resend"
|
|
11
|
+
CONTACT_SUPPORT = "contact_support"
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|