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.7.1"
".": "4.8.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 81
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-3fc1c86b4a83a16393aaf17d1fb3ac6098d30dd057ba872973b57285a7a3f0d0.yml
openapi_spec_hash: 02a545d217b13399f311e99561f9de1d
config_hash: 0789c3cddc625bb9712b3bded274ab6c
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-b3852cdd1020811766572923d26a6c95f4a538bf4c7268462b6ba39f34480b3e.yml
openapi_spec_hash: b2e2f2357342e9a6b16a591d0b946e38
config_hash: 6f072c60adb74a68d27be5a0e5ea3124
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Changelog

## 4.8.0 (2026-02-20)

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

### Features

* **api:** remove brand field from ElementalContent model ([519fcc0](https://github.com/trycourier/courier-ruby/commit/519fcc0a2f35a1fd61e64362b5a2e7b2d8225232))


### Chores

* **internal:** remove mock server code ([a81351a](https://github.com/trycourier/courier-ruby/commit/a81351a2fde27b8a785a79436394a991e9048d97))
* update mock server docs ([62d69fc](https://github.com/trycourier/courier-ruby/commit/62d69fc657babf8ff535e150d74a2283ddb64459))


### Documentation

* add AUTO-GENERATED-OVERVIEW markers for README sync ([#75](https://github.com/trycourier/courier-ruby/issues/75)) ([ab86102](https://github.com/trycourier/courier-ruby/commit/ab86102437d2af03dc45beae7262371c70b6847f))
* sync README from mintlify-docs (2026-02-20 18:11 UTC) ([#76](https://github.com/trycourier/courier-ruby/issues/76)) ([cc67458](https://github.com/trycourier/courier-ruby/commit/cc6745816e152b890b84caaf666178bdbd9d3192))

## 4.7.1 (2026-02-07)

Full Changelog: [v4.7.0...v4.7.1](https://github.com/trycourier/courier-ruby/compare/v4.7.0...v4.7.1)
Expand Down
6 changes: 0 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,6 @@ $ bundle exec rake

## Running tests

Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.

```bash
$ npx prism mock path/to/your/openapi.yml
```

```bash
$ bundle exec rake test
```
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.7.1)
trycourier (4.8.0)
cgi
connection_pool

Expand Down
9 changes: 1 addition & 8 deletions lib/courier/models/elemental_content.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,10 @@ class ElementalContent < Courier::Internal::Type::BaseModel
# @return [String]
required :version, String

# @!attribute brand
#
# @return [String, nil]
optional :brand, String, nil?: true

# @!method initialize(elements:, version:, brand: nil)
# @!method initialize(elements:, version:)
# @param elements [Array<Courier::Models::ElementalTextNodeWithType, Courier::Models::ElementalMetaNodeWithType, Courier::Models::ElementalChannelNodeWithType, Courier::Models::ElementalImageNodeWithType, Courier::Models::ElementalActionNodeWithType, Courier::Models::ElementalDividerNodeWithType, Courier::Models::ElementalQuoteNodeWithType>]
#
# @param version [String] For example, "2022-01-01"
#
# @param brand [String, nil]
end
end
end
2 changes: 1 addition & 1 deletion lib/courier/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Courier
VERSION = "4.7.1"
VERSION = "4.8.0"
end
12 changes: 3 additions & 9 deletions rbi/courier/models/elemental_content.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ module Courier
sig { returns(String) }
attr_accessor :version

sig { returns(T.nilable(String)) }
attr_accessor :brand

sig do
params(
elements:
Expand All @@ -46,15 +43,13 @@ module Courier
Courier::ElementalQuoteNodeWithType::OrHash
)
],
version: String,
brand: T.nilable(String)
version: String
).returns(T.attached_class)
end
def self.new(
elements:,
# For example, "2022-01-01"
version:,
brand: nil
version:
)
end

Expand All @@ -73,8 +68,7 @@ module Courier
Courier::ElementalQuoteNodeWithType
)
],
version: String,
brand: T.nilable(String)
version: String
}
)
end
Expand Down
41 changes: 0 additions & 41 deletions scripts/mock

This file was deleted.

46 changes: 0 additions & 46 deletions scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -4,53 +4,7 @@ set -e

cd -- "$(dirname -- "$0")/.."

RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
NC='\033[0m' # No Color

function prism_is_running() {
curl --silent "http://localhost:4010" >/dev/null 2>&1
}

kill_server_on_port() {
pids=$(lsof -t -i tcp:"$1" || echo "")
if [ "$pids" != "" ]; then
kill "$pids"
echo "Stopped $pids."
fi
}

function is_overriding_api_base_url() {
[ -n "$TEST_API_BASE_URL" ]
}

if ! is_overriding_api_base_url && ! prism_is_running ; then
# When we exit this script, make sure to kill the background mock server process
trap 'kill_server_on_port 4010' EXIT

# Start the dev server
./scripts/mock --daemon
fi

if is_overriding_api_base_url ; then
echo -e "${GREEN}✔ Running tests against ${TEST_API_BASE_URL}${NC}"
echo
elif ! prism_is_running ; then
echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Prism server"
echo -e "running against your OpenAPI spec."
echo
echo -e "To run the server, pass in the path or url of your OpenAPI"
echo -e "spec to the prism command:"
echo
echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}"
echo

exit 1
else
echo -e "${GREEN}✔ Mock prism server is running with your OpenAPI spec${NC}"
echo
fi

echo "==> Running tests"
bundle exec rake test "$@"
14 changes: 3 additions & 11 deletions sig/courier/models/elemental_content.rbs
Original file line number Diff line number Diff line change
@@ -1,29 +1,21 @@
module Courier
module Models
type elemental_content =
{
elements: ::Array[Courier::Models::elemental_node],
version: String,
brand: String?
}
{ elements: ::Array[Courier::Models::elemental_node], version: String }

class ElementalContent < Courier::Internal::Type::BaseModel
attr_accessor elements: ::Array[Courier::Models::elemental_node]

attr_accessor version: String

attr_accessor brand: String?

def initialize: (
elements: ::Array[Courier::Models::elemental_node],
version: String,
?brand: String?
version: String
) -> void

def to_hash: -> {
elements: ::Array[Courier::Models::elemental_node],
version: String,
brand: String?
version: String
}
end
end
Expand Down
10 changes: 5 additions & 5 deletions test/courier/resources/audiences_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class Courier::Test::Resources::AudiencesTest < Courier::Test::ResourceTest
def test_retrieve
skip("Prism tests are disabled")
skip("Mock server tests are disabled")

response = @courier.audiences.retrieve("audience_id")

Expand All @@ -26,7 +26,7 @@ def test_retrieve
end

def test_update
skip("Prism tests are disabled")
skip("Mock server tests are disabled")

response = @courier.audiences.update("audience_id")

Expand All @@ -42,7 +42,7 @@ def test_update
end

def test_list
skip("Prism tests are disabled")
skip("Mock server tests are disabled")

response = @courier.audiences.list

Expand All @@ -59,7 +59,7 @@ def test_list
end

def test_delete
skip("Prism tests are disabled")
skip("Mock server tests are disabled")

response = @courier.audiences.delete("audience_id")

Expand All @@ -69,7 +69,7 @@ def test_delete
end

def test_list_members
skip("Prism tests are disabled")
skip("Mock server tests are disabled")

response = @courier.audiences.list_members("audience_id")

Expand Down
4 changes: 2 additions & 2 deletions test/courier/resources/audit_events_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class Courier::Test::Resources::AuditEventsTest < Courier::Test::ResourceTest
def test_retrieve
skip("Prism tests are disabled")
skip("Mock server tests are disabled")

response = @courier.audit_events.retrieve("audit-event-id")

Expand All @@ -25,7 +25,7 @@ def test_retrieve
end

def test_list
skip("Prism tests are disabled")
skip("Mock server tests are disabled")

response = @courier.audit_events.list

Expand Down
2 changes: 1 addition & 1 deletion test/courier/resources/auth_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class Courier::Test::Resources::AuthTest < Courier::Test::ResourceTest
def test_issue_token_required_params
skip("Prism tests are disabled")
skip("Mock server tests are disabled")

response =
@courier.auth.issue_token(
Expand Down
4 changes: 2 additions & 2 deletions test/courier/resources/automations/invoke_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class Courier::Test::Resources::Automations::InvokeTest < Courier::Test::ResourceTest
def test_invoke_ad_hoc_required_params
skip("Prism tests are disabled")
skip("Mock server tests are disabled")

response =
@courier.automations.invoke.invoke_ad_hoc(automation: {steps: [{action: :delay}, {action: :send}]})
Expand All @@ -21,7 +21,7 @@ def test_invoke_ad_hoc_required_params
end

def test_invoke_by_template_required_params
skip("Prism tests are disabled")
skip("Mock server tests are disabled")

response = @courier.automations.invoke.invoke_by_template("templateId", recipient: "recipient")

Expand Down
2 changes: 1 addition & 1 deletion test/courier/resources/automations_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class Courier::Test::Resources::AutomationsTest < Courier::Test::ResourceTest
def test_list
skip("Prism tests are disabled")
skip("Mock server tests are disabled")

response = @courier.automations.list

Expand Down
10 changes: 5 additions & 5 deletions test/courier/resources/brands_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class Courier::Test::Resources::BrandsTest < Courier::Test::ResourceTest
def test_create_required_params
skip("Prism tests are disabled")
skip("Mock server tests are disabled")

response = @courier.brands.create(name: "name")

Expand All @@ -27,7 +27,7 @@ def test_create_required_params
end

def test_retrieve
skip("Prism tests are disabled")
skip("Mock server tests are disabled")

response = @courier.brands.retrieve("brand_id")

Expand All @@ -50,7 +50,7 @@ def test_retrieve
end

def test_update_required_params
skip("Prism tests are disabled")
skip("Mock server tests are disabled")

response = @courier.brands.update("brand_id", name: "name")

Expand All @@ -73,7 +73,7 @@ def test_update_required_params
end

def test_list
skip("Prism tests are disabled")
skip("Mock server tests are disabled")

response = @courier.brands.list

Expand All @@ -90,7 +90,7 @@ def test_list
end

def test_delete
skip("Prism tests are disabled")
skip("Mock server tests are disabled")

response = @courier.brands.delete("brand_id")

Expand Down
Loading