telnyx 5.41.0 → 5.43.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 (57) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/models/calls/action_answer_params.rb +57 -1
  5. data/lib/telnyx/models/calls/action_bridge_params.rb +10 -1
  6. data/lib/telnyx/models/calls/action_hangup_params.rb +9 -1
  7. data/lib/telnyx/models/payment_create_stored_payment_transaction_params.rb +22 -0
  8. data/lib/telnyx/models/payment_create_stored_payment_transaction_response.rb +91 -0
  9. data/lib/telnyx/models/queue.rb +86 -0
  10. data/lib/telnyx/models/queue_create_params.rb +30 -0
  11. data/lib/telnyx/models/queue_create_response.rb +16 -0
  12. data/lib/telnyx/models/queue_delete_params.rb +14 -0
  13. data/lib/telnyx/models/queue_list_params.rb +30 -0
  14. data/lib/telnyx/models/queue_retrieve_response.rb +3 -84
  15. data/lib/telnyx/models/queue_update_params.rb +22 -0
  16. data/lib/telnyx/models/queue_update_response.rb +16 -0
  17. data/lib/telnyx/models.rb +12 -0
  18. data/lib/telnyx/resources/calls/actions.rb +13 -3
  19. data/lib/telnyx/resources/payment.rb +22 -0
  20. data/lib/telnyx/resources/queues.rb +93 -0
  21. data/lib/telnyx/version.rb +1 -1
  22. data/lib/telnyx.rb +9 -0
  23. data/rbi/telnyx/models/calls/action_answer_params.rbi +146 -0
  24. data/rbi/telnyx/models/calls/action_bridge_params.rbi +13 -0
  25. data/rbi/telnyx/models/calls/action_hangup_params.rbi +13 -0
  26. data/rbi/telnyx/models/payment_create_stored_payment_transaction_params.rbi +43 -0
  27. data/rbi/telnyx/models/payment_create_stored_payment_transaction_response.rbi +235 -0
  28. data/rbi/telnyx/models/queue.rbi +105 -0
  29. data/rbi/telnyx/models/queue_create_params.rbi +54 -0
  30. data/rbi/telnyx/models/queue_create_response.rbi +26 -0
  31. data/rbi/telnyx/models/queue_delete_params.rbi +27 -0
  32. data/rbi/telnyx/models/queue_list_params.rbi +57 -0
  33. data/rbi/telnyx/models/queue_retrieve_response.rbi +4 -138
  34. data/rbi/telnyx/models/queue_update_params.rbi +40 -0
  35. data/rbi/telnyx/models/queue_update_response.rbi +26 -0
  36. data/rbi/telnyx/models.rbi +13 -0
  37. data/rbi/telnyx/resources/calls/actions.rbi +25 -0
  38. data/rbi/telnyx/resources/payment.rbi +14 -0
  39. data/rbi/telnyx/resources/queues.rbi +65 -0
  40. data/sig/telnyx/models/calls/action_answer_params.rbs +49 -1
  41. data/sig/telnyx/models/calls/action_bridge_params.rbs +7 -0
  42. data/sig/telnyx/models/calls/action_hangup_params.rbs +13 -1
  43. data/sig/telnyx/models/payment_create_stored_payment_transaction_params.rbs +23 -0
  44. data/sig/telnyx/models/payment_create_stored_payment_transaction_response.rbs +116 -0
  45. data/sig/telnyx/models/queue.rbs +65 -0
  46. data/sig/telnyx/models/queue_create_params.rbs +30 -0
  47. data/sig/telnyx/models/queue_create_response.rbs +15 -0
  48. data/sig/telnyx/models/queue_delete_params.rbs +14 -0
  49. data/sig/telnyx/models/queue_list_params.rbs +32 -0
  50. data/sig/telnyx/models/queue_retrieve_response.rbs +5 -72
  51. data/sig/telnyx/models/queue_update_params.rbs +23 -0
  52. data/sig/telnyx/models/queue_update_response.rbs +15 -0
  53. data/sig/telnyx/models.rbs +12 -0
  54. data/sig/telnyx/resources/calls/actions.rbs +5 -0
  55. data/sig/telnyx/resources/payment.rbs +5 -0
  56. data/sig/telnyx/resources/queues.rbs +23 -0
  57. metadata +28 -1
