zyphr 0.1.73 → 0.1.74
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/docs/InboundEmailApi.md +3 -3
- data/docs/Inbox.md +5 -1
- data/docs/UpdateInboxRequest.md +3 -1
- data/lib/zyphr/api/inbound_email_api.rb +6 -6
- data/lib/zyphr/models/inbox.rb +22 -2
- data/lib/zyphr/models/update_inbox_request.rb +15 -5
- data/spec/api/inbound_email_api_spec.rb +3 -3
- data/spec/models/inbox_spec.rb +12 -0
- data/spec/models/update_inbox_request_spec.rb +6 -0
- data/zyphr.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e66b5107f0b6cb22378746fe207cb9b9dfa05c38baffcfc74fa12afebd8155d0
|
|
4
|
+
data.tar.gz: 411b3b624fb95b4a46051f2cdf96bba73c9722c2ddbd12e347f174c157bad3f6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 910a19b07e16cd6a4b9b35491c46898baa3a31aa8bce32934f0dedcf83609261c8a0122f4b56519a048efd2721c0c4f8496108e158266e17428bb700d30f8289
|
|
7
|
+
data.tar.gz: 2754efc3f3bf5878010f0ecf02fb5d2bcd634c9e8d12f71abf900617bd5c57f4c509a4006d11a52c65bd907a3263e69caa26cc2073da20905de5ce80f3212a52
|
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
|
|
|
@@ -599,7 +599,7 @@ end
|
|
|
599
599
|
|
|
600
600
|
Update an inbox
|
|
601
601
|
|
|
602
|
-
Rename the inbox or change the display name recipients see. The address cannot change.
|
|
602
|
+
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
603
|
|
|
604
604
|
### Examples
|
|
605
605
|
|
data/docs/Inbox.md
CHANGED
|
@@ -5,7 +5,9 @@
|
|
|
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] |
|
|
@@ -20,6 +22,8 @@ require 'zyphr'
|
|
|
20
22
|
instance = Zyphr::Inbox.new(
|
|
21
23
|
id: null,
|
|
22
24
|
email_address: support@inbound.acme.com,
|
|
25
|
+
is_catch_all: null,
|
|
26
|
+
enabled: null,
|
|
23
27
|
domain_id: null,
|
|
24
28
|
name: Support,
|
|
25
29
|
from_name: Acme Support,
|
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
|
|
@@ -554,7 +554,7 @@ module Zyphr
|
|
|
554
554
|
end
|
|
555
555
|
|
|
556
556
|
# Update an inbox
|
|
557
|
-
# Rename the inbox or change the display name recipients see. The address cannot change.
|
|
557
|
+
# 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
558
|
# @param id [String]
|
|
559
559
|
# @param update_inbox_request [UpdateInboxRequest]
|
|
560
560
|
# @param [Hash] opts the optional parameters
|
|
@@ -565,7 +565,7 @@ module Zyphr
|
|
|
565
565
|
end
|
|
566
566
|
|
|
567
567
|
# Update an inbox
|
|
568
|
-
# Rename the inbox or change the display name recipients see. The address cannot change.
|
|
568
|
+
# 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
569
|
# @param id [String]
|
|
570
570
|
# @param update_inbox_request [UpdateInboxRequest]
|
|
571
571
|
# @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)
|
|
@@ -37,6 +43,8 @@ module Zyphr
|
|
|
37
43
|
{
|
|
38
44
|
:'id' => :'id',
|
|
39
45
|
:'email_address' => :'email_address',
|
|
46
|
+
:'is_catch_all' => :'is_catch_all',
|
|
47
|
+
:'enabled' => :'enabled',
|
|
40
48
|
:'domain_id' => :'domain_id',
|
|
41
49
|
:'name' => :'name',
|
|
42
50
|
:'from_name' => :'from_name',
|
|
@@ -60,6 +68,8 @@ module Zyphr
|
|
|
60
68
|
{
|
|
61
69
|
:'id' => :'String',
|
|
62
70
|
:'email_address' => :'String',
|
|
71
|
+
:'is_catch_all' => :'Boolean',
|
|
72
|
+
:'enabled' => :'Boolean',
|
|
63
73
|
:'domain_id' => :'String',
|
|
64
74
|
:'name' => :'String',
|
|
65
75
|
:'from_name' => :'String',
|
|
@@ -99,6 +109,14 @@ module Zyphr
|
|
|
99
109
|
self.email_address = attributes[:'email_address']
|
|
100
110
|
end
|
|
101
111
|
|
|
112
|
+
if attributes.key?(:'is_catch_all')
|
|
113
|
+
self.is_catch_all = attributes[:'is_catch_all']
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if attributes.key?(:'enabled')
|
|
117
|
+
self.enabled = attributes[:'enabled']
|
|
118
|
+
end
|
|
119
|
+
|
|
102
120
|
if attributes.key?(:'domain_id')
|
|
103
121
|
self.domain_id = attributes[:'domain_id']
|
|
104
122
|
end
|
|
@@ -142,6 +160,8 @@ module Zyphr
|
|
|
142
160
|
self.class == o.class &&
|
|
143
161
|
id == o.id &&
|
|
144
162
|
email_address == o.email_address &&
|
|
163
|
+
is_catch_all == o.is_catch_all &&
|
|
164
|
+
enabled == o.enabled &&
|
|
145
165
|
domain_id == o.domain_id &&
|
|
146
166
|
name == o.name &&
|
|
147
167
|
from_name == o.from_name &&
|
|
@@ -158,7 +178,7 @@ module Zyphr
|
|
|
158
178
|
# Calculates hash code according to all attributes.
|
|
159
179
|
# @return [Integer] Hash code
|
|
160
180
|
def hash
|
|
161
|
-
[id, email_address, domain_id, name, from_name, created_at, updated_at].hash
|
|
181
|
+
[id, email_address, is_catch_all, enabled, domain_id, name, from_name, created_at, updated_at].hash
|
|
162
182
|
end
|
|
163
183
|
|
|
164
184
|
# Builds the object from hash
|
|
@@ -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
|
|
@@ -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]
|
|
@@ -134,7 +134,7 @@ describe 'InboundEmailApi' do
|
|
|
134
134
|
|
|
135
135
|
# unit tests for update_inbox
|
|
136
136
|
# Update an inbox
|
|
137
|
-
# Rename the inbox or change the display name recipients see. The address cannot change.
|
|
137
|
+
# 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
138
|
# @param id
|
|
139
139
|
# @param update_inbox_request
|
|
140
140
|
# @param [Hash] opts the optional parameters
|
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/
|
data/zyphr.gemspec
CHANGED