surge_api 0.23.0 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +1 -1
- data/lib/surge_api/models/account_retrieve_status_params.rb +1 -0
- data/lib/surge_api/models/campaign.rb +6 -6
- data/lib/surge_api/models/campaign_params.rb +5 -6
- data/lib/surge_api/models/message.rb +25 -1
- data/lib/surge_api/models/message_delivered_webhook_event.rb +21 -1
- data/lib/surge_api/models/message_failed_webhook_event.rb +21 -1
- data/lib/surge_api/models/message_received_webhook_event.rb +21 -1
- data/lib/surge_api/models/message_sent_webhook_event.rb +21 -1
- data/lib/surge_api/models/phone_number_imported_webhook_event.rb +152 -0
- data/lib/surge_api/models/unwrap_webhook_event.rb +3 -1
- data/lib/surge_api/models.rb +2 -0
- data/lib/surge_api/resources/webhooks.rb +1 -1
- data/lib/surge_api/version.rb +1 -1
- data/lib/surge_api.rb +1 -0
- data/rbi/surge_api/models/account_retrieve_status_params.rbi +5 -0
- data/rbi/surge_api/models/campaign.rbi +9 -10
- data/rbi/surge_api/models/campaign_params.rbi +8 -10
- data/rbi/surge_api/models/message.rbi +34 -3
- data/rbi/surge_api/models/message_delivered_webhook_event.rbi +44 -0
- data/rbi/surge_api/models/message_failed_webhook_event.rbi +40 -0
- data/rbi/surge_api/models/message_received_webhook_event.rbi +41 -0
- data/rbi/surge_api/models/message_sent_webhook_event.rbi +38 -0
- data/rbi/surge_api/models/phone_number_imported_webhook_event.rbi +310 -0
- data/rbi/surge_api/models/unwrap_webhook_event.rbi +1 -0
- data/rbi/surge_api/models.rbi +3 -0
- data/rbi/surge_api/resources/webhooks.rbi +1 -0
- data/sig/surge_api/models/account_retrieve_status_params.rbs +2 -1
- data/sig/surge_api/models/campaign.rbs +3 -1
- data/sig/surge_api/models/message.rbs +26 -3
- data/sig/surge_api/models/message_delivered_webhook_event.rbs +15 -0
- data/sig/surge_api/models/message_failed_webhook_event.rbs +15 -0
- data/sig/surge_api/models/message_received_webhook_event.rbs +15 -0
- data/sig/surge_api/models/message_sent_webhook_event.rbs +15 -0
- data/sig/surge_api/models/phone_number_imported_webhook_event.rbs +125 -0
- data/sig/surge_api/models/unwrap_webhook_event.rbs +1 -0
- data/sig/surge_api/models.rbs +2 -0
- data/sig/surge_api/resources/webhooks.rbs +1 -0
- metadata +5 -2
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module SurgeAPI
|
|
4
|
+
module Models
|
|
5
|
+
class PhoneNumberImportedWebhookEvent < SurgeAPI::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
SurgeAPI::PhoneNumberImportedWebhookEvent,
|
|
10
|
+
SurgeAPI::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# The ID of the account in which this event occurred
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :account_id
|
|
17
|
+
|
|
18
|
+
# The data associated with the event
|
|
19
|
+
sig { returns(SurgeAPI::PhoneNumberImportedWebhookEvent::Data) }
|
|
20
|
+
attr_reader :data
|
|
21
|
+
|
|
22
|
+
sig do
|
|
23
|
+
params(
|
|
24
|
+
data: SurgeAPI::PhoneNumberImportedWebhookEvent::Data::OrHash
|
|
25
|
+
).void
|
|
26
|
+
end
|
|
27
|
+
attr_writer :data
|
|
28
|
+
|
|
29
|
+
# The timestamp when this event occurred, in ISO8601 format
|
|
30
|
+
sig { returns(Time) }
|
|
31
|
+
attr_accessor :timestamp
|
|
32
|
+
|
|
33
|
+
# The type of the event. Always `phone_number.imported` for this event.
|
|
34
|
+
sig { returns(Symbol) }
|
|
35
|
+
attr_accessor :type
|
|
36
|
+
|
|
37
|
+
sig do
|
|
38
|
+
params(
|
|
39
|
+
account_id: String,
|
|
40
|
+
data: SurgeAPI::PhoneNumberImportedWebhookEvent::Data::OrHash,
|
|
41
|
+
timestamp: Time,
|
|
42
|
+
type: Symbol
|
|
43
|
+
).returns(T.attached_class)
|
|
44
|
+
end
|
|
45
|
+
def self.new(
|
|
46
|
+
# The ID of the account in which this event occurred
|
|
47
|
+
account_id:,
|
|
48
|
+
# The data associated with the event
|
|
49
|
+
data:,
|
|
50
|
+
# The timestamp when this event occurred, in ISO8601 format
|
|
51
|
+
timestamp:,
|
|
52
|
+
# The type of the event. Always `phone_number.imported` for this event.
|
|
53
|
+
type: :"phone_number.imported"
|
|
54
|
+
)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
sig do
|
|
58
|
+
override.returns(
|
|
59
|
+
{
|
|
60
|
+
account_id: String,
|
|
61
|
+
data: SurgeAPI::PhoneNumberImportedWebhookEvent::Data,
|
|
62
|
+
timestamp: Time,
|
|
63
|
+
type: Symbol
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
end
|
|
67
|
+
def to_hash
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
class Data < SurgeAPI::Internal::Type::BaseModel
|
|
71
|
+
OrHash =
|
|
72
|
+
T.type_alias do
|
|
73
|
+
T.any(
|
|
74
|
+
SurgeAPI::PhoneNumberImportedWebhookEvent::Data,
|
|
75
|
+
SurgeAPI::Internal::AnyHash
|
|
76
|
+
)
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# The unique identifier for the phone number
|
|
80
|
+
sig { returns(String) }
|
|
81
|
+
attr_accessor :id
|
|
82
|
+
|
|
83
|
+
# Campaign attachment details for a domestic local phone number
|
|
84
|
+
sig do
|
|
85
|
+
returns(
|
|
86
|
+
T.nilable(SurgeAPI::PhoneNumberImportedWebhookEvent::Data::Campaign)
|
|
87
|
+
)
|
|
88
|
+
end
|
|
89
|
+
attr_reader :campaign
|
|
90
|
+
|
|
91
|
+
sig do
|
|
92
|
+
params(
|
|
93
|
+
campaign:
|
|
94
|
+
T.nilable(
|
|
95
|
+
SurgeAPI::PhoneNumberImportedWebhookEvent::Data::Campaign::OrHash
|
|
96
|
+
)
|
|
97
|
+
).void
|
|
98
|
+
end
|
|
99
|
+
attr_writer :campaign
|
|
100
|
+
|
|
101
|
+
# Deprecated. The unique identifier of the campaign this phone number is attached
|
|
102
|
+
# to
|
|
103
|
+
sig { returns(T.nilable(String)) }
|
|
104
|
+
attr_accessor :campaign_id
|
|
105
|
+
|
|
106
|
+
# A human-readable name for the phone number
|
|
107
|
+
sig { returns(T.nilable(String)) }
|
|
108
|
+
attr_accessor :name
|
|
109
|
+
|
|
110
|
+
# The phone number in E.164 format
|
|
111
|
+
sig { returns(String) }
|
|
112
|
+
attr_accessor :number
|
|
113
|
+
|
|
114
|
+
# Whether the phone number is local, toll-free, or short code
|
|
115
|
+
sig do
|
|
116
|
+
returns(
|
|
117
|
+
SurgeAPI::PhoneNumberImportedWebhookEvent::Data::Type::TaggedSymbol
|
|
118
|
+
)
|
|
119
|
+
end
|
|
120
|
+
attr_accessor :type
|
|
121
|
+
|
|
122
|
+
# The data associated with the event
|
|
123
|
+
sig do
|
|
124
|
+
params(
|
|
125
|
+
id: String,
|
|
126
|
+
campaign:
|
|
127
|
+
T.nilable(
|
|
128
|
+
SurgeAPI::PhoneNumberImportedWebhookEvent::Data::Campaign::OrHash
|
|
129
|
+
),
|
|
130
|
+
campaign_id: T.nilable(String),
|
|
131
|
+
name: T.nilable(String),
|
|
132
|
+
number: String,
|
|
133
|
+
type:
|
|
134
|
+
SurgeAPI::PhoneNumberImportedWebhookEvent::Data::Type::OrSymbol
|
|
135
|
+
).returns(T.attached_class)
|
|
136
|
+
end
|
|
137
|
+
def self.new(
|
|
138
|
+
# The unique identifier for the phone number
|
|
139
|
+
id:,
|
|
140
|
+
# Campaign attachment details for a domestic local phone number
|
|
141
|
+
campaign:,
|
|
142
|
+
# Deprecated. The unique identifier of the campaign this phone number is attached
|
|
143
|
+
# to
|
|
144
|
+
campaign_id:,
|
|
145
|
+
# A human-readable name for the phone number
|
|
146
|
+
name:,
|
|
147
|
+
# The phone number in E.164 format
|
|
148
|
+
number:,
|
|
149
|
+
# Whether the phone number is local, toll-free, or short code
|
|
150
|
+
type:
|
|
151
|
+
)
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
sig do
|
|
155
|
+
override.returns(
|
|
156
|
+
{
|
|
157
|
+
id: String,
|
|
158
|
+
campaign:
|
|
159
|
+
T.nilable(
|
|
160
|
+
SurgeAPI::PhoneNumberImportedWebhookEvent::Data::Campaign
|
|
161
|
+
),
|
|
162
|
+
campaign_id: T.nilable(String),
|
|
163
|
+
name: T.nilable(String),
|
|
164
|
+
number: String,
|
|
165
|
+
type:
|
|
166
|
+
SurgeAPI::PhoneNumberImportedWebhookEvent::Data::Type::TaggedSymbol
|
|
167
|
+
}
|
|
168
|
+
)
|
|
169
|
+
end
|
|
170
|
+
def to_hash
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
class Campaign < SurgeAPI::Internal::Type::BaseModel
|
|
174
|
+
OrHash =
|
|
175
|
+
T.type_alias do
|
|
176
|
+
T.any(
|
|
177
|
+
SurgeAPI::PhoneNumberImportedWebhookEvent::Data::Campaign,
|
|
178
|
+
SurgeAPI::Internal::AnyHash
|
|
179
|
+
)
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# The unique identifier of the campaign this phone number is attached to
|
|
183
|
+
sig { returns(String) }
|
|
184
|
+
attr_accessor :id
|
|
185
|
+
|
|
186
|
+
# The current campaign attachment status for this phone number.
|
|
187
|
+
sig do
|
|
188
|
+
returns(
|
|
189
|
+
SurgeAPI::PhoneNumberImportedWebhookEvent::Data::Campaign::AttachmentStatus::TaggedSymbol
|
|
190
|
+
)
|
|
191
|
+
end
|
|
192
|
+
attr_accessor :attachment_status
|
|
193
|
+
|
|
194
|
+
# Campaign attachment details for a domestic local phone number
|
|
195
|
+
sig do
|
|
196
|
+
params(
|
|
197
|
+
id: String,
|
|
198
|
+
attachment_status:
|
|
199
|
+
SurgeAPI::PhoneNumberImportedWebhookEvent::Data::Campaign::AttachmentStatus::OrSymbol
|
|
200
|
+
).returns(T.attached_class)
|
|
201
|
+
end
|
|
202
|
+
def self.new(
|
|
203
|
+
# The unique identifier of the campaign this phone number is attached to
|
|
204
|
+
id:,
|
|
205
|
+
# The current campaign attachment status for this phone number.
|
|
206
|
+
attachment_status:
|
|
207
|
+
)
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
sig do
|
|
211
|
+
override.returns(
|
|
212
|
+
{
|
|
213
|
+
id: String,
|
|
214
|
+
attachment_status:
|
|
215
|
+
SurgeAPI::PhoneNumberImportedWebhookEvent::Data::Campaign::AttachmentStatus::TaggedSymbol
|
|
216
|
+
}
|
|
217
|
+
)
|
|
218
|
+
end
|
|
219
|
+
def to_hash
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# The current campaign attachment status for this phone number.
|
|
223
|
+
module AttachmentStatus
|
|
224
|
+
extend SurgeAPI::Internal::Type::Enum
|
|
225
|
+
|
|
226
|
+
TaggedSymbol =
|
|
227
|
+
T.type_alias do
|
|
228
|
+
T.all(
|
|
229
|
+
Symbol,
|
|
230
|
+
SurgeAPI::PhoneNumberImportedWebhookEvent::Data::Campaign::AttachmentStatus
|
|
231
|
+
)
|
|
232
|
+
end
|
|
233
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
234
|
+
|
|
235
|
+
ATTACHED =
|
|
236
|
+
T.let(
|
|
237
|
+
:attached,
|
|
238
|
+
SurgeAPI::PhoneNumberImportedWebhookEvent::Data::Campaign::AttachmentStatus::TaggedSymbol
|
|
239
|
+
)
|
|
240
|
+
ATTACHMENT_PENDING =
|
|
241
|
+
T.let(
|
|
242
|
+
:attachment_pending,
|
|
243
|
+
SurgeAPI::PhoneNumberImportedWebhookEvent::Data::Campaign::AttachmentStatus::TaggedSymbol
|
|
244
|
+
)
|
|
245
|
+
DETACHED =
|
|
246
|
+
T.let(
|
|
247
|
+
:detached,
|
|
248
|
+
SurgeAPI::PhoneNumberImportedWebhookEvent::Data::Campaign::AttachmentStatus::TaggedSymbol
|
|
249
|
+
)
|
|
250
|
+
DETACHMENT_PENDING =
|
|
251
|
+
T.let(
|
|
252
|
+
:detachment_pending,
|
|
253
|
+
SurgeAPI::PhoneNumberImportedWebhookEvent::Data::Campaign::AttachmentStatus::TaggedSymbol
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
sig do
|
|
257
|
+
override.returns(
|
|
258
|
+
T::Array[
|
|
259
|
+
SurgeAPI::PhoneNumberImportedWebhookEvent::Data::Campaign::AttachmentStatus::TaggedSymbol
|
|
260
|
+
]
|
|
261
|
+
)
|
|
262
|
+
end
|
|
263
|
+
def self.values
|
|
264
|
+
end
|
|
265
|
+
end
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
# Whether the phone number is local, toll-free, or short code
|
|
269
|
+
module Type
|
|
270
|
+
extend SurgeAPI::Internal::Type::Enum
|
|
271
|
+
|
|
272
|
+
TaggedSymbol =
|
|
273
|
+
T.type_alias do
|
|
274
|
+
T.all(
|
|
275
|
+
Symbol,
|
|
276
|
+
SurgeAPI::PhoneNumberImportedWebhookEvent::Data::Type
|
|
277
|
+
)
|
|
278
|
+
end
|
|
279
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
280
|
+
|
|
281
|
+
LOCAL =
|
|
282
|
+
T.let(
|
|
283
|
+
:local,
|
|
284
|
+
SurgeAPI::PhoneNumberImportedWebhookEvent::Data::Type::TaggedSymbol
|
|
285
|
+
)
|
|
286
|
+
SHORT_CODE =
|
|
287
|
+
T.let(
|
|
288
|
+
:short_code,
|
|
289
|
+
SurgeAPI::PhoneNumberImportedWebhookEvent::Data::Type::TaggedSymbol
|
|
290
|
+
)
|
|
291
|
+
TOLL_FREE =
|
|
292
|
+
T.let(
|
|
293
|
+
:toll_free,
|
|
294
|
+
SurgeAPI::PhoneNumberImportedWebhookEvent::Data::Type::TaggedSymbol
|
|
295
|
+
)
|
|
296
|
+
|
|
297
|
+
sig do
|
|
298
|
+
override.returns(
|
|
299
|
+
T::Array[
|
|
300
|
+
SurgeAPI::PhoneNumberImportedWebhookEvent::Data::Type::TaggedSymbol
|
|
301
|
+
]
|
|
302
|
+
)
|
|
303
|
+
end
|
|
304
|
+
def self.values
|
|
305
|
+
end
|
|
306
|
+
end
|
|
307
|
+
end
|
|
308
|
+
end
|
|
309
|
+
end
|
|
310
|
+
end
|
|
@@ -19,6 +19,7 @@ module SurgeAPI
|
|
|
19
19
|
SurgeAPI::MessageReceivedWebhookEvent,
|
|
20
20
|
SurgeAPI::MessageSentWebhookEvent,
|
|
21
21
|
SurgeAPI::PhoneNumberAttachedToCampaignWebhookEvent,
|
|
22
|
+
SurgeAPI::PhoneNumberImportedWebhookEvent,
|
|
22
23
|
SurgeAPI::RecordingCompletedWebhookEvent,
|
|
23
24
|
SurgeAPI::VoicemailReceivedWebhookEvent
|
|
24
25
|
)
|
data/rbi/surge_api/models.rbi
CHANGED
|
@@ -94,6 +94,9 @@ module SurgeAPI
|
|
|
94
94
|
PhoneNumberAttachedToCampaignWebhookEvent =
|
|
95
95
|
SurgeAPI::Models::PhoneNumberAttachedToCampaignWebhookEvent
|
|
96
96
|
|
|
97
|
+
PhoneNumberImportedWebhookEvent =
|
|
98
|
+
SurgeAPI::Models::PhoneNumberImportedWebhookEvent
|
|
99
|
+
|
|
97
100
|
PhoneNumberListAvailableNumbersParams =
|
|
98
101
|
SurgeAPI::Models::PhoneNumberListAvailableNumbersParams
|
|
99
102
|
|
|
@@ -21,6 +21,7 @@ module SurgeAPI
|
|
|
21
21
|
SurgeAPI::MessageReceivedWebhookEvent,
|
|
22
22
|
SurgeAPI::MessageSentWebhookEvent,
|
|
23
23
|
SurgeAPI::PhoneNumberAttachedToCampaignWebhookEvent,
|
|
24
|
+
SurgeAPI::PhoneNumberImportedWebhookEvent,
|
|
24
25
|
SurgeAPI::RecordingCompletedWebhookEvent,
|
|
25
26
|
SurgeAPI::VoicemailReceivedWebhookEvent
|
|
26
27
|
)
|
|
@@ -31,12 +31,13 @@ module SurgeAPI
|
|
|
31
31
|
request_options: SurgeAPI::RequestOptions
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
type capability = :local_messaging
|
|
34
|
+
type capability = :local_messaging | :toll_free_messaging
|
|
35
35
|
|
|
36
36
|
module Capability
|
|
37
37
|
extend SurgeAPI::Internal::Type::Enum
|
|
38
38
|
|
|
39
39
|
LOCAL_MESSAGING: :local_messaging
|
|
40
|
+
TOLL_FREE_MESSAGING: :toll_free_messaging
|
|
40
41
|
|
|
41
42
|
def self?.values: -> ::Array[SurgeAPI::Models::AccountRetrieveStatusParams::capability]
|
|
42
43
|
end
|
|
@@ -83,13 +83,15 @@ module SurgeAPI
|
|
|
83
83
|
def self?.values: -> ::Array[SurgeAPI::Models::Campaign::include_]
|
|
84
84
|
end
|
|
85
85
|
|
|
86
|
-
type status =
|
|
86
|
+
type status =
|
|
87
|
+
:active | :canceled | :rejected | :created | :deactivated | :in_review
|
|
87
88
|
|
|
88
89
|
module Status
|
|
89
90
|
extend SurgeAPI::Internal::Type::Enum
|
|
90
91
|
|
|
91
92
|
ACTIVE: :active
|
|
92
93
|
CANCELED: :canceled
|
|
94
|
+
REJECTED: :rejected
|
|
93
95
|
CREATED: :created
|
|
94
96
|
DEACTIVATED: :deactivated
|
|
95
97
|
IN_REVIEW: :in_review
|
|
@@ -7,7 +7,8 @@ module SurgeAPI
|
|
|
7
7
|
blast_id: String?,
|
|
8
8
|
body: String?,
|
|
9
9
|
conversation: SurgeAPI::Message::Conversation,
|
|
10
|
-
metadata: ::Hash[Symbol, String]
|
|
10
|
+
metadata: ::Hash[Symbol, String],
|
|
11
|
+
status: SurgeAPI::Models::Message::status
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
class Message < SurgeAPI::Internal::Type::BaseModel
|
|
@@ -35,13 +36,20 @@ module SurgeAPI
|
|
|
35
36
|
|
|
36
37
|
def metadata=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
|
|
37
38
|
|
|
39
|
+
attr_reader status: SurgeAPI::Models::Message::status?
|
|
40
|
+
|
|
41
|
+
def status=: (
|
|
42
|
+
SurgeAPI::Models::Message::status
|
|
43
|
+
) -> SurgeAPI::Models::Message::status
|
|
44
|
+
|
|
38
45
|
def initialize: (
|
|
39
46
|
?id: String,
|
|
40
47
|
?attachments: ::Array[SurgeAPI::Message::Attachment],
|
|
41
48
|
?blast_id: String?,
|
|
42
49
|
?body: String?,
|
|
43
50
|
?conversation: SurgeAPI::Message::Conversation,
|
|
44
|
-
?metadata: ::Hash[Symbol, String]
|
|
51
|
+
?metadata: ::Hash[Symbol, String],
|
|
52
|
+
?status: SurgeAPI::Models::Message::status
|
|
45
53
|
) -> void
|
|
46
54
|
|
|
47
55
|
def to_hash: -> {
|
|
@@ -50,7 +58,8 @@ module SurgeAPI
|
|
|
50
58
|
blast_id: String?,
|
|
51
59
|
body: String?,
|
|
52
60
|
conversation: SurgeAPI::Message::Conversation,
|
|
53
|
-
metadata: ::Hash[Symbol, String]
|
|
61
|
+
metadata: ::Hash[Symbol, String],
|
|
62
|
+
status: SurgeAPI::Models::Message::status
|
|
54
63
|
}
|
|
55
64
|
|
|
56
65
|
type attachment =
|
|
@@ -177,6 +186,20 @@ module SurgeAPI
|
|
|
177
186
|
end
|
|
178
187
|
end
|
|
179
188
|
end
|
|
189
|
+
|
|
190
|
+
type status = :pending | :received | :sent | :delivered | :failed
|
|
191
|
+
|
|
192
|
+
module Status
|
|
193
|
+
extend SurgeAPI::Internal::Type::Enum
|
|
194
|
+
|
|
195
|
+
PENDING: :pending
|
|
196
|
+
RECEIVED: :received
|
|
197
|
+
SENT: :sent
|
|
198
|
+
DELIVERED: :delivered
|
|
199
|
+
FAILED: :failed
|
|
200
|
+
|
|
201
|
+
def self?.values: -> ::Array[SurgeAPI::Models::Message::status]
|
|
202
|
+
end
|
|
180
203
|
end
|
|
181
204
|
end
|
|
182
205
|
end
|
|
@@ -38,6 +38,7 @@ module SurgeAPI
|
|
|
38
38
|
conversation: SurgeAPI::MessageDeliveredWebhookEvent::Data::Conversation,
|
|
39
39
|
delivered_at: Time,
|
|
40
40
|
metadata: ::Hash[Symbol, String],
|
|
41
|
+
status: SurgeAPI::Models::MessageDeliveredWebhookEvent::Data::status,
|
|
41
42
|
attachments: ::Array[SurgeAPI::MessageDeliveredWebhookEvent::Data::Attachment],
|
|
42
43
|
blast_id: String
|
|
43
44
|
}
|
|
@@ -53,6 +54,8 @@ module SurgeAPI
|
|
|
53
54
|
|
|
54
55
|
attr_accessor metadata: ::Hash[Symbol, String]
|
|
55
56
|
|
|
57
|
+
attr_accessor status: SurgeAPI::Models::MessageDeliveredWebhookEvent::Data::status
|
|
58
|
+
|
|
56
59
|
attr_reader attachments: ::Array[SurgeAPI::MessageDeliveredWebhookEvent::Data::Attachment]?
|
|
57
60
|
|
|
58
61
|
def attachments=: (
|
|
@@ -69,6 +72,7 @@ module SurgeAPI
|
|
|
69
72
|
conversation: SurgeAPI::MessageDeliveredWebhookEvent::Data::Conversation,
|
|
70
73
|
delivered_at: Time,
|
|
71
74
|
metadata: ::Hash[Symbol, String],
|
|
75
|
+
status: SurgeAPI::Models::MessageDeliveredWebhookEvent::Data::status,
|
|
72
76
|
?attachments: ::Array[SurgeAPI::MessageDeliveredWebhookEvent::Data::Attachment],
|
|
73
77
|
?blast_id: String
|
|
74
78
|
) -> void
|
|
@@ -79,6 +83,7 @@ module SurgeAPI
|
|
|
79
83
|
conversation: SurgeAPI::MessageDeliveredWebhookEvent::Data::Conversation,
|
|
80
84
|
delivered_at: Time,
|
|
81
85
|
metadata: ::Hash[Symbol, String],
|
|
86
|
+
status: SurgeAPI::Models::MessageDeliveredWebhookEvent::Data::status,
|
|
82
87
|
attachments: ::Array[SurgeAPI::MessageDeliveredWebhookEvent::Data::Attachment],
|
|
83
88
|
blast_id: String
|
|
84
89
|
}
|
|
@@ -110,6 +115,16 @@ module SurgeAPI
|
|
|
110
115
|
}
|
|
111
116
|
end
|
|
112
117
|
|
|
118
|
+
type status = :delivered
|
|
119
|
+
|
|
120
|
+
module Status
|
|
121
|
+
extend SurgeAPI::Internal::Type::Enum
|
|
122
|
+
|
|
123
|
+
DELIVERED: :delivered
|
|
124
|
+
|
|
125
|
+
def self?.values: -> ::Array[SurgeAPI::Models::MessageDeliveredWebhookEvent::Data::status]
|
|
126
|
+
end
|
|
127
|
+
|
|
113
128
|
type attachment =
|
|
114
129
|
{
|
|
115
130
|
id: String,
|
|
@@ -39,6 +39,7 @@ module SurgeAPI
|
|
|
39
39
|
failed_at: Time,
|
|
40
40
|
failure_reason: String,
|
|
41
41
|
metadata: ::Hash[Symbol, String],
|
|
42
|
+
status: SurgeAPI::Models::MessageFailedWebhookEvent::Data::status,
|
|
42
43
|
attachments: ::Array[SurgeAPI::MessageFailedWebhookEvent::Data::Attachment],
|
|
43
44
|
blast_id: String
|
|
44
45
|
}
|
|
@@ -56,6 +57,8 @@ module SurgeAPI
|
|
|
56
57
|
|
|
57
58
|
attr_accessor metadata: ::Hash[Symbol, String]
|
|
58
59
|
|
|
60
|
+
attr_accessor status: SurgeAPI::Models::MessageFailedWebhookEvent::Data::status
|
|
61
|
+
|
|
59
62
|
attr_reader attachments: ::Array[SurgeAPI::MessageFailedWebhookEvent::Data::Attachment]?
|
|
60
63
|
|
|
61
64
|
def attachments=: (
|
|
@@ -73,6 +76,7 @@ module SurgeAPI
|
|
|
73
76
|
failed_at: Time,
|
|
74
77
|
failure_reason: String,
|
|
75
78
|
metadata: ::Hash[Symbol, String],
|
|
79
|
+
status: SurgeAPI::Models::MessageFailedWebhookEvent::Data::status,
|
|
76
80
|
?attachments: ::Array[SurgeAPI::MessageFailedWebhookEvent::Data::Attachment],
|
|
77
81
|
?blast_id: String
|
|
78
82
|
) -> void
|
|
@@ -84,6 +88,7 @@ module SurgeAPI
|
|
|
84
88
|
failed_at: Time,
|
|
85
89
|
failure_reason: String,
|
|
86
90
|
metadata: ::Hash[Symbol, String],
|
|
91
|
+
status: SurgeAPI::Models::MessageFailedWebhookEvent::Data::status,
|
|
87
92
|
attachments: ::Array[SurgeAPI::MessageFailedWebhookEvent::Data::Attachment],
|
|
88
93
|
blast_id: String
|
|
89
94
|
}
|
|
@@ -115,6 +120,16 @@ module SurgeAPI
|
|
|
115
120
|
}
|
|
116
121
|
end
|
|
117
122
|
|
|
123
|
+
type status = :failed
|
|
124
|
+
|
|
125
|
+
module Status
|
|
126
|
+
extend SurgeAPI::Internal::Type::Enum
|
|
127
|
+
|
|
128
|
+
FAILED: :failed
|
|
129
|
+
|
|
130
|
+
def self?.values: -> ::Array[SurgeAPI::Models::MessageFailedWebhookEvent::Data::status]
|
|
131
|
+
end
|
|
132
|
+
|
|
118
133
|
type attachment =
|
|
119
134
|
{
|
|
120
135
|
id: String,
|
|
@@ -38,6 +38,7 @@ module SurgeAPI
|
|
|
38
38
|
conversation: SurgeAPI::MessageReceivedWebhookEvent::Data::Conversation,
|
|
39
39
|
metadata: ::Hash[Symbol, String],
|
|
40
40
|
received_at: Time,
|
|
41
|
+
status: SurgeAPI::Models::MessageReceivedWebhookEvent::Data::status,
|
|
41
42
|
attachments: ::Array[SurgeAPI::MessageReceivedWebhookEvent::Data::Attachment],
|
|
42
43
|
blast_id: String
|
|
43
44
|
}
|
|
@@ -53,6 +54,8 @@ module SurgeAPI
|
|
|
53
54
|
|
|
54
55
|
attr_accessor received_at: Time
|
|
55
56
|
|
|
57
|
+
attr_accessor status: SurgeAPI::Models::MessageReceivedWebhookEvent::Data::status
|
|
58
|
+
|
|
56
59
|
attr_reader attachments: ::Array[SurgeAPI::MessageReceivedWebhookEvent::Data::Attachment]?
|
|
57
60
|
|
|
58
61
|
def attachments=: (
|
|
@@ -69,6 +72,7 @@ module SurgeAPI
|
|
|
69
72
|
conversation: SurgeAPI::MessageReceivedWebhookEvent::Data::Conversation,
|
|
70
73
|
metadata: ::Hash[Symbol, String],
|
|
71
74
|
received_at: Time,
|
|
75
|
+
status: SurgeAPI::Models::MessageReceivedWebhookEvent::Data::status,
|
|
72
76
|
?attachments: ::Array[SurgeAPI::MessageReceivedWebhookEvent::Data::Attachment],
|
|
73
77
|
?blast_id: String
|
|
74
78
|
) -> void
|
|
@@ -79,6 +83,7 @@ module SurgeAPI
|
|
|
79
83
|
conversation: SurgeAPI::MessageReceivedWebhookEvent::Data::Conversation,
|
|
80
84
|
metadata: ::Hash[Symbol, String],
|
|
81
85
|
received_at: Time,
|
|
86
|
+
status: SurgeAPI::Models::MessageReceivedWebhookEvent::Data::status,
|
|
82
87
|
attachments: ::Array[SurgeAPI::MessageReceivedWebhookEvent::Data::Attachment],
|
|
83
88
|
blast_id: String
|
|
84
89
|
}
|
|
@@ -110,6 +115,16 @@ module SurgeAPI
|
|
|
110
115
|
}
|
|
111
116
|
end
|
|
112
117
|
|
|
118
|
+
type status = :received
|
|
119
|
+
|
|
120
|
+
module Status
|
|
121
|
+
extend SurgeAPI::Internal::Type::Enum
|
|
122
|
+
|
|
123
|
+
RECEIVED: :received
|
|
124
|
+
|
|
125
|
+
def self?.values: -> ::Array[SurgeAPI::Models::MessageReceivedWebhookEvent::Data::status]
|
|
126
|
+
end
|
|
127
|
+
|
|
113
128
|
type attachment =
|
|
114
129
|
{
|
|
115
130
|
id: String,
|
|
@@ -38,6 +38,7 @@ module SurgeAPI
|
|
|
38
38
|
conversation: SurgeAPI::MessageSentWebhookEvent::Data::Conversation,
|
|
39
39
|
metadata: ::Hash[Symbol, String],
|
|
40
40
|
sent_at: Time,
|
|
41
|
+
status: SurgeAPI::Models::MessageSentWebhookEvent::Data::status,
|
|
41
42
|
attachments: ::Array[SurgeAPI::MessageSentWebhookEvent::Data::Attachment],
|
|
42
43
|
blast_id: String
|
|
43
44
|
}
|
|
@@ -53,6 +54,8 @@ module SurgeAPI
|
|
|
53
54
|
|
|
54
55
|
attr_accessor sent_at: Time
|
|
55
56
|
|
|
57
|
+
attr_accessor status: SurgeAPI::Models::MessageSentWebhookEvent::Data::status
|
|
58
|
+
|
|
56
59
|
attr_reader attachments: ::Array[SurgeAPI::MessageSentWebhookEvent::Data::Attachment]?
|
|
57
60
|
|
|
58
61
|
def attachments=: (
|
|
@@ -69,6 +72,7 @@ module SurgeAPI
|
|
|
69
72
|
conversation: SurgeAPI::MessageSentWebhookEvent::Data::Conversation,
|
|
70
73
|
metadata: ::Hash[Symbol, String],
|
|
71
74
|
sent_at: Time,
|
|
75
|
+
status: SurgeAPI::Models::MessageSentWebhookEvent::Data::status,
|
|
72
76
|
?attachments: ::Array[SurgeAPI::MessageSentWebhookEvent::Data::Attachment],
|
|
73
77
|
?blast_id: String
|
|
74
78
|
) -> void
|
|
@@ -79,6 +83,7 @@ module SurgeAPI
|
|
|
79
83
|
conversation: SurgeAPI::MessageSentWebhookEvent::Data::Conversation,
|
|
80
84
|
metadata: ::Hash[Symbol, String],
|
|
81
85
|
sent_at: Time,
|
|
86
|
+
status: SurgeAPI::Models::MessageSentWebhookEvent::Data::status,
|
|
82
87
|
attachments: ::Array[SurgeAPI::MessageSentWebhookEvent::Data::Attachment],
|
|
83
88
|
blast_id: String
|
|
84
89
|
}
|
|
@@ -110,6 +115,16 @@ module SurgeAPI
|
|
|
110
115
|
}
|
|
111
116
|
end
|
|
112
117
|
|
|
118
|
+
type status = :sent
|
|
119
|
+
|
|
120
|
+
module Status
|
|
121
|
+
extend SurgeAPI::Internal::Type::Enum
|
|
122
|
+
|
|
123
|
+
SENT: :sent
|
|
124
|
+
|
|
125
|
+
def self?.values: -> ::Array[SurgeAPI::Models::MessageSentWebhookEvent::Data::status]
|
|
126
|
+
end
|
|
127
|
+
|
|
113
128
|
type attachment =
|
|
114
129
|
{
|
|
115
130
|
id: String,
|