telnyx 5.7.1 → 5.7.2

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 (26) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/models/fax_delivered_webhook_event.rb +193 -144
  5. data/lib/telnyx/models/fax_failed_webhook_event.rb +195 -146
  6. data/lib/telnyx/models/fax_media_processed_webhook_event.rb +177 -128
  7. data/lib/telnyx/models/fax_queued_webhook_event.rb +177 -128
  8. data/lib/telnyx/models/fax_sending_started_webhook_event.rb +177 -128
  9. data/lib/telnyx/models/faxes/action_cancel_response.rb +16 -5
  10. data/lib/telnyx/models/faxes/action_refresh_response.rb +16 -5
  11. data/lib/telnyx/version.rb +1 -1
  12. data/rbi/telnyx/models/fax_delivered_webhook_event.rbi +368 -247
  13. data/rbi/telnyx/models/fax_failed_webhook_event.rbi +388 -262
  14. data/rbi/telnyx/models/fax_media_processed_webhook_event.rbi +356 -239
  15. data/rbi/telnyx/models/fax_queued_webhook_event.rbi +348 -222
  16. data/rbi/telnyx/models/fax_sending_started_webhook_event.rbi +356 -239
  17. data/rbi/telnyx/models/faxes/action_cancel_response.rbi +45 -7
  18. data/rbi/telnyx/models/faxes/action_refresh_response.rbi +45 -7
  19. data/sig/telnyx/models/fax_delivered_webhook_event.rbs +175 -122
  20. data/sig/telnyx/models/fax_failed_webhook_event.rbs +178 -125
  21. data/sig/telnyx/models/fax_media_processed_webhook_event.rbs +165 -112
  22. data/sig/telnyx/models/fax_queued_webhook_event.rbs +165 -112
  23. data/sig/telnyx/models/fax_sending_started_webhook_event.rbs +165 -112
  24. data/sig/telnyx/models/faxes/action_cancel_response.rbs +24 -5
  25. data/sig/telnyx/models/faxes/action_refresh_response.rbs +24 -5
  26. metadata +1 -1
@@ -3,175 +3,224 @@
3
3
  module Telnyx
4
4
  module Models
5
5
  class FaxMediaProcessedWebhookEvent < Telnyx::Internal::Type::BaseModel
6
- # @!attribute id
7
- # Identifies the type of resource.
6
+ # @!attribute data
8
7
  #
9
- # @return [String, nil]
10
- optional :id, String
8
+ # @return [Telnyx::Models::FaxMediaProcessedWebhookEvent::Data, nil]
9
+ optional :data, -> { Telnyx::FaxMediaProcessedWebhookEvent::Data }
11
10
 
12
- # @!attribute event_type
13
- # The type of event being delivered.
11
+ # @!attribute meta
12
+ # Metadata about the webhook delivery.
14
13
  #
15
- # @return [Symbol, Telnyx::Models::FaxMediaProcessedWebhookEvent::EventType, nil]
16
- optional :event_type, enum: -> { Telnyx::FaxMediaProcessedWebhookEvent::EventType }
14
+ # @return [Telnyx::Models::FaxMediaProcessedWebhookEvent::Meta, nil]
15
+ optional :meta, -> { Telnyx::FaxMediaProcessedWebhookEvent::Meta }
17
16
 
18
- # @!attribute payload
17
+ # @!method initialize(data: nil, meta: nil)
18
+ # @param data [Telnyx::Models::FaxMediaProcessedWebhookEvent::Data]
19
19
  #
20
- # @return [Telnyx::Models::FaxMediaProcessedWebhookEvent::Payload, nil]
21
- optional :payload, -> { Telnyx::FaxMediaProcessedWebhookEvent::Payload }
20
+ # @param meta [Telnyx::Models::FaxMediaProcessedWebhookEvent::Meta] Metadata about the webhook delivery.
22
21
 