@@ -0,0 +1,26 @@
1
+ # typed: strong
2
+
3
+ module Telnyx
4
+ module Models
5
+ class QueueUpdateResponse < Telnyx::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Telnyx::Models::QueueUpdateResponse, Telnyx::Internal::AnyHash)
9
+ end
10
+
11
+ sig { returns(T.nilable(Telnyx::Queue)) }
12
+ attr_reader :data
13
+
14
+ sig { params(data: Telnyx::Queue::OrHash).void }
15
+ attr_writer :data
16
+
17
+ sig { params(data: Telnyx::Queue::OrHash).returns(T.attached_class) }
18
+ def self.new(data: nil)
19
+ end
20
+
21
+ sig { override.returns({ data: Telnyx::Queue }) }
22
+ def to_hash
23
+ end
24
+ end
25
+ end
26
+ end
@@ -1194,6 +1194,9 @@ module Telnyx
1194
1194
 
1195
1195
  Payment = Telnyx::Models::Payment
1196
1196
 
1197
+ PaymentCreateStoredPaymentTransactionParams =
1198
+ Telnyx::Models::PaymentCreateStoredPaymentTransactionParams
1199
+
1197
1200
  PhoneNumber = Telnyx::Models::PhoneNumber
1198
1201
 
1199
1202
  PhoneNumberBlocks = Telnyx::Models::PhoneNumberBlocks
@@ -1332,10 +1335,20 @@ module Telnyx
1332
1335
 
1333
1336
  PwgAssignedResourcesSummary = Telnyx::Models::PwgAssignedResourcesSummary
1334
1337
 
1338
+ Queue = Telnyx::Models::Queue
1339
+
1340
+ QueueCreateParams = Telnyx::Models::QueueCreateParams
1341
+
1342
+ QueueDeleteParams = Telnyx::Models::QueueDeleteParams
1343
+
1344
+ QueueListParams = Telnyx::Models::QueueListParams
1345
+
1335
1346
  QueueRetrieveParams = Telnyx::Models::QueueRetrieveParams
1336
1347
 
1337
1348
  Queues = Telnyx::Models::Queues
1338
1349
 
1350
+ QueueUpdateParams = Telnyx::Models::QueueUpdateParams
1351
+
1339
1352
  RcsAgent = Telnyx::Models::RcsAgent
1340
1353
 
1341
1354
  RcsAgentMessage = Telnyx::Models::RcsAgentMessage
@@ -86,9 +86,17 @@ module Telnyx
86
86
  transcription: T::Boolean,
87
87
  transcription_config:
88
88
  Telnyx::Calls::TranscriptionStartRequest::OrHash,
89
+ webhook_retries_policies:
90
+ T::Hash[
91
+ Symbol,
92
+ Telnyx::Calls::ActionAnswerParams::WebhookRetriesPolicy::OrHash
93
+ ],
89
94
  webhook_url: String,
90
95
  webhook_url_method:
91
96
  Telnyx::Calls::ActionAnswerParams::WebhookURLMethod::OrSymbol,
97
+ webhook_urls: T::Hash[Symbol, String],
98
+ webhook_urls_method:
99
+ Telnyx::Calls::ActionAnswerParams::WebhookURLsMethod::OrSymbol,
92
100
  request_options: Telnyx::RequestOptions::OrHash
93
101
  ).returns(Telnyx::Models::Calls::ActionAnswerResponse)
94
102
  end
@@ -160,11 +168,21 @@ module Telnyx
160
168
  # Enable transcription upon call answer. The default value is false.
161
169
  transcription: nil,
162
170
  transcription_config: nil,
171
+ # A map of event types to retry policies. Each retry policy contains an array of
172
+ # `retries_ms` specifying the delays between retry attempts in milliseconds.
173
+ # Maximum 5 retries, total delay cannot exceed 60 seconds.
174
+ webhook_retries_policies: nil,
163
175
  # Use this field to override the URL for which Telnyx will send subsequent
