ark-email 0.13.0 → 0.15.0

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 (86) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +24 -0
  3. data/README.md +3 -3
  4. data/lib/ark_email/client.rb +8 -0
  5. data/lib/ark_email/models/dns_record.rb +49 -19
  6. data/lib/ark_email/models/domain_create_response.rb +117 -25
  7. data/lib/ark_email/models/domain_list_response.rb +12 -13
  8. data/lib/ark_email/models/domain_retrieve_response.rb +117 -25
  9. data/lib/ark_email/models/domain_verify_response.rb +117 -25
  10. data/lib/ark_email/models/email_retrieve_params.rb +4 -1
  11. data/lib/ark_email/models/email_retrieve_response.rb +177 -1
  12. data/lib/ark_email/models/log_entry.rb +298 -0
  13. data/lib/ark_email/models/log_entry_detail.rb +102 -0
  14. data/lib/ark_email/models/log_list_params.rb +106 -0
  15. data/lib/ark_email/models/log_retrieve_params.rb +14 -0
  16. data/lib/ark_email/models/log_retrieve_response.rb +33 -0
  17. data/lib/ark_email/models/track_domain.rb +6 -2
  18. data/lib/ark_email/models/usage_retrieve_params.rb +14 -0
  19. data/lib/ark_email/models/usage_retrieve_response.rb +270 -0
  20. data/lib/ark_email/models/webhook_create_params.rb +0 -2
  21. data/lib/ark_email/models/webhook_create_response.rb +0 -2
  22. data/lib/ark_email/models/webhook_list_deliveries_params.rb +0 -2
  23. data/lib/ark_email/models/webhook_list_deliveries_response.rb +0 -2
  24. data/lib/ark_email/models/webhook_retrieve_delivery_response.rb +0 -2
  25. data/lib/ark_email/models/webhook_retrieve_response.rb +0 -2
  26. data/lib/ark_email/models/webhook_test_params.rb +0 -2
  27. data/lib/ark_email/models/webhook_update_response.rb +0 -2
  28. data/lib/ark_email/models.rb +10 -0
  29. data/lib/ark_email/resources/logs.rb +120 -0
  30. data/lib/ark_email/resources/usage.rb +51 -0
  31. data/lib/ark_email/version.rb +1 -1
  32. data/lib/ark_email.rb +9 -0
  33. data/rbi/ark_email/client.rbi +6 -0
  34. data/rbi/ark_email/models/dns_record.rbi +57 -22
  35. data/rbi/ark_email/models/domain_create_response.rbi +189 -28
  36. data/rbi/ark_email/models/domain_list_response.rbi +13 -19
  37. data/rbi/ark_email/models/domain_retrieve_response.rbi +191 -28
  38. data/rbi/ark_email/models/domain_verify_response.rbi +189 -28
  39. data/rbi/ark_email/models/email_retrieve_params.rbi +8 -2
  40. data/rbi/ark_email/models/email_retrieve_response.rbi +379 -0
  41. data/rbi/ark_email/models/log_entry.rbi +431 -0
  42. data/rbi/ark_email/models/log_entry_detail.rbi +192 -0
  43. data/rbi/ark_email/models/log_list_params.rbi +163 -0
  44. data/rbi/ark_email/models/log_retrieve_params.rbi +27 -0
  45. data/rbi/ark_email/models/log_retrieve_response.rbi +59 -0
  46. data/rbi/ark_email/models/track_domain.rbi +4 -2
  47. data/rbi/ark_email/models/usage_retrieve_params.rbi +27 -0
  48. data/rbi/ark_email/models/usage_retrieve_response.rbi +511 -0
  49. data/rbi/ark_email/models/webhook_create_params.rbi +0 -10
  50. data/rbi/ark_email/models/webhook_create_response.rbi +0 -10
  51. data/rbi/ark_email/models/webhook_list_deliveries_params.rbi +0 -10
  52. data/rbi/ark_email/models/webhook_list_deliveries_response.rbi +0 -10
  53. data/rbi/ark_email/models/webhook_retrieve_delivery_response.rbi +0 -10
  54. data/rbi/ark_email/models/webhook_retrieve_response.rbi +0 -10
  55. data/rbi/ark_email/models/webhook_test_params.rbi +0 -10
  56. data/rbi/ark_email/models/webhook_update_response.rbi +0 -10
  57. data/rbi/ark_email/models.rbi +10 -0
  58. data/rbi/ark_email/resources/emails.rbi +4 -1
  59. data/rbi/ark_email/resources/logs.rbi +104 -0
  60. data/rbi/ark_email/resources/usage.rbi +40 -0
  61. data/sig/ark_email/client.rbs +4 -0
  62. data/sig/ark_email/models/dns_record.rbs +5 -0
  63. data/sig/ark_email/models/domain_create_response.rbs +27 -20
  64. data/sig/ark_email/models/domain_list_response.rbs +4 -16
  65. data/sig/ark_email/models/domain_retrieve_response.rbs +27 -20
  66. data/sig/ark_email/models/domain_verify_response.rbs +27 -20
  67. data/sig/ark_email/models/email_retrieve_response.rbs +179 -0
  68. data/sig/ark_email/models/log_entry.rbs +209 -0
  69. data/sig/ark_email/models/log_entry_detail.rbs +97 -0
  70. data/sig/ark_email/models/log_list_params.rbs +97 -0
  71. data/sig/ark_email/models/log_retrieve_params.rbs +15 -0
  72. data/sig/ark_email/models/log_retrieve_response.rbs +26 -0
  73. data/sig/ark_email/models/usage_retrieve_params.rbs +15 -0
  74. data/sig/ark_email/models/usage_retrieve_response.rbs +212 -0
  75. data/sig/ark_email/models/webhook_create_params.rbs +0 -4
  76. data/sig/ark_email/models/webhook_create_response.rbs +0 -4
  77. data/sig/ark_email/models/webhook_list_deliveries_params.rbs +0 -4
  78. data/sig/ark_email/models/webhook_list_deliveries_response.rbs +0 -4
  79. data/sig/ark_email/models/webhook_retrieve_delivery_response.rbs +0 -4
  80. data/sig/ark_email/models/webhook_retrieve_response.rbs +0 -4
  81. data/sig/ark_email/models/webhook_test_params.rbs +0 -4
  82. data/sig/ark_email/models/webhook_update_response.rbs +0 -4
  83. data/sig/ark_email/models.rbs +10 -0
  84. data/sig/ark_email/resources/logs.rbs +25 -0
  85. data/sig/ark_email/resources/usage.rbs +11 -0
  86. metadata +29 -2
