Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "4.21.0"
".": "4.22.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 134
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier/courier-b053468fefe6d757f86f3233ebbc52d80329ed2a6e7a6740fee01e4028a4c3b9.yml
openapi_spec_hash: 416835e693de0fe19945be90a787d3f3
config_hash: 8d28dbeabe9d4dcc7d5b8c021a4cbbd7
configured_endpoints: 136
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier/courier-e0b0d58ce19411b3126e6d5cb0f9ae93061e2ec859aae4ec17a15f80dc74cd04.yml
openapi_spec_hash: 38d1ecc4bd77bb5245afe86f2d8ffb48
config_hash: b30c4b3086cd9f3da06a63b256d8c189
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 4.22.0 (2026-07-28)

Full Changelog: [v4.21.0...v4.22.0](https://github.com/trycourier/courier-ruby/compare/v4.21.0...v4.22.0)

### Features

* Document DELETE/PUT restore for inbox messages (C-19268) ([#175](https://github.com/trycourier/courier-ruby/issues/175)) ([36c1d01](https://github.com/trycourier/courier-ruby/commit/36c1d0116770621edfefe94781e72a8061e43781))


### Documentation

* **openapi:** describe user topic-preference fields explicitly ([#172](https://github.com/trycourier/courier-ruby/issues/172)) ([c540bdb](https://github.com/trycourier/courier-ruby/commit/c540bdb855f180d850feeabf1a30ed4394092b50))
* **openapi:** document Idempotency-Key header on idempotent POST endpoints ([#176](https://github.com/trycourier/courier-ruby/issues/176)) ([b76b6bb](https://github.com/trycourier/courier-ruby/commit/b76b6bbbd0e856d486037d7d140b2d934eb150ea))
* **openapi:** rewrite operation descriptions for agents and SEO ([#174](https://github.com/trycourier/courier-ruby/issues/174)) ([8a8c25b](https://github.com/trycourier/courier-ruby/commit/8a8c25b54b9a8db2cd906ab09ac8729423fa35b8))

## 4.21.0 (2026-07-23)

Full Changelog: [v4.20.0...v4.21.0](https://github.com/trycourier/courier-ruby/compare/v4.20.0...v4.21.0)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GIT
PATH
remote: .
specs:
trycourier (4.21.0)
trycourier (4.22.0)
cgi
connection_pool

Expand Down
4 changes: 4 additions & 0 deletions lib/courier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@
require_relative "courier/models/icons"
require_relative "courier/models/inbound_track_event_params"
require_relative "courier/models/inbound_track_event_response"
require_relative "courier/models/inbox/message_delete_params"
require_relative "courier/models/inbox/message_restore_params"
require_relative "courier/models/intercom"
require_relative "courier/models/intercom_recipient"
require_relative "courier/models/journey"
Expand Down Expand Up @@ -424,6 +426,8 @@
require_relative "courier/resources/digests"
require_relative "courier/resources/digests/schedules"
require_relative "courier/resources/inbound"
require_relative "courier/resources/inbox"
require_relative "courier/resources/inbox/messages"
require_relative "courier/resources/journeys"
require_relative "courier/resources/journeys/templates"
require_relative "courier/resources/lists"
Expand Down
4 changes: 4 additions & 0 deletions lib/courier/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ class Client < Courier::Internal::Transport::BaseClient
# @return [Courier::Resources::Lists]
attr_reader :lists

# @return [Courier::Resources::Inbox]
attr_reader :inbox

# @return [Courier::Resources::Messages]
attr_reader :messages

Expand Down Expand Up @@ -150,6 +153,7 @@ def initialize(
@digests = Courier::Resources::Digests.new(client: self)
@inbound = Courier::Resources::Inbound.new(client: self)
@lists = Courier::Resources::Lists.new(client: self)
@inbox = Courier::Resources::Inbox.new(client: self)
@messages = Courier::Resources::Messages.new(client: self)
@requests = Courier::Resources::Requests.new(client: self)
@notifications = Courier::Resources::Notifications.new(client: self)
Expand Down
2 changes: 2 additions & 0 deletions lib/courier/models.rb
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ module Courier

InboundTrackEventParams = Courier::Models::InboundTrackEventParams

Inbox = Courier::Models::Inbox

Intercom = Courier::Models::Intercom

IntercomRecipient = Courier::Models::IntercomRecipient
Expand Down
14 changes: 13 additions & 1 deletion lib/courier/models/automations/invoke_invoke_ad_hoc_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,25 @@ class InvokeInvokeAdHocParams < Courier::Internal::Type::BaseModel
# @return [String, nil]
optional :template, String, nil?: true

# @!method initialize(automation:, brand: nil, data: nil, profile: nil, recipient: nil, template: nil, request_options: {})
# @!attribute idempotency_key
#
# @return [String, nil]
optional :idempotency_key, String

# @!attribute x_idempotency_expiration
#
# @return [String, nil]
optional :x_idempotency_expiration, String

# @!method initialize(automation:, brand: nil, data: nil, profile: nil, recipient: nil, template: nil, idempotency_key: nil, x_idempotency_expiration: nil, request_options: {})
# @param automation [Courier::Models::Automations::InvokeInvokeAdHocParams::Automation]
# @param brand [String, nil]
# @param data [Hash{Symbol=>Object}, nil]
# @param profile [Hash{Symbol=>Object}, nil]
# @param recipient [String, nil]
# @param template [String, nil]
# @param idempotency_key [String]
# @param x_idempotency_expiration [String]
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]

class Automation < Courier::Internal::Type::BaseModel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,25 @@ class InvokeInvokeByTemplateParams < Courier::Internal::Type::BaseModel
# @return [String, nil]
optional :template, String, nil?: true

# @!method initialize(template_id:, recipient:, brand: nil, data: nil, profile: nil, template: nil, request_options: {})
# @!attribute idempotency_key
#
# @return [String, nil]
optional :idempotency_key, String

# @!attribute x_idempotency_expiration
#
# @return [String, nil]
optional :x_idempotency_expiration, String

# @!method initialize(template_id:, recipient:, brand: nil, data: nil, profile: nil, template: nil, idempotency_key: nil, x_idempotency_expiration: nil, request_options: {})
# @param template_id [String]
# @param recipient [String, nil]
# @param brand [String, nil]
# @param data [Hash{Symbol=>Object}, nil]
# @param profile [Hash{Symbol=>Object}, nil]
# @param template [String, nil]
# @param idempotency_key [String]
# @param x_idempotency_expiration [String]
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
end
end
Expand Down
14 changes: 13 additions & 1 deletion lib/courier/models/brand_create_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,23 @@ class BrandCreateParams < Courier::Internal::Type::BaseModel
# @return [Courier::Models::BrandSnippets, nil]
optional :snippets, -> { Courier::BrandSnippets }, nil?: true

# @!method initialize(name:, settings:, id: nil, snippets: nil, request_options: {})
# @!attribute idempotency_key
#
# @return [String, nil]
optional :idempotency_key, String

# @!attribute x_idempotency_expiration
#
# @return [String, nil]
optional :x_idempotency_expiration, String

# @!method initialize(name:, settings:, id: nil, snippets: nil, idempotency_key: nil, x_idempotency_expiration: nil, request_options: {})
# @param name [String]
# @param settings [Courier::Models::BrandSettings]
# @param id [String, nil]
# @param snippets [Courier::Models::BrandSnippets, nil]
# @param idempotency_key [String]
# @param x_idempotency_expiration [String]
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
end
end
Expand Down
22 changes: 22 additions & 0 deletions lib/courier/models/inbox/message_delete_params.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# frozen_string_literal: true

module Courier
module Models
module Inbox
# @see Courier::Resources::Inbox::Messages#delete
class MessageDeleteParams < Courier::Internal::Type::BaseModel
extend Courier::Internal::Type::RequestParameters::Converter
include Courier::Internal::Type::RequestParameters

# @!attribute message_id
#
# @return [String]
required :message_id, String

# @!method initialize(message_id:, request_options: {})
# @param message_id [String]
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
end
end
end
end
22 changes: 22 additions & 0 deletions lib/courier/models/inbox/message_restore_params.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# frozen_string_literal: true

module Courier
module Models
module Inbox
# @see Courier::Resources::Inbox::Messages#restore
class MessageRestoreParams < Courier::Internal::Type::BaseModel
extend Courier::Internal::Type::RequestParameters::Converter
include Courier::Internal::Type::RequestParameters

# @!attribute message_id
#
# @return [String]
required :message_id, String

# @!method initialize(message_id:, request_options: {})
# @param message_id [String]
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
end
end
end
end
14 changes: 13 additions & 1 deletion lib/courier/models/journey_cancel_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,19 @@ class JourneyCancelParams < Courier::Internal::Type::BaseModel
extend Courier::Internal::Type::RequestParameters::Converter
include Courier::Internal::Type::RequestParameters

# @!method initialize(request_options: {})
# @!attribute idempotency_key
#
# @return [String, nil]
optional :idempotency_key, String

# @!attribute x_idempotency_expiration
#
# @return [String, nil]
optional :x_idempotency_expiration, String

# @!method initialize(idempotency_key: nil, x_idempotency_expiration: nil, request_options: {})
# @param idempotency_key [String]
# @param x_idempotency_expiration [String]
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
end
end
Expand Down
14 changes: 13 additions & 1 deletion lib/courier/models/journey_create_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,19 @@ class JourneyCreateParams < Courier::Models::CreateJourneyRequest
extend Courier::Internal::Type::RequestParameters::Converter
include Courier::Internal::Type::RequestParameters

# @!method initialize(request_options: {})
# @!attribute idempotency_key
#
# @return [String, nil]
optional :idempotency_key, String

# @!attribute x_idempotency_expiration
#
# @return [String, nil]
optional :x_idempotency_expiration, String

# @!method initialize(idempotency_key: nil, x_idempotency_expiration: nil, request_options: {})
# @param idempotency_key [String]
# @param x_idempotency_expiration [String]
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
end
end
Expand Down
14 changes: 13 additions & 1 deletion lib/courier/models/journey_invoke_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,20 @@ class JourneyInvokeParams < Courier::Models::JourneysInvokeRequest
# @return [String]
required :template_id, String

# @!method initialize(template_id:, request_options: {})
# @!attribute idempotency_key
#
# @return [String, nil]
optional :idempotency_key, String

# @!attribute x_idempotency_expiration
#
# @return [String, nil]
optional :x_idempotency_expiration, String

# @!method initialize(template_id:, idempotency_key: nil, x_idempotency_expiration: nil, request_options: {})
# @param template_id [String]
# @param idempotency_key [String]
# @param x_idempotency_expiration [String]
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
end
end
Expand Down
14 changes: 13 additions & 1 deletion lib/courier/models/journey_publish_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,20 @@ class JourneyPublishParams < Courier::Models::JourneyPublishRequest
# @return [String]
required :template_id, String

# @!method initialize(template_id:, request_options: {})
# @!attribute idempotency_key
#
# @return [String, nil]
optional :idempotency_key, String

# @!attribute x_idempotency_expiration
#
# @return [String, nil]
optional :x_idempotency_expiration, String

# @!method initialize(template_id:, idempotency_key: nil, x_idempotency_expiration: nil, request_options: {})
# @param template_id [String]
# @param idempotency_key [String]
# @param x_idempotency_expiration [String]
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
end
end
Expand Down
14 changes: 13 additions & 1 deletion lib/courier/models/journeys/template_create_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,20 @@ class TemplateCreateParams < Courier::Models::JourneyTemplateCreateRequest
# @return [String]
required :template_id, String

# @!method initialize(template_id:, request_options: {})
# @!attribute idempotency_key
#
# @return [String, nil]
optional :idempotency_key, String

# @!attribute x_idempotency_expiration
#
# @return [String, nil]
optional :x_idempotency_expiration, String

# @!method initialize(template_id:, idempotency_key: nil, x_idempotency_expiration: nil, request_options: {})
# @param template_id [String]
# @param idempotency_key [String]
# @param x_idempotency_expiration [String]
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
end
end
Expand Down
14 changes: 13 additions & 1 deletion lib/courier/models/journeys/template_publish_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,21 @@ class TemplatePublishParams < Courier::Models::JourneyTemplatePublishRequest
# @return [String]
required :notification_id, String

# @!method initialize(template_id:, notification_id:, request_options: {})
# @!attribute idempotency_key
#
# @return [String, nil]
optional :idempotency_key, String

# @!attribute x_idempotency_expiration
#
# @return [String, nil]
optional :x_idempotency_expiration, String

# @!method initialize(template_id:, notification_id:, idempotency_key: nil, x_idempotency_expiration: nil, request_options: {})
# @param template_id [String]
# @param notification_id [String]
# @param idempotency_key [String]
# @param x_idempotency_expiration [String]
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
end
end
Expand Down
14 changes: 13 additions & 1 deletion lib/courier/models/lists/subscription_add_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,21 @@ class SubscriptionAddParams < Courier::Internal::Type::BaseModel
# @return [Array<Courier::Models::PutSubscriptionsRecipient>]
required :recipients, -> { Courier::Internal::Type::ArrayOf[Courier::PutSubscriptionsRecipient] }

# @!method initialize(list_id:, recipients:, request_options: {})
# @!attribute idempotency_key
#
# @return [String, nil]
optional :idempotency_key, String

# @!attribute x_idempotency_expiration
#
# @return [String, nil]
optional :x_idempotency_expiration, String

# @!method initialize(list_id:, recipients:, idempotency_key: nil, x_idempotency_expiration: nil, request_options: {})
# @param list_id [String]
# @param recipients [Array<Courier::Models::PutSubscriptionsRecipient>]
# @param idempotency_key [String]
# @param x_idempotency_expiration [String]
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
end
end
Expand Down
14 changes: 13 additions & 1 deletion lib/courier/models/notification_create_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,19 @@ class NotificationCreateParams < Courier::Models::NotificationTemplateCreateRequ
extend Courier::Internal::Type::RequestParameters::Converter
include Courier::Internal::Type::RequestParameters

# @!method initialize(request_options: {})
# @!attribute idempotency_key
#
# @return [String, nil]
optional :idempotency_key, String

# @!attribute x_idempotency_expiration
#
# @return [String, nil]
optional :x_idempotency_expiration, String

# @!method initialize(idempotency_key: nil, x_idempotency_expiration: nil, request_options: {})
# @param idempotency_key [String]
# @param x_idempotency_expiration [String]
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
end
end
Expand Down
Loading