164
176
  # webhooks to for this call.
165
177
  webhook_url: nil,
166
178
  # HTTP request type used for `webhook_url`.
167
179
  webhook_url_method: nil,
180
+ # A map of event types to webhook URLs. When an event of the specified type
181
+ # occurs, the webhook URL associated with that event type will be called instead
182
+ # of `webhook_url`. Events not mapped here will use the default `webhook_url`.
183
+ webhook_urls: nil,
184
+ # HTTP request method to invoke `webhook_urls`.
185
+ webhook_urls_method: nil,
168
186
  request_options: {}
169
187
  )
170
188
  end
@@ -181,6 +199,7 @@ module Telnyx
181
199
  call_control_id_to_bridge_with: String,
182
200
  client_state: String,
183
201
  command_id: String,
202
+ hold_after_unbridge: T::Boolean,
184
203
  mute_dtmf: Telnyx::Calls::ActionBridgeParams::MuteDtmf::OrSymbol,
185
204
  park_after_unbridge: String,
186
205
  play_ringtone: T::Boolean,
@@ -216,6 +235,9 @@ module Telnyx
216
235
  # Use this field to avoid duplicate commands. Telnyx will ignore any command with
217
236
  # the same `command_id` for the same `call_control_id`.
218
237
  command_id: nil,
238
+ # Specifies behavior after the bridge ends. If set to `true`, the current leg will
239
+ # be put on hold after unbridge instead of being hung up.
240
+ hold_after_unbridge: nil,
219
241
  # When enabled, DTMF tones are not passed to the call participant. The webhooks
220
242
  # containing the DTMF information will be sent.
221
243
  mute_dtmf: nil,
@@ -721,6 +743,7 @@ module Telnyx
721
743
  call_control_id: String,
722
744
  client_state: String,
723
745
  command_id: String,
746
+ custom_headers: T::Array[Telnyx::CustomSipHeader::OrHash],
724
747
  request_options: Telnyx::RequestOptions::OrHash
725
748
  ).returns(Telnyx::Models::Calls::ActionHangupResponse)
726
749
  end
@@ -733,6 +756,8 @@ module Telnyx
733
756
  # Use this field to avoid duplicate commands. Telnyx will ignore any command with
734
757
  # the same `command_id` for the same `call_control_id`.
735
758
  command_id: nil,
759
+ # Custom headers to be added to the SIP BYE message.
760
+ custom_headers: nil,
736
761
  request_options: {}
737
762
  )
738
763
  end
@@ -6,6 +6,20 @@ module Telnyx
6
6
  sig { returns(Telnyx::Resources::Payment::AutoRechargePrefs) }
7
7
  attr_reader :auto_recharge_prefs
8
8
 
9
+ # Create a stored payment transaction
10
+ sig do
11
+ params(
12
+ amount: String,
13
+ request_options: Telnyx::RequestOptions::OrHash
14
+ ).returns(Telnyx::Models::PaymentCreateStoredPaymentTransactionResponse)
15
+ end
16
+ def create_stored_payment_transaction(
17
+ # Amount in dollars and cents, e.g. "120.00"
18
+ amount:,
19
+ request_options: {}
20
+ )
21
+ end
22
+
9
23
  # @api private
10
24
  sig { params(client: Telnyx::Client).returns(T.attached_class) }
11
25
  def self.new(client:)
@@ -6,6 +6,23 @@ module Telnyx
6
6
  sig { returns(Telnyx::Resources::Queues::Calls) }
7
7
  attr_reader :calls
8
8
 
9
+ # Create a new call queue.
10
+ sig do
11
+ params(
12
+ queue_name: String,
13
+ max_size: Integer,
14
+ request_options: Telnyx::RequestOptions::OrHash
15
+ ).returns(Telnyx::Models::QueueCreateResponse)
16
+ end
17
+ def create(
18
+ # The name of the queue. Must be between 1 and 255 characters.
19
+ queue_name:,
20
+ # The maximum number of calls allowed in the queue.
21
+ max_size: nil,
22
+ request_options: {}
23
+ )
24
+ end
25
+
9
26
  # Retrieve an existing call queue
