telnyx 5.166.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 (205) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +19 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/client.rb +4 -0
  5. data/lib/telnyx/internal/default_flat_pagination.rb +7 -3
  6. data/lib/telnyx/internal/default_flat_pagination_for_inexplicit_number_orders.rb +7 -3
  7. data/lib/telnyx/internal/default_flat_pagination_top_level_array.rb +10 -8
  8. data/lib/telnyx/internal/default_pagination_for_log_messages.rb +7 -3
  9. data/lib/telnyx/internal/default_pagination_for_messaging_tollfree.rb +12 -3
  10. data/lib/telnyx/internal/default_pagination_for_queues.rb +12 -3
  11. data/lib/telnyx/internal/per_page_pagination.rb +8 -1
  12. data/lib/telnyx/internal/per_page_pagination_v2.rb +8 -1
  13. data/lib/telnyx/internal/type/converter.rb +2 -0
  14. data/lib/telnyx/models/ai/anthropic/v1_messages_params.rb +57 -1
  15. data/lib/telnyx/models/ai/assistant_a2_a_agent.rb +195 -0
  16. data/lib/telnyx/models/ai/assistant_create_params.rb +16 -1
  17. data/lib/telnyx/models/ai/assistant_update_params.rb +17 -1
  18. data/lib/telnyx/models/ai/assistants/update_assistant.rb +17 -1
  19. data/lib/telnyx/models/ai/chat_completion_request.rb +185 -48
  20. data/lib/telnyx/models/ai/inference_embedding.rb +16 -1
  21. data/lib/telnyx/models/ai/openai_create_response_params.rb +57 -1
  22. data/lib/telnyx/models/ai/telephony_settings.rb +15 -1
  23. data/lib/telnyx/models/compute/func_retrieve_logs_params.rb +66 -0
  24. data/lib/telnyx/models/compute/func_retrieve_logs_response.rb +161 -0
  25. data/lib/telnyx/models/compute/func_retrieve_metric_aggregates_params.rb +69 -0
  26. data/lib/telnyx/models/compute/func_retrieve_metric_aggregates_response.rb +137 -0
  27. data/lib/telnyx/models/compute/func_retrieve_revisions_params.rb +34 -0
  28. data/lib/telnyx/models/compute/func_retrieve_revisions_response.rb +101 -0
  29. data/lib/telnyx/models/compute/func_retrieve_ship_inspection_params.rb +22 -0
  30. data/lib/telnyx/models/compute/func_retrieve_ship_inspection_response.rb +94 -0
  31. data/lib/telnyx/models/compute/functions_observability_pagination_meta.rb +35 -0
  32. data/lib/telnyx/models/compute/logs_meta.rb +23 -0
  33. data/lib/telnyx/models/credential_connection.rb +4 -1
  34. data/lib/telnyx/models/email_inboxes/email_message.rb +12 -1
  35. data/lib/telnyx/models/email_message_batch_params.rb +4 -1
  36. data/lib/telnyx/models/email_message_batch_response.rb +1 -0
  37. data/lib/telnyx/models/fqdn_connection.rb +5 -2
  38. data/lib/telnyx/models/fqdn_connections/fqdn_authentication.rb +9 -2
  39. data/lib/telnyx/models/messaging_inbound_message_payload.rb +210 -67
  40. data/lib/telnyx/models/messaging_messaging_profile.rb +284 -0
  41. data/lib/telnyx/models/messaging_profile.rb +0 -1
  42. data/lib/telnyx/models/messaging_profile_create_params.rb +11 -1
  43. data/lib/telnyx/models/messaging_profile_create_response.rb +3 -3
  44. data/lib/telnyx/models/messaging_profile_delete_response.rb +3 -3
  45. data/lib/telnyx/models/messaging_profile_features.rb +26 -0
  46. data/lib/telnyx/models/messaging_profile_retrieve_response.rb +3 -3
  47. data/lib/telnyx/models/messaging_profile_update_params.rb +32 -1
  48. data/lib/telnyx/models/messaging_profile_update_response.rb +3 -3
  49. data/lib/telnyx/models/messaging_profiles/action_regenerate_secret_response.rb +3 -3
  50. data/lib/telnyx/models/uac_connection.rb +4 -1
  51. data/lib/telnyx/models/uac_external_settings.rb +6 -2
  52. data/lib/telnyx/models/unsafe_unwrap_webhook_event.rb +5 -1
  53. data/lib/telnyx/models/unwrap_webhook_event.rb +5 -1
  54. data/lib/telnyx/models/whatsapp/business_accounts/phone_number_list_response.rb +104 -1
  55. data/lib/telnyx/models/whatsapp/phone_number_get_response.rb +103 -1
  56. data/lib/telnyx/models/whatsapp/phone_number_list_response.rb +103 -1
  57. data/lib/telnyx/models/whatsapp/phone_number_retrieve_phone_number_params.rb +22 -0
  58. data/lib/telnyx/models/whatsapp/phone_number_retrieve_phone_number_response.rb +207 -0
  59. data/lib/telnyx/models/whatsapp_account_update.rb +112 -0
  60. data/lib/telnyx/models/whatsapp_message_echo.rb +340 -0
  61. data/lib/telnyx/models/x402/credit_account/payment_list_params.rb +34 -0
  62. data/lib/telnyx/models/x402/credit_account/payment_retrieve_params.rb +24 -0
  63. data/lib/telnyx/models/x402/credit_account/payment_retrieve_response.rb +21 -0
  64. data/lib/telnyx/models/x402/credit_account/x402_transaction_record.rb +113 -0
  65. data/lib/telnyx/models.rb +10 -0
  66. data/lib/telnyx/resources/ai/anthropic/v1.rb +5 -1
  67. data/lib/telnyx/resources/ai/assistants/versions.rb +3 -1
  68. data/lib/telnyx/resources/ai/assistants.rb +6 -2
  69. data/lib/telnyx/resources/ai/openai/chat.rb +6 -8
  70. data/lib/telnyx/resources/ai/openai.rb +5 -1
  71. data/lib/telnyx/resources/compute/funcs.rb +141 -0
  72. data/lib/telnyx/resources/compute.rb +18 -0
  73. data/lib/telnyx/resources/email_messages.rb +4 -2
  74. data/lib/telnyx/resources/messaging_profiles.rb +12 -4
  75. data/lib/telnyx/resources/webhooks.rb +2 -2
  76. data/lib/telnyx/resources/whatsapp/phone_numbers.rb +22 -0
  77. data/lib/telnyx/resources/x402/credit_account/payments.rb +71 -0
  78. data/lib/telnyx/resources/x402/credit_account.rb +8 -2
  79. data/lib/telnyx/version.rb +1 -1
  80. data/lib/telnyx.rb +24 -0
  81. data/rbi/telnyx/client.rbi +3 -0
  82. data/rbi/telnyx/models/ai/anthropic/v1_messages_params.rbi +139 -0
  83. data/rbi/telnyx/models/ai/assistant_a2_a_agent.rbi +345 -0
  84. data/rbi/telnyx/models/ai/assistant_create_params.rbi +29 -0
  85. data/rbi/telnyx/models/ai/assistant_update_params.rbi +31 -0
  86. data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +31 -0
  87. data/rbi/telnyx/models/ai/chat_completion_request.rbi +339 -91
  88. data/rbi/telnyx/models/ai/inference_embedding.rbi +29 -0
  89. data/rbi/telnyx/models/ai/openai_create_response_params.rbi +136 -0
  90. data/rbi/telnyx/models/ai/telephony_settings.rbi +23 -0
  91. data/rbi/telnyx/models/compute/func_retrieve_logs_params.rbi +130 -0
  92. data/rbi/telnyx/models/compute/func_retrieve_logs_response.rbi +410 -0
  93. data/rbi/telnyx/models/compute/func_retrieve_metric_aggregates_params.rbi +102 -0
  94. data/rbi/telnyx/models/compute/func_retrieve_metric_aggregates_response.rbi +231 -0
  95. data/rbi/telnyx/models/compute/func_retrieve_revisions_params.rbi +59 -0
  96. data/rbi/telnyx/models/compute/func_retrieve_revisions_response.rbi +213 -0
  97. data/rbi/telnyx/models/compute/func_retrieve_ship_inspection_params.rbi +40 -0
  98. data/rbi/telnyx/models/compute/func_retrieve_ship_inspection_response.rbi +252 -0
  99. data/rbi/telnyx/models/compute/functions_observability_pagination_meta.rbi +70 -0
  100. data/rbi/telnyx/models/compute/logs_meta.rbi +38 -0
  101. data/rbi/telnyx/models/credential_connection.rbi +8 -2
  102. data/rbi/telnyx/models/email_inboxes/email_message.rbi +22 -3
  103. data/rbi/telnyx/models/email_message_batch_params.rbi +6 -0
  104. data/rbi/telnyx/models/email_message_batch_response.rbi +5 -0
  105. data/rbi/telnyx/models/fqdn_connection.rbi +8 -2
  106. data/rbi/telnyx/models/fqdn_connections/fqdn_authentication.rbi +8 -2
  107. data/rbi/telnyx/models/messaging_inbound_message_payload.rbi +450 -193
  108. data/rbi/telnyx/models/messaging_messaging_profile.rbi +463 -0
  109. data/rbi/telnyx/models/messaging_profile.rbi +4 -6
  110. data/rbi/telnyx/models/messaging_profile_create_params.rbi +19 -0
  111. data/rbi/telnyx/models/messaging_profile_create_response.rbi +6 -4
  112. data/rbi/telnyx/models/messaging_profile_delete_response.rbi +6 -4
  113. data/rbi/telnyx/models/messaging_profile_features.rbi +43 -0
  114. data/rbi/telnyx/models/messaging_profile_retrieve_response.rbi +6 -4
  115. data/rbi/telnyx/models/messaging_profile_update_params.rbi +51 -0
  116. data/rbi/telnyx/models/messaging_profile_update_response.rbi +6 -4
  117. data/rbi/telnyx/models/messaging_profiles/action_regenerate_secret_response.rbi +4 -4
  118. data/rbi/telnyx/models/uac_connection.rbi +8 -2
  119. data/rbi/telnyx/models/uac_external_settings.rbi +10 -2
  120. data/rbi/telnyx/models/unsafe_unwrap_webhook_event.rbi +3 -1
  121. data/rbi/telnyx/models/unwrap_webhook_event.rbi +3 -1
  122. data/rbi/telnyx/models/whatsapp/business_accounts/phone_number_list_response.rbi +213 -0
  123. data/rbi/telnyx/models/whatsapp/phone_number_get_response.rbi +213 -0
  124. data/rbi/telnyx/models/whatsapp/phone_number_list_response.rbi +213 -0
  125. data/rbi/telnyx/models/whatsapp/phone_number_retrieve_phone_number_params.rbi +40 -0
  126. data/rbi/telnyx/models/whatsapp/phone_number_retrieve_phone_number_response.rbi +401 -0
  127. data/rbi/telnyx/models/whatsapp_account_update.rbi +236 -0
  128. data/rbi/telnyx/models/whatsapp_message_echo.rbi +611 -0
  129. data/rbi/telnyx/models/x402/credit_account/payment_list_params.rbi +64 -0
  130. data/rbi/telnyx/models/x402/credit_account/payment_retrieve_params.rbi +42 -0
  131. data/rbi/telnyx/models/x402/credit_account/payment_retrieve_response.rbi +53 -0
  132. data/rbi/telnyx/models/x402/credit_account/x402_transaction_record.rbi +219 -0
  133. data/rbi/telnyx/models.rbi +10 -0
  134. data/rbi/telnyx/resources/ai/anthropic/v1.rbi +14 -0
  135. data/rbi/telnyx/resources/ai/assistants/versions.rbi +12 -0
  136. data/rbi/telnyx/resources/ai/assistants.rbi +21 -0
  137. data/rbi/telnyx/resources/ai/openai/chat.rbi +23 -13
  138. data/rbi/telnyx/resources/ai/openai.rbi +14 -0
  139. data/rbi/telnyx/resources/compute/funcs.rbi +111 -0
  140. data/rbi/telnyx/resources/compute.rbi +15 -0
  141. data/rbi/telnyx/resources/email_messages.rbi +6 -2
  142. data/rbi/telnyx/resources/messaging_profiles.rbi +24 -1
  143. data/rbi/telnyx/resources/webhooks.rbi +6 -2
  144. data/rbi/telnyx/resources/whatsapp/phone_numbers.rbi +18 -0
  145. data/rbi/telnyx/resources/x402/credit_account/payments.rbi +60 -0
  146. data/rbi/telnyx/resources/x402/credit_account.rbi +5 -0
  147. data/sig/telnyx/client.rbs +2 -0
  148. data/sig/telnyx/models/ai/anthropic/v1_messages_params.rbs +42 -0
  149. data/sig/telnyx/models/ai/assistant_a2_a_agent.rbs +140 -0
  150. data/sig/telnyx/models/ai/assistant_create_params.rbs +9 -0
  151. data/sig/telnyx/models/ai/assistant_update_params.rbs +9 -0
  152. data/sig/telnyx/models/ai/assistants/update_assistant.rbs +9 -0
  153. data/sig/telnyx/models/ai/chat_completion_request.rbs +128 -44
  154. data/sig/telnyx/models/ai/inference_embedding.rbs +9 -0
  155. data/sig/telnyx/models/ai/openai_create_response_params.rbs +42 -0
  156. data/sig/telnyx/models/ai/telephony_settings.rbs +7 -0
  157. data/sig/telnyx/models/compute/func_retrieve_logs_params.rbs +69 -0
  158. data/sig/telnyx/models/compute/func_retrieve_logs_response.rbs +210 -0
  159. data/sig/telnyx/models/compute/func_retrieve_metric_aggregates_params.rbs +66 -0
  160. data/sig/telnyx/models/compute/func_retrieve_metric_aggregates_response.rbs +149 -0
  161. data/sig/telnyx/models/compute/func_retrieve_revisions_params.rbs +38 -0
  162. data/sig/telnyx/models/compute/func_retrieve_revisions_response.rbs +131 -0
  163. data/sig/telnyx/models/compute/func_retrieve_ship_inspection_params.rbs +22 -0
  164. data/sig/telnyx/models/compute/func_retrieve_ship_inspection_response.rbs +117 -0
  165. data/sig/telnyx/models/compute/functions_observability_pagination_meta.rbs +45 -0
  166. data/sig/telnyx/models/compute/logs_meta.rbs +21 -0
  167. data/sig/telnyx/models/email_inboxes/email_message.rbs +12 -3
  168. data/sig/telnyx/models/email_message_batch_response.rbs +2 -0
  169. data/sig/telnyx/models/messaging_inbound_message_payload.rbs +207 -95
  170. data/sig/telnyx/models/messaging_messaging_profile.rbs +212 -0
  171. data/sig/telnyx/models/messaging_profile_create_params.rbs +5 -0
  172. data/sig/telnyx/models/messaging_profile_create_response.rbs +8 -5
  173. data/sig/telnyx/models/messaging_profile_delete_response.rbs +8 -5
  174. data/sig/telnyx/models/messaging_profile_features.rbs +15 -0
  175. data/sig/telnyx/models/messaging_profile_retrieve_response.rbs +7 -5
  176. data/sig/telnyx/models/messaging_profile_update_params.rbs +19 -0
  177. data/sig/telnyx/models/messaging_profile_update_response.rbs +8 -5
  178. data/sig/telnyx/models/messaging_profiles/action_regenerate_secret_response.rbs +7 -5
  179. data/sig/telnyx/models/unsafe_unwrap_webhook_event.rbs +2 -0
  180. data/sig/telnyx/models/unwrap_webhook_event.rbs +2 -0
  181. data/sig/telnyx/models/whatsapp/business_accounts/phone_number_list_response.rbs +90 -0
  182. data/sig/telnyx/models/whatsapp/phone_number_get_response.rbs +90 -0
  183. data/sig/telnyx/models/whatsapp/phone_number_list_response.rbs +90 -0
  184. data/sig/telnyx/models/whatsapp/phone_number_retrieve_phone_number_params.rbs +25 -0
  185. data/sig/telnyx/models/whatsapp/phone_number_retrieve_phone_number_response.rbs +201 -0
  186. data/sig/telnyx/models/whatsapp_account_update.rbs +107 -0
  187. data/sig/telnyx/models/whatsapp_message_echo.rbs +291 -0
  188. data/sig/telnyx/models/x402/credit_account/payment_list_params.rbs +36 -0
  189. data/sig/telnyx/models/x402/credit_account/payment_retrieve_params.rbs +27 -0
  190. data/sig/telnyx/models/x402/credit_account/payment_retrieve_response.rbs +26 -0
  191. data/sig/telnyx/models/x402/credit_account/x402_transaction_record.rbs +104 -0
  192. data/sig/telnyx/models.rbs +10 -0
  193. data/sig/telnyx/resources/ai/anthropic/v1.rbs +2 -0
  194. data/sig/telnyx/resources/ai/assistants/versions.rbs +1 -0
  195. data/sig/telnyx/resources/ai/assistants.rbs +2 -0
  196. data/sig/telnyx/resources/ai/openai/chat.rbs +3 -4
  197. data/sig/telnyx/resources/ai/openai.rbs +2 -0
  198. data/sig/telnyx/resources/compute/funcs.rbs +41 -0
  199. data/sig/telnyx/resources/compute.rbs +9 -0
  200. data/sig/telnyx/resources/messaging_profiles.rbs +5 -1
  201. data/sig/telnyx/resources/webhooks.rbs +6 -2
  202. data/sig/telnyx/resources/whatsapp/phone_numbers.rbs +5 -0
  203. data/sig/telnyx/resources/x402/credit_account/payments.rbs +22 -0
  204. data/sig/telnyx/resources/x402/credit_account.rbs +2 -0
  205. metadata +74 -2