23
- # @!attribute record_type
24
- # Identifies the type of the resource.
25
- #
26
- # @return [Symbol, Telnyx::Models::FaxMediaProcessedWebhookEvent::RecordType, nil]
27
- optional :record_type, enum: -> { Telnyx::FaxMediaProcessedWebhookEvent::RecordType }
28
-
29
- # @!method initialize(id: nil, event_type: nil, payload: nil, record_type: nil)
30
- # @param id [String] Identifies the type of resource.
31
- #
32
- # @param event_type [Symbol, Telnyx::Models::FaxMediaProcessedWebhookEvent::EventType] The type of event being delivered.
33
- #
34
- # @param payload [Telnyx::Models::FaxMediaProcessedWebhookEvent::Payload]
35
- #
36
- # @param record_type [Symbol, Telnyx::Models::FaxMediaProcessedWebhookEvent::RecordType] Identifies the type of the resource.
37
-
38
- # The type of event being delivered.
39
- #
40
- # @see Telnyx::Models::FaxMediaProcessedWebhookEvent#event_type
41
- module EventType
42
- extend Telnyx::Internal::Type::Enum
43
-
44
- FAX_MEDIA_PROCESSED = :"fax.media.processed"
45
-
46
- # @!method self.values
47
- # @return [Array<Symbol>]
48
- end
49
-
50
- # @see Telnyx::Models::FaxMediaProcessedWebhookEvent#payload
51
- class Payload < Telnyx::Internal::Type::BaseModel
52
- # @!attribute client_state
53
- # State received from a command.
54
- #
55
- # @return [String, nil]
56
- optional :client_state, String
57
-
58
- # @!attribute connection_id
59
- # The ID of the connection used to send the fax.
60
- #
61
- # @return [String, nil]
62
- optional :connection_id, String
63
-
64
- # @!attribute direction
65
- # The direction of the fax.
66
- #
67
- # @return [Symbol, Telnyx::Models::FaxMediaProcessedWebhookEvent::Payload::Direction, nil]
68
- optional :direction, enum: -> { Telnyx::FaxMediaProcessedWebhookEvent::Payload::Direction }
69
-
70
- # @!attribute fax_id
71
- # Identifies the fax.
72
- #
73
- # @return [String, nil]
74
- optional :fax_id, String
75
-
76
- # @!attribute from
77
- # The phone number, in E.164 format, the fax will be sent from.
22
+ # @see Telnyx::Models::FaxMediaProcessedWebhookEvent#data
23
+ class Data < Telnyx::Internal::Type::BaseModel
24
+ # @!attribute id
25
+ # Identifies the type of resource.
78
26
  #
79
27
  # @return [String, nil]
80
- optional :from, String
28
+ optional :id, String
81
29
 
82
- # @!attribute media_name
83
- # The media_name used for the fax's media. Must point to a file previously
84
- # uploaded to api.telnyx.com/v2/media by the same user/organization. media_name
85
- # and media_url/contents can't be submitted together.
30
+ # @!attribute event_type
31
+ # The type of event being delivered.
86
32
  #
87
- # @return [String, nil]
88
- optional :media_name, String
33
+ # @return [Symbol, Telnyx::Models::FaxMediaProcessedWebhookEvent::Data::EventType, nil]
34
+ optional :event_type, enum: -> { Telnyx::FaxMediaProcessedWebhookEvent::Data::EventType }
89
35
 
90
- # @!attribute original_media_url
91
- # The original URL to the PDF used for the fax's media. If media_name was
92
- # supplied, this is omitted
36
+ # @!attribute occurred_at
37
+ # ISO 8601 datetime of when the event occurred.
93
38
  #
94
- # @return [String, nil]
95
- optional :original_media_url, String
39
+ # @return [Time, nil]
40
+ optional :occurred_at, Time
96
41
 
97
- # @!attribute status
98
- # The status of the fax.
42
+ # @!attribute payload
99
43
  #
100
- # @return [Symbol, Telnyx::Models::FaxMediaProcessedWebhookEvent::Payload::Status, nil]
101
- optional :status, enum: -> { Telnyx::FaxMediaProcessedWebhookEvent::Payload::Status }
44
+ # @return [Telnyx::Models::FaxMediaProcessedWebhookEvent::Data::Payload, nil]
45
+ optional :payload, -> { Telnyx::FaxMediaProcessedWebhookEvent::Data::Payload }
102
46
 
103
- # @!attribute to
104
- # The phone number, in E.164 format, the fax will be sent to or SIP URI
47
+ # @!attribute record_type
48
+ # Identifies the type of the resource.
105
49
  #
106
- # @return [String, nil]
107
- optional :to, String
50
+ # @return [Symbol, Telnyx::Models::FaxMediaProcessedWebhookEvent::Data::RecordType, nil]
51
+ optional :record_type, enum: -> { Telnyx::FaxMediaProcessedWebhookEvent::Data::RecordType }
108
52
 