10
27
  sig do
11
28
  params(
@@ -20,6 +37,54 @@ module Telnyx
20
37
  )
21
38
  end
22
39
 
40
+ # Update properties of an existing call queue.
41
+ sig do
42
+ params(
43
+ queue_name: String,
44
+ max_size: Integer,
45
+ request_options: Telnyx::RequestOptions::OrHash
46
+ ).returns(Telnyx::Models::QueueUpdateResponse)
47
+ end
48
+ def update(
49
+ # Uniquely identifies the queue by name
50
+ queue_name,
51
+ # The maximum number of calls allowed in the queue.
52
+ max_size:,
53
+ request_options: {}
54
+ )
55
+ end
56
+
57
+ # List all queues for the authenticated user.
58
+ sig do
59
+ params(
60
+ page_number: Integer,
61
+ page_size: Integer,
62
+ request_options: Telnyx::RequestOptions::OrHash
63
+ ).returns(Telnyx::Internal::DefaultFlatPagination[Telnyx::Queue])
64
+ end
65
+ def list(
66
+ # The page number to load
67
+ page_number: nil,
68
+ # The size of the page
69
+ page_size: nil,
70
+ request_options: {}
71
+ )
72
+ end
73
+
74
+ # Delete an existing call queue.
75
+ sig do
76
+ params(
77
+ queue_name: String,
78
+ request_options: Telnyx::RequestOptions::OrHash
79
+ ).void
80
+ end
81
+ def delete(
82
+ # Uniquely identifies the queue by name
83
+ queue_name,
84
+ request_options: {}
85
+ )
86
+ end
87
+
23
88
  # @api private
24
89
  sig { params(client: Telnyx::Client).returns(T.attached_class) }
25
90
  def self.new(client:)
@@ -27,8 +27,11 @@ module Telnyx
27
27
  stream_url: String,
28
28
  transcription: bool,
29
29
  transcription_config: Telnyx::Calls::TranscriptionStartRequest,
30
+ webhook_retries_policies: ::Hash[Symbol, Telnyx::Calls::ActionAnswerParams::WebhookRetriesPolicy],
30
31
  webhook_url: String,
31
- webhook_url_method: Telnyx::Models::Calls::ActionAnswerParams::webhook_url_method
32
+ webhook_url_method: Telnyx::Models::Calls::ActionAnswerParams::webhook_url_method,
33
+ webhook_urls: ::Hash[Symbol, String],
34
+ webhook_urls_method: Telnyx::Models::Calls::ActionAnswerParams::webhook_urls_method
32
35
  }
33
36
  & Telnyx::Internal::Type::request_parameters
34
37
 
@@ -162,6 +165,12 @@ module Telnyx
162
165
  Telnyx::Calls::TranscriptionStartRequest
163
166
  ) -> Telnyx::Calls::TranscriptionStartRequest
164
167
 
168
+ attr_reader webhook_retries_policies: ::Hash[Symbol, Telnyx::Calls::ActionAnswerParams::WebhookRetriesPolicy]?
169
+
170
+ def webhook_retries_policies=: (
171
+ ::Hash[Symbol, Telnyx::Calls::ActionAnswerParams::WebhookRetriesPolicy]
172
+ ) -> ::Hash[Symbol, Telnyx::Calls::ActionAnswerParams::WebhookRetriesPolicy]
173
+
165
174
  attr_reader webhook_url: String?
166
175
 
167
176
  def webhook_url=: (String) -> String
@@ -172,6 +181,16 @@ module Telnyx
172
181
  Telnyx::Models::Calls::ActionAnswerParams::webhook_url_method
173
182
  ) -> Telnyx::Models::Calls::ActionAnswerParams::webhook_url_method
174
183
 