@@ -0,0 +1,117 @@
1
+ module Telnyx
2
+ module Models
3
+ module Compute
4
+ type func_retrieve_ship_inspection_response =
5
+ {
6
+ data: Telnyx::Models::Compute::FuncRetrieveShipInspectionResponse::Data
7
+ }
8
+
9
+ class FuncRetrieveShipInspectionResponse < Telnyx::Internal::Type::BaseModel
10
+ attr_reader data: Telnyx::Models::Compute::FuncRetrieveShipInspectionResponse::Data?
11
+
12
+ def data=: (
13
+ Telnyx::Models::Compute::FuncRetrieveShipInspectionResponse::Data
14
+ ) -> Telnyx::Models::Compute::FuncRetrieveShipInspectionResponse::Data
15
+
16
+ def initialize: (
17
+ ?data: Telnyx::Models::Compute::FuncRetrieveShipInspectionResponse::Data
18
+ ) -> void
19
+
20
+ def to_hash: -> {
21
+ data: Telnyx::Models::Compute::FuncRetrieveShipInspectionResponse::Data
22
+ }
23
+
24
+ type data =
25
+ {
26
+ created_at: Time,
27
+ reason: String,
28
+ record_type: Telnyx::Models::Compute::FuncRetrieveShipInspectionResponse::Data::record_type,
29
+ runtime: String,
30
+ snippet: String,
31
+ stage: Telnyx::Models::Compute::FuncRetrieveShipInspectionResponse::Data::stage
32
+ }
33
+
34
+ class Data < Telnyx::Internal::Type::BaseModel
35
+ attr_reader created_at: Time?
36
+
37
+ def created_at=: (Time) -> Time
38
+
39
+ attr_reader reason: String?
40
+
41
+ def reason=: (String) -> String
42
+
43
+ attr_reader record_type: Telnyx::Models::Compute::FuncRetrieveShipInspectionResponse::Data::record_type?
44
+
45
+ def record_type=: (
46
+ Telnyx::Models::Compute::FuncRetrieveShipInspectionResponse::Data::record_type
47
+ ) -> Telnyx::Models::Compute::FuncRetrieveShipInspectionResponse::Data::record_type
48
+
49
+ attr_reader runtime: String?
50
+
51
+ def runtime=: (String) -> String
52
+
53
+ attr_reader snippet: String?
54
+
55
+ def snippet=: (String) -> String
56
+
57
+ attr_reader stage: Telnyx::Models::Compute::FuncRetrieveShipInspectionResponse::Data::stage?
58
+
59
+ def stage=: (
60
+ Telnyx::Models::Compute::FuncRetrieveShipInspectionResponse::Data::stage
61
+ ) -> Telnyx::Models::Compute::FuncRetrieveShipInspectionResponse::Data::stage
62
+
63
+ def initialize: (
64
+ ?created_at: Time,
65
+ ?reason: String,
66
+ ?record_type: Telnyx::Models::Compute::FuncRetrieveShipInspectionResponse::Data::record_type,
67
+ ?runtime: String,
68
+ ?snippet: String,
69
+ ?stage: Telnyx::Models::Compute::FuncRetrieveShipInspectionResponse::Data::stage
70
+ ) -> void
71
+
72
+ def to_hash: -> {
73
+ created_at: Time,
74
+ reason: String,
75
+ record_type: Telnyx::Models::Compute::FuncRetrieveShipInspectionResponse::Data::record_type,
76
+ runtime: String,
77
+ snippet: String,
78
+ stage: Telnyx::Models::Compute::FuncRetrieveShipInspectionResponse::Data::stage
79
+ }
80
+
81
+ type record_type = :build_log_inspection
82
+
83
+ module RecordType
84
+ extend Telnyx::Internal::Type::Enum
85
+
86
+ BUILD_LOG_INSPECTION: :build_log_inspection
87
+
88
+ def self?.values: -> ::Array[Telnyx::Models::Compute::FuncRetrieveShipInspectionResponse::Data::record_type]
89
+ end
90
+
91
+ type stage =
92
+ :build
93
+ | :platform
94
+ | :pre_build
95
+ | :deploy
96
+ | :security_review
97
+ | :none
98
+ | :pending
99
+
100
+ module Stage
101
+ extend Telnyx::Internal::Type::Enum
102
+
103
+ BUILD: :build
104
+ PLATFORM: :platform
105
+ PRE_BUILD: :pre_build
106
+ DEPLOY: :deploy
107
+ SECURITY_REVIEW: :security_review
108
+ NONE: :none
109
+ PENDING: :pending
110
+
111
+ def self?.values: -> ::Array[Telnyx::Models::Compute::FuncRetrieveShipInspectionResponse::Data::stage]
112
+ end
113
+ end
114
+ end
115
+ end
116
+ end
117
+ end
@@ -0,0 +1,45 @@
1
+ module Telnyx
2
+ module Models
3
+ module Compute
4
+ type functions_observability_pagination_meta =
5
+ {
6
+ page_number: Integer,
7
+ page_size: Integer,
8
+ total_pages: Integer,
9
+ total_results: Integer
10
+ }
11
+
12
+ class FunctionsObservabilityPaginationMeta < Telnyx::Internal::Type::BaseModel
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
+ attr_reader total_pages: Integer?
22
+
23
+ def total_pages=: (Integer) -> Integer
24
+
25
+ attr_reader total_results: Integer?
26
+
27
+ def total_results=: (Integer) -> Integer
28
+
29
+ def initialize: (
30
+ ?page_number: Integer,
31
+ ?page_size: Integer,
32
+ ?total_pages: Integer,
33
+ ?total_results: Integer
34
+ ) -> void
35
+
36
+ def to_hash: -> {
37
+ page_number: Integer,
38
+ page_size: Integer,
39
+ total_pages: Integer,
40
+ total_results: Integer
41
+ }
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,21 @@
1
+ module Telnyx
2
+ module Models
3
+ module Compute
4
+ type logs_meta = { has_more: bool, partial: bool }
5
+
6
+ class LogsMeta < Telnyx::Internal::Type::BaseModel
7
+ attr_reader has_more: bool?
8
+
9
+ def has_more=: (bool) -> bool
10
+
11
+ attr_reader partial: bool?
12
+
13
+ def partial=: (bool) -> bool
14
+
15
+ def initialize: (?has_more: bool, ?partial: bool) -> void
16
+
17
+ def to_hash: -> { has_more: bool, partial: bool }
18
+ end
19
+ end
20
+ end
21
+ end
@@ -20,7 +20,8 @@ module Telnyx
20
20
  inline_css: bool,
