Skip to content

Commit 7bd4f18

Browse files
feat(api): api update
1 parent c7a286e commit 7bd4f18

4 files changed

Lines changed: 39 additions & 28 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 40
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sent%2Fsent-dm-3646e4913179364806905f9f0df9756cde93acb55493661cb0a3a36c9e68cdb2.yml
3-
openapi_spec_hash: 3878c0e6fc7e695a2c059a712dac0f4f
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sent%2Fsent-dm-2d0bb64dc84ba67ee91db6ff81424a968c5ddea4d2844ba67fc9b4b27881d60f.yml
3+
openapi_spec_hash: 8e1d6bc2a6c6afef625e2bdcdf28ac63
44
config_hash: d8e8429147c4e214ff53c11e7ab2a1a6

lib/sentdm/models/message_send_response.rb

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,6 @@ class MessageSendResponse < Sentdm::Internal::Type::BaseModel
4141

4242
# @see Sentdm::Models::MessageSendResponse#data
4343
class Data < Sentdm::Internal::Type::BaseModel
44-
# @!attribute body
45-
# Resolved template body text
46-
#
47-
# @return [String, nil]
48-
optional :body, String, nil?: true
49-
5044
# @!attribute recipients
5145
# Per-recipient message results
5246
#
@@ -72,11 +66,9 @@ class Data < Sentdm::Internal::Type::BaseModel
7266
# @return [String, nil]
7367
optional :template_name, String
7468

75-
# @!method initialize(body: nil, recipients: nil, status: nil, template_id: nil, template_name: nil)
69+
# @!method initialize(recipients: nil, status: nil, template_id: nil, template_name: nil)
7670
# Response for the multi-recipient send message endpoint
7771
#
78-
# @param body [String, nil] Resolved template body text
79-
#
8072
# @param recipients [Array<Sentdm::Models::MessageSendResponse::Data::Recipient>] Per-recipient message results
8173
#
8274
# @param status [String] Overall request status (e.g. "accepted")
@@ -86,6 +78,13 @@ class Data < Sentdm::Internal::Type::BaseModel
8678
# @param template_name [String] Template display name
8779

8880
class Recipient < Sentdm::Internal::Type::BaseModel
81+
# @!attribute body
82+
# Resolved template body text for this recipient's channel, or null for
83+
# auto-detect
84+
#
85+
# @return [String, nil]
86+
optional :body, String, nil?: true
87+
8988
# @!attribute channel
9089
# Channel this message will be sent on (e.g. "sms", "whatsapp"), or null for
9190
# auto-detect
@@ -105,12 +104,14 @@ class Recipient < Sentdm::Internal::Type::BaseModel
105104
# @return [String, nil]
106105
optional :to, String
107106

108-
# @!method initialize(channel: nil, message_id: nil, to: nil)
107+
# @!method initialize(body: nil, channel: nil, message_id: nil, to: nil)
109108
# Some parameter documentations has been truncated, see
110109
# {Sentdm::Models::MessageSendResponse::Data::Recipient} for more details.
111110
#
112111
# Per-recipient result in the send message response
113112
#
113+
# @param body [String, nil] Resolved template body text for this recipient's channel, or null for auto-detec
114+
#
114115
# @param channel [String, nil] Channel this message will be sent on (e.g. "sms", "whatsapp"), or null for auto-
115116
#
116117
# @param message_id [String] Unique message identifier for tracking this recipient's message

rbi/sentdm/models/message_send_response.rbi

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,6 @@ module Sentdm
8383
)
8484
end
8585