109
- # @!attribute user_id
110
- # Identifier of the user to whom the fax belongs
111
- #
112
- # @return [String, nil]
113
- optional :user_id, String
114
-
115
- # @!method initialize(client_state: nil, connection_id: nil, direction: nil, fax_id: nil, from: nil, media_name: nil, original_media_url: nil, status: nil, to: nil, user_id: nil)
116
- # Some parameter documentations has been truncated, see
117
- # {Telnyx::Models::FaxMediaProcessedWebhookEvent::Payload} for more details.
118
- #
119
- # @param client_state [String] State received from a command.
120
- #
121
- # @param connection_id [String] The ID of the connection used to send the fax.
122
- #
123
- # @param direction [Symbol, Telnyx::Models::FaxMediaProcessedWebhookEvent::Payload::Direction] The direction of the fax.
124
- #
125
- # @param fax_id [String] Identifies the fax.
53
+ # @!method initialize(id: nil, event_type: nil, occurred_at: nil, payload: nil, record_type: nil)
54
+ # @param id [String] Identifies the type of resource.
126
55
  #
127
- # @param from [String] The phone number, in E.164 format, the fax will be sent from.
56
+ # @param event_type [Symbol, Telnyx::Models::FaxMediaProcessedWebhookEvent::Data::EventType] The type of event being delivered.
128
57
  #
129
- # @param media_name [String] The media_name used for the fax's media. Must point to a file previously uploade
58
+ # @param occurred_at [Time] ISO 8601 datetime of when the event occurred.
130
59
  #
131
- # @param original_media_url [String] The original URL to the PDF used for the fax's media. If media_name was supplied
60
+ # @param payload [Telnyx::Models::FaxMediaProcessedWebhookEvent::Data::Payload]
132
61
  #
133
- # @param status [Symbol, Telnyx::Models::FaxMediaProcessedWebhookEvent::Payload::Status] The status of the fax.
134
- #
135
- # @param to [String] The phone number, in E.164 format, the fax will be sent to or SIP URI
136
- #
137
- # @param user_id [String] Identifier of the user to whom the fax belongs
62
+ # @param record_type [Symbol, Telnyx::Models::FaxMediaProcessedWebhookEvent::Data::RecordType] Identifies the type of the resource.
138
63
 
139
- # The direction of the fax.
64
+ # The type of event being delivered.
140
65
  #
141
- # @see Telnyx::Models::FaxMediaProcessedWebhookEvent::Payload#direction
142
- module Direction
66
+ # @see Telnyx::Models::FaxMediaProcessedWebhookEvent::Data#event_type
67
+ module EventType
143
68
  extend Telnyx::Internal::Type::Enum
144
69
 
145
- INBOUND = :inbound
146
- OUTBOUND = :outbound
70
+ FAX_MEDIA_PROCESSED = :"fax.media.processed"
147
71
 
148
72
  # @!method self.values
149
73
  # @return [Array<Symbol>]
150
74
  end
151
75
 