21
21
  recipient_statuses: ::Hash[Symbol, Integer],
22
22
  sandbox: bool,
23
- scheduled_at: Time
23
+ scheduled_at: Time,
24
+ suppressed: ::Array[Telnyx::SuppressedRecipient]
24
25
  }
25
26
 
26
27
  class EmailMessage < Telnyx::Internal::Type::BaseModel
@@ -70,6 +71,12 @@ module Telnyx
70
71
 
71
72
  def scheduled_at=: (Time) -> Time
72
73
 
74
+ attr_reader suppressed: ::Array[Telnyx::SuppressedRecipient]?
75
+
76
+ def suppressed=: (
77
+ ::Array[Telnyx::SuppressedRecipient]
78
+ ) -> ::Array[Telnyx::SuppressedRecipient]
79
+
73
80
  def initialize: (
74
81
  id: String,
75
82
  attachments: ::Array[Telnyx::EmailInboxes::EmailMessage::Attachment],
@@ -88,7 +95,8 @@ module Telnyx
88
95
  ?inline_css: bool,
89
96
  ?recipient_statuses: ::Hash[Symbol, Integer],
90
97
  ?sandbox: bool,
91
- ?scheduled_at: Time
98
+ ?scheduled_at: Time,
99
+ ?suppressed: ::Array[Telnyx::SuppressedRecipient]
92
100
  ) -> void