86-
# Resolved template body text
87-
sig { returns(T.nilable(String)) }
88-
attr_accessor :body
89-
9086
# Per-recipient message results
9187
sig do
9288
returns(
@@ -131,7 +127,6 @@ module Sentdm
131127
# Response for the multi-recipient send message endpoint
132128
sig do
133129
params(
134-
body: T.nilable(String),
135130
recipients:
136131
T::Array[
137132
Sentdm::Models::MessageSendResponse::Data::Recipient::OrHash
@@ -142,8 +137,6 @@ module Sentdm
142137
).returns(T.attached_class)
143138
end
144139
def self.new(
145-
# Resolved template body text
146-
body: nil,
147140
# Per-recipient message results
148141
recipients: nil,
149142
# Overall request status (e.g. "accepted")
@@ -158,7 +151,6 @@ module Sentdm
158151
sig do
159152
override.returns(
160153
{
161-
body: T.nilable(String),
162154
recipients:
163155
T::Array[Sentdm::Models::MessageSendResponse::Data::Recipient],
164156
status: String,
@@ -179,6 +171,11 @@ module Sentdm
179171
)
180172
end
181173

174+
# Resolved template body text for this recipient's channel, or null for
175+
# auto-detect
176+
sig { returns(T.nilable(String)) }
177+
attr_accessor :body
178+
182179
# Channel this message will be sent on (e.g. "sms", "whatsapp"), or null for
183180
# auto-detect
184181
sig { returns(T.nilable(String)) }
@@ -201,12 +198,16 @@ module Sentdm
201198
# Per-recipient result in the send message response
202199
sig do
203200
params(
201+
body: T.nilable(String),
204202
channel: T.nilable(String),
205203
message_id: String,
206204
to: String
207205
).returns(T.attached_class)
208206
end
209207
def self.new(
208+
# Resolved template body text for this recipient's channel, or null for
209+
# auto-detect
210+
body: nil,
210211
# Channel this message will be sent on (e.g. "sms", "whatsapp"), or null for
211212
# auto-detect
212213
channel: nil,
@@ -219,7 +220,12 @@ module Sentdm
219220

220221
sig do
221222
override.returns(
222-
{ channel: T.nilable(String), message_id: String, to: String }
223+
{
224+
body: T.nilable(String),
225+
channel: T.nilable(String),
226+
message_id: String,
227+
to: String
228+
}
223229
)
224230
end
225231
def to_hash

sig/sentdm/models/message_send_response.rbs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,13 @@ module Sentdm
3737

3838
type data =
3939
{
40-
body: String?,
4140
recipients: ::Array[Sentdm::Models::MessageSendResponse::Data::Recipient],
4241
status: String,
4342
template_id: String,
4443
template_name: String
4544
}
4645

4746
class Data < Sentdm::Internal::Type::BaseModel
48-
attr_accessor body: String?
49-
5047
attr_reader recipients: ::Array[Sentdm::Models::MessageSendResponse::Data::Recipient]?
5148

5249
def recipients=: (
@@ -66,24 +63,25 @@ module Sentdm
6663
def template_name=: (String) -> String
6764

6865
def initialize: (
69-
?body: String?,
7066
?recipients: ::Array[Sentdm::Models::MessageSendResponse::Data::Recipient],
7167
?status: String,
7268
?template_id: String,
7369
?template_name: String
7470
) -> void
7571

7672
def to_hash: -> {
77-
body: String?,
7873
recipients: ::Array[Sentdm::Models::MessageSendResponse::Data::Recipient],
7974
status: String,
8075
template_id: String,
8176
template_name: String
8277
}
8378

84-
type recipient = { channel: String?, message_id: String, to: String }
79+
type recipient =
80+
{ body: String?, channel: String?, message_id: String, to: String }
8581

8682
class Recipient < Sentdm::Internal::Type::BaseModel
83+
attr_accessor body: String?
84+
8785
attr_accessor channel: String?
8886

8987
attr_reader message_id: String?
@@ -95,12 +93,18 @@ module Sentdm
9593
def to=: (String) -> String
9694

9795
def initialize: (
96+
?body: String?,
9897
?channel: String?,
9998
?message_id: String,
10099
?to: String
101100
) -> void
102101

103-
def to_hash: -> { channel: String?, message_id: String, to: String }
102+
def to_hash: -> {
103+
body: String?,
104+
channel: String?,
105+
message_id: String,
106+
to: String
107+
}
104108
end
105109
end
106110
end

0 commit comments

Comments
 (0)