surge_api 0.6.0 → 0.7.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 +8 -0
- data/README.md +1 -1
- data/lib/surge_api/models/message.rb +9 -1
- data/lib/surge_api/models/message_params.rb +18 -2
- data/lib/surge_api/version.rb +1 -1
- data/rbi/surge_api/models/message.rbi +14 -3
- data/rbi/surge_api/models/message_params.rbi +22 -0
- data/sig/surge_api/models/message.rbs +10 -3
- data/sig/surge_api/models/message_params.rbs +14 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3e8128de1b743d0dfdea80a3444fe70781bb029f32061761b09b749cd8a1abf7
|
|
4
|
+
data.tar.gz: 543611ed65fb81164bd534cd91af8a0c6bc2bf96e5efda155aec5204a57c63ce
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4b124f0da4f0ee63a4e0d418a16059b1f049b26ca9c1361f712e1bd8890fc73d51d9a930818345e753bb22850442085000c293d4a39f9df891582e87b2b31ff3
|
|
7
|
+
data.tar.gz: b1a17edfc1c13106f82f11cd1732984f20e2ec7c5afa0ae055c5f31e795c77c9f307520ba38b411c9dda6687f11f91dcefa4cf61cd2b26a1c0a433b43ab54970
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.7.0 (2026-01-18)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.6.0...v0.7.0](https://github.com/surgeapi/ruby-sdk/compare/v0.6.0...v0.7.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([3eaef18](https://github.com/surgeapi/ruby-sdk/commit/3eaef1827965563c4aba448425c32a7850d8d5ba))
|
|
10
|
+
|
|
3
11
|
## 0.6.0 (2026-01-18)
|
|
4
12
|
|
|
5
13
|
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
|
@@ -27,7 +27,13 @@ module SurgeAPI
|
|
|
27
27
|
# @return [SurgeAPI::Models::Message::Conversation, nil]
|
|
28
28
|
optional :conversation, -> { SurgeAPI::Message::Conversation }
|
|
29
29
|
|
|
30
|
-
# @!
|
|
30
|
+
# @!attribute metadata
|
|
31
|
+
# Set of key-value pairs that will be stored with the object.
|
|
32
|
+
#
|
|
33
|
+
# @return [Hash{Symbol=>String}, nil]
|
|
34
|
+
optional :metadata, SurgeAPI::Internal::Type::HashOf[String]
|
|
35
|
+
|
|
36
|
+
# @!method initialize(id: nil, attachments: nil, body: nil, conversation: nil, metadata: nil)
|
|
31
37
|
# A Message is a communication sent to a Contact.
|
|
32
38
|
#
|
|
33
39
|
# @param id [String] Unique identifier for the object.
|
|
@@ -37,6 +43,8 @@ module SurgeAPI
|
|
|
37
43
|
# @param body [String] The message body.
|
|
38
44
|
#
|
|
39
45
|
# @param conversation [SurgeAPI::Models::Message::Conversation] A conversation with a Contact
|
|
46
|
+
#
|
|
47
|
+
# @param metadata [Hash{Symbol=>String}] Set of key-value pairs that will be stored with the object.
|
|
40
48
|
|
|
41
49
|
class Attachment < SurgeAPI::Internal::Type::BaseModel
|
|
42
50
|
# @!attribute id
|
|
@@ -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
|
data/lib/surge_api/version.rb
CHANGED
|
@@ -37,13 +37,21 @@ module SurgeAPI
|
|
|
37
37
|
sig { params(conversation: SurgeAPI::Message::Conversation::OrHash).void }
|
|
38
38
|
attr_writer :conversation
|
|
39
39
|
|
|
40
|
+
# Set of key-value pairs that will be stored with the object.
|
|
41
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
42
|
+
attr_reader :metadata
|
|
43
|
+
|
|
44
|
+
sig { params(metadata: T::Hash[Symbol, String]).void }
|
|
45
|
+
attr_writer :metadata
|
|
46
|
+
|
|
40
47
|
# A Message is a communication sent to a Contact.
|
|
41
48
|
sig do
|
|
42
49
|
params(
|
|
43
50
|
id: String,
|
|
44
51
|
attachments: T::Array[SurgeAPI::Message::Attachment::OrHash],
|
|
45
52
|
body: String,
|
|
46
|
-
conversation: SurgeAPI::Message::Conversation::OrHash
|
|
53
|
+
conversation: SurgeAPI::Message::Conversation::OrHash,
|
|
54
|
+
metadata: T::Hash[Symbol, String]
|
|
47
55
|
).returns(T.attached_class)
|
|
48
56
|
end
|
|
49
57
|
def self.new(
|
|
@@ -53,7 +61,9 @@ module SurgeAPI
|
|
|
53
61
|
# The message body.
|
|
54
62
|
body: nil,
|
|
55
63
|
# A conversation with a Contact
|
|
56
|
-
conversation: nil
|
|
64
|
+
conversation: nil,
|
|
65
|
+
# Set of key-value pairs that will be stored with the object.
|
|
66
|
+
metadata: nil
|
|
57
67
|
)
|
|
58
68
|
end
|
|
59
69
|
|
|
@@ -63,7 +73,8 @@ module SurgeAPI
|
|
|
63
73
|
id: String,
|
|
64
74
|
attachments: T::Array[SurgeAPI::Message::Attachment],
|
|
65
75
|
body: String,
|
|
66
|
-
conversation: SurgeAPI::Message::Conversation
|
|
76
|
+
conversation: SurgeAPI::Message::Conversation,
|
|
77
|
+
metadata: T::Hash[Symbol, String]
|
|
67
78
|
}
|
|
68
79
|
)
|
|
69
80
|
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
|
)
|
|
@@ -5,7 +5,8 @@ module SurgeAPI
|
|
|
5
5
|
id: String,
|
|
6
6
|
attachments: ::Array[SurgeAPI::Message::Attachment],
|
|
7
7
|
body: String,
|
|
8
|
-
conversation: SurgeAPI::Message::Conversation
|
|
8
|
+
conversation: SurgeAPI::Message::Conversation,
|
|
9
|
+
metadata: ::Hash[Symbol, String]
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
class Message < SurgeAPI::Internal::Type::BaseModel
|
|
@@ -29,18 +30,24 @@ module SurgeAPI
|
|
|
29
30
|
SurgeAPI::Message::Conversation
|
|
30
31
|
) -> SurgeAPI::Message::Conversation
|
|
31
32
|
|
|
33
|
+
attr_reader metadata: ::Hash[Symbol, String]?
|
|
34
|
+
|
|
35
|
+
def metadata=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
|
|
36
|
+
|
|
32
37
|
def initialize: (
|
|
33
38
|
?id: String,
|
|
34
39
|
?attachments: ::Array[SurgeAPI::Message::Attachment],
|
|
35
40
|
?body: String,
|
|
36
|
-
?conversation: SurgeAPI::Message::Conversation
|
|
41
|
+
?conversation: SurgeAPI::Message::Conversation,
|
|
42
|
+
?metadata: ::Hash[Symbol, String]
|
|
37
43
|
) -> void
|
|
38
44
|
|
|
39
45
|
def to_hash: -> {
|
|
40
46
|
id: String,
|
|
41
47
|
attachments: ::Array[SurgeAPI::Message::Attachment],
|
|
42
48
|
body: String,
|
|
43
|
-
conversation: SurgeAPI::Message::Conversation
|
|
49
|
+
conversation: SurgeAPI::Message::Conversation,
|
|
50
|
+
metadata: ::Hash[Symbol, String]
|
|
44
51
|
}
|
|
45
52
|
|
|
46
53
|
type attachment = { id: String, type: String, url: String }
|
|
@@ -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
|
|