93
101
 
94
102
  def to_hash: -> {
@@ -109,7 +117,8 @@ module Telnyx
109
117
  inline_css: bool,
110
118
  recipient_statuses: ::Hash[Symbol, Integer],
111
119
  sandbox: bool,
112
- scheduled_at: Time
120
+ scheduled_at: Time,
121
+ suppressed: ::Array[Telnyx::SuppressedRecipient]
113
122
  }
114
123
 
115
124
  type attachment =
@@ -57,6 +57,7 @@ module Telnyx
57
57
  | :not_found
58
58
  | :forbidden
59
59
  | :service_unavailable
60
+ | :unprocessable_entity
60
61
  | :validation_error
61
62
  | :recipient_suppressed
62
63
  | :reputation_suspended
@@ -68,6 +69,7 @@ module Telnyx
68
69
  NOT_FOUND: :not_found
69
70
  FORBIDDEN: :forbidden
70
71
  SERVICE_UNAVAILABLE: :service_unavailable
72
+ UNPROCESSABLE_ENTITY: :unprocessable_entity
71
73
  VALIDATION_ERROR: :validation_error
72
74
  RECIPIENT_SUPPRESSED: :recipient_suppressed
73
75
  REPUTATION_SUSPENDED: :reputation_suspended
@@ -3,6 +3,7 @@ module Telnyx
3
3
  type messaging_inbound_message_payload =
