Class: Trycourier::Models::MessageContentResponse::Result

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/trycourier/models/message_content_response.rb

Defined Under Namespace

Classes: Content

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(channel: , channel_id: , content: ) ⇒ Object

Parameters:

  • channel (String) (defaults to: )

    The channel used for rendering the message.

  • channel_id (String) (defaults to: )

    The ID of channel used for rendering the message.

  • content (Trycourier::Models::MessageContentResponse::Result::Content) (defaults to: )

    Content details of the rendered message.



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# File 'lib/trycourier/models/message_content_response.rb', line 17

class Result < Trycourier::Internal::Type::BaseModel
  # @!attribute channel
  #   The channel used for rendering the message.
  #
  #   @return [String]
  required :channel, String

  # @!attribute channel_id
  #   The ID of channel used for rendering the message.
  #
  #   @return [String]
  required :channel_id, String

  # @!attribute content
  #   Content details of the rendered message.
  #
  #   @return [Trycourier::Models::MessageContentResponse::Result::Content]
  required :content, -> { Trycourier::Models::MessageContentResponse::Result::Content }

  # @!method initialize(channel:, channel_id:, content:)
  #   @param channel [String] The channel used for rendering the message.
  #
  #   @param channel_id [String] The ID of channel used for rendering the message.
  #
  #   @param content [Trycourier::Models::MessageContentResponse::Result::Content] Content details of the rendered message.

  # @see Trycourier::Models::MessageContentResponse::Result#content
  class Content < Trycourier::Internal::Type::BaseModel
    # @!attribute blocks
    #   The blocks of the rendered message.
    #
    #   @return [Array<Trycourier::Models::MessageContentResponse::Result::Content::Block>]
    required :blocks,
             -> { Trycourier::Internal::Type::ArrayOf[Trycourier::Models::MessageContentResponse::Result::Content::Block] }

    # @!attribute body
    #   The body of the rendered message.
    #
    #   @return [String]
    required :body, String

    # @!attribute html
    #   The html content of the rendered message.
    #
    #   @return [String]
    required :html, String

    # @!attribute subject
    #   The subject of the rendered message.
    #
    #   @return [String]
    required :subject, String

    # @!attribute text
    #   The text of the rendered message.
    #
    #   @return [String]
    required :text, String

    # @!attribute title
    #   The title of the rendered message.
    #
    #   @return [String]
    required :title, String

    # @!method initialize(blocks:, body:, html:, subject:, text:, title:)
    #   Content details of the rendered message.
    #
    #   @param blocks [Array<Trycourier::Models::MessageContentResponse::Result::Content::Block>] The blocks of the rendered message.
    #
    #   @param body [String] The body of the rendered message.
    #
    #   @param html [String] The html content of the rendered message.
    #
    #   @param subject [String] The subject of the rendered message.
    #
    #   @param text [String] The text of the rendered message.
    #
    #   @param title [String] The title of the rendered message.

    class Block < Trycourier::Internal::Type::BaseModel
      # @!attribute text
      #   The block text of the rendered message block.
      #
      #   @return [String]
      required :text, String

      # @!attribute type
      #   The block type of the rendered message block.
      #
      #   @return [String]
      required :type, String

      # @!method initialize(text:, type:)
      #   @param text [String] The block text of the rendered message block.
      #
      #   @param type [String] The block type of the rendered message block.
    end
  end
end

Instance Attribute Details

#channelString

The channel used for rendering the message.

Returns:

  • (String)


22
# File 'lib/trycourier/models/message_content_response.rb', line 22

required :channel, String

#channel_idString

The ID of channel used for rendering the message.

Returns:

  • (String)


28
# File 'lib/trycourier/models/message_content_response.rb', line 28

required :channel_id, String

#contentTrycourier::Models::MessageContentResponse::Result::Content

Content details of the rendered message.



34
# File 'lib/trycourier/models/message_content_response.rb', line 34

required :content, -> { Trycourier::Models::MessageContentResponse::Result::Content }