@@ -27,82 +27,174 @@ module ArkEmail
27
27
  # @see ArkEmail::Models::DomainVerifyResponse#data
28
28
  class Data < ArkEmail::Internal::Type::BaseModel
29
29
  # @!attribute id
30
- # Domain ID
30
+ # Unique domain identifier
31
31
  #
32
- # @return [String]
33
- required :id, String
32
+ # @return [Integer]
33
+ required :id, Integer
34
34
 
35
35
  # @!attribute created_at
36
+ # Timestamp when the domain was added
36
37
  #
37
38
  # @return [Time]
38
39
  required :created_at, Time, api_name: :createdAt
39
40
 
40
41
  # @!attribute dns_records
42
+ # DNS records that must be added to your domain's DNS settings. Null if records
43
+ # are not yet generated.
44
+ #
45
+ # **Important:** The `name` field contains the relative hostname that you should
46
+ # enter in your DNS provider. Most DNS providers auto-append the zone name, so you
47
+ # only need to enter the relative part.
48
+ #
49
+ # For subdomains like `mail.example.com`, the zone is `example.com`, so:
50
+ #
51
+ # - SPF `name` would be `mail` (not `@`)
52
+ # - DKIM `name` would be `ark-xyz._domainkey.mail`
53
+ # - Return Path `name` would be `psrp.mail`
41
54
  #