184
+ attr_reader webhook_urls: ::Hash[Symbol, String]?
185
+
186
+ def webhook_urls=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
187
+
188
+ attr_reader webhook_urls_method: Telnyx::Models::Calls::ActionAnswerParams::webhook_urls_method?
189
+
190
+ def webhook_urls_method=: (
191
+ Telnyx::Models::Calls::ActionAnswerParams::webhook_urls_method
192
+ ) -> Telnyx::Models::Calls::ActionAnswerParams::webhook_urls_method
193
+
175
194
  def initialize: (
176
195
  ?billing_group_id: String,
177
196
  ?client_state: String,
@@ -197,8 +216,11 @@ module Telnyx
197
216
  ?stream_url: String,
198
217
  ?transcription: bool,
199
218
  ?transcription_config: Telnyx::Calls::TranscriptionStartRequest,
219
+ ?webhook_retries_policies: ::Hash[Symbol, Telnyx::Calls::ActionAnswerParams::WebhookRetriesPolicy],
200
220
  ?webhook_url: String,
201
221
  ?webhook_url_method: Telnyx::Models::Calls::ActionAnswerParams::webhook_url_method,
222
+ ?webhook_urls: ::Hash[Symbol, String],
223
+ ?webhook_urls_method: Telnyx::Models::Calls::ActionAnswerParams::webhook_urls_method,
202
224
  ?request_options: Telnyx::request_opts
203
225
  ) -> void
204
226
 
@@ -227,8 +249,11 @@ module Telnyx
227
249
  stream_url: String,
228
250
  transcription: bool,
229
251
  transcription_config: Telnyx::Calls::TranscriptionStartRequest,
252
+ webhook_retries_policies: ::Hash[Symbol, Telnyx::Calls::ActionAnswerParams::WebhookRetriesPolicy],
230
253
  webhook_url: String,
231
254
  webhook_url_method: Telnyx::Models::Calls::ActionAnswerParams::webhook_url_method,
255
+ webhook_urls: ::Hash[Symbol, String],
256
+ webhook_urls_method: Telnyx::Models::Calls::ActionAnswerParams::webhook_urls_method,
232
257
  request_options: Telnyx::RequestOptions
233
258
  }
234
259
 
@@ -308,6 +333,18 @@ module Telnyx
308
333
  def self?.values: -> ::Array[Telnyx::Models::Calls::ActionAnswerParams::stream_track]
309
334
  end
310
335
 
336
+ type webhook_retries_policy = { retries_ms: ::Array[Integer] }
337
+
338
+ class WebhookRetriesPolicy < Telnyx::Internal::Type::BaseModel
339
+ attr_reader retries_ms: ::Array[Integer]?
340
+
341
+ def retries_ms=: (::Array[Integer]) -> ::Array[Integer]
342
+
343
+ def initialize: (?retries_ms: ::Array[Integer]) -> void
344
+
345
+ def to_hash: -> { retries_ms: ::Array[Integer] }
346
+ end
347
+
311
348
  type webhook_url_method = :POST | :GET
312
349
 
313
350
  module WebhookURLMethod
@@ -318,6 +355,17 @@ module Telnyx
318
355
 
319
356
  def self?.values: -> ::Array[Telnyx::Models::Calls::ActionAnswerParams::webhook_url_method]
320
357
  end
358
+
359
+ type webhook_urls_method = :POST | :GET
360
+
361
+ module WebhookURLsMethod
362
+ extend Telnyx::Internal::Type::Enum
363
+
364
+ POST: :POST
365
+ GET: :GET
366
+
367
+ def self?.values: -> ::Array[Telnyx::Models::Calls::ActionAnswerParams::webhook_urls_method]
368
+ end
321
369
  end
322
370
  end
323
371
  end
@@ -6,6 +6,7 @@ module Telnyx
6
6
  call_control_id_to_bridge_with: String,
7
7
  client_state: String,
8
8
  command_id: String,
9
+ hold_after_unbridge: bool,
9
10
  mute_dtmf: Telnyx::Models::Calls::ActionBridgeParams::mute_dtmf,
10
11
  park_after_unbridge: String,
11
12
  play_ringtone: bool,
@@ -39,6 +40,10 @@ module Telnyx
39
40
 
40
41
  def command_id=: (String) -> String
41
42
 
43
+ attr_reader hold_after_unbridge: bool?
44
+
45
+ def hold_after_unbridge=: (bool) -> bool
46
+
42
47
  attr_reader mute_dtmf: Telnyx::Models::Calls::ActionBridgeParams::mute_dtmf?
