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.
Files changed (167) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/client.rb +4 -0
  5. data/lib/telnyx/models/ai/assistant_a2_a_agent.rb +195 -0
  6. data/lib/telnyx/models/ai/assistant_create_params.rb +16 -1
  7. data/lib/telnyx/models/ai/assistant_update_params.rb +17 -1
  8. data/lib/telnyx/models/ai/assistants/update_assistant.rb +17 -1
  9. data/lib/telnyx/models/ai/chat_completion_request.rb +125 -48
  10. data/lib/telnyx/models/ai/inference_embedding.rb +16 -1
  11. data/lib/telnyx/models/ai/telephony_settings.rb +15 -1
  12. data/lib/telnyx/models/compute/func_retrieve_logs_params.rb +66 -0
  13. data/lib/telnyx/models/compute/func_retrieve_logs_response.rb +161 -0
  14. data/lib/telnyx/models/compute/func_retrieve_metric_aggregates_params.rb +69 -0
  15. data/lib/telnyx/models/compute/func_retrieve_metric_aggregates_response.rb +137 -0
  16. data/lib/telnyx/models/compute/func_retrieve_revisions_params.rb +34 -0
  17. data/lib/telnyx/models/compute/func_retrieve_revisions_response.rb +101 -0
  18. data/lib/telnyx/models/compute/func_retrieve_ship_inspection_params.rb +22 -0
  19. data/lib/telnyx/models/compute/func_retrieve_ship_inspection_response.rb +94 -0
  20. data/lib/telnyx/models/compute/functions_observability_pagination_meta.rb +35 -0
  21. data/lib/telnyx/models/compute/logs_meta.rb +23 -0
  22. data/lib/telnyx/models/credential_connection.rb +4 -1
  23. data/lib/telnyx/models/email_inboxes/email_message.rb +12 -1
  24. data/lib/telnyx/models/email_message_batch_params.rb +4 -1
  25. data/lib/telnyx/models/email_message_batch_response.rb +1 -0
  26. data/lib/telnyx/models/fqdn_connection.rb +5 -2
  27. data/lib/telnyx/models/fqdn_connections/fqdn_authentication.rb +9 -2
  28. data/lib/telnyx/models/messaging_inbound_message_payload.rb +210 -67
  29. data/lib/telnyx/models/messaging_messaging_profile.rb +11 -1
  30. data/lib/telnyx/models/messaging_profile_create_params.rb +11 -1
  31. data/lib/telnyx/models/messaging_profile_features.rb +26 -0
  32. data/lib/telnyx/models/messaging_profile_update_params.rb +11 -1
  33. data/lib/telnyx/models/uac_connection.rb +4 -1
  34. data/lib/telnyx/models/uac_external_settings.rb +6 -2
  35. data/lib/telnyx/models/unsafe_unwrap_webhook_event.rb +5 -1
  36. data/lib/telnyx/models/unwrap_webhook_event.rb +5 -1
  37. data/lib/telnyx/models/whatsapp/business_accounts/phone_number_list_response.rb +104 -1
  38. data/lib/telnyx/models/whatsapp/phone_number_get_response.rb +103 -1
  39. data/lib/telnyx/models/whatsapp/phone_number_list_response.rb +103 -1
  40. data/lib/telnyx/models/whatsapp/phone_number_retrieve_phone_number_params.rb +22 -0
  41. data/lib/telnyx/models/whatsapp/phone_number_retrieve_phone_number_response.rb +207 -0
  42. data/lib/telnyx/models/whatsapp_account_update.rb +112 -0
  43. data/lib/telnyx/models/whatsapp_message_echo.rb +340 -0
  44. data/lib/telnyx/models/x402/credit_account/payment_list_params.rb +34 -0
  45. data/lib/telnyx/models/x402/credit_account/payment_retrieve_params.rb +24 -0
  46. data/lib/telnyx/models/x402/credit_account/payment_retrieve_response.rb +21 -0
  47. data/lib/telnyx/models/x402/credit_account/x402_transaction_record.rb +113 -0
  48. data/lib/telnyx/models.rb +8 -0
  49. data/lib/telnyx/resources/ai/assistants/versions.rb +3 -1
  50. data/lib/telnyx/resources/ai/assistants.rb +6 -2
  51. data/lib/telnyx/resources/ai/openai/chat.rb +2 -8
  52. data/lib/telnyx/resources/compute/funcs.rb +141 -0
  53. data/lib/telnyx/resources/compute.rb +18 -0
  54. data/lib/telnyx/resources/email_messages.rb +4 -2
  55. data/lib/telnyx/resources/messaging_profiles.rb +6 -2
  56. data/lib/telnyx/resources/webhooks.rb +2 -2
  57. data/lib/telnyx/resources/whatsapp/phone_numbers.rb +22 -0
  58. data/lib/telnyx/resources/x402/credit_account/payments.rb +71 -0
  59. data/lib/telnyx/resources/x402/credit_account.rb +8 -2
  60. data/lib/telnyx/version.rb +1 -1
  61. data/lib/telnyx.rb +23 -0
  62. data/rbi/telnyx/client.rbi +3 -0
  63. data/rbi/telnyx/models/ai/assistant_a2_a_agent.rbi +345 -0
  64. data/rbi/telnyx/models/ai/assistant_create_params.rbi +29 -0
  65. data/rbi/telnyx/models/ai/assistant_update_params.rbi +31 -0
  66. data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +31 -0
  67. data/rbi/telnyx/models/ai/chat_completion_request.rbi +224 -92
  68. data/rbi/telnyx/models/ai/inference_embedding.rbi +29 -0
  69. data/rbi/telnyx/models/ai/telephony_settings.rbi +23 -0
  70. data/rbi/telnyx/models/compute/func_retrieve_logs_params.rbi +130 -0
  71. data/rbi/telnyx/models/compute/func_retrieve_logs_response.rbi +410 -0
  72. data/rbi/telnyx/models/compute/func_retrieve_metric_aggregates_params.rbi +102 -0
  73. data/rbi/telnyx/models/compute/func_retrieve_metric_aggregates_response.rbi +231 -0
  74. data/rbi/telnyx/models/compute/func_retrieve_revisions_params.rbi +59 -0
  75. data/rbi/telnyx/models/compute/func_retrieve_revisions_response.rbi +213 -0
  76. data/rbi/telnyx/models/compute/func_retrieve_ship_inspection_params.rbi +40 -0
  77. data/rbi/telnyx/models/compute/func_retrieve_ship_inspection_response.rbi +252 -0
  78. data/rbi/telnyx/models/compute/functions_observability_pagination_meta.rbi +70 -0
  79. data/rbi/telnyx/models/compute/logs_meta.rbi +38 -0
  80. data/rbi/telnyx/models/credential_connection.rbi +8 -2
  81. data/rbi/telnyx/models/email_inboxes/email_message.rbi +22 -3
  82. data/rbi/telnyx/models/email_message_batch_params.rbi +6 -0
  83. data/rbi/telnyx/models/email_message_batch_response.rbi +5 -0
  84. data/rbi/telnyx/models/fqdn_connection.rbi +8 -2
  85. data/rbi/telnyx/models/fqdn_connections/fqdn_authentication.rbi +8 -2
  86. data/rbi/telnyx/models/messaging_inbound_message_payload.rbi +450 -193
  87. data/rbi/telnyx/models/messaging_messaging_profile.rbi +19 -0
  88. data/rbi/telnyx/models/messaging_profile_create_params.rbi +19 -0
  89. data/rbi/telnyx/models/messaging_profile_features.rbi +43 -0
  90. data/rbi/telnyx/models/messaging_profile_update_params.rbi +19 -0
  91. data/rbi/telnyx/models/uac_connection.rbi +8 -2
  92. data/rbi/telnyx/models/uac_external_settings.rbi +10 -2
  93. data/rbi/telnyx/models/unsafe_unwrap_webhook_event.rbi +3 -1
  94. data/rbi/telnyx/models/unwrap_webhook_event.rbi +3 -1
  95. data/rbi/telnyx/models/whatsapp/business_accounts/phone_number_list_response.rbi +213 -0
  96. data/rbi/telnyx/models/whatsapp/phone_number_get_response.rbi +213 -0
  97. data/rbi/telnyx/models/whatsapp/phone_number_list_response.rbi +213 -0
  98. data/rbi/telnyx/models/whatsapp/phone_number_retrieve_phone_number_params.rbi +40 -0
  99. data/rbi/telnyx/models/whatsapp/phone_number_retrieve_phone_number_response.rbi +401 -0
  100. data/rbi/telnyx/models/whatsapp_account_update.rbi +236 -0
  101. data/rbi/telnyx/models/whatsapp_message_echo.rbi +611 -0
  102. data/rbi/telnyx/models/x402/credit_account/payment_list_params.rbi +64 -0
  103. data/rbi/telnyx/models/x402/credit_account/payment_retrieve_params.rbi +42 -0
  104. data/rbi/telnyx/models/x402/credit_account/payment_retrieve_response.rbi +53 -0
  105. data/rbi/telnyx/models/x402/credit_account/x402_transaction_record.rbi +219 -0
  106. data/rbi/telnyx/models.rbi +8 -0
  107. data/rbi/telnyx/resources/ai/assistants/versions.rbi +12 -0
  108. data/rbi/telnyx/resources/ai/assistants.rbi +21 -0
  109. data/rbi/telnyx/resources/ai/openai/chat.rbi +9 -13
  110. data/rbi/telnyx/resources/compute/funcs.rbi +111 -0
  111. data/rbi/telnyx/resources/compute.rbi +15 -0
  112. data/rbi/telnyx/resources/email_messages.rbi +6 -2
  113. data/rbi/telnyx/resources/messaging_profiles.rbi +10 -0
  114. data/rbi/telnyx/resources/webhooks.rbi +6 -2
  115. data/rbi/telnyx/resources/whatsapp/phone_numbers.rbi +18 -0
  116. data/rbi/telnyx/resources/x402/credit_account/payments.rbi +60 -0
  117. data/rbi/telnyx/resources/x402/credit_account.rbi +5 -0
  118. data/sig/telnyx/client.rbs +2 -0
  119. data/sig/telnyx/models/ai/assistant_a2_a_agent.rbs +140 -0
  120. data/sig/telnyx/models/ai/assistant_create_params.rbs +9 -0
  121. data/sig/telnyx/models/ai/assistant_update_params.rbs +9 -0
  122. data/sig/telnyx/models/ai/assistants/update_assistant.rbs +9 -0
  123. data/sig/telnyx/models/ai/chat_completion_request.rbs +86 -44
  124. data/sig/telnyx/models/ai/inference_embedding.rbs +9 -0
  125. data/sig/telnyx/models/ai/telephony_settings.rbs +7 -0
  126. data/sig/telnyx/models/compute/func_retrieve_logs_params.rbs +69 -0
  127. data/sig/telnyx/models/compute/func_retrieve_logs_response.rbs +210 -0
  128. data/sig/telnyx/models/compute/func_retrieve_metric_aggregates_params.rbs +66 -0
  129. data/sig/telnyx/models/compute/func_retrieve_metric_aggregates_response.rbs +149 -0
  130. data/sig/telnyx/models/compute/func_retrieve_revisions_params.rbs +38 -0
  131. data/sig/telnyx/models/compute/func_retrieve_revisions_response.rbs +131 -0
  132. data/sig/telnyx/models/compute/func_retrieve_ship_inspection_params.rbs +22 -0
  133. data/sig/telnyx/models/compute/func_retrieve_ship_inspection_response.rbs +117 -0
  134. data/sig/telnyx/models/compute/functions_observability_pagination_meta.rbs +45 -0
  135. data/sig/telnyx/models/compute/logs_meta.rbs +21 -0
  136. data/sig/telnyx/models/email_inboxes/email_message.rbs +12 -3
  137. data/sig/telnyx/models/email_message_batch_response.rbs +2 -0
  138. data/sig/telnyx/models/messaging_inbound_message_payload.rbs +207 -95
  139. data/sig/telnyx/models/messaging_messaging_profile.rbs +5 -0
  140. data/sig/telnyx/models/messaging_profile_create_params.rbs +5 -0
  141. data/sig/telnyx/models/messaging_profile_features.rbs +15 -0
  142. data/sig/telnyx/models/messaging_profile_update_params.rbs +5 -0
  143. data/sig/telnyx/models/unsafe_unwrap_webhook_event.rbs +2 -0
  144. data/sig/telnyx/models/unwrap_webhook_event.rbs +2 -0
  145. data/sig/telnyx/models/whatsapp/business_accounts/phone_number_list_response.rbs +90 -0
  146. data/sig/telnyx/models/whatsapp/phone_number_get_response.rbs +90 -0
  147. data/sig/telnyx/models/whatsapp/phone_number_list_response.rbs +90 -0
  148. data/sig/telnyx/models/whatsapp/phone_number_retrieve_phone_number_params.rbs +25 -0
  149. data/sig/telnyx/models/whatsapp/phone_number_retrieve_phone_number_response.rbs +201 -0
  150. data/sig/telnyx/models/whatsapp_account_update.rbs +107 -0
  151. data/sig/telnyx/models/whatsapp_message_echo.rbs +291 -0
  152. data/sig/telnyx/models/x402/credit_account/payment_list_params.rbs +36 -0
  153. data/sig/telnyx/models/x402/credit_account/payment_retrieve_params.rbs +27 -0
  154. data/sig/telnyx/models/x402/credit_account/payment_retrieve_response.rbs +26 -0
  155. data/sig/telnyx/models/x402/credit_account/x402_transaction_record.rbs +104 -0
  156. data/sig/telnyx/models.rbs +8 -0
  157. data/sig/telnyx/resources/ai/assistants/versions.rbs +1 -0
  158. data/sig/telnyx/resources/ai/assistants.rbs +2 -0
  159. data/sig/telnyx/resources/ai/openai/chat.rbs +1 -4
  160. data/sig/telnyx/resources/compute/funcs.rbs +41 -0
  161. data/sig/telnyx/resources/compute.rbs +9 -0
  162. data/sig/telnyx/resources/messaging_profiles.rbs +2 -0
  163. data/sig/telnyx/resources/webhooks.rbs +6 -2
  164. data/sig/telnyx/resources/whatsapp/phone_numbers.rbs +5 -0
  165. data/sig/telnyx/resources/x402/credit_account/payments.rbs +22 -0
  166. data/sig/telnyx/resources/x402/credit_account.rbs +2 -0
  167. metadata +71 -2