42
- # @return [ArkEmail::Models::DomainVerifyResponse::Data::DNSRecords]
55
+ # @return [ArkEmail::Models::DomainVerifyResponse::Data::DNSRecords, nil]
43
56
  required :dns_records,
44
57
  -> { ArkEmail::Models::DomainVerifyResponse::Data::DNSRecords },
45
- api_name: :dnsRecords
58
+ api_name: :dnsRecords,
59
+ nil?: true
46
60
 
47
61
  # @!attribute name
48
- # Domain name
62
+ # The domain name used for sending emails
49
63
  #
50
64
  # @return [String]
51
65
  required :name, String
52
66
 
53
67
  # @!attribute uuid
68
+ # UUID of the domain
54
69
  #
55
70
  # @return [String]
56
71
  required :uuid, String
57
72
 
58
73
  # @!attribute verified
59
- # Whether DNS is verified
74
+ # Whether all DNS records (SPF, DKIM, Return Path) are correctly configured.
75
+ # Domain must be verified before sending emails.
60
76
  #
61
77
  # @return [Boolean]
62
78
  required :verified, ArkEmail::Internal::Type::Boolean
63
79
 
64
80
  # @!attribute verified_at
65
- # When the domain was verified (null if not verified)
81
+ # Timestamp when the domain ownership was verified, or null if not yet verified
66
82
  #
67
83
  # @return [Time, nil]
68
84
  optional :verified_at, Time, api_name: :verifiedAt, nil?: true
69
85
 
70
86
  # @!method initialize(id:, created_at:, dns_records:, name:, uuid:, verified:, verified_at: nil)
71
- # @param id [String] Domain ID
87
+ # Some parameter documentations has been truncated, see
88
+ # {ArkEmail::Models::DomainVerifyResponse::Data} for more details.
72
89
  #
73
- # @param created_at [Time]
90
+ # @param id [Integer] Unique domain identifier
74
91
  #
75
- # @param dns_records [ArkEmail::Models::DomainVerifyResponse::Data::DNSRecords]
92
+ # @param created_at [Time] Timestamp when the domain was added
76
93
  #
77
- # @param name [String] Domain name
94
+ # @param dns_records [ArkEmail::Models::DomainVerifyResponse::Data::DNSRecords, nil] DNS records that must be added to your domain's DNS settings. Null if records ar
78
95
  #
79
- # @param uuid [String]
96
+ # @param name [String] The domain name used for sending emails
80
97
  #
81
- # @param verified [Boolean] Whether DNS is verified
98
+ # @param uuid [String] UUID of the domain
82
99
  #
83
- # @param verified_at [Time, nil] When the domain was verified (null if not verified)
100
+ # @param verified [Boolean] Whether all DNS records (SPF, DKIM, Return Path) are correctly configured. Domai
101
+ #
102
+ # @param verified_at [Time, nil] Timestamp when the domain ownership was verified, or null if not yet verified
84
103
 
85
104
  # @see ArkEmail::Models::DomainVerifyResponse::Data#dns_records
86
105
  class DNSRecords < ArkEmail::Internal::Type::BaseModel
87
106
  # @!attribute dkim
107
+ # A DNS record that needs to be configured in your domain's DNS settings.
108
+ #
109
+ # The `name` field contains the relative hostname to enter in your DNS provider
110
+ # (which auto-appends the zone). The `fullName` field contains the complete
111
+ # fully-qualified domain name (FQDN) for reference.
112
+ #
113
+ # **Example for subdomain `mail.example.com`:**
114
+ #
115
+ # - `name`: `"mail"` (what you enter in DNS provider)
116
+ # - `fullName`: `"mail.example.com"` (the complete hostname)
88
117
  #