43
48
 
44
49
  def mute_dtmf=: (
@@ -121,6 +126,7 @@ module Telnyx
121
126
  call_control_id_to_bridge_with: String,
122
127
  ?client_state: String,
123
128
  ?command_id: String,
129
+ ?hold_after_unbridge: bool,
124
130
  ?mute_dtmf: Telnyx::Models::Calls::ActionBridgeParams::mute_dtmf,
125
131
  ?park_after_unbridge: String,
126
132
  ?play_ringtone: bool,
@@ -144,6 +150,7 @@ module Telnyx
144
150
  call_control_id_to_bridge_with: String,
145
151
  client_state: String,
146
152
  command_id: String,
153
+ hold_after_unbridge: bool,
147
154
  mute_dtmf: Telnyx::Models::Calls::ActionBridgeParams::mute_dtmf,
148
155
  park_after_unbridge: String,
149
156
  play_ringtone: bool,
@@ -2,7 +2,11 @@ module Telnyx
2
2
  module Models
3
3
  module Calls
4
4
  type action_hangup_params =
5
- { client_state: String, command_id: String }
5
+ {
6
+ client_state: String,
7
+ command_id: String,
8
+ custom_headers: ::Array[Telnyx::CustomSipHeader]
9
+ }
6
10
  & Telnyx::Internal::Type::request_parameters
7
11
 
8
12
  class ActionHangupParams < Telnyx::Internal::Type::BaseModel
@@ -17,15 +21,23 @@ module Telnyx
17
21
 
18
22
  def command_id=: (String) -> String
19
23
 
24
+ attr_reader custom_headers: ::Array[Telnyx::CustomSipHeader]?
25
+
26
+ def custom_headers=: (
27
+ ::Array[Telnyx::CustomSipHeader]
28
+ ) -> ::Array[Telnyx::CustomSipHeader]
29
+
20
30
  def initialize: (
21
31
  ?client_state: String,
22
32
  ?command_id: String,
33
+ ?custom_headers: ::Array[Telnyx::CustomSipHeader],
23
34
  ?request_options: Telnyx::request_opts
24
35
  ) -> void
25
36
 
26
37
  def to_hash: -> {
27
38
  client_state: String,
28
39
  command_id: String,
40
+ custom_headers: ::Array[Telnyx::CustomSipHeader],
29
41
  request_options: Telnyx::RequestOptions
30
42
  }
31
43
  end
@@ -0,0 +1,23 @@
1
+ module Telnyx
2
+ module Models
3
+ type payment_create_stored_payment_transaction_params =
4
+ { amount: String } & Telnyx::Internal::Type::request_parameters
5
+
6
+ class PaymentCreateStoredPaymentTransactionParams < Telnyx::Internal::Type::BaseModel
7
+ extend Telnyx::Internal::Type::RequestParameters::Converter
8
+ include Telnyx::Internal::Type::RequestParameters
9
+
10
+ attr_accessor amount: String
11
+
12
+ def initialize: (
13
+ amount: String,
14
+ ?request_options: Telnyx::request_opts
15
+ ) -> void
16
+
17
+ def to_hash: -> {
18
+ amount: String,
19
+ request_options: Telnyx::RequestOptions
20
+ }
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,116 @@
1
+ module Telnyx
2
+ module Models
3
+ type payment_create_stored_payment_transaction_response =
4
+ {
5
+ data: Telnyx::Models::PaymentCreateStoredPaymentTransactionResponse::Data
6
+ }
7
+
8
+ class PaymentCreateStoredPaymentTransactionResponse < Telnyx::Internal::Type::BaseModel
9
+ attr_reader data: Telnyx::Models::PaymentCreateStoredPaymentTransactionResponse::Data?
10
+
11
+ def data=: (
12
+ Telnyx::Models::PaymentCreateStoredPaymentTransactionResponse::Data
13
+ ) -> Telnyx::Models::PaymentCreateStoredPaymentTransactionResponse::Data
14
+
15
+ def initialize: (
16
+ ?data: Telnyx::Models::PaymentCreateStoredPaymentTransactionResponse::Data
17
+ ) -> void
18
+
19
+ def to_hash: -> {
20
+ data: Telnyx::Models::PaymentCreateStoredPaymentTransactionResponse::Data
21
+ }
22
+
23
+ type data =
24
+ {
25
+ id: String,
26
+ amount_cents: Integer,
27
+ amount_currency: String,
28
+ auto_recharge: bool,
29
+ created_at: Time,
30
+ processor_status: String,
31
+ record_type: Telnyx::Models::PaymentCreateStoredPaymentTransactionResponse::Data::record_type,
32
+ transaction_processing_type: Telnyx::Models::PaymentCreateStoredPaymentTransactionResponse::Data::transaction_processing_type
33
+ }
34
+
35
+ class Data < Telnyx::Internal::Type::BaseModel
36
+ attr_reader id: String?
37
+
38
+ def id=: (String) -> String
39
+
40
+ attr_reader amount_cents: Integer?
41
+
42
+ def amount_cents=: (Integer) -> Integer
43
+
44
+ attr_reader amount_currency: String?
45
+
46
+ def amount_currency=: (String) -> String
47
+
48
+ attr_reader auto_recharge: bool?
49
+
50
+ def auto_recharge=: (bool) -> bool
51
+
52
+ attr_reader created_at: Time?
53
+
54
+ def created_at=: (Time) -> Time
55
+
56
+ attr_reader processor_status: String?
57
+
58
+ def processor_status=: (String) -> String
59
+
60
+ attr_reader record_type: Telnyx::Models::PaymentCreateStoredPaymentTransactionResponse::Data::record_type?
61
+
62
+ def record_type=: (
63
+ Telnyx::Models::PaymentCreateStoredPaymentTransactionResponse::Data::record_type
64
+ ) -> Telnyx::Models::PaymentCreateStoredPaymentTransactionResponse::Data::record_type
65
+
66
+ attr_reader transaction_processing_type: Telnyx::Models::PaymentCreateStoredPaymentTransactionResponse::Data::transaction_processing_type?
67
+
68
+ def transaction_processing_type=: (
69
+ Telnyx::Models::PaymentCreateStoredPaymentTransactionResponse::Data::transaction_processing_type
70
+ ) -> Telnyx::Models::PaymentCreateStoredPaymentTransactionResponse::Data::transaction_processing_type
71
+
72
+ def initialize: (
73
+ ?id: String,
74
+ ?amount_cents: Integer,
75
+ ?amount_currency: String,
76
+ ?auto_recharge: bool,
77
+ ?created_at: Time,
78
+ ?processor_status: String,
79
+ ?record_type: Telnyx::Models::PaymentCreateStoredPaymentTransactionResponse::Data::record_type,
80
+ ?transaction_processing_type: Telnyx::Models::PaymentCreateStoredPaymentTransactionResponse::Data::transaction_processing_type
81
+ ) -> void
82
+
83
+ def to_hash: -> {
84
+ id: String,
85
+ amount_cents: Integer,
86
+ amount_currency: String,
87
+ auto_recharge: bool,
88
+ created_at: Time,
89
+ processor_status: String,
90
+ record_type: Telnyx::Models::PaymentCreateStoredPaymentTransactionResponse::Data::record_type,
91
+ transaction_processing_type: Telnyx::Models::PaymentCreateStoredPaymentTransactionResponse::Data::transaction_processing_type
92
+ }
93
+
94
+ type record_type = :transaction
95
+
96
+ module RecordType
97
+ extend Telnyx::Internal::Type::Enum
98
+
99
+ TRANSACTION: :transaction
100
+
101
+ def self?.values: -> ::Array[Telnyx::Models::PaymentCreateStoredPaymentTransactionResponse::Data::record_type]
102
+ end
103
+
104
+ type transaction_processing_type = :stored_payment
105
+
106
+ module TransactionProcessingType
107
+ extend Telnyx::Internal::Type::Enum
108
+
109
+ STORED_PAYMENT: :stored_payment
110
+
111
+ def self?.values: -> ::Array[Telnyx::Models::PaymentCreateStoredPaymentTransactionResponse::Data::transaction_processing_type]
112
+ end
113
+ end
114
+ end
115
+ end
116
+ end
@@ -0,0 +1,65 @@
1
+ module Telnyx
2
+ module Models
3
+ type queue =
4
+ {
5
+ id: String,
6
+ average_wait_time_secs: Integer,
7
+ created_at: String,
8
+ current_size: Integer,
9
+ max_size: Integer,
10
+ name: String,
11
+ record_type: Telnyx::Models::Queue::record_type,
12
+ updated_at: String
13
+ }
14
+
15
+ class Queue < Telnyx::Internal::Type::BaseModel
16
+ attr_accessor id: String
17
+
18
+ attr_accessor average_wait_time_secs: Integer
19
+
20
+ attr_accessor created_at: String
21
+
22
+ attr_accessor current_size: Integer
23
+
24
+ attr_accessor max_size: Integer
25
+
26
+ attr_accessor name: String
27
+
28
+ attr_accessor record_type: Telnyx::Models::Queue::record_type
29
+
30
+ attr_accessor updated_at: String
31
+
32
+ def initialize: (
33
+ id: String,
34
+ average_wait_time_secs: Integer,
35
+ created_at: String,
36
+ current_size: Integer,
37
+ max_size: Integer,
38
+ name: String,
39
+ record_type: Telnyx::Models::Queue::record_type,
40
+ updated_at: String
41
+ ) -> void
42
+
43
+ def to_hash: -> {
44
+ id: String,
45
+ average_wait_time_secs: Integer,
46
+ created_at: String,
47
+ current_size: Integer,
48
+ max_size: Integer,
49
+ name: String,
50
+ record_type: Telnyx::Models::Queue::record_type,
51
+ updated_at: String
52
+ }
53
+
54
+ type record_type = :queue
55
+
56
+ module RecordType
57
+ extend Telnyx::Internal::Type::Enum
58
+
59
+ QUEUE: :queue
60
+
61
+ def self?.values: -> ::Array[Telnyx::Models::Queue::record_type]
62
+ end
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,30 @@
1
+ module Telnyx
2
+ module Models
3
+ type queue_create_params =
4
+ { queue_name: String, max_size: Integer }
5
+ & Telnyx::Internal::Type::request_parameters
6
+
7
+ class QueueCreateParams < Telnyx::Internal::Type::BaseModel
8
+ extend Telnyx::Internal::Type::RequestParameters::Converter
9
+ include Telnyx::Internal::Type::RequestParameters
10
+
11
+ attr_accessor queue_name: String
12
+
13
+ attr_reader max_size: Integer?
14
+
15
+ def max_size=: (Integer) -> Integer
16
+
17
+ def initialize: (
18
+ queue_name: String,
19
+ ?max_size: Integer,
20
+ ?request_options: Telnyx::request_opts
21
+ ) -> void
22
+
23
+ def to_hash: -> {
24
+ queue_name: String,
25
+ max_size: Integer,
26
+ request_options: Telnyx::RequestOptions
27
+ }
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,15 @@
1
+ module Telnyx
2
+ module Models
3
+ type queue_create_response = { data: Telnyx::Queue }
4
+
5
+ class QueueCreateResponse < Telnyx::Internal::Type::BaseModel
6
+ attr_reader data: Telnyx::Queue?
7
+
8
+ def data=: (Telnyx::Queue) -> Telnyx::Queue
9
+
10
+ def initialize: (?data: Telnyx::Queue) -> void
11
+
12
+ def to_hash: -> { data: Telnyx::Queue }
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,14 @@
1
+ module Telnyx
2
+ module Models
3
+ type queue_delete_params = { } & Telnyx::Internal::Type::request_parameters
4
+
5
+ class QueueDeleteParams < Telnyx::Internal::Type::BaseModel
6
+ extend Telnyx::Internal::Type::RequestParameters::Converter
7
+ include Telnyx::Internal::Type::RequestParameters
8
+
9
+ def initialize: (?request_options: Telnyx::request_opts) -> void
10
+
11
+ def to_hash: -> { request_options: Telnyx::RequestOptions }
12
+ end
13
+ end
14
+ end