surge_api 0.25.0 → 0.26.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 +7 -0
- data/README.md +1 -1
- data/lib/surge_api/models/message.rb +11 -1
- data/lib/surge_api/models/message_delivered_webhook_event.rb +12 -1
- data/lib/surge_api/models/message_failed_webhook_event.rb +12 -1
- data/lib/surge_api/models/message_received_webhook_event.rb +12 -1
- data/lib/surge_api/models/message_sent_webhook_event.rb +12 -1
- data/lib/surge_api/version.rb +1 -1
- data/rbi/surge_api/models/message.rbi +12 -0
- data/rbi/surge_api/models/message_delivered_webhook_event.rbi +14 -0
- data/rbi/surge_api/models/message_failed_webhook_event.rbi +14 -0
- data/rbi/surge_api/models/message_received_webhook_event.rbi +14 -0
- data/rbi/surge_api/models/message_sent_webhook_event.rbi +14 -0
- data/sig/surge_api/models/message.rbs +5 -0
- data/sig/surge_api/models/message_delivered_webhook_event.rbs +5 -0
- data/sig/surge_api/models/message_failed_webhook_event.rbs +5 -0
- data/sig/surge_api/models/message_received_webhook_event.rbs +5 -0
- data/sig/surge_api/models/message_sent_webhook_event.rbs +5 -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: 829d82ccc134ad0e46ae1e8971e063f7d566a83cd7fe3125652d116eb6e7ea11
|
|
4
|
+
data.tar.gz: 7cbf44ca06640f521710682b5da77f52837fcdb268df548e4d8011c540954433
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 86cd53d21faeeacf70813fe6d573b808437177863703fdab66e29ea86a581bcdcde214039b2ebb1911ff41cbfecaf62367ef7bb05b625f2bb15c31bed5c3ff76
|
|
7
|
+
data.tar.gz: d6102eb2e161ed961234ec66f41c6f1ca4555bc9379924d509bf145a305909b3112c85ecc7c58090d3b6a56061ea8674ecca585b1b4f575db502e34892b1fbc7
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.26.0](https://github.com/surgeapi/ruby-sdk/compare/v0.25.0...v0.26.0) (2026-11-03)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **api:** add created_at to messages ([#29](https://github.com/surgeapi/ruby-sdk/issues/29)) ([e341842](https://github.com/surgeapi/ruby-sdk/commit/e34184256644bb4e6682f17571bf9c9a78705c8c))
|
|
9
|
+
|
|
3
10
|
## [0.25.0](https://github.com/surgeapi/ruby-sdk/compare/v0.24.0...v0.25.0) (2026-10-29)
|
|
4
11
|
|
|
5
12
|
|
data/README.md
CHANGED
|
@@ -4,6 +4,14 @@ module SurgeAPI
|
|
|
4
4
|
module Models
|
|
5
5
|
# @see SurgeAPI::Resources::Messages#create
|
|
6
6
|
class Message < SurgeAPI::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute created_at
|
|
8
|
+
# When the message was added to the conversation, in ISO8601 UTC format. Null for
|
|
9
|
+
# scheduled messages until they are created. For imported messages, this is the
|
|
10
|
+
# original creation time.
|
|
11
|
+
#
|
|
12
|
+
# @return [Time, nil]
|
|
13
|
+
required :created_at, Time, nil?: true
|
|
14
|
+
|
|
7
15
|
# @!attribute id
|
|
8
16
|
# Unique identifier for the object.
|
|
9
17
|
#
|
|
@@ -52,12 +60,14 @@ module SurgeAPI
|
|
|
52
60
|
# @return [Symbol, SurgeAPI::Models::Message::Status, nil]
|
|
53
61
|
optional :status, enum: -> { SurgeAPI::Message::Status }
|
|
54
62
|
|
|
55
|
-
# @!method initialize(id: nil, attachments: nil, blast_id: nil, body: nil, conversation: nil, failure_reason: nil, metadata: nil, status: nil)
|
|
63
|
+
# @!method initialize(created_at:, id: nil, attachments: nil, blast_id: nil, body: nil, conversation: nil, failure_reason: nil, metadata: nil, status: nil)
|
|
56
64
|
# Some parameter documentations has been truncated, see
|
|
57
65
|
# {SurgeAPI::Models::Message} for more details.
|
|
58
66
|
#
|
|
59
67
|
# A Message is a communication sent to a Contact.
|
|
60
68
|
#
|
|
69
|
+
# @param created_at [Time, nil] When the message was added to the conversation, in ISO8601 UTC format. Null for
|
|
70
|
+
#
|
|
61
71
|
# @param id [String] Unique identifier for the object.
|
|
62
72
|
#
|
|
63
73
|
# @param attachments [Array<SurgeAPI::Models::Message::Attachment>]
|
|
@@ -56,6 +56,15 @@ module SurgeAPI
|
|
|
56
56
|
# @return [SurgeAPI::Models::MessageDeliveredWebhookEvent::Data::Conversation]
|
|
57
57
|
required :conversation, -> { SurgeAPI::MessageDeliveredWebhookEvent::Data::Conversation }
|
|
58
58
|
|
|
59
|
+
# @!attribute created_at
|
|
60
|
+
# When the message was added to the conversation, in ISO8601 UTC format. For
|
|
61
|
+
# scheduled messages, this is the actual creation time, which may be later than
|
|
62
|
+
# the requested send_at. For imported messages, this is the original creation
|
|
63
|
+
# time.
|
|
64
|
+
#
|
|
65
|
+
# @return [Time]
|
|
66
|
+
required :created_at, Time
|
|
67
|
+
|
|
59
68
|
# @!attribute delivered_at
|
|
60
69
|
# When the message was delivered
|
|
61
70
|
#
|
|
@@ -94,7 +103,7 @@ module SurgeAPI
|
|
|
94
103
|
# @return [String, nil]
|
|
95
104
|
optional :blast_id, String
|
|
96
105
|
|
|
97
|
-
# @!method initialize(id:, body:, conversation:, delivered_at:, failure_reason:, metadata:, status:, attachments: nil, blast_id: nil)
|
|
106
|
+
# @!method initialize(id:, body:, conversation:, created_at:, delivered_at:, failure_reason:, metadata:, status:, attachments: nil, blast_id: nil)
|
|
98
107
|
# Some parameter documentations has been truncated, see
|
|
99
108
|
# {SurgeAPI::Models::MessageDeliveredWebhookEvent::Data} for more details.
|
|
100
109
|
#
|
|
@@ -106,6 +115,8 @@ module SurgeAPI
|
|
|
106
115
|
#
|
|
107
116
|
# @param conversation [SurgeAPI::Models::MessageDeliveredWebhookEvent::Data::Conversation] The conversation this message belongs to
|
|
108
117
|
#
|
|
118
|
+
# @param created_at [Time] When the message was added to the conversation, in ISO8601 UTC format. For sched
|
|
119
|
+
#
|
|
109
120
|
# @param delivered_at [Time] When the message was delivered
|
|
110
121
|
#
|
|
111
122
|
# @param failure_reason [String, nil] The reason the message failed, or null if no failure reason is set
|
|
@@ -56,6 +56,15 @@ module SurgeAPI
|
|
|
56
56
|
# @return [SurgeAPI::Models::MessageFailedWebhookEvent::Data::Conversation]
|
|
57
57
|
required :conversation, -> { SurgeAPI::MessageFailedWebhookEvent::Data::Conversation }
|
|
58
58
|
|
|
59
|
+
# @!attribute created_at
|
|
60
|
+
# When the message was added to the conversation, in ISO8601 UTC format. For
|
|
61
|
+
# scheduled messages, this is the actual creation time, which may be later than
|
|
62
|
+
# the requested send_at. For imported messages, this is the original creation
|
|
63
|
+
# time.
|
|
64
|
+
#
|
|
65
|
+
# @return [Time]
|
|
66
|
+
required :created_at, Time
|
|
67
|
+
|
|
59
68
|
# @!attribute failed_at
|
|
60
69
|
# When the message failed
|
|
61
70
|
#
|
|
@@ -95,7 +104,7 @@ module SurgeAPI
|
|
|
95
104
|
# @return [String, nil]
|
|
96
105
|
optional :blast_id, String
|
|
97
106
|
|
|
98
|
-
# @!method initialize(id:, body:, conversation:, failed_at:, failure_reason:, metadata:, status:, attachments: nil, blast_id: nil)
|
|
107
|
+
# @!method initialize(id:, body:, conversation:, created_at:, failed_at:, failure_reason:, metadata:, status:, attachments: nil, blast_id: nil)
|
|
99
108
|
# Some parameter documentations has been truncated, see
|
|
100
109
|
# {SurgeAPI::Models::MessageFailedWebhookEvent::Data} for more details.
|
|
101
110
|
#
|
|
@@ -107,6 +116,8 @@ module SurgeAPI
|
|
|
107
116
|
#
|
|
108
117
|
# @param conversation [SurgeAPI::Models::MessageFailedWebhookEvent::Data::Conversation] The conversation this message belongs to
|
|
109
118
|
#
|
|
119
|
+
# @param created_at [Time] When the message was added to the conversation, in ISO8601 UTC format. For sched
|
|
120
|
+
#
|
|
110
121
|
# @param failed_at [Time] When the message failed
|
|
111
122
|
#
|
|
112
123
|
# @param failure_reason [String, nil] The reason the message failed to be delivered, or null if no failure reason is s
|
|
@@ -56,6 +56,15 @@ module SurgeAPI
|
|
|
56
56
|
# @return [SurgeAPI::Models::MessageReceivedWebhookEvent::Data::Conversation]
|
|
57
57
|
required :conversation, -> { SurgeAPI::MessageReceivedWebhookEvent::Data::Conversation }
|
|
58
58
|
|
|
59
|
+
# @!attribute created_at
|
|
60
|
+
# When the message was added to the conversation, in ISO8601 UTC format. For
|
|
61
|
+
# scheduled messages, this is the actual creation time, which may be later than
|
|
62
|
+
# the requested send_at. For imported messages, this is the original creation
|
|
63
|
+
# time.
|
|
64
|
+
#
|
|
65
|
+
# @return [Time]
|
|
66
|
+
required :created_at, Time
|
|
67
|
+
|
|
59
68
|
# @!attribute failure_reason
|
|
60
69
|
# The reason the message failed, or null if no failure reason is set
|
|
61
70
|
#
|
|
@@ -94,7 +103,7 @@ module SurgeAPI
|
|
|
94
103
|
# @return [String, nil]
|
|
95
104
|
optional :blast_id, String
|
|
96
105
|
|
|
97
|
-
# @!method initialize(id:, body:, conversation:, failure_reason:, metadata:, received_at:, status:, attachments: nil, blast_id: nil)
|
|
106
|
+
# @!method initialize(id:, body:, conversation:, created_at:, failure_reason:, metadata:, received_at:, status:, attachments: nil, blast_id: nil)
|
|
98
107
|
# Some parameter documentations has been truncated, see
|
|
99
108
|
# {SurgeAPI::Models::MessageReceivedWebhookEvent::Data} for more details.
|
|
100
109
|
#
|
|
@@ -106,6 +115,8 @@ module SurgeAPI
|
|
|
106
115
|
#
|
|
107
116
|
# @param conversation [SurgeAPI::Models::MessageReceivedWebhookEvent::Data::Conversation] The conversation this message belongs to
|
|
108
117
|
#
|
|
118
|
+
# @param created_at [Time] When the message was added to the conversation, in ISO8601 UTC format. For sched
|
|
119
|
+
#
|
|
109
120
|
# @param failure_reason [String, nil] The reason the message failed, or null if no failure reason is set
|
|
110
121
|
#
|
|
111
122
|
# @param metadata [Hash{Symbol=>String}] Set of key-value pairs that will be stored with the object.
|
|
@@ -56,6 +56,15 @@ module SurgeAPI
|
|
|
56
56
|
# @return [SurgeAPI::Models::MessageSentWebhookEvent::Data::Conversation]
|
|
57
57
|
required :conversation, -> { SurgeAPI::MessageSentWebhookEvent::Data::Conversation }
|
|
58
58
|
|
|
59
|
+
# @!attribute created_at
|
|
60
|
+
# When the message was added to the conversation, in ISO8601 UTC format. For
|
|
61
|
+
# scheduled messages, this is the actual creation time, which may be later than
|
|
62
|
+
# the requested send_at. For imported messages, this is the original creation
|
|
63
|
+
# time.
|
|
64
|
+
#
|
|
65
|
+
# @return [Time]
|
|
66
|
+
required :created_at, Time
|
|
67
|
+
|
|
59
68
|
# @!attribute failure_reason
|
|
60
69
|
# The reason the message failed, or null if no failure reason is set
|
|
61
70
|
#
|
|
@@ -94,7 +103,7 @@ module SurgeAPI
|
|
|
94
103
|
# @return [String, nil]
|
|
95
104
|
optional :blast_id, String
|
|
96
105
|
|
|
97
|
-
# @!method initialize(id:, body:, conversation:, failure_reason:, metadata:, sent_at:, status:, attachments: nil, blast_id: nil)
|
|
106
|
+
# @!method initialize(id:, body:, conversation:, created_at:, failure_reason:, metadata:, sent_at:, status:, attachments: nil, blast_id: nil)
|
|
98
107
|
# Some parameter documentations has been truncated, see
|
|
99
108
|
# {SurgeAPI::Models::MessageSentWebhookEvent::Data} for more details.
|
|
100
109
|
#
|
|
@@ -106,6 +115,8 @@ module SurgeAPI
|
|
|
106
115
|
#
|
|
107
116
|
# @param conversation [SurgeAPI::Models::MessageSentWebhookEvent::Data::Conversation] The conversation this message belongs to
|
|
108
117
|
#
|
|
118
|
+
# @param created_at [Time] When the message was added to the conversation, in ISO8601 UTC format. For sched
|
|
119
|
+
#
|
|
109
120
|
# @param failure_reason [String, nil] The reason the message failed, or null if no failure reason is set
|
|
110
121
|
#
|
|
111
122
|
# @param metadata [Hash{Symbol=>String}] Set of key-value pairs that will be stored with the object.
|
data/lib/surge_api/version.rb
CHANGED
|
@@ -6,6 +6,12 @@ module SurgeAPI
|
|
|
6
6
|
OrHash =
|
|
7
7
|
T.type_alias { T.any(SurgeAPI::Message, SurgeAPI::Internal::AnyHash) }
|
|
8
8
|
|
|
9
|
+
# When the message was added to the conversation, in ISO8601 UTC format. Null for
|
|
10
|
+
# scheduled messages until they are created. For imported messages, this is the
|
|
11
|
+
# original creation time.
|
|
12
|
+
sig { returns(T.nilable(Time)) }
|
|
13
|
+
attr_accessor :created_at
|
|
14
|
+
|
|
9
15
|
# Unique identifier for the object.
|
|
10
16
|
sig { returns(T.nilable(String)) }
|
|
11
17
|
attr_reader :id
|
|
@@ -60,6 +66,7 @@ module SurgeAPI
|
|
|
60
66
|
# A Message is a communication sent to a Contact.
|
|
61
67
|
sig do
|
|
62
68
|
params(
|
|
69
|
+
created_at: T.nilable(Time),
|
|
63
70
|
id: String,
|
|
64
71
|
attachments: T::Array[SurgeAPI::Message::Attachment::OrHash],
|
|
65
72
|
blast_id: T.nilable(String),
|
|
@@ -71,6 +78,10 @@ module SurgeAPI
|
|
|
71
78
|
).returns(T.attached_class)
|
|
72
79
|
end
|
|
73
80
|
def self.new(
|
|
81
|
+
# When the message was added to the conversation, in ISO8601 UTC format. Null for
|
|
82
|
+
# scheduled messages until they are created. For imported messages, this is the
|
|
83
|
+
# original creation time.
|
|
84
|
+
created_at:,
|
|
74
85
|
# Unique identifier for the object.
|
|
75
86
|
id: nil,
|
|
76
87
|
attachments: nil,
|
|
@@ -93,6 +104,7 @@ module SurgeAPI
|
|
|
93
104
|
sig do
|
|
94
105
|
override.returns(
|
|
95
106
|
{
|
|
107
|
+
created_at: T.nilable(Time),
|
|
96
108
|
id: String,
|
|
97
109
|
attachments: T::Array[SurgeAPI::Message::Attachment],
|
|
98
110
|
blast_id: T.nilable(String),
|
|
@@ -96,6 +96,13 @@ module SurgeAPI
|
|
|
96
96
|
end
|
|
97
97
|
attr_writer :conversation
|
|
98
98
|
|
|
99
|
+
# When the message was added to the conversation, in ISO8601 UTC format. For
|
|
100
|
+
# scheduled messages, this is the actual creation time, which may be later than
|
|
101
|
+
# the requested send_at. For imported messages, this is the original creation
|
|
102
|
+
# time.
|
|
103
|
+
sig { returns(Time) }
|
|
104
|
+
attr_accessor :created_at
|
|
105
|
+
|
|
99
106
|
# When the message was delivered
|
|
100
107
|
sig { returns(Time) }
|
|
101
108
|
attr_accessor :delivered_at
|
|
@@ -151,6 +158,7 @@ module SurgeAPI
|
|
|
151
158
|
body: T.nilable(String),
|
|
152
159
|
conversation:
|
|
153
160
|
SurgeAPI::MessageDeliveredWebhookEvent::Data::Conversation::OrHash,
|
|
161
|
+
created_at: Time,
|
|
154
162
|
delivered_at: Time,
|
|
155
163
|
failure_reason: T.nilable(String),
|
|
156
164
|
metadata: T::Hash[Symbol, String],
|
|
@@ -170,6 +178,11 @@ module SurgeAPI
|
|
|
170
178
|
body:,
|
|
171
179
|
# The conversation this message belongs to
|
|
172
180
|
conversation:,
|
|
181
|
+
# When the message was added to the conversation, in ISO8601 UTC format. For
|
|
182
|
+
# scheduled messages, this is the actual creation time, which may be later than
|
|
183
|
+
# the requested send_at. For imported messages, this is the original creation
|
|
184
|
+
# time.
|
|
185
|
+
created_at:,
|
|
173
186
|
# When the message was delivered
|
|
174
187
|
delivered_at:,
|
|
175
188
|
# The reason the message failed, or null if no failure reason is set
|
|
@@ -193,6 +206,7 @@ module SurgeAPI
|
|
|
193
206
|
body: T.nilable(String),
|
|
194
207
|
conversation:
|
|
195
208
|
SurgeAPI::MessageDeliveredWebhookEvent::Data::Conversation,
|
|
209
|
+
created_at: Time,
|
|
196
210
|
delivered_at: Time,
|
|
197
211
|
failure_reason: T.nilable(String),
|
|
198
212
|
metadata: T::Hash[Symbol, String],
|
|
@@ -94,6 +94,13 @@ module SurgeAPI
|
|
|
94
94
|
end
|
|
95
95
|
attr_writer :conversation
|
|
96
96
|
|
|
97
|
+
# When the message was added to the conversation, in ISO8601 UTC format. For
|
|
98
|
+
# scheduled messages, this is the actual creation time, which may be later than
|
|
99
|
+
# the requested send_at. For imported messages, this is the original creation
|
|
100
|
+
# time.
|
|
101
|
+
sig { returns(Time) }
|
|
102
|
+
attr_accessor :created_at
|
|
103
|
+
|
|
97
104
|
# When the message failed
|
|
98
105
|
sig { returns(Time) }
|
|
99
106
|
attr_accessor :failed_at
|
|
@@ -150,6 +157,7 @@ module SurgeAPI
|
|
|
150
157
|
body: T.nilable(String),
|
|
151
158
|
conversation:
|
|
152
159
|
SurgeAPI::MessageFailedWebhookEvent::Data::Conversation::OrHash,
|
|
160
|
+
created_at: Time,
|
|
153
161
|
failed_at: Time,
|
|
154
162
|
failure_reason: T.nilable(String),
|
|
155
163
|
metadata: T::Hash[Symbol, String],
|
|
@@ -168,6 +176,11 @@ module SurgeAPI
|
|
|
168
176
|
body:,
|
|
169
177
|
# The conversation this message belongs to
|
|
170
178
|
conversation:,
|
|
179
|
+
# When the message was added to the conversation, in ISO8601 UTC format. For
|
|
180
|
+
# scheduled messages, this is the actual creation time, which may be later than
|
|
181
|
+
# the requested send_at. For imported messages, this is the original creation
|
|
182
|
+
# time.
|
|
183
|
+
created_at:,
|
|
171
184
|
# When the message failed
|
|
172
185
|
failed_at:,
|
|
173
186
|
# The reason the message failed to be delivered, or null if no failure reason is
|
|
@@ -192,6 +205,7 @@ module SurgeAPI
|
|
|
192
205
|
body: T.nilable(String),
|
|
193
206
|
conversation:
|
|
194
207
|
SurgeAPI::MessageFailedWebhookEvent::Data::Conversation,
|
|
208
|
+
created_at: Time,
|
|
195
209
|
failed_at: Time,
|
|
196
210
|
failure_reason: T.nilable(String),
|
|
197
211
|
metadata: T::Hash[Symbol, String],
|
|
@@ -96,6 +96,13 @@ module SurgeAPI
|
|
|
96
96
|
end
|
|
97
97
|
attr_writer :conversation
|
|
98
98
|
|
|
99
|
+
# When the message was added to the conversation, in ISO8601 UTC format. For
|
|
100
|
+
# scheduled messages, this is the actual creation time, which may be later than
|
|
101
|
+
# the requested send_at. For imported messages, this is the original creation
|
|
102
|
+
# time.
|
|
103
|
+
sig { returns(Time) }
|
|
104
|
+
attr_accessor :created_at
|
|
105
|
+
|
|
99
106
|
# The reason the message failed, or null if no failure reason is set
|
|
100
107
|
sig { returns(T.nilable(String)) }
|
|
101
108
|
attr_accessor :failure_reason
|
|
@@ -151,6 +158,7 @@ module SurgeAPI
|
|
|
151
158
|
body: T.nilable(String),
|
|
152
159
|
conversation:
|
|
153
160
|
SurgeAPI::MessageReceivedWebhookEvent::Data::Conversation::OrHash,
|
|
161
|
+
created_at: Time,
|
|
154
162
|
failure_reason: T.nilable(String),
|
|
155
163
|
metadata: T::Hash[Symbol, String],
|
|
156
164
|
received_at: Time,
|
|
@@ -170,6 +178,11 @@ module SurgeAPI
|
|
|
170
178
|
body:,
|
|
171
179
|
# The conversation this message belongs to
|
|
172
180
|
conversation:,
|
|
181
|
+
# When the message was added to the conversation, in ISO8601 UTC format. For
|
|
182
|
+
# scheduled messages, this is the actual creation time, which may be later than
|
|
183
|
+
# the requested send_at. For imported messages, this is the original creation
|
|
184
|
+
# time.
|
|
185
|
+
created_at:,
|
|
173
186
|
# The reason the message failed, or null if no failure reason is set
|
|
174
187
|
failure_reason:,
|
|
175
188
|
# Set of key-value pairs that will be stored with the object.
|
|
@@ -193,6 +206,7 @@ module SurgeAPI
|
|
|
193
206
|
body: T.nilable(String),
|
|
194
207
|
conversation:
|
|
195
208
|
SurgeAPI::MessageReceivedWebhookEvent::Data::Conversation,
|
|
209
|
+
created_at: Time,
|
|
196
210
|
failure_reason: T.nilable(String),
|
|
197
211
|
metadata: T::Hash[Symbol, String],
|
|
198
212
|
received_at: Time,
|
|
@@ -89,6 +89,13 @@ module SurgeAPI
|
|
|
89
89
|
end
|
|
90
90
|
attr_writer :conversation
|
|
91
91
|
|
|
92
|
+
# When the message was added to the conversation, in ISO8601 UTC format. For
|
|
93
|
+
# scheduled messages, this is the actual creation time, which may be later than
|
|
94
|
+
# the requested send_at. For imported messages, this is the original creation
|
|
95
|
+
# time.
|
|
96
|
+
sig { returns(Time) }
|
|
97
|
+
attr_accessor :created_at
|
|
98
|
+
|
|
92
99
|
# The reason the message failed, or null if no failure reason is set
|
|
93
100
|
sig { returns(T.nilable(String)) }
|
|
94
101
|
attr_accessor :failure_reason
|
|
@@ -142,6 +149,7 @@ module SurgeAPI
|
|
|
142
149
|
body: T.nilable(String),
|
|
143
150
|
conversation:
|
|
144
151
|
SurgeAPI::MessageSentWebhookEvent::Data::Conversation::OrHash,
|
|
152
|
+
created_at: Time,
|
|
145
153
|
failure_reason: T.nilable(String),
|
|
146
154
|
metadata: T::Hash[Symbol, String],
|
|
147
155
|
sent_at: Time,
|
|
@@ -160,6 +168,11 @@ module SurgeAPI
|
|
|
160
168
|
body:,
|
|
161
169
|
# The conversation this message belongs to
|
|
162
170
|
conversation:,
|
|
171
|
+
# When the message was added to the conversation, in ISO8601 UTC format. For
|
|
172
|
+
# scheduled messages, this is the actual creation time, which may be later than
|
|
173
|
+
# the requested send_at. For imported messages, this is the original creation
|
|
174
|
+
# time.
|
|
175
|
+
created_at:,
|
|
163
176
|
# The reason the message failed, or null if no failure reason is set
|
|
164
177
|
failure_reason:,
|
|
165
178
|
# Set of key-value pairs that will be stored with the object.
|
|
@@ -183,6 +196,7 @@ module SurgeAPI
|
|
|
183
196
|
body: T.nilable(String),
|
|
184
197
|
conversation:
|
|
185
198
|
SurgeAPI::MessageSentWebhookEvent::Data::Conversation,
|
|
199
|
+
created_at: Time,
|
|
186
200
|
failure_reason: T.nilable(String),
|
|
187
201
|
metadata: T::Hash[Symbol, String],
|
|
188
202
|
sent_at: Time,
|
|
@@ -2,6 +2,7 @@ module SurgeAPI
|
|
|
2
2
|
module Models
|
|
3
3
|
type message =
|
|
4
4
|
{
|
|
5
|
+
created_at: Time?,
|
|
5
6
|
id: String,
|
|
6
7
|
attachments: ::Array[SurgeAPI::Message::Attachment],
|
|
7
8
|
blast_id: String?,
|
|
@@ -13,6 +14,8 @@ module SurgeAPI
|
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
class Message < SurgeAPI::Internal::Type::BaseModel
|
|
17
|
+
attr_accessor created_at: Time?
|
|
18
|
+
|
|
16
19
|
attr_reader id: String?
|
|
17
20
|
|
|
18
21
|
def id=: (String) -> String
|
|
@@ -46,6 +49,7 @@ module SurgeAPI
|
|
|
46
49
|
) -> SurgeAPI::Models::Message::status
|
|
47
50
|
|
|
48
51
|
def initialize: (
|
|
52
|
+
created_at: Time?,
|
|
49
53
|
?id: String,
|
|
50
54
|
?attachments: ::Array[SurgeAPI::Message::Attachment],
|
|
51
55
|
?blast_id: String?,
|
|
@@ -57,6 +61,7 @@ module SurgeAPI
|
|
|
57
61
|
) -> void
|
|
58
62
|
|
|
59
63
|
def to_hash: -> {
|
|
64
|
+
created_at: Time?,
|
|
60
65
|
id: String,
|
|
61
66
|
attachments: ::Array[SurgeAPI::Message::Attachment],
|
|
62
67
|
blast_id: String?,
|
|
@@ -36,6 +36,7 @@ module SurgeAPI
|
|
|
36
36
|
id: String,
|
|
37
37
|
body: String?,
|
|
38
38
|
conversation: SurgeAPI::MessageDeliveredWebhookEvent::Data::Conversation,
|
|
39
|
+
created_at: Time,
|
|
39
40
|
delivered_at: Time,
|
|
40
41
|
failure_reason: String?,
|
|
41
42
|
metadata: ::Hash[Symbol, String],
|
|
@@ -51,6 +52,8 @@ module SurgeAPI
|
|
|
51
52
|
|
|
52
53
|
attr_accessor conversation: SurgeAPI::MessageDeliveredWebhookEvent::Data::Conversation
|
|
53
54
|
|
|
55
|
+
attr_accessor created_at: Time
|
|
56
|
+
|
|
54
57
|
attr_accessor delivered_at: Time
|
|
55
58
|
|
|
56
59
|
attr_accessor failure_reason: String?
|
|
@@ -73,6 +76,7 @@ module SurgeAPI
|
|
|
73
76
|
id: String,
|
|
74
77
|
body: String?,
|
|
75
78
|
conversation: SurgeAPI::MessageDeliveredWebhookEvent::Data::Conversation,
|
|
79
|
+
created_at: Time,
|
|
76
80
|
delivered_at: Time,
|
|
77
81
|
failure_reason: String?,
|
|
78
82
|
metadata: ::Hash[Symbol, String],
|
|
@@ -85,6 +89,7 @@ module SurgeAPI
|
|
|
85
89
|
id: String,
|
|
86
90
|
body: String?,
|
|
87
91
|
conversation: SurgeAPI::MessageDeliveredWebhookEvent::Data::Conversation,
|
|
92
|
+
created_at: Time,
|
|
88
93
|
delivered_at: Time,
|
|
89
94
|
failure_reason: String?,
|
|
90
95
|
metadata: ::Hash[Symbol, String],
|
|
@@ -36,6 +36,7 @@ module SurgeAPI
|
|
|
36
36
|
id: String,
|
|
37
37
|
body: String?,
|
|
38
38
|
conversation: SurgeAPI::MessageFailedWebhookEvent::Data::Conversation,
|
|
39
|
+
created_at: Time,
|
|
39
40
|
failed_at: Time,
|
|
40
41
|
failure_reason: String?,
|
|
41
42
|
metadata: ::Hash[Symbol, String],
|
|
@@ -51,6 +52,8 @@ module SurgeAPI
|
|
|
51
52
|
|
|
52
53
|
attr_accessor conversation: SurgeAPI::MessageFailedWebhookEvent::Data::Conversation
|
|
53
54
|
|
|
55
|
+
attr_accessor created_at: Time
|
|
56
|
+
|
|
54
57
|
attr_accessor failed_at: Time
|
|
55
58
|
|
|
56
59
|
attr_accessor failure_reason: String?
|
|
@@ -73,6 +76,7 @@ module SurgeAPI
|
|
|
73
76
|
id: String,
|
|
74
77
|
body: String?,
|
|
75
78
|
conversation: SurgeAPI::MessageFailedWebhookEvent::Data::Conversation,
|
|
79
|
+
created_at: Time,
|
|
76
80
|
failed_at: Time,
|
|
77
81
|
failure_reason: String?,
|
|
78
82
|
metadata: ::Hash[Symbol, String],
|
|
@@ -85,6 +89,7 @@ module SurgeAPI
|
|
|
85
89
|
id: String,
|
|
86
90
|
body: String?,
|
|
87
91
|
conversation: SurgeAPI::MessageFailedWebhookEvent::Data::Conversation,
|
|
92
|
+
created_at: Time,
|
|
88
93
|
failed_at: Time,
|
|
89
94
|
failure_reason: String?,
|
|
90
95
|
metadata: ::Hash[Symbol, String],
|
|
@@ -36,6 +36,7 @@ module SurgeAPI
|
|
|
36
36
|
id: String,
|
|
37
37
|
body: String?,
|
|
38
38
|
conversation: SurgeAPI::MessageReceivedWebhookEvent::Data::Conversation,
|
|
39
|
+
created_at: Time,
|
|
39
40
|
failure_reason: String?,
|
|
40
41
|
metadata: ::Hash[Symbol, String],
|
|
41
42
|
received_at: Time,
|
|
@@ -51,6 +52,8 @@ module SurgeAPI
|
|
|
51
52
|
|
|
52
53
|
attr_accessor conversation: SurgeAPI::MessageReceivedWebhookEvent::Data::Conversation
|
|
53
54
|
|
|
55
|
+
attr_accessor created_at: Time
|
|
56
|
+
|
|
54
57
|
attr_accessor failure_reason: String?
|
|
55
58
|
|
|
56
59
|
attr_accessor metadata: ::Hash[Symbol, String]
|
|
@@ -73,6 +76,7 @@ module SurgeAPI
|
|
|
73
76
|
id: String,
|
|
74
77
|
body: String?,
|
|
75
78
|
conversation: SurgeAPI::MessageReceivedWebhookEvent::Data::Conversation,
|
|
79
|
+
created_at: Time,
|
|
76
80
|
failure_reason: String?,
|
|
77
81
|
metadata: ::Hash[Symbol, String],
|
|
78
82
|
received_at: Time,
|
|
@@ -85,6 +89,7 @@ module SurgeAPI
|
|
|
85
89
|
id: String,
|
|
86
90
|
body: String?,
|
|
87
91
|
conversation: SurgeAPI::MessageReceivedWebhookEvent::Data::Conversation,
|
|
92
|
+
created_at: Time,
|
|
88
93
|
failure_reason: String?,
|
|
89
94
|
metadata: ::Hash[Symbol, String],
|
|
90
95
|
received_at: Time,
|
|
@@ -36,6 +36,7 @@ module SurgeAPI
|
|
|
36
36
|
id: String,
|
|
37
37
|
body: String?,
|
|
38
38
|
conversation: SurgeAPI::MessageSentWebhookEvent::Data::Conversation,
|
|
39
|
+
created_at: Time,
|
|
39
40
|
failure_reason: String?,
|
|
40
41
|
metadata: ::Hash[Symbol, String],
|
|
41
42
|
sent_at: Time,
|
|
@@ -51,6 +52,8 @@ module SurgeAPI
|
|
|
51
52
|
|
|
52
53
|
attr_accessor conversation: SurgeAPI::MessageSentWebhookEvent::Data::Conversation
|
|
53
54
|
|
|
55
|
+
attr_accessor created_at: Time
|
|
56
|
+
|
|
54
57
|
attr_accessor failure_reason: String?
|
|
55
58
|
|
|
56
59
|
attr_accessor metadata: ::Hash[Symbol, String]
|
|
@@ -73,6 +76,7 @@ module SurgeAPI
|
|
|
73
76
|
id: String,
|
|
74
77
|
body: String?,
|
|
75
78
|
conversation: SurgeAPI::MessageSentWebhookEvent::Data::Conversation,
|
|
79
|
+
created_at: Time,
|
|
76
80
|
failure_reason: String?,
|
|
77
81
|
metadata: ::Hash[Symbol, String],
|
|
78
82
|
sent_at: Time,
|
|
@@ -85,6 +89,7 @@ module SurgeAPI
|
|
|
85
89
|
id: String,
|
|
86
90
|
body: String?,
|
|
87
91
|
conversation: SurgeAPI::MessageSentWebhookEvent::Data::Conversation,
|
|
92
|
+
created_at: Time,
|
|
88
93
|
failure_reason: String?,
|
|
89
94
|
metadata: ::Hash[Symbol, String],
|
|
90
95
|
sent_at: Time,
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: surge_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.26.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Surge
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-
|
|
10
|
+
date: 2026-11-04 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: base64
|