89
- # @return [ArkEmail::Models::DNSRecord]
90
- required :dkim, -> { ArkEmail::DNSRecord }
118
+ # **Example for root domain `example.com`:**
119
+ #
120
+ # - `name`: `"@"` (DNS shorthand for apex/root)
121
+ # - `fullName`: `"example.com"`
122
+ #
123
+ # @return [ArkEmail::Models::DNSRecord, nil]
124
+ optional :dkim, -> { ArkEmail::DNSRecord }, nil?: true
91
125
 
92
126
  # @!attribute return_path
127
+ # A DNS record that needs to be configured in your domain's DNS settings.
128
+ #
129
+ # The `name` field contains the relative hostname to enter in your DNS provider
130
+ # (which auto-appends the zone). The `fullName` field contains the complete
131
+ # fully-qualified domain name (FQDN) for reference.
132
+ #
133
+ # **Example for subdomain `mail.example.com`:**
134
+ #
135
+ # - `name`: `"mail"` (what you enter in DNS provider)
136
+ # - `fullName`: `"mail.example.com"` (the complete hostname)
137
+ #
138
+ # **Example for root domain `example.com`:**
139
+ #
140
+ # - `name`: `"@"` (DNS shorthand for apex/root)
141
+ # - `fullName`: `"example.com"`
93
142
  #
94
- # @return [ArkEmail::Models::DNSRecord]
95
- required :return_path, -> { ArkEmail::DNSRecord }, api_name: :returnPath
143
+ # @return [ArkEmail::Models::DNSRecord, nil]
144
+ optional :return_path, -> { ArkEmail::DNSRecord }, api_name: :returnPath, nil?: true
96
145
 
97
146
  # @!attribute spf
147
+ # A DNS record that needs to be configured in your domain's DNS settings.
98
148
  #
99
- # @return [ArkEmail::Models::DNSRecord]
100
- required :spf, -> { ArkEmail::DNSRecord }
149
+ # The `name` field contains the relative hostname to enter in your DNS provider
150
+ # (which auto-appends the zone). The `fullName` field contains the complete
151
+ # fully-qualified domain name (FQDN) for reference.
152
+ #
153
+ # **Example for subdomain `mail.example.com`:**
154
+ #
155
+ # - `name`: `"mail"` (what you enter in DNS provider)
156
+ # - `fullName`: `"mail.example.com"` (the complete hostname)
157
+ #
158
+ # **Example for root domain `example.com`:**
159
+ #
160
+ # - `name`: `"@"` (DNS shorthand for apex/root)
161
+ # - `fullName`: `"example.com"`
162
+ #
163
+ # @return [ArkEmail::Models::DNSRecord, nil]
164
+ optional :spf, -> { ArkEmail::DNSRecord }, nil?: true
165
+
166
+ # @!attribute zone
167
+ # The DNS zone (registrable domain) where records should be added. This is the
168
+ # root domain that your DNS provider manages. For `mail.example.com`, the zone is
169
+ # `example.com`. For `example.co.uk`, the zone is `example.co.uk`.
170
+ #
171
+ # @return [String, nil]
172
+ optional :zone, String
101
173
 
