trycourier 6.4.0 → 6.4.1

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.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/README.md +1 -1
  4. data/lib/courier/models/elemental_action_node.rb +123 -0
  5. data/lib/courier/models/elemental_action_node_with_type.rb +3 -1
  6. data/lib/courier/models/elemental_channel_node.rb +1 -1
  7. data/lib/courier/models/elemental_divider_node.rb +18 -0
  8. data/lib/courier/models/elemental_divider_node_with_type.rb +3 -1
  9. data/lib/courier/models/elemental_html_node.rb +33 -0
  10. data/lib/courier/models/elemental_html_node_with_type.rb +5 -1
  11. data/lib/courier/models/elemental_image_node.rb +74 -0
  12. data/lib/courier/models/elemental_image_node_with_type.rb +3 -1
  13. data/lib/courier/models/elemental_meta_node.rb +23 -0
  14. data/lib/courier/models/elemental_meta_node_with_type.rb +5 -1
  15. data/lib/courier/models/elemental_node.rb +9 -18
  16. data/lib/courier/models/elemental_quote_node.rb +72 -0
  17. data/lib/courier/models/elemental_quote_node_with_type.rb +3 -1
  18. data/lib/courier/models/elemental_text_node.rb +134 -0
  19. data/lib/courier/models/elemental_text_node_with_type.rb +3 -1
  20. data/lib/courier/models/locales.rb +18 -0
  21. data/lib/courier/models.rb +19 -0
  22. data/lib/courier/version.rb +1 -1
  23. data/lib/courier.rb +8 -0
  24. data/rbi/courier/models/elemental_action_node.rbi +153 -0
  25. data/rbi/courier/models/elemental_action_node_with_type.rbi +2 -1
  26. data/rbi/courier/models/elemental_divider_node.rbi +28 -0
  27. data/rbi/courier/models/elemental_divider_node_with_type.rbi +2 -1
  28. data/rbi/courier/models/elemental_html_node.rbi +52 -0
  29. data/rbi/courier/models/elemental_html_node_with_type.rbi +4 -1
  30. data/rbi/courier/models/elemental_image_node.rbi +94 -0
  31. data/rbi/courier/models/elemental_image_node_with_type.rbi +2 -1
  32. data/rbi/courier/models/elemental_meta_node.rbi +30 -0
  33. data/rbi/courier/models/elemental_meta_node_with_type.rbi +4 -1
  34. data/rbi/courier/models/elemental_node.rbi +1 -10
  35. data/rbi/courier/models/elemental_quote_node.rbi +95 -0
  36. data/rbi/courier/models/elemental_quote_node_with_type.rbi +2 -1
  37. data/rbi/courier/models/elemental_text_node.rbi +177 -0
  38. data/rbi/courier/models/elemental_text_node_with_type.rbi +2 -1
  39. data/rbi/courier/models/locales.rbi +27 -0
  40. data/rbi/courier/models.rbi +18 -0
  41. data/sig/courier/models/elemental_action_node.rbs +112 -0
  42. data/sig/courier/models/elemental_action_node_with_type.rbs +1 -1
  43. data/sig/courier/models/elemental_divider_node.rbs +15 -0
  44. data/sig/courier/models/elemental_divider_node_with_type.rbs +1 -1
  45. data/sig/courier/models/elemental_html_node.rbs +23 -0
  46. data/sig/courier/models/elemental_html_node_with_type.rbs +1 -1
  47. data/sig/courier/models/elemental_image_node.rbs +71 -0
  48. data/sig/courier/models/elemental_image_node_with_type.rbs +1 -1
  49. data/sig/courier/models/elemental_meta_node.rbs +15 -0
  50. data/sig/courier/models/elemental_meta_node_with_type.rbs +1 -1
  51. data/sig/courier/models/elemental_quote_node.rbs +66 -0
  52. data/sig/courier/models/elemental_quote_node_with_type.rbs +1 -1
  53. data/sig/courier/models/elemental_text_node.rbs +127 -0
  54. data/sig/courier/models/elemental_text_node_with_type.rbs +1 -1
  55. data/sig/courier/models/locales.rbs +17 -0
  56. data/sig/courier/models.rbs +18 -0
  57. metadata +25 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 77a40579016778bf7fd2be413c80a59a514bda2c1a2a6de1f6c1649cd6f28ce4
