Skip to content

Commit 2481de9

Browse files
release: 4.18.2 (#97)
* chore: update api-spec with new message resend endpoint * release: 4.18.2 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 17cc642 commit 2481de9

19 files changed

Lines changed: 234 additions & 7 deletions

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "4.18.1"
2+
".": "4.18.2"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 135
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier/courier-0b80b9b90e51b4d19f5cebadddf91c345090af9e6ad46cfb9364f0421e35e0bb.yml
3-
openapi_spec_hash: 5283fb7d76bbdd7dcf48784f7128513b
4-
config_hash: 66d7703eac15d2affc326ac25b55bcd6
1+
configured_endpoints: 136
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier/courier-d2b3bdb6747f4acc997702dbd9f24340a3d85f22c00e1f17af2bd6621358bc77.yml
3+
openapi_spec_hash: b6791652567d04fd87c6117090de7635
4+
config_hash: 627f8592c19dfb77f91ffbec2a057c3a

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 4.18.2 (2026-07-09)
4+
5+
Full Changelog: [v4.18.1...v4.18.2](https://github.com/trycourier/courier-ruby/compare/v4.18.1...v4.18.2)
6+
7+
### Chores
8+
9+
* update api-spec with new message resend endpoint ([a785ed4](https://github.com/trycourier/courier-ruby/commit/a785ed495410f21ee51c4a5c5f3a8c87a59578c4))
10+
311
## 4.18.1 (2026-07-07)
412

513
Full Changelog: [v4.18.0...v4.18.1](https://github.com/trycourier/courier-ruby/compare/v4.18.0...v4.18.1)

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ GIT
1111
PATH
1212
remote: .
1313
specs:
14-
trycourier (4.18.1)
14+
trycourier (4.18.2)
1515
cgi
1616
connection_pool
1717

lib/courier.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,8 @@
244244
require_relative "courier/models/message_list_response"
245245
require_relative "courier/models/message_providers"
246246
require_relative "courier/models/message_providers_type"
247+
require_relative "courier/models/message_resend_params"
248+
require_relative "courier/models/message_resend_response"
247249
require_relative "courier/models/message_retrieve_params"
248250
require_relative "courier/models/message_retrieve_response"
249251
require_relative "courier/models/message_routing"

lib/courier/models.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,8 @@ module Courier
332332

333333
MessageProvidersType = Courier::Models::MessageProvidersType
334334

335+
MessageResendParams = Courier::Models::MessageResendParams
336+
335337
MessageRetrieveParams = Courier::Models::MessageRetrieveParams
336338

337339
MessageRouting = Courier::Models::MessageRouting
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# frozen_string_literal: true
2+
3+
module Courier
4+
module Models
5+
# @see Courier::Resources::Messages#resend
6+
class MessageResendParams < Courier::Internal::Type::BaseModel
7+
extend Courier::Internal::Type::RequestParameters::Converter
8+
include Courier::Internal::Type::RequestParameters
9+
10+
# @!attribute message_id
11+
#
12+
# @return [String]
13+
required :message_id, String
14+
15+
# @!method initialize(message_id:, request_options: {})
16+
# @param message_id [String]
17+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
18+
end
19+
end
20+
end
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# frozen_string_literal: true
2+
3+
module Courier
4+
module Models
5+
# @see Courier::Resources::Messages#resend
6+
class MessageResendResponse < Courier::Internal::Type::BaseModel
7+
# @!attribute message_id
8+
# The new message id for the resent message. It is distinct from the id of the
9+
# original message that was resent.
10+
#
11+
# @return [String]
12+
required :message_id, String, api_name: :messageId
13+
14+
# @!method initialize(message_id:)
15+
# Some parameter documentations has been truncated, see
16+
# {Courier::Models::MessageResendResponse} for more details.
17+
#
18+
# @param message_id [String] The new message id for the resent message. It is distinct from the id of the ori
19+
end
20+
end
21+
end

lib/courier/resources/messages.rb

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,33 @@ def history(message_id, params = {})
150150
)
151151
end
152152

153+
# Some parameter documentations has been truncated, see
154+
# {Courier::Models::MessageResendParams} for more details.
155+
#
156+
# Resend a previously sent message. The original send request is loaded from
157+
# storage and a brand-new send is enqueued for the same recipient and content,
158+
# producing a **new** `messageId` — the original message is not modified.
159+
# Throttled by a per-message rate limit; a repeat inside the limit window returns
160+
# `429 Too Many Requests`.
161+
#
162+
# @overload resend(message_id, request_options: {})
163+
#
164+
# @param message_id [String] A unique identifier representing the message ID of the original message to resen
165+
#
166+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}, nil]
167+
#
168+
# @return [Courier::Models::MessageResendResponse]
169+
#
170+
# @see Courier::Models::MessageResendParams
171+
def resend(message_id, params = {})
172+
@client.request(
173+
method: :post,
174+
path: ["messages/%1$s/resend", message_id],
175+
model: Courier::Models::MessageResendResponse,
176+
options: params[:request_options]
177+
)
178+
end
179+
153180
# @api private
154181
#
155182
# @param client [Courier::Client]

lib/courier/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module Courier
4-
VERSION = "4.18.1"
4+
VERSION = "4.18.2"
55
end

0 commit comments

Comments
 (0)