102
- # @!method initialize(dkim:, return_path:, spf:)
103
- # @param dkim [ArkEmail::Models::DNSRecord]
104
- # @param return_path [ArkEmail::Models::DNSRecord]
105
- # @param spf [ArkEmail::Models::DNSRecord]
174
+ # @!method initialize(dkim: nil, return_path: nil, spf: nil, zone: nil)
175
+ # Some parameter documentations has been truncated, see
176
+ # {ArkEmail::Models::DomainVerifyResponse::Data::DNSRecords} for more details.
177
+ #
178
+ # DNS records that must be added to your domain's DNS settings. Null if records
179
+ # are not yet generated.
180
+ #
181
+ # **Important:** The `name` field contains the relative hostname that you should
182
+ # enter in your DNS provider. Most DNS providers auto-append the zone name, so you
183
+ # only need to enter the relative part.
184
+ #
185
+ # For subdomains like `mail.example.com`, the zone is `example.com`, so:
186
+ #
187
+ # - SPF `name` would be `mail` (not `@`)
188
+ # - DKIM `name` would be `ark-xyz._domainkey.mail`
189
+ # - Return Path `name` would be `psrp.mail`
190
+ #
191
+ # @param dkim [ArkEmail::Models::DNSRecord, nil] A DNS record that needs to be configured in your domain's DNS settings.
192
+ #
193
+ # @param return_path [ArkEmail::Models::DNSRecord, nil] A DNS record that needs to be configured in your domain's DNS settings.
194
+ #
195
+ # @param spf [ArkEmail::Models::DNSRecord, nil] A DNS record that needs to be configured in your domain's DNS settings.
196
+ #
197
+ # @param zone [String] The DNS zone (registrable domain) where records should be added.
106
198
  end
107
199
  end
108
200
  end
@@ -10,10 +10,13 @@ module ArkEmail
10
10
  # @!attribute expand
11
11
  # Comma-separated list of fields to include:
12
12
  #
13
+ # - `full` - Include all expanded fields in a single request
13
14
  # - `content` - HTML and plain text body
14
15
  # - `headers` - Email headers
15
16
  # - `deliveries` - Delivery attempt history
16
- # - `activity` - Opens and clicks
17
+ # - `activity` - Opens and clicks tracking data
18
+ # - `attachments` - File attachments with content (base64 encoded)
19
+ # - `raw` - Complete raw MIME message (base64 encoded)
17
20
  #
18
21
  # @return [String, nil]
19
22
  optional :expand, String
@@ -89,6 +89,19 @@ module ArkEmail
89
89
  # @return [String]
90
90
  required :to, String
91
91
 
92
+ # @!attribute activity
93
+ # Opens and clicks tracking data (included if expand=activity)
94
+ #
95
+ # @return [ArkEmail::Models::EmailRetrieveResponse::Data::Activity, nil]
96
+ optional :activity, -> { ArkEmail::Models::EmailRetrieveResponse::Data::Activity }
97
+
98
+ # @!attribute attachments
99
+ # File attachments (included if expand=attachments)
100
+ #
101
+ # @return [Array<ArkEmail::Models::EmailRetrieveResponse::Data::Attachment>, nil]
102
+ optional :attachments,
103
+ -> { ArkEmail::Internal::Type::ArrayOf[ArkEmail::Models::EmailRetrieveResponse::Data::Attachment] }
104
+
92
105
  # @!attribute deliveries
93
106
  # Delivery attempt history (included if expand=deliveries)
94
107
  #
@@ -120,6 +133,13 @@ module ArkEmail
120
133
  # @return [String, nil]
121
134
  optional :plain_body, String, api_name: :plainBody
122
135
 
136
+ # @!attribute raw_message
137
+ # Complete raw MIME message, base64 encoded (included if expand=raw). Decode this
138
+ # to get the original RFC 2822 formatted email.
139
+ #
140
+ # @return [String, nil]
141
+ optional :raw_message, String, api_name: :rawMessage
142
+
123
143
  # @!attribute spam
124
144
  # Whether the message was flagged as spam
125
145
  #
@@ -138,7 +158,7 @@ module ArkEmail
138
158
  # @return [String, nil]
139
159
  optional :tag, String
140
160
 
141
- # @!method initialize(id:, token:, from:, scope:, status:, subject:, timestamp:, timestamp_iso:, to:, deliveries: nil, headers: nil, html_body: nil, message_id: nil, plain_body: nil, spam: nil, spam_score: nil, tag: nil)
161
+ # @!method initialize(id:, token:, from:, scope:, status:, subject:, timestamp:, timestamp_iso:, to:, activity: nil, attachments: nil, deliveries: nil, headers: nil, html_body: nil, message_id: nil, plain_body: nil, raw_message: nil, spam: nil, spam_score: nil, tag: nil)
142
162
  # Some parameter documentations has been truncated, see
