ark-email 0.16.0 → 0.18.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +26 -0
- data/README.md +1 -1
- data/lib/ark_email/client.rb +4 -0
- data/lib/ark_email/internal/transport/pooled_net_requester.rb +1 -1
- data/lib/ark_email/models/email_retrieve_deliveries_response.rb +80 -5
- data/lib/ark_email/models/email_retrieve_response.rb +79 -5
- data/lib/ark_email/models/tenant.rb +95 -0
- data/lib/ark_email/models/tenant_create_params.rb +57 -0
- data/lib/ark_email/models/tenant_create_response.rb +28 -0
- data/lib/ark_email/models/tenant_delete_params.rb +14 -0
- data/lib/ark_email/models/tenant_delete_response.rb +39 -0
- data/lib/ark_email/models/tenant_list_params.rb +50 -0
- data/lib/ark_email/models/tenant_retrieve_params.rb +14 -0
- data/lib/ark_email/models/tenant_retrieve_response.rb +28 -0
- data/lib/ark_email/models/tenant_update_params.rb +77 -0
- data/lib/ark_email/models/tenant_update_response.rb +28 -0
- data/lib/ark_email/models.rb +12 -0
- data/lib/ark_email/resources/tenants.rb +144 -0
- data/lib/ark_email/version.rb +1 -1
- data/lib/ark_email.rb +11 -0
- data/rbi/ark_email/client.rbi +3 -0
- data/rbi/ark_email/models/email_retrieve_deliveries_response.rbi +166 -7
- data/rbi/ark_email/models/email_retrieve_response.rbi +166 -7
- data/rbi/ark_email/models/tenant.rbi +121 -0
- data/rbi/ark_email/models/tenant_create_params.rbi +100 -0
- data/rbi/ark_email/models/tenant_create_response.rbi +52 -0
- data/rbi/ark_email/models/tenant_delete_params.rbi +27 -0
- data/rbi/ark_email/models/tenant_delete_response.rbi +75 -0
- data/rbi/ark_email/models/tenant_list_params.rbi +92 -0
- data/rbi/ark_email/models/tenant_retrieve_params.rbi +27 -0
- data/rbi/ark_email/models/tenant_retrieve_response.rbi +52 -0
- data/rbi/ark_email/models/tenant_update_params.rbi +140 -0
- data/rbi/ark_email/models/tenant_update_response.rbi +52 -0
- data/rbi/ark_email/models.rbi +12 -0
- data/rbi/ark_email/resources/tenants.rbi +131 -0
- data/sig/ark_email/client.rbs +2 -0
- data/sig/ark_email/models/email_retrieve_deliveries_response.rbs +58 -3
- data/sig/ark_email/models/email_retrieve_response.rbs +58 -3
- data/sig/ark_email/models/tenant.rbs +65 -0
- data/sig/ark_email/models/tenant_create_params.rbs +39 -0
- data/sig/ark_email/models/tenant_create_response.rbs +26 -0
- data/sig/ark_email/models/tenant_delete_params.rbs +15 -0
- data/sig/ark_email/models/tenant_delete_response.rbs +40 -0
- data/sig/ark_email/models/tenant_list_params.rbs +56 -0
- data/sig/ark_email/models/tenant_retrieve_params.rbs +15 -0
- data/sig/ark_email/models/tenant_retrieve_response.rbs +26 -0
- data/sig/ark_email/models/tenant_update_params.rbs +62 -0
- data/sig/ark_email/models/tenant_update_response.rbs +26 -0
- data/sig/ark_email/models.rbs +12 -0
- data/sig/ark_email/resources/tenants.rbs +38 -0
- metadata +35 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9ad3428e3301ab6c22b19d6447605d4abb3b5a0f73d6cd1ea1b2d02c76b035d7
|
|
4
|
+
data.tar.gz: cc21c458f90f3facd542034a35b8a47ce91aa7bbd2343f95f3843b79180c8edb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f6411dfd7040c48e15573d99340fb44f7ceead905bba5e49f738e599aec3e9a8b3da56d7e7de8786e39c80b7a2d84e296b3b49e2c99bc6d7f1cafc9522182213
|
|
7
|
+
data.tar.gz: 9c2b777d089eba4e1f7c2fc1ec766c9cb37de4aa951e61a43ce7d361cb4051c76b9901ff2cc359ee69bd96a12e9c6325b066d6def183c0e0f3a4345038012fa8
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.18.0 (2026-02-03)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.17.0...v0.18.0](https://github.com/ArkHQ-io/ark-ruby/compare/v0.17.0...v0.18.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** Add Tenants ([3ef25f0](https://github.com/ArkHQ-io/ark-ruby/commit/3ef25f095708d041a15fa89f77872bf0df541a1d))
|
|
10
|
+
* **api:** api update ([787e993](https://github.com/ArkHQ-io/ark-ruby/commit/787e99301d21537f66833fdebe070ad6473fa7b2))
|
|
11
|
+
* **api:** manual updates ([cdd14ab](https://github.com/ArkHQ-io/ark-ruby/commit/cdd14ab06e65b53f4c6b60af46110b3b7966b9ab))
|
|
12
|
+
* **api:** manual updates ([e253498](https://github.com/ArkHQ-io/ark-ruby/commit/e2534989ba9f4ed2378ff37615ef9dadb7c08341))
|
|
13
|
+
* **api:** manual updates ([d15f192](https://github.com/ArkHQ-io/ark-ruby/commit/d15f19216f575fc83493db293e9265cb208d0b6c))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* **client:** always add content-length to post body, even when empty ([7ec49ee](https://github.com/ArkHQ-io/ark-ruby/commit/7ec49ee2f06a677b2bf6c976e0a5fa3d959c1b30))
|
|
19
|
+
|
|
20
|
+
## 0.17.0 (2026-01-30)
|
|
21
|
+
|
|
22
|
+
Full Changelog: [v0.16.0...v0.17.0](https://github.com/ArkHQ-io/ark-ruby/compare/v0.16.0...v0.17.0)
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
|
|
26
|
+
* **api:** api update ([6f485fb](https://github.com/ArkHQ-io/ark-ruby/commit/6f485fbb86233b47f79314c8cc4887135824a682))
|
|
27
|
+
* **api:** manual updates ([001dca6](https://github.com/ArkHQ-io/ark-ruby/commit/001dca62fad133fe30758f2d3187e3e0ba7f412f))
|
|
28
|
+
|
|
3
29
|
## 0.16.0 (2026-01-30)
|
|
4
30
|
|
|
5
31
|
Full Changelog: [v0.15.0...v0.16.0](https://github.com/ArkHQ-io/ark-ruby/compare/v0.15.0...v0.16.0)
|
data/README.md
CHANGED
data/lib/ark_email/client.rb
CHANGED
|
@@ -45,6 +45,9 @@ module ArkEmail
|
|
|
45
45
|
# @return [ArkEmail::Resources::Usage]
|
|
46
46
|
attr_reader :usage
|
|
47
47
|
|
|
48
|
+
# @return [ArkEmail::Resources::Tenants]
|
|
49
|
+
attr_reader :tenants
|
|
50
|
+
|
|
48
51
|
# @api private
|
|
49
52
|
#
|
|
50
53
|
# @return [Hash{String=>String}]
|
|
@@ -105,6 +108,7 @@ module ArkEmail
|
|
|
105
108
|
@tracking = ArkEmail::Resources::Tracking.new(client: self)
|
|
106
109
|
@logs = ArkEmail::Resources::Logs.new(client: self)
|
|
107
110
|
@usage = ArkEmail::Resources::Usage.new(client: self)
|
|
111
|
+
@tenants = ArkEmail::Resources::Tenants.new(client: self)
|
|
108
112
|
end
|
|
109
113
|
end
|
|
110
114
|
end
|
|
@@ -75,7 +75,7 @@ module ArkEmail
|
|
|
75
75
|
|
|
76
76
|
case body
|
|
77
77
|
in nil
|
|
78
|
-
|
|
78
|
+
req["content-length"] ||= 0 unless req["transfer-encoding"]
|
|
79
79
|
in String
|
|
80
80
|
req["content-length"] ||= body.bytesize.to_s unless req["transfer-encoding"]
|
|
81
81
|
req.body_stream = ArkEmail::Internal::Util::ReadIOAdapter.new(body, &blk)
|
|
@@ -110,6 +110,25 @@ module ArkEmail
|
|
|
110
110
|
# @return [Time]
|
|
111
111
|
required :timestamp_iso, Time, api_name: :timestampIso
|
|
112
112
|
|
|
113
|
+
# @!attribute classification
|
|
114
|
+
# Bounce classification category (present for failed deliveries). Helps understand
|
|
115
|
+
# why delivery failed for analytics and automated handling.
|
|
116
|
+
#
|
|
117
|
+
# @return [Symbol, ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::Delivery::Classification, nil]
|
|
118
|
+
optional :classification,
|
|
119
|
+
enum: -> { ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::Delivery::Classification },
|
|
120
|
+
nil?: true
|
|
121
|
+
|
|
122
|
+
# @!attribute classification_code
|
|
123
|
+
# Numeric bounce classification code for programmatic handling. Codes:
|
|
124
|
+
# 10=invalid_recipient, 11=no_mailbox, 12=not_accepting_mail, 20=mailbox_full,
|
|
125
|
+
# 21=message_too_large, 30=spam_block, 31=policy_violation, 32=tls_required,
|
|
126
|
+
# 40=connection_error, 41=dns_error, 42=temporarily_unavailable,
|
|
127
|
+
# 50=protocol_error, 99=unclassified
|
|
128
|
+
#
|
|
129
|
+
# @return [Integer, nil]
|
|
130
|
+
optional :classification_code, Integer, api_name: :classificationCode, nil?: true
|
|
131
|
+
|
|
113
132
|
# @!attribute code
|
|
114
133
|
# SMTP response code
|
|
115
134
|
#
|
|
@@ -117,24 +136,47 @@ module ArkEmail
|
|
|
117
136
|
optional :code, Integer
|
|
118
137
|
|
|
119
138
|
# @!attribute details
|
|
120
|
-
#
|
|
139
|
+
# Human-readable delivery summary. Format varies by status:
|
|
140
|
+
#
|
|
141
|
+
# - **sent**: `Message for {recipient} accepted by {ip}:{port} ({hostname})`
|
|
142
|
+
# - **softfail/hardfail**:
|
|
143
|
+
# `{code} {classification}: Delivery to {recipient} failed at {ip}:{port} ({hostname})`
|
|
121
144
|
#
|
|
122
145
|
# @return [String, nil]
|
|
123
146
|
optional :details, String
|
|
124
147
|
|
|
125
148
|
# @!attribute output
|
|
126
|
-
# SMTP
|
|
149
|
+
# Raw SMTP response from the receiving mail server
|
|
127
150
|
#
|
|
128
151
|
# @return [String, nil]
|
|
129
152
|
optional :output, String
|
|
130
153
|
|
|
154
|
+
# @!attribute remote_host
|
|
155
|
+
# Hostname of the remote mail server that processed the delivery. Present for all
|
|
156
|
+
# delivery attempts (successful and failed).
|
|
157
|
+
#
|
|
158
|
+
# @return [String, nil]
|
|
159
|
+
optional :remote_host, String, api_name: :remoteHost, nil?: true
|
|
160
|
+
|
|
131
161
|
# @!attribute sent_with_ssl
|
|
132
162
|
# Whether TLS was used
|
|
133
163
|
#
|
|
134
164
|
# @return [Boolean, nil]
|
|
135
165
|
optional :sent_with_ssl, ArkEmail::Internal::Type::Boolean, api_name: :sentWithSsl
|
|
136
166
|
|
|
137
|
-
# @!
|
|
167
|
+
# @!attribute smtp_enhanced_code
|
|
168
|
+
# RFC 3463 enhanced status code from SMTP response (e.g., "5.1.1", "4.2.2"). First
|
|
169
|
+
# digit: 2=success, 4=temporary, 5=permanent. Second digit: category (1=address,
|
|
170
|
+
# 2=mailbox, 7=security, etc.).
|
|
171
|
+
#
|
|
172
|
+
# @return [String, nil]
|
|
173
|
+
optional :smtp_enhanced_code, String, api_name: :smtpEnhancedCode, nil?: true
|
|
174
|
+
|
|
175
|
+
# @!method initialize(id:, status:, timestamp:, timestamp_iso:, classification: nil, classification_code: nil, code: nil, details: nil, output: nil, remote_host: nil, sent_with_ssl: nil, smtp_enhanced_code: nil)
|
|
176
|
+
# Some parameter documentations has been truncated, see
|
|
177
|
+
# {ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::Delivery} for more
|
|
178
|
+
# details.
|
|
179
|
+
#
|
|
138
180
|
# @param id [String] Delivery attempt ID
|
|
139
181
|
#
|
|
140
182
|
# @param status [String] Delivery status (lowercase)
|
|
@@ -143,13 +185,46 @@ module ArkEmail
|
|
|
143
185
|
#
|
|
144
186
|
# @param timestamp_iso [Time] ISO 8601 timestamp
|
|
145
187
|
#
|
|
188
|
+
# @param classification [Symbol, ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::Delivery::Classification, nil] Bounce classification category (present for failed deliveries).
|
|
189
|
+
#
|
|
190
|
+
# @param classification_code [Integer, nil] Numeric bounce classification code for programmatic handling.
|
|
191
|
+
#
|
|
146
192
|
# @param code [Integer] SMTP response code
|
|
147
193
|
#
|
|
148
|
-
# @param details [String]
|
|
194
|
+
# @param details [String] Human-readable delivery summary. Format varies by status:
|
|
195
|
+
#
|
|
196
|
+
# @param output [String] Raw SMTP response from the receiving mail server
|
|
149
197
|
#
|
|
150
|
-
# @param
|
|
198
|
+
# @param remote_host [String, nil] Hostname of the remote mail server that processed the delivery.
|
|
151
199
|
#
|
|
152
200
|
# @param sent_with_ssl [Boolean] Whether TLS was used
|
|
201
|
+
#
|
|
202
|
+
# @param smtp_enhanced_code [String, nil] RFC 3463 enhanced status code from SMTP response (e.g., "5.1.1", "4.2.2").
|
|
203
|
+
|
|
204
|
+
# Bounce classification category (present for failed deliveries). Helps understand
|
|
205
|
+
# why delivery failed for analytics and automated handling.
|
|
206
|
+
#
|
|
207
|
+
# @see ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data::Delivery#classification
|
|
208
|
+
module Classification
|
|
209
|
+
extend ArkEmail::Internal::Type::Enum
|
|
210
|
+
|
|
211
|
+
INVALID_RECIPIENT = :invalid_recipient
|
|
212
|
+
MAILBOX_FULL = :mailbox_full
|
|
213
|
+
MESSAGE_TOO_LARGE = :message_too_large
|
|
214
|
+
SPAM_BLOCK = :spam_block
|
|
215
|
+
POLICY_VIOLATION = :policy_violation
|
|
216
|
+
NO_MAILBOX = :no_mailbox
|
|
217
|
+
NOT_ACCEPTING_MAIL = :not_accepting_mail
|
|
218
|
+
TEMPORARILY_UNAVAILABLE = :temporarily_unavailable
|
|
219
|
+
PROTOCOL_ERROR = :protocol_error
|
|
220
|
+
TLS_REQUIRED = :tls_required
|
|
221
|
+
CONNECTION_ERROR = :connection_error
|
|
222
|
+
DNS_ERROR = :dns_error
|
|
223
|
+
UNCLASSIFIED = :unclassified
|
|
224
|
+
|
|
225
|
+
# @!method self.values
|
|
226
|
+
# @return [Array<Symbol>]
|
|
227
|
+
end
|
|
153
228
|
end
|
|
154
229
|
|
|
155
230
|
# @see ArkEmail::Models::EmailRetrieveDeliveriesResponse::Data#retry_state
|
|
@@ -404,6 +404,25 @@ module ArkEmail
|
|
|
404
404
|
# @return [Time]
|
|
405
405
|
required :timestamp_iso, Time, api_name: :timestampIso
|
|
406
406
|
|
|
407
|
+
# @!attribute classification
|
|
408
|
+
# Bounce classification category (present for failed deliveries). Helps understand
|
|
409
|
+
# why delivery failed for analytics and automated handling.
|
|
410
|
+
#
|
|
411
|
+
# @return [Symbol, ArkEmail::Models::EmailRetrieveResponse::Data::Delivery::Classification, nil]
|
|
412
|
+
optional :classification,
|
|
413
|
+
enum: -> { ArkEmail::Models::EmailRetrieveResponse::Data::Delivery::Classification },
|
|
414
|
+
nil?: true
|
|
415
|
+
|
|
416
|
+
# @!attribute classification_code
|
|
417
|
+
# Numeric bounce classification code for programmatic handling. Codes:
|
|
418
|
+
# 10=invalid_recipient, 11=no_mailbox, 12=not_accepting_mail, 20=mailbox_full,
|
|
419
|
+
# 21=message_too_large, 30=spam_block, 31=policy_violation, 32=tls_required,
|
|
420
|
+
# 40=connection_error, 41=dns_error, 42=temporarily_unavailable,
|
|
421
|
+
# 50=protocol_error, 99=unclassified
|
|
422
|
+
#
|
|
423
|
+
# @return [Integer, nil]
|
|
424
|
+
optional :classification_code, Integer, api_name: :classificationCode, nil?: true
|
|
425
|
+
|
|
407
426
|
# @!attribute code
|
|
408
427
|
# SMTP response code
|
|
409
428
|
#
|
|
@@ -411,24 +430,46 @@ module ArkEmail
|
|
|
411
430
|
optional :code, Integer
|
|
412
431
|
|
|
413
432
|
# @!attribute details
|
|
414
|
-
#
|
|
433
|
+
# Human-readable delivery summary. Format varies by status:
|
|
434
|
+
#
|
|
435
|
+
# - **sent**: `Message for {recipient} accepted by {ip}:{port} ({hostname})`
|
|
436
|
+
# - **softfail/hardfail**:
|
|
437
|
+
# `{code} {classification}: Delivery to {recipient} failed at {ip}:{port} ({hostname})`
|
|
415
438
|
#
|
|
416
439
|
# @return [String, nil]
|
|
417
440
|
optional :details, String
|
|
418
441
|
|
|
419
442
|
# @!attribute output
|
|
420
|
-
# SMTP
|
|
443
|
+
# Raw SMTP response from the receiving mail server
|
|
421
444
|
#
|
|
422
445
|
# @return [String, nil]
|
|
423
446
|
optional :output, String
|
|
424
447
|
|
|
448
|
+
# @!attribute remote_host
|
|
449
|
+
# Hostname of the remote mail server that processed the delivery. Present for all
|
|
450
|
+
# delivery attempts (successful and failed).
|
|
451
|
+
#
|
|
452
|
+
# @return [String, nil]
|
|
453
|
+
optional :remote_host, String, api_name: :remoteHost, nil?: true
|
|
454
|
+
|
|
425
455
|
# @!attribute sent_with_ssl
|
|
426
456
|
# Whether TLS was used
|
|
427
457
|
#
|
|
428
458
|
# @return [Boolean, nil]
|
|
429
459
|
optional :sent_with_ssl, ArkEmail::Internal::Type::Boolean, api_name: :sentWithSsl
|
|
430
460
|
|
|
431
|
-
# @!
|
|
461
|
+
# @!attribute smtp_enhanced_code
|
|
462
|
+
# RFC 3463 enhanced status code from SMTP response (e.g., "5.1.1", "4.2.2"). First
|
|
463
|
+
# digit: 2=success, 4=temporary, 5=permanent. Second digit: category (1=address,
|
|
464
|
+
# 2=mailbox, 7=security, etc.).
|
|
465
|
+
#
|
|
466
|
+
# @return [String, nil]
|
|
467
|
+
optional :smtp_enhanced_code, String, api_name: :smtpEnhancedCode, nil?: true
|
|
468
|
+
|
|
469
|
+
# @!method initialize(id:, status:, timestamp:, timestamp_iso:, classification: nil, classification_code: nil, code: nil, details: nil, output: nil, remote_host: nil, sent_with_ssl: nil, smtp_enhanced_code: nil)
|
|
470
|
+
# Some parameter documentations has been truncated, see
|
|
471
|
+
# {ArkEmail::Models::EmailRetrieveResponse::Data::Delivery} for more details.
|
|
472
|
+
#
|
|
432
473
|
# @param id [String] Delivery attempt ID
|
|
433
474
|
#
|
|
434
475
|
# @param status [String] Delivery status (lowercase)
|
|
@@ -437,13 +478,46 @@ module ArkEmail
|
|
|
437
478
|
#
|
|
438
479
|
# @param timestamp_iso [Time] ISO 8601 timestamp
|
|
439
480
|
#
|
|
481
|
+
# @param classification [Symbol, ArkEmail::Models::EmailRetrieveResponse::Data::Delivery::Classification, nil] Bounce classification category (present for failed deliveries).
|
|
482
|
+
#
|
|
483
|
+
# @param classification_code [Integer, nil] Numeric bounce classification code for programmatic handling.
|
|
484
|
+
#
|
|
440
485
|
# @param code [Integer] SMTP response code
|
|
441
486
|
#
|
|
442
|
-
# @param details [String]
|
|
487
|
+
# @param details [String] Human-readable delivery summary. Format varies by status:
|
|
443
488
|
#
|
|
444
|
-
# @param output [String] SMTP
|
|
489
|
+
# @param output [String] Raw SMTP response from the receiving mail server
|
|
490
|
+
#
|
|
491
|
+
# @param remote_host [String, nil] Hostname of the remote mail server that processed the delivery.
|
|
445
492
|
#
|
|
446
493
|
# @param sent_with_ssl [Boolean] Whether TLS was used
|
|
494
|
+
#
|
|
495
|
+
# @param smtp_enhanced_code [String, nil] RFC 3463 enhanced status code from SMTP response (e.g., "5.1.1", "4.2.2").
|
|
496
|
+
|
|
497
|
+
# Bounce classification category (present for failed deliveries). Helps understand
|
|
498
|
+
# why delivery failed for analytics and automated handling.
|
|
499
|
+
#
|
|
500
|
+
# @see ArkEmail::Models::EmailRetrieveResponse::Data::Delivery#classification
|
|
501
|
+
module Classification
|
|
502
|
+
extend ArkEmail::Internal::Type::Enum
|
|
503
|
+
|
|
504
|
+
INVALID_RECIPIENT = :invalid_recipient
|
|
505
|
+
MAILBOX_FULL = :mailbox_full
|
|
506
|
+
MESSAGE_TOO_LARGE = :message_too_large
|
|
507
|
+
SPAM_BLOCK = :spam_block
|
|
508
|
+
POLICY_VIOLATION = :policy_violation
|
|
509
|
+
NO_MAILBOX = :no_mailbox
|
|
510
|
+
NOT_ACCEPTING_MAIL = :not_accepting_mail
|
|
511
|
+
TEMPORARILY_UNAVAILABLE = :temporarily_unavailable
|
|
512
|
+
PROTOCOL_ERROR = :protocol_error
|
|
513
|
+
TLS_REQUIRED = :tls_required
|
|
514
|
+
CONNECTION_ERROR = :connection_error
|
|
515
|
+
DNS_ERROR = :dns_error
|
|
516
|
+
UNCLASSIFIED = :unclassified
|
|
517
|
+
|
|
518
|
+
# @!method self.values
|
|
519
|
+
# @return [Array<Symbol>]
|
|
520
|
+
end
|
|
447
521
|
end
|
|
448
522
|
end
|
|
449
523
|
end
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ArkEmail
|
|
4
|
+
module Models
|
|
5
|
+
# @see ArkEmail::Resources::Tenants#list
|
|
6
|
+
class Tenant < ArkEmail::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# Unique identifier for the tenant
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute created_at
|
|
14
|
+
# When the tenant was created
|
|
15
|
+
#
|
|
16
|
+
# @return [Time]
|
|
17
|
+
required :created_at, Time
|
|
18
|
+
|
|
19
|
+
# @!attribute metadata
|
|
20
|
+
# Custom key-value pairs for storing additional data
|
|
21
|
+
#
|
|
22
|
+
# @return [Hash{Symbol=>String, Float, Boolean, nil}]
|
|
23
|
+
required :metadata, -> { ArkEmail::Internal::Type::HashOf[union: ArkEmail::Tenant::Metadata, nil?: true] }
|
|
24
|
+
|
|
25
|
+
# @!attribute name
|
|
26
|
+
# Display name for the tenant
|
|
27
|
+
#
|
|
28
|
+
# @return [String]
|
|
29
|
+
required :name, String
|
|
30
|
+
|
|
31
|
+
# @!attribute status
|
|
32
|
+
# Current status of the tenant:
|
|
33
|
+
#
|
|
34
|
+
# - `active` - Normal operation
|
|
35
|
+
# - `suspended` - Temporarily disabled
|
|
36
|
+
# - `archived` - Soft-deleted
|
|
37
|
+
#
|
|
38
|
+
# @return [Symbol, ArkEmail::Models::Tenant::Status]
|
|
39
|
+
required :status, enum: -> { ArkEmail::Tenant::Status }
|
|
40
|
+
|
|
41
|
+
# @!attribute updated_at
|
|
42
|
+
# When the tenant was last updated
|
|
43
|
+
#
|
|
44
|
+
# @return [Time]
|
|
45
|
+
required :updated_at, Time
|
|
46
|
+
|
|
47
|
+
# @!method initialize(id:, created_at:, metadata:, name:, status:, updated_at:)
|
|
48
|
+
# Some parameter documentations has been truncated, see {ArkEmail::Models::Tenant}
|
|
49
|
+
# for more details.
|
|
50
|
+
#
|
|
51
|
+
# @param id [String] Unique identifier for the tenant
|
|
52
|
+
#
|
|
53
|
+
# @param created_at [Time] When the tenant was created
|
|
54
|
+
#
|
|
55
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean, nil}] Custom key-value pairs for storing additional data
|
|
56
|
+
#
|
|
57
|
+
# @param name [String] Display name for the tenant
|
|
58
|
+
#
|
|
59
|
+
# @param status [Symbol, ArkEmail::Models::Tenant::Status] Current status of the tenant:
|
|
60
|
+
#
|
|
61
|
+
# @param updated_at [Time] When the tenant was last updated
|
|
62
|
+
|
|
63
|
+
module Metadata
|
|
64
|
+
extend ArkEmail::Internal::Type::Union
|
|
65
|
+
|
|
66
|
+
variant String
|
|
67
|
+
|
|
68
|
+
variant Float
|
|
69
|
+
|
|
70
|
+
variant ArkEmail::Internal::Type::Boolean
|
|
71
|
+
|
|
72
|
+
# @!method self.variants
|
|
73
|
+
# @return [Array(String, Float, Boolean)]
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Current status of the tenant:
|
|
77
|
+
#
|
|
78
|
+
# - `active` - Normal operation
|
|
79
|
+
# - `suspended` - Temporarily disabled
|
|
80
|
+
# - `archived` - Soft-deleted
|
|
81
|
+
#
|
|
82
|
+
# @see ArkEmail::Models::Tenant#status
|
|
83
|
+
module Status
|
|
84
|
+
extend ArkEmail::Internal::Type::Enum
|
|
85
|
+
|
|
86
|
+
ACTIVE = :active
|
|
87
|
+
SUSPENDED = :suspended
|
|
88
|
+
ARCHIVED = :archived
|
|
89
|
+
|
|
90
|
+
# @!method self.values
|
|
91
|
+
# @return [Array<Symbol>]
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ArkEmail
|
|
4
|
+
module Models
|
|
5
|
+
# @see ArkEmail::Resources::Tenants#create
|
|
6
|
+
class TenantCreateParams < ArkEmail::Internal::Type::BaseModel
|
|
7
|
+
extend ArkEmail::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include ArkEmail::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute name
|
|
11
|
+
# Display name for the tenant (e.g., your customer's company name)
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :name, String
|
|
15
|
+
|
|
16
|
+
# @!attribute metadata
|
|
17
|
+
# Custom key-value pairs. Useful for storing references to your internal systems.
|
|
18
|
+
#
|
|
19
|
+
# **Limits:**
|
|
20
|
+
#
|
|
21
|
+
# - Max 50 keys
|
|
22
|
+
# - Key names max 40 characters
|
|
23
|
+
# - String values max 500 characters
|
|
24
|
+
# - Total size max 8KB
|
|
25
|
+
#
|
|
26
|
+
# @return [Hash{Symbol=>String, Float, Boolean, nil}, nil]
|
|
27
|
+
optional :metadata,
|
|
28
|
+
-> {
|
|
29
|
+
ArkEmail::Internal::Type::HashOf[union: ArkEmail::TenantCreateParams::Metadata, nil?: true]
|
|
30
|
+
},
|
|
31
|
+
nil?: true
|
|
32
|
+
|
|
33
|
+
# @!method initialize(name:, metadata: nil, request_options: {})
|
|
34
|
+
# Some parameter documentations has been truncated, see
|
|
35
|
+
# {ArkEmail::Models::TenantCreateParams} for more details.
|
|
36
|
+
#
|
|
37
|
+
# @param name [String] Display name for the tenant (e.g., your customer's company name)
|
|
38
|
+
#
|
|
39
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean, nil}, nil] Custom key-value pairs. Useful for storing references to your internal systems.
|
|
40
|
+
#
|
|
41
|
+
# @param request_options [ArkEmail::RequestOptions, Hash{Symbol=>Object}]
|
|
42
|
+
|
|
43
|
+
module Metadata
|
|
44
|
+
extend ArkEmail::Internal::Type::Union
|
|
45
|
+
|
|
46
|
+
variant String
|
|
47
|
+
|
|
48
|
+
variant Float
|
|
49
|
+
|
|
50
|
+
variant ArkEmail::Internal::Type::Boolean
|
|
51
|
+
|
|
52
|
+
# @!method self.variants
|
|
53
|
+
# @return [Array(String, Float, Boolean)]
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ArkEmail
|
|
4
|
+
module Models
|
|
5
|
+
# @see ArkEmail::Resources::Tenants#create
|
|
6
|
+
class TenantCreateResponse < ArkEmail::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute data
|
|
8
|
+
#
|
|
9
|
+
# @return [ArkEmail::Models::Tenant]
|
|
10
|
+
required :data, -> { ArkEmail::Tenant }
|
|
11
|
+
|
|
12
|
+
# @!attribute meta
|
|
13
|
+
#
|
|
14
|
+
# @return [ArkEmail::Models::APIMeta]
|
|
15
|
+
required :meta, -> { ArkEmail::APIMeta }
|
|
16
|
+
|
|
17
|
+
# @!attribute success
|
|
18
|
+
#
|
|
19
|
+
# @return [Boolean, true]
|
|
20
|
+
required :success, const: true
|
|
21
|
+
|
|
22
|
+
# @!method initialize(data:, meta:, success: true)
|
|
23
|
+
# @param data [ArkEmail::Models::Tenant]
|
|
24
|
+
# @param meta [ArkEmail::Models::APIMeta]
|
|
25
|
+
# @param success [Boolean, true]
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ArkEmail
|
|
4
|
+
module Models
|
|
5
|
+
# @see ArkEmail::Resources::Tenants#delete
|
|
6
|
+
class TenantDeleteParams < ArkEmail::Internal::Type::BaseModel
|
|
7
|
+
extend ArkEmail::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include ArkEmail::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!method initialize(request_options: {})
|
|
11
|
+
# @param request_options [ArkEmail::RequestOptions, Hash{Symbol=>Object}]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ArkEmail
|
|
4
|
+
module Models
|
|
5
|
+
# @see ArkEmail::Resources::Tenants#delete
|
|
6
|
+
class TenantDeleteResponse < ArkEmail::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute data
|
|
8
|
+
#
|
|
9
|
+
# @return [ArkEmail::Models::TenantDeleteResponse::Data]
|
|
10
|
+
required :data, -> { ArkEmail::Models::TenantDeleteResponse::Data }
|
|
11
|
+
|
|
12
|
+
# @!attribute meta
|
|
13
|
+
#
|
|
14
|
+
# @return [ArkEmail::Models::APIMeta]
|
|
15
|
+
required :meta, -> { ArkEmail::APIMeta }
|
|
16
|
+
|
|
17
|
+
# @!attribute success
|
|
18
|
+
#
|
|
19
|
+
# @return [Boolean, true]
|
|
20
|
+
required :success, const: true
|
|
21
|
+
|
|
22
|
+
# @!method initialize(data:, meta:, success: true)
|
|
23
|
+
# @param data [ArkEmail::Models::TenantDeleteResponse::Data]
|
|
24
|
+
# @param meta [ArkEmail::Models::APIMeta]
|
|
25
|
+
# @param success [Boolean, true]
|
|
26
|
+
|
|
27
|
+
# @see ArkEmail::Models::TenantDeleteResponse#data
|
|
28
|
+
class Data < ArkEmail::Internal::Type::BaseModel
|
|
29
|
+
# @!attribute deleted
|
|
30
|
+
#
|
|
31
|
+
# @return [Boolean, true]
|
|
32
|
+
required :deleted, const: true
|
|
33
|
+
|
|
34
|
+
# @!method initialize(deleted: true)
|
|
35
|
+
# @param deleted [Boolean, true]
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ArkEmail
|
|
4
|
+
module Models
|
|
5
|
+
# @see ArkEmail::Resources::Tenants#list
|
|
6
|
+
class TenantListParams < ArkEmail::Internal::Type::BaseModel
|
|
7
|
+
extend ArkEmail::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include ArkEmail::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute page
|
|
11
|
+
# Page number (1-indexed)
|
|
12
|
+
#
|
|
13
|
+
# @return [Integer, nil]
|
|
14
|
+
optional :page, Integer
|
|
15
|
+
|
|
16
|
+
# @!attribute per_page
|
|
17
|
+
# Number of items per page (max 100)
|
|
18
|
+
#
|
|
19
|
+
# @return [Integer, nil]
|
|
20
|
+
optional :per_page, Integer
|
|
21
|
+
|
|
22
|
+
# @!attribute status
|
|
23
|
+
# Filter by tenant status
|
|
24
|
+
#
|
|
25
|
+
# @return [Symbol, ArkEmail::Models::TenantListParams::Status, nil]
|
|
26
|
+
optional :status, enum: -> { ArkEmail::TenantListParams::Status }
|
|
27
|
+
|
|
28
|
+
# @!method initialize(page: nil, per_page: nil, status: nil, request_options: {})
|
|
29
|
+
# @param page [Integer] Page number (1-indexed)
|
|
30
|
+
#
|
|
31
|
+
# @param per_page [Integer] Number of items per page (max 100)
|
|
32
|
+
#
|
|
33
|
+
# @param status [Symbol, ArkEmail::Models::TenantListParams::Status] Filter by tenant status
|
|
34
|
+
#
|
|
35
|
+
# @param request_options [ArkEmail::RequestOptions, Hash{Symbol=>Object}]
|
|
36
|
+
|
|
37
|
+
# Filter by tenant status
|
|
38
|
+
module Status
|
|
39
|
+
extend ArkEmail::Internal::Type::Enum
|
|
40
|
+
|
|
41
|
+
ACTIVE = :active
|
|
42
|
+
SUSPENDED = :suspended
|
|
43
|
+
ARCHIVED = :archived
|
|
44
|
+
|
|
45
|
+
# @!method self.values
|
|
46
|
+
# @return [Array<Symbol>]
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ArkEmail
|
|
4
|
+
module Models
|
|
5
|
+
# @see ArkEmail::Resources::Tenants#retrieve
|
|
6
|
+
class TenantRetrieveParams < ArkEmail::Internal::Type::BaseModel
|
|
7
|
+
extend ArkEmail::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include ArkEmail::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!method initialize(request_options: {})
|
|
11
|
+
# @param request_options [ArkEmail::RequestOptions, Hash{Symbol=>Object}]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ArkEmail
|
|
4
|
+
module Models
|
|
5
|
+
# @see ArkEmail::Resources::Tenants#retrieve
|
|
6
|
+
class TenantRetrieveResponse < ArkEmail::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute data
|
|
8
|
+
#
|
|
9
|
+
# @return [ArkEmail::Models::Tenant]
|
|
10
|
+
required :data, -> { ArkEmail::Tenant }
|
|
11
|
+
|
|
12
|
+
# @!attribute meta
|
|
13
|
+
#
|
|
14
|
+
# @return [ArkEmail::Models::APIMeta]
|
|
15
|
+
required :meta, -> { ArkEmail::APIMeta }
|
|
16
|
+
|
|
17
|
+
# @!attribute success
|
|
18
|
+
#
|
|
19
|
+
# @return [Boolean, true]
|
|
20
|
+
required :success, const: true
|
|
21
|
+
|
|
22
|
+
# @!method initialize(data:, meta:, success: true)
|
|
23
|
+
# @param data [ArkEmail::Models::Tenant]
|
|
24
|
+
# @param meta [ArkEmail::Models::APIMeta]
|
|
25
|
+
# @param success [Boolean, true]
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|