mailslurp_client 11.3.0 → 11.4.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mailslurp_client.rb +2 -0
- data/lib/mailslurp_client/api/domain_controller_api.rb +132 -0
- data/lib/mailslurp_client/api/email_controller_api.rb +118 -0
- data/lib/mailslurp_client/api/expired_controller_api.rb +56 -0
- data/lib/mailslurp_client/models/create_domain_options.rb +23 -3
- data/lib/mailslurp_client/models/domain_dto.rb +11 -1
- data/lib/mailslurp_client/models/domain_preview.rb +10 -1
- data/lib/mailslurp_client/models/expiration_defaults.rb +239 -0
- data/lib/mailslurp_client/models/update_domain_options.rb +207 -0
- data/lib/mailslurp_client/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2da731dff90969b8f7ece76112633982a89aa6f5faa39e634bba48737ad300c0
|
4
|
+
data.tar.gz: '09574268041d0eca430831e5a4d4da6ea3643b4edc796c5390472c347cbcdea3'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1fdeb81662de3fe43c6a2970561d8c303d9e81b644b2fbd6cf328c985d4122aa9a7e7ce145b678d3b272a6c877dc23274b02eb9a3887673984c331435ebd9ee
|
7
|
+
data.tar.gz: 7b9b70496a328e08302a0fed779614ec3042738b2ca4aa334ac40eb18087032b752f6343524b1069a27d8f12381f4bbc9a82a2e4a503003a7feb829d5092217d
|
data/lib/mailslurp_client.rb
CHANGED
@@ -48,6 +48,7 @@ require 'mailslurp_client/models/email_preview'
|
|
48
48
|
require 'mailslurp_client/models/email_projection'
|
49
49
|
require 'mailslurp_client/models/email_text_lines_result'
|
50
50
|
require 'mailslurp_client/models/email_verification_result'
|
51
|
+
require 'mailslurp_client/models/expiration_defaults'
|
51
52
|
require 'mailslurp_client/models/expired_inbox_dto'
|
52
53
|
require 'mailslurp_client/models/expired_inbox_record_projection'
|
53
54
|
require 'mailslurp_client/models/forward_email_options'
|
@@ -89,6 +90,7 @@ require 'mailslurp_client/models/template_variable'
|
|
89
90
|
require 'mailslurp_client/models/thread_projection'
|
90
91
|
require 'mailslurp_client/models/unread_count'
|
91
92
|
require 'mailslurp_client/models/update_alias_options'
|
93
|
+
require 'mailslurp_client/models/update_domain_options'
|
92
94
|
require 'mailslurp_client/models/update_group_contacts'
|
93
95
|
require 'mailslurp_client/models/update_inbox_options'
|
94
96
|
require 'mailslurp_client/models/upload_attachment_options'
|
@@ -19,6 +19,68 @@ module MailSlurpClient
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
+
# Add catch all wild card inbox to domain
|
23
|
+
# Add a catch all inbox to a domain so that any emails sent to it that cannot be matched will be sent to the catch all inbox generated
|
24
|
+
# @param id [String] id
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [DomainDto]
|
27
|
+
def add_domain_wildcard_catch_all(id, opts = {})
|
28
|
+
data, _status_code, _headers = add_domain_wildcard_catch_all_with_http_info(id, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Add catch all wild card inbox to domain
|
33
|
+
# Add a catch all inbox to a domain so that any emails sent to it that cannot be matched will be sent to the catch all inbox generated
|
34
|
+
# @param id [String] id
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(DomainDto, Integer, Hash)>] DomainDto data, response status code and response headers
|
37
|
+
def add_domain_wildcard_catch_all_with_http_info(id, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: DomainControllerApi.add_domain_wildcard_catch_all ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'id' is set
|
42
|
+
if @api_client.config.client_side_validation && id.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling DomainControllerApi.add_domain_wildcard_catch_all"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/domains/{id}/wildcard'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = opts[:query_params] || {}
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = opts[:header_params] || {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
55
|
+
|
56
|
+
# form parameters
|
57
|
+
form_params = opts[:form_params] || {}
|
58
|
+
|
59
|
+
# http body (model)
|
60
|
+
post_body = opts[:body]
|
61
|
+
|
62
|
+
# return_type
|
63
|
+
return_type = opts[:return_type] || 'DomainDto'
|
64
|
+
|
65
|
+
# auth_names
|
66
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
67
|
+
|
68
|
+
new_options = opts.merge(
|
69
|
+
:header_params => header_params,
|
70
|
+
:query_params => query_params,
|
71
|
+
:form_params => form_params,
|
72
|
+
:body => post_body,
|
73
|
+
:auth_names => auth_names,
|
74
|
+
:return_type => return_type
|
75
|
+
)
|
76
|
+
|
77
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
78
|
+
if @api_client.config.debugging
|
79
|
+
@api_client.config.logger.debug "API called: DomainControllerApi#add_domain_wildcard_catch_all\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
80
|
+
end
|
81
|
+
return data, status_code, headers
|
82
|
+
end
|
83
|
+
|
22
84
|
# Create Domain
|
23
85
|
# Link a domain that you own with MailSlurp so you can create email addresses using it. Endpoint returns DNS records used for validation. You must add these verification records to your host provider's DNS setup to verify the domain.
|
24
86
|
# @param domain_options [CreateDomainOptions] domainOptions
|
@@ -262,5 +324,75 @@ module MailSlurpClient
|
|
262
324
|
end
|
263
325
|
return data, status_code, headers
|
264
326
|
end
|
327
|
+
|
328
|
+
# Update a domain
|
329
|
+
# Update values on a domain. Note you cannot change the domain name as it is immutable. Recreate the domain if you need to alter this.
|
330
|
+
# @param id [String] id
|
331
|
+
# @param update_domain_dto [UpdateDomainOptions] updateDomainDto
|
332
|
+
# @param [Hash] opts the optional parameters
|
333
|
+
# @return [DomainDto]
|
334
|
+
def update_domain(id, update_domain_dto, opts = {})
|
335
|
+
data, _status_code, _headers = update_domain_with_http_info(id, update_domain_dto, opts)
|
336
|
+
data
|
337
|
+
end
|
338
|
+
|
339
|
+
# Update a domain
|
340
|
+
# Update values on a domain. Note you cannot change the domain name as it is immutable. Recreate the domain if you need to alter this.
|
341
|
+
# @param id [String] id
|
342
|
+
# @param update_domain_dto [UpdateDomainOptions] updateDomainDto
|
343
|
+
# @param [Hash] opts the optional parameters
|
344
|
+
# @return [Array<(DomainDto, Integer, Hash)>] DomainDto data, response status code and response headers
|
345
|
+
def update_domain_with_http_info(id, update_domain_dto, opts = {})
|
346
|
+
if @api_client.config.debugging
|
347
|
+
@api_client.config.logger.debug 'Calling API: DomainControllerApi.update_domain ...'
|
348
|
+
end
|
349
|
+
# verify the required parameter 'id' is set
|
350
|
+
if @api_client.config.client_side_validation && id.nil?
|
351
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling DomainControllerApi.update_domain"
|
352
|
+
end
|
353
|
+
# verify the required parameter 'update_domain_dto' is set
|
354
|
+
if @api_client.config.client_side_validation && update_domain_dto.nil?
|
355
|
+
fail ArgumentError, "Missing the required parameter 'update_domain_dto' when calling DomainControllerApi.update_domain"
|
356
|
+
end
|
357
|
+
# resource path
|
358
|
+
local_var_path = '/domains/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
359
|
+
|
360
|
+
# query parameters
|
361
|
+
query_params = opts[:query_params] || {}
|
362
|
+
|
363
|
+
# header parameters
|
364
|
+
header_params = opts[:header_params] || {}
|
365
|
+
# HTTP header 'Accept' (if needed)
|
366
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
367
|
+
# HTTP header 'Content-Type'
|
368
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
369
|
+
|
370
|
+
# form parameters
|
371
|
+
form_params = opts[:form_params] || {}
|
372
|
+
|
373
|
+
# http body (model)
|
374
|
+
post_body = opts[:body] || @api_client.object_to_http_body(update_domain_dto)
|
375
|
+
|
376
|
+
# return_type
|
377
|
+
return_type = opts[:return_type] || 'DomainDto'
|
378
|
+
|
379
|
+
# auth_names
|
380
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
381
|
+
|
382
|
+
new_options = opts.merge(
|
383
|
+
:header_params => header_params,
|
384
|
+
:query_params => query_params,
|
385
|
+
:form_params => form_params,
|
386
|
+
:body => post_body,
|
387
|
+
:auth_names => auth_names,
|
388
|
+
:return_type => return_type
|
389
|
+
)
|
390
|
+
|
391
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
392
|
+
if @api_client.config.debugging
|
393
|
+
@api_client.config.logger.debug "API called: DomainControllerApi#update_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
394
|
+
end
|
395
|
+
return data, status_code, headers
|
396
|
+
end
|
265
397
|
end
|
266
398
|
end
|
@@ -878,6 +878,124 @@ module MailSlurpClient
|
|
878
878
|
return data, status_code, headers
|
879
879
|
end
|
880
880
|
|
881
|
+
# Get latest email
|
882
|
+
# Get the newest email in all inboxes or in a passed set of inbox IDs
|
883
|
+
# @param [Hash] opts the optional parameters
|
884
|
+
# @option opts [Array<String>] :inbox_ids Optional set of inboxes to filter by. Only get the latest email from these inbox IDs
|
885
|
+
# @return [Email]
|
886
|
+
def get_latest_email(opts = {})
|
887
|
+
data, _status_code, _headers = get_latest_email_with_http_info(opts)
|
888
|
+
data
|
889
|
+
end
|
890
|
+
|
891
|
+
# Get latest email
|
892
|
+
# Get the newest email in all inboxes or in a passed set of inbox IDs
|
893
|
+
# @param [Hash] opts the optional parameters
|
894
|
+
# @option opts [Array<String>] :inbox_ids Optional set of inboxes to filter by. Only get the latest email from these inbox IDs
|
895
|
+
# @return [Array<(Email, Integer, Hash)>] Email data, response status code and response headers
|
896
|
+
def get_latest_email_with_http_info(opts = {})
|
897
|
+
if @api_client.config.debugging
|
898
|
+
@api_client.config.logger.debug 'Calling API: EmailControllerApi.get_latest_email ...'
|
899
|
+
end
|
900
|
+
# resource path
|
901
|
+
local_var_path = '/emails/latest'
|
902
|
+
|
903
|
+
# query parameters
|
904
|
+
query_params = opts[:query_params] || {}
|
905
|
+
query_params[:'inboxIds'] = @api_client.build_collection_param(opts[:'inbox_ids'], :multi) if !opts[:'inbox_ids'].nil?
|
906
|
+
|
907
|
+
# header parameters
|
908
|
+
header_params = opts[:header_params] || {}
|
909
|
+
# HTTP header 'Accept' (if needed)
|
910
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
911
|
+
|
912
|
+
# form parameters
|
913
|
+
form_params = opts[:form_params] || {}
|
914
|
+
|
915
|
+
# http body (model)
|
916
|
+
post_body = opts[:body]
|
917
|
+
|
918
|
+
# return_type
|
919
|
+
return_type = opts[:return_type] || 'Email'
|
920
|
+
|
921
|
+
# auth_names
|
922
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
923
|
+
|
924
|
+
new_options = opts.merge(
|
925
|
+
:header_params => header_params,
|
926
|
+
:query_params => query_params,
|
927
|
+
:form_params => form_params,
|
928
|
+
:body => post_body,
|
929
|
+
:auth_names => auth_names,
|
930
|
+
:return_type => return_type
|
931
|
+
)
|
932
|
+
|
933
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
934
|
+
if @api_client.config.debugging
|
935
|
+
@api_client.config.logger.debug "API called: EmailControllerApi#get_latest_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
936
|
+
end
|
937
|
+
return data, status_code, headers
|
938
|
+
end
|
939
|
+
|
940
|
+
# Get latest email
|
941
|
+
# Get the newest email in all inboxes or in a passed set of inbox IDs
|
942
|
+
# @param [Hash] opts the optional parameters
|
943
|
+
# @option opts [String] :inbox_id ID of the inbox you want to get the latest email from
|
944
|
+
# @return [Email]
|
945
|
+
def get_latest_email_in_inbox(opts = {})
|
946
|
+
data, _status_code, _headers = get_latest_email_in_inbox_with_http_info(opts)
|
947
|
+
data
|
948
|
+
end
|
949
|
+
|
950
|
+
# Get latest email
|
951
|
+
# Get the newest email in all inboxes or in a passed set of inbox IDs
|
952
|
+
# @param [Hash] opts the optional parameters
|
953
|
+
# @option opts [String] :inbox_id ID of the inbox you want to get the latest email from
|
954
|
+
# @return [Array<(Email, Integer, Hash)>] Email data, response status code and response headers
|
955
|
+
def get_latest_email_in_inbox_with_http_info(opts = {})
|
956
|
+
if @api_client.config.debugging
|
957
|
+
@api_client.config.logger.debug 'Calling API: EmailControllerApi.get_latest_email_in_inbox ...'
|
958
|
+
end
|
959
|
+
# resource path
|
960
|
+
local_var_path = '/emails/latestIn'
|
961
|
+
|
962
|
+
# query parameters
|
963
|
+
query_params = opts[:query_params] || {}
|
964
|
+
query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
|
965
|
+
|
966
|
+
# header parameters
|
967
|
+
header_params = opts[:header_params] || {}
|
968
|
+
# HTTP header 'Accept' (if needed)
|
969
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
970
|
+
|
971
|
+
# form parameters
|
972
|
+
form_params = opts[:form_params] || {}
|
973
|
+
|
974
|
+
# http body (model)
|
975
|
+
post_body = opts[:body]
|
976
|
+
|
977
|
+
# return_type
|
978
|
+
return_type = opts[:return_type] || 'Email'
|
979
|
+
|
980
|
+
# auth_names
|
981
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
982
|
+
|
983
|
+
new_options = opts.merge(
|
984
|
+
:header_params => header_params,
|
985
|
+
:query_params => query_params,
|
986
|
+
:form_params => form_params,
|
987
|
+
:body => post_body,
|
988
|
+
:auth_names => auth_names,
|
989
|
+
:return_type => return_type
|
990
|
+
)
|
991
|
+
|
992
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
993
|
+
if @api_client.config.debugging
|
994
|
+
@api_client.config.logger.debug "API called: EmailControllerApi#get_latest_email_in_inbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
995
|
+
end
|
996
|
+
return data, status_code, headers
|
997
|
+
end
|
998
|
+
|
881
999
|
# Get raw email string
|
882
1000
|
# Returns a raw, unparsed, and unprocessed email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawEmailJson endpoint
|
883
1001
|
# @param email_id [String] ID of email
|
@@ -19,6 +19,62 @@ module MailSlurpClient
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
+
# Get default expiration settings
|
23
|
+
# Return default times used for inbox expiration
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @return [ExpirationDefaults]
|
26
|
+
def get_expiration_defaults(opts = {})
|
27
|
+
data, _status_code, _headers = get_expiration_defaults_with_http_info(opts)
|
28
|
+
data
|
29
|
+
end
|
30
|
+
|
31
|
+
# Get default expiration settings
|
32
|
+
# Return default times used for inbox expiration
|
33
|
+
# @param [Hash] opts the optional parameters
|
34
|
+
# @return [Array<(ExpirationDefaults, Integer, Hash)>] ExpirationDefaults data, response status code and response headers
|
35
|
+
def get_expiration_defaults_with_http_info(opts = {})
|
36
|
+
if @api_client.config.debugging
|
37
|
+
@api_client.config.logger.debug 'Calling API: ExpiredControllerApi.get_expiration_defaults ...'
|
38
|
+
end
|
39
|
+
# resource path
|
40
|
+
local_var_path = '/expired/defaults'
|
41
|
+
|
42
|
+
# query parameters
|
43
|
+
query_params = opts[:query_params] || {}
|
44
|
+
|
45
|
+
# header parameters
|
46
|
+
header_params = opts[:header_params] || {}
|
47
|
+
# HTTP header 'Accept' (if needed)
|
48
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
49
|
+
|
50
|
+
# form parameters
|
51
|
+
form_params = opts[:form_params] || {}
|
52
|
+
|
53
|
+
# http body (model)
|
54
|
+
post_body = opts[:body]
|
55
|
+
|
56
|
+
# return_type
|
57
|
+
return_type = opts[:return_type] || 'ExpirationDefaults'
|
58
|
+
|
59
|
+
# auth_names
|
60
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
61
|
+
|
62
|
+
new_options = opts.merge(
|
63
|
+
:header_params => header_params,
|
64
|
+
:query_params => query_params,
|
65
|
+
:form_params => form_params,
|
66
|
+
:body => post_body,
|
67
|
+
:auth_names => auth_names,
|
68
|
+
:return_type => return_type
|
69
|
+
)
|
70
|
+
|
71
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
72
|
+
if @api_client.config.debugging
|
73
|
+
@api_client.config.logger.debug "API called: ExpiredControllerApi#get_expiration_defaults\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
74
|
+
end
|
75
|
+
return data, status_code, headers
|
76
|
+
end
|
77
|
+
|
22
78
|
# Get expired inbox record for a previously existing inbox
|
23
79
|
# Use the inboxId to return an ExpiredInboxRecord if an inbox has expired. Inboxes expire and are disabled if an expiration date is set or plan requires. Returns 404 if no expired inbox is found for the inboxId
|
24
80
|
# @param inbox_id [String] ID of inbox you want to retrieve (not the inbox ID)
|
@@ -13,14 +13,22 @@ OpenAPI Generator version: 4.3.1
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module MailSlurpClient
|
16
|
-
# Options for creating a domain to use with MailSlurp. You must have ownership access to this domain in order to verify it.
|
16
|
+
# Options for creating a domain to use with MailSlurp. You must have ownership access to this domain in order to verify it. Domains will not functionally currently until the domain has been verified. See https://www.mailslurp.com/guides/custom-domains for help.
|
17
17
|
class CreateDomainOptions
|
18
|
-
#
|
18
|
+
# Whether to create a catch all inbox for the domain. Any email sent to an address using your domain that cannot be matched to an existing inbox you created with the domain will be routed to the created catch all inbox. You can access emails using the regular methods on this inbox ID.
|
19
|
+
attr_accessor :created_catch_all_inbox
|
20
|
+
|
21
|
+
# Optional description of the domain.
|
22
|
+
attr_accessor :description
|
23
|
+
|
24
|
+
# The top level domain you wish to use with MailSlurp. Do not specify subdomain just the top level. So `test.com` covers all subdomains such as `mail.test.com`. Don't include a protocol such as `http://`. Once added you must complete the verification steps by adding the returned records to your domain.
|
19
25
|
attr_accessor :domain
|
20
26
|
|
21
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
22
28
|
def self.attribute_map
|
23
29
|
{
|
30
|
+
:'created_catch_all_inbox' => :'createdCatchAllInbox',
|
31
|
+
:'description' => :'description',
|
24
32
|
:'domain' => :'domain'
|
25
33
|
}
|
26
34
|
end
|
@@ -28,6 +36,8 @@ module MailSlurpClient
|
|
28
36
|
# Attribute type mapping.
|
29
37
|
def self.openapi_types
|
30
38
|
{
|
39
|
+
:'created_catch_all_inbox' => :'Boolean',
|
40
|
+
:'description' => :'String',
|
31
41
|
:'domain' => :'String'
|
32
42
|
}
|
33
43
|
end
|
@@ -53,6 +63,14 @@ module MailSlurpClient
|
|
53
63
|
h[k.to_sym] = v
|
54
64
|
}
|
55
65
|
|
66
|
+
if attributes.key?(:'created_catch_all_inbox')
|
67
|
+
self.created_catch_all_inbox = attributes[:'created_catch_all_inbox']
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes.key?(:'description')
|
71
|
+
self.description = attributes[:'description']
|
72
|
+
end
|
73
|
+
|
56
74
|
if attributes.key?(:'domain')
|
57
75
|
self.domain = attributes[:'domain']
|
58
76
|
end
|
@@ -76,6 +94,8 @@ module MailSlurpClient
|
|
76
94
|
def ==(o)
|
77
95
|
return true if self.equal?(o)
|
78
96
|
self.class == o.class &&
|
97
|
+
created_catch_all_inbox == o.created_catch_all_inbox &&
|
98
|
+
description == o.description &&
|
79
99
|
domain == o.domain
|
80
100
|
end
|
81
101
|
|
@@ -88,7 +108,7 @@ module MailSlurpClient
|
|
88
108
|
# Calculates hash code according to all attributes.
|
89
109
|
# @return [Integer] Hash code
|
90
110
|
def hash
|
91
|
-
[domain].hash
|
111
|
+
[created_catch_all_inbox, description, domain].hash
|
92
112
|
end
|
93
113
|
|
94
114
|
# Builds the object from hash
|
@@ -15,6 +15,9 @@ require 'date'
|
|
15
15
|
module MailSlurpClient
|
16
16
|
# Domain plus verification records and status
|
17
17
|
class DomainDto
|
18
|
+
# The optional catch all inbox that will receive emails sent to the domain that cannot be matched.
|
19
|
+
attr_accessor :catch_all_inbox_id
|
20
|
+
|
18
21
|
attr_accessor :created_at
|
19
22
|
|
20
23
|
# Unique token DKIM tokens
|
@@ -41,6 +44,7 @@ module MailSlurpClient
|
|
41
44
|
# Attribute mapping from ruby-style variable name to JSON key.
|
42
45
|
def self.attribute_map
|
43
46
|
{
|
47
|
+
:'catch_all_inbox_id' => :'catchAllInboxId',
|
44
48
|
:'created_at' => :'createdAt',
|
45
49
|
:'dkim_tokens' => :'dkimTokens',
|
46
50
|
:'domain' => :'domain',
|
@@ -56,6 +60,7 @@ module MailSlurpClient
|
|
56
60
|
# Attribute type mapping.
|
57
61
|
def self.openapi_types
|
58
62
|
{
|
63
|
+
:'catch_all_inbox_id' => :'String',
|
59
64
|
:'created_at' => :'DateTime',
|
60
65
|
:'dkim_tokens' => :'Array<String>',
|
61
66
|
:'domain' => :'String',
|
@@ -89,6 +94,10 @@ module MailSlurpClient
|
|
89
94
|
h[k.to_sym] = v
|
90
95
|
}
|
91
96
|
|
97
|
+
if attributes.key?(:'catch_all_inbox_id')
|
98
|
+
self.catch_all_inbox_id = attributes[:'catch_all_inbox_id']
|
99
|
+
end
|
100
|
+
|
92
101
|
if attributes.key?(:'created_at')
|
93
102
|
self.created_at = attributes[:'created_at']
|
94
103
|
end
|
@@ -168,6 +177,7 @@ module MailSlurpClient
|
|
168
177
|
def ==(o)
|
169
178
|
return true if self.equal?(o)
|
170
179
|
self.class == o.class &&
|
180
|
+
catch_all_inbox_id == o.catch_all_inbox_id &&
|
171
181
|
created_at == o.created_at &&
|
172
182
|
dkim_tokens == o.dkim_tokens &&
|
173
183
|
domain == o.domain &&
|
@@ -188,7 +198,7 @@ module MailSlurpClient
|
|
188
198
|
# Calculates hash code according to all attributes.
|
189
199
|
# @return [Integer] Hash code
|
190
200
|
def hash
|
191
|
-
[created_at, dkim_tokens, domain, domain_name_records, id, is_verified, updated_at, user_id, verification_token].hash
|
201
|
+
[catch_all_inbox_id, created_at, dkim_tokens, domain, domain_name_records, id, is_verified, updated_at, user_id, verification_token].hash
|
192
202
|
end
|
193
203
|
|
194
204
|
# Builds the object from hash
|
@@ -15,6 +15,8 @@ require 'date'
|
|
15
15
|
module MailSlurpClient
|
16
16
|
# Preview object for domain entity
|
17
17
|
class DomainPreview
|
18
|
+
attr_accessor :catch_all_inbox_id
|
19
|
+
|
18
20
|
attr_accessor :created_at
|
19
21
|
|
20
22
|
attr_accessor :domain
|
@@ -24,6 +26,7 @@ module MailSlurpClient
|
|
24
26
|
# Attribute mapping from ruby-style variable name to JSON key.
|
25
27
|
def self.attribute_map
|
26
28
|
{
|
29
|
+
:'catch_all_inbox_id' => :'catchAllInboxId',
|
27
30
|
:'created_at' => :'createdAt',
|
28
31
|
:'domain' => :'domain',
|
29
32
|
:'id' => :'id'
|
@@ -33,6 +36,7 @@ module MailSlurpClient
|
|
33
36
|
# Attribute type mapping.
|
34
37
|
def self.openapi_types
|
35
38
|
{
|
39
|
+
:'catch_all_inbox_id' => :'String',
|
36
40
|
:'created_at' => :'DateTime',
|
37
41
|
:'domain' => :'String',
|
38
42
|
:'id' => :'String'
|
@@ -60,6 +64,10 @@ module MailSlurpClient
|
|
60
64
|
h[k.to_sym] = v
|
61
65
|
}
|
62
66
|
|
67
|
+
if attributes.key?(:'catch_all_inbox_id')
|
68
|
+
self.catch_all_inbox_id = attributes[:'catch_all_inbox_id']
|
69
|
+
end
|
70
|
+
|
63
71
|
if attributes.key?(:'created_at')
|
64
72
|
self.created_at = attributes[:'created_at']
|
65
73
|
end
|
@@ -106,6 +114,7 @@ module MailSlurpClient
|
|
106
114
|
def ==(o)
|
107
115
|
return true if self.equal?(o)
|
108
116
|
self.class == o.class &&
|
117
|
+
catch_all_inbox_id == o.catch_all_inbox_id &&
|
109
118
|
created_at == o.created_at &&
|
110
119
|
domain == o.domain &&
|
111
120
|
id == o.id
|
@@ -120,7 +129,7 @@ module MailSlurpClient
|
|
120
129
|
# Calculates hash code according to all attributes.
|
121
130
|
# @return [Integer] Hash code
|
122
131
|
def hash
|
123
|
-
[created_at, domain, id].hash
|
132
|
+
[catch_all_inbox_id, created_at, domain, id].hash
|
124
133
|
end
|
125
134
|
|
126
135
|
# Builds the object from hash
|
@@ -0,0 +1,239 @@
|
|
1
|
+
=begin
|
2
|
+
#MailSlurp API
|
3
|
+
|
4
|
+
#MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 6.5.2
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module MailSlurpClient
|
16
|
+
# Expiration defaults for your account
|
17
|
+
class ExpirationDefaults
|
18
|
+
attr_accessor :can_permanent_inbox
|
19
|
+
|
20
|
+
attr_accessor :default_expiration_millis
|
21
|
+
|
22
|
+
attr_accessor :default_expires_at
|
23
|
+
|
24
|
+
attr_accessor :max_expiration_millis
|
25
|
+
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
27
|
+
def self.attribute_map
|
28
|
+
{
|
29
|
+
:'can_permanent_inbox' => :'canPermanentInbox',
|
30
|
+
:'default_expiration_millis' => :'defaultExpirationMillis',
|
31
|
+
:'default_expires_at' => :'defaultExpiresAt',
|
32
|
+
:'max_expiration_millis' => :'maxExpirationMillis'
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
# Attribute type mapping.
|
37
|
+
def self.openapi_types
|
38
|
+
{
|
39
|
+
:'can_permanent_inbox' => :'Boolean',
|
40
|
+
:'default_expiration_millis' => :'Integer',
|
41
|
+
:'default_expires_at' => :'DateTime',
|
42
|
+
:'max_expiration_millis' => :'Integer'
|
43
|
+
}
|
44
|
+
end
|
45
|
+
|
46
|
+
# List of attributes with nullable: true
|
47
|
+
def self.openapi_nullable
|
48
|
+
Set.new([
|
49
|
+
])
|
50
|
+
end
|
51
|
+
|
52
|
+
# Initializes the object
|
53
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
54
|
+
def initialize(attributes = {})
|
55
|
+
if (!attributes.is_a?(Hash))
|
56
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::ExpirationDefaults` initialize method"
|
57
|
+
end
|
58
|
+
|
59
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
61
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::ExpirationDefaults`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
63
|
+
end
|
64
|
+
h[k.to_sym] = v
|
65
|
+
}
|
66
|
+
|
67
|
+
if attributes.key?(:'can_permanent_inbox')
|
68
|
+
self.can_permanent_inbox = attributes[:'can_permanent_inbox']
|
69
|
+
end
|
70
|
+
|
71
|
+
if attributes.key?(:'default_expiration_millis')
|
72
|
+
self.default_expiration_millis = attributes[:'default_expiration_millis']
|
73
|
+
end
|
74
|
+
|
75
|
+
if attributes.key?(:'default_expires_at')
|
76
|
+
self.default_expires_at = attributes[:'default_expires_at']
|
77
|
+
end
|
78
|
+
|
79
|
+
if attributes.key?(:'max_expiration_millis')
|
80
|
+
self.max_expiration_millis = attributes[:'max_expiration_millis']
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
85
|
+
# @return Array for valid properties with the reasons
|
86
|
+
def list_invalid_properties
|
87
|
+
invalid_properties = Array.new
|
88
|
+
if @can_permanent_inbox.nil?
|
89
|
+
invalid_properties.push('invalid value for "can_permanent_inbox", can_permanent_inbox cannot be nil.')
|
90
|
+
end
|
91
|
+
|
92
|
+
invalid_properties
|
93
|
+
end
|
94
|
+
|
95
|
+
# Check to see if the all the properties in the model are valid
|
96
|
+
# @return true if the model is valid
|
97
|
+
def valid?
|
98
|
+
return false if @can_permanent_inbox.nil?
|
99
|
+
true
|
100
|
+
end
|
101
|
+
|
102
|
+
# Checks equality by comparing each attribute.
|
103
|
+
# @param [Object] Object to be compared
|
104
|
+
def ==(o)
|
105
|
+
return true if self.equal?(o)
|
106
|
+
self.class == o.class &&
|
107
|
+
can_permanent_inbox == o.can_permanent_inbox &&
|
108
|
+
default_expiration_millis == o.default_expiration_millis &&
|
109
|
+
default_expires_at == o.default_expires_at &&
|
110
|
+
max_expiration_millis == o.max_expiration_millis
|
111
|
+
end
|
112
|
+
|
113
|
+
# @see the `==` method
|
114
|
+
# @param [Object] Object to be compared
|
115
|
+
def eql?(o)
|
116
|
+
self == o
|
117
|
+
end
|
118
|
+
|
119
|
+
# Calculates hash code according to all attributes.
|
120
|
+
# @return [Integer] Hash code
|
121
|
+
def hash
|
122
|
+
[can_permanent_inbox, default_expiration_millis, default_expires_at, max_expiration_millis].hash
|
123
|
+
end
|
124
|
+
|
125
|
+
# Builds the object from hash
|
126
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
127
|
+
# @return [Object] Returns the model itself
|
128
|
+
def self.build_from_hash(attributes)
|
129
|
+
new.build_from_hash(attributes)
|
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 build_from_hash(attributes)
|
136
|
+
return nil unless attributes.is_a?(Hash)
|
137
|
+
self.class.openapi_types.each_pair do |key, type|
|
138
|
+
if type =~ /\AArray<(.*)>/i
|
139
|
+
# check to ensure the input is an array given that the attribute
|
140
|
+
# is documented as an array but the input is not
|
141
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
142
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
143
|
+
end
|
144
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
145
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
146
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
147
|
+
end
|
148
|
+
|
149
|
+
self
|
150
|
+
end
|
151
|
+
|
152
|
+
# Deserializes the data based on type
|
153
|
+
# @param string type Data type
|
154
|
+
# @param string value Value to be deserialized
|
155
|
+
# @return [Object] Deserialized data
|
156
|
+
def _deserialize(type, value)
|
157
|
+
case type.to_sym
|
158
|
+
when :DateTime
|
159
|
+
DateTime.parse(value)
|
160
|
+
when :Date
|
161
|
+
Date.parse(value)
|
162
|
+
when :String
|
163
|
+
value.to_s
|
164
|
+
when :Integer
|
165
|
+
value.to_i
|
166
|
+
when :Float
|
167
|
+
value.to_f
|
168
|
+
when :Boolean
|
169
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
170
|
+
true
|
171
|
+
else
|
172
|
+
false
|
173
|
+
end
|
174
|
+
when :Object
|
175
|
+
# generic object (usually a Hash), return directly
|
176
|
+
value
|
177
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
178
|
+
inner_type = Regexp.last_match[:inner_type]
|
179
|
+
value.map { |v| _deserialize(inner_type, v) }
|
180
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
181
|
+
k_type = Regexp.last_match[:k_type]
|
182
|
+
v_type = Regexp.last_match[:v_type]
|
183
|
+
{}.tap do |hash|
|
184
|
+
value.each do |k, v|
|
185
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
186
|
+
end
|
187
|
+
end
|
188
|
+
else # model
|
189
|
+
MailSlurpClient.const_get(type).build_from_hash(value)
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
# Returns the string representation of the object
|
194
|
+
# @return [String] String presentation of the object
|
195
|
+
def to_s
|
196
|
+
to_hash.to_s
|
197
|
+
end
|
198
|
+
|
199
|
+
# to_body is an alias to to_hash (backward compatibility)
|
200
|
+
# @return [Hash] Returns the object in the form of hash
|
201
|
+
def to_body
|
202
|
+
to_hash
|
203
|
+
end
|
204
|
+
|
205
|
+
# Returns the object in the form of hash
|
206
|
+
# @return [Hash] Returns the object in the form of hash
|
207
|
+
def to_hash
|
208
|
+
hash = {}
|
209
|
+
self.class.attribute_map.each_pair do |attr, param|
|
210
|
+
value = self.send(attr)
|
211
|
+
if value.nil?
|
212
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
213
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
214
|
+
end
|
215
|
+
|
216
|
+
hash[param] = _to_hash(value)
|
217
|
+
end
|
218
|
+
hash
|
219
|
+
end
|
220
|
+
|
221
|
+
# Outputs non-array value in the form of hash
|
222
|
+
# For object, use to_hash. Otherwise, just return the value
|
223
|
+
# @param [Object] value Any valid value
|
224
|
+
# @return [Hash] Returns the value in the form of hash
|
225
|
+
def _to_hash(value)
|
226
|
+
if value.is_a?(Array)
|
227
|
+
value.compact.map { |v| _to_hash(v) }
|
228
|
+
elsif value.is_a?(Hash)
|
229
|
+
{}.tap do |hash|
|
230
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
231
|
+
end
|
232
|
+
elsif value.respond_to? :to_hash
|
233
|
+
value.to_hash
|
234
|
+
else
|
235
|
+
value
|
236
|
+
end
|
237
|
+
end
|
238
|
+
end
|
239
|
+
end
|
@@ -0,0 +1,207 @@
|
|
1
|
+
=begin
|
2
|
+
#MailSlurp API
|
3
|
+
|
4
|
+
#MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 6.5.2
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module MailSlurpClient
|
16
|
+
# Options for creating a domain to use with MailSlurp. You must have ownership access to this domain in order to verify it. Domains will not functionally currently until the domain has been verified. See https://www.mailslurp.com/guides/custom-domains for help.
|
17
|
+
class UpdateDomainOptions
|
18
|
+
attr_accessor :catch_all_inbox_id
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'catch_all_inbox_id' => :'catchAllInboxId'
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
# Attribute type mapping.
|
28
|
+
def self.openapi_types
|
29
|
+
{
|
30
|
+
:'catch_all_inbox_id' => :'String'
|
31
|
+
}
|
32
|
+
end
|
33
|
+
|
34
|
+
# List of attributes with nullable: true
|
35
|
+
def self.openapi_nullable
|
36
|
+
Set.new([
|
37
|
+
])
|
38
|
+
end
|
39
|
+
|
40
|
+
# Initializes the object
|
41
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
42
|
+
def initialize(attributes = {})
|
43
|
+
if (!attributes.is_a?(Hash))
|
44
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::UpdateDomainOptions` initialize method"
|
45
|
+
end
|
46
|
+
|
47
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
48
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
49
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
50
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::UpdateDomainOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
51
|
+
end
|
52
|
+
h[k.to_sym] = v
|
53
|
+
}
|
54
|
+
|
55
|
+
if attributes.key?(:'catch_all_inbox_id')
|
56
|
+
self.catch_all_inbox_id = attributes[:'catch_all_inbox_id']
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
61
|
+
# @return Array for valid properties with the reasons
|
62
|
+
def list_invalid_properties
|
63
|
+
invalid_properties = Array.new
|
64
|
+
invalid_properties
|
65
|
+
end
|
66
|
+
|
67
|
+
# Check to see if the all the properties in the model are valid
|
68
|
+
# @return true if the model is valid
|
69
|
+
def valid?
|
70
|
+
true
|
71
|
+
end
|
72
|
+
|
73
|
+
# Checks equality by comparing each attribute.
|
74
|
+
# @param [Object] Object to be compared
|
75
|
+
def ==(o)
|
76
|
+
return true if self.equal?(o)
|
77
|
+
self.class == o.class &&
|
78
|
+
catch_all_inbox_id == o.catch_all_inbox_id
|
79
|
+
end
|
80
|
+
|
81
|
+
# @see the `==` method
|
82
|
+
# @param [Object] Object to be compared
|
83
|
+
def eql?(o)
|
84
|
+
self == o
|
85
|
+
end
|
86
|
+
|
87
|
+
# Calculates hash code according to all attributes.
|
88
|
+
# @return [Integer] Hash code
|
89
|
+
def hash
|
90
|
+
[catch_all_inbox_id].hash
|
91
|
+
end
|
92
|
+
|
93
|
+
# Builds the object from hash
|
94
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
95
|
+
# @return [Object] Returns the model itself
|
96
|
+
def self.build_from_hash(attributes)
|
97
|
+
new.build_from_hash(attributes)
|
98
|
+
end
|
99
|
+
|
100
|
+
# Builds the object from hash
|
101
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
102
|
+
# @return [Object] Returns the model itself
|
103
|
+
def build_from_hash(attributes)
|
104
|
+
return nil unless attributes.is_a?(Hash)
|
105
|
+
self.class.openapi_types.each_pair do |key, type|
|
106
|
+
if type =~ /\AArray<(.*)>/i
|
107
|
+
# check to ensure the input is an array given that the attribute
|
108
|
+
# is documented as an array but the input is not
|
109
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
110
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
111
|
+
end
|
112
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
113
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
114
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
115
|
+
end
|
116
|
+
|
117
|
+
self
|
118
|
+
end
|
119
|
+
|
120
|
+
# Deserializes the data based on type
|
121
|
+
# @param string type Data type
|
122
|
+
# @param string value Value to be deserialized
|
123
|
+
# @return [Object] Deserialized data
|
124
|
+
def _deserialize(type, value)
|
125
|
+
case type.to_sym
|
126
|
+
when :DateTime
|
127
|
+
DateTime.parse(value)
|
128
|
+
when :Date
|
129
|
+
Date.parse(value)
|
130
|
+
when :String
|
131
|
+
value.to_s
|
132
|
+
when :Integer
|
133
|
+
value.to_i
|
134
|
+
when :Float
|
135
|
+
value.to_f
|
136
|
+
when :Boolean
|
137
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
138
|
+
true
|
139
|
+
else
|
140
|
+
false
|
141
|
+
end
|
142
|
+
when :Object
|
143
|
+
# generic object (usually a Hash), return directly
|
144
|
+
value
|
145
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
146
|
+
inner_type = Regexp.last_match[:inner_type]
|
147
|
+
value.map { |v| _deserialize(inner_type, v) }
|
148
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
149
|
+
k_type = Regexp.last_match[:k_type]
|
150
|
+
v_type = Regexp.last_match[:v_type]
|
151
|
+
{}.tap do |hash|
|
152
|
+
value.each do |k, v|
|
153
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
154
|
+
end
|
155
|
+
end
|
156
|
+
else # model
|
157
|
+
MailSlurpClient.const_get(type).build_from_hash(value)
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
|
+
# Returns the string representation of the object
|
162
|
+
# @return [String] String presentation of the object
|
163
|
+
def to_s
|
164
|
+
to_hash.to_s
|
165
|
+
end
|
166
|
+
|
167
|
+
# to_body is an alias to to_hash (backward compatibility)
|
168
|
+
# @return [Hash] Returns the object in the form of hash
|
169
|
+
def to_body
|
170
|
+
to_hash
|
171
|
+
end
|
172
|
+
|
173
|
+
# Returns the object in the form of hash
|
174
|
+
# @return [Hash] Returns the object in the form of hash
|
175
|
+
def to_hash
|
176
|
+
hash = {}
|
177
|
+
self.class.attribute_map.each_pair do |attr, param|
|
178
|
+
value = self.send(attr)
|
179
|
+
if value.nil?
|
180
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
181
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
182
|
+
end
|
183
|
+
|
184
|
+
hash[param] = _to_hash(value)
|
185
|
+
end
|
186
|
+
hash
|
187
|
+
end
|
188
|
+
|
189
|
+
# Outputs non-array value in the form of hash
|
190
|
+
# For object, use to_hash. Otherwise, just return the value
|
191
|
+
# @param [Object] value Any valid value
|
192
|
+
# @return [Hash] Returns the value in the form of hash
|
193
|
+
def _to_hash(value)
|
194
|
+
if value.is_a?(Array)
|
195
|
+
value.compact.map { |v| _to_hash(v) }
|
196
|
+
elsif value.is_a?(Hash)
|
197
|
+
{}.tap do |hash|
|
198
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
199
|
+
end
|
200
|
+
elsif value.respond_to? :to_hash
|
201
|
+
value.to_hash
|
202
|
+
else
|
203
|
+
value
|
204
|
+
end
|
205
|
+
end
|
206
|
+
end
|
207
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mailslurp_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 11.
|
4
|
+
version: 11.4.25
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mailslurp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Create emails addresses in Ruby then send and receive real emails and
|
14
14
|
attachments. See https://www.mailslurp.com/docs/ruby/ for full Ruby documentation.
|
@@ -73,6 +73,7 @@ files:
|
|
73
73
|
- lib/mailslurp_client/models/email_projection.rb
|
74
74
|
- lib/mailslurp_client/models/email_text_lines_result.rb
|
75
75
|
- lib/mailslurp_client/models/email_verification_result.rb
|
76
|
+
- lib/mailslurp_client/models/expiration_defaults.rb
|
76
77
|
- lib/mailslurp_client/models/expired_inbox_dto.rb
|
77
78
|
- lib/mailslurp_client/models/expired_inbox_record_projection.rb
|
78
79
|
- lib/mailslurp_client/models/forward_email_options.rb
|
@@ -114,6 +115,7 @@ files:
|
|
114
115
|
- lib/mailslurp_client/models/thread_projection.rb
|
115
116
|
- lib/mailslurp_client/models/unread_count.rb
|
116
117
|
- lib/mailslurp_client/models/update_alias_options.rb
|
118
|
+
- lib/mailslurp_client/models/update_domain_options.rb
|
117
119
|
- lib/mailslurp_client/models/update_group_contacts.rb
|
118
120
|
- lib/mailslurp_client/models/update_inbox_options.rb
|
119
121
|
- lib/mailslurp_client/models/upload_attachment_options.rb
|