143
163
  # {ArkEmail::Models::EmailRetrieveResponse::Data} for more details.
144
164
  #
@@ -160,6 +180,10 @@ module ArkEmail
160
180
  #
161
181
  # @param to [String] Recipient address
162
182
  #
183
+ # @param activity [ArkEmail::Models::EmailRetrieveResponse::Data::Activity] Opens and clicks tracking data (included if expand=activity)
184
+ #
185
+ # @param attachments [Array<ArkEmail::Models::EmailRetrieveResponse::Data::Attachment>] File attachments (included if expand=attachments)
186
+ #
163
187
  # @param deliveries [Array<ArkEmail::Models::EmailRetrieveResponse::Data::Delivery>] Delivery attempt history (included if expand=deliveries)
164
188
  #
165
189
  # @param headers [Hash{Symbol=>String}] Email headers (included if expand=headers)
@@ -170,6 +194,8 @@ module ArkEmail
170
194
  #
171
195
  # @param plain_body [String] Plain text body (included if expand=content)
172
196
  #
197
+ # @param raw_message [String] Complete raw MIME message, base64 encoded (included if expand=raw).
198
+ #
173
199
  # @param spam [Boolean] Whether the message was flagged as spam
174
200
  #
175
201
  # @param spam_score [Float] Spam score (if applicable)
@@ -213,6 +239,156 @@ module ArkEmail
213
239
  # @return [Array<Symbol>]
214
240
  end
215
241
 
