zyphr 0.1.73 → 0.1.75
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/README.md +1 -0
- data/docs/InboundEmailApi.md +15 -8
- data/docs/Inbox.md +8 -2
- data/docs/InboxListResponse.md +1 -1
- data/docs/InboxListResponseMeta.md +22 -0
- data/docs/UpdateInboxRequest.md +3 -1
- data/lib/zyphr/api/inbound_email_api.rb +12 -6
- data/lib/zyphr/models/inbox.rb +35 -5
- data/lib/zyphr/models/inbox_list_response.rb +1 -1
- data/lib/zyphr/models/inbox_list_response_meta.rb +246 -0
- data/lib/zyphr/models/update_inbox_request.rb +15 -5
- data/lib/zyphr.rb +1 -0
- data/spec/api/inbound_email_api_spec.rb +5 -3
- data/spec/models/inbox_list_response_meta_spec.rb +48 -0
- data/spec/models/inbox_spec.rb +18 -0
- data/spec/models/update_inbox_request_spec.rb +6 -0
- data/zyphr.gemspec +1 -1
- metadata +5 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 22710deb1992994b8cfaa5e510149b44ff35d1c73c17913f2ae87bf0fe326720
|
|
4
|
+
data.tar.gz: 2cd4167b6f8fbb06b2bac2c49e976cbb5a8b1466926792c98f6092d4315974bd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7371e2b95cc27ff8d01d173524603f8c5f5a3df4f13f7e1bfbafda9dc084d1675f70103b8eba938497e2258833d012399e94da9a8dd6076e1f09da20d9a682ca
|
|
7
|
+
data.tar.gz: 47554541353f967da8f588ef51c29eaaa233fd129fd53fb5ab4cfa067d9a7e0fc056968315b039b51b2b1b75fe53d2c1c878f72e71dbbd958773a6883e2da435
|
data/README.md
CHANGED
|
@@ -553,6 +553,7 @@ Class | Method | HTTP request | Description
|
|
|
553
553
|
- [Zyphr::Inbox](docs/Inbox.md)
|
|
554
554
|
- [Zyphr::InboxListMeta](docs/InboxListMeta.md)
|
|
555
555
|
- [Zyphr::InboxListResponse](docs/InboxListResponse.md)
|
|
556
|
+
- [Zyphr::InboxListResponseMeta](docs/InboxListResponseMeta.md)
|
|
556
557
|
- [Zyphr::InboxNotificationResponse](docs/InboxNotificationResponse.md)
|
|
557
558
|
- [Zyphr::InboxResponse](docs/InboxResponse.md)
|
|
558
559
|
- [Zyphr::InviteEndUser200Response](docs/InviteEndUser200Response.md)
|
data/docs/InboundEmailApi.md
CHANGED
|
@@ -21,7 +21,7 @@ All URIs are relative to *https://api.zyphr.dev/v1*
|
|
|
21
21
|
|
|
22
22
|
Create an inbox
|
|
23
23
|
|
|
24
|
-
Create a named receiving address, `<local_part>@inbound.<domain>`, on a domain with inbound email enabled.
|
|
24
|
+
Create a named receiving address, `<local_part>@inbound.<domain>`, on a domain with inbound email enabled. Mail is routed to the named inbox matching its address, otherwise to the domain's catch-all inbox (`*@inbound.<domain>`, created when inbound is enabled); with the catch-all disabled it is dropped. Test-mode keys cannot create, update or delete inboxes, because inboxes change live mail routing. Requires a plan with inbound email (Starter or higher).
|
|
25
25
|
|
|
26
26
|
### Examples
|
|
27
27
|
|
|
@@ -92,7 +92,7 @@ end
|
|
|
92
92
|
|
|
93
93
|
Delete an inbox
|
|
94
94
|
|
|
95
|
-
Delete
|
|
95
|
+
Delete a named inbox. Mail it already received is kept (its `inbox_id` becomes null), and new mail to its address goes to the catch-all if enabled. The catch-all cannot be deleted (422 `catch_all_not_deletable`); disable it with `PATCH { \"enabled\": false }`.
|
|
96
96
|
|
|
97
97
|
### Examples
|
|
98
98
|
|
|
@@ -394,6 +394,7 @@ api_instance = Zyphr::InboundEmailApi.new
|
|
|
394
394
|
opts = {
|
|
395
395
|
status: 'received', # String |
|
|
396
396
|
to: 'to_example', # String | Filter by receiving address
|
|
397
|
+
inbox_id: '38400000-8cf0-11bd-b23e-10b96e4ef00d', # String | Only mail that landed in this inbox (see /inboxes)
|
|
397
398
|
include_withheld: true, # Boolean | Include quarantined/dropped mail
|
|
398
399
|
limit: 56, # Integer |
|
|
399
400
|
offset: 56 # Integer |
|
|
@@ -432,6 +433,7 @@ end
|
|
|
432
433
|
| ---- | ---- | ----------- | ----- |
|
|
433
434
|
| **status** | **String** | | [optional] |
|
|
434
435
|
| **to** | **String** | Filter by receiving address | [optional] |
|
|
436
|
+
| **inbox_id** | **String** | Only mail that landed in this inbox (see /inboxes) | [optional] |
|
|
435
437
|
| **include_withheld** | **Boolean** | Include quarantined/dropped mail | [optional] |
|
|
436
438
|
| **limit** | **Integer** | | [optional][default to 50] |
|
|
437
439
|
| **offset** | **Integer** | | [optional][default to 0] |
|
|
@@ -452,7 +454,7 @@ end
|
|
|
452
454
|
|
|
453
455
|
## list_inboxes
|
|
454
456
|
|
|
455
|
-
> <InboxListResponse> list_inboxes
|
|
457
|
+
> <InboxListResponse> list_inboxes(opts)
|
|
456
458
|
|
|
457
459
|
List inboxes
|
|
458
460
|
|
|
@@ -470,10 +472,13 @@ Zyphr.configure do |config|
|
|
|
470
472
|
end
|
|
471
473
|
|
|
472
474
|
api_instance = Zyphr::InboundEmailApi.new
|
|
475
|
+
opts = {
|
|
476
|
+
include_counts: true # Boolean | Add `received_count` to each inbox and `meta.received_total` (all delivered mail, including mail with no inbox). Counts use the same filter as the default received-email list.
|
|
477
|
+
}
|
|
473
478
|
|
|
474
479
|
begin
|
|
475
480
|
# List inboxes
|
|
476
|
-
result = api_instance.list_inboxes
|
|
481
|
+
result = api_instance.list_inboxes(opts)
|
|
477
482
|
p result
|
|
478
483
|
rescue Zyphr::ApiError => e
|
|
479
484
|
puts "Error when calling InboundEmailApi->list_inboxes: #{e}"
|
|
@@ -484,12 +489,12 @@ end
|
|
|
484
489
|
|
|
485
490
|
This returns an Array which contains the response data, status code and headers.
|
|
486
491
|
|
|
487
|
-
> <Array(<InboxListResponse>, Integer, Hash)> list_inboxes_with_http_info
|
|
492
|
+
> <Array(<InboxListResponse>, Integer, Hash)> list_inboxes_with_http_info(opts)
|
|
488
493
|
|
|
489
494
|
```ruby
|
|
490
495
|
begin
|
|
491
496
|
# List inboxes
|
|
492
|
-
data, status_code, headers = api_instance.list_inboxes_with_http_info
|
|
497
|
+
data, status_code, headers = api_instance.list_inboxes_with_http_info(opts)
|
|
493
498
|
p status_code # => 2xx
|
|
494
499
|
p headers # => { ... }
|
|
495
500
|
p data # => <InboxListResponse>
|
|
@@ -500,7 +505,9 @@ end
|
|
|
500
505
|
|
|
501
506
|
### Parameters
|
|
502
507
|
|
|
503
|
-
|
|
508
|
+
| Name | Type | Description | Notes |
|
|
509
|
+
| ---- | ---- | ----------- | ----- |
|
|
510
|
+
| **include_counts** | **Boolean** | Add `received_count` to each inbox and `meta.received_total` (all delivered mail, including mail with no inbox). Counts use the same filter as the default received-email list. | [optional] |
|
|
504
511
|
|
|
505
512
|
### Return type
|
|
506
513
|
|
|
@@ -599,7 +606,7 @@ end
|
|
|
599
606
|
|
|
600
607
|
Update an inbox
|
|
601
608
|
|
|
602
|
-
Rename the inbox or change the display name recipients see. The address cannot change.
|
|
609
|
+
Rename the inbox or change the display name recipients see. The address cannot change. On the catch-all, `enabled: false` turns on strict addresses: mail to any address without a named inbox is dropped until it is re-enabled. Named inboxes cannot be disabled (422 `not_catch_all`).
|
|
603
610
|
|
|
604
611
|
### Examples
|
|
605
612
|
|
data/docs/Inbox.md
CHANGED
|
@@ -5,12 +5,15 @@
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **id** | **String** | | [optional] |
|
|
8
|
-
| **email_address** | **String** | The inbox's receiving address | [optional] |
|
|
8
|
+
| **email_address** | **String** | The inbox's receiving address; `*@inbound.<domain>` for the catch-all | [optional] |
|
|
9
|
+
| **is_catch_all** | **Boolean** | True for the domain's catch-all, which receives mail to any address no named inbox matches | [optional] |
|
|
10
|
+
| **enabled** | **Boolean** | Always true for named inboxes. False on a disabled catch-all (strict addresses). | [optional] |
|
|
9
11
|
| **domain_id** | **String** | | [optional] |
|
|
10
12
|
| **name** | **String** | Internal name (defaults to the address) | [optional] |
|
|
11
13
|
| **from_name** | **String** | Display name recipients see on replies | [optional] |
|
|
12
14
|
| **created_at** | **Time** | | [optional] |
|
|
13
15
|
| **updated_at** | **Time** | | [optional] |
|
|
16
|
+
| **received_count** | **Integer** | Delivered mail in this inbox. Only with `include_counts=true`. | [optional] |
|
|
14
17
|
|
|
15
18
|
## Example
|
|
16
19
|
|
|
@@ -20,11 +23,14 @@ require 'zyphr'
|
|
|
20
23
|
instance = Zyphr::Inbox.new(
|
|
21
24
|
id: null,
|
|
22
25
|
email_address: support@inbound.acme.com,
|
|
26
|
+
is_catch_all: null,
|
|
27
|
+
enabled: null,
|
|
23
28
|
domain_id: null,
|
|
24
29
|
name: Support,
|
|
25
30
|
from_name: Acme Support,
|
|
26
31
|
created_at: null,
|
|
27
|
-
updated_at: null
|
|
32
|
+
updated_at: null,
|
|
33
|
+
received_count: null
|
|
28
34
|
)
|
|
29
35
|
```
|
|
30
36
|
|
data/docs/InboxListResponse.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **data** | [**Array<InAppNotification>**](InAppNotification.md) | | [optional] |
|
|
8
|
-
| **meta** | [**
|
|
8
|
+
| **meta** | [**InboxListResponseMeta**](InboxListResponseMeta.md) | | [optional] |
|
|
9
9
|
|
|
10
10
|
## Example
|
|
11
11
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Zyphr::InboxListResponseMeta
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **request_id** | **String** | | [optional] |
|
|
8
|
+
| **total** | **Integer** | | [optional] |
|
|
9
|
+
| **received_total** | **Integer** | All delivered mail in the project, including mail with no inbox. Only with `include_counts=true`. | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'zyphr'
|
|
15
|
+
|
|
16
|
+
instance = Zyphr::InboxListResponseMeta.new(
|
|
17
|
+
request_id: req_abc123,
|
|
18
|
+
total: null,
|
|
19
|
+
received_total: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
data/docs/UpdateInboxRequest.md
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **name** | **String** | | [optional] |
|
|
8
8
|
| **from_name** | **String** | | [optional] |
|
|
9
|
+
| **enabled** | **Boolean** | Catch-all only. False drops mail to addresses without a named inbox; true accepts every address again. | [optional] |
|
|
9
10
|
|
|
10
11
|
## Example
|
|
11
12
|
|
|
@@ -14,7 +15,8 @@ require 'zyphr'
|
|
|
14
15
|
|
|
15
16
|
instance = Zyphr::UpdateInboxRequest.new(
|
|
16
17
|
name: null,
|
|
17
|
-
from_name: null
|
|
18
|
+
from_name: null,
|
|
19
|
+
enabled: null
|
|
18
20
|
)
|
|
19
21
|
```
|
|
20
22
|
|
|
@@ -20,7 +20,7 @@ module Zyphr
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Create an inbox
|
|
23
|
-
# Create a named receiving address, `<local_part>@inbound.<domain>`, on a domain with inbound email enabled.
|
|
23
|
+
# Create a named receiving address, `<local_part>@inbound.<domain>`, on a domain with inbound email enabled. Mail is routed to the named inbox matching its address, otherwise to the domain's catch-all inbox (`*@inbound.<domain>`, created when inbound is enabled); with the catch-all disabled it is dropped. Test-mode keys cannot create, update or delete inboxes, because inboxes change live mail routing. Requires a plan with inbound email (Starter or higher).
|
|
24
24
|
# @param create_inbox_request [CreateInboxRequest]
|
|
25
25
|
# @param [Hash] opts the optional parameters
|
|
26
26
|
# @return [InboxResponse]
|
|
@@ -30,7 +30,7 @@ module Zyphr
|
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
# Create an inbox
|
|
33
|
-
# Create a named receiving address, `<local_part>@inbound.<domain>`, on a domain with inbound email enabled.
|
|
33
|
+
# Create a named receiving address, `<local_part>@inbound.<domain>`, on a domain with inbound email enabled. Mail is routed to the named inbox matching its address, otherwise to the domain's catch-all inbox (`*@inbound.<domain>`, created when inbound is enabled); with the catch-all disabled it is dropped. Test-mode keys cannot create, update or delete inboxes, because inboxes change live mail routing. Requires a plan with inbound email (Starter or higher).
|
|
34
34
|
# @param create_inbox_request [CreateInboxRequest]
|
|
35
35
|
# @param [Hash] opts the optional parameters
|
|
36
36
|
# @return [Array<(InboxResponse, Integer, Hash)>] InboxResponse data, response status code and response headers
|
|
@@ -88,7 +88,7 @@ module Zyphr
|
|
|
88
88
|
end
|
|
89
89
|
|
|
90
90
|
# Delete an inbox
|
|
91
|
-
# Delete
|
|
91
|
+
# Delete a named inbox. Mail it already received is kept (its `inbox_id` becomes null), and new mail to its address goes to the catch-all if enabled. The catch-all cannot be deleted (422 `catch_all_not_deletable`); disable it with `PATCH { \"enabled\": false }`.
|
|
92
92
|
# @param id [String]
|
|
93
93
|
# @param [Hash] opts the optional parameters
|
|
94
94
|
# @return [nil]
|
|
@@ -98,7 +98,7 @@ module Zyphr
|
|
|
98
98
|
end
|
|
99
99
|
|
|
100
100
|
# Delete an inbox
|
|
101
|
-
# Delete
|
|
101
|
+
# Delete a named inbox. Mail it already received is kept (its `inbox_id` becomes null), and new mail to its address goes to the catch-all if enabled. The catch-all cannot be deleted (422 `catch_all_not_deletable`); disable it with `PATCH { \"enabled\": false }`.
|
|
102
102
|
# @param id [String]
|
|
103
103
|
# @param [Hash] opts the optional parameters
|
|
104
104
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
@@ -346,6 +346,7 @@ module Zyphr
|
|
|
346
346
|
# @param [Hash] opts the optional parameters
|
|
347
347
|
# @option opts [String] :status
|
|
348
348
|
# @option opts [String] :to Filter by receiving address
|
|
349
|
+
# @option opts [String] :inbox_id Only mail that landed in this inbox (see /inboxes)
|
|
349
350
|
# @option opts [Boolean] :include_withheld Include quarantined/dropped mail
|
|
350
351
|
# @option opts [Integer] :limit (default to 50)
|
|
351
352
|
# @option opts [Integer] :offset (default to 0)
|
|
@@ -360,6 +361,7 @@ module Zyphr
|
|
|
360
361
|
# @param [Hash] opts the optional parameters
|
|
361
362
|
# @option opts [String] :status
|
|
362
363
|
# @option opts [String] :to Filter by receiving address
|
|
364
|
+
# @option opts [String] :inbox_id Only mail that landed in this inbox (see /inboxes)
|
|
363
365
|
# @option opts [Boolean] :include_withheld Include quarantined/dropped mail
|
|
364
366
|
# @option opts [Integer] :limit (default to 50)
|
|
365
367
|
# @option opts [Integer] :offset (default to 0)
|
|
@@ -383,6 +385,7 @@ module Zyphr
|
|
|
383
385
|
query_params = opts[:query_params] || {}
|
|
384
386
|
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
385
387
|
query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
|
|
388
|
+
query_params[:'inbox_id'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
|
|
386
389
|
query_params[:'include_withheld'] = opts[:'include_withheld'] if !opts[:'include_withheld'].nil?
|
|
387
390
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
388
391
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
@@ -423,6 +426,7 @@ module Zyphr
|
|
|
423
426
|
|
|
424
427
|
# List inboxes
|
|
425
428
|
# @param [Hash] opts the optional parameters
|
|
429
|
+
# @option opts [Boolean] :include_counts Add `received_count` to each inbox and `meta.received_total` (all delivered mail, including mail with no inbox). Counts use the same filter as the default received-email list.
|
|
426
430
|
# @return [InboxListResponse]
|
|
427
431
|
def list_inboxes(opts = {})
|
|
428
432
|
data, _status_code, _headers = list_inboxes_with_http_info(opts)
|
|
@@ -431,6 +435,7 @@ module Zyphr
|
|
|
431
435
|
|
|
432
436
|
# List inboxes
|
|
433
437
|
# @param [Hash] opts the optional parameters
|
|
438
|
+
# @option opts [Boolean] :include_counts Add `received_count` to each inbox and `meta.received_total` (all delivered mail, including mail with no inbox). Counts use the same filter as the default received-email list.
|
|
434
439
|
# @return [Array<(InboxListResponse, Integer, Hash)>] InboxListResponse data, response status code and response headers
|
|
435
440
|
def list_inboxes_with_http_info(opts = {})
|
|
436
441
|
if @api_client.config.debugging
|
|
@@ -441,6 +446,7 @@ module Zyphr
|
|
|
441
446
|
|
|
442
447
|
# query parameters
|
|
443
448
|
query_params = opts[:query_params] || {}
|
|
449
|
+
query_params[:'include_counts'] = opts[:'include_counts'] if !opts[:'include_counts'].nil?
|
|
444
450
|
|
|
445
451
|
# header parameters
|
|
446
452
|
header_params = opts[:header_params] || {}
|
|
@@ -554,7 +560,7 @@ module Zyphr
|
|
|
554
560
|
end
|
|
555
561
|
|
|
556
562
|
# Update an inbox
|
|
557
|
-
# Rename the inbox or change the display name recipients see. The address cannot change.
|
|
563
|
+
# Rename the inbox or change the display name recipients see. The address cannot change. On the catch-all, `enabled: false` turns on strict addresses: mail to any address without a named inbox is dropped until it is re-enabled. Named inboxes cannot be disabled (422 `not_catch_all`).
|
|
558
564
|
# @param id [String]
|
|
559
565
|
# @param update_inbox_request [UpdateInboxRequest]
|
|
560
566
|
# @param [Hash] opts the optional parameters
|
|
@@ -565,7 +571,7 @@ module Zyphr
|
|
|
565
571
|
end
|
|
566
572
|
|
|
567
573
|
# Update an inbox
|
|
568
|
-
# Rename the inbox or change the display name recipients see. The address cannot change.
|
|
574
|
+
# Rename the inbox or change the display name recipients see. The address cannot change. On the catch-all, `enabled: false` turns on strict addresses: mail to any address without a named inbox is dropped until it is re-enabled. Named inboxes cannot be disabled (422 `not_catch_all`).
|
|
569
575
|
# @param id [String]
|
|
570
576
|
# @param update_inbox_request [UpdateInboxRequest]
|
|
571
577
|
# @param [Hash] opts the optional parameters
|
data/lib/zyphr/models/inbox.rb
CHANGED
|
@@ -17,9 +17,15 @@ module Zyphr
|
|
|
17
17
|
class Inbox
|
|
18
18
|
attr_accessor :id
|
|
19
19
|
|
|
20
|
-
# The inbox's receiving address
|
|
20
|
+
# The inbox's receiving address; `*@inbound.<domain>` for the catch-all
|
|
21
21
|
attr_accessor :email_address
|
|
22
22
|
|
|
23
|
+
# True for the domain's catch-all, which receives mail to any address no named inbox matches
|
|
24
|
+
attr_accessor :is_catch_all
|
|
25
|
+
|
|
26
|
+
# Always true for named inboxes. False on a disabled catch-all (strict addresses).
|
|
27
|
+
attr_accessor :enabled
|
|
28
|
+
|
|
23
29
|
attr_accessor :domain_id
|
|
24
30
|
|
|
25
31
|
# Internal name (defaults to the address)
|
|
@@ -32,16 +38,22 @@ module Zyphr
|
|
|
32
38
|
|
|
33
39
|
attr_accessor :updated_at
|
|
34
40
|
|
|
41
|
+
# Delivered mail in this inbox. Only with `include_counts=true`.
|
|
42
|
+
attr_accessor :received_count
|
|
43
|
+
|
|
35
44
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
36
45
|
def self.attribute_map
|
|
37
46
|
{
|
|
38
47
|
:'id' => :'id',
|
|
39
48
|
:'email_address' => :'email_address',
|
|
49
|
+
:'is_catch_all' => :'is_catch_all',
|
|
50
|
+
:'enabled' => :'enabled',
|
|
40
51
|
:'domain_id' => :'domain_id',
|
|
41
52
|
:'name' => :'name',
|
|
42
53
|
:'from_name' => :'from_name',
|
|
43
54
|
:'created_at' => :'created_at',
|
|
44
|
-
:'updated_at' => :'updated_at'
|
|
55
|
+
:'updated_at' => :'updated_at',
|
|
56
|
+
:'received_count' => :'received_count'
|
|
45
57
|
}
|
|
46
58
|
end
|
|
47
59
|
|
|
@@ -60,11 +72,14 @@ module Zyphr
|
|
|
60
72
|
{
|
|
61
73
|
:'id' => :'String',
|
|
62
74
|
:'email_address' => :'String',
|
|
75
|
+
:'is_catch_all' => :'Boolean',
|
|
76
|
+
:'enabled' => :'Boolean',
|
|
63
77
|
:'domain_id' => :'String',
|
|
64
78
|
:'name' => :'String',
|
|
65
79
|
:'from_name' => :'String',
|
|
66
80
|
:'created_at' => :'Time',
|
|
67
|
-
:'updated_at' => :'Time'
|
|
81
|
+
:'updated_at' => :'Time',
|
|
82
|
+
:'received_count' => :'Integer'
|
|
68
83
|
}
|
|
69
84
|
end
|
|
70
85
|
|
|
@@ -99,6 +114,14 @@ module Zyphr
|
|
|
99
114
|
self.email_address = attributes[:'email_address']
|
|
100
115
|
end
|
|
101
116
|
|
|
117
|
+
if attributes.key?(:'is_catch_all')
|
|
118
|
+
self.is_catch_all = attributes[:'is_catch_all']
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if attributes.key?(:'enabled')
|
|
122
|
+
self.enabled = attributes[:'enabled']
|
|
123
|
+
end
|
|
124
|
+
|
|
102
125
|
if attributes.key?(:'domain_id')
|
|
103
126
|
self.domain_id = attributes[:'domain_id']
|
|
104
127
|
end
|
|
@@ -118,6 +141,10 @@ module Zyphr
|
|
|
118
141
|
if attributes.key?(:'updated_at')
|
|
119
142
|
self.updated_at = attributes[:'updated_at']
|
|
120
143
|
end
|
|
144
|
+
|
|
145
|
+
if attributes.key?(:'received_count')
|
|
146
|
+
self.received_count = attributes[:'received_count']
|
|
147
|
+
end
|
|
121
148
|
end
|
|
122
149
|
|
|
123
150
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -142,11 +169,14 @@ module Zyphr
|
|
|
142
169
|
self.class == o.class &&
|
|
143
170
|
id == o.id &&
|
|
144
171
|
email_address == o.email_address &&
|
|
172
|
+
is_catch_all == o.is_catch_all &&
|
|
173
|
+
enabled == o.enabled &&
|
|
145
174
|
domain_id == o.domain_id &&
|
|
146
175
|
name == o.name &&
|
|
147
176
|
from_name == o.from_name &&
|
|
148
177
|
created_at == o.created_at &&
|
|
149
|
-
updated_at == o.updated_at
|
|
178
|
+
updated_at == o.updated_at &&
|
|
179
|
+
received_count == o.received_count
|
|
150
180
|
end
|
|
151
181
|
|
|
152
182
|
# @see the `==` method
|
|
@@ -158,7 +188,7 @@ module Zyphr
|
|
|
158
188
|
# Calculates hash code according to all attributes.
|
|
159
189
|
# @return [Integer] Hash code
|
|
160
190
|
def hash
|
|
161
|
-
[id, email_address, domain_id, name, from_name, created_at, updated_at].hash
|
|
191
|
+
[id, email_address, is_catch_all, enabled, domain_id, name, from_name, created_at, updated_at, received_count].hash
|
|
162
192
|
end
|
|
163
193
|
|
|
164
194
|
# Builds the object from hash
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zyphr API
|
|
3
|
+
|
|
4
|
+
#Zyphr is a developer platform for user authentication and transactional messaging. One API covers auth (passkeys, social sign-in, passwordless, MFA, sessions, organizations) plus email, push notifications, SMS, in-app messages, and webhooks. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. > **Test keys are being retired.** `zy_test_*` keys are no longer issued, and existing ones stop working on **21 October 2026**. They never delivered mail — sends were mocked and marked sent without reaching a provider, so they could not verify domain authentication, rendering, or deliverability. To test your integration, use a `zy_live_*` key against a verified domain and send to an address you control. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Account Sending Status Every authenticated response carries the account's current sending state so you can surface it in your own tooling without a separate call: - `X-Account-Sending-Status`: `active`, `throttled`, or `frozen` - `X-Account-Sending-Status-Reason`: human-readable reason (present only when the status is `throttled` or `frozen`) This header is informational and non-blocking on non-send endpoints (reads, billing, and deliverability stay available). Send-capable endpoints additionally enforce the state: a frozen account receives `403 account_frozen` and a throttled account receives `429 account_throttled`, both with the reason in the error message. ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@zyphr.dev
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.12.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Zyphr
|
|
17
|
+
class InboxListResponseMeta
|
|
18
|
+
attr_accessor :request_id
|
|
19
|
+
|
|
20
|
+
attr_accessor :total
|
|
21
|
+
|
|
22
|
+
# All delivered mail in the project, including mail with no inbox. Only with `include_counts=true`.
|
|
23
|
+
attr_accessor :received_total
|
|
24
|
+
|
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
|
+
def self.attribute_map
|
|
27
|
+
{
|
|
28
|
+
:'request_id' => :'request_id',
|
|
29
|
+
:'total' => :'total',
|
|
30
|
+
:'received_total' => :'received_total'
|
|
31
|
+
}
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Returns attribute mapping this model knows about
|
|
35
|
+
def self.acceptable_attribute_map
|
|
36
|
+
attribute_map
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Returns all the JSON keys this model knows about
|
|
40
|
+
def self.acceptable_attributes
|
|
41
|
+
acceptable_attribute_map.values
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Attribute type mapping.
|
|
45
|
+
def self.openapi_types
|
|
46
|
+
{
|
|
47
|
+
:'request_id' => :'String',
|
|
48
|
+
:'total' => :'Integer',
|
|
49
|
+
:'received_total' => :'Integer'
|
|
50
|
+
}
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# List of attributes with nullable: true
|
|
54
|
+
def self.openapi_nullable
|
|
55
|
+
Set.new([
|
|
56
|
+
])
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# List of class defined in allOf (OpenAPI v3)
|
|
60
|
+
def self.openapi_all_of
|
|
61
|
+
[
|
|
62
|
+
:'RequestMeta'
|
|
63
|
+
]
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Initializes the object
|
|
67
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
68
|
+
def initialize(attributes = {})
|
|
69
|
+
if (!attributes.is_a?(Hash))
|
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zyphr::InboxListResponseMeta` initialize method"
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
74
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
75
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
76
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
77
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zyphr::InboxListResponseMeta`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
78
|
+
end
|
|
79
|
+
h[k.to_sym] = v
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'request_id')
|
|
83
|
+
self.request_id = attributes[:'request_id']
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'total')
|
|
87
|
+
self.total = attributes[:'total']
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'received_total')
|
|
91
|
+
self.received_total = attributes[:'received_total']
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
96
|
+
# @return Array for valid properties with the reasons
|
|
97
|
+
def list_invalid_properties
|
|
98
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
99
|
+
invalid_properties = Array.new
|
|
100
|
+
invalid_properties
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Check to see if the all the properties in the model are valid
|
|
104
|
+
# @return true if the model is valid
|
|
105
|
+
def valid?
|
|
106
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
107
|
+
true
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Checks equality by comparing each attribute.
|
|
111
|
+
# @param [Object] Object to be compared
|
|
112
|
+
def ==(o)
|
|
113
|
+
return true if self.equal?(o)
|
|
114
|
+
self.class == o.class &&
|
|
115
|
+
request_id == o.request_id &&
|
|
116
|
+
total == o.total &&
|
|
117
|
+
received_total == o.received_total
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# @see the `==` method
|
|
121
|
+
# @param [Object] Object to be compared
|
|
122
|
+
def eql?(o)
|
|
123
|
+
self == o
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Calculates hash code according to all attributes.
|
|
127
|
+
# @return [Integer] Hash code
|
|
128
|
+
def hash
|
|
129
|
+
[request_id, total, received_total].hash
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Builds the object from hash
|
|
133
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
134
|
+
# @return [Object] Returns the model itself
|
|
135
|
+
def self.build_from_hash(attributes)
|
|
136
|
+
return nil unless attributes.is_a?(Hash)
|
|
137
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
138
|
+
transformed_hash = {}
|
|
139
|
+
openapi_types.each_pair do |key, type|
|
|
140
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
141
|
+
transformed_hash["#{key}"] = nil
|
|
142
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
143
|
+
# check to ensure the input is an array given that the attribute
|
|
144
|
+
# is documented as an array but the input is not
|
|
145
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
146
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
147
|
+
end
|
|
148
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
149
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
150
|
+
end
|
|
151
|
+
end
|
|
152
|
+
new(transformed_hash)
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Deserializes the data based on type
|
|
156
|
+
# @param string type Data type
|
|
157
|
+
# @param string value Value to be deserialized
|
|
158
|
+
# @return [Object] Deserialized data
|
|
159
|
+
def self._deserialize(type, value)
|
|
160
|
+
case type.to_sym
|
|
161
|
+
when :Time
|
|
162
|
+
Time.parse(value)
|
|
163
|
+
when :Date
|
|
164
|
+
Date.parse(value)
|
|
165
|
+
when :String
|
|
166
|
+
value.to_s
|
|
167
|
+
when :Integer
|
|
168
|
+
value.to_i
|
|
169
|
+
when :Float
|
|
170
|
+
value.to_f
|
|
171
|
+
when :Boolean
|
|
172
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
173
|
+
true
|
|
174
|
+
else
|
|
175
|
+
false
|
|
176
|
+
end
|
|
177
|
+
when :Object
|
|
178
|
+
# generic object (usually a Hash), return directly
|
|
179
|
+
value
|
|
180
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
181
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
182
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
183
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
184
|
+
k_type = Regexp.last_match[:k_type]
|
|
185
|
+
v_type = Regexp.last_match[:v_type]
|
|
186
|
+
{}.tap do |hash|
|
|
187
|
+
value.each do |k, v|
|
|
188
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
else # model
|
|
192
|
+
# models (e.g. Pet) or oneOf
|
|
193
|
+
klass = Zyphr.const_get(type)
|
|
194
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
195
|
+
end
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# Returns the string representation of the object
|
|
199
|
+
# @return [String] String presentation of the object
|
|
200
|
+
def to_s
|
|
201
|
+
to_hash.to_s
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
205
|
+
# @return [Hash] Returns the object in the form of hash
|
|
206
|
+
def to_body
|
|
207
|
+
to_hash
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Returns the object in the form of hash
|
|
211
|
+
# @return [Hash] Returns the object in the form of hash
|
|
212
|
+
def to_hash
|
|
213
|
+
hash = {}
|
|
214
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
215
|
+
value = self.send(attr)
|
|
216
|
+
if value.nil?
|
|
217
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
218
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
hash[param] = _to_hash(value)
|
|
222
|
+
end
|
|
223
|
+
hash
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# Outputs non-array value in the form of hash
|
|
227
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
228
|
+
# @param [Object] value Any valid value
|
|
229
|
+
# @return [Hash] Returns the value in the form of hash
|
|
230
|
+
def _to_hash(value)
|
|
231
|
+
if value.is_a?(Array)
|
|
232
|
+
value.compact.map { |v| _to_hash(v) }
|
|
233
|
+
elsif value.is_a?(Hash)
|
|
234
|
+
{}.tap do |hash|
|
|
235
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
236
|
+
end
|
|
237
|
+
elsif value.respond_to? :to_hash
|
|
238
|
+
value.to_hash
|
|
239
|
+
else
|
|
240
|
+
value
|
|
241
|
+
end
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
end
|
|
@@ -19,11 +19,15 @@ module Zyphr
|
|
|
19
19
|
|
|
20
20
|
attr_accessor :from_name
|
|
21
21
|
|
|
22
|
+
# Catch-all only. False drops mail to addresses without a named inbox; true accepts every address again.
|
|
23
|
+
attr_accessor :enabled
|
|
24
|
+
|
|
22
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
26
|
def self.attribute_map
|
|
24
27
|
{
|
|
25
28
|
:'name' => :'name',
|
|
26
|
-
:'from_name' => :'from_name'
|
|
29
|
+
:'from_name' => :'from_name',
|
|
30
|
+
:'enabled' => :'enabled'
|
|
27
31
|
}
|
|
28
32
|
end
|
|
29
33
|
|
|
@@ -41,14 +45,15 @@ module Zyphr
|
|
|
41
45
|
def self.openapi_types
|
|
42
46
|
{
|
|
43
47
|
:'name' => :'String',
|
|
44
|
-
:'from_name' => :'String'
|
|
48
|
+
:'from_name' => :'String',
|
|
49
|
+
:'enabled' => :'Boolean'
|
|
45
50
|
}
|
|
46
51
|
end
|
|
47
52
|
|
|
48
53
|
# List of attributes with nullable: true
|
|
49
54
|
def self.openapi_nullable
|
|
50
55
|
Set.new([
|
|
51
|
-
:'from_name'
|
|
56
|
+
:'from_name',
|
|
52
57
|
])
|
|
53
58
|
end
|
|
54
59
|
|
|
@@ -75,6 +80,10 @@ module Zyphr
|
|
|
75
80
|
if attributes.key?(:'from_name')
|
|
76
81
|
self.from_name = attributes[:'from_name']
|
|
77
82
|
end
|
|
83
|
+
|
|
84
|
+
if attributes.key?(:'enabled')
|
|
85
|
+
self.enabled = attributes[:'enabled']
|
|
86
|
+
end
|
|
78
87
|
end
|
|
79
88
|
|
|
80
89
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -132,7 +141,8 @@ module Zyphr
|
|
|
132
141
|
return true if self.equal?(o)
|
|
133
142
|
self.class == o.class &&
|
|
134
143
|
name == o.name &&
|
|
135
|
-
from_name == o.from_name
|
|
144
|
+
from_name == o.from_name &&
|
|
145
|
+
enabled == o.enabled
|
|
136
146
|
end
|
|
137
147
|
|
|
138
148
|
# @see the `==` method
|
|
@@ -144,7 +154,7 @@ module Zyphr
|
|
|
144
154
|
# Calculates hash code according to all attributes.
|
|
145
155
|
# @return [Integer] Hash code
|
|
146
156
|
def hash
|
|
147
|
-
[name, from_name].hash
|
|
157
|
+
[name, from_name, enabled].hash
|
|
148
158
|
end
|
|
149
159
|
|
|
150
160
|
# Builds the object from hash
|
data/lib/zyphr.rb
CHANGED
|
@@ -180,6 +180,7 @@ require 'zyphr/models/inbound_email_response'
|
|
|
180
180
|
require 'zyphr/models/inbox'
|
|
181
181
|
require 'zyphr/models/inbox_list_meta'
|
|
182
182
|
require 'zyphr/models/inbox_list_response'
|
|
183
|
+
require 'zyphr/models/inbox_list_response_meta'
|
|
183
184
|
require 'zyphr/models/inbox_notification_response'
|
|
184
185
|
require 'zyphr/models/inbox_response'
|
|
185
186
|
require 'zyphr/models/invite_end_user200_response'
|
|
@@ -34,7 +34,7 @@ describe 'InboundEmailApi' do
|
|
|
34
34
|
|
|
35
35
|
# unit tests for create_inbox
|
|
36
36
|
# Create an inbox
|
|
37
|
-
# Create a named receiving address, `<local_part>@inbound.<domain>`, on a domain with inbound email enabled.
|
|
37
|
+
# Create a named receiving address, `<local_part>@inbound.<domain>`, on a domain with inbound email enabled. Mail is routed to the named inbox matching its address, otherwise to the domain's catch-all inbox (`*@inbound.<domain>`, created when inbound is enabled); with the catch-all disabled it is dropped. Test-mode keys cannot create, update or delete inboxes, because inboxes change live mail routing. Requires a plan with inbound email (Starter or higher).
|
|
38
38
|
# @param create_inbox_request
|
|
39
39
|
# @param [Hash] opts the optional parameters
|
|
40
40
|
# @return [InboxResponse]
|
|
@@ -46,7 +46,7 @@ describe 'InboundEmailApi' do
|
|
|
46
46
|
|
|
47
47
|
# unit tests for delete_inbox
|
|
48
48
|
# Delete an inbox
|
|
49
|
-
# Delete
|
|
49
|
+
# Delete a named inbox. Mail it already received is kept (its `inbox_id` becomes null), and new mail to its address goes to the catch-all if enabled. The catch-all cannot be deleted (422 `catch_all_not_deletable`); disable it with `PATCH { \"enabled\": false }`.
|
|
50
50
|
# @param id
|
|
51
51
|
# @param [Hash] opts the optional parameters
|
|
52
52
|
# @return [nil]
|
|
@@ -98,6 +98,7 @@ describe 'InboundEmailApi' do
|
|
|
98
98
|
# @param [Hash] opts the optional parameters
|
|
99
99
|
# @option opts [String] :status
|
|
100
100
|
# @option opts [String] :to Filter by receiving address
|
|
101
|
+
# @option opts [String] :inbox_id Only mail that landed in this inbox (see /inboxes)
|
|
101
102
|
# @option opts [Boolean] :include_withheld Include quarantined/dropped mail
|
|
102
103
|
# @option opts [Integer] :limit
|
|
103
104
|
# @option opts [Integer] :offset
|
|
@@ -111,6 +112,7 @@ describe 'InboundEmailApi' do
|
|
|
111
112
|
# unit tests for list_inboxes
|
|
112
113
|
# List inboxes
|
|
113
114
|
# @param [Hash] opts the optional parameters
|
|
115
|
+
# @option opts [Boolean] :include_counts Add `received_count` to each inbox and `meta.received_total` (all delivered mail, including mail with no inbox). Counts use the same filter as the default received-email list.
|
|
114
116
|
# @return [InboxListResponse]
|
|
115
117
|
describe 'list_inboxes test' do
|
|
116
118
|
it 'should work' do
|
|
@@ -134,7 +136,7 @@ describe 'InboundEmailApi' do
|
|
|
134
136
|
|
|
135
137
|
# unit tests for update_inbox
|
|
136
138
|
# Update an inbox
|
|
137
|
-
# Rename the inbox or change the display name recipients see. The address cannot change.
|
|
139
|
+
# Rename the inbox or change the display name recipients see. The address cannot change. On the catch-all, `enabled: false` turns on strict addresses: mail to any address without a named inbox is dropped until it is re-enabled. Named inboxes cannot be disabled (422 `not_catch_all`).
|
|
138
140
|
# @param id
|
|
139
141
|
# @param update_inbox_request
|
|
140
142
|
# @param [Hash] opts the optional parameters
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zyphr API
|
|
3
|
+
|
|
4
|
+
#Zyphr is a developer platform for user authentication and transactional messaging. One API covers auth (passkeys, social sign-in, passwordless, MFA, sessions, organizations) plus email, push notifications, SMS, in-app messages, and webhooks. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. > **Test keys are being retired.** `zy_test_*` keys are no longer issued, and existing ones stop working on **21 October 2026**. They never delivered mail — sends were mocked and marked sent without reaching a provider, so they could not verify domain authentication, rendering, or deliverability. To test your integration, use a `zy_live_*` key against a verified domain and send to an address you control. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Account Sending Status Every authenticated response carries the account's current sending state so you can surface it in your own tooling without a separate call: - `X-Account-Sending-Status`: `active`, `throttled`, or `frozen` - `X-Account-Sending-Status-Reason`: human-readable reason (present only when the status is `throttled` or `frozen`) This header is informational and non-blocking on non-send endpoints (reads, billing, and deliverability stay available). Send-capable endpoints additionally enforce the state: a frozen account receives `403 account_frozen` and a throttled account receives `429 account_throttled`, both with the reason in the error message. ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@zyphr.dev
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.12.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Zyphr::InboxListResponseMeta
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zyphr::InboxListResponseMeta do
|
|
21
|
+
let(:instance) { Zyphr::InboxListResponseMeta.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of InboxListResponseMeta' do
|
|
24
|
+
it 'should create an instance of InboxListResponseMeta' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zyphr::InboxListResponseMeta)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "request_id"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "total"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
describe 'test attribute "received_total"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
end
|
data/spec/models/inbox_spec.rb
CHANGED
|
@@ -39,6 +39,18 @@ describe Zyphr::Inbox do
|
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
+
describe 'test attribute "is_catch_all"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
describe 'test attribute "enabled"' do
|
|
49
|
+
it 'should work' do
|
|
50
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
42
54
|
describe 'test attribute "domain_id"' do
|
|
43
55
|
it 'should work' do
|
|
44
56
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -69,4 +81,10 @@ describe Zyphr::Inbox do
|
|
|
69
81
|
end
|
|
70
82
|
end
|
|
71
83
|
|
|
84
|
+
describe 'test attribute "received_count"' do
|
|
85
|
+
it 'should work' do
|
|
86
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
72
90
|
end
|
data/zyphr.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zyphr
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.75
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Zyphr
|
|
@@ -274,6 +274,7 @@ files:
|
|
|
274
274
|
- docs/InboxApi.md
|
|
275
275
|
- docs/InboxListMeta.md
|
|
276
276
|
- docs/InboxListResponse.md
|
|
277
|
+
- docs/InboxListResponseMeta.md
|
|
277
278
|
- docs/InboxNotificationResponse.md
|
|
278
279
|
- docs/InboxResponse.md
|
|
279
280
|
- docs/InviteEndUser200Response.md
|
|
@@ -844,6 +845,7 @@ files:
|
|
|
844
845
|
- lib/zyphr/models/inbox.rb
|
|
845
846
|
- lib/zyphr/models/inbox_list_meta.rb
|
|
846
847
|
- lib/zyphr/models/inbox_list_response.rb
|
|
848
|
+
- lib/zyphr/models/inbox_list_response_meta.rb
|
|
847
849
|
- lib/zyphr/models/inbox_notification_response.rb
|
|
848
850
|
- lib/zyphr/models/inbox_response.rb
|
|
849
851
|
- lib/zyphr/models/invite_end_user200_response.rb
|
|
@@ -1393,6 +1395,7 @@ files:
|
|
|
1393
1395
|
- spec/models/inbound_email_response_spec.rb
|
|
1394
1396
|
- spec/models/inbound_email_spec.rb
|
|
1395
1397
|
- spec/models/inbox_list_meta_spec.rb
|
|
1398
|
+
- spec/models/inbox_list_response_meta_spec.rb
|
|
1396
1399
|
- spec/models/inbox_list_response_spec.rb
|
|
1397
1400
|
- spec/models/inbox_notification_response_spec.rb
|
|
1398
1401
|
- spec/models/inbox_response_spec.rb
|
|
@@ -1960,6 +1963,7 @@ test_files:
|
|
|
1960
1963
|
- spec/models/o_auth_link_response_data_spec.rb
|
|
1961
1964
|
- spec/models/set_end_user_claims200_response_spec.rb
|
|
1962
1965
|
- spec/models/topic_stats_response_spec.rb
|
|
1966
|
+
- spec/models/inbox_list_response_meta_spec.rb
|
|
1963
1967
|
- spec/models/webhook_circuit_state_response_spec.rb
|
|
1964
1968
|
- spec/models/sms_batch_result_message_spec.rb
|
|
1965
1969
|
- spec/models/mark_all_read_response_spec.rb
|