surge_api 0.6.0 → 0.8.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 +18 -0
- data/README.md +1 -1
- data/lib/surge_api/models/blast_create_params.rb +11 -1
- data/lib/surge_api/models/message.rb +21 -1
- data/lib/surge_api/models/message_delivered_webhook_event.rb +13 -1
- data/lib/surge_api/models/message_failed_webhook_event.rb +13 -1
- data/lib/surge_api/models/message_params.rb +18 -2
- data/lib/surge_api/models/message_received_webhook_event.rb +13 -1
- data/lib/surge_api/models/message_sent_webhook_event.rb +13 -1
- data/lib/surge_api/models/phone_number.rb +1 -0
- data/lib/surge_api/resources/blasts.rb +3 -1
- data/lib/surge_api/version.rb +1 -1
- data/rbi/surge_api/models/blast_create_params.rbi +15 -0
- data/rbi/surge_api/models/message.rbi +27 -3
- data/rbi/surge_api/models/message_delivered_webhook_event.rbi +16 -3
- data/rbi/surge_api/models/message_failed_webhook_event.rbi +16 -3
- data/rbi/surge_api/models/message_params.rbi +22 -0
- data/rbi/surge_api/models/message_received_webhook_event.rbi +16 -3
- data/rbi/surge_api/models/message_sent_webhook_event.rbi +16 -3
- data/rbi/surge_api/models/phone_number.rbi +2 -0
- data/rbi/surge_api/resources/blasts.rbi +5 -0
- data/sig/surge_api/models/blast_create_params.rbs +7 -0
- data/sig/surge_api/models/message.rbs +17 -3
- data/sig/surge_api/models/message_delivered_webhook_event.rbs +10 -3
- data/sig/surge_api/models/message_failed_webhook_event.rbs +10 -3
- data/sig/surge_api/models/message_params.rbs +14 -0
- data/sig/surge_api/models/message_received_webhook_event.rbs +10 -3
- data/sig/surge_api/models/message_sent_webhook_event.rbs +10 -3
- data/sig/surge_api/models/phone_number.rbs +2 -1
- data/sig/surge_api/resources/blasts.rbs +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4d974f7f96df8e8e8452c8693d8afe99108691e4765da89ed06670ad635f3a48
|
|
4
|
+
data.tar.gz: 4f7eedf44e0f6c2b0d076f2c590d07519c666ae2d20fc12a5b0cef4fa2b451dd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4b03295d43f70c73f3db451516682c5ff8e5e7c081db91e7ed98628500f3f7cb637952dc60631f76e6d83dbf8a571ca1c90e4fb0dc3ce00ae0b759ca1ed8bfeb
|
|
7
|
+
data.tar.gz: 44ec0232e66a93b385447ccc5cd6ee433d7f3e944e96b69c2cf7badde81fdf46b630b9501a386067bffc10896de0eb864c2720814fe4e295fcc1a924fd8f2205
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.8.0 (2026-01-26)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.7.0...v0.8.0](https://github.com/surgeapi/ruby-sdk/compare/v0.7.0...v0.8.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([37c4efa](https://github.com/surgeapi/ruby-sdk/commit/37c4efa6bdcad247f43f50a49b59a7b4426d6fc8))
|
|
10
|
+
* **api:** api update ([0caf848](https://github.com/surgeapi/ruby-sdk/commit/0caf848fba60e7cda89b326c51bb7c168ad95187))
|
|
11
|
+
* **api:** api update ([f3c40f2](https://github.com/surgeapi/ruby-sdk/commit/f3c40f28c70eb38a08e4021a24230564edab8592))
|
|
12
|
+
|
|
13
|
+
## 0.7.0 (2026-01-18)
|
|
14
|
+
|
|
15
|
+
Full Changelog: [v0.6.0...v0.7.0](https://github.com/surgeapi/ruby-sdk/compare/v0.6.0...v0.7.0)
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **api:** api update ([3eaef18](https://github.com/surgeapi/ruby-sdk/commit/3eaef1827965563c4aba448425c32a7850d8d5ba))
|
|
20
|
+
|
|
3
21
|
## 0.6.0 (2026-01-18)
|
|
4
22
|
|
|
5
23
|
Full Changelog: [v0.5.0...v0.6.0](https://github.com/surgeapi/ruby-sdk/compare/v0.5.0...v0.6.0)
|
data/README.md
CHANGED
|
@@ -26,6 +26,14 @@ module SurgeAPI
|
|
|
26
26
|
# @return [Array<String>, nil]
|
|
27
27
|
optional :contacts, SurgeAPI::Internal::Type::ArrayOf[String]
|
|
28
28
|
|
|
29
|
+
# @!attribute from
|
|
30
|
+
# The phone number from which to send the blast. This can be either the phone
|
|
31
|
+
# number in E.164 format or a Surge phone number id. If not provided, the
|
|
32
|
+
# account's default phone number is used.
|
|
33
|
+
#
|
|
34
|
+
# @return [String, nil]
|
|
35
|
+
optional :from, String
|
|
36
|
+
|
|
29
37
|
# @!attribute name
|
|
30
38
|
# Optional name for the blast.
|
|
31
39
|
#
|
|
@@ -53,7 +61,7 @@ module SurgeAPI
|
|
|
53
61
|
# @return [Array<String>, nil]
|
|
54
62
|
optional :to, SurgeAPI::Internal::Type::ArrayOf[String]
|
|
55
63
|
|
|
56
|
-
# @!method initialize(attachments: nil, body: nil, contacts: nil, name: nil, segments: nil, send_at: nil, to: nil, request_options: {})
|
|
64
|
+
# @!method initialize(attachments: nil, body: nil, contacts: nil, from: nil, name: nil, segments: nil, send_at: nil, to: nil, request_options: {})
|
|
57
65
|
# Some parameter documentations has been truncated, see
|
|
58
66
|
# {SurgeAPI::Models::BlastCreateParams} for more details.
|
|
59
67
|
#
|
|
@@ -63,6 +71,8 @@ module SurgeAPI
|
|
|
63
71
|
#
|
|
64
72
|
# @param contacts [Array<String>] Deprecated. Use `to` instead.
|
|
65
73
|
#
|
|
74
|
+
# @param from [String] The phone number from which to send the blast. This can be either the phone numb
|
|
75
|
+
#
|
|
66
76
|
# @param name [String] Optional name for the blast.
|
|
67
77
|
#
|
|
68
78
|
# @param segments [Array<String>] Deprecated. Use `to` instead.
|
|
@@ -15,6 +15,13 @@ module SurgeAPI
|
|
|
15
15
|
# @return [Array<SurgeAPI::Models::Message::Attachment>, nil]
|
|
16
16
|
optional :attachments, -> { SurgeAPI::Internal::Type::ArrayOf[SurgeAPI::Message::Attachment] }
|
|
17
17
|
|
|
18
|
+
# @!attribute blast_id
|
|
19
|
+
# The ID of the blast this message belongs to, if any. This can be used to
|
|
20
|
+
# attribute messages back to a specific blast.
|
|
21
|
+
#
|
|
22
|
+
# @return [String, nil]
|
|
23
|
+
optional :blast_id, String
|
|
24
|
+
|
|
18
25
|
# @!attribute body
|
|
19
26
|
# The message body.
|
|
20
27
|
#
|
|
@@ -27,16 +34,29 @@ module SurgeAPI
|
|
|
27
34
|
# @return [SurgeAPI::Models::Message::Conversation, nil]
|
|
28
35
|
optional :conversation, -> { SurgeAPI::Message::Conversation }
|
|
29
36
|
|
|
30
|
-
# @!
|
|
37
|
+
# @!attribute metadata
|
|
38
|
+
# Set of key-value pairs that will be stored with the object.
|
|
39
|
+
#
|
|
40
|
+
# @return [Hash{Symbol=>String}, nil]
|
|
41
|
+
optional :metadata, SurgeAPI::Internal::Type::HashOf[String]
|
|
42
|
+
|
|
43
|
+
# @!method initialize(id: nil, attachments: nil, blast_id: nil, body: nil, conversation: nil, metadata: nil)
|
|
44
|
+
# Some parameter documentations has been truncated, see
|
|
45
|
+
# {SurgeAPI::Models::Message} for more details.
|
|
46
|
+
#
|
|
31
47
|
# A Message is a communication sent to a Contact.
|
|
32
48
|
#
|
|
33
49
|
# @param id [String] Unique identifier for the object.
|
|
34
50
|
#
|
|
35
51
|
# @param attachments [Array<SurgeAPI::Models::Message::Attachment>]
|
|
36
52
|
#
|
|
53
|
+
# @param blast_id [String] The ID of the blast this message belongs to, if any. This can be used to attribu
|
|
54
|
+
#
|
|
37
55
|
# @param body [String] The message body.
|
|
38
56
|
#
|
|
39
57
|
# @param conversation [SurgeAPI::Models::Message::Conversation] A conversation with a Contact
|
|
58
|
+
#
|
|
59
|
+
# @param metadata [Hash{Symbol=>String}] Set of key-value pairs that will be stored with the object.
|
|
40
60
|
|
|
41
61
|
class Attachment < SurgeAPI::Internal::Type::BaseModel
|
|
42
62
|
# @!attribute id
|
|
@@ -69,7 +69,17 @@ module SurgeAPI
|
|
|
69
69
|
optional :attachments,
|
|
70
70
|
-> { SurgeAPI::Internal::Type::ArrayOf[SurgeAPI::MessageDeliveredWebhookEvent::Data::Attachment] }
|
|
71
71
|
|
|
72
|
-
# @!
|
|
72
|
+
# @!attribute blast_id
|
|
73
|
+
# The ID of the blast this message belongs to, if any. This can be used to
|
|
74
|
+
# attribute messages back to a specific blast.
|
|
75
|
+
#
|
|
76
|
+
# @return [String, nil]
|
|
77
|
+
optional :blast_id, String
|
|
78
|
+
|
|
79
|
+
# @!method initialize(id:, body:, conversation:, delivered_at:, attachments: nil, blast_id: nil)
|
|
80
|
+
# Some parameter documentations has been truncated, see
|
|
81
|
+
# {SurgeAPI::Models::MessageDeliveredWebhookEvent::Data} for more details.
|
|
82
|
+
#
|
|
73
83
|
# The data associated with the event
|
|
74
84
|
#
|
|
75
85
|
# @param id [String] The unique identifier for the message
|
|
@@ -81,6 +91,8 @@ module SurgeAPI
|
|
|
81
91
|
# @param delivered_at [Time] When the message was delivered
|
|
82
92
|
#
|
|
83
93
|
# @param attachments [Array<SurgeAPI::Models::MessageDeliveredWebhookEvent::Data::Attachment>] Attachments included with the message
|
|
94
|
+
#
|
|
95
|
+
# @param blast_id [String] The ID of the blast this message belongs to, if any. This can be used to attribu
|
|
84
96
|
|
|
85
97
|
# @see SurgeAPI::Models::MessageDeliveredWebhookEvent::Data#conversation
|
|
86
98
|
class Conversation < SurgeAPI::Internal::Type::BaseModel
|
|
@@ -75,7 +75,17 @@ module SurgeAPI
|
|
|
75
75
|
optional :attachments,
|
|
76
76
|
-> { SurgeAPI::Internal::Type::ArrayOf[SurgeAPI::MessageFailedWebhookEvent::Data::Attachment] }
|
|
77
77
|
|
|
78
|
-
# @!
|
|
78
|
+
# @!attribute blast_id
|
|
79
|
+
# The ID of the blast this message belongs to, if any. This can be used to
|
|
80
|
+
# attribute messages back to a specific blast.
|
|
81
|
+
#
|
|
82
|
+
# @return [String, nil]
|
|
83
|
+
optional :blast_id, String
|
|
84
|
+
|
|
85
|
+
# @!method initialize(id:, body:, conversation:, failed_at:, failure_reason:, attachments: nil, blast_id: nil)
|
|
86
|
+
# Some parameter documentations has been truncated, see
|
|
87
|
+
# {SurgeAPI::Models::MessageFailedWebhookEvent::Data} for more details.
|
|
88
|
+
#
|
|
79
89
|
# The data associated with the event
|
|
80
90
|
#
|
|
81
91
|
# @param id [String] The unique identifier for the message
|
|
@@ -89,6 +99,8 @@ module SurgeAPI
|
|
|
89
99
|
# @param failure_reason [String] The reason the message failed to be delivered
|
|
90
100
|
#
|
|
91
101
|
# @param attachments [Array<SurgeAPI::Models::MessageFailedWebhookEvent::Data::Attachment>] Attachments included with the message
|
|
102
|
+
#
|
|
103
|
+
# @param blast_id [String] The ID of the blast this message belongs to, if any. This can be used to attribu
|
|
92
104
|
|
|
93
105
|
# @see SurgeAPI::Models::MessageFailedWebhookEvent::Data#conversation
|
|
94
106
|
class Conversation < SurgeAPI::Internal::Type::BaseModel
|
|
@@ -34,6 +34,12 @@ module SurgeAPI
|
|
|
34
34
|
# @return [String, nil]
|
|
35
35
|
optional :body, String
|
|
36
36
|
|
|
37
|
+
# @!attribute metadata
|
|
38
|
+
# Set of key-value pairs that will be stored with the object.
|
|
39
|
+
#
|
|
40
|
+
# @return [Hash{Symbol=>String}, nil]
|
|
41
|
+
optional :metadata, SurgeAPI::Internal::Type::HashOf[String]
|
|
42
|
+
|
|
37
43
|
# @!attribute send_at
|
|
38
44
|
# An optional datetime for scheduling message up to a couple of months in the
|
|
39
45
|
# future.
|
|
@@ -41,7 +47,7 @@ module SurgeAPI
|
|
|
41
47
|
# @return [Time, nil]
|
|
42
48
|
optional :send_at, Time
|
|
43
49
|
|
|
44
|
-
# @!method initialize(conversation:, attachments: nil, body: nil, send_at: nil)
|
|
50
|
+
# @!method initialize(conversation:, attachments: nil, body: nil, metadata: nil, send_at: nil)
|
|
45
51
|
# Some parameter documentations has been truncated, see
|
|
46
52
|
# {SurgeAPI::Models::MessageParams::MessageParamsWithConversation} for more
|
|
47
53
|
# details.
|
|
@@ -55,6 +61,8 @@ module SurgeAPI
|
|
|
55
61
|
#
|
|
56
62
|
# @param body [String] The message body.
|
|
57
63
|
#
|
|
64
|
+
# @param metadata [Hash{Symbol=>String}] Set of key-value pairs that will be stored with the object.
|
|
65
|
+
#
|
|
58
66
|
# @param send_at [Time] An optional datetime for scheduling message up to a couple of months in the futu
|
|
59
67
|
|
|
60
68
|
# @see SurgeAPI::Models::MessageParams::MessageParamsWithConversation#conversation
|
|
@@ -172,6 +180,12 @@ module SurgeAPI
|
|
|
172
180
|
# @return [String, nil]
|
|
173
181
|
optional :from, String
|
|
174
182
|
|
|
183
|
+
# @!attribute metadata
|
|
184
|
+
# Set of key-value pairs that will be stored with the object.
|
|
185
|
+
#
|
|
186
|
+
# @return [Hash{Symbol=>String}, nil]
|
|
187
|
+
optional :metadata, SurgeAPI::Internal::Type::HashOf[String]
|
|
188
|
+
|
|
175
189
|
# @!attribute send_at
|
|
176
190
|
# An optional datetime for scheduling message up to a couple of months in the
|
|
177
191
|
# future.
|
|
@@ -179,7 +193,7 @@ module SurgeAPI
|
|
|
179
193
|
# @return [Time, nil]
|
|
180
194
|
optional :send_at, Time
|
|
181
195
|
|
|
182
|
-
# @!method initialize(to:, attachments: nil, body: nil, from: nil, send_at: nil)
|
|
196
|
+
# @!method initialize(to:, attachments: nil, body: nil, from: nil, metadata: nil, send_at: nil)
|
|
183
197
|
# Some parameter documentations has been truncated, see
|
|
184
198
|
# {SurgeAPI::Models::MessageParams::SimpleMessageParams} for more details.
|
|
185
199
|
#
|
|
@@ -193,6 +207,8 @@ module SurgeAPI
|
|
|
193
207
|
#
|
|
194
208
|
# @param from [String] The sender's phone number in E.164 format or phone number ID. If omitted, uses t
|
|
195
209
|
#
|
|
210
|
+
# @param metadata [Hash{Symbol=>String}] Set of key-value pairs that will be stored with the object.
|
|
211
|
+
#
|
|
196
212
|
# @param send_at [Time] An optional datetime for scheduling message up to a couple of months in the futu
|
|
197
213
|
|
|
198
214
|
class Attachment < SurgeAPI::Internal::Type::BaseModel
|
|
@@ -69,7 +69,17 @@ module SurgeAPI
|
|
|
69
69
|
optional :attachments,
|
|
70
70
|
-> { SurgeAPI::Internal::Type::ArrayOf[SurgeAPI::MessageReceivedWebhookEvent::Data::Attachment] }
|
|
71
71
|
|
|
72
|
-
# @!
|
|
72
|
+
# @!attribute blast_id
|
|
73
|
+
# The ID of the blast this message belongs to, if any. This can be used to
|
|
74
|
+
# attribute messages back to a specific blast.
|
|
75
|
+
#
|
|
76
|
+
# @return [String, nil]
|
|
77
|
+
optional :blast_id, String
|
|
78
|
+
|
|
79
|
+
# @!method initialize(id:, body:, conversation:, received_at:, attachments: nil, blast_id: nil)
|
|
80
|
+
# Some parameter documentations has been truncated, see
|
|
81
|
+
# {SurgeAPI::Models::MessageReceivedWebhookEvent::Data} for more details.
|
|
82
|
+
#
|
|
73
83
|
# The data associated with the event
|
|
74
84
|
#
|
|
75
85
|
# @param id [String] The unique identifier for the message
|
|
@@ -81,6 +91,8 @@ module SurgeAPI
|
|
|
81
91
|
# @param received_at [Time] When the message was received
|
|
82
92
|
#
|
|
83
93
|
# @param attachments [Array<SurgeAPI::Models::MessageReceivedWebhookEvent::Data::Attachment>] Attachments included with the message
|
|
94
|
+
#
|
|
95
|
+
# @param blast_id [String] The ID of the blast this message belongs to, if any. This can be used to attribu
|
|
84
96
|
|
|
85
97
|
# @see SurgeAPI::Models::MessageReceivedWebhookEvent::Data#conversation
|
|
86
98
|
class Conversation < SurgeAPI::Internal::Type::BaseModel
|
|
@@ -69,7 +69,17 @@ module SurgeAPI
|
|
|
69
69
|
optional :attachments,
|
|
70
70
|
-> { SurgeAPI::Internal::Type::ArrayOf[SurgeAPI::MessageSentWebhookEvent::Data::Attachment] }
|
|
71
71
|
|
|
72
|
-
# @!
|
|
72
|
+
# @!attribute blast_id
|
|
73
|
+
# The ID of the blast this message belongs to, if any. This can be used to
|
|
74
|
+
# attribute messages back to a specific blast.
|
|
75
|
+
#
|
|
76
|
+
# @return [String, nil]
|
|
77
|
+
optional :blast_id, String
|
|
78
|
+
|
|
79
|
+
# @!method initialize(id:, body:, conversation:, sent_at:, attachments: nil, blast_id: nil)
|
|
80
|
+
# Some parameter documentations has been truncated, see
|
|
81
|
+
# {SurgeAPI::Models::MessageSentWebhookEvent::Data} for more details.
|
|
82
|
+
#
|
|
73
83
|
# The data associated with the event
|
|
74
84
|
#
|
|
75
85
|
# @param id [String] The unique identifier for the message
|
|
@@ -81,6 +91,8 @@ module SurgeAPI
|
|
|
81
91
|
# @param sent_at [Time] When the message was sent
|
|
82
92
|
#
|
|
83
93
|
# @param attachments [Array<SurgeAPI::Models::MessageSentWebhookEvent::Data::Attachment>] Attachments included with the message
|
|
94
|
+
#
|
|
95
|
+
# @param blast_id [String] The ID of the blast this message belongs to, if any. This can be used to attribu
|
|
84
96
|
|
|
85
97
|
# @see SurgeAPI::Models::MessageSentWebhookEvent::Data#conversation
|
|
86
98
|
class Conversation < SurgeAPI::Internal::Type::BaseModel
|
|
@@ -8,7 +8,7 @@ module SurgeAPI
|
|
|
8
8
|
#
|
|
9
9
|
# Sends a Blast.
|
|
10
10
|
#
|
|
11
|
-
# @overload create(account_id, attachments: nil, body: nil, contacts: nil, name: nil, segments: nil, send_at: nil, to: nil, request_options: {})
|
|
11
|
+
# @overload create(account_id, attachments: nil, body: nil, contacts: nil, from: nil, name: nil, segments: nil, send_at: nil, to: nil, request_options: {})
|
|
12
12
|
#
|
|
13
13
|
# @param account_id [String] The account for which the blast should be sent.
|
|
14
14
|
#
|
|
@@ -18,6 +18,8 @@ module SurgeAPI
|
|
|
18
18
|
#
|
|
19
19
|
# @param contacts [Array<String>] Deprecated. Use `to` instead.
|
|
20
20
|
#
|
|
21
|
+
# @param from [String] The phone number from which to send the blast. This can be either the phone numb
|
|
22
|
+
#
|
|
21
23
|
# @param name [String] Optional name for the blast.
|
|
22
24
|
#
|
|
23
25
|
# @param segments [Array<String>] Deprecated. Use `to` instead.
|
data/lib/surge_api/version.rb
CHANGED
|
@@ -37,6 +37,15 @@ module SurgeAPI
|
|
|
37
37
|
sig { params(contacts: T::Array[String]).void }
|
|
38
38
|
attr_writer :contacts
|
|
39
39
|
|
|
40
|
+
# The phone number from which to send the blast. This can be either the phone
|
|
41
|
+
# number in E.164 format or a Surge phone number id. If not provided, the
|
|
42
|
+
# account's default phone number is used.
|
|
43
|
+
sig { returns(T.nilable(String)) }
|
|
44
|
+
attr_reader :from
|
|
45
|
+
|
|
46
|
+
sig { params(from: String).void }
|
|
47
|
+
attr_writer :from
|
|
48
|
+
|
|
40
49
|
# Optional name for the blast.
|
|
41
50
|
sig { returns(T.nilable(String)) }
|
|
42
51
|
attr_reader :name
|
|
@@ -72,6 +81,7 @@ module SurgeAPI
|
|
|
72
81
|
T::Array[SurgeAPI::BlastCreateParams::Attachment::OrHash],
|
|
73
82
|
body: String,
|
|
74
83
|
contacts: T::Array[String],
|
|
84
|
+
from: String,
|
|
75
85
|
name: String,
|
|
76
86
|
segments: T::Array[String],
|
|
77
87
|
send_at: Time,
|
|
@@ -85,6 +95,10 @@ module SurgeAPI
|
|
|
85
95
|
body: nil,
|
|
86
96
|
# Deprecated. Use `to` instead.
|
|
87
97
|
contacts: nil,
|
|
98
|
+
# The phone number from which to send the blast. This can be either the phone
|
|
99
|
+
# number in E.164 format or a Surge phone number id. If not provided, the
|
|
100
|
+
# account's default phone number is used.
|
|
101
|
+
from: nil,
|
|
88
102
|
# Optional name for the blast.
|
|
89
103
|
name: nil,
|
|
90
104
|
# Deprecated. Use `to` instead.
|
|
@@ -104,6 +118,7 @@ module SurgeAPI
|
|
|
104
118
|
attachments: T::Array[SurgeAPI::BlastCreateParams::Attachment],
|
|
105
119
|
body: String,
|
|
106
120
|
contacts: T::Array[String],
|
|
121
|
+
from: String,
|
|
107
122
|
name: String,
|
|
108
123
|
segments: T::Array[String],
|
|
109
124
|
send_at: Time,
|
|
@@ -23,6 +23,14 @@ module SurgeAPI
|
|
|
23
23
|
end
|
|
24
24
|
attr_writer :attachments
|
|
25
25
|
|
|
26
|
+
# The ID of the blast this message belongs to, if any. This can be used to
|
|
27
|
+
# attribute messages back to a specific blast.
|
|
28
|
+
sig { returns(T.nilable(String)) }
|
|
29
|
+
attr_reader :blast_id
|
|
30
|
+
|
|
31
|
+
sig { params(blast_id: String).void }
|
|
32
|
+
attr_writer :blast_id
|
|
33
|
+
|
|
26
34
|
# The message body.
|
|
27
35
|
sig { returns(T.nilable(String)) }
|
|
28
36
|
attr_reader :body
|
|
@@ -37,23 +45,37 @@ module SurgeAPI
|
|
|
37
45
|
sig { params(conversation: SurgeAPI::Message::Conversation::OrHash).void }
|
|
38
46
|
attr_writer :conversation
|
|
39
47
|
|
|
48
|
+
# Set of key-value pairs that will be stored with the object.
|
|
49
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
50
|
+
attr_reader :metadata
|
|
51
|
+
|
|
52
|
+
sig { params(metadata: T::Hash[Symbol, String]).void }
|
|
53
|
+
attr_writer :metadata
|
|
54
|
+
|
|
40
55
|
# A Message is a communication sent to a Contact.
|
|
41
56
|
sig do
|
|
42
57
|
params(
|
|
43
58
|
id: String,
|
|
44
59
|
attachments: T::Array[SurgeAPI::Message::Attachment::OrHash],
|
|
60
|
+
blast_id: String,
|
|
45
61
|
body: String,
|
|
46
|
-
conversation: SurgeAPI::Message::Conversation::OrHash
|
|
62
|
+
conversation: SurgeAPI::Message::Conversation::OrHash,
|
|
63
|
+
metadata: T::Hash[Symbol, String]
|
|
47
64
|
).returns(T.attached_class)
|
|
48
65
|
end
|
|
49
66
|
def self.new(
|
|
50
67
|
# Unique identifier for the object.
|
|
51
68
|
id: nil,
|
|
52
69
|
attachments: nil,
|
|
70
|
+
# The ID of the blast this message belongs to, if any. This can be used to
|
|
71
|
+
# attribute messages back to a specific blast.
|
|
72
|
+
blast_id: nil,
|
|
53
73
|
# The message body.
|
|
54
74
|
body: nil,
|
|
55
75
|
# A conversation with a Contact
|
|
56
|
-
conversation: nil
|
|
76
|
+
conversation: nil,
|
|
77
|
+
# Set of key-value pairs that will be stored with the object.
|
|
78
|
+
metadata: nil
|
|
57
79
|
)
|
|
58
80
|
end
|
|
59
81
|
|
|
@@ -62,8 +84,10 @@ module SurgeAPI
|
|
|
62
84
|
{
|
|
63
85
|
id: String,
|
|
64
86
|
attachments: T::Array[SurgeAPI::Message::Attachment],
|
|
87
|
+
blast_id: String,
|
|
65
88
|
body: String,
|
|
66
|
-
conversation: SurgeAPI::Message::Conversation
|
|
89
|
+
conversation: SurgeAPI::Message::Conversation,
|
|
90
|
+
metadata: T::Hash[Symbol, String]
|
|
67
91
|
}
|
|
68
92
|
)
|
|
69
93
|
end
|
|
@@ -120,6 +120,14 @@ module SurgeAPI
|
|
|
120
120
|
end
|
|
121
121
|
attr_writer :attachments
|
|
122
122
|
|
|
123
|
+
# The ID of the blast this message belongs to, if any. This can be used to
|
|
124
|
+
# attribute messages back to a specific blast.
|
|
125
|
+
sig { returns(T.nilable(String)) }
|
|
126
|
+
attr_reader :blast_id
|
|
127
|
+
|
|
128
|
+
sig { params(blast_id: String).void }
|
|
129
|
+
attr_writer :blast_id
|
|
130
|
+
|
|
123
131
|
# The data associated with the event
|
|
124
132
|
sig do
|
|
125
133
|
params(
|
|
@@ -131,7 +139,8 @@ module SurgeAPI
|
|
|
131
139
|
attachments:
|
|
132
140
|
T::Array[
|
|
133
141
|
SurgeAPI::MessageDeliveredWebhookEvent::Data::Attachment::OrHash
|
|
134
|
-
]
|
|
142
|
+
],
|
|
143
|
+
blast_id: String
|
|
135
144
|
).returns(T.attached_class)
|
|
136
145
|
end
|
|
137
146
|
def self.new(
|
|
@@ -144,7 +153,10 @@ module SurgeAPI
|
|
|
144
153
|
# When the message was delivered
|
|
145
154
|
delivered_at:,
|
|
146
155
|
# Attachments included with the message
|
|
147
|
-
attachments: nil
|
|
156
|
+
attachments: nil,
|
|
157
|
+
# The ID of the blast this message belongs to, if any. This can be used to
|
|
158
|
+
# attribute messages back to a specific blast.
|
|
159
|
+
blast_id: nil
|
|
148
160
|
)
|
|
149
161
|
end
|
|
150
162
|
|
|
@@ -159,7 +171,8 @@ module SurgeAPI
|
|
|
159
171
|
attachments:
|
|
160
172
|
T::Array[
|
|
161
173
|
SurgeAPI::MessageDeliveredWebhookEvent::Data::Attachment
|
|
162
|
-
]
|
|
174
|
+
],
|
|
175
|
+
blast_id: String
|
|
163
176
|
}
|
|
164
177
|
)
|
|
165
178
|
end
|
|
@@ -122,6 +122,14 @@ module SurgeAPI
|
|
|
122
122
|
end
|
|
123
123
|
attr_writer :attachments
|
|
124
124
|
|
|
125
|
+
# The ID of the blast this message belongs to, if any. This can be used to
|
|
126
|
+
# attribute messages back to a specific blast.
|
|
127
|
+
sig { returns(T.nilable(String)) }
|
|
128
|
+
attr_reader :blast_id
|
|
129
|
+
|
|
130
|
+
sig { params(blast_id: String).void }
|
|
131
|
+
attr_writer :blast_id
|
|
132
|
+
|
|
125
133
|
# The data associated with the event
|
|
126
134
|
sig do
|
|
127
135
|
params(
|
|
@@ -134,7 +142,8 @@ module SurgeAPI
|
|
|
134
142
|
attachments:
|
|
135
143
|
T::Array[
|
|
136
144
|
SurgeAPI::MessageFailedWebhookEvent::Data::Attachment::OrHash
|
|
137
|
-
]
|
|
145
|
+
],
|
|
146
|
+
blast_id: String
|
|
138
147
|
).returns(T.attached_class)
|
|
139
148
|
end
|
|
140
149
|
def self.new(
|
|
@@ -149,7 +158,10 @@ module SurgeAPI
|
|
|
149
158
|
# The reason the message failed to be delivered
|
|
150
159
|
failure_reason:,
|
|
151
160
|
# Attachments included with the message
|
|
152
|
-
attachments: nil
|
|
161
|
+
attachments: nil,
|
|
162
|
+
# The ID of the blast this message belongs to, if any. This can be used to
|
|
163
|
+
# attribute messages back to a specific blast.
|
|
164
|
+
blast_id: nil
|
|
153
165
|
)
|
|
154
166
|
end
|
|
155
167
|
|
|
@@ -163,7 +175,8 @@ module SurgeAPI
|
|
|
163
175
|
failed_at: Time,
|
|
164
176
|
failure_reason: String,
|
|
165
177
|
attachments:
|
|
166
|
-
T::Array[SurgeAPI::MessageFailedWebhookEvent::Data::Attachment]
|
|
178
|
+
T::Array[SurgeAPI::MessageFailedWebhookEvent::Data::Attachment],
|
|
179
|
+
blast_id: String
|
|
167
180
|
}
|
|
168
181
|
)
|
|
169
182
|
end
|
|
@@ -70,6 +70,13 @@ module SurgeAPI
|
|
|
70
70
|
sig { params(body: String).void }
|
|
71
71
|
attr_writer :body
|
|
72
72
|
|
|
73
|
+
# Set of key-value pairs that will be stored with the object.
|
|
74
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
75
|
+
attr_reader :metadata
|
|
76
|
+
|
|
77
|
+
sig { params(metadata: T::Hash[Symbol, String]).void }
|
|
78
|
+
attr_writer :metadata
|
|
79
|
+
|
|
73
80
|
# An optional datetime for scheduling message up to a couple of months in the
|
|
74
81
|
# future.
|
|
75
82
|
sig { returns(T.nilable(Time)) }
|
|
@@ -89,6 +96,7 @@ module SurgeAPI
|
|
|
89
96
|
SurgeAPI::MessageParams::MessageParamsWithConversation::Attachment::OrHash
|
|
90
97
|
],
|
|
91
98
|
body: String,
|
|
99
|
+
metadata: T::Hash[Symbol, String],
|
|
92
100
|
send_at: Time
|
|
93
101
|
).returns(T.attached_class)
|
|
94
102
|
end
|
|
@@ -99,6 +107,8 @@ module SurgeAPI
|
|
|
99
107
|
attachments: nil,
|
|
100
108
|
# The message body.
|
|
101
109
|
body: nil,
|
|
110
|
+
# Set of key-value pairs that will be stored with the object.
|
|
111
|
+
metadata: nil,
|
|
102
112
|
# An optional datetime for scheduling message up to a couple of months in the
|
|
103
113
|
# future.
|
|
104
114
|
send_at: nil
|
|
@@ -115,6 +125,7 @@ module SurgeAPI
|
|
|
115
125
|
SurgeAPI::MessageParams::MessageParamsWithConversation::Attachment
|
|
116
126
|
],
|
|
117
127
|
body: String,
|
|
128
|
+
metadata: T::Hash[Symbol, String],
|
|
118
129
|
send_at: Time
|
|
119
130
|
}
|
|
120
131
|
)
|
|
@@ -341,6 +352,13 @@ module SurgeAPI
|
|
|
341
352
|
sig { params(from: String).void }
|
|
342
353
|
attr_writer :from
|
|
343
354
|
|
|
355
|
+
# Set of key-value pairs that will be stored with the object.
|
|
356
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
357
|
+
attr_reader :metadata
|
|
358
|
+
|
|
359
|
+
sig { params(metadata: T::Hash[Symbol, String]).void }
|
|
360
|
+
attr_writer :metadata
|
|
361
|
+
|
|
344
362
|
# An optional datetime for scheduling message up to a couple of months in the
|
|
345
363
|
# future.
|
|
346
364
|
sig { returns(T.nilable(Time)) }
|
|
@@ -359,6 +377,7 @@ module SurgeAPI
|
|
|
359
377
|
],
|
|
360
378
|
body: String,
|
|
361
379
|
from: String,
|
|
380
|
+
metadata: T::Hash[Symbol, String],
|
|
362
381
|
send_at: Time
|
|
363
382
|
).returns(T.attached_class)
|
|
364
383
|
end
|
|
@@ -372,6 +391,8 @@ module SurgeAPI
|
|
|
372
391
|
# The sender's phone number in E.164 format or phone number ID. If omitted, uses
|
|
373
392
|
# the account's default phone number. Cannot be used together with 'conversation'.
|
|
374
393
|
from: nil,
|
|
394
|
+
# Set of key-value pairs that will be stored with the object.
|
|
395
|
+
metadata: nil,
|
|
375
396
|
# An optional datetime for scheduling message up to a couple of months in the
|
|
376
397
|
# future.
|
|
377
398
|
send_at: nil
|
|
@@ -388,6 +409,7 @@ module SurgeAPI
|
|
|
388
409
|
],
|
|
389
410
|
body: String,
|
|
390
411
|
from: String,
|
|
412
|
+
metadata: T::Hash[Symbol, String],
|
|
391
413
|
send_at: Time
|
|
392
414
|
}
|
|
393
415
|
)
|
|
@@ -120,6 +120,14 @@ module SurgeAPI
|
|
|
120
120
|
end
|
|
121
121
|
attr_writer :attachments
|
|
122
122
|
|
|
123
|
+
# The ID of the blast this message belongs to, if any. This can be used to
|
|
124
|
+
# attribute messages back to a specific blast.
|
|
125
|
+
sig { returns(T.nilable(String)) }
|
|
126
|
+
attr_reader :blast_id
|
|
127
|
+
|
|
128
|
+
sig { params(blast_id: String).void }
|
|
129
|
+
attr_writer :blast_id
|
|
130
|
+
|
|
123
131
|
# The data associated with the event
|
|
124
132
|
sig do
|
|
125
133
|
params(
|
|
@@ -131,7 +139,8 @@ module SurgeAPI
|
|
|
131
139
|
attachments:
|
|
132
140
|
T::Array[
|
|
133
141
|
SurgeAPI::MessageReceivedWebhookEvent::Data::Attachment::OrHash
|
|
134
|
-
]
|
|
142
|
+
],
|
|
143
|
+
blast_id: String
|
|
135
144
|
).returns(T.attached_class)
|
|
136
145
|
end
|
|
137
146
|
def self.new(
|
|
@@ -144,7 +153,10 @@ module SurgeAPI
|
|
|
144
153
|
# When the message was received
|
|
145
154
|
received_at:,
|
|
146
155
|
# Attachments included with the message
|
|
147
|
-
attachments: nil
|
|
156
|
+
attachments: nil,
|
|
157
|
+
# The ID of the blast this message belongs to, if any. This can be used to
|
|
158
|
+
# attribute messages back to a specific blast.
|
|
159
|
+
blast_id: nil
|
|
148
160
|
)
|
|
149
161
|
end
|
|
150
162
|
|
|
@@ -159,7 +171,8 @@ module SurgeAPI
|
|
|
159
171
|
attachments:
|
|
160
172
|
T::Array[
|
|
161
173
|
SurgeAPI::MessageReceivedWebhookEvent::Data::Attachment
|
|
162
|
-
]
|
|
174
|
+
],
|
|
175
|
+
blast_id: String
|
|
163
176
|
}
|
|
164
177
|
)
|
|
165
178
|
end
|
|
@@ -113,6 +113,14 @@ module SurgeAPI
|
|
|
113
113
|
end
|
|
114
114
|
attr_writer :attachments
|
|
115
115
|
|
|
116
|
+
# The ID of the blast this message belongs to, if any. This can be used to
|
|
117
|
+
# attribute messages back to a specific blast.
|
|
118
|
+
sig { returns(T.nilable(String)) }
|
|
119
|
+
attr_reader :blast_id
|
|
120
|
+
|
|
121
|
+
sig { params(blast_id: String).void }
|
|
122
|
+
attr_writer :blast_id
|
|
123
|
+
|
|
116
124
|
# The data associated with the event
|
|
117
125
|
sig do
|
|
118
126
|
params(
|
|
@@ -124,7 +132,8 @@ module SurgeAPI
|
|
|
124
132
|
attachments:
|
|
125
133
|
T::Array[
|
|
126
134
|
SurgeAPI::MessageSentWebhookEvent::Data::Attachment::OrHash
|
|
127
|
-
]
|
|
135
|
+
],
|
|
136
|
+
blast_id: String
|
|
128
137
|
).returns(T.attached_class)
|
|
129
138
|
end
|
|
130
139
|
def self.new(
|
|
@@ -137,7 +146,10 @@ module SurgeAPI
|
|
|
137
146
|
# When the message was sent
|
|
138
147
|
sent_at:,
|
|
139
148
|
# Attachments included with the message
|
|
140
|
-
attachments: nil
|
|
149
|
+
attachments: nil,
|
|
150
|
+
# The ID of the blast this message belongs to, if any. This can be used to
|
|
151
|
+
# attribute messages back to a specific blast.
|
|
152
|
+
blast_id: nil
|
|
141
153
|
)
|
|
142
154
|
end
|
|
143
155
|
|
|
@@ -150,7 +162,8 @@ module SurgeAPI
|
|
|
150
162
|
SurgeAPI::MessageSentWebhookEvent::Data::Conversation,
|
|
151
163
|
sent_at: Time,
|
|
152
164
|
attachments:
|
|
153
|
-
T::Array[SurgeAPI::MessageSentWebhookEvent::Data::Attachment]
|
|
165
|
+
T::Array[SurgeAPI::MessageSentWebhookEvent::Data::Attachment],
|
|
166
|
+
blast_id: String
|
|
154
167
|
}
|
|
155
168
|
)
|
|
156
169
|
end
|
|
@@ -59,6 +59,8 @@ module SurgeAPI
|
|
|
59
59
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
60
60
|
|
|
61
61
|
LOCAL = T.let(:local, SurgeAPI::PhoneNumber::Type::TaggedSymbol)
|
|
62
|
+
SHORT_CODE =
|
|
63
|
+
T.let(:short_code, SurgeAPI::PhoneNumber::Type::TaggedSymbol)
|
|
62
64
|
TOLL_FREE = T.let(:toll_free, SurgeAPI::PhoneNumber::Type::TaggedSymbol)
|
|
63
65
|
|
|
64
66
|
sig do
|
|
@@ -11,6 +11,7 @@ module SurgeAPI
|
|
|
11
11
|
T::Array[SurgeAPI::BlastCreateParams::Attachment::OrHash],
|
|
12
12
|
body: String,
|
|
13
13
|
contacts: T::Array[String],
|
|
14
|
+
from: String,
|
|
14
15
|
name: String,
|
|
15
16
|
segments: T::Array[String],
|
|
16
17
|
send_at: Time,
|
|
@@ -26,6 +27,10 @@ module SurgeAPI
|
|
|
26
27
|
body: nil,
|
|
27
28
|
# Deprecated. Use `to` instead.
|
|
28
29
|
contacts: nil,
|
|
30
|
+
# The phone number from which to send the blast. This can be either the phone
|
|
31
|
+
# number in E.164 format or a Surge phone number id. If not provided, the
|
|
32
|
+
# account's default phone number is used.
|
|
33
|
+
from: nil,
|
|
29
34
|
# Optional name for the blast.
|
|
30
35
|
name: nil,
|
|
31
36
|
# Deprecated. Use `to` instead.
|
|
@@ -5,6 +5,7 @@ module SurgeAPI
|
|
|
5
5
|
attachments: ::Array[SurgeAPI::BlastCreateParams::Attachment],
|
|
6
6
|
body: String,
|
|
7
7
|
contacts: ::Array[String],
|
|
8
|
+
from: String,
|
|
8
9
|
name: String,
|
|
9
10
|
segments: ::Array[String],
|
|
10
11
|
send_at: Time,
|
|
@@ -30,6 +31,10 @@ module SurgeAPI
|
|
|
30
31
|
|
|
31
32
|
def contacts=: (::Array[String]) -> ::Array[String]
|
|
32
33
|
|
|
34
|
+
attr_reader from: String?
|
|
35
|
+
|
|
36
|
+
def from=: (String) -> String
|
|
37
|
+
|
|
33
38
|
attr_reader name: String?
|
|
34
39
|
|
|
35
40
|
def name=: (String) -> String
|
|
@@ -50,6 +55,7 @@ module SurgeAPI
|
|
|
50
55
|
?attachments: ::Array[SurgeAPI::BlastCreateParams::Attachment],
|
|
51
56
|
?body: String,
|
|
52
57
|
?contacts: ::Array[String],
|
|
58
|
+
?from: String,
|
|
53
59
|
?name: String,
|
|
54
60
|
?segments: ::Array[String],
|
|
55
61
|
?send_at: Time,
|
|
@@ -61,6 +67,7 @@ module SurgeAPI
|
|
|
61
67
|
attachments: ::Array[SurgeAPI::BlastCreateParams::Attachment],
|
|
62
68
|
body: String,
|
|
63
69
|
contacts: ::Array[String],
|
|
70
|
+
from: String,
|
|
64
71
|
name: String,
|
|
65
72
|
segments: ::Array[String],
|
|
66
73
|
send_at: Time,
|
|
@@ -4,8 +4,10 @@ module SurgeAPI
|
|
|
4
4
|
{
|
|
5
5
|
id: String,
|
|
6
6
|
attachments: ::Array[SurgeAPI::Message::Attachment],
|
|
7
|
+
blast_id: String,
|
|
7
8
|
body: String,
|
|
8
|
-
conversation: SurgeAPI::Message::Conversation
|
|
9
|
+
conversation: SurgeAPI::Message::Conversation,
|
|
10
|
+
metadata: ::Hash[Symbol, String]
|
|
9
11
|
}
|
|
10
12
|
|
|
11
13
|
class Message < SurgeAPI::Internal::Type::BaseModel
|
|
@@ -19,6 +21,10 @@ module SurgeAPI
|
|
|
19
21
|
::Array[SurgeAPI::Message::Attachment]
|
|
20
22
|
) -> ::Array[SurgeAPI::Message::Attachment]
|
|
21
23
|
|
|
24
|
+
attr_reader blast_id: String?
|
|
25
|
+
|
|
26
|
+
def blast_id=: (String) -> String
|
|
27
|
+
|
|
22
28
|
attr_reader body: String?
|
|
23
29
|
|
|
24
30
|
def body=: (String) -> String
|
|
@@ -29,18 +35,26 @@ module SurgeAPI
|
|
|
29
35
|
SurgeAPI::Message::Conversation
|
|
30
36
|
) -> SurgeAPI::Message::Conversation
|
|
31
37
|
|
|
38
|
+
attr_reader metadata: ::Hash[Symbol, String]?
|
|
39
|
+
|
|
40
|
+
def metadata=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
|
|
41
|
+
|
|
32
42
|
def initialize: (
|
|
33
43
|
?id: String,
|
|
34
44
|
?attachments: ::Array[SurgeAPI::Message::Attachment],
|
|
45
|
+
?blast_id: String,
|
|
35
46
|
?body: String,
|
|
36
|
-
?conversation: SurgeAPI::Message::Conversation
|
|
47
|
+
?conversation: SurgeAPI::Message::Conversation,
|
|
48
|
+
?metadata: ::Hash[Symbol, String]
|
|
37
49
|
) -> void
|
|
38
50
|
|
|
39
51
|
def to_hash: -> {
|
|
40
52
|
id: String,
|
|
41
53
|
attachments: ::Array[SurgeAPI::Message::Attachment],
|
|
54
|
+
blast_id: String,
|
|
42
55
|
body: String,
|
|
43
|
-
conversation: SurgeAPI::Message::Conversation
|
|
56
|
+
conversation: SurgeAPI::Message::Conversation,
|
|
57
|
+
metadata: ::Hash[Symbol, String]
|
|
44
58
|
}
|
|
45
59
|
|
|
46
60
|
type attachment = { id: String, type: String, url: String }
|
|
@@ -37,7 +37,8 @@ module SurgeAPI
|
|
|
37
37
|
body: String,
|
|
38
38
|
conversation: SurgeAPI::MessageDeliveredWebhookEvent::Data::Conversation,
|
|
39
39
|
delivered_at: Time,
|
|
40
|
-
attachments: ::Array[SurgeAPI::MessageDeliveredWebhookEvent::Data::Attachment]
|
|
40
|
+
attachments: ::Array[SurgeAPI::MessageDeliveredWebhookEvent::Data::Attachment],
|
|
41
|
+
blast_id: String
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
class Data < SurgeAPI::Internal::Type::BaseModel
|
|
@@ -55,12 +56,17 @@ module SurgeAPI
|
|
|
55
56
|
::Array[SurgeAPI::MessageDeliveredWebhookEvent::Data::Attachment]
|
|
56
57
|
) -> ::Array[SurgeAPI::MessageDeliveredWebhookEvent::Data::Attachment]
|
|
57
58
|
|
|
59
|
+
attr_reader blast_id: String?
|
|
60
|
+
|
|
61
|
+
def blast_id=: (String) -> String
|
|
62
|
+
|
|
58
63
|
def initialize: (
|
|
59
64
|
id: String,
|
|
60
65
|
body: String,
|
|
61
66
|
conversation: SurgeAPI::MessageDeliveredWebhookEvent::Data::Conversation,
|
|
62
67
|
delivered_at: Time,
|
|
63
|
-
?attachments: ::Array[SurgeAPI::MessageDeliveredWebhookEvent::Data::Attachment]
|
|
68
|
+
?attachments: ::Array[SurgeAPI::MessageDeliveredWebhookEvent::Data::Attachment],
|
|
69
|
+
?blast_id: String
|
|
64
70
|
) -> void
|
|
65
71
|
|
|
66
72
|
def to_hash: -> {
|
|
@@ -68,7 +74,8 @@ module SurgeAPI
|
|
|
68
74
|
body: String,
|
|
69
75
|
conversation: SurgeAPI::MessageDeliveredWebhookEvent::Data::Conversation,
|
|
70
76
|
delivered_at: Time,
|
|
71
|
-
attachments: ::Array[SurgeAPI::MessageDeliveredWebhookEvent::Data::Attachment]
|
|
77
|
+
attachments: ::Array[SurgeAPI::MessageDeliveredWebhookEvent::Data::Attachment],
|
|
78
|
+
blast_id: String
|
|
72
79
|
}
|
|
73
80
|
|
|
74
81
|
type conversation =
|
|
@@ -38,7 +38,8 @@ module SurgeAPI
|
|
|
38
38
|
conversation: SurgeAPI::MessageFailedWebhookEvent::Data::Conversation,
|
|
39
39
|
failed_at: Time,
|
|
40
40
|
failure_reason: String,
|
|
41
|
-
attachments: ::Array[SurgeAPI::MessageFailedWebhookEvent::Data::Attachment]
|
|
41
|
+
attachments: ::Array[SurgeAPI::MessageFailedWebhookEvent::Data::Attachment],
|
|
42
|
+
blast_id: String
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
class Data < SurgeAPI::Internal::Type::BaseModel
|
|
@@ -58,13 +59,18 @@ module SurgeAPI
|
|
|
58
59
|
::Array[SurgeAPI::MessageFailedWebhookEvent::Data::Attachment]
|
|
59
60
|
) -> ::Array[SurgeAPI::MessageFailedWebhookEvent::Data::Attachment]
|
|
60
61
|
|
|
62
|
+
attr_reader blast_id: String?
|
|
63
|
+
|
|
64
|
+
def blast_id=: (String) -> String
|
|
65
|
+
|
|
61
66
|
def initialize: (
|
|
62
67
|
id: String,
|
|
63
68
|
body: String,
|
|
64
69
|
conversation: SurgeAPI::MessageFailedWebhookEvent::Data::Conversation,
|
|
65
70
|
failed_at: Time,
|
|
66
71
|
failure_reason: String,
|
|
67
|
-
?attachments: ::Array[SurgeAPI::MessageFailedWebhookEvent::Data::Attachment]
|
|
72
|
+
?attachments: ::Array[SurgeAPI::MessageFailedWebhookEvent::Data::Attachment],
|
|
73
|
+
?blast_id: String
|
|
68
74
|
) -> void
|
|
69
75
|
|
|
70
76
|
def to_hash: -> {
|
|
@@ -73,7 +79,8 @@ module SurgeAPI
|
|
|
73
79
|
conversation: SurgeAPI::MessageFailedWebhookEvent::Data::Conversation,
|
|
74
80
|
failed_at: Time,
|
|
75
81
|
failure_reason: String,
|
|
76
|
-
attachments: ::Array[SurgeAPI::MessageFailedWebhookEvent::Data::Attachment]
|
|
82
|
+
attachments: ::Array[SurgeAPI::MessageFailedWebhookEvent::Data::Attachment],
|
|
83
|
+
blast_id: String
|
|
77
84
|
}
|
|
78
85
|
|
|
79
86
|
type conversation =
|
|
@@ -12,6 +12,7 @@ module SurgeAPI
|
|
|
12
12
|
conversation: SurgeAPI::MessageParams::MessageParamsWithConversation::Conversation,
|
|
13
13
|
attachments: ::Array[SurgeAPI::MessageParams::MessageParamsWithConversation::Attachment],
|
|
14
14
|
body: String,
|
|
15
|
+
metadata: ::Hash[Symbol, String],
|
|
15
16
|
send_at: Time
|
|
16
17
|
}
|
|
17
18
|
|
|
@@ -28,6 +29,10 @@ module SurgeAPI
|
|
|
28
29
|
|
|
29
30
|
def body=: (String) -> String
|
|
30
31
|
|
|
32
|
+
attr_reader metadata: ::Hash[Symbol, String]?
|
|
33
|
+
|
|
34
|
+
def metadata=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
|
|
35
|
+
|
|
31
36
|
attr_reader send_at: Time?
|
|
32
37
|
|
|
33
38
|
def send_at=: (Time) -> Time
|
|
@@ -36,6 +41,7 @@ module SurgeAPI
|
|
|
36
41
|
conversation: SurgeAPI::MessageParams::MessageParamsWithConversation::Conversation,
|
|
37
42
|
?attachments: ::Array[SurgeAPI::MessageParams::MessageParamsWithConversation::Attachment],
|
|
38
43
|
?body: String,
|
|
44
|
+
?metadata: ::Hash[Symbol, String],
|
|
39
45
|
?send_at: Time
|
|
40
46
|
) -> void
|
|
41
47
|
|
|
@@ -43,6 +49,7 @@ module SurgeAPI
|
|
|
43
49
|
conversation: SurgeAPI::MessageParams::MessageParamsWithConversation::Conversation,
|
|
44
50
|
attachments: ::Array[SurgeAPI::MessageParams::MessageParamsWithConversation::Attachment],
|
|
45
51
|
body: String,
|
|
52
|
+
metadata: ::Hash[Symbol, String],
|
|
46
53
|
send_at: Time
|
|
47
54
|
}
|
|
48
55
|
|
|
@@ -132,6 +139,7 @@ module SurgeAPI
|
|
|
132
139
|
attachments: ::Array[SurgeAPI::MessageParams::SimpleMessageParams::Attachment],
|
|
133
140
|
body: String,
|
|
134
141
|
from: String,
|
|
142
|
+
metadata: ::Hash[Symbol, String],
|
|
135
143
|
send_at: Time
|
|
136
144
|
}
|
|
137
145
|
|
|
@@ -152,6 +160,10 @@ module SurgeAPI
|
|
|
152
160
|
|
|
153
161
|
def from=: (String) -> String
|
|
154
162
|
|
|
163
|
+
attr_reader metadata: ::Hash[Symbol, String]?
|
|
164
|
+
|
|
165
|
+
def metadata=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
|
|
166
|
+
|
|
155
167
|
attr_reader send_at: Time?
|
|
156
168
|
|
|
157
169
|
def send_at=: (Time) -> Time
|
|
@@ -161,6 +173,7 @@ module SurgeAPI
|
|
|
161
173
|
?attachments: ::Array[SurgeAPI::MessageParams::SimpleMessageParams::Attachment],
|
|
162
174
|
?body: String,
|
|
163
175
|
?from: String,
|
|
176
|
+
?metadata: ::Hash[Symbol, String],
|
|
164
177
|
?send_at: Time
|
|
165
178
|
) -> void
|
|
166
179
|
|
|
@@ -169,6 +182,7 @@ module SurgeAPI
|
|
|
169
182
|
attachments: ::Array[SurgeAPI::MessageParams::SimpleMessageParams::Attachment],
|
|
170
183
|
body: String,
|
|
171
184
|
from: String,
|
|
185
|
+
metadata: ::Hash[Symbol, String],
|
|
172
186
|
send_at: Time
|
|
173
187
|
}
|
|
174
188
|
|
|
@@ -37,7 +37,8 @@ module SurgeAPI
|
|
|
37
37
|
body: String,
|
|
38
38
|
conversation: SurgeAPI::MessageReceivedWebhookEvent::Data::Conversation,
|
|
39
39
|
received_at: Time,
|
|
40
|
-
attachments: ::Array[SurgeAPI::MessageReceivedWebhookEvent::Data::Attachment]
|
|
40
|
+
attachments: ::Array[SurgeAPI::MessageReceivedWebhookEvent::Data::Attachment],
|
|
41
|
+
blast_id: String
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
class Data < SurgeAPI::Internal::Type::BaseModel
|
|
@@ -55,12 +56,17 @@ module SurgeAPI
|
|
|
55
56
|
::Array[SurgeAPI::MessageReceivedWebhookEvent::Data::Attachment]
|
|
56
57
|
) -> ::Array[SurgeAPI::MessageReceivedWebhookEvent::Data::Attachment]
|
|
57
58
|
|
|
59
|
+
attr_reader blast_id: String?
|
|
60
|
+
|
|
61
|
+
def blast_id=: (String) -> String
|
|
62
|
+
|
|
58
63
|
def initialize: (
|
|
59
64
|
id: String,
|
|
60
65
|
body: String,
|
|
61
66
|
conversation: SurgeAPI::MessageReceivedWebhookEvent::Data::Conversation,
|
|
62
67
|
received_at: Time,
|
|
63
|
-
?attachments: ::Array[SurgeAPI::MessageReceivedWebhookEvent::Data::Attachment]
|
|
68
|
+
?attachments: ::Array[SurgeAPI::MessageReceivedWebhookEvent::Data::Attachment],
|
|
69
|
+
?blast_id: String
|
|
64
70
|
) -> void
|
|
65
71
|
|
|
66
72
|
def to_hash: -> {
|
|
@@ -68,7 +74,8 @@ module SurgeAPI
|
|
|
68
74
|
body: String,
|
|
69
75
|
conversation: SurgeAPI::MessageReceivedWebhookEvent::Data::Conversation,
|
|
70
76
|
received_at: Time,
|
|
71
|
-
attachments: ::Array[SurgeAPI::MessageReceivedWebhookEvent::Data::Attachment]
|
|
77
|
+
attachments: ::Array[SurgeAPI::MessageReceivedWebhookEvent::Data::Attachment],
|
|
78
|
+
blast_id: String
|
|
72
79
|
}
|
|
73
80
|
|
|
74
81
|
type conversation =
|
|
@@ -37,7 +37,8 @@ module SurgeAPI
|
|
|
37
37
|
body: String,
|
|
38
38
|
conversation: SurgeAPI::MessageSentWebhookEvent::Data::Conversation,
|
|
39
39
|
sent_at: Time,
|
|
40
|
-
attachments: ::Array[SurgeAPI::MessageSentWebhookEvent::Data::Attachment]
|
|
40
|
+
attachments: ::Array[SurgeAPI::MessageSentWebhookEvent::Data::Attachment],
|
|
41
|
+
blast_id: String
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
class Data < SurgeAPI::Internal::Type::BaseModel
|
|
@@ -55,12 +56,17 @@ module SurgeAPI
|
|
|
55
56
|
::Array[SurgeAPI::MessageSentWebhookEvent::Data::Attachment]
|
|
56
57
|
) -> ::Array[SurgeAPI::MessageSentWebhookEvent::Data::Attachment]
|
|
57
58
|
|
|
59
|
+
attr_reader blast_id: String?
|
|
60
|
+
|
|
61
|
+
def blast_id=: (String) -> String
|
|
62
|
+
|
|
58
63
|
def initialize: (
|
|
59
64
|
id: String,
|
|
60
65
|
body: String,
|
|
61
66
|
conversation: SurgeAPI::MessageSentWebhookEvent::Data::Conversation,
|
|
62
67
|
sent_at: Time,
|
|
63
|
-
?attachments: ::Array[SurgeAPI::MessageSentWebhookEvent::Data::Attachment]
|
|
68
|
+
?attachments: ::Array[SurgeAPI::MessageSentWebhookEvent::Data::Attachment],
|
|
69
|
+
?blast_id: String
|
|
64
70
|
) -> void
|
|
65
71
|
|
|
66
72
|
def to_hash: -> {
|
|
@@ -68,7 +74,8 @@ module SurgeAPI
|
|
|
68
74
|
body: String,
|
|
69
75
|
conversation: SurgeAPI::MessageSentWebhookEvent::Data::Conversation,
|
|
70
76
|
sent_at: Time,
|
|
71
|
-
attachments: ::Array[SurgeAPI::MessageSentWebhookEvent::Data::Attachment]
|
|
77
|
+
attachments: ::Array[SurgeAPI::MessageSentWebhookEvent::Data::Attachment],
|
|
78
|
+
blast_id: String
|
|
72
79
|
}
|
|
73
80
|
|
|
74
81
|
type conversation =
|
|
@@ -22,12 +22,13 @@ module SurgeAPI
|
|
|
22
22
|
type: SurgeAPI::Models::PhoneNumber::type_
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
type type_ = :local | :toll_free
|
|
25
|
+
type type_ = :local | :short_code | :toll_free
|
|
26
26
|
|
|
27
27
|
module Type
|
|
28
28
|
extend SurgeAPI::Internal::Type::Enum
|
|
29
29
|
|
|
30
30
|
LOCAL: :local
|
|
31
|
+
SHORT_CODE: :short_code
|
|
31
32
|
TOLL_FREE: :toll_free
|
|
32
33
|
|
|
33
34
|
def self?.values: -> ::Array[SurgeAPI::Models::PhoneNumber::type_]
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: surge_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.8.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Surge
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-01-
|
|
11
|
+
date: 2026-01-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|