zyphr 0.1.33 → 0.1.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -0
  3. data/docs/DomainsApi.md +73 -0
  4. data/docs/InboundAttachmentUrlResponse.md +20 -0
  5. data/docs/InboundAttachmentUrlResponseData.md +22 -0
  6. data/docs/InboundEmail.md +48 -0
  7. data/docs/InboundEmailApi.md +235 -0
  8. data/docs/InboundEmailAttachment.md +24 -0
  9. data/docs/InboundEmailFrom.md +20 -0
  10. data/docs/InboundEmailListResponse.md +20 -0
  11. data/docs/InboundEmailListResponseMeta.md +24 -0
  12. data/docs/InboundEmailResponse.md +20 -0
  13. data/docs/SetDomainInboundRequest.md +18 -0
  14. data/lib/zyphr/api/domains_api.rb +72 -0
  15. data/lib/zyphr/api/inbound_email_api.rb +234 -0
  16. data/lib/zyphr/models/inbound_attachment_url_response.rb +229 -0
  17. data/lib/zyphr/models/inbound_attachment_url_response_data.rb +240 -0
  18. data/lib/zyphr/models/inbound_email.rb +441 -0
  19. data/lib/zyphr/models/inbound_email_attachment.rb +250 -0
  20. data/lib/zyphr/models/inbound_email_from.rb +230 -0
  21. data/lib/zyphr/models/inbound_email_list_response.rb +231 -0
  22. data/lib/zyphr/models/inbound_email_list_response_meta.rb +247 -0
  23. data/lib/zyphr/models/inbound_email_response.rb +229 -0
  24. data/lib/zyphr/models/set_domain_inbound_request.rb +220 -0
  25. data/lib/zyphr.rb +10 -0
  26. data/spec/api/domains_api_spec.rb +13 -0
  27. data/spec/api/inbound_email_api_spec.rb +76 -0
  28. data/spec/models/inbound_attachment_url_response_data_spec.rb +48 -0
  29. data/spec/models/inbound_attachment_url_response_spec.rb +42 -0
  30. data/spec/models/inbound_email_attachment_spec.rb +54 -0
  31. data/spec/models/inbound_email_from_spec.rb +42 -0
  32. data/spec/models/inbound_email_list_response_meta_spec.rb +54 -0
  33. data/spec/models/inbound_email_list_response_spec.rb +42 -0
  34. data/spec/models/inbound_email_response_spec.rb +42 -0
  35. data/spec/models/inbound_email_spec.rb +142 -0
  36. data/spec/models/set_domain_inbound_request_spec.rb +36 -0
  37. data/zyphr.gemspec +1 -1
  38. metadata +42 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b97a355b1b3ed8acec6bb8fd281575915b1fd1ff645e9bce7946b105909a3923
4
- data.tar.gz: 158ef2bc65f0e52255b1b3ed50122334305ddeea220c8c28ed77cb62ab19dbea
3
+ metadata.gz: f36ed1222d5a3811592b282181dd2f67143e4740fbfe7de4d18df12191ea3850
4
+ data.tar.gz: 43f947c3f31db15a223c7413363a94c0c0bbf161e59917d648fe56030031fe35
5
5
  SHA512:
