telnyx 5.167.0 → 5.168.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/CHANGELOG.md +7 -0
- data/README.md +1 -1
- data/lib/telnyx/client.rb +4 -0
- data/lib/telnyx/models/ai/assistant_a2_a_agent.rb +195 -0
- data/lib/telnyx/models/ai/assistant_create_params.rb +16 -1
- data/lib/telnyx/models/ai/assistant_update_params.rb +17 -1
- data/lib/telnyx/models/ai/assistants/update_assistant.rb +17 -1
- data/lib/telnyx/models/ai/chat_completion_request.rb +125 -48
- data/lib/telnyx/models/ai/inference_embedding.rb +16 -1
- data/lib/telnyx/models/ai/telephony_settings.rb +15 -1
- data/lib/telnyx/models/compute/func_retrieve_logs_params.rb +66 -0
- data/lib/telnyx/models/compute/func_retrieve_logs_response.rb +161 -0
- data/lib/telnyx/models/compute/func_retrieve_metric_aggregates_params.rb +69 -0
- data/lib/telnyx/models/compute/func_retrieve_metric_aggregates_response.rb +137 -0
- data/lib/telnyx/models/compute/func_retrieve_revisions_params.rb +34 -0
- data/lib/telnyx/models/compute/func_retrieve_revisions_response.rb +101 -0
- data/lib/telnyx/models/compute/func_retrieve_ship_inspection_params.rb +22 -0
- data/lib/telnyx/models/compute/func_retrieve_ship_inspection_response.rb +94 -0
- data/lib/telnyx/models/compute/functions_observability_pagination_meta.rb +35 -0
- data/lib/telnyx/models/compute/logs_meta.rb +23 -0
- data/lib/telnyx/models/credential_connection.rb +4 -1
- data/lib/telnyx/models/email_inboxes/email_message.rb +12 -1
- data/lib/telnyx/models/email_message_batch_params.rb +4 -1
- data/lib/telnyx/models/email_message_batch_response.rb +1 -0
- data/lib/telnyx/models/fqdn_connection.rb +5 -2
- data/lib/telnyx/models/fqdn_connections/fqdn_authentication.rb +9 -2
- data/lib/telnyx/models/messaging_inbound_message_payload.rb +210 -67
- data/lib/telnyx/models/messaging_messaging_profile.rb +11 -1
- data/lib/telnyx/models/messaging_profile_create_params.rb +11 -1
- data/lib/telnyx/models/messaging_profile_features.rb +26 -0
- data/lib/telnyx/models/messaging_profile_update_params.rb +11 -1
- data/lib/telnyx/models/uac_connection.rb +4 -1
- data/lib/telnyx/models/uac_external_settings.rb +6 -2
- data/lib/telnyx/models/unsafe_unwrap_webhook_event.rb +5 -1
- data/lib/telnyx/models/unwrap_webhook_event.rb +5 -1
- data/lib/telnyx/models/whatsapp/business_accounts/phone_number_list_response.rb +104 -1
- data/lib/telnyx/models/whatsapp/phone_number_get_response.rb +103 -1
- data/lib/telnyx/models/whatsapp/phone_number_list_response.rb +103 -1
- data/lib/telnyx/models/whatsapp/phone_number_retrieve_phone_number_params.rb +22 -0
- data/lib/telnyx/models/whatsapp/phone_number_retrieve_phone_number_response.rb +207 -0
- data/lib/telnyx/models/whatsapp_account_update.rb +112 -0
- data/lib/telnyx/models/whatsapp_message_echo.rb +340 -0
- data/lib/telnyx/models/x402/credit_account/payment_list_params.rb +34 -0
- data/lib/telnyx/models/x402/credit_account/payment_retrieve_params.rb +24 -0
- data/lib/telnyx/models/x402/credit_account/payment_retrieve_response.rb +21 -0
- data/lib/telnyx/models/x402/credit_account/x402_transaction_record.rb +113 -0
- data/lib/telnyx/models.rb +8 -0
- data/lib/telnyx/resources/ai/assistants/versions.rb +3 -1
- data/lib/telnyx/resources/ai/assistants.rb +6 -2
- data/lib/telnyx/resources/ai/openai/chat.rb +2 -8
- data/lib/telnyx/resources/compute/funcs.rb +141 -0
- data/lib/telnyx/resources/compute.rb +18 -0
- data/lib/telnyx/resources/email_messages.rb +4 -2
- data/lib/telnyx/resources/messaging_profiles.rb +6 -2
- data/lib/telnyx/resources/webhooks.rb +2 -2
- data/lib/telnyx/resources/whatsapp/phone_numbers.rb +22 -0
- data/lib/telnyx/resources/x402/credit_account/payments.rb +71 -0
- data/lib/telnyx/resources/x402/credit_account.rb +8 -2
- data/lib/telnyx/version.rb +1 -1
- data/lib/telnyx.rb +23 -0
- data/rbi/telnyx/client.rbi +3 -0
- data/rbi/telnyx/models/ai/assistant_a2_a_agent.rbi +345 -0
- data/rbi/telnyx/models/ai/assistant_create_params.rbi +29 -0
- data/rbi/telnyx/models/ai/assistant_update_params.rbi +31 -0
- data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +31 -0
- data/rbi/telnyx/models/ai/chat_completion_request.rbi +224 -92
- data/rbi/telnyx/models/ai/inference_embedding.rbi +29 -0
- data/rbi/telnyx/models/ai/telephony_settings.rbi +23 -0
- data/rbi/telnyx/models/compute/func_retrieve_logs_params.rbi +130 -0
- data/rbi/telnyx/models/compute/func_retrieve_logs_response.rbi +410 -0
- data/rbi/telnyx/models/compute/func_retrieve_metric_aggregates_params.rbi +102 -0
- data/rbi/telnyx/models/compute/func_retrieve_metric_aggregates_response.rbi +231 -0
- data/rbi/telnyx/models/compute/func_retrieve_revisions_params.rbi +59 -0
- data/rbi/telnyx/models/compute/func_retrieve_revisions_response.rbi +213 -0
- data/rbi/telnyx/models/compute/func_retrieve_ship_inspection_params.rbi +40 -0
- data/rbi/telnyx/models/compute/func_retrieve_ship_inspection_response.rbi +252 -0
- data/rbi/telnyx/models/compute/functions_observability_pagination_meta.rbi +70 -0
- data/rbi/telnyx/models/compute/logs_meta.rbi +38 -0
- data/rbi/telnyx/models/credential_connection.rbi +8 -2
- data/rbi/telnyx/models/email_inboxes/email_message.rbi +22 -3
- data/rbi/telnyx/models/email_message_batch_params.rbi +6 -0
- data/rbi/telnyx/models/email_message_batch_response.rbi +5 -0
- data/rbi/telnyx/models/fqdn_connection.rbi +8 -2
- data/rbi/telnyx/models/fqdn_connections/fqdn_authentication.rbi +8 -2
- data/rbi/telnyx/models/messaging_inbound_message_payload.rbi +450 -193
- data/rbi/telnyx/models/messaging_messaging_profile.rbi +19 -0
- data/rbi/telnyx/models/messaging_profile_create_params.rbi +19 -0
- data/rbi/telnyx/models/messaging_profile_features.rbi +43 -0
- data/rbi/telnyx/models/messaging_profile_update_params.rbi +19 -0
- data/rbi/telnyx/models/uac_connection.rbi +8 -2
- data/rbi/telnyx/models/uac_external_settings.rbi +10 -2
- data/rbi/telnyx/models/unsafe_unwrap_webhook_event.rbi +3 -1
- data/rbi/telnyx/models/unwrap_webhook_event.rbi +3 -1
- data/rbi/telnyx/models/whatsapp/business_accounts/phone_number_list_response.rbi +213 -0
- data/rbi/telnyx/models/whatsapp/phone_number_get_response.rbi +213 -0
- data/rbi/telnyx/models/whatsapp/phone_number_list_response.rbi +213 -0
- data/rbi/telnyx/models/whatsapp/phone_number_retrieve_phone_number_params.rbi +40 -0
- data/rbi/telnyx/models/whatsapp/phone_number_retrieve_phone_number_response.rbi +401 -0
- data/rbi/telnyx/models/whatsapp_account_update.rbi +236 -0
- data/rbi/telnyx/models/whatsapp_message_echo.rbi +611 -0
- data/rbi/telnyx/models/x402/credit_account/payment_list_params.rbi +64 -0
- data/rbi/telnyx/models/x402/credit_account/payment_retrieve_params.rbi +42 -0
- data/rbi/telnyx/models/x402/credit_account/payment_retrieve_response.rbi +53 -0
- data/rbi/telnyx/models/x402/credit_account/x402_transaction_record.rbi +219 -0
- data/rbi/telnyx/models.rbi +8 -0
- data/rbi/telnyx/resources/ai/assistants/versions.rbi +12 -0
- data/rbi/telnyx/resources/ai/assistants.rbi +21 -0
- data/rbi/telnyx/resources/ai/openai/chat.rbi +9 -13
- data/rbi/telnyx/resources/compute/funcs.rbi +111 -0
- data/rbi/telnyx/resources/compute.rbi +15 -0
- data/rbi/telnyx/resources/email_messages.rbi +6 -2
- data/rbi/telnyx/resources/messaging_profiles.rbi +10 -0
- data/rbi/telnyx/resources/webhooks.rbi +6 -2
- data/rbi/telnyx/resources/whatsapp/phone_numbers.rbi +18 -0
- data/rbi/telnyx/resources/x402/credit_account/payments.rbi +60 -0
- data/rbi/telnyx/resources/x402/credit_account.rbi +5 -0
- data/sig/telnyx/client.rbs +2 -0
- data/sig/telnyx/models/ai/assistant_a2_a_agent.rbs +140 -0
- data/sig/telnyx/models/ai/assistant_create_params.rbs +9 -0
- data/sig/telnyx/models/ai/assistant_update_params.rbs +9 -0
- data/sig/telnyx/models/ai/assistants/update_assistant.rbs +9 -0
- data/sig/telnyx/models/ai/chat_completion_request.rbs +86 -44
- data/sig/telnyx/models/ai/inference_embedding.rbs +9 -0
- data/sig/telnyx/models/ai/telephony_settings.rbs +7 -0
- data/sig/telnyx/models/compute/func_retrieve_logs_params.rbs +69 -0
- data/sig/telnyx/models/compute/func_retrieve_logs_response.rbs +210 -0
- data/sig/telnyx/models/compute/func_retrieve_metric_aggregates_params.rbs +66 -0
- data/sig/telnyx/models/compute/func_retrieve_metric_aggregates_response.rbs +149 -0
- data/sig/telnyx/models/compute/func_retrieve_revisions_params.rbs +38 -0
- data/sig/telnyx/models/compute/func_retrieve_revisions_response.rbs +131 -0
- data/sig/telnyx/models/compute/func_retrieve_ship_inspection_params.rbs +22 -0
- data/sig/telnyx/models/compute/func_retrieve_ship_inspection_response.rbs +117 -0
- data/sig/telnyx/models/compute/functions_observability_pagination_meta.rbs +45 -0
- data/sig/telnyx/models/compute/logs_meta.rbs +21 -0
- data/sig/telnyx/models/email_inboxes/email_message.rbs +12 -3
- data/sig/telnyx/models/email_message_batch_response.rbs +2 -0
- data/sig/telnyx/models/messaging_inbound_message_payload.rbs +207 -95
- data/sig/telnyx/models/messaging_messaging_profile.rbs +5 -0
- data/sig/telnyx/models/messaging_profile_create_params.rbs +5 -0
- data/sig/telnyx/models/messaging_profile_features.rbs +15 -0
- data/sig/telnyx/models/messaging_profile_update_params.rbs +5 -0
- data/sig/telnyx/models/unsafe_unwrap_webhook_event.rbs +2 -0
- data/sig/telnyx/models/unwrap_webhook_event.rbs +2 -0
- data/sig/telnyx/models/whatsapp/business_accounts/phone_number_list_response.rbs +90 -0
- data/sig/telnyx/models/whatsapp/phone_number_get_response.rbs +90 -0
- data/sig/telnyx/models/whatsapp/phone_number_list_response.rbs +90 -0
- data/sig/telnyx/models/whatsapp/phone_number_retrieve_phone_number_params.rbs +25 -0
- data/sig/telnyx/models/whatsapp/phone_number_retrieve_phone_number_response.rbs +201 -0
- data/sig/telnyx/models/whatsapp_account_update.rbs +107 -0
- data/sig/telnyx/models/whatsapp_message_echo.rbs +291 -0
- data/sig/telnyx/models/x402/credit_account/payment_list_params.rbs +36 -0
- data/sig/telnyx/models/x402/credit_account/payment_retrieve_params.rbs +27 -0
- data/sig/telnyx/models/x402/credit_account/payment_retrieve_response.rbs +26 -0
- data/sig/telnyx/models/x402/credit_account/x402_transaction_record.rbs +104 -0
- data/sig/telnyx/models.rbs +8 -0
- data/sig/telnyx/resources/ai/assistants/versions.rbs +1 -0
- data/sig/telnyx/resources/ai/assistants.rbs +2 -0
- data/sig/telnyx/resources/ai/openai/chat.rbs +1 -4
- data/sig/telnyx/resources/compute/funcs.rbs +41 -0
- data/sig/telnyx/resources/compute.rbs +9 -0
- data/sig/telnyx/resources/messaging_profiles.rbs +2 -0
- data/sig/telnyx/resources/webhooks.rbs +6 -2
- data/sig/telnyx/resources/whatsapp/phone_numbers.rbs +5 -0
- data/sig/telnyx/resources/x402/credit_account/payments.rbs +22 -0
- data/sig/telnyx/resources/x402/credit_account.rbs +2 -0
- metadata +71 -2
|
@@ -0,0 +1,611 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Models
|
|
5
|
+
class WhatsappMessageEcho < Telnyx::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Telnyx::WhatsappMessageEcho, Telnyx::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
sig { returns(Telnyx::WhatsappMessageEcho::Data) }
|
|
12
|
+
attr_reader :data
|
|
13
|
+
|
|
14
|
+
sig { params(data: Telnyx::WhatsappMessageEcho::Data::OrHash).void }
|
|
15
|
+
attr_writer :data
|
|
16
|
+
|
|
17
|
+
sig do
|
|
18
|
+
params(data: Telnyx::WhatsappMessageEcho::Data::OrHash).returns(
|
|
19
|
+
T.attached_class
|
|
20
|
+
)
|
|
21
|
+
end
|
|
22
|
+
def self.new(data:)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
sig { override.returns({ data: Telnyx::WhatsappMessageEcho::Data }) }
|
|
26
|
+
def to_hash
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
class Data < Telnyx::Internal::Type::BaseModel
|
|
30
|
+
OrHash =
|
|
31
|
+
T.type_alias do
|
|
32
|
+
T.any(Telnyx::WhatsappMessageEcho::Data, Telnyx::Internal::AnyHash)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
sig { returns(String) }
|
|
36
|
+
attr_accessor :id
|
|
37
|
+
|
|
38
|
+
sig do
|
|
39
|
+
returns(Telnyx::WhatsappMessageEcho::Data::EventType::TaggedSymbol)
|
|
40
|
+
end
|
|
41
|
+
attr_accessor :event_type
|
|
42
|
+
|
|
43
|
+
sig { returns(Time) }
|
|
44
|
+
attr_accessor :occurred_at
|
|
45
|
+
|
|
46
|
+
sig { returns(Telnyx::WhatsappMessageEcho::Data::Payload) }
|
|
47
|
+
attr_reader :payload
|
|
48
|
+
|
|
49
|
+
sig do
|
|
50
|
+
params(
|
|
51
|
+
payload: Telnyx::WhatsappMessageEcho::Data::Payload::OrHash
|
|
52
|
+
).void
|
|
53
|
+
end
|
|
54
|
+
attr_writer :payload
|
|
55
|
+
|
|
56
|
+
sig do
|
|
57
|
+
returns(Telnyx::WhatsappMessageEcho::Data::RecordType::TaggedSymbol)
|
|
58
|
+
end
|
|
59
|
+
attr_accessor :record_type
|
|
60
|
+
|
|
61
|
+
sig do
|
|
62
|
+
params(
|
|
63
|
+
id: String,
|
|
64
|
+
event_type: Telnyx::WhatsappMessageEcho::Data::EventType::OrSymbol,
|
|
65
|
+
occurred_at: Time,
|
|
66
|
+
payload: Telnyx::WhatsappMessageEcho::Data::Payload::OrHash,
|
|
67
|
+
record_type: Telnyx::WhatsappMessageEcho::Data::RecordType::OrSymbol
|
|
68
|
+
).returns(T.attached_class)
|
|
69
|
+
end
|
|
70
|
+
def self.new(id:, event_type:, occurred_at:, payload:, record_type:)
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
sig do
|
|
74
|
+
override.returns(
|
|
75
|
+
{
|
|
76
|
+
id: String,
|
|
77
|
+
event_type:
|
|
78
|
+
Telnyx::WhatsappMessageEcho::Data::EventType::TaggedSymbol,
|
|
79
|
+
occurred_at: Time,
|
|
80
|
+
payload: Telnyx::WhatsappMessageEcho::Data::Payload,
|
|
81
|
+
record_type:
|
|
82
|
+
Telnyx::WhatsappMessageEcho::Data::RecordType::TaggedSymbol
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
end
|
|
86
|
+
def to_hash
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
module EventType
|
|
90
|
+
extend Telnyx::Internal::Type::Enum
|
|
91
|
+
|
|
92
|
+
TaggedSymbol =
|
|
93
|
+
T.type_alias do
|
|
94
|
+
T.all(Symbol, Telnyx::WhatsappMessageEcho::Data::EventType)
|
|
95
|
+
end
|
|
96
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
97
|
+
|
|
98
|
+
MESSAGE_ECHO =
|
|
99
|
+
T.let(
|
|
100
|
+
:"message.echo",
|
|
101
|
+
Telnyx::WhatsappMessageEcho::Data::EventType::TaggedSymbol
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
sig do
|
|
105
|
+
override.returns(
|
|
106
|
+
T::Array[
|
|
107
|
+
Telnyx::WhatsappMessageEcho::Data::EventType::TaggedSymbol
|
|
108
|
+
]
|
|
109
|
+
)
|
|
110
|
+
end
|
|
111
|
+
def self.values
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
class Payload < Telnyx::Internal::Type::BaseModel
|
|
116
|
+
OrHash =
|
|
117
|
+
T.type_alias do
|
|
118
|
+
T.any(
|
|
119
|
+
Telnyx::WhatsappMessageEcho::Data::Payload,
|
|
120
|
+
Telnyx::Internal::AnyHash
|
|
121
|
+
)
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Telnyx identifier for the mirrored message.
|
|
125
|
+
sig { returns(String) }
|
|
126
|
+
attr_accessor :id
|
|
127
|
+
|
|
128
|
+
# Mirrored WhatsApp message content. The content property matches the value of
|
|
129
|
+
# `type`.
|
|
130
|
+
sig { returns(Telnyx::WhatsappMessageEcho::Data::Payload::Body) }
|
|
131
|
+
attr_reader :body
|
|
132
|
+
|
|
133
|
+
sig do
|
|
134
|
+
params(
|
|
135
|
+
body: Telnyx::WhatsappMessageEcho::Data::Payload::Body::OrHash
|
|
136
|
+
).void
|
|
137
|
+
end
|
|
138
|
+
attr_writer :body
|
|
139
|
+
|
|
140
|
+
# No charge is created for a Business app message echo.
|
|
141
|
+
sig { returns(Telnyx::WhatsappMessageEcho::Data::Payload::Cost) }
|
|
142
|
+
attr_reader :cost
|
|
143
|
+
|
|
144
|
+
sig do
|
|
145
|
+
params(
|
|
146
|
+
cost: Telnyx::WhatsappMessageEcho::Data::Payload::Cost::OrHash
|
|
147
|
+
).void
|
|
148
|
+
end
|
|
149
|
+
attr_writer :cost
|
|
150
|
+
|
|
151
|
+
# Indicates that the business sent the message to the WhatsApp user.
|
|
152
|
+
sig do
|
|
153
|
+
returns(
|
|
154
|
+
Telnyx::WhatsappMessageEcho::Data::Payload::Direction::TaggedSymbol
|
|
155
|
+
)
|
|
156
|
+
end
|
|
157
|
+
attr_accessor :direction
|
|
158
|
+
|
|
159
|
+
sig { returns(T::Array[Telnyx::MessagingError0b38e7044b]) }
|
|
160
|
+
attr_accessor :errors
|
|
161
|
+
|
|
162
|
+
sig { returns(Telnyx::WhatsappMessageEcho::Data::Payload::From) }
|
|
163
|
+
attr_reader :from
|
|
164
|
+
|
|
165
|
+
sig do
|
|
166
|
+
params(
|
|
167
|
+
from: Telnyx::WhatsappMessageEcho::Data::Payload::From::OrHash
|
|
168
|
+
).void
|
|
169
|
+
end
|
|
170
|
+
attr_writer :from
|
|
171
|
+
|
|
172
|
+
sig { returns(String) }
|
|
173
|
+
attr_accessor :messaging_profile_id
|
|
174
|
+
|
|
175
|
+
sig { returns(String) }
|
|
176
|
+
attr_accessor :organization_id
|
|
177
|
+
|
|
178
|
+
# Identifies the WhatsApp Business app as the source of the message.
|
|
179
|
+
sig do
|
|
180
|
+
returns(
|
|
181
|
+
Telnyx::WhatsappMessageEcho::Data::Payload::Origin::TaggedSymbol
|
|
182
|
+
)
|
|
183
|
+
end
|
|
184
|
+
attr_accessor :origin
|
|
185
|
+
|
|
186
|
+
sig do
|
|
187
|
+
returns(
|
|
188
|
+
Telnyx::WhatsappMessageEcho::Data::Payload::RecordType::TaggedSymbol
|
|
189
|
+
)
|
|
190
|
+
end
|
|
191
|
+
attr_accessor :record_type
|
|
192
|
+
|
|
193
|
+
# WhatsApp user who received the Business app message.
|
|
194
|
+
sig { returns(String) }
|
|
195
|
+
attr_accessor :to
|
|
196
|
+
|
|
197
|
+
sig do
|
|
198
|
+
returns(
|
|
199
|
+
Telnyx::WhatsappMessageEcho::Data::Payload::Type::TaggedSymbol
|
|
200
|
+
)
|
|
201
|
+
end
|
|
202
|
+
attr_accessor :type
|
|
203
|
+
|
|
204
|
+
sig { returns(T.nilable(Time)) }
|
|
205
|
+
attr_reader :received_at
|
|
206
|
+
|
|
207
|
+
sig { params(received_at: Time).void }
|
|
208
|
+
attr_writer :received_at
|
|
209
|
+
|
|
210
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
211
|
+
attr_reader :tags
|
|
212
|
+
|
|
213
|
+
sig { params(tags: T::Array[String]).void }
|
|
214
|
+
attr_writer :tags
|
|
215
|
+
|
|
216
|
+
sig { returns(T.nilable(String)) }
|
|
217
|
+
attr_accessor :webhook_failover_url
|
|
218
|
+
|
|
219
|
+
sig { returns(T.nilable(String)) }
|
|
220
|
+
attr_accessor :webhook_url
|
|
221
|
+
|
|
222
|
+
sig do
|
|
223
|
+
params(
|
|
224
|
+
id: String,
|
|
225
|
+
body: Telnyx::WhatsappMessageEcho::Data::Payload::Body::OrHash,
|
|
226
|
+
cost: Telnyx::WhatsappMessageEcho::Data::Payload::Cost::OrHash,
|
|
227
|
+
direction:
|
|
228
|
+
Telnyx::WhatsappMessageEcho::Data::Payload::Direction::OrSymbol,
|
|
229
|
+
errors: T::Array[Telnyx::MessagingError0b38e7044b::OrHash],
|
|
230
|
+
from: Telnyx::WhatsappMessageEcho::Data::Payload::From::OrHash,
|
|
231
|
+
messaging_profile_id: String,
|
|
232
|
+
organization_id: String,
|
|
233
|
+
origin:
|
|
234
|
+
Telnyx::WhatsappMessageEcho::Data::Payload::Origin::OrSymbol,
|
|
235
|
+
record_type:
|
|
236
|
+
Telnyx::WhatsappMessageEcho::Data::Payload::RecordType::OrSymbol,
|
|
237
|
+
to: String,
|
|
238
|
+
type: Telnyx::WhatsappMessageEcho::Data::Payload::Type::OrSymbol,
|
|
239
|
+
received_at: Time,
|
|
240
|
+
tags: T::Array[String],
|
|
241
|
+
webhook_failover_url: T.nilable(String),
|
|
242
|
+
webhook_url: T.nilable(String)
|
|
243
|
+
).returns(T.attached_class)
|
|
244
|
+
end
|
|
245
|
+
def self.new(
|
|
246
|
+
# Telnyx identifier for the mirrored message.
|
|
247
|
+
id:,
|
|
248
|
+
# Mirrored WhatsApp message content. The content property matches the value of
|
|
249
|
+
# `type`.
|
|
250
|
+
body:,
|
|
251
|
+
# No charge is created for a Business app message echo.
|
|
252
|
+
cost:,
|
|
253
|
+
# Indicates that the business sent the message to the WhatsApp user.
|
|
254
|
+
direction:,
|
|
255
|
+
errors:,
|
|
256
|
+
from:,
|
|
257
|
+
messaging_profile_id:,
|
|
258
|
+
organization_id:,
|
|
259
|
+
# Identifies the WhatsApp Business app as the source of the message.
|
|
260
|
+
origin:,
|
|
261
|
+
record_type:,
|
|
262
|
+
# WhatsApp user who received the Business app message.
|
|
263
|
+
to:,
|
|
264
|
+
type:,
|
|
265
|
+
received_at: nil,
|
|
266
|
+
tags: nil,
|
|
267
|
+
webhook_failover_url: nil,
|
|
268
|
+
webhook_url: nil
|
|
269
|
+
)
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
sig do
|
|
273
|
+
override.returns(
|
|
274
|
+
{
|
|
275
|
+
id: String,
|
|
276
|
+
body: Telnyx::WhatsappMessageEcho::Data::Payload::Body,
|
|
277
|
+
cost: Telnyx::WhatsappMessageEcho::Data::Payload::Cost,
|
|
278
|
+
direction:
|
|
279
|
+
Telnyx::WhatsappMessageEcho::Data::Payload::Direction::TaggedSymbol,
|
|
280
|
+
errors: T::Array[Telnyx::MessagingError0b38e7044b],
|
|
281
|
+
from: Telnyx::WhatsappMessageEcho::Data::Payload::From,
|
|
282
|
+
messaging_profile_id: String,
|
|
283
|
+
organization_id: String,
|
|
284
|
+
origin:
|
|
285
|
+
Telnyx::WhatsappMessageEcho::Data::Payload::Origin::TaggedSymbol,
|
|
286
|
+
record_type:
|
|
287
|
+
Telnyx::WhatsappMessageEcho::Data::Payload::RecordType::TaggedSymbol,
|
|
288
|
+
to: String,
|
|
289
|
+
type:
|
|
290
|
+
Telnyx::WhatsappMessageEcho::Data::Payload::Type::TaggedSymbol,
|
|
291
|
+
received_at: Time,
|
|
292
|
+
tags: T::Array[String],
|
|
293
|
+
webhook_failover_url: T.nilable(String),
|
|
294
|
+
webhook_url: T.nilable(String)
|
|
295
|
+
}
|
|
296
|
+
)
|
|
297
|
+
end
|
|
298
|
+
def to_hash
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
class Body < Telnyx::Internal::Type::BaseModel
|
|
302
|
+
OrHash =
|
|
303
|
+
T.type_alias do
|
|
304
|
+
T.any(
|
|
305
|
+
Telnyx::WhatsappMessageEcho::Data::Payload::Body,
|
|
306
|
+
Telnyx::Internal::AnyHash
|
|
307
|
+
)
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
# Telnyx identifier for the mirrored message.
|
|
311
|
+
sig { returns(String) }
|
|
312
|
+
attr_accessor :id
|
|
313
|
+
|
|
314
|
+
# Meta WhatsApp message identifier, also known as a wamid.
|
|
315
|
+
sig { returns(String) }
|
|
316
|
+
attr_accessor :foreign_id
|
|
317
|
+
|
|
318
|
+
# Unix timestamp supplied by Meta.
|
|
319
|
+
sig { returns(String) }
|
|
320
|
+
attr_accessor :timestamp
|
|
321
|
+
|
|
322
|
+
# WhatsApp message content type.
|
|
323
|
+
sig { returns(String) }
|
|
324
|
+
attr_accessor :type
|
|
325
|
+
|
|
326
|
+
# WhatsApp user who received the message.
|
|
327
|
+
sig { returns(T.nilable(String)) }
|
|
328
|
+
attr_reader :from
|
|
329
|
+
|
|
330
|
+
sig { params(from: String).void }
|
|
331
|
+
attr_writer :from
|
|
332
|
+
|
|
333
|
+
# Opaque recipient identifier when Meta does not supply a phone number.
|
|
334
|
+
sig { returns(T.nilable(String)) }
|
|
335
|
+
attr_reader :from_user_id
|
|
336
|
+
|
|
337
|
+
sig { params(from_user_id: String).void }
|
|
338
|
+
attr_writer :from_user_id
|
|
339
|
+
|
|
340
|
+
# Mirrored WhatsApp message content. The content property matches the value of
|
|
341
|
+
# `type`.
|
|
342
|
+
sig do
|
|
343
|
+
params(
|
|
344
|
+
id: String,
|
|
345
|
+
foreign_id: String,
|
|
346
|
+
timestamp: String,
|
|
347
|
+
type: String,
|
|
348
|
+
from: String,
|
|
349
|
+
from_user_id: String
|
|
350
|
+
).returns(T.attached_class)
|
|
351
|
+
end
|
|
352
|
+
def self.new(
|
|
353
|
+
# Telnyx identifier for the mirrored message.
|
|
354
|
+
id:,
|
|
355
|
+
# Meta WhatsApp message identifier, also known as a wamid.
|
|
356
|
+
foreign_id:,
|
|
357
|
+
# Unix timestamp supplied by Meta.
|
|
358
|
+
timestamp:,
|
|
359
|
+
# WhatsApp message content type.
|
|
360
|
+
type:,
|
|
361
|
+
# WhatsApp user who received the message.
|
|
362
|
+
from: nil,
|
|
363
|
+
# Opaque recipient identifier when Meta does not supply a phone number.
|
|
364
|
+
from_user_id: nil
|
|
365
|
+
)
|
|
366
|
+
end
|
|
367
|
+
|
|
368
|
+
sig do
|
|
369
|
+
override.returns(
|
|
370
|
+
{
|
|
371
|
+
id: String,
|
|
372
|
+
foreign_id: String,
|
|
373
|
+
timestamp: String,
|
|
374
|
+
type: String,
|
|
375
|
+
from: String,
|
|
376
|
+
from_user_id: String
|
|
377
|
+
}
|
|
378
|
+
)
|
|
379
|
+
end
|
|
380
|
+
def to_hash
|
|
381
|
+
end
|
|
382
|
+
end
|
|
383
|
+
|
|
384
|
+
class Cost < Telnyx::Internal::Type::BaseModel
|
|
385
|
+
OrHash =
|
|
386
|
+
T.type_alias do
|
|
387
|
+
T.any(
|
|
388
|
+
Telnyx::WhatsappMessageEcho::Data::Payload::Cost,
|
|
389
|
+
Telnyx::Internal::AnyHash
|
|
390
|
+
)
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
sig { returns(T.nilable(String)) }
|
|
394
|
+
attr_accessor :amount
|
|
395
|
+
|
|
396
|
+
sig { returns(T.nilable(String)) }
|
|
397
|
+
attr_accessor :currency
|
|
398
|
+
|
|
399
|
+
# No charge is created for a Business app message echo.
|
|
400
|
+
sig do
|
|
401
|
+
params(
|
|
402
|
+
amount: T.nilable(String),
|
|
403
|
+
currency: T.nilable(String)
|
|
404
|
+
).returns(T.attached_class)
|
|
405
|
+
end
|
|
406
|
+
def self.new(amount: nil, currency: nil)
|
|
407
|
+
end
|
|
408
|
+
|
|
409
|
+
sig do
|
|
410
|
+
override.returns(
|
|
411
|
+
{ amount: T.nilable(String), currency: T.nilable(String) }
|
|
412
|
+
)
|
|
413
|
+
end
|
|
414
|
+
def to_hash
|
|
415
|
+
end
|
|
416
|
+
end
|
|
417
|
+
|
|
418
|
+
# Indicates that the business sent the message to the WhatsApp user.
|
|
419
|
+
module Direction
|
|
420
|
+
extend Telnyx::Internal::Type::Enum
|
|
421
|
+
|
|
422
|
+
TaggedSymbol =
|
|
423
|
+
T.type_alias do
|
|
424
|
+
T.all(
|
|
425
|
+
Symbol,
|
|
426
|
+
Telnyx::WhatsappMessageEcho::Data::Payload::Direction
|
|
427
|
+
)
|
|
428
|
+
end
|
|
429
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
430
|
+
|
|
431
|
+
OUTBOUND =
|
|
432
|
+
T.let(
|
|
433
|
+
:outbound,
|
|
434
|
+
Telnyx::WhatsappMessageEcho::Data::Payload::Direction::TaggedSymbol
|
|
435
|
+
)
|
|
436
|
+
|
|
437
|
+
sig do
|
|
438
|
+
override.returns(
|
|
439
|
+
T::Array[
|
|
440
|
+
Telnyx::WhatsappMessageEcho::Data::Payload::Direction::TaggedSymbol
|
|
441
|
+
]
|
|
442
|
+
)
|
|
443
|
+
end
|
|
444
|
+
def self.values
|
|
445
|
+
end
|
|
446
|
+
end
|
|
447
|
+
|
|
448
|
+
class From < Telnyx::Internal::Type::BaseModel
|
|
449
|
+
OrHash =
|
|
450
|
+
T.type_alias do
|
|
451
|
+
T.any(
|
|
452
|
+
Telnyx::WhatsappMessageEcho::Data::Payload::From,
|
|
453
|
+
Telnyx::Internal::AnyHash
|
|
454
|
+
)
|
|
455
|
+
end
|
|
456
|
+
|
|
457
|
+
# Coexistence-enabled business phone number in E.164 format.
|
|
458
|
+
sig { returns(String) }
|
|
459
|
+
attr_accessor :phone_number
|
|
460
|
+
|
|
461
|
+
sig { returns(T.nilable(String)) }
|
|
462
|
+
attr_reader :carrier
|
|
463
|
+
|
|
464
|
+
sig { params(carrier: String).void }
|
|
465
|
+
attr_writer :carrier
|
|
466
|
+
|
|
467
|
+
sig { returns(T.nilable(String)) }
|
|
468
|
+
attr_reader :line_type
|
|
469
|
+
|
|
470
|
+
sig { params(line_type: String).void }
|
|
471
|
+
attr_writer :line_type
|
|
472
|
+
|
|
473
|
+
sig do
|
|
474
|
+
params(
|
|
475
|
+
phone_number: String,
|
|
476
|
+
carrier: String,
|
|
477
|
+
line_type: String
|
|
478
|
+
).returns(T.attached_class)
|
|
479
|
+
end
|
|
480
|
+
def self.new(
|
|
481
|
+
# Coexistence-enabled business phone number in E.164 format.
|
|
482
|
+
phone_number:,
|
|
483
|
+
carrier: nil,
|
|
484
|
+
line_type: nil
|
|
485
|
+
)
|
|
486
|
+
end
|
|
487
|
+
|
|
488
|
+
sig do
|
|
489
|
+
override.returns(
|
|
490
|
+
{ phone_number: String, carrier: String, line_type: String }
|
|
491
|
+
)
|
|
492
|
+
end
|
|
493
|
+
def to_hash
|
|
494
|
+
end
|
|
495
|
+
end
|
|
496
|
+
|
|
497
|
+
# Identifies the WhatsApp Business app as the source of the message.
|
|
498
|
+
module Origin
|
|
499
|
+
extend Telnyx::Internal::Type::Enum
|
|
500
|
+
|
|
501
|
+
TaggedSymbol =
|
|
502
|
+
T.type_alias do
|
|
503
|
+
T.all(
|
|
504
|
+
Symbol,
|
|
505
|
+
Telnyx::WhatsappMessageEcho::Data::Payload::Origin
|
|
506
|
+
)
|
|
507
|
+
end
|
|
508
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
509
|
+
|
|
510
|
+
WHATSAPP_BUSINESS_APP =
|
|
511
|
+
T.let(
|
|
512
|
+
:whatsapp_business_app,
|
|
513
|
+
Telnyx::WhatsappMessageEcho::Data::Payload::Origin::TaggedSymbol
|
|
514
|
+
)
|
|
515
|
+
|
|
516
|
+
sig do
|
|
517
|
+
override.returns(
|
|
518
|
+
T::Array[
|
|
519
|
+
Telnyx::WhatsappMessageEcho::Data::Payload::Origin::TaggedSymbol
|
|
520
|
+
]
|
|
521
|
+
)
|
|
522
|
+
end
|
|
523
|
+
def self.values
|
|
524
|
+
end
|
|
525
|
+
end
|
|
526
|
+
|
|
527
|
+
module RecordType
|
|
528
|
+
extend Telnyx::Internal::Type::Enum
|
|
529
|
+
|
|
530
|
+
TaggedSymbol =
|
|
531
|
+
T.type_alias do
|
|
532
|
+
T.all(
|
|
533
|
+
Symbol,
|
|
534
|
+
Telnyx::WhatsappMessageEcho::Data::Payload::RecordType
|
|
535
|
+
)
|
|
536
|
+
end
|
|
537
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
538
|
+
|
|
539
|
+
MESSAGE =
|
|
540
|
+
T.let(
|
|
541
|
+
:message,
|
|
542
|
+
Telnyx::WhatsappMessageEcho::Data::Payload::RecordType::TaggedSymbol
|
|
543
|
+
)
|
|
544
|
+
|
|
545
|
+
sig do
|
|
546
|
+
override.returns(
|
|
547
|
+
T::Array[
|
|
548
|
+
Telnyx::WhatsappMessageEcho::Data::Payload::RecordType::TaggedSymbol
|
|
549
|
+
]
|
|
550
|
+
)
|
|
551
|
+
end
|
|
552
|
+
def self.values
|
|
553
|
+
end
|
|
554
|
+
end
|
|
555
|
+
|
|
556
|
+
module Type
|
|
557
|
+
extend Telnyx::Internal::Type::Enum
|
|
558
|
+
|
|
559
|
+
TaggedSymbol =
|
|
560
|
+
T.type_alias do
|
|
561
|
+
T.all(Symbol, Telnyx::WhatsappMessageEcho::Data::Payload::Type)
|
|
562
|
+
end
|
|
563
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
564
|
+
|
|
565
|
+
WHATSAPP =
|
|
566
|
+
T.let(
|
|
567
|
+
:WHATSAPP,
|
|
568
|
+
Telnyx::WhatsappMessageEcho::Data::Payload::Type::TaggedSymbol
|
|
569
|
+
)
|
|
570
|
+
|
|
571
|
+
sig do
|
|
572
|
+
override.returns(
|
|
573
|
+
T::Array[
|
|
574
|
+
Telnyx::WhatsappMessageEcho::Data::Payload::Type::TaggedSymbol
|
|
575
|
+
]
|
|
576
|
+
)
|
|
577
|
+
end
|
|
578
|
+
def self.values
|
|
579
|
+
end
|
|
580
|
+
end
|
|
581
|
+
end
|
|
582
|
+
|
|
583
|
+
module RecordType
|
|
584
|
+
extend Telnyx::Internal::Type::Enum
|
|
585
|
+
|
|
586
|
+
TaggedSymbol =
|
|
587
|
+
T.type_alias do
|
|
588
|
+
T.all(Symbol, Telnyx::WhatsappMessageEcho::Data::RecordType)
|
|
589
|
+
end
|
|
590
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
591
|
+
|
|
592
|
+
EVENT =
|
|
593
|
+
T.let(
|
|
594
|
+
:event,
|
|
595
|
+
Telnyx::WhatsappMessageEcho::Data::RecordType::TaggedSymbol
|
|
596
|
+
)
|
|
597
|
+
|
|
598
|
+
sig do
|
|
599
|
+
override.returns(
|
|
600
|
+
T::Array[
|
|
601
|
+
Telnyx::WhatsappMessageEcho::Data::RecordType::TaggedSymbol
|
|
602
|
+
]
|
|
603
|
+
)
|
|
604
|
+
end
|
|
605
|
+
def self.values
|
|
606
|
+
end
|
|
607
|
+
end
|
|
608
|
+
end
|
|
609
|
+
end
|
|
610
|
+
end
|
|
611
|
+
end
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Models
|
|
5
|
+
module X402
|
|
6
|
+
module CreditAccount
|
|
7
|
+
class PaymentListParams < Telnyx::Internal::Type::BaseModel
|
|
8
|
+
extend Telnyx::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Telnyx::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
OrHash =
|
|
12
|
+
T.type_alias do
|
|
13
|
+
T.any(
|
|
14
|
+
Telnyx::X402::CreditAccount::PaymentListParams,
|
|
15
|
+
Telnyx::Internal::AnyHash
|
|
16
|
+
)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
# The page number to load.
|
|
20
|
+
sig { returns(T.nilable(Integer)) }
|
|
21
|
+
attr_reader :page_number
|
|
22
|
+
|
|
23
|
+
sig { params(page_number: Integer).void }
|
|
24
|
+
attr_writer :page_number
|
|
25
|
+
|
|
26
|
+
# The size of the page.
|
|
27
|
+
sig { returns(T.nilable(Integer)) }
|
|
28
|
+
attr_reader :page_size
|
|
29
|
+
|
|
30
|
+
sig { params(page_size: Integer).void }
|
|
31
|
+
attr_writer :page_size
|
|
32
|
+
|
|
33
|
+
sig do
|
|
34
|
+
params(
|
|
35
|
+
page_number: Integer,
|
|
36
|
+
page_size: Integer,
|
|
37
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
38
|
+
).returns(T.attached_class)
|
|
39
|
+
end
|
|
40
|
+
def self.new(
|
|
41
|
+
# The page number to load.
|
|
42
|
+
page_number: nil,
|
|
43
|
+
# The size of the page.
|
|
44
|
+
page_size: nil,
|
|
45
|
+
request_options: {}
|
|
46
|
+
)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
sig do
|
|
50
|
+
override.returns(
|
|
51
|
+
{
|
|
52
|
+
page_number: Integer,
|
|
53
|
+
page_size: Integer,
|
|
54
|
+
request_options: Telnyx::RequestOptions
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
end
|
|
58
|
+
def to_hash
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Models
|
|
5
|
+
module X402
|
|
6
|
+
module CreditAccount
|
|
7
|
+
class PaymentRetrieveParams < Telnyx::Internal::Type::BaseModel
|
|
8
|
+
extend Telnyx::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Telnyx::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
OrHash =
|
|
12
|
+
T.type_alias do
|
|
13
|
+
T.any(
|
|
14
|
+
Telnyx::X402::CreditAccount::PaymentRetrieveParams,
|
|
15
|
+
Telnyx::Internal::AnyHash
|
|
16
|
+
)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
sig { returns(String) }
|
|
20
|
+
attr_accessor :id
|
|
21
|
+
|
|
22
|
+
sig do
|
|
23
|
+
params(
|
|
24
|
+
id: String,
|
|
25
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
26
|
+
).returns(T.attached_class)
|
|
27
|
+
end
|
|
28
|
+
def self.new(id:, request_options: {})
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
sig do
|
|
32
|
+
override.returns(
|
|
33
|
+
{ id: String, request_options: Telnyx::RequestOptions }
|
|
34
|
+
)
|
|
35
|
+
end
|
|
36
|
+
def to_hash
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|