242
+ # @see ArkEmail::Models::EmailRetrieveResponse::Data#activity
243
+ class Activity < ArkEmail::Internal::Type::BaseModel
244
+ # @!attribute clicks
245
+ # List of link click events
246
+ #
247
+ # @return [Array<ArkEmail::Models::EmailRetrieveResponse::Data::Activity::Click>, nil]
248
+ optional :clicks,
249
+ -> { ArkEmail::Internal::Type::ArrayOf[ArkEmail::Models::EmailRetrieveResponse::Data::Activity::Click] }
250
+
251
+ # @!attribute opens
252
+ # List of email open events
253
+ #
254
+ # @return [Array<ArkEmail::Models::EmailRetrieveResponse::Data::Activity::Open>, nil]
255
+ optional :opens,
256
+ -> { ArkEmail::Internal::Type::ArrayOf[ArkEmail::Models::EmailRetrieveResponse::Data::Activity::Open] }
257
+
258
+ # @!method initialize(clicks: nil, opens: nil)
259
+ # Opens and clicks tracking data (included if expand=activity)
260
+ #
261
+ # @param clicks [Array<ArkEmail::Models::EmailRetrieveResponse::Data::Activity::Click>] List of link click events
262
+ #
263
+ # @param opens [Array<ArkEmail::Models::EmailRetrieveResponse::Data::Activity::Open>] List of email open events
264
+
265
+ class Click < ArkEmail::Internal::Type::BaseModel
266
+ # @!attribute ip_address
267
+ # IP address of the clicker
268
+ #
269
+ # @return [String, nil]
270
+ optional :ip_address, String, api_name: :ipAddress
271
+
272
+ # @!attribute timestamp
273
+ # Unix timestamp of the click event
274
+ #
275
+ # @return [Float, nil]
276
+ optional :timestamp, Float
277
+
278
+ # @!attribute timestamp_iso
279
+ # ISO 8601 timestamp of the click event
280
+ #
281
+ # @return [Time, nil]
282
+ optional :timestamp_iso, Time, api_name: :timestampIso
283
+
284
+ # @!attribute url
285
+ # URL that was clicked
286
+ #
287
+ # @return [String, nil]
288
+ optional :url, String
289
+
290
+ # @!attribute user_agent
291
+ # User agent of the email client
292
+ #
293
+ # @return [String, nil]
294
+ optional :user_agent, String, api_name: :userAgent
295
+
296
+ # @!method initialize(ip_address: nil, timestamp: nil, timestamp_iso: nil, url: nil, user_agent: nil)
297
+ # @param ip_address [String] IP address of the clicker
298
+ #
299
+ # @param timestamp [Float] Unix timestamp of the click event
300
+ #
301
+ # @param timestamp_iso [Time] ISO 8601 timestamp of the click event
302
+ #
303
+ # @param url [String] URL that was clicked
304
+ #
305
+ # @param user_agent [String] User agent of the email client
306
+ end
307
+
308
+ class Open < ArkEmail::Internal::Type::BaseModel
309
+ # @!attribute ip_address
310
+ # IP address of the opener
311
+ #
312
+ # @return [String, nil]
313
+ optional :ip_address, String, api_name: :ipAddress
314
+
315
+ # @!attribute timestamp
316
+ # Unix timestamp of the open event
317
+ #
318
+ # @return [Float, nil]
319
+ optional :timestamp, Float
320
+
321
+ # @!attribute timestamp_iso
322
+ # ISO 8601 timestamp of the open event
323
+ #
324
+ # @return [Time, nil]
325
+ optional :timestamp_iso, Time, api_name: :timestampIso
326
+
327
+ # @!attribute user_agent
328
+ # User agent of the email client
329
+ #
330
+ # @return [String, nil]
331
+ optional :user_agent, String, api_name: :userAgent
332
+
333
+ # @!method initialize(ip_address: nil, timestamp: nil, timestamp_iso: nil, user_agent: nil)
334
+ # @param ip_address [String] IP address of the opener
335
+ #
336
+ # @param timestamp [Float] Unix timestamp of the open event
337
+ #
338
+ # @param timestamp_iso [Time] ISO 8601 timestamp of the open event
339
+ #
340
+ # @param user_agent [String] User agent of the email client
341
+ end
342
+ end
343
+
344
+ class Attachment < ArkEmail::Internal::Type::BaseModel
345
+ # @!attribute content_type
346
+ # MIME type of the attachment
347
+ #
348
+ # @return [String]
349
+ required :content_type, String, api_name: :contentType
350
+
351
+ # @!attribute data
352
+ # Base64 encoded attachment content. Decode this to get the raw file bytes.
353
+ #
354
+ # @return [String]
355
+ required :data, String
356
+
357
+ # @!attribute filename
358
+ # Original filename of the attachment
359
+ #
360
+ # @return [String]
361
+ required :filename, String
362
+
363
+ # @!attribute hash_
364
+ # SHA256 hash of the attachment content for verification
365
+ #
366
+ # @return [String]
367
+ required :hash_, String, api_name: :hash
368
+
369
+ # @!attribute size
370
+ # Size of the attachment in bytes
371
+ #
372
+ # @return [Integer]
373
+ required :size, Integer
374
+
375
+ # @!method initialize(content_type:, data:, filename:, hash_:, size:)
376
+ # Some parameter documentations has been truncated, see
377
+ # {ArkEmail::Models::EmailRetrieveResponse::Data::Attachment} for more details.
378
+ #
379
+ # An email attachment retrieved from a sent message
380
+ #
381
+ # @param content_type [String] MIME type of the attachment
382
+ #
383
+ # @param data [String] Base64 encoded attachment content. Decode this to get the raw file bytes.
384
+ #
385
+ # @param filename [String] Original filename of the attachment
386
+ #
387
+ # @param hash_ [String] SHA256 hash of the attachment content for verification
388
+ #
389
+ # @param size [Integer] Size of the attachment in bytes
390
+ end
391
+
216
392
  class Delivery < ArkEmail::Internal::Type::BaseModel
217
393
  # @!attribute id
218
394
  # Delivery attempt ID