6
- metadata.gz: '078800f631c0017f2b93a2f30d3258439fbb8c0647b132131464072677e37236170e881de4dce27235f4d05d31d2bca9ace1856ae55ed7d910fbf7776e72176f'
7
- data.tar.gz: 1dce8ca6758d35c99b0aabfb3a20c3c42347e9315a924b5432532f14846773599ff6769babe238776391e1d3d3cd380d32901e045e3d1ef4e657746b840dd0bb
6
+ metadata.gz: 9475d1b9bd76ebb758d05850dd196872e08735851fa0ea4cb4ad2ee8860320083411a4d09c0ca2a006770e34f321ed93e936fbc6063731368a5144ac23277fe5
7
+ data.tar.gz: 0562256d9740f5f67df0facd9d401aed1e7de28e99e43b2124f7cca0dcd78ff6d8d063d486791efb1354294ef0558b34159d88da9c89e71e5f597e1227ac24e7
data/README.md CHANGED
@@ -209,6 +209,7 @@ Class | Method | HTTP request | Description
209
209
  *Zyphr::DomainsApi* | [**get_domain**](docs/DomainsApi.md#get_domain) | **GET** /domains/{id} | Get a sending domain
210
210
  *Zyphr::DomainsApi* | [**get_domain_verification_status**](docs/DomainsApi.md#get_domain_verification_status) | **GET** /domains/{id}/verification-status | Get domain verification status
211
211
  *Zyphr::DomainsApi* | [**list_domains**](docs/DomainsApi.md#list_domains) | **GET** /domains | List sending domains
212
+ *Zyphr::DomainsApi* | [**set_domain_inbound**](docs/DomainsApi.md#set_domain_inbound) | **PUT** /domains/{id}/inbound | Enable or disable inbound email for a domain
212
213
  *Zyphr::DomainsApi* | [**verify_domain**](docs/DomainsApi.md#verify_domain) | **POST** /domains/{id}/verify | Trigger domain verification
213
214
  *Zyphr::EmailsApi* | [**get_email**](docs/EmailsApi.md#get_email) | **GET** /emails/{id} | Get email details
214
215
  *Zyphr::EmailsApi* | [**get_email_events**](docs/EmailsApi.md#get_email_events) | **GET** /emails/{id}/events | Get email events
@@ -219,6 +220,9 @@ Class | Method | HTTP request | Description
219
220
  *Zyphr::ExecutionsApi* | [**cancel_execution**](docs/ExecutionsApi.md#cancel_execution) | **POST** /executions/{id}/cancel | Cancel a running execution
220
221
  *Zyphr::ExecutionsApi* | [**get_execution**](docs/ExecutionsApi.md#get_execution) | **GET** /executions/{id} | Get a workflow execution
221
222
  *Zyphr::ExecutionsApi* | [**retry_execution**](docs/ExecutionsApi.md#retry_execution) | **POST** /executions/{id}/retry | Retry a failed or cancelled execution
223
+ *Zyphr::InboundEmailApi* | [**get_inbound_attachment_url**](docs/InboundEmailApi.md#get_inbound_attachment_url) | **GET** /inbound-emails/{id}/attachments/{attachmentId} | Get an attachment download URL
224
+ *Zyphr::InboundEmailApi* | [**get_inbound_email**](docs/InboundEmailApi.md#get_inbound_email) | **GET** /inbound-emails/{id} | Get a received email
225
+ *Zyphr::InboundEmailApi* | [**list_inbound_emails**](docs/InboundEmailApi.md#list_inbound_emails) | **GET** /inbound-emails | List received emails
222
226
  *Zyphr::InboxApi* | [**archive_inbox_notification**](docs/InboxApi.md#archive_inbox_notification) | **POST** /inbox/{id}/archive | Archive a notification
223
227
  *Zyphr::InboxApi* | [**archive_subscriber_notification**](docs/InboxApi.md#archive_subscriber_notification) | **POST** /subscriber-inbox/{id}/archive | Archive a notification
224
228
  *Zyphr::InboxApi* | [**delete_inbox_notification**](docs/InboxApi.md#delete_inbox_notification) | **DELETE** /inbox/{id} | Delete a notification
@@ -478,6 +482,14 @@ Class | Method | HTTP request | Description
478
482
  - [Zyphr::GetWaaSEndpoint200Response](docs/GetWaaSEndpoint200Response.md)
479
483
  - [Zyphr::GetWaaSUsage200Response](docs/GetWaaSUsage200Response.md)
480
484
  - [Zyphr::InAppNotification](docs/InAppNotification.md)
485
+ - [Zyphr::InboundAttachmentUrlResponse](docs/InboundAttachmentUrlResponse.md)
486
+ - [Zyphr::InboundAttachmentUrlResponseData](docs/InboundAttachmentUrlResponseData.md)
487
+ - [Zyphr::InboundEmail](docs/InboundEmail.md)
488
+ - [Zyphr::InboundEmailAttachment](docs/InboundEmailAttachment.md)
489
+ - [Zyphr::InboundEmailFrom](docs/InboundEmailFrom.md)
490
+ - [Zyphr::InboundEmailListResponse](docs/InboundEmailListResponse.md)
491
+ - [Zyphr::InboundEmailListResponseMeta](docs/InboundEmailListResponseMeta.md)
492
+ - [Zyphr::InboundEmailResponse](docs/InboundEmailResponse.md)
481
493
  - [Zyphr::InboxListMeta](docs/InboxListMeta.md)
482
494
  - [Zyphr::InboxListResponse](docs/InboxListResponse.md)
483
495
  - [Zyphr::InboxNotificationResponse](docs/InboxNotificationResponse.md)
@@ -625,6 +637,7 @@ Class | Method | HTTP request | Description
625
637
  - [Zyphr::SessionListResponse](docs/SessionListResponse.md)
626
638
  - [Zyphr::SessionListResponseData](docs/SessionListResponseData.md)
627
639
  - [Zyphr::SessionListResponseDataSessionInfo](docs/SessionListResponseDataSessionInfo.md)
640
+ - [Zyphr::SetDomainInboundRequest](docs/SetDomainInboundRequest.md)
628
641
  - [Zyphr::SetPreferencesRequest](docs/SetPreferencesRequest.md)
629
642
  - [Zyphr::SetPreferencesRequestPreferencesInner](docs/SetPreferencesRequestPreferencesInner.md)
630
643
  - [Zyphr::SignInAnonymouslyRequest](docs/SignInAnonymouslyRequest.md)
data/docs/DomainsApi.md CHANGED
@@ -9,6 +9,7 @@ All URIs are relative to *https://api.zyphr.dev/v1*
9
9
  | [**get_domain**](DomainsApi.md#get_domain) | **GET** /domains/{id} | Get a sending domain |
10
10
  | [**get_domain_verification_status**](DomainsApi.md#get_domain_verification_status) | **GET** /domains/{id}/verification-status | Get domain verification status |
11
11
  | [**list_domains**](DomainsApi.md#list_domains) | **GET** /domains | List sending domains |
12
+ | [**set_domain_inbound**](DomainsApi.md#set_domain_inbound) | **PUT** /domains/{id}/inbound | Enable or disable inbound email for a domain |
12
13
  | [**verify_domain**](DomainsApi.md#verify_domain) | **POST** /domains/{id}/verify | Trigger domain verification |
13
14
 
14
15
 
@@ -364,6 +365,78 @@ This endpoint does not need any parameter.
364
365
  - **Accept**: application/json
365
366
 
366
367
 
368
+ ## set_domain_inbound
369
+
370
+ > set_domain_inbound(id, set_domain_inbound_request)
371
+
372
+ Enable or disable inbound email for a domain
373
+
374
+ Toggle email receiving for a domain. When enabled, the domain's DNS records gain an MX record on the `inbound.` subdomain that the tenant must publish. Requires a plan with inbound email (Starter+).
375
+
376
+ ### Examples
377
+
378
+ ```ruby
379
+ require 'time'
380
+ require 'zyphr'
381
+ # setup authorization
382
+ Zyphr.configure do |config|
383
+ # Configure API key authorization: ApiKeyAuth
384
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
385
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
386
+ # config.api_key_prefix['X-API-Key'] = 'Bearer'
387
+ end
388
+
389
+ api_instance = Zyphr::DomainsApi.new
390
+ id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
391
+ set_domain_inbound_request = Zyphr::SetDomainInboundRequest.new # SetDomainInboundRequest |
392
+
393
+ begin
394
+ # Enable or disable inbound email for a domain
395
+ api_instance.set_domain_inbound(id, set_domain_inbound_request)
396
+ rescue Zyphr::ApiError => e
397
+ puts "Error when calling DomainsApi->set_domain_inbound: #{e}"
398
+ end
399
+ ```
400
+
401
+ #### Using the set_domain_inbound_with_http_info variant
402
+
403
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
404
+
405
+ > <Array(nil, Integer, Hash)> set_domain_inbound_with_http_info(id, set_domain_inbound_request)
406
+
407
+ ```ruby
408
+ begin
409
+ # Enable or disable inbound email for a domain
410
+ data, status_code, headers = api_instance.set_domain_inbound_with_http_info(id, set_domain_inbound_request)
411
+ p status_code # => 2xx
412
+ p headers # => { ... }
413
+ p data # => nil
414
+ rescue Zyphr::ApiError => e
415
+ puts "Error when calling DomainsApi->set_domain_inbound_with_http_info: #{e}"
416
+ end
417
+ ```
418
+
419
+ ### Parameters
420
+
421
+ | Name | Type | Description | Notes |
422
+ | ---- | ---- | ----------- | ----- |
423
+ | **id** | **String** | | |
424
+ | **set_domain_inbound_request** | [**SetDomainInboundRequest**](SetDomainInboundRequest.md) | | |
425
+
426
+ ### Return type
427
+
428
+ nil (empty response body)
429
+
430
+ ### Authorization
431
+
432
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
433
+
434
+ ### HTTP request headers
435
+
436
+ - **Content-Type**: application/json
437
+ - **Accept**: Not defined
438
+
439
+
367
440
  ## verify_domain
368
441
 
369
442
  > <VerifyDomainResponse> verify_domain(id)
@@ -0,0 +1,20 @@
1
+ # Zyphr::InboundAttachmentUrlResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **data** | [**InboundAttachmentUrlResponseData**](InboundAttachmentUrlResponseData.md) | | [optional] |
8
+ | **meta** | [**RequestMeta**](RequestMeta.md) | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zyphr'
14
+
15
+ instance = Zyphr::InboundAttachmentUrlResponse.new(
16
+ data: null,
17
+ meta: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,22 @@
1
+ # Zyphr::InboundAttachmentUrlResponseData
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **download_url** | **String** | Short-lived presigned S3 download URL | [optional] |
8
+ | **filename** | **String** | | [optional] |
9
+ | **content_type** | **String** | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'zyphr'
15
+
16
+ instance = Zyphr::InboundAttachmentUrlResponseData.new(
17
+ download_url: null,
18
+ filename: null,
19
+ content_type: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,48 @@
1
+ # Zyphr::InboundEmail
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | | [optional] |
8
+ | **to_email** | **String** | The receiving address the mail was sent to | [optional] |
9
+ | **from** | [**InboundEmailFrom**](InboundEmailFrom.md) | | [optional] |
10
+ | **cc** | **Array&lt;String&gt;** | | [optional] |
11
+ | **subject** | **String** | | [optional] |
12
+ | **text_body** | **String** | | [optional] |
13
+ | **html_body** | **String** | | [optional] |
14
+ | **in_reply_to** | **String** | RFC Message-ID this is a reply to, if any | [optional] |
15
+ | **replied_to_message_id** | **String** | Resolved outbound message this is a reply to, if correlated | [optional] |
16
+ | **verified** | **Boolean** | False when SPF or DMARC failed — treat the sender as unverified | [optional] |
17
+ | **spf_verdict** | **String** | | [optional] |
18
+ | **dkim_verdict** | **String** | | [optional] |
19
+ | **dmarc_verdict** | **String** | | [optional] |
20
+ | **status** | **String** | | [optional] |
21
+ | **attachments** | [**Array&lt;InboundEmailAttachment&gt;**](InboundEmailAttachment.md) | | [optional] |
22
+ | **created_at** | **Time** | | [optional] |
23
+
24
+ ## Example
25
+
26
+ ```ruby
27
+ require 'zyphr'
28
+
29
+ instance = Zyphr::InboundEmail.new(
30
+ id: null,
31
+ to_email: support@inbound.acme.com,
32
+ from: null,
33
+ cc: null,
34
+ subject: null,
35
+ text_body: null,
36
+ html_body: null,
37
+ in_reply_to: null,
38
+ replied_to_message_id: null,
39
+ verified: null,
40
+ spf_verdict: null,
41
+ dkim_verdict: null,
42
+ dmarc_verdict: null,
43
+ status: null,
44
+ attachments: null,
45
+ created_at: null
46
+ )
47
+ ```
48
+
@@ -0,0 +1,235 @@
1
+ # Zyphr::InboundEmailApi
2
+
3
+ All URIs are relative to *https://api.zyphr.dev/v1*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**get_inbound_attachment_url**](InboundEmailApi.md#get_inbound_attachment_url) | **GET** /inbound-emails/{id}/attachments/{attachmentId} | Get an attachment download URL |
8
+ | [**get_inbound_email**](InboundEmailApi.md#get_inbound_email) | **GET** /inbound-emails/{id} | Get a received email |
9
+ | [**list_inbound_emails**](InboundEmailApi.md#list_inbound_emails) | **GET** /inbound-emails | List received emails |
10
+
11
+
12
+ ## get_inbound_attachment_url
13
+
14
+ > <InboundAttachmentUrlResponse> get_inbound_attachment_url(id, attachment_id)
15
+
16
+ Get an attachment download URL
17
+
18
+ Return a short-lived presigned S3 download URL for one attachment of a received email. `attachmentId` is the positional id from the email's `attachments` array.
19
+
20
+ ### Examples
21
+
22
+ ```ruby
23
+ require 'time'
24
+ require 'zyphr'
25
+ # setup authorization
26
+ Zyphr.configure do |config|
27
+ # Configure API key authorization: ApiKeyAuth
28
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
29
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
30
+ # config.api_key_prefix['X-API-Key'] = 'Bearer'
31
+ end
32
+
33
+ api_instance = Zyphr::InboundEmailApi.new
34
+ id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
35
+ attachment_id = 'attachment_id_example' # String |
36
+
37
+ begin
38
+ # Get an attachment download URL
39
+ result = api_instance.get_inbound_attachment_url(id, attachment_id)
40
+ p result
41
+ rescue Zyphr::ApiError => e
42
+ puts "Error when calling InboundEmailApi->get_inbound_attachment_url: #{e}"
43
+ end
44
+ ```
45
+
46
+ #### Using the get_inbound_attachment_url_with_http_info variant
47
+
48
+ This returns an Array which contains the response data, status code and headers.
49
+
50
+ > <Array(<InboundAttachmentUrlResponse>, Integer, Hash)> get_inbound_attachment_url_with_http_info(id, attachment_id)
51
+
52
+ ```ruby
53
+ begin
54
+ # Get an attachment download URL
55
+ data, status_code, headers = api_instance.get_inbound_attachment_url_with_http_info(id, attachment_id)
56
+ p status_code # => 2xx
57
+ p headers # => { ... }
58
+ p data # => <InboundAttachmentUrlResponse>
59
+ rescue Zyphr::ApiError => e
60
+ puts "Error when calling InboundEmailApi->get_inbound_attachment_url_with_http_info: #{e}"
61
+ end
62
+ ```
63
+
64
+ ### Parameters
65
+
66
+ | Name | Type | Description | Notes |
67
+ | ---- | ---- | ----------- | ----- |
68
+ | **id** | **String** | | |
69
+ | **attachment_id** | **String** | | |
70
+
71
+ ### Return type
72
+
73
+ [**InboundAttachmentUrlResponse**](InboundAttachmentUrlResponse.md)
74
+
75
+ ### Authorization
76
+
77
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
78
+
79
+ ### HTTP request headers
80
+
81
+ - **Content-Type**: Not defined
82
+ - **Accept**: application/json
83
+
84
+
85
+ ## get_inbound_email
86
+
87
+ > <InboundEmailResponse> get_inbound_email(id)
88
+
89
+ Get a received email
90
+
91
+ Retrieve a single inbound email by id (scoped to the project).
92
+
93
+ ### Examples
94
+
95
+ ```ruby
96
+ require 'time'
97
+ require 'zyphr'
98
+ # setup authorization
99
+ Zyphr.configure do |config|
100
+ # Configure API key authorization: ApiKeyAuth
101
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
102
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
103
+ # config.api_key_prefix['X-API-Key'] = 'Bearer'
104
+ end
105
+
106
+ api_instance = Zyphr::InboundEmailApi.new
107
+ id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
108
+
109
+ begin
110
+ # Get a received email
111
+ result = api_instance.get_inbound_email(id)
112
+ p result
113
+ rescue Zyphr::ApiError => e
114
+ puts "Error when calling InboundEmailApi->get_inbound_email: #{e}"
115
+ end
116
+ ```
117
+
118
+ #### Using the get_inbound_email_with_http_info variant
119
+
120
+ This returns an Array which contains the response data, status code and headers.
121
+
122
+ > <Array(<InboundEmailResponse>, Integer, Hash)> get_inbound_email_with_http_info(id)
123
+
124
+ ```ruby
125
+ begin
126
+ # Get a received email
127
+ data, status_code, headers = api_instance.get_inbound_email_with_http_info(id)
128
+ p status_code # => 2xx
129
+ p headers # => { ... }
130
+ p data # => <InboundEmailResponse>
131
+ rescue Zyphr::ApiError => e
132
+ puts "Error when calling InboundEmailApi->get_inbound_email_with_http_info: #{e}"
133
+ end
134
+ ```
135
+
136
+ ### Parameters
137
+
138
+ | Name | Type | Description | Notes |
139
+ | ---- | ---- | ----------- | ----- |
140
+ | **id** | **String** | | |
141
+
142
+ ### Return type
143
+
144
+ [**InboundEmailResponse**](InboundEmailResponse.md)
145
+
146
+ ### Authorization
147
+
148
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
149
+
150
+ ### HTTP request headers
151
+
152
+ - **Content-Type**: Not defined
153
+ - **Accept**: application/json
154
+
155
+
156
+ ## list_inbound_emails
157
+
158
+ > <InboundEmailListResponse> list_inbound_emails(opts)
159
+
160
+ List received emails
161
+
162
+ List inbound (received) emails for the project, newest first. By default only delivered mail (`received`/`processed`) is returned; pass `include_withheld=true` to also see quarantined/dropped.
163
+
164
+ ### Examples
165
+
166
+ ```ruby
167
+ require 'time'
168
+ require 'zyphr'
169
+ # setup authorization
170
+ Zyphr.configure do |config|
171
+ # Configure API key authorization: ApiKeyAuth
172
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
173
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
174
+ # config.api_key_prefix['X-API-Key'] = 'Bearer'
175
+ end
176
+
177
+ api_instance = Zyphr::InboundEmailApi.new
178
+ opts = {
179
+ status: 'received', # String |
180
+ to: 'to_example', # String | Filter by receiving address
181
+ include_withheld: true, # Boolean | Include quarantined/dropped mail
182
+ limit: 56, # Integer |
183
+ offset: 56 # Integer |
184
+ }
185
+
186
+ begin
187
+ # List received emails
188
+ result = api_instance.list_inbound_emails(opts)
189
+ p result
190
+ rescue Zyphr::ApiError => e
191
+ puts "Error when calling InboundEmailApi->list_inbound_emails: #{e}"
192
+ end
193
+ ```
194
+
195
+ #### Using the list_inbound_emails_with_http_info variant
196
+
197
+ This returns an Array which contains the response data, status code and headers.
198
+
199
+ > <Array(<InboundEmailListResponse>, Integer, Hash)> list_inbound_emails_with_http_info(opts)
200
+
201
+ ```ruby
202
+ begin
203
+ # List received emails
204
+ data, status_code, headers = api_instance.list_inbound_emails_with_http_info(opts)
205
+ p status_code # => 2xx
206
+ p headers # => { ... }
207
+ p data # => <InboundEmailListResponse>
208
+ rescue Zyphr::ApiError => e
209
+ puts "Error when calling InboundEmailApi->list_inbound_emails_with_http_info: #{e}"
210
+ end
211
+ ```
212
+
213
+ ### Parameters
214
+
215
+ | Name | Type | Description | Notes |
216
+ | ---- | ---- | ----------- | ----- |
217
+ | **status** | **String** | | [optional] |
218
+ | **to** | **String** | Filter by receiving address | [optional] |
219
+ | **include_withheld** | **Boolean** | Include quarantined/dropped mail | [optional] |
220
+ | **limit** | **Integer** | | [optional][default to 50] |
221
+ | **offset** | **Integer** | | [optional][default to 0] |
222
+
223
+ ### Return type
224
+
225
+ [**InboundEmailListResponse**](InboundEmailListResponse.md)
226
+
227
+ ### Authorization
228
+
229
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
230
+
231
+ ### HTTP request headers
232
+
233
+ - **Content-Type**: Not defined
234
+ - **Accept**: application/json
235
+
@@ -0,0 +1,24 @@
1
+ # Zyphr::InboundEmailAttachment
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | Positional attachment id, used in the attachment download endpoint | [optional] |
8
+ | **filename** | **String** | | [optional] |
9
+ | **content_type** | **String** | | [optional] |
10
+ | **size** | **Integer** | Size in bytes | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'zyphr'
16
+
17
+ instance = Zyphr::InboundEmailAttachment.new(
18
+ id: 0,
19
+ filename: invoice.pdf,
20
+ content_type: application/pdf,
21
+ size: 84210
22
+ )
23
+ ```
24
+
@@ -0,0 +1,20 @@
1
+ # Zyphr::InboundEmailFrom
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **email** | **String** | | [optional] |
8
+ | **name** | **String** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zyphr'
14
+
15
+ instance = Zyphr::InboundEmailFrom.new(
16
+ email: customer@example.com,
17
+ name: Customer Name
18
+ )
19
+ ```
20
+
@@ -0,0 +1,20 @@
1
+ # Zyphr::InboundEmailListResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **data** | [**Array&lt;InboundEmail&gt;**](InboundEmail.md) | | [optional] |
8
+ | **meta** | [**InboundEmailListResponseMeta**](InboundEmailListResponseMeta.md) | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zyphr'
14
+
15
+ instance = Zyphr::InboundEmailListResponse.new(
16
+ data: null,
17
+ meta: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,24 @@
1
+ # Zyphr::InboundEmailListResponseMeta
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **request_id** | **String** | | [optional] |
8
+ | **total** | **Integer** | | [optional] |
9
+ | **limit** | **Integer** | | [optional] |
10
+ | **offset** | **Integer** | | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'zyphr'
16
+
17
+ instance = Zyphr::InboundEmailListResponseMeta.new(
18
+ request_id: null,
19
+ total: null,
20
+ limit: null,
21
+ offset: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,20 @@
1
+ # Zyphr::InboundEmailResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **data** | [**InboundEmail**](InboundEmail.md) | | [optional] |
8
+ | **meta** | [**RequestMeta**](RequestMeta.md) | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zyphr'
14
+
15
+ instance = Zyphr::InboundEmailResponse.new(
16
+ data: null,
17
+ meta: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,18 @@
1
+ # Zyphr::SetDomainInboundRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **enabled** | **Boolean** | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'zyphr'
13
+
14
+ instance = Zyphr::SetDomainInboundRequest.new(
15
+ enabled: null
16
+ )
17
+ ```
18
+
@@ -333,6 +333,78 @@ module Zyphr
333
333
  return data, status_code, headers
334
334
  end
335
335
 
336
+ # Enable or disable inbound email for a domain
337
+ # Toggle email receiving for a domain. When enabled, the domain's DNS records gain an MX record on the `inbound.` subdomain that the tenant must publish. Requires a plan with inbound email (Starter+).
338
+ # @param id [String]
339
+ # @param set_domain_inbound_request [SetDomainInboundRequest]
340
+ # @param [Hash] opts the optional parameters
341
+ # @return [nil]
342
+ def set_domain_inbound(id, set_domain_inbound_request, opts = {})
343
+ set_domain_inbound_with_http_info(id, set_domain_inbound_request, opts)
344
+ nil
345
+ end
346
+
347
+ # Enable or disable inbound email for a domain
348
+ # Toggle email receiving for a domain. When enabled, the domain&#39;s DNS records gain an MX record on the &#x60;inbound.&#x60; subdomain that the tenant must publish. Requires a plan with inbound email (Starter+).
349
+ # @param id [String]
350
+ # @param set_domain_inbound_request [SetDomainInboundRequest]
351
+ # @param [Hash] opts the optional parameters
352
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
353
+ def set_domain_inbound_with_http_info(id, set_domain_inbound_request, opts = {})
354
+ if @api_client.config.debugging
355
+ @api_client.config.logger.debug 'Calling API: DomainsApi.set_domain_inbound ...'
356
+ end
357
+ # verify the required parameter 'id' is set
358
+ if @api_client.config.client_side_validation && id.nil?
359
+ fail ArgumentError, "Missing the required parameter 'id' when calling DomainsApi.set_domain_inbound"
360
+ end
361
+ # verify the required parameter 'set_domain_inbound_request' is set
362
+ if @api_client.config.client_side_validation && set_domain_inbound_request.nil?
363
+ fail ArgumentError, "Missing the required parameter 'set_domain_inbound_request' when calling DomainsApi.set_domain_inbound"
364
+ end
365
+ # resource path
366
+ local_var_path = '/domains/{id}/inbound'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
367
+
368
+ # query parameters
369
+ query_params = opts[:query_params] || {}
370
+
371
+ # header parameters
372
+ header_params = opts[:header_params] || {}
373
+ # HTTP header 'Content-Type'
374
+ content_type = @api_client.select_header_content_type(['application/json'])
375
+ if !content_type.nil?
376
+ header_params['Content-Type'] = content_type
377
+ end
378
+
379
+ # form parameters
380
+ form_params = opts[:form_params] || {}
381
+
382
+ # http body (model)
383
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(set_domain_inbound_request)
384
+
385
+ # return_type
386
+ return_type = opts[:debug_return_type]
387
+
388
+ # auth_names
389
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
390
+
391
+ new_options = opts.merge(
392
+ :operation => :"DomainsApi.set_domain_inbound",
393
+ :header_params => header_params,
394
+ :query_params => query_params,
395
+ :form_params => form_params,
396
+ :body => post_body,
397
+ :auth_names => auth_names,
398
+ :return_type => return_type
399
+ )
400
+
401
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
402
+ if @api_client.config.debugging
403
+ @api_client.config.logger.debug "API called: DomainsApi#set_domain_inbound\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
404
+ end
405
+ return data, status_code, headers
406
+ end
407
+
336
408
  # Trigger domain verification
337
409
  # Queue an asynchronous DNS verification check. Returns immediately with a `job_id`. Poll `GET /v1/domains/{id}/verification-status` (or the higher-level `GET /v1/domains/{id}`) for the result, or subscribe to the `domain.verified` webhook event when sc-5444 ships. Returns 409 if a verification is already in progress for this domain (within the last 2 minutes).
338
410
  # @param id [String]