trycourier 6.4.2 → 6.4.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 42e6edbf769897b8107ee40b65c54eaa5dcc2b4b2d18ccb10cd0c6c475bd4b0e
4
- data.tar.gz: 64a3a7e3cdef20a9c366e2b89b9e28e8a07b4c06f615da4f060809c525cb0203
3
+ metadata.gz: c8b8d37f136533933d8866b7f9c65690f4a7f97c858fcfe8a59b22f9207258e3
4
+ data.tar.gz: 5109857a74cebd79366d2cfe314cacebef0c42e6501cfc225e294a7c03e3b9bf
5
5
  SHA512:
6
- metadata.gz: fc10b715fb07be37abf6e7a6982dc77c5c2266d19b285bff85bdf7a3204ff71045adbd71c82578482e37193951493e850853faa7b8988ce3535f8f47a4b56520
7
- data.tar.gz: 65be4eb15c4e05d1ce37692f7e75ad3029e47fadaa8a026747f6e931d11a9db1efdb4c68fd8af2d57a5c007ed8f06d71ef9faaf359e012d303046c8980e2e22b
6
+ metadata.gz: 999317f439a918452c23d3e626c1412afc02f921e26d5323d8c56d46d17bff8705edf5ef69c98c47eeb0247dad214e6d74e8c62241c63295da98517e58b5b1fc
7
+ data.tar.gz: 28ed1d47648060561af1be5579193eb16d52c40a8d460919f046d9617e5d45ae2b34dadc16418822e8f327e442c456e1ea5cd81b3deba123ce95dcdc12346187
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [6.4.3](https://github.com/trycourier/courier-ruby/compare/v6.4.2...v6.4.3) (2026-08-29)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **api:** text content is not required ([#144](https://github.com/trycourier/courier-ruby/issues/144)) ([3fba7f9](https://github.com/trycourier/courier-ruby/commit/3fba7f95609b98f0dfa4bae6b5e384d1a30f4292))
9
+
3
10
  ## [6.4.2](https://github.com/trycourier/courier-ruby/compare/v6.4.1...v6.4.2) (2026-08-29)
4
11
 
5
12
 
data/README.md CHANGED
@@ -9,7 +9,7 @@ Add the gem to your `Gemfile`:
9
9
  <!-- x-release-please-start-version -->
10
10
 
11
11
  ```ruby
12
- gem "trycourier", "~> 6.4.2"
12
+ gem "trycourier", "~> 6.4.3"
13
13
  ```
14
14
 
15
15
  <!-- x-release-please-end -->
@@ -3,13 +3,6 @@
3
3
  module Courier
4
4
  module Models
5
5
  class ElementalTextNode < Courier::Models::ElementalBaseNode
6
- # @!attribute content
7
- # The text content displayed in the notification. Either this field must be
8
- # specified, or the elements field
9
- #
10
- # @return [String]
11
- required :content, String
12
-
13
6
  # @!attribute align
14
7
  # Text alignment.
15
8
  #
@@ -28,6 +21,13 @@ module Courier
28
21
  # @return [String, nil]
29
22
  optional :color, String, nil?: true
30
23
 
24
+ # @!attribute content
25
+ # The text content displayed in the notification. Either this field must be
26
+ # specified, or the elements field
27
+ #
28
+ # @return [String, nil]
29
+ optional :content, String
30
+
31
31
  # @!attribute font_size
32
32
  # CSS px font size for this text block, e.g. `16px`. Overrides the size of the
33
33
  # `text_style` preset. Email only.
@@ -79,20 +79,20 @@ module Courier
79
79
  # @return [String, nil]
80
80
  optional :underline, String, nil?: true
81
81
 
82
- # @!method initialize(content:, align: nil, bold: nil, color: nil, font_size: nil, format_: nil, italic: nil, line_height: nil, locales: nil, strikethrough: nil, text_style: nil, underline: nil)
82
+ # @!method initialize(align: nil, bold: nil, color: nil, content: nil, font_size: nil, format_: nil, italic: nil, line_height: nil, locales: nil, strikethrough: nil, text_style: nil, underline: nil)
83
83
  # Some parameter documentations has been truncated, see
84
84
  # {Courier::Models::ElementalTextNode} for more details.
85
85
  #
86
86
  # Represents a body of text to be rendered inside of the notification.
87
87
  #
88
- # @param content [String] The text content displayed in the notification. Either this
89
- #
90
88
  # @param align [Symbol, Courier::Models::ElementalTextNode::Align] Text alignment.
91
89
  #
92
90
  # @param bold [String, nil] Apply bold to the text
93
91
  #
94
92
  # @param color [String, nil] Specifies the color of text. Can be any valid css color value
95
93
  #
94
+ # @param content [String] The text content displayed in the notification. Either this
95
+ #
96
96
  # @param font_size [String, nil] CSS px font size for this text block, e.g. `16px`. Overrides the size of the `te
97
97
  #
98
98
  # @param format_ [Symbol, Courier::Models::ElementalTextNode::Format, nil]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Courier
4
- VERSION = "6.4.2"
4
+ VERSION = "6.4.3"
5
5
  end
@@ -8,11 +8,6 @@ module Courier
8
8
  T.any(Courier::ElementalTextNode, Courier::Internal::AnyHash)
9
9
  end
10
10
 
11
- # The text content displayed in the notification. Either this field must be
12
- # specified, or the elements field
13
- sig { returns(String) }
14
- attr_accessor :content
15
-
16
11
  # Text alignment.
17
12
  sig { returns(T.nilable(Courier::ElementalTextNode::Align::OrSymbol)) }
18
13
  attr_reader :align
@@ -28,6 +23,14 @@ module Courier
28
23
  sig { returns(T.nilable(String)) }
29
24
  attr_accessor :color
30
25
 
26
+ # The text content displayed in the notification. Either this field must be
27
+ # specified, or the elements field
28
+ sig { returns(T.nilable(String)) }
29
+ attr_reader :content
30
+
31
+ sig { params(content: String).void }
32
+ attr_writer :content
33
+
31
34
  # CSS px font size for this text block, e.g. `16px`. Overrides the size of the
32
35
  # `text_style` preset. Email only.
33
36
  sig { returns(T.nilable(String)) }
@@ -66,10 +69,10 @@ module Courier
66
69
  # Represents a body of text to be rendered inside of the notification.
67
70
  sig do
68
71
  params(
69
- content: String,
70
72
  align: Courier::ElementalTextNode::Align::OrSymbol,
71
73
  bold: T.nilable(String),
72
74
  color: T.nilable(String),
75
+ content: String,
73
76
  font_size: T.nilable(String),
74
77
  format_: T.nilable(Courier::ElementalTextNode::Format::OrSymbol),
75
78
  italic: T.nilable(String),
@@ -81,15 +84,15 @@ module Courier
81
84
  ).returns(T.attached_class)
82
85
  end
83
86
  def self.new(
84
- # The text content displayed in the notification. Either this field must be
85
- # specified, or the elements field
86
- content:,
87
87
  # Text alignment.
88
88
  align: nil,
89
89
  # Apply bold to the text
90
90
  bold: nil,
91
91
  # Specifies the color of text. Can be any valid css color value
92
92
  color: nil,
93
+ # The text content displayed in the notification. Either this field must be
94
+ # specified, or the elements field
95
+ content: nil,
93
96
  # CSS px font size for this text block, e.g. `16px`. Overrides the size of the
94
97
  # `text_style` preset. Email only.
95
98
  font_size: nil,
@@ -115,10 +118,10 @@ module Courier
115
118
  sig do
116
119
  override.returns(
117
120
  {
118
- content: String,
119
121
  align: Courier::ElementalTextNode::Align::OrSymbol,
120
122
  bold: T.nilable(String),
121
123
  color: T.nilable(String),
124
+ content: String,
122
125
  font_size: T.nilable(String),
123
126
  format_: T.nilable(Courier::ElementalTextNode::Format::OrSymbol),
124
127
  italic: T.nilable(String),
@@ -2,10 +2,10 @@ module Courier
2
2
  module Models
3
3
  type elemental_text_node =
4
4
  {
5
- content: String,
6
5
  align: Courier::Models::ElementalTextNode::align,
7
6
  bold: String?,
8
7
  color: String?,
8
+ content: String,
9
9
  font_size: String?,
10
10
  format_: Courier::Models::ElementalTextNode::format_?,
11
11
  italic: String?,
@@ -17,10 +17,6 @@ module Courier
17
17
  }
18
18
 
19
19
  class ElementalTextNode < Courier::Models::ElementalBaseNode
20
- def content: -> String
21
-
22
- def content=: (String _) -> String
23
-
24
20
  def align: -> Courier::Models::ElementalTextNode::align?
25
21
 
26
22
  def align=: (
@@ -35,6 +31,10 @@ module Courier
35
31
 
36
32
  def color=: (String? _) -> String?
37
33
 
34
+ def content: -> String?
35
+
36
+ def content=: (String _) -> String
37
+
38
38
  def font_size: -> String?
39
39
 
40
40
  def font_size=: (String? _) -> String?
@@ -72,10 +72,10 @@ module Courier
72
72
  def underline=: (String? _) -> String?
73
73
 
74
74
  def initialize: (
75
- content: String,
76
75
  ?align: Courier::Models::ElementalTextNode::align,
77
76
  ?bold: String?,
78
77
  ?color: String?,
78
+ ?content: String,
79
79
  ?font_size: String?,
80
80
  ?format_: Courier::Models::ElementalTextNode::format_?,
81
81
  ?italic: String?,
@@ -87,10 +87,10 @@ module Courier
87
87
  ) -> void
88
88
 
89
89
  def to_hash: -> {
90
- content: String,
91
90
  align: Courier::Models::ElementalTextNode::align,
92
91
  bold: String?,
93
92
  color: String?,
93
+ content: String,
94
94
  font_size: String?,
95
95
  format_: Courier::Models::ElementalTextNode::format_?,
96
96
  italic: String?,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trycourier
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.4.2
4
+ version: 6.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Courier