4
4
  {
5
5
  id: String,
6
+ body: Telnyx::MessagingInboundMessagePayload::Body,
6
7
  cc: ::Array[Telnyx::MessagingInboundMessagePayload::Cc],
7
8
  completed_at: Time?,
8
9
  cost: Telnyx::MessagingInboundMessagePayload::Cost?,
@@ -25,7 +26,7 @@ module Telnyx
25
26
  tcr_campaign_id: String?,
26
27
  tcr_campaign_registered: String?,
27
28
  text: String,
28
- to: ::Array[Telnyx::MessagingInboundMessagePayload::To],
29
+ to: Telnyx::Models::MessagingInboundMessagePayload::to,
29
30
  type: Telnyx::Models::MessagingInboundMessagePayload::type_,
30
31
  valid_until: Time?,
31
32
  webhook_failover_url: String?,
@@ -37,6 +38,12 @@ module Telnyx
37
38
 
38
39
  def id=: (String) -> String
39
40
 
41
+ attr_reader body: Telnyx::MessagingInboundMessagePayload::Body?
42
+
43
+ def body=: (
44
+ Telnyx::MessagingInboundMessagePayload::Body
45
+ ) -> Telnyx::MessagingInboundMessagePayload::Body
46
+
40
47
  attr_reader cc: ::Array[Telnyx::MessagingInboundMessagePayload::Cc]?
41
48
 
42
49
  def cc=: (
@@ -123,11 +130,11 @@ module Telnyx
123
130
 
124
131
  def text=: (String) -> String
125
132
 
126
- attr_reader to: ::Array[Telnyx::MessagingInboundMessagePayload::To]?
133
+ attr_reader to: Telnyx::Models::MessagingInboundMessagePayload::to?
127
134
 
128
135
  def to=: (
129
- ::Array[Telnyx::MessagingInboundMessagePayload::To]
130
- ) -> ::Array[Telnyx::MessagingInboundMessagePayload::To]
136
+ Telnyx::Models::MessagingInboundMessagePayload::to
137
+ ) -> Telnyx::Models::MessagingInboundMessagePayload::to
131
138
 
132
139
  attr_reader type: Telnyx::Models::MessagingInboundMessagePayload::type_?
133
140
 
@@ -143,6 +150,7 @@ module Telnyx
143
150
 
144
151
  def initialize: (
145
152
  ?id: String,
153
+ ?body: Telnyx::MessagingInboundMessagePayload::Body,
146
154
  ?cc: ::Array[Telnyx::MessagingInboundMessagePayload::Cc],
147
155
  ?completed_at: Time?,
148
156
  ?cost: Telnyx::MessagingInboundMessagePayload::Cost?,
@@ -165,7 +173,7 @@ module Telnyx
165
173
  ?tcr_campaign_id: String?,
166
174
  ?tcr_campaign_registered: String?,
167
175
  ?text: String,
168
- ?to: ::Array[Telnyx::MessagingInboundMessagePayload::To],
176
+ ?to: Telnyx::Models::MessagingInboundMessagePayload::to,
169
177
  ?type: Telnyx::Models::MessagingInboundMessagePayload::type_,
170
178
  ?valid_until: Time?,
171
179
  ?webhook_failover_url: String?,
@@ -174,6 +182,7 @@ module Telnyx
174
182
 
175
183
  def to_hash: -> {
176
184
  id: String,
185
+ body: Telnyx::MessagingInboundMessagePayload::Body,
177
186
  cc: ::Array[Telnyx::MessagingInboundMessagePayload::Cc],
178
187
  completed_at: Time?,
179
188
  cost: Telnyx::MessagingInboundMessagePayload::Cost?,
@@ -196,13 +205,107 @@ module Telnyx
196
205
  tcr_campaign_id: String?,
197
206
  tcr_campaign_registered: String?,
198
207
  text: String,
199
- to: ::Array[Telnyx::MessagingInboundMessagePayload::To],
208
+ to: Telnyx::Models::MessagingInboundMessagePayload::to,
200
209
  type: Telnyx::Models::MessagingInboundMessagePayload::type_,
201
210
  valid_until: Time?,
202
211
  webhook_failover_url: String?,
203
212
  webhook_url: String?
204
213
  }
205
214
 
215
+ type body =
216
+ {
217
+ id: String,
218
+ edit: Telnyx::MessagingInboundMessagePayload::Body::Edit,
219
+ foreign_id: String,
220
+ from: String,
221
+ revoke: Telnyx::MessagingInboundMessagePayload::Body::Revoke,
222
+ timestamp: String,
223
+ type: String
224
+ }
225
+
226
+ class Body < Telnyx::Internal::Type::BaseModel
227
+ attr_reader id: String?
228
+
229
+ def id=: (String) -> String
230
+
231
+ attr_reader edit: Telnyx::MessagingInboundMessagePayload::Body::Edit?
232
+
233
+ def edit=: (
234
+ Telnyx::MessagingInboundMessagePayload::Body::Edit
235
+ ) -> Telnyx::MessagingInboundMessagePayload::Body::Edit
236
+
237
+ attr_reader foreign_id: String?
238
+
239
+ def foreign_id=: (String) -> String
240
+
241
+ attr_reader from: String?
242
+
243
+ def from=: (String) -> String
244
+
245
+ attr_reader revoke: Telnyx::MessagingInboundMessagePayload::Body::Revoke?
246
+
247
+ def revoke=: (
248
+ Telnyx::MessagingInboundMessagePayload::Body::Revoke
249
+ ) -> Telnyx::MessagingInboundMessagePayload::Body::Revoke
250
+
251
+ attr_reader timestamp: String?
252
+
253
+ def timestamp=: (String) -> String
254
+
255
+ attr_reader type: String?
256
+
257
+ def type=: (String) -> String
258
+
259
+ def initialize: (
260
+ ?id: String,
261
+ ?edit: Telnyx::MessagingInboundMessagePayload::Body::Edit,
262
+ ?foreign_id: String,
263
+ ?from: String,
264
+ ?revoke: Telnyx::MessagingInboundMessagePayload::Body::Revoke,
265
+ ?timestamp: String,
266
+ ?type: String
267
+ ) -> void
268
+
269
+ def to_hash: -> {
270
+ id: String,
271
+ edit: Telnyx::MessagingInboundMessagePayload::Body::Edit,
272
+ foreign_id: String,
273
+ from: String,
274
+ revoke: Telnyx::MessagingInboundMessagePayload::Body::Revoke,
275
+ timestamp: String,
276
+ type: String
277
+ }
278
+
279
+ type edit =
280
+ { message: ::Hash[Symbol, top], original_message_id: String }
281
+
282
+ class Edit < Telnyx::Internal::Type::BaseModel
283
+ attr_accessor message: ::Hash[Symbol, top]
284
+
285
+ attr_accessor original_message_id: String
286
+
287
+ def initialize: (
288
+ message: ::Hash[Symbol, top],
289
+ original_message_id: String
290
+ ) -> void
291
+
292
+ def to_hash: -> {
293
+ message: ::Hash[Symbol, top],
294
+ original_message_id: String
295
+ }
296
+ end
297
+
298
+ type revoke = { original_message_id: String }
299
+
300
+ class Revoke < Telnyx::Internal::Type::BaseModel
301
+ attr_accessor original_message_id: String
302
+
303
+ def initialize: (original_message_id: String) -> void
304
+
305
+ def to_hash: -> { original_message_id: String }
306
+ end
307
+ end
308
+
206
309
  type cc =
207
310
  {
208
311
  carrier: String,
@@ -286,20 +389,16 @@ module Telnyx
286
389
  end
287
390
  end
288
391
 
289
- type cost = { amount: String, currency: String }
392
+ type cost = { amount: String?, currency: String? }
290
393
 
291
394
  class Cost < Telnyx::Internal::Type::BaseModel
292
- attr_reader amount: String?
293
-
294
- def amount=: (String) -> String
295
-
296
- attr_reader currency: String?
395
+ attr_accessor amount: String?
297
396
 
298
- def currency=: (String) -> String
397
+ attr_accessor currency: String?
299
398
 
300
- def initialize: (?amount: String, ?currency: String) -> void
399
+ def initialize: (?amount: String?, ?currency: String?) -> void
301
400
 
302
- def to_hash: -> { amount: String, currency: String }
401
+ def to_hash: -> { amount: String?, currency: String? }
303
402
  end
304
403
 
305
404
  type cost_breakdown =
@@ -496,97 +595,110 @@ module Telnyx
496
595
  end
497
596
 
498
597
  type to =
499
- {
500
- carrier: String,
501
- line_type: Telnyx::Models::MessagingInboundMessagePayload::To::line_type,
502
- phone_number: String,
503
- status: Telnyx::Models::MessagingInboundMessagePayload::To::status
504
- }
505
-
506
- class To < Telnyx::Internal::Type::BaseModel
507
- attr_reader carrier: String?
508
-
509
- def carrier=: (String) -> String
510
-
511
- attr_reader line_type: Telnyx::Models::MessagingInboundMessagePayload::To::line_type?
512
-
513
- def line_type=: (
514
- Telnyx::Models::MessagingInboundMessagePayload::To::line_type
515
- ) -> Telnyx::Models::MessagingInboundMessagePayload::To::line_type
516
-
517
- attr_reader phone_number: String?
518
-
519
- def phone_number=: (String) -> String
520
-
521
- attr_reader status: Telnyx::Models::MessagingInboundMessagePayload::To::status?
522
-
523
- def status=: (
524
- Telnyx::Models::MessagingInboundMessagePayload::To::status
525
- ) -> Telnyx::Models::MessagingInboundMessagePayload::To::status
526
-
527
- def initialize: (
528
- ?carrier: String,
529
- ?line_type: Telnyx::Models::MessagingInboundMessagePayload::To::line_type,
530
- ?phone_number: String,
531
- ?status: Telnyx::Models::MessagingInboundMessagePayload::To::status
532
- ) -> void
533
-
534
- def to_hash: -> {
535
- carrier: String,
536
- line_type: Telnyx::Models::MessagingInboundMessagePayload::To::line_type,
537
- phone_number: String,
538
- status: Telnyx::Models::MessagingInboundMessagePayload::To::status
539
- }
540
-
541
- type line_type =
542
- :Wireline | :Wireless | :VoWiFi | :VoIP | :"Pre-Paid Wireless" | :""
543
-
544
- module LineType
545
- extend Telnyx::Internal::Type::Enum
546
-
547
- WIRELINE: :Wireline
548
- WIRELESS: :Wireless
549
- VO_WI_FI: :VoWiFi
550
- VO_IP: :VoIP
551
- PRE_PAID_WIRELESS: :"Pre-Paid Wireless"
552
- EMPTY: :""
553
-
554
- def self?.values: -> ::Array[Telnyx::Models::MessagingInboundMessagePayload::To::line_type]
598
+ ::Array[Telnyx::MessagingInboundMessagePayload::To::UnionMember0]
599
+ | String
600
+
601
+ module To
602
+ extend Telnyx::Internal::Type::Union
603
+
604
+ type union_member0 =
605
+ {
606
+ carrier: String,
607
+ line_type: Telnyx::Models::MessagingInboundMessagePayload::To::UnionMember0::line_type,
608
+ phone_number: String,
609
+ status: Telnyx::Models::MessagingInboundMessagePayload::To::UnionMember0::status
610
+ }
611
+
612
+ class UnionMember0 < Telnyx::Internal::Type::BaseModel
613
+ attr_reader carrier: String?
614
+
615
+ def carrier=: (String) -> String
616
+
617
+ attr_reader line_type: Telnyx::Models::MessagingInboundMessagePayload::To::UnionMember0::line_type?
618
+
619
+ def line_type=: (
620
+ Telnyx::Models::MessagingInboundMessagePayload::To::UnionMember0::line_type
621
+ ) -> Telnyx::Models::MessagingInboundMessagePayload::To::UnionMember0::line_type
622
+
623
+ attr_reader phone_number: String?
624
+
625
+ def phone_number=: (String) -> String
626
+
627
+ attr_reader status: Telnyx::Models::MessagingInboundMessagePayload::To::UnionMember0::status?
628
+
629
+ def status=: (
630
+ Telnyx::Models::MessagingInboundMessagePayload::To::UnionMember0::status
631
+ ) -> Telnyx::Models::MessagingInboundMessagePayload::To::UnionMember0::status
632
+
633
+ def initialize: (
634
+ ?carrier: String,
635
+ ?line_type: Telnyx::Models::MessagingInboundMessagePayload::To::UnionMember0::line_type,
636
+ ?phone_number: String,
637
+ ?status: Telnyx::Models::MessagingInboundMessagePayload::To::UnionMember0::status
638
+ ) -> void
639
+
640
+ def to_hash: -> {
641
+ carrier: String,
642
+ line_type: Telnyx::Models::MessagingInboundMessagePayload::To::UnionMember0::line_type,
643
+ phone_number: String,
644
+ status: Telnyx::Models::MessagingInboundMessagePayload::To::UnionMember0::status
645
+ }
646
+
647
+ type line_type =
648
+ :Wireline | :Wireless | :VoWiFi | :VoIP | :"Pre-Paid Wireless" | :""
649
+
650
+ module LineType
651
+ extend Telnyx::Internal::Type::Enum
652
+
653
+ WIRELINE: :Wireline
654
+ WIRELESS: :Wireless
655
+ VO_WI_FI: :VoWiFi
656
+ VO_IP: :VoIP
657
+ PRE_PAID_WIRELESS: :"Pre-Paid Wireless"
658
+ EMPTY: :""
659
+
660
+ def self?.values: -> ::Array[Telnyx::Models::MessagingInboundMessagePayload::To::UnionMember0::line_type]
661
+ end
662
+
663
+ type status =
664
+ :queued
665
+ | :sending
666
+ | :sent
667
+ | :delivered
668
+ | :sending_failed
669
+ | :delivery_failed
670
+ | :delivery_unconfirmed
671
+ | :webhook_delivered
672
+
673
+ module Status
674
+ extend Telnyx::Internal::Type::Enum
675
+
676
+ QUEUED: :queued
677
+ SENDING: :sending
678
+ SENT: :sent
679
+ DELIVERED: :delivered
680
+ SENDING_FAILED: :sending_failed
681
+ DELIVERY_FAILED: :delivery_failed
682
+ DELIVERY_UNCONFIRMED: :delivery_unconfirmed
683
+ WEBHOOK_DELIVERED: :webhook_delivered
684
+
685
+ def self?.values: -> ::Array[Telnyx::Models::MessagingInboundMessagePayload::To::UnionMember0::status]
686
+ end
555
687
  end
556
688
 
557
- type status =
558
- :queued
559
- | :sending
560
- | :sent
561
- | :delivered
562
- | :sending_failed
563
- | :delivery_failed
564
- | :delivery_unconfirmed
565
- | :webhook_delivered
689
+ def self?.variants: -> ::Array[Telnyx::Models::MessagingInboundMessagePayload::to]
566
690
 
567
- module Status
568
- extend Telnyx::Internal::Type::Enum
569
-
570
- QUEUED: :queued
571
- SENDING: :sending
572
- SENT: :sent
573
- DELIVERED: :delivered
574
- SENDING_FAILED: :sending_failed
575
- DELIVERY_FAILED: :delivery_failed
576
- DELIVERY_UNCONFIRMED: :delivery_unconfirmed
577
- WEBHOOK_DELIVERED: :webhook_delivered
578
-
579
- def self?.values: -> ::Array[Telnyx::Models::MessagingInboundMessagePayload::To::status]
580
- end
691
+ UnionMember0Array: Telnyx::Internal::Type::Converter
581
692
  end
582
693
 
583
- type type_ = :SMS | :MMS
694
+ type type_ = :SMS | :MMS | :WHATSAPP
584
695
 
585
696
  module Type
586
697
  extend Telnyx::Internal::Type::Enum
587
698
 
588
699
  SMS: :SMS
589
700
  MMS: :MMS
701
+ WHATSAPP: :WHATSAPP
590
702
 
591
703
  def self?.values: -> ::Array[Telnyx::Models::MessagingInboundMessagePayload::type_]
592
704
  end