4
- data.tar.gz: 071bdbb767a79675af2f55eaaeec7ad23ef5bac415f5d9f9eac2311407ae2a2a
3
+ metadata.gz: cd58fda1e5a6ef5d937ebea115df994b31e5d97d031123179b496387d827e2ee
4
+ data.tar.gz: bd5c6708f7bb7495aebb3bcb832a3f41181941cc20cb413bb0deb17251c80a3e
5
5
  SHA512:
6
- metadata.gz: 0c5d00663ef98a7494db3b618a08b2f9a103355077cfa7e77def4b9f63686c46bbdbb487d7e9184507bb7b5a95bfb739c38864884736aeca01a56a3fd18069db
7
- data.tar.gz: 2c2acf11904f5f0234aefbb0f5867ebef9e39787fe16aa5238495e1e221adf39087e62a1d6cd5db185c5810d701feeb7c64434e735830af86657915b02b2a448
6
+ metadata.gz: f1d5b201bc4086dea717349b8214b77d1d13545b22dcf1c685d6d251ea1fe6a944a4690d61fb7f138ec87c2c699e75dacfd7d54f6d741426b920f0a729ebee36
7
+ data.tar.gz: ec111124754121db2f8224c142c5c984d8f3dde935e0493e4c15804e32050be3e104d0ae8f95c7432dbc550884e69e6ec92312bf81a0b8ba9b091c038ff1845e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [6.4.1](https://github.com/trycourier/courier-ruby/compare/v6.4.0...v6.4.1) (2026-08-28)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **api:** give Elemental nodes their properties in every SDK ([#140](https://github.com/trycourier/courier-ruby/issues/140)) ([482b8e7](https://github.com/trycourier/courier-ruby/commit/482b8e7c3d9e2cb35f434db538504d4337d79095))
9
+
3
10
  ## [6.4.0](https://github.com/trycourier/courier-ruby/compare/v6.3.0...v6.4.0) (2026-08-28)
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.0"
12
+ gem "trycourier", "~> 6.4.1"
13
13
  ```
14
14
 
15
15
  <!-- x-release-please-end -->
@@ -0,0 +1,123 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ class ElementalActionNode < Courier::Models::ElementalBaseNode
6
+ # @!attribute content
7
+ # The text content of the action shown to the user.
8
+ #
9
+ # @return [String]
10
+ required :content, String
11
+
12
+ # @!attribute href
13
+ # The target URL of the action.
14
+ #
15
+ # @return [String]
16
+ required :href, String
17
+
18
+ # @!attribute action_id
19
+ # A unique id used to identify the action when it is executed.
20
+ #
21
+ # @return [String, nil]
22
+ optional :action_id, String, nil?: true
23
+
24
+ # @!attribute align
25
+ # The alignment of the action button. Defaults to "center".
26
+ #
27
+ # @return [Symbol, Courier::Models::Alignment, nil]
28
+ optional :align, enum: -> { Courier::Alignment }, nil?: true
29
+
30
+ # @!attribute background_color
31
+ # The background color of the action button.
32
+ #
33
+ # @return [String, nil]
34
+ optional :background_color, String, nil?: true
35
+
36
+ # @!attribute border_radius
37
+ # CSS border-radius applied to the action button. For example, `4px`
38
+ #
39
+ # @return [String, nil]
40
+ optional :border_radius, String, nil?: true
41
+
42
+ # @!attribute border_size
43
+ # CSS border width applied to the action button. For example, `1px`
44
+ #
45
+ # @return [String, nil]
46
+ optional :border_size, String, nil?: true
47
+
48
+ # @!attribute disable_tracking
49
+ # When true, the action's href is not rewritten for click-through tracking, even
50
+ # when click-through tracking is enabled for the workspace.
51
+ #
52
+ # @return [Boolean, nil]
53
+ optional :disable_tracking, Courier::Internal::Type::Boolean, nil?: true
54
+
55
+ # @!attribute font_size
56
+ # CSS font-size applied to the action button label. For example, `14px`
57
+ #
58
+ # @return [String, nil]
59
+ optional :font_size, String, nil?: true
60
+
61
+ # @!attribute locales
62
+ # Region specific content. See
63
+ # [locales docs](https://www.courier.com/docs/platform/content/elemental/locales/)
64
+ # for more details.
65
+ #
66
+ # @return [Hash{Symbol=>Courier::Models::LocaleItem}, nil]
67
+ optional :locales, -> { Courier::Internal::Type::HashOf[Courier::LocaleItem] }, nil?: true
68
+
69
+ # @!attribute padding
70
+ # CSS padding applied to the action button. For example, `8px 16px`
71
+ #
72
+ # @return [String, nil]
73
+ optional :padding, String, nil?: true
74
+
75
+ # @!attribute style
76
+ # Defaults to `button`.
77
+ #
78
+ # @return [Symbol, Courier::Models::ElementalActionNode::Style, nil]
79
+ optional :style, enum: -> { Courier::ElementalActionNode::Style }, nil?: true
80
+
81
+ # @!method initialize(content:, href:, action_id: nil, align: nil, background_color: nil, border_radius: nil, border_size: nil, disable_tracking: nil, font_size: nil, locales: nil, padding: nil, style: nil)
82
+ # Some parameter documentations has been truncated, see
83
+ # {Courier::Models::ElementalActionNode} for more details.
84
+ #
85
+ # Allows the user to execute an action. Can be a button or a link.
86
+ #
87
+ # @param content [String] The text content of the action shown to the user.
88
+ #
89
+ # @param href [String] The target URL of the action.
90
+ #
91
+ # @param action_id [String, nil] A unique id used to identify the action when it is executed.
92
+ #
93
+ # @param align [Symbol, Courier::Models::Alignment, nil] The alignment of the action button. Defaults to "center".
94
+ #
95
+ # @param background_color [String, nil] The background color of the action button.
96
+ #
97
+ # @param border_radius [String, nil] CSS border-radius applied to the action button. For example, `4px`
98
+ #
99
+ # @param border_size [String, nil] CSS border width applied to the action button. For example, `1px`
100
+ #
101
+ # @param disable_tracking [Boolean, nil] When true, the action's href is not rewritten for click-through tracking, even w
102
+ #
103
+ # @param font_size [String, nil] CSS font-size applied to the action button label. For example, `14px`
104
+ #
105
+ # @param locales [Hash{Symbol=>Courier::Models::LocaleItem}, nil] Region specific content. See [locales docs](https://www.courier.com/docs/platfor
106
+ #
107
+ # @param padding [String, nil] CSS padding applied to the action button. For example, `8px 16px`
108
+ #
109
+ # @param style [Symbol, Courier::Models::ElementalActionNode::Style, nil] Defaults to `button`.
110
+
111
+ # Defaults to `button`.
112
+ module Style
113
+ extend Courier::Internal::Type::Enum
114
+
115
+ BUTTON = :button
116
+ LINK = :link
117
+
118
+ # @!method self.values
119
+ # @return [Array<Symbol>]
120
+ end
121
+ end
122
+ end
123
+ end
@@ -2,13 +2,15 @@
2
2
 
3
3
  module Courier
4
4
  module Models
5
- class ElementalActionNodeWithType < Courier::Models::ElementalBaseNode
5
+ class ElementalActionNodeWithType < Courier::Models::ElementalActionNode
6
6
  # @!attribute type
7
7
  #
8
8
  # @return [Symbol, Courier::Models::ElementalActionNodeWithType::Type, nil]
9
9
  optional :type, enum: -> { Courier::ElementalActionNodeWithType::Type }
10
10
 
11
11
  # @!method initialize(type: nil)
12
+ # Allows the user to execute an action. Can be a button or a link.
13
+ #
12
14
  # @param type [Symbol, Courier::Models::ElementalActionNodeWithType::Type]
13
15
 
14
16
  module Type
@@ -54,7 +54,7 @@ module Courier
54
54
  # [control flow docs](https://www.courier.com/docs/platform/content/elemental/control-flow/)
55
55
  # for more details.
56
56
  #
57
- # @param channel [String] The channel the contents of this element should be applied to. Can be `email`,
57
+ # @param channel [String] The channel the contents of this element should be applied to. Can be `email`, `
58
58
  #
59
59
  # @param font_size [String, nil] Email only. Document-level base font size (CSS px, e.g. `16px`) for body content
60
60
  #
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ class ElementalDividerNode < Courier::Models::ElementalBaseNode
6
+ # @!attribute color
7
+ # The CSS color to render the line with. For example, `#fff`
8
+ #
9
+ # @return [String, nil]
10
+ optional :color, String, nil?: true
11
+
12
+ # @!method initialize(color: nil)
13
+ # Renders a dividing line between elements.
14
+ #
15
+ # @param color [String, nil] The CSS color to render the line with. For example, `#fff`
16
+ end
17
+ end
18
+ end
@@ -2,13 +2,15 @@
2
2
 
3
3
  module Courier
4
4
  module Models
5
- class ElementalDividerNodeWithType < Courier::Models::ElementalBaseNode
5
+ class ElementalDividerNodeWithType < Courier::Models::ElementalDividerNode
6
6
  # @!attribute type
7
7
  #
8
8
  # @return [Symbol, Courier::Models::ElementalDividerNodeWithType::Type, nil]
9
9
  optional :type, enum: -> { Courier::ElementalDividerNodeWithType::Type }
10
10
 
11
11
  # @!method initialize(type: nil)
12
+ # Renders a dividing line between elements.
13
+ #
12
14
  # @param type [Symbol, Courier::Models::ElementalDividerNodeWithType::Type]
13
15
 
14
16
  module Type
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ class ElementalHTMLNode < Courier::Models::ElementalBaseNode
6
+ # @!attribute content
7
+ # Raw HTML string to render inside the notification.
8
+ #
9
+ # @return [String]
10
+ required :content, String
11
+
12
+ # @!attribute locales
13
+ # Region specific content. See
14
+ # [locales docs](https://www.courier.com/docs/platform/content/elemental/locales/)
15
+ # for more details.
16
+ #
17
+ # @return [Hash{Symbol=>Courier::Models::LocaleItem}, nil]
18
+ optional :locales, -> { Courier::Internal::Type::HashOf[Courier::LocaleItem] }, nil?: true
19
+
20
+ # @!method initialize(content:, locales: nil)
21
+ # Some parameter documentations has been truncated, see
22
+ # {Courier::Models::ElementalHTMLNode} for more details.
23
+ #
24
+ # Raw HTML string inside an Elemental document. When rendering a message, this
25
+ # node is turned into output only for the email channel; for other channels it
26
+ # produces no blocks.
27
+ #
28
+ # @param content [String] Raw HTML string to render inside the notification.
29
+ #
30
+ # @param locales [Hash{Symbol=>Courier::Models::LocaleItem}, nil] Region specific content. See [locales docs](https://www.courier.com/docs/platfor
31
+ end
32
+ end
33
+ end
@@ -2,13 +2,17 @@
2
2
 
3
3
  module Courier
4
4
  module Models
5
- class ElementalHTMLNodeWithType < Courier::Models::ElementalBaseNode
5
+ class ElementalHTMLNodeWithType < Courier::Models::ElementalHTMLNode
6
6
  # @!attribute type
7
7
  #
8
8
  # @return [Symbol, Courier::Models::ElementalHTMLNodeWithType::Type, nil]
9
9
  optional :type, enum: -> { Courier::ElementalHTMLNodeWithType::Type }
10
10
 
11
11
  # @!method initialize(type: nil)
12
+ # Raw HTML string inside an Elemental document. When rendering a message, this
13
+ # node is turned into output only for the email channel; for other channels it
14
+ # produces no blocks.
15
+ #
12
16
  # @param type [Symbol, Courier::Models::ElementalHTMLNodeWithType::Type]
13
17
 
14
18
  module Type
@@ -0,0 +1,74 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ class ElementalImageNode < Courier::Models::ElementalBaseNode
6
+ # @!attribute src
7
+ # The source of the image.
8
+ #
9
+ # @return [String]
10
+ required :src, String
11
+
12
+ # @!attribute align
13
+ # The alignment of the image.
14
+ #
15
+ # @return [Symbol, Courier::Models::Alignment, nil]
16
+ optional :align, enum: -> { Courier::Alignment }, nil?: true
17
+
18
+ # @!attribute alt_text
19
+ # Alternate text for the image.
20
+ #
21
+ # @return [String, nil]
22
+ optional :alt_text, String, api_name: :altText, nil?: true
23
+
24
+ # @!attribute border_color
25
+ # CSS border color applied to the image. For example, `#ccc`
26
+ #
27
+ # @return [String, nil]
28
+ optional :border_color, String, nil?: true
29
+
30
+ # @!attribute border_size
31
+ # CSS border width applied to the image. For example, `1px`
32
+ #
33
+ # @return [String, nil]
34
+ optional :border_size, String, nil?: true
35
+
36
+ # @!attribute href
37
+ # A URL to link to when the image is clicked.
38
+ #
39
+ # @return [String, nil]
40
+ optional :href, String, nil?: true
41
+
42
+ # @!attribute padding
43
+ # CSS padding applied around the image. For example, `10px`
44
+ #
45
+ # @return [String, nil]
46
+ optional :padding, String, nil?: true
47
+
48
+ # @!attribute width
49
+ # CSS width properties to apply to the image. For example, 50px
50
+ #
51
+ # @return [String, nil]
52
+ optional :width, String, nil?: true
53
+
54
+ # @!method initialize(src:, align: nil, alt_text: nil, border_color: nil, border_size: nil, href: nil, padding: nil, width: nil)
55
+ # Used to embed an image into the notification.
56
+ #
57
+ # @param src [String] The source of the image.
58
+ #
59
+ # @param align [Symbol, Courier::Models::Alignment, nil] The alignment of the image.
60
+ #
61
+ # @param alt_text [String, nil] Alternate text for the image.
62
+ #
63
+ # @param border_color [String, nil] CSS border color applied to the image. For example, `#ccc`
64
+ #
65
+ # @param border_size [String, nil] CSS border width applied to the image. For example, `1px`
66
+ #
67
+ # @param href [String, nil] A URL to link to when the image is clicked.
68
+ #
69
+ # @param padding [String, nil] CSS padding applied around the image. For example, `10px`
70
+ #
71
+ # @param width [String, nil] CSS width properties to apply to the image. For example, 50px
72
+ end
73
+ end
74
+ end
@@ -2,13 +2,15 @@
2
2
 
3
3
  module Courier
4
4
  module Models
5
- class ElementalImageNodeWithType < Courier::Models::ElementalBaseNode
5
+ class ElementalImageNodeWithType < Courier::Models::ElementalImageNode
6
6
  # @!attribute type
7
7
  #
8
8
  # @return [Symbol, Courier::Models::ElementalImageNodeWithType::Type, nil]
9
9
  optional :type, enum: -> { Courier::ElementalImageNodeWithType::Type }
10
10
 
11
11
  # @!method initialize(type: nil)
12
+ # Used to embed an image into the notification.
13
+ #
12
14
  # @param type [Symbol, Courier::Models::ElementalImageNodeWithType::Type]
13
15
 
14
16
  module Type
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ class ElementalMetaNode < Courier::Models::ElementalBaseNode
6
+ # @!attribute title
7
+ # The title to be displayed by supported channels. For example, the email subject.
8
+ #
9
+ # @return [String, nil]
10
+ optional :title, String, nil?: true
11
+
12
+ # @!method initialize(title: nil)
13
+ # Some parameter documentations has been truncated, see
14
+ # {Courier::Models::ElementalMetaNode} for more details.
15
+ #
16
+ # The meta element contains information describing the notification that may be
17
+ # used by a particular channel or provider. One important field is the title field
18
+ # which will be used as the title for channels that support it.
19
+ #
20
+ # @param title [String, nil] The title to be displayed by supported channels. For example, the email subject.
21
+ end
22
+ end
23
+ end
@@ -2,13 +2,17 @@
2
2
 
3
3
  module Courier
4
4
  module Models
5
- class ElementalMetaNodeWithType < Courier::Models::ElementalBaseNode
5
+ class ElementalMetaNodeWithType < Courier::Models::ElementalMetaNode
6
6
  # @!attribute type
7
7
  #
8
8
  # @return [Symbol, Courier::Models::ElementalMetaNodeWithType::Type, nil]
9
9
  optional :type, enum: -> { Courier::ElementalMetaNodeWithType::Type }
10
10
 
11
11
  # @!method initialize(type: nil)
12
+ # The meta element contains information describing the notification that may be
13
+ # used by a particular channel or provider. One important field is the title field
14
+ # which will be used as the title for channels that support it.
15
+ #
12
16
  # @param type [Symbol, Courier::Models::ElementalMetaNodeWithType::Type]
13
17
 
14
18
  module Type
@@ -2,41 +2,32 @@
2
2
 
3
3
  module Courier
4
4
  module Models
5
- # The channel element allows a notification to be customized based on which
6
- # channel it is sent through. For example, you may want to display a detailed
7
- # message when the notification is sent through email, and a more concise message
8
- # in a push notification. Channel elements are only valid as top-level elements;
9
- # you cannot nest channel elements. If there is a channel element specified at the
10
- # top-level of the document, all sibling elements must be channel elements. Note:
11
- # As an alternative, most elements support a `channel` property. Which allows you
12
- # to selectively display an individual element on a per channel basis. See the
13
- # [control flow docs](https://www.courier.com/docs/platform/content/elemental/control-flow/)
14
- # for more details.
5
+ # Represents a body of text to be rendered inside of the notification.
15
6
  module ElementalNode
16
7
  extend Courier::Internal::Type::Union
17
8
 
9
+ # Represents a body of text to be rendered inside of the notification.
18
10
  variant -> { Courier::ElementalTextNodeWithType }
19
11
 
12
+ # The meta element contains information describing the notification that may be used by a particular channel or provider. One important field is the title field which will be used as the title for channels that support it.
20
13
  variant -> { Courier::ElementalMetaNodeWithType }
21
14
 
22
- # The channel element allows a notification to be customized based on which channel it is sent through.
23
- # For example, you may want to display a detailed message when the notification is sent through email,
24
- # and a more concise message in a push notification. Channel elements are only valid as top-level
25
- # elements; you cannot nest channel elements. If there is a channel element specified at the top-level
26
- # of the document, all sibling elements must be channel elements.
27
- # Note: As an alternative, most elements support a `channel` property. Which allows you to selectively
28
- # display an individual element on a per channel basis. See the
29
- # [control flow docs](https://www.courier.com/docs/platform/content/elemental/control-flow/) for more details.
15
+ # The channel element allows a notification to be customized based on which channel it is sent through. For example, you may want to display a detailed message when the notification is sent through email, and a more concise message in a push notification. Channel elements are only valid as top-level elements; you cannot nest channel elements. If there is a channel element specified at the top-level of the document, all sibling elements must be channel elements. Note: As an alternative, most elements support a `channel` property. Which allows you to selectively display an individual element on a per channel basis. See the [control flow docs](https://www.courier.com/docs/platform/content/elemental/control-flow/) for more details.
30
16
  variant -> { Courier::ElementalChannelNodeWithType }
31
17
 
18
+ # Used to embed an image into the notification.
32
19
  variant -> { Courier::ElementalImageNodeWithType }
33
20
 
21
+ # Allows the user to execute an action. Can be a button or a link.
34
22
  variant -> { Courier::ElementalActionNodeWithType }
35
23
 
24
+ # Renders a dividing line between elements.
36
25
  variant -> { Courier::ElementalDividerNodeWithType }
37
26
 
27
+ # Renders a quote block.
38
28
  variant -> { Courier::ElementalQuoteNodeWithType }
39
29
 
30
+ # Raw HTML string inside an Elemental document. When rendering a message, this node is turned into output only for the email channel; for other channels it produces no blocks.
40
31
  variant -> { Courier::ElementalHTMLNodeWithType }
41
32
 
42
33
  # @!method self.variants
@@ -0,0 +1,72 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Courier
4
+ module Models
5
+ class ElementalQuoteNode < Courier::Models::ElementalBaseNode
6
+ # @!attribute content
7
+ # The text value of the quote.
8
+ #
9
+ # @return [String]
10
+ required :content, String
11
+
12
+ # @!attribute align
13
+ # Alignment of the quote.
14
+ #
15
+ # @return [Symbol, Courier::Models::Alignment, nil]
16
+ optional :align, enum: -> { Courier::Alignment }, nil?: true
17
+
18
+ # @!attribute border_color
19
+ # CSS border color property. For example, `#fff`
20
+ #
21
+ # @return [String, nil]
22
+ optional :border_color, String, api_name: :borderColor, nil?: true
23
+
24
+ # @!attribute font_size
25
+ # CSS px font size for this quote block, e.g. `16px`. Overrides the size of the
26
+ # `text_style` preset. Email only.
27
+ #
28
+ # @return [String, nil]
29
+ optional :font_size, String, nil?: true
30
+
31
+ # @!attribute line_height
32
+ # CSS line height for this quote block, as a px value or a unitless multiplier,
33
+ # e.g. `24px` or `1.5`. Email only.
34
+ #
35
+ # @return [String, nil]
36
+ optional :line_height, String, nil?: true
37
+
38
+ # @!attribute locales
39
+ # Region specific content. See
40
+ # [locales docs](https://www.courier.com/docs/platform/content/elemental/locales/)
41
+ # for more details.
42
+ #
43
+ # @return [Hash{Symbol=>Courier::Models::LocaleItem}, nil]
44
+ optional :locales, -> { Courier::Internal::Type::HashOf[Courier::LocaleItem] }, nil?: true
45
+
46
+ # @!attribute text_style
47
+ #
48
+ # @return [Symbol, Courier::Models::TextStyle, nil]
49
+ optional :text_style, enum: -> { Courier::TextStyle }
50
+
51
+ # @!method initialize(content:, align: nil, border_color: nil, font_size: nil, line_height: nil, locales: nil, text_style: nil)
52
+ # Some parameter documentations has been truncated, see
53
+ # {Courier::Models::ElementalQuoteNode} for more details.
54
+ #
55
+ # Renders a quote block.
56
+ #
57
+ # @param content [String] The text value of the quote.
58
+ #
59
+ # @param align [Symbol, Courier::Models::Alignment, nil] Alignment of the quote.
60
+ #
61
+ # @param border_color [String, nil] CSS border color property. For example, `#fff`
62
+ #
63
+ # @param font_size [String, nil] CSS px font size for this quote block, e.g. `16px`. Overrides the size of the `t
64
+ #
65
+ # @param line_height [String, nil] CSS line height for this quote block, as a px value or a unitless multiplier, e.
66
+ #
67
+ # @param locales [Hash{Symbol=>Courier::Models::LocaleItem}, nil] Region specific content. See [locales docs](https://www.courier.com/docs/platfor
68
+ #
69
+ # @param text_style [Symbol, Courier::Models::TextStyle]
70
+ end
71
+ end
72
+ end
@@ -2,13 +2,15 @@
2
2
 
3
3
  module Courier
4
4
  module Models
5
- class ElementalQuoteNodeWithType < Courier::Models::ElementalBaseNode
5
+ class ElementalQuoteNodeWithType < Courier::Models::ElementalQuoteNode
6
6
  # @!attribute type
7
7
  #
8
8
  # @return [Symbol, Courier::Models::ElementalQuoteNodeWithType::Type, nil]
9
9
  optional :type, enum: -> { Courier::ElementalQuoteNodeWithType::Type }
10
10
 
11
11
  # @!method initialize(type: nil)
12
+ # Renders a quote block.
13
+ #
12
14
  # @param type [Symbol, Courier::Models::ElementalQuoteNodeWithType::Type]
13
15
 
14
16
  module Type