Class: ApolloDeploySignalSdkRails::SendEmailRequest
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdkRails::SendEmailRequest
- Defined in:
- lib/apollo_deploy_signal_sdk_rails/types.rb
Overview
Schema type: SendEmailRequest
Instance Attribute Summary collapse
- #attachments ⇒ Array<AttachmentRequest>
- #bcc ⇒ Array<String>
- #cc ⇒ Array<String>
- #delivery_window ⇒ DeliveryWindowRequest?
- #from ⇒ String
- #html ⇒ String?
- #idempotency_key ⇒ String?
- #metadata ⇒ Hash{String => String}
- #reply_to ⇒ String?
- #scheduled_at ⇒ String?
- #send_time_category ⇒ String
- #subject ⇒ String?
- #tags ⇒ Hash{String => String}
- #test_mode ⇒ Boolean
- #text ⇒ String?
- #to ⇒ Array<String>
- #tracking_settings ⇒ TrackingSettingsRequest?
Class Method Summary collapse
-
.from_json(attributes) ⇒ SendEmailRequest
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(from:, to:, cc: nil, bcc: nil, reply_to: nil, subject: nil, html: nil, text: nil, tags: nil, metadata: nil, idempotency_key: nil, test_mode: nil, attachments: nil, scheduled_at: nil, delivery_window: nil, send_time_category: nil, tracking_settings: nil) ⇒ SendEmailRequest
constructor
A new instance of SendEmailRequest.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(from:, to:, cc: nil, bcc: nil, reply_to: nil, subject: nil, html: nil, text: nil, tags: nil, metadata: nil, idempotency_key: nil, test_mode: nil, attachments: nil, scheduled_at: nil, delivery_window: nil, send_time_category: nil, tracking_settings: nil) ⇒ SendEmailRequest
Returns a new instance of SendEmailRequest.
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 169 def initialize(from: , to: , cc: nil, bcc: nil, reply_to: nil, subject: nil, html: nil, text: nil, tags: nil, metadata: nil, idempotency_key: nil, test_mode: nil, attachments: nil, scheduled_at: nil, delivery_window: nil, send_time_category: nil, tracking_settings: nil) @from = from @to = to @cc = cc @bcc = bcc @reply_to = reply_to @subject = subject @html = html @text = text @tags = @metadata = @idempotency_key = idempotency_key @test_mode = test_mode @attachments = @scheduled_at = scheduled_at @delivery_window = delivery_window @send_time_category = send_time_category @tracking_settings = tracking_settings end |
Instance Attribute Details
#attachments ⇒ Array<AttachmentRequest>
158 159 160 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 158 def @attachments end |
#bcc ⇒ Array<String>
140 141 142 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 140 def bcc @bcc end |
#cc ⇒ Array<String>
138 139 140 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 138 def cc @cc end |
#delivery_window ⇒ DeliveryWindowRequest?
162 163 164 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 162 def delivery_window @delivery_window end |
#from ⇒ String
134 135 136 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 134 def from @from end |
#html ⇒ String?
146 147 148 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 146 def html @html end |
#idempotency_key ⇒ String?
154 155 156 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 154 def idempotency_key @idempotency_key end |
#metadata ⇒ Hash{String => String}
152 153 154 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 152 def @metadata end |
#reply_to ⇒ String?
142 143 144 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 142 def reply_to @reply_to end |
#scheduled_at ⇒ String?
160 161 162 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 160 def scheduled_at @scheduled_at end |
#send_time_category ⇒ String
164 165 166 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 164 def send_time_category @send_time_category end |
#subject ⇒ String?
144 145 146 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 144 def subject @subject end |
#tags ⇒ Hash{String => String}
150 151 152 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 150 def @tags end |
#test_mode ⇒ Boolean
156 157 158 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 156 def test_mode @test_mode end |
#text ⇒ String?
148 149 150 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 148 def text @text end |
#to ⇒ Array<String>
136 137 138 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 136 def to @to end |
#tracking_settings ⇒ TrackingSettingsRequest?
166 167 168 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 166 def tracking_settings @tracking_settings end |
Class Method Details
.from_json(attributes) ⇒ SendEmailRequest
Create an instance from a parsed JSON hash.
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 215 def self.from_json(attributes) return nil unless attributes.is_a?(Hash) new( from: attributes.key?("from") ? attributes["from"] : attributes[:from], to: attributes.key?("to") ? attributes["to"] : attributes[:to], cc: attributes.key?("cc") ? attributes["cc"] : attributes[:cc], bcc: attributes.key?("bcc") ? attributes["bcc"] : attributes[:bcc], reply_to: attributes.key?("replyTo") ? attributes["replyTo"] : attributes[:reply_to], subject: attributes.key?("subject") ? attributes["subject"] : attributes[:subject], html: attributes.key?("html") ? attributes["html"] : attributes[:html], text: attributes.key?("text") ? attributes["text"] : attributes[:text], tags: attributes.key?("tags") ? attributes["tags"] : attributes[:tags], metadata: attributes.key?("metadata") ? attributes["metadata"] : attributes[:metadata], idempotency_key: attributes.key?("idempotencyKey") ? attributes["idempotencyKey"] : attributes[:idempotency_key], test_mode: attributes.key?("testMode") ? attributes["testMode"] : attributes[:test_mode], attachments: attributes.key?("attachments") ? attributes["attachments"] : attributes[:attachments], scheduled_at: attributes.key?("scheduledAt") ? attributes["scheduledAt"] : attributes[:scheduled_at], delivery_window: attributes.key?("deliveryWindow") ? attributes["deliveryWindow"] : attributes[:delivery_window], send_time_category: attributes.key?("sendTimeCategory") ? attributes["sendTimeCategory"] : attributes[:send_time_category], tracking_settings: attributes.key?("trackingSettings") ? attributes["trackingSettings"] : attributes[:tracking_settings], ) end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this object.
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 190 def to_h { from: @from, to: @to, cc: @cc, bcc: @bcc, reply_to: @reply_to, subject: @subject, html: @html, text: @text, tags: @tags, metadata: @metadata, idempotency_key: @idempotency_key, test_mode: @test_mode, attachments: @attachments, scheduled_at: @scheduled_at, delivery_window: @delivery_window, send_time_category: @send_time_category, tracking_settings: @tracking_settings, }.compact end |