152
- # The status of the fax.
76
+ # @see Telnyx::Models::FaxMediaProcessedWebhookEvent::Data#payload
77
+ class Payload < Telnyx::Internal::Type::BaseModel
78
+ # @!attribute client_state
79
+ # State received from a command.
80
+ #
81
+ # @return [String, nil]
82
+ optional :client_state, String
83
+
84
+ # @!attribute connection_id
85
+ # The ID of the connection used to send the fax.
86
+ #
87
+ # @return [String, nil]
88
+ optional :connection_id, String
89
+
90
+ # @!attribute direction
91
+ # The direction of the fax.
92
+ #
93
+ # @return [Symbol, Telnyx::Models::FaxMediaProcessedWebhookEvent::Data::Payload::Direction, nil]
94
+ optional :direction, enum: -> { Telnyx::FaxMediaProcessedWebhookEvent::Data::Payload::Direction }
95
+
96
+ # @!attribute fax_id
97
+ # Identifies the fax.
98
+ #
99
+ # @return [String, nil]
100
+ optional :fax_id, String
101
+
102
+ # @!attribute from
103
+ # The phone number, in E.164 format, the fax will be sent from.
104
+ #
105
+ # @return [String, nil]
106
+ optional :from, String
107
+
108
+ # @!attribute media_name
109
+ # The media_name used for the fax's media. Must point to a file previously
110
+ # uploaded to api.telnyx.com/v2/media by the same user/organization. media_name
111
+ # and media_url/contents can't be submitted together.
112
+ #
113
+ # @return [String, nil]
114
+ optional :media_name, String
115
+
116
+ # @!attribute original_media_url
117
+ # The original URL to the PDF used for the fax's media. If media_name was
118
+ # supplied, this is omitted
119
+ #
120
+ # @return [String, nil]
121
+ optional :original_media_url, String
122
+
123
+ # @!attribute status
124
+ # The status of the fax.
125
+ #
126
+ # @return [Symbol, Telnyx::Models::FaxMediaProcessedWebhookEvent::Data::Payload::Status, nil]
127
+ optional :status, enum: -> { Telnyx::FaxMediaProcessedWebhookEvent::Data::Payload::Status }
128
+
129
+ # @!attribute to
130
+ # The phone number, in E.164 format, the fax will be sent to or SIP URI
131
+ #
132
+ # @return [String, nil]
133
+ optional :to, String
134
+
135
+ # @!attribute user_id
136
+ # Identifier of the user to whom the fax belongs
137
+ #
138
+ # @return [String, nil]
139
+ optional :user_id, String
140
+
141
+ # @!method initialize(client_state: nil, connection_id: nil, direction: nil, fax_id: nil, from: nil, media_name: nil, original_media_url: nil, status: nil, to: nil, user_id: nil)
142
+ # Some parameter documentations has been truncated, see
143
+ # {Telnyx::Models::FaxMediaProcessedWebhookEvent::Data::Payload} for more details.
144
+ #
145
+ # @param client_state [String] State received from a command.
146
+ #
147
+ # @param connection_id [String] The ID of the connection used to send the fax.
148
+ #
149
+ # @param direction [Symbol, Telnyx::Models::FaxMediaProcessedWebhookEvent::Data::Payload::Direction] The direction of the fax.
150
+ #
151
+ # @param fax_id [String] Identifies the fax.
152
+ #
153
+ # @param from [String] The phone number, in E.164 format, the fax will be sent from.
154
+ #
155
+ # @param media_name [String] The media_name used for the fax's media. Must point to a file previously uploade
156
+ #
157
+ # @param original_media_url [String] The original URL to the PDF used for the fax's media. If media_name was supplied
158
+ #
159
+ # @param status [Symbol, Telnyx::Models::FaxMediaProcessedWebhookEvent::Data::Payload::Status] The status of the fax.
160
+ #
161
+ # @param to [String] The phone number, in E.164 format, the fax will be sent to or SIP URI
162
+ #
163
+ # @param user_id [String] Identifier of the user to whom the fax belongs
164
+
165
+ # The direction of the fax.
166
+ #
167
+ # @see Telnyx::Models::FaxMediaProcessedWebhookEvent::Data::Payload#direction
168
+ module Direction
169
+ extend Telnyx::Internal::Type::Enum
170
+
171
+ INBOUND = :inbound
172
+ OUTBOUND = :outbound
173
+
174
+ # @!method self.values
175
+ # @return [Array<Symbol>]
176
+ end
177
+
178
+ # The status of the fax.
179
+ #
180
+ # @see Telnyx::Models::FaxMediaProcessedWebhookEvent::Data::Payload#status
181
+ module Status
182
+ extend Telnyx::Internal::Type::Enum
183
+
184
+ MEDIA_PROCESSED = :"media.processed"
185
+
186
+ # @!method self.values
187
+ # @return [Array<Symbol>]
188
+ end
189
+ end
190
+
191
+ # Identifies the type of the resource.
153
192
  #
154
- # @see Telnyx::Models::FaxMediaProcessedWebhookEvent::Payload#status
155
- module Status
193
+ # @see Telnyx::Models::FaxMediaProcessedWebhookEvent::Data#record_type
194
+ module RecordType
156
195
  extend Telnyx::Internal::Type::Enum
157
196
 
158
- MEDIA_PROCESSED = :"media.processed"
197
+ EVENT = :event
159
198
 
160
199
  # @!method self.values
161
200
  # @return [Array<Symbol>]
162
201
  end
163
202
  end
164
203
 
165
- # Identifies the type of the resource.
166
- #
167
- # @see Telnyx::Models::FaxMediaProcessedWebhookEvent#record_type
168
- module RecordType
169
- extend Telnyx::Internal::Type::Enum
204
+ # @see Telnyx::Models::FaxMediaProcessedWebhookEvent#meta
205
+ class Meta < Telnyx::Internal::Type::BaseModel
206
+ # @!attribute attempt
207
+ # The delivery attempt number.
208
+ #
209
+ # @return [Integer, nil]
210
+ optional :attempt, Integer
170
211
 
171
- EVENT = :event
212
+ # @!attribute delivered_to
213
+ # The URL the webhook was delivered to.
214
+ #
215
+ # @return [String, nil]
216
+ optional :delivered_to, String
172
217
 
173
- # @!method self.values
174
- # @return [Array<Symbol>]
218
+ # @!method initialize(attempt: nil, delivered_to: nil)
219
+ # Metadata about the webhook delivery.
220
+ #
221
+ # @param attempt [Integer] The delivery attempt number.
222
+ #
223
+ # @param delivered_to [String] The URL the webhook was delivered to.
175
224
  end
176
225
  end
177
226
  end