@@ -0,0 +1,201 @@
1
+ module Telnyx
2
+ module Models
3
+ module Whatsapp
4
+ type phone_number_retrieve_phone_number_response =
5
+ {
6
+ data: Telnyx::Models::Whatsapp::PhoneNumberRetrievePhoneNumberResponse::Data
7
+ }
8
+
9
+ class PhoneNumberRetrievePhoneNumberResponse < Telnyx::Internal::Type::BaseModel
10
+ attr_accessor data: Telnyx::Models::Whatsapp::PhoneNumberRetrievePhoneNumberResponse::Data
11
+
12
+ def initialize: (
13
+ data: Telnyx::Models::Whatsapp::PhoneNumberRetrievePhoneNumberResponse::Data
14
+ ) -> void
15
+
16
+ def to_hash: -> {
17
+ data: Telnyx::Models::Whatsapp::PhoneNumberRetrievePhoneNumberResponse::Data
18
+ }
19
+
20
+ type data =
21
+ {
22
+ calling_enabled: bool,
23
+ coexistence_state: Telnyx::Models::Whatsapp::PhoneNumberRetrievePhoneNumberResponse::Data::coexistence_state?,
24
+ created_at: Time,
25
+ display_name: String,
26
+ enabled: bool,
27
+ is_on_biz_app: bool,
28
+ phone_number: String,
29
+ phone_number_id: String,
30
+ quality_rating: String,
31
+ record_type: String,
32
+ status: String,
33
+ sync_deadline: Time?,
34
+ sync_progress: Telnyx::Models::Whatsapp::PhoneNumberRetrievePhoneNumberResponse::Data::SyncProgress?,
35
+ user_id: String,
36
+ waba_id: String
37
+ }
38
+
39
+ class Data < Telnyx::Internal::Type::BaseModel
40
+ attr_reader calling_enabled: bool?
41
+
42
+ def calling_enabled=: (bool) -> bool
43
+
44
+ attr_accessor coexistence_state: Telnyx::Models::Whatsapp::PhoneNumberRetrievePhoneNumberResponse::Data::coexistence_state?
45
+
46
+ attr_reader created_at: Time?
47
+
48
+ def created_at=: (Time) -> Time
49
+
50
+ attr_reader display_name: String?
51
+
52
+ def display_name=: (String) -> String
53
+
54
+ attr_reader enabled: bool?
55
+
56
+ def enabled=: (bool) -> bool
57
+
58
+ attr_reader is_on_biz_app: bool?
59
+
60
+ def is_on_biz_app=: (bool) -> bool
61
+
62
+ attr_reader phone_number: String?
63
+
64
+ def phone_number=: (String) -> String
65
+
66
+ attr_reader phone_number_id: String?
67
+
68
+ def phone_number_id=: (String) -> String
69
+
70
+ attr_reader quality_rating: String?
71
+
72
+ def quality_rating=: (String) -> String
73
+
74
+ attr_reader record_type: String?
75
+
76
+ def record_type=: (String) -> String
77
+
78
+ attr_reader status: String?
79
+
80
+ def status=: (String) -> String
81
+
82
+ attr_accessor sync_deadline: Time?
83
+
84
+ attr_accessor sync_progress: Telnyx::Models::Whatsapp::PhoneNumberRetrievePhoneNumberResponse::Data::SyncProgress?
85
+
86
+ attr_reader user_id: String?
87
+
88
+ def user_id=: (String) -> String
89
+
90
+ attr_reader waba_id: String?
91
+
92
+ def waba_id=: (String) -> String
93
+
94
+ def initialize: (
95
+ ?calling_enabled: bool,
96
+ ?coexistence_state: Telnyx::Models::Whatsapp::PhoneNumberRetrievePhoneNumberResponse::Data::coexistence_state?,
97
+ ?created_at: Time,
98
+ ?display_name: String,
99
+ ?enabled: bool,
100
+ ?is_on_biz_app: bool,
101
+ ?phone_number: String,
102
+ ?phone_number_id: String,
103
+ ?quality_rating: String,
104
+ ?record_type: String,
105
+ ?status: String,
106
+ ?sync_deadline: Time?,
107
+ ?sync_progress: Telnyx::Models::Whatsapp::PhoneNumberRetrievePhoneNumberResponse::Data::SyncProgress?,
108
+ ?user_id: String,
109
+ ?waba_id: String
110
+ ) -> void
111
+
112
+ def to_hash: -> {
113
+ calling_enabled: bool,
114
+ coexistence_state: Telnyx::Models::Whatsapp::PhoneNumberRetrievePhoneNumberResponse::Data::coexistence_state?,
115
+ created_at: Time,
116
+ display_name: String,
117
+ enabled: bool,
118
+ is_on_biz_app: bool,
119
+ phone_number: String,
120
+ phone_number_id: String,
121
+ quality_rating: String,
122
+ record_type: String,
123
+ status: String,
124
+ sync_deadline: Time?,
125
+ sync_progress: Telnyx::Models::Whatsapp::PhoneNumberRetrievePhoneNumberResponse::Data::SyncProgress?,
126
+ user_id: String,
127
+ waba_id: String
128
+ }
129
+
130
+ type coexistence_state =
131
+ :pending_onboarding
132
+ | :sync_pending
133
+ | :syncing
134
+ | :sync_complete
135
+ | :active
136
+ | :history_declined
137
+ | :sync_deadline_expired
138
+ | :offboarded
139
+ | :disconnected
140
+
141
+ module CoexistenceState
142
+ extend Telnyx::Internal::Type::Enum
143
+
144
+ PENDING_ONBOARDING: :pending_onboarding
145
+ SYNC_PENDING: :sync_pending
146
+ SYNCING: :syncing
147
+ SYNC_COMPLETE: :sync_complete
148
+ ACTIVE: :active
149
+ HISTORY_DECLINED: :history_declined
150
+ SYNC_DEADLINE_EXPIRED: :sync_deadline_expired
151
+ OFFBOARDED: :offboarded
152
+ DISCONNECTED: :disconnected
153
+
154
+ def self?.values: -> ::Array[Telnyx::Models::Whatsapp::PhoneNumberRetrievePhoneNumberResponse::Data::coexistence_state]
155
+ end
156
+
157
+ type sync_progress =
158
+ {
159
+ contacts_status: String,
160
+ history_chunk_order: Integer?,
161
+ history_phase: Integer?,
162
+ history_progress: Integer?,
163
+ history_status: String
164
+ }
165
+
166
+ class SyncProgress < Telnyx::Internal::Type::BaseModel
167
+ attr_reader contacts_status: String?
168
+
169
+ def contacts_status=: (String) -> String
170
+
171
+ attr_accessor history_chunk_order: Integer?
172
+
173
+ attr_accessor history_phase: Integer?
174
+
175
+ attr_accessor history_progress: Integer?
176
+
177
+ attr_reader history_status: String?
178
+
179
+ def history_status=: (String) -> String
180
+
181
+ def initialize: (
182
+ ?contacts_status: String,
183
+ ?history_chunk_order: Integer?,
184
+ ?history_phase: Integer?,
185
+ ?history_progress: Integer?,
186
+ ?history_status: String
187
+ ) -> void
188
+
189
+ def to_hash: -> {
190
+ contacts_status: String,
191
+ history_chunk_order: Integer?,
192
+ history_phase: Integer?,
193
+ history_progress: Integer?,
194
+ history_status: String
195
+ }
196
+ end
197
+ end
198
+ end
199
+ end
200
+ end
201
+ end
@@ -0,0 +1,107 @@
1
+ module Telnyx
2
+ module Models
3
+ type whatsapp_account_update = { data: Telnyx::WhatsappAccountUpdate::Data }
4
+
5
+ class WhatsappAccountUpdate < Telnyx::Internal::Type::BaseModel
6
+ attr_accessor data: Telnyx::WhatsappAccountUpdate::Data
7
+
8
+ def initialize: (data: Telnyx::WhatsappAccountUpdate::Data) -> void
9
+
10
+ def to_hash: -> { data: Telnyx::WhatsappAccountUpdate::Data }
11
+
12
+ type data =
13
+ {
14
+ id: String,
15
+ event_type: Telnyx::Models::WhatsappAccountUpdate::Data::event_type,
16
+ occurred_at: Time,
17
+ payload: Telnyx::WhatsappAccountUpdate::Data::Payload,
18
+ record_type: Telnyx::Models::WhatsappAccountUpdate::Data::record_type
19
+ }
20
+
21
+ class Data < Telnyx::Internal::Type::BaseModel
22
+ attr_accessor id: String
23
+
24
+ attr_accessor event_type: Telnyx::Models::WhatsappAccountUpdate::Data::event_type
25
+
26
+ attr_accessor occurred_at: Time
27
+
28
+ attr_accessor payload: Telnyx::WhatsappAccountUpdate::Data::Payload
29
+
30
+ attr_accessor record_type: Telnyx::Models::WhatsappAccountUpdate::Data::record_type
31
+
32
+ def initialize: (
33
+ id: String,
34
+ event_type: Telnyx::Models::WhatsappAccountUpdate::Data::event_type,
35
+ occurred_at: Time,
36
+ payload: Telnyx::WhatsappAccountUpdate::Data::Payload,
37
+ record_type: Telnyx::Models::WhatsappAccountUpdate::Data::record_type
38
+ ) -> void
39
+
40
+ def to_hash: -> {
41
+ id: String,
42
+ event_type: Telnyx::Models::WhatsappAccountUpdate::Data::event_type,
43
+ occurred_at: Time,
44
+ payload: Telnyx::WhatsappAccountUpdate::Data::Payload,
45
+ record_type: Telnyx::Models::WhatsappAccountUpdate::Data::record_type
46
+ }
47
+
48
+ type event_type = :"whatsapp.account.update"
49
+
50
+ module EventType
51
+ extend Telnyx::Internal::Type::Enum
52
+
53
+ WHATSAPP_ACCOUNT_UPDATE: :"whatsapp.account.update"
54
+
55
+ def self?.values: -> ::Array[Telnyx::Models::WhatsappAccountUpdate::Data::event_type]
56
+ end
57
+
58
+ type payload =
59
+ {
60
+ event: String,
61
+ record_type: Telnyx::Models::WhatsappAccountUpdate::Data::Payload::record_type,
62
+ waba_id: String
63
+ }
64
+
65
+ class Payload < Telnyx::Internal::Type::BaseModel
66
+ attr_accessor event: String
67
+
68
+ attr_accessor record_type: Telnyx::Models::WhatsappAccountUpdate::Data::Payload::record_type
69
+
70
+ attr_accessor waba_id: String
71
+
72
+ def initialize: (
73
+ event: String,
74
+ record_type: Telnyx::Models::WhatsappAccountUpdate::Data::Payload::record_type,
75
+ waba_id: String
76
+ ) -> void
77
+
78
+ def to_hash: -> {
79
+ event: String,
80
+ record_type: Telnyx::Models::WhatsappAccountUpdate::Data::Payload::record_type,
81
+ waba_id: String
82
+ }
83
+
84
+ type record_type = :whatsapp_account
85
+
86
+ module RecordType
87
+ extend Telnyx::Internal::Type::Enum
88
+
89
+ WHATSAPP_ACCOUNT: :whatsapp_account
90
+
91
+ def self?.values: -> ::Array[Telnyx::Models::WhatsappAccountUpdate::Data::Payload::record_type]
92
+ end
93
+ end
94
+
95
+ type record_type = :event
96
+
97
+ module RecordType
98
+ extend Telnyx::Internal::Type::Enum
99
+
100
+ EVENT: :event
101
+
102
+ def self?.values: -> ::Array[Telnyx::Models::WhatsappAccountUpdate::Data::record_type]
103
+ end
104
+ end
105
+ end
106
+ end
107
+ end
@@ -0,0 +1,291 @@
1
+ module Telnyx
2
+ module Models
3
+ type whatsapp_message_echo = { data: Telnyx::WhatsappMessageEcho::Data }
4
+
5
+ class WhatsappMessageEcho < Telnyx::Internal::Type::BaseModel
6
+ attr_accessor data: Telnyx::WhatsappMessageEcho::Data
7
+
8
+ def initialize: (data: Telnyx::WhatsappMessageEcho::Data) -> void
9
+
10
+ def to_hash: -> { data: Telnyx::WhatsappMessageEcho::Data }
11
+
12
+ type data =
13
+ {
14
+ id: String,
15
+ event_type: Telnyx::Models::WhatsappMessageEcho::Data::event_type,
16
+ occurred_at: Time,
17
+ payload: Telnyx::WhatsappMessageEcho::Data::Payload,
18
+ record_type: Telnyx::Models::WhatsappMessageEcho::Data::record_type
19
+ }
20
+
21
+ class Data < Telnyx::Internal::Type::BaseModel
22
+ attr_accessor id: String
23
+
24
+ attr_accessor event_type: Telnyx::Models::WhatsappMessageEcho::Data::event_type
25
+
26
+ attr_accessor occurred_at: Time
27
+
28
+ attr_accessor payload: Telnyx::WhatsappMessageEcho::Data::Payload
29
+
30
+ attr_accessor record_type: Telnyx::Models::WhatsappMessageEcho::Data::record_type
31
+
32
+ def initialize: (
33
+ id: String,
34
+ event_type: Telnyx::Models::WhatsappMessageEcho::Data::event_type,
35
+ occurred_at: Time,
36
+ payload: Telnyx::WhatsappMessageEcho::Data::Payload,
37
+ record_type: Telnyx::Models::WhatsappMessageEcho::Data::record_type
38
+ ) -> void
39
+
40
+ def to_hash: -> {
41
+ id: String,
42
+ event_type: Telnyx::Models::WhatsappMessageEcho::Data::event_type,
43
+ occurred_at: Time,
44
+ payload: Telnyx::WhatsappMessageEcho::Data::Payload,
45
+ record_type: Telnyx::Models::WhatsappMessageEcho::Data::record_type
46
+ }
47
+
48
+ type event_type = :"message.echo"
49
+
50
+ module EventType
51
+ extend Telnyx::Internal::Type::Enum
52
+
53
+ MESSAGE_ECHO: :"message.echo"
54
+
55
+ def self?.values: -> ::Array[Telnyx::Models::WhatsappMessageEcho::Data::event_type]
56
+ end
57
+
58
+ type payload =
59
+ {
60
+ id: String,
61
+ body: Telnyx::WhatsappMessageEcho::Data::Payload::Body,
62
+ cost: Telnyx::WhatsappMessageEcho::Data::Payload::Cost,
63
+ direction: Telnyx::Models::WhatsappMessageEcho::Data::Payload::direction,
64
+ errors: ::Array[Telnyx::MessagingError0b38e7044b],
65
+ from: Telnyx::WhatsappMessageEcho::Data::Payload::From,
66
+ messaging_profile_id: String,
67
+ organization_id: String,
68
+ origin: Telnyx::Models::WhatsappMessageEcho::Data::Payload::origin,
69
+ record_type: Telnyx::Models::WhatsappMessageEcho::Data::Payload::record_type,
70
+ to: String,
71
+ type: Telnyx::Models::WhatsappMessageEcho::Data::Payload::type_,
72
+ received_at: Time,
73
+ tags: ::Array[String],
74
+ webhook_failover_url: String?,
75
+ webhook_url: String?
76
+ }
77
+
78
+ class Payload < Telnyx::Internal::Type::BaseModel
79
+ attr_accessor id: String
80
+
81
+ attr_accessor body: Telnyx::WhatsappMessageEcho::Data::Payload::Body
82
+
83
+ attr_accessor cost: Telnyx::WhatsappMessageEcho::Data::Payload::Cost
84
+
85
+ attr_accessor direction: Telnyx::Models::WhatsappMessageEcho::Data::Payload::direction
86
+
87
+ attr_accessor errors: ::Array[Telnyx::MessagingError0b38e7044b]
88
+
89
+ attr_accessor from: Telnyx::WhatsappMessageEcho::Data::Payload::From
90
+
91
+ attr_accessor messaging_profile_id: String
92
+
93
+ attr_accessor organization_id: String
94
+
95
+ attr_accessor origin: Telnyx::Models::WhatsappMessageEcho::Data::Payload::origin
96
+
97
+ attr_accessor record_type: Telnyx::Models::WhatsappMessageEcho::Data::Payload::record_type
98
+
99
+ attr_accessor to: String
100
+
101
+ attr_accessor type: Telnyx::Models::WhatsappMessageEcho::Data::Payload::type_
102
+
103
+ attr_reader received_at: Time?
104
+
105
+ def received_at=: (Time) -> Time
106
+
107
+ attr_reader tags: ::Array[String]?
108
+
109
+ def tags=: (::Array[String]) -> ::Array[String]
110
+
111
+ attr_accessor webhook_failover_url: String?
112
+
113
+ attr_accessor webhook_url: String?
114
+
115
+ def initialize: (
116
+ id: String,
117
+ body: Telnyx::WhatsappMessageEcho::Data::Payload::Body,
118
+ cost: Telnyx::WhatsappMessageEcho::Data::Payload::Cost,
119
+ direction: Telnyx::Models::WhatsappMessageEcho::Data::Payload::direction,
120
+ errors: ::Array[Telnyx::MessagingError0b38e7044b],
121
+ from: Telnyx::WhatsappMessageEcho::Data::Payload::From,
122
+ messaging_profile_id: String,
123
+ organization_id: String,
124
+ origin: Telnyx::Models::WhatsappMessageEcho::Data::Payload::origin,
125
+ record_type: Telnyx::Models::WhatsappMessageEcho::Data::Payload::record_type,
126
+ to: String,
127
+ type: Telnyx::Models::WhatsappMessageEcho::Data::Payload::type_,
128
+ ?received_at: Time,
129
+ ?tags: ::Array[String],
130
+ ?webhook_failover_url: String?,
131
+ ?webhook_url: String?
132
+ ) -> void
133
+
134
+ def to_hash: -> {
135
+ id: String,
136
+ body: Telnyx::WhatsappMessageEcho::Data::Payload::Body,
137
+ cost: Telnyx::WhatsappMessageEcho::Data::Payload::Cost,
138
+ direction: Telnyx::Models::WhatsappMessageEcho::Data::Payload::direction,
139
+ errors: ::Array[Telnyx::MessagingError0b38e7044b],
140
+ from: Telnyx::WhatsappMessageEcho::Data::Payload::From,
141
+ messaging_profile_id: String,
142
+ organization_id: String,
143
+ origin: Telnyx::Models::WhatsappMessageEcho::Data::Payload::origin,
144
+ record_type: Telnyx::Models::WhatsappMessageEcho::Data::Payload::record_type,
145
+ to: String,
146
+ type: Telnyx::Models::WhatsappMessageEcho::Data::Payload::type_,
147
+ received_at: Time,
148
+ tags: ::Array[String],
149
+ webhook_failover_url: String?,
150
+ webhook_url: String?
151
+ }
152
+
153
+ type body =
154
+ {
155
+ id: String,
156
+ foreign_id: String,
157
+ timestamp: String,
158
+ type: String,
159
+ from: String,
160
+ from_user_id: String
161
+ }
162
+
163
+ class Body < Telnyx::Internal::Type::BaseModel
164
+ attr_accessor id: String
165
+
166
+ attr_accessor foreign_id: String
167
+
168
+ attr_accessor timestamp: String
169
+
170
+ attr_accessor type: String
171
+
172
+ attr_reader from: String?
173
+
174
+ def from=: (String) -> String
175
+
176
+ attr_reader from_user_id: String?
177
+
178
+ def from_user_id=: (String) -> String
179
+
180
+ def initialize: (
181
+ id: String,
182
+ foreign_id: String,
183
+ timestamp: String,
184
+ type: String,
185
+ ?from: String,
186
+ ?from_user_id: String
187
+ ) -> void
188
+
189
+ def to_hash: -> {
190
+ id: String,
191
+ foreign_id: String,
192
+ timestamp: String,
193
+ type: String,
194
+ from: String,
195
+ from_user_id: String
196
+ }
197
+ end
198
+
199
+ type cost = { amount: String?, currency: String? }
200
+
201
+ class Cost < Telnyx::Internal::Type::BaseModel
202
+ attr_accessor amount: String?
203
+
204
+ attr_accessor currency: String?
205
+
206
+ def initialize: (?amount: String?, ?currency: String?) -> void
207
+
208
+ def to_hash: -> { amount: String?, currency: String? }
209
+ end
210
+
211
+ type direction = :outbound
212
+
213
+ module Direction
214
+ extend Telnyx::Internal::Type::Enum
215
+
216
+ OUTBOUND: :outbound
217
+
218
+ def self?.values: -> ::Array[Telnyx::Models::WhatsappMessageEcho::Data::Payload::direction]
219
+ end
220
+
221
+ type from =
222
+ { phone_number: String, carrier: String, line_type: String }
223
+
224
+ class From < Telnyx::Internal::Type::BaseModel
225
+ attr_accessor phone_number: String
226
+
227
+ attr_reader carrier: String?
228
+
229
+ def carrier=: (String) -> String
230
+
231
+ attr_reader line_type: String?
232
+
233
+ def line_type=: (String) -> String
234
+
235
+ def initialize: (
236
+ phone_number: String,
237
+ ?carrier: String,
238
+ ?line_type: String
239
+ ) -> void
240
+
241
+ def to_hash: -> {
242
+ phone_number: String,
243
+ carrier: String,
244
+ line_type: String
245
+ }
246
+ end
247
+
248
+ type origin = :whatsapp_business_app
249
+
250
+ module Origin
251
+ extend Telnyx::Internal::Type::Enum
252
+
253
+ WHATSAPP_BUSINESS_APP: :whatsapp_business_app
254
+
255
+ def self?.values: -> ::Array[Telnyx::Models::WhatsappMessageEcho::Data::Payload::origin]
256
+ end
257
+
258
+ type record_type = :message
259
+
260
+ module RecordType
261
+ extend Telnyx::Internal::Type::Enum
262
+
263
+ MESSAGE: :message
264
+
265
+ def self?.values: -> ::Array[Telnyx::Models::WhatsappMessageEcho::Data::Payload::record_type]
266
+ end
267
+
268
+ type type_ = :WHATSAPP
269
+
270
+ module Type
271
+ extend Telnyx::Internal::Type::Enum
272
+
273
+ WHATSAPP: :WHATSAPP
274
+
275
+ def self?.values: -> ::Array[Telnyx::Models::WhatsappMessageEcho::Data::Payload::type_]
276
+ end
277
+ end
278
+
279
+ type record_type = :event
280
+
281
+ module RecordType
282
+ extend Telnyx::Internal::Type::Enum
283
+
284
+ EVENT: :event
285
+
286
+ def self?.values: -> ::Array[Telnyx::Models::WhatsappMessageEcho::Data::record_type]
287
+ end
288
+ end
289
+ end
290
+ end
291
+ end
@@ -0,0 +1,36 @@
1
+ module Telnyx
2
+ module Models
3
+ module X402
4
+ module CreditAccount
5
+ type payment_list_params =
6
+ { page_number: Integer, page_size: Integer }
7
+ & Telnyx::Internal::Type::request_parameters
8
+
9
+ class PaymentListParams < Telnyx::Internal::Type::BaseModel
10
+ extend Telnyx::Internal::Type::RequestParameters::Converter
11
+ include Telnyx::Internal::Type::RequestParameters
12
+
13
+ attr_reader page_number: Integer?
14
+
15
+ def page_number=: (Integer) -> Integer
16
+
17
+ attr_reader page_size: Integer?
18
+
19
+ def page_size=: (Integer) -> Integer
20
+
21
+ def initialize: (
22
+ ?page_number: Integer,
23
+ ?page_size: Integer,
24
+ ?request_options: Telnyx::request_opts
25
+ ) -> void
26
+
27
+ def to_hash: -> {
28
+ page_number: Integer,
29
+ page_size: Integer,
30
+ request_options: Telnyx::RequestOptions
31
+ }
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,27 @@
1
+ module Telnyx
2
+ module Models
3
+ module X402
4
+ module CreditAccount
5
+ type payment_retrieve_params =
6
+ { id: String } & Telnyx::Internal::Type::request_parameters
7
+
8
+ class PaymentRetrieveParams < Telnyx::Internal::Type::BaseModel
9
+ extend Telnyx::Internal::Type::RequestParameters::Converter
10
+ include Telnyx::Internal::Type::RequestParameters
11
+
12
+ attr_accessor id: String
13
+
14
+ def initialize: (
15
+ id: String,
16
+ ?request_options: Telnyx::request_opts
17
+ ) -> void
18
+
19
+ def to_hash: -> {
20
+ id: String,
21
+ request_options: Telnyx::RequestOptions
22
+ }
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,26 @@
1
+ module Telnyx
2
+ module Models
3
+ module X402
4
+ module CreditAccount
5
+ type payment_retrieve_response =
6
+ { data: Telnyx::X402::CreditAccount::X402TransactionRecord }
7
+
8
+ class PaymentRetrieveResponse < Telnyx::Internal::Type::BaseModel
9
+ attr_reader data: Telnyx::X402::CreditAccount::X402TransactionRecord?
10
+
11
+ def data=: (
12
+ Telnyx::X402::CreditAccount::X402TransactionRecord
13
+ ) -> Telnyx::X402::CreditAccount::X402TransactionRecord
14
+
15
+ def initialize: (
16
+ ?data: Telnyx::X402::CreditAccount::X402TransactionRecord
17
+ ) -> void
18
+
19
+ def to_hash: -> {
20
+ data: Telnyx::X402::CreditAccount::X402TransactionRecord
21
+ }
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end