Class: Trycourier::Models::NotificationGetContent::Block
Defined Under Namespace
Modules: Content, Locale, Type
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
==, #==, #[], 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
#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(children: nil, parent: nil) ⇒ Object
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
|
# File 'lib/trycourier/models/notification_get_content.rb', line 31
class Block < Trycourier::Internal::Type::BaseModel
required :id, String
required :type, enum: -> { Trycourier::NotificationGetContent::Block::Type }
optional :alias_, String, api_name: :alias, nil?: true
optional :checksum, String, nil?: true
optional :content, union: -> { Trycourier::NotificationGetContent::Block::Content }, nil?: true
optional :context, String, nil?: true
optional :locales,
-> {
Trycourier::Internal::Type::HashOf[union: Trycourier::NotificationGetContent::Block::Locale]
},
nil?: true
module Type
extend Trycourier::Internal::Type::Enum
ACTION = :action
DIVIDER = :divider
IMAGE = :image
JSONNET = :jsonnet
LIST = :list
MARKDOWN = :markdown
QUOTE = :quote
TEMPLATE = :template
TEXT = :text
end
module Content
extend Trycourier::Internal::Type::Union
variant String
variant -> { Trycourier::NotificationGetContent::Block::Content::NotificationContentHierarchy }
class NotificationContentHierarchy < Trycourier::Internal::Type::BaseModel
optional :children, String, nil?: true
optional :parent, String, nil?: true
end
end
module Locale
extend Trycourier::Internal::Type::Union
variant String
variant -> { Trycourier::NotificationGetContent::Block::Locale::NotificationContentHierarchy }
class NotificationContentHierarchy < Trycourier::Internal::Type::BaseModel
optional :children, String, nil?: true
optional :parent, String, nil?: true
end
end
end
|
Instance Attribute Details
#alias_ ⇒ String?
45
|
# File 'lib/trycourier/models/notification_get_content.rb', line 45
optional :alias_, String, api_name: :alias, nil?: true
|
#checksum ⇒ String?
50
|
# File 'lib/trycourier/models/notification_get_content.rb', line 50
optional :checksum, String, nil?: true
|
#content ⇒ String, ...
55
|
# File 'lib/trycourier/models/notification_get_content.rb', line 55
optional :content, union: -> { Trycourier::NotificationGetContent::Block::Content }, nil?: true
|
#context ⇒ String?
60
|
# File 'lib/trycourier/models/notification_get_content.rb', line 60
optional :context, String, nil?: true
|
#id ⇒ String
35
|
# File 'lib/trycourier/models/notification_get_content.rb', line 35
required :id, String
|
65
66
67
68
69
|
# File 'lib/trycourier/models/notification_get_content.rb', line 65
optional :locales,
-> {
Trycourier::Internal::Type::HashOf[union: Trycourier::NotificationGetContent::Block::Locale]
},
nil?: true
|
40
|
# File 'lib/trycourier/models/notification_get_content.rb', line 40
required :type, enum: -> { Trycourier::NotificationGetContent::Block::Type }
|
Class Method Details
.values ⇒ Array<Symbol>
|
# File 'lib/trycourier/models/notification_get_content.rb', line 94
|
|
# File 'lib/trycourier/models/notification_get_content.rb', line 122
|