surge_api 0.7.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 +10 -0
- data/README.md +1 -1
- data/lib/surge_api/models/blast_create_params.rb +11 -1
- data/lib/surge_api/models/message.rb +13 -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_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 +13 -0
- 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_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 +7 -0
- 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_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,15 @@
|
|
|
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
|
+
|
|
3
13
|
## 0.7.0 (2026-01-18)
|
|
4
14
|
|
|
5
15
|
Full Changelog: [v0.6.0...v0.7.0](https://github.com/surgeapi/ruby-sdk/compare/v0.6.0...v0.7.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
|
#
|
|
@@ -33,13 +40,18 @@ module SurgeAPI
|
|
|
33
40
|
# @return [Hash{Symbol=>String}, nil]
|
|
34
41
|
optional :metadata, SurgeAPI::Internal::Type::HashOf[String]
|
|
35
42
|
|
|
36
|
-
# @!method initialize(id: nil, attachments: nil, body: nil, conversation: nil, metadata: nil)
|
|
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
|
+
#
|
|
37
47
|
# A Message is a communication sent to a Contact.
|
|
38
48
|
#
|
|
39
49
|
# @param id [String] Unique identifier for the object.
|
|
40
50
|
#
|
|
41
51
|
# @param attachments [Array<SurgeAPI::Models::Message::Attachment>]
|
|
42
52
|
#
|
|
53
|
+
# @param blast_id [String] The ID of the blast this message belongs to, if any. This can be used to attribu
|
|
54
|
+
#
|
|
43
55
|
# @param body [String] The message body.
|
|
44
56
|
#
|
|
45
57
|
# @param conversation [SurgeAPI::Models::Message::Conversation] A conversation with a Contact
|
|
@@ -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
|
|
@@ -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
|
|
@@ -49,6 +57,7 @@ module SurgeAPI
|
|
|
49
57
|
params(
|
|
50
58
|
id: String,
|
|
51
59
|
attachments: T::Array[SurgeAPI::Message::Attachment::OrHash],
|
|
60
|
+
blast_id: String,
|
|
52
61
|
body: String,
|
|
53
62
|
conversation: SurgeAPI::Message::Conversation::OrHash,
|
|
54
63
|
metadata: T::Hash[Symbol, String]
|
|
@@ -58,6 +67,9 @@ module SurgeAPI
|
|
|
58
67
|
# Unique identifier for the object.
|
|
59
68
|
id: nil,
|
|
60
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,
|
|
61
73
|
# The message body.
|
|
62
74
|
body: nil,
|
|
63
75
|
# A conversation with a Contact
|
|
@@ -72,6 +84,7 @@ module SurgeAPI
|
|
|
72
84
|
{
|
|
73
85
|
id: String,
|
|
74
86
|
attachments: T::Array[SurgeAPI::Message::Attachment],
|
|
87
|
+
blast_id: String,
|
|
75
88
|
body: String,
|
|
76
89
|
conversation: SurgeAPI::Message::Conversation,
|
|
77
90
|
metadata: T::Hash[Symbol, String]
|
|
@@ -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
|
|
@@ -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,6 +4,7 @@ module SurgeAPI
|
|
|
4
4
|
{
|
|
5
5
|
id: String,
|
|
6
6
|
attachments: ::Array[SurgeAPI::Message::Attachment],
|
|
7
|
+
blast_id: String,
|
|
7
8
|
body: String,
|
|
8
9
|
conversation: SurgeAPI::Message::Conversation,
|
|
9
10
|
metadata: ::Hash[Symbol, String]
|
|
@@ -20,6 +21,10 @@ module SurgeAPI
|
|
|
20
21
|
::Array[SurgeAPI::Message::Attachment]
|
|
21
22
|
) -> ::Array[SurgeAPI::Message::Attachment]
|
|
22
23
|
|
|
24
|
+
attr_reader blast_id: String?
|
|
25
|
+
|
|
26
|
+
def blast_id=: (String) -> String
|
|
27
|
+
|
|
23
28
|
attr_reader body: String?
|
|
24
29
|
|
|
25
30
|
def body=: (String) -> String
|
|
@@ -37,6 +42,7 @@ module SurgeAPI
|
|
|
37
42
|
def initialize: (
|
|
38
43
|
?id: String,
|
|
39
44
|
?attachments: ::Array[SurgeAPI::Message::Attachment],
|
|
45
|
+
?blast_id: String,
|
|
40
46
|
?body: String,
|
|
41
47
|
?conversation: SurgeAPI::Message::Conversation,
|
|
42
48
|
?metadata: ::Hash[Symbol, String]
|
|
@@ -45,6 +51,7 @@ module SurgeAPI
|
|
|
45
51
|
def to_hash: -> {
|
|
46
52
|
id: String,
|
|
47
53
|
attachments: ::Array[SurgeAPI::Message::Attachment],
|
|
54
|
+
blast_id: String,
|
|
48
55
|
body: String,
|
|
49
56
|
conversation: SurgeAPI::Message::Conversation,
|
|
50
57
|
metadata: ::Hash[Symbol, 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 =
|
|
@@ -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
|