mailslurp_client 11.0.0 → 11.3.0
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/email_controller_api.rb +133 -0
- data/lib/mailslurp_client/api/expired_controller_api.rb +215 -0
- data/lib/mailslurp_client/api/inbox_controller_api.rb +0 -193
- data/lib/mailslurp_client/models/dns_lookup_result.rb +29 -27
- data/lib/mailslurp_client/models/email_text_lines_result.rb +228 -0
- data/lib/mailslurp_client/models/send_email_options.rb +1 -1
- 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: a9cd20c2759d9185cb88d7aefd6b6982c8ee6e10cf8a4fd6acbeaf591f6ac4e9
|
4
|
+
data.tar.gz: 6e225230fb0ba5275566a4e398cbdeb01e6586285bd757b17383ce6d358a61c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2db984622698047a181f5e443c71a86554e280bb87ac15ee3802ccfc9f2111c8d43a179ef3363b0692ad0e03223863c6e42abb7ba5ee2766b6b344fb66c389a2
|
7
|
+
data.tar.gz: efddf2e1871b046523dfc8101b3e57540aa6e77cb5812a32c42e26c2199fabe0facc67aacafa681e372d0cabf80696d610baa5343cccac9f8be6f6fab154b415
|
data/lib/mailslurp_client.rb
CHANGED
@@ -46,6 +46,7 @@ require 'mailslurp_client/models/email_analysis'
|
|
46
46
|
require 'mailslurp_client/models/email_content_match_result'
|
47
47
|
require 'mailslurp_client/models/email_preview'
|
48
48
|
require 'mailslurp_client/models/email_projection'
|
49
|
+
require 'mailslurp_client/models/email_text_lines_result'
|
49
50
|
require 'mailslurp_client/models/email_verification_result'
|
50
51
|
require 'mailslurp_client/models/expired_inbox_dto'
|
51
52
|
require 'mailslurp_client/models/expired_inbox_record_projection'
|
@@ -109,6 +110,7 @@ require 'mailslurp_client/api/common_actions_controller_api'
|
|
109
110
|
require 'mailslurp_client/api/contact_controller_api'
|
110
111
|
require 'mailslurp_client/api/domain_controller_api'
|
111
112
|
require 'mailslurp_client/api/email_controller_api'
|
113
|
+
require 'mailslurp_client/api/expired_controller_api'
|
112
114
|
require 'mailslurp_client/api/form_controller_api'
|
113
115
|
require 'mailslurp_client/api/group_controller_api'
|
114
116
|
require 'mailslurp_client/api/inbox_controller_api'
|
@@ -670,6 +670,139 @@ module MailSlurpClient
|
|
670
670
|
return data, status_code, headers
|
671
671
|
end
|
672
672
|
|
673
|
+
# Parse and return text from an email, stripping HTML and decoding encoded characters
|
674
|
+
# Parse an email body and return the content as an array of text. HTML parsing uses JSoup which supports JQuery/CSS style selectors
|
675
|
+
# @param email_id [String] ID of email to perform HTML query on
|
676
|
+
# @param [Hash] opts the optional parameters
|
677
|
+
# @option opts [String] :html_selector HTML selector to search for. Uses JQuery/JSoup/CSS style selector like '.my-div' to match content. See https://jsoup.org/apidocs/org/jsoup/select/Selector.html for more information.
|
678
|
+
# @return [EmailTextLinesResult]
|
679
|
+
def get_email_html_query(email_id, opts = {})
|
680
|
+
data, _status_code, _headers = get_email_html_query_with_http_info(email_id, opts)
|
681
|
+
data
|
682
|
+
end
|
683
|
+
|
684
|
+
# Parse and return text from an email, stripping HTML and decoding encoded characters
|
685
|
+
# Parse an email body and return the content as an array of text. HTML parsing uses JSoup which supports JQuery/CSS style selectors
|
686
|
+
# @param email_id [String] ID of email to perform HTML query on
|
687
|
+
# @param [Hash] opts the optional parameters
|
688
|
+
# @option opts [String] :html_selector HTML selector to search for. Uses JQuery/JSoup/CSS style selector like '.my-div' to match content. See https://jsoup.org/apidocs/org/jsoup/select/Selector.html for more information.
|
689
|
+
# @return [Array<(EmailTextLinesResult, Integer, Hash)>] EmailTextLinesResult data, response status code and response headers
|
690
|
+
def get_email_html_query_with_http_info(email_id, opts = {})
|
691
|
+
if @api_client.config.debugging
|
692
|
+
@api_client.config.logger.debug 'Calling API: EmailControllerApi.get_email_html_query ...'
|
693
|
+
end
|
694
|
+
# verify the required parameter 'email_id' is set
|
695
|
+
if @api_client.config.client_side_validation && email_id.nil?
|
696
|
+
fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailControllerApi.get_email_html_query"
|
697
|
+
end
|
698
|
+
# resource path
|
699
|
+
local_var_path = '/emails/{emailId}/htmlQuery'.sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))
|
700
|
+
|
701
|
+
# query parameters
|
702
|
+
query_params = opts[:query_params] || {}
|
703
|
+
query_params[:'htmlSelector'] = opts[:'html_selector'] if !opts[:'html_selector'].nil?
|
704
|
+
|
705
|
+
# header parameters
|
706
|
+
header_params = opts[:header_params] || {}
|
707
|
+
# HTTP header 'Accept' (if needed)
|
708
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
709
|
+
|
710
|
+
# form parameters
|
711
|
+
form_params = opts[:form_params] || {}
|
712
|
+
|
713
|
+
# http body (model)
|
714
|
+
post_body = opts[:body]
|
715
|
+
|
716
|
+
# return_type
|
717
|
+
return_type = opts[:return_type] || 'EmailTextLinesResult'
|
718
|
+
|
719
|
+
# auth_names
|
720
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
721
|
+
|
722
|
+
new_options = opts.merge(
|
723
|
+
:header_params => header_params,
|
724
|
+
:query_params => query_params,
|
725
|
+
:form_params => form_params,
|
726
|
+
:body => post_body,
|
727
|
+
:auth_names => auth_names,
|
728
|
+
:return_type => return_type
|
729
|
+
)
|
730
|
+
|
731
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
732
|
+
if @api_client.config.debugging
|
733
|
+
@api_client.config.logger.debug "API called: EmailControllerApi#get_email_html_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
734
|
+
end
|
735
|
+
return data, status_code, headers
|
736
|
+
end
|
737
|
+
|
738
|
+
# Parse and return text from an email, stripping HTML and decoding encoded characters
|
739
|
+
# Parse an email body and return the content as an array of strings. HTML parsing uses JSoup and UNIX line separators.
|
740
|
+
# @param email_id [String] ID of email to fetch text for
|
741
|
+
# @param [Hash] opts the optional parameters
|
742
|
+
# @option opts [Boolean] :decode_html_entities Decode HTML entities
|
743
|
+
# @option opts [String] :line_separator Line separator character
|
744
|
+
# @return [EmailTextLinesResult]
|
745
|
+
def get_email_text_lines(email_id, opts = {})
|
746
|
+
data, _status_code, _headers = get_email_text_lines_with_http_info(email_id, opts)
|
747
|
+
data
|
748
|
+
end
|
749
|
+
|
750
|
+
# Parse and return text from an email, stripping HTML and decoding encoded characters
|
751
|
+
# Parse an email body and return the content as an array of strings. HTML parsing uses JSoup and UNIX line separators.
|
752
|
+
# @param email_id [String] ID of email to fetch text for
|
753
|
+
# @param [Hash] opts the optional parameters
|
754
|
+
# @option opts [Boolean] :decode_html_entities Decode HTML entities
|
755
|
+
# @option opts [String] :line_separator Line separator character
|
756
|
+
# @return [Array<(EmailTextLinesResult, Integer, Hash)>] EmailTextLinesResult data, response status code and response headers
|
757
|
+
def get_email_text_lines_with_http_info(email_id, opts = {})
|
758
|
+
if @api_client.config.debugging
|
759
|
+
@api_client.config.logger.debug 'Calling API: EmailControllerApi.get_email_text_lines ...'
|
760
|
+
end
|
761
|
+
# verify the required parameter 'email_id' is set
|
762
|
+
if @api_client.config.client_side_validation && email_id.nil?
|
763
|
+
fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailControllerApi.get_email_text_lines"
|
764
|
+
end
|
765
|
+
# resource path
|
766
|
+
local_var_path = '/emails/{emailId}/textLines'.sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))
|
767
|
+
|
768
|
+
# query parameters
|
769
|
+
query_params = opts[:query_params] || {}
|
770
|
+
query_params[:'decodeHtmlEntities'] = opts[:'decode_html_entities'] if !opts[:'decode_html_entities'].nil?
|
771
|
+
query_params[:'lineSeparator'] = opts[:'line_separator'] if !opts[:'line_separator'].nil?
|
772
|
+
|
773
|
+
# header parameters
|
774
|
+
header_params = opts[:header_params] || {}
|
775
|
+
# HTTP header 'Accept' (if needed)
|
776
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
777
|
+
|
778
|
+
# form parameters
|
779
|
+
form_params = opts[:form_params] || {}
|
780
|
+
|
781
|
+
# http body (model)
|
782
|
+
post_body = opts[:body]
|
783
|
+
|
784
|
+
# return_type
|
785
|
+
return_type = opts[:return_type] || 'EmailTextLinesResult'
|
786
|
+
|
787
|
+
# auth_names
|
788
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
789
|
+
|
790
|
+
new_options = opts.merge(
|
791
|
+
:header_params => header_params,
|
792
|
+
:query_params => query_params,
|
793
|
+
:form_params => form_params,
|
794
|
+
:body => post_body,
|
795
|
+
:auth_names => auth_names,
|
796
|
+
:return_type => return_type
|
797
|
+
)
|
798
|
+
|
799
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
800
|
+
if @api_client.config.debugging
|
801
|
+
@api_client.config.logger.debug "API called: EmailControllerApi#get_email_text_lines\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
802
|
+
end
|
803
|
+
return data, status_code, headers
|
804
|
+
end
|
805
|
+
|
673
806
|
# Get all emails
|
674
807
|
# By default returns all emails across all inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages
|
675
808
|
# @param [Hash] opts the optional parameters
|
@@ -0,0 +1,215 @@
|
|
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 'cgi'
|
14
|
+
|
15
|
+
module MailSlurpClient
|
16
|
+
class ExpiredControllerApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Get expired inbox record for a previously existing inbox
|
23
|
+
# 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
|
+
# @param inbox_id [String] ID of inbox you want to retrieve (not the inbox ID)
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [ExpiredInboxDto]
|
27
|
+
def get_expired_inbox_by_inbox_id(inbox_id, opts = {})
|
28
|
+
data, _status_code, _headers = get_expired_inbox_by_inbox_id_with_http_info(inbox_id, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Get expired inbox record for a previously existing inbox
|
33
|
+
# 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
|
34
|
+
# @param inbox_id [String] ID of inbox you want to retrieve (not the inbox ID)
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(ExpiredInboxDto, Integer, Hash)>] ExpiredInboxDto data, response status code and response headers
|
37
|
+
def get_expired_inbox_by_inbox_id_with_http_info(inbox_id, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: ExpiredControllerApi.get_expired_inbox_by_inbox_id ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'inbox_id' is set
|
42
|
+
if @api_client.config.client_side_validation && inbox_id.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'inbox_id' when calling ExpiredControllerApi.get_expired_inbox_by_inbox_id"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/expired/inbox/{inboxId}'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_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] || 'ExpiredInboxDto'
|
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(:GET, local_var_path, new_options)
|
78
|
+
if @api_client.config.debugging
|
79
|
+
@api_client.config.logger.debug "API called: ExpiredControllerApi#get_expired_inbox_by_inbox_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
80
|
+
end
|
81
|
+
return data, status_code, headers
|
82
|
+
end
|
83
|
+
|
84
|
+
# Get an expired inbox record
|
85
|
+
# Inboxes created with an expiration date will expire after the given date and be moved to an ExpiredInbox entity. You can still read emails in the inbox but it can no longer send or receive emails. Fetch the expired inboxes to view the old inboxes properties
|
86
|
+
# @param expired_id [String] ID of the ExpiredInboxRecord you want to retrieve. This is different from the ID of the inbox you are interested in. See other methods for getting ExpiredInboxRecord for an inbox inboxId)
|
87
|
+
# @param [Hash] opts the optional parameters
|
88
|
+
# @return [ExpiredInboxDto]
|
89
|
+
def get_expired_inbox_record(expired_id, opts = {})
|
90
|
+
data, _status_code, _headers = get_expired_inbox_record_with_http_info(expired_id, opts)
|
91
|
+
data
|
92
|
+
end
|
93
|
+
|
94
|
+
# Get an expired inbox record
|
95
|
+
# Inboxes created with an expiration date will expire after the given date and be moved to an ExpiredInbox entity. You can still read emails in the inbox but it can no longer send or receive emails. Fetch the expired inboxes to view the old inboxes properties
|
96
|
+
# @param expired_id [String] ID of the ExpiredInboxRecord you want to retrieve. This is different from the ID of the inbox you are interested in. See other methods for getting ExpiredInboxRecord for an inbox inboxId)
|
97
|
+
# @param [Hash] opts the optional parameters
|
98
|
+
# @return [Array<(ExpiredInboxDto, Integer, Hash)>] ExpiredInboxDto data, response status code and response headers
|
99
|
+
def get_expired_inbox_record_with_http_info(expired_id, opts = {})
|
100
|
+
if @api_client.config.debugging
|
101
|
+
@api_client.config.logger.debug 'Calling API: ExpiredControllerApi.get_expired_inbox_record ...'
|
102
|
+
end
|
103
|
+
# verify the required parameter 'expired_id' is set
|
104
|
+
if @api_client.config.client_side_validation && expired_id.nil?
|
105
|
+
fail ArgumentError, "Missing the required parameter 'expired_id' when calling ExpiredControllerApi.get_expired_inbox_record"
|
106
|
+
end
|
107
|
+
# resource path
|
108
|
+
local_var_path = '/expired/{expiredId}'.sub('{' + 'expiredId' + '}', CGI.escape(expired_id.to_s))
|
109
|
+
|
110
|
+
# query parameters
|
111
|
+
query_params = opts[:query_params] || {}
|
112
|
+
|
113
|
+
# header parameters
|
114
|
+
header_params = opts[:header_params] || {}
|
115
|
+
# HTTP header 'Accept' (if needed)
|
116
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
117
|
+
|
118
|
+
# form parameters
|
119
|
+
form_params = opts[:form_params] || {}
|
120
|
+
|
121
|
+
# http body (model)
|
122
|
+
post_body = opts[:body]
|
123
|
+
|
124
|
+
# return_type
|
125
|
+
return_type = opts[:return_type] || 'ExpiredInboxDto'
|
126
|
+
|
127
|
+
# auth_names
|
128
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
129
|
+
|
130
|
+
new_options = opts.merge(
|
131
|
+
:header_params => header_params,
|
132
|
+
:query_params => query_params,
|
133
|
+
:form_params => form_params,
|
134
|
+
:body => post_body,
|
135
|
+
:auth_names => auth_names,
|
136
|
+
:return_type => return_type
|
137
|
+
)
|
138
|
+
|
139
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
140
|
+
if @api_client.config.debugging
|
141
|
+
@api_client.config.logger.debug "API called: ExpiredControllerApi#get_expired_inbox_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
142
|
+
end
|
143
|
+
return data, status_code, headers
|
144
|
+
end
|
145
|
+
|
146
|
+
# List records of expired inboxes
|
147
|
+
# Inboxes created with an expiration date will expire after the given date. An ExpiredInboxRecord is created that records the inboxes old ID and email address. You can still read emails in the inbox (using the inboxes old ID) but the email address associated with the inbox can no longer send or receive emails. Fetch expired inbox records to view the old inboxes properties
|
148
|
+
# @param [Hash] opts the optional parameters
|
149
|
+
# @option opts [Integer] :page Optional page index in inbox sent email list pagination (default to 0)
|
150
|
+
# @option opts [Integer] :size Optional page size in inbox sent email list pagination (default to 20)
|
151
|
+
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
|
152
|
+
# @return [PageExpiredInboxRecordProjection]
|
153
|
+
def get_expired_inboxes(opts = {})
|
154
|
+
data, _status_code, _headers = get_expired_inboxes_with_http_info(opts)
|
155
|
+
data
|
156
|
+
end
|
157
|
+
|
158
|
+
# List records of expired inboxes
|
159
|
+
# Inboxes created with an expiration date will expire after the given date. An ExpiredInboxRecord is created that records the inboxes old ID and email address. You can still read emails in the inbox (using the inboxes old ID) but the email address associated with the inbox can no longer send or receive emails. Fetch expired inbox records to view the old inboxes properties
|
160
|
+
# @param [Hash] opts the optional parameters
|
161
|
+
# @option opts [Integer] :page Optional page index in inbox sent email list pagination
|
162
|
+
# @option opts [Integer] :size Optional page size in inbox sent email list pagination
|
163
|
+
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC
|
164
|
+
# @return [Array<(PageExpiredInboxRecordProjection, Integer, Hash)>] PageExpiredInboxRecordProjection data, response status code and response headers
|
165
|
+
def get_expired_inboxes_with_http_info(opts = {})
|
166
|
+
if @api_client.config.debugging
|
167
|
+
@api_client.config.logger.debug 'Calling API: ExpiredControllerApi.get_expired_inboxes ...'
|
168
|
+
end
|
169
|
+
allowable_values = ["ASC", "DESC"]
|
170
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
171
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
172
|
+
end
|
173
|
+
# resource path
|
174
|
+
local_var_path = '/expired'
|
175
|
+
|
176
|
+
# query parameters
|
177
|
+
query_params = opts[:query_params] || {}
|
178
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
179
|
+
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
180
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
181
|
+
|
182
|
+
# header parameters
|
183
|
+
header_params = opts[:header_params] || {}
|
184
|
+
# HTTP header 'Accept' (if needed)
|
185
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
186
|
+
|
187
|
+
# form parameters
|
188
|
+
form_params = opts[:form_params] || {}
|
189
|
+
|
190
|
+
# http body (model)
|
191
|
+
post_body = opts[:body]
|
192
|
+
|
193
|
+
# return_type
|
194
|
+
return_type = opts[:return_type] || 'PageExpiredInboxRecordProjection'
|
195
|
+
|
196
|
+
# auth_names
|
197
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
198
|
+
|
199
|
+
new_options = opts.merge(
|
200
|
+
:header_params => header_params,
|
201
|
+
:query_params => query_params,
|
202
|
+
:form_params => form_params,
|
203
|
+
:body => post_body,
|
204
|
+
:auth_names => auth_names,
|
205
|
+
:return_type => return_type
|
206
|
+
)
|
207
|
+
|
208
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
209
|
+
if @api_client.config.debugging
|
210
|
+
@api_client.config.logger.debug "API called: ExpiredControllerApi#get_expired_inboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
211
|
+
end
|
212
|
+
return data, status_code, headers
|
213
|
+
end
|
214
|
+
end
|
215
|
+
end
|
@@ -439,199 +439,6 @@ module MailSlurpClient
|
|
439
439
|
return data, status_code, headers
|
440
440
|
end
|
441
441
|
|
442
|
-
# Get an expired inbox record
|
443
|
-
# Inboxes created with an expiration date will expire after the given date and be moved to an ExpiredInbox entity. You can still read emails in the inbox but it can no longer send or receive emails. Fetch the expired inboxes to view the old inboxes properties
|
444
|
-
# @param expired_id [String] ID of the ExpiredInboxRecord you want to retrieve. This is different from the ID of the inbox you are interested in. See other methods for getting ExpiredInboxRecord for an inbox inboxId)
|
445
|
-
# @param [Hash] opts the optional parameters
|
446
|
-
# @return [ExpiredInboxDto]
|
447
|
-
def get_expired_inbox_record_by_id(expired_id, opts = {})
|
448
|
-
data, _status_code, _headers = get_expired_inbox_record_by_id_with_http_info(expired_id, opts)
|
449
|
-
data
|
450
|
-
end
|
451
|
-
|
452
|
-
# Get an expired inbox record
|
453
|
-
# Inboxes created with an expiration date will expire after the given date and be moved to an ExpiredInbox entity. You can still read emails in the inbox but it can no longer send or receive emails. Fetch the expired inboxes to view the old inboxes properties
|
454
|
-
# @param expired_id [String] ID of the ExpiredInboxRecord you want to retrieve. This is different from the ID of the inbox you are interested in. See other methods for getting ExpiredInboxRecord for an inbox inboxId)
|
455
|
-
# @param [Hash] opts the optional parameters
|
456
|
-
# @return [Array<(ExpiredInboxDto, Integer, Hash)>] ExpiredInboxDto data, response status code and response headers
|
457
|
-
def get_expired_inbox_record_by_id_with_http_info(expired_id, opts = {})
|
458
|
-
if @api_client.config.debugging
|
459
|
-
@api_client.config.logger.debug 'Calling API: InboxControllerApi.get_expired_inbox_record_by_id ...'
|
460
|
-
end
|
461
|
-
# verify the required parameter 'expired_id' is set
|
462
|
-
if @api_client.config.client_side_validation && expired_id.nil?
|
463
|
-
fail ArgumentError, "Missing the required parameter 'expired_id' when calling InboxControllerApi.get_expired_inbox_record_by_id"
|
464
|
-
end
|
465
|
-
# resource path
|
466
|
-
local_var_path = '/inboxes/expired-records/{expiredId}'.sub('{' + 'expiredId' + '}', CGI.escape(expired_id.to_s))
|
467
|
-
|
468
|
-
# query parameters
|
469
|
-
query_params = opts[:query_params] || {}
|
470
|
-
|
471
|
-
# header parameters
|
472
|
-
header_params = opts[:header_params] || {}
|
473
|
-
# HTTP header 'Accept' (if needed)
|
474
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
475
|
-
|
476
|
-
# form parameters
|
477
|
-
form_params = opts[:form_params] || {}
|
478
|
-
|
479
|
-
# http body (model)
|
480
|
-
post_body = opts[:body]
|
481
|
-
|
482
|
-
# return_type
|
483
|
-
return_type = opts[:return_type] || 'ExpiredInboxDto'
|
484
|
-
|
485
|
-
# auth_names
|
486
|
-
auth_names = opts[:auth_names] || ['API_KEY']
|
487
|
-
|
488
|
-
new_options = opts.merge(
|
489
|
-
:header_params => header_params,
|
490
|
-
:query_params => query_params,
|
491
|
-
:form_params => form_params,
|
492
|
-
:body => post_body,
|
493
|
-
:auth_names => auth_names,
|
494
|
-
:return_type => return_type
|
495
|
-
)
|
496
|
-
|
497
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
498
|
-
if @api_client.config.debugging
|
499
|
-
@api_client.config.logger.debug "API called: InboxControllerApi#get_expired_inbox_record_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
500
|
-
end
|
501
|
-
return data, status_code, headers
|
502
|
-
end
|
503
|
-
|
504
|
-
# Get expired inbox record for a previously existing inbox
|
505
|
-
# 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
|
506
|
-
# @param inbox_id [String] ID of inbox you want to retrieve (not the inbox ID)
|
507
|
-
# @param [Hash] opts the optional parameters
|
508
|
-
# @return [ExpiredInboxDto]
|
509
|
-
def get_expired_inbox_record_by_inbox_id(inbox_id, opts = {})
|
510
|
-
data, _status_code, _headers = get_expired_inbox_record_by_inbox_id_with_http_info(inbox_id, opts)
|
511
|
-
data
|
512
|
-
end
|
513
|
-
|
514
|
-
# Get expired inbox record for a previously existing inbox
|
515
|
-
# 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
|
516
|
-
# @param inbox_id [String] ID of inbox you want to retrieve (not the inbox ID)
|
517
|
-
# @param [Hash] opts the optional parameters
|
518
|
-
# @return [Array<(ExpiredInboxDto, Integer, Hash)>] ExpiredInboxDto data, response status code and response headers
|
519
|
-
def get_expired_inbox_record_by_inbox_id_with_http_info(inbox_id, opts = {})
|
520
|
-
if @api_client.config.debugging
|
521
|
-
@api_client.config.logger.debug 'Calling API: InboxControllerApi.get_expired_inbox_record_by_inbox_id ...'
|
522
|
-
end
|
523
|
-
# verify the required parameter 'inbox_id' is set
|
524
|
-
if @api_client.config.client_side_validation && inbox_id.nil?
|
525
|
-
fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.get_expired_inbox_record_by_inbox_id"
|
526
|
-
end
|
527
|
-
# resource path
|
528
|
-
local_var_path = '/inboxes/{inboxId}/expired-record'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
|
529
|
-
|
530
|
-
# query parameters
|
531
|
-
query_params = opts[:query_params] || {}
|
532
|
-
|
533
|
-
# header parameters
|
534
|
-
header_params = opts[:header_params] || {}
|
535
|
-
# HTTP header 'Accept' (if needed)
|
536
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
537
|
-
|
538
|
-
# form parameters
|
539
|
-
form_params = opts[:form_params] || {}
|
540
|
-
|
541
|
-
# http body (model)
|
542
|
-
post_body = opts[:body]
|
543
|
-
|
544
|
-
# return_type
|
545
|
-
return_type = opts[:return_type] || 'ExpiredInboxDto'
|
546
|
-
|
547
|
-
# auth_names
|
548
|
-
auth_names = opts[:auth_names] || ['API_KEY']
|
549
|
-
|
550
|
-
new_options = opts.merge(
|
551
|
-
:header_params => header_params,
|
552
|
-
:query_params => query_params,
|
553
|
-
:form_params => form_params,
|
554
|
-
:body => post_body,
|
555
|
-
:auth_names => auth_names,
|
556
|
-
:return_type => return_type
|
557
|
-
)
|
558
|
-
|
559
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
560
|
-
if @api_client.config.debugging
|
561
|
-
@api_client.config.logger.debug "API called: InboxControllerApi#get_expired_inbox_record_by_inbox_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
562
|
-
end
|
563
|
-
return data, status_code, headers
|
564
|
-
end
|
565
|
-
|
566
|
-
# List records of expired inboxes
|
567
|
-
# Inboxes created with an expiration date will expire after the given date. An ExpiredInboxRecord is created that records the inboxes old ID and email address. You can still read emails in the inbox (using the inboxes old ID) but the email address associated with the inbox can no longer send or receive emails. Fetch expired inbox records to view the old inboxes properties
|
568
|
-
# @param [Hash] opts the optional parameters
|
569
|
-
# @option opts [Integer] :page Optional page index in inbox sent email list pagination (default to 0)
|
570
|
-
# @option opts [Integer] :size Optional page size in inbox sent email list pagination (default to 20)
|
571
|
-
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
|
572
|
-
# @return [PageExpiredInboxRecordProjection]
|
573
|
-
def get_expired_inbox_records(opts = {})
|
574
|
-
data, _status_code, _headers = get_expired_inbox_records_with_http_info(opts)
|
575
|
-
data
|
576
|
-
end
|
577
|
-
|
578
|
-
# List records of expired inboxes
|
579
|
-
# Inboxes created with an expiration date will expire after the given date. An ExpiredInboxRecord is created that records the inboxes old ID and email address. You can still read emails in the inbox (using the inboxes old ID) but the email address associated with the inbox can no longer send or receive emails. Fetch expired inbox records to view the old inboxes properties
|
580
|
-
# @param [Hash] opts the optional parameters
|
581
|
-
# @option opts [Integer] :page Optional page index in inbox sent email list pagination
|
582
|
-
# @option opts [Integer] :size Optional page size in inbox sent email list pagination
|
583
|
-
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC
|
584
|
-
# @return [Array<(PageExpiredInboxRecordProjection, Integer, Hash)>] PageExpiredInboxRecordProjection data, response status code and response headers
|
585
|
-
def get_expired_inbox_records_with_http_info(opts = {})
|
586
|
-
if @api_client.config.debugging
|
587
|
-
@api_client.config.logger.debug 'Calling API: InboxControllerApi.get_expired_inbox_records ...'
|
588
|
-
end
|
589
|
-
allowable_values = ["ASC", "DESC"]
|
590
|
-
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
591
|
-
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
592
|
-
end
|
593
|
-
# resource path
|
594
|
-
local_var_path = '/inboxes/expired-records'
|
595
|
-
|
596
|
-
# query parameters
|
597
|
-
query_params = opts[:query_params] || {}
|
598
|
-
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
599
|
-
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
600
|
-
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
601
|
-
|
602
|
-
# header parameters
|
603
|
-
header_params = opts[:header_params] || {}
|
604
|
-
# HTTP header 'Accept' (if needed)
|
605
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
606
|
-
|
607
|
-
# form parameters
|
608
|
-
form_params = opts[:form_params] || {}
|
609
|
-
|
610
|
-
# http body (model)
|
611
|
-
post_body = opts[:body]
|
612
|
-
|
613
|
-
# return_type
|
614
|
-
return_type = opts[:return_type] || 'PageExpiredInboxRecordProjection'
|
615
|
-
|
616
|
-
# auth_names
|
617
|
-
auth_names = opts[:auth_names] || ['API_KEY']
|
618
|
-
|
619
|
-
new_options = opts.merge(
|
620
|
-
:header_params => header_params,
|
621
|
-
:query_params => query_params,
|
622
|
-
:form_params => form_params,
|
623
|
-
:body => post_body,
|
624
|
-
:auth_names => auth_names,
|
625
|
-
:return_type => return_type
|
626
|
-
)
|
627
|
-
|
628
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
629
|
-
if @api_client.config.debugging
|
630
|
-
@api_client.config.logger.debug "API called: InboxControllerApi#get_expired_inbox_records\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
631
|
-
end
|
632
|
-
return data, status_code, headers
|
633
|
-
end
|
634
|
-
|
635
442
|
# Get Inbox
|
636
443
|
# Returns an inbox's properties, including its email address and ID.
|
637
444
|
# @param inbox_id [String] inboxId
|
@@ -15,14 +15,14 @@ require 'date'
|
|
15
15
|
module MailSlurpClient
|
16
16
|
# DNS lookup result. Includes record type, time to live, raw response, and name value for the name server response.
|
17
17
|
class DNSLookupResult
|
18
|
-
attr_accessor :
|
18
|
+
attr_accessor :name
|
19
|
+
|
20
|
+
attr_accessor :record_entries
|
19
21
|
|
20
22
|
attr_accessor :record_type
|
21
23
|
|
22
24
|
attr_accessor :ttl
|
23
25
|
|
24
|
-
attr_accessor :value
|
25
|
-
|
26
26
|
class EnumAttributeValidator
|
27
27
|
attr_reader :datatype
|
28
28
|
attr_reader :allowable_values
|
@@ -48,20 +48,20 @@ module MailSlurpClient
|
|
48
48
|
# Attribute mapping from ruby-style variable name to JSON key.
|
49
49
|
def self.attribute_map
|
50
50
|
{
|
51
|
-
:'
|
51
|
+
:'name' => :'name',
|
52
|
+
:'record_entries' => :'recordEntries',
|
52
53
|
:'record_type' => :'recordType',
|
53
|
-
:'ttl' => :'ttl'
|
54
|
-
:'value' => :'value'
|
54
|
+
:'ttl' => :'ttl'
|
55
55
|
}
|
56
56
|
end
|
57
57
|
|
58
58
|
# Attribute type mapping.
|
59
59
|
def self.openapi_types
|
60
60
|
{
|
61
|
-
:'
|
61
|
+
:'name' => :'String',
|
62
|
+
:'record_entries' => :'Array<String>',
|
62
63
|
:'record_type' => :'String',
|
63
|
-
:'ttl' => :'Integer'
|
64
|
-
:'value' => :'String'
|
64
|
+
:'ttl' => :'Integer'
|
65
65
|
}
|
66
66
|
end
|
67
67
|
|
@@ -86,8 +86,14 @@ module MailSlurpClient
|
|
86
86
|
h[k.to_sym] = v
|
87
87
|
}
|
88
88
|
|
89
|
-
if attributes.key?(:'
|
90
|
-
self.
|
89
|
+
if attributes.key?(:'name')
|
90
|
+
self.name = attributes[:'name']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.key?(:'record_entries')
|
94
|
+
if (value = attributes[:'record_entries']).is_a?(Array)
|
95
|
+
self.record_entries = value
|
96
|
+
end
|
91
97
|
end
|
92
98
|
|
93
99
|
if attributes.key?(:'record_type')
|
@@ -97,18 +103,18 @@ module MailSlurpClient
|
|
97
103
|
if attributes.key?(:'ttl')
|
98
104
|
self.ttl = attributes[:'ttl']
|
99
105
|
end
|
100
|
-
|
101
|
-
if attributes.key?(:'value')
|
102
|
-
self.value = attributes[:'value']
|
103
|
-
end
|
104
106
|
end
|
105
107
|
|
106
108
|
# Show invalid properties with the reasons. Usually used together with valid?
|
107
109
|
# @return Array for valid properties with the reasons
|
108
110
|
def list_invalid_properties
|
109
111
|
invalid_properties = Array.new
|
110
|
-
if @
|
111
|
-
invalid_properties.push('invalid value for "
|
112
|
+
if @name.nil?
|
113
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
114
|
+
end
|
115
|
+
|
116
|
+
if @record_entries.nil?
|
117
|
+
invalid_properties.push('invalid value for "record_entries", record_entries cannot be nil.')
|
112
118
|
end
|
113
119
|
|
114
120
|
if @record_type.nil?
|
@@ -119,22 +125,18 @@ module MailSlurpClient
|
|
119
125
|
invalid_properties.push('invalid value for "ttl", ttl cannot be nil.')
|
120
126
|
end
|
121
127
|
|
122
|
-
if @value.nil?
|
123
|
-
invalid_properties.push('invalid value for "value", value cannot be nil.')
|
124
|
-
end
|
125
|
-
|
126
128
|
invalid_properties
|
127
129
|
end
|
128
130
|
|
129
131
|
# Check to see if the all the properties in the model are valid
|
130
132
|
# @return true if the model is valid
|
131
133
|
def valid?
|
132
|
-
return false if @
|
134
|
+
return false if @name.nil?
|
135
|
+
return false if @record_entries.nil?
|
133
136
|
return false if @record_type.nil?
|
134
137
|
record_type_validator = EnumAttributeValidator.new('String', ["A", "NS", "MD", "MF", "CNAME", "SOA", "MB", "MG", "MR", "NULL", "WKS", "PTR", "HINFO", "MINFO", "MX", "TXT", "RP", "AFSDB", "X25", "ISDN", "RT", "NSAP", "NSAP_PTR", "SIG", "KEY", "PX", "GPOS", "AAAA", "LOC", "NXT", "EID", "NIMLOC", "SRV", "ATMA", "NAPTR", "KX", "CERT", "A6", "DNAME", "SINK", "OPT", "APL", "DS", "SSHFP", "IPSECKEY", "RRSIG", "NSEC", "DNSKEY", "DHCID", "NSEC3", "NSEC3PARAM", "TLSA", "SMIMEA", "HIP", "NINFO", "RKEY", "TALINK", "CDS", "CDNSKEY", "OPENPGPKEY", "CSYNC", "ZONEMD", "SVCB", "HTTPS", "SPF", "UINFO", "UID", "GID", "UNSPEC", "NID", "L32", "L64", "LP", "EUI48", "EUI64", "TKEY", "TSIG", "IXFR", "AXFR", "MAILB", "MAILA", "ANY", "URI", "CAA", "AVC", "DOA", "AMTRELAY", "TA", "DLV"])
|
135
138
|
return false unless record_type_validator.valid?(@record_type)
|
136
139
|
return false if @ttl.nil?
|
137
|
-
return false if @value.nil?
|
138
140
|
true
|
139
141
|
end
|
140
142
|
|
@@ -153,10 +155,10 @@ module MailSlurpClient
|
|
153
155
|
def ==(o)
|
154
156
|
return true if self.equal?(o)
|
155
157
|
self.class == o.class &&
|
156
|
-
|
158
|
+
name == o.name &&
|
159
|
+
record_entries == o.record_entries &&
|
157
160
|
record_type == o.record_type &&
|
158
|
-
ttl == o.ttl
|
159
|
-
value == o.value
|
161
|
+
ttl == o.ttl
|
160
162
|
end
|
161
163
|
|
162
164
|
# @see the `==` method
|
@@ -168,7 +170,7 @@ module MailSlurpClient
|
|
168
170
|
# Calculates hash code according to all attributes.
|
169
171
|
# @return [Integer] Hash code
|
170
172
|
def hash
|
171
|
-
[
|
173
|
+
[name, record_entries, record_type, ttl].hash
|
172
174
|
end
|
173
175
|
|
174
176
|
# Builds the object from hash
|
@@ -0,0 +1,228 @@
|
|
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
|
+
# Parsed text of an email
|
17
|
+
class EmailTextLinesResult
|
18
|
+
attr_accessor :body
|
19
|
+
|
20
|
+
attr_accessor :lines
|
21
|
+
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
23
|
+
def self.attribute_map
|
24
|
+
{
|
25
|
+
:'body' => :'body',
|
26
|
+
:'lines' => :'lines'
|
27
|
+
}
|
28
|
+
end
|
29
|
+
|
30
|
+
# Attribute type mapping.
|
31
|
+
def self.openapi_types
|
32
|
+
{
|
33
|
+
:'body' => :'String',
|
34
|
+
:'lines' => :'Array<String>'
|
35
|
+
}
|
36
|
+
end
|
37
|
+
|
38
|
+
# List of attributes with nullable: true
|
39
|
+
def self.openapi_nullable
|
40
|
+
Set.new([
|
41
|
+
])
|
42
|
+
end
|
43
|
+
|
44
|
+
# Initializes the object
|
45
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
46
|
+
def initialize(attributes = {})
|
47
|
+
if (!attributes.is_a?(Hash))
|
48
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::EmailTextLinesResult` initialize method"
|
49
|
+
end
|
50
|
+
|
51
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
52
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
53
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
54
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::EmailTextLinesResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
55
|
+
end
|
56
|
+
h[k.to_sym] = v
|
57
|
+
}
|
58
|
+
|
59
|
+
if attributes.key?(:'body')
|
60
|
+
self.body = attributes[:'body']
|
61
|
+
end
|
62
|
+
|
63
|
+
if attributes.key?(:'lines')
|
64
|
+
if (value = attributes[:'lines']).is_a?(Array)
|
65
|
+
self.lines = value
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
71
|
+
# @return Array for valid properties with the reasons
|
72
|
+
def list_invalid_properties
|
73
|
+
invalid_properties = Array.new
|
74
|
+
if @body.nil?
|
75
|
+
invalid_properties.push('invalid value for "body", body cannot be nil.')
|
76
|
+
end
|
77
|
+
|
78
|
+
if @lines.nil?
|
79
|
+
invalid_properties.push('invalid value for "lines", lines cannot be nil.')
|
80
|
+
end
|
81
|
+
|
82
|
+
invalid_properties
|
83
|
+
end
|
84
|
+
|
85
|
+
# Check to see if the all the properties in the model are valid
|
86
|
+
# @return true if the model is valid
|
87
|
+
def valid?
|
88
|
+
return false if @body.nil?
|
89
|
+
return false if @lines.nil?
|
90
|
+
true
|
91
|
+
end
|
92
|
+
|
93
|
+
# Checks equality by comparing each attribute.
|
94
|
+
# @param [Object] Object to be compared
|
95
|
+
def ==(o)
|
96
|
+
return true if self.equal?(o)
|
97
|
+
self.class == o.class &&
|
98
|
+
body == o.body &&
|
99
|
+
lines == o.lines
|
100
|
+
end
|
101
|
+
|
102
|
+
# @see the `==` method
|
103
|
+
# @param [Object] Object to be compared
|
104
|
+
def eql?(o)
|
105
|
+
self == o
|
106
|
+
end
|
107
|
+
|
108
|
+
# Calculates hash code according to all attributes.
|
109
|
+
# @return [Integer] Hash code
|
110
|
+
def hash
|
111
|
+
[body, lines].hash
|
112
|
+
end
|
113
|
+
|
114
|
+
# Builds the object from hash
|
115
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
116
|
+
# @return [Object] Returns the model itself
|
117
|
+
def self.build_from_hash(attributes)
|
118
|
+
new.build_from_hash(attributes)
|
119
|
+
end
|
120
|
+
|
121
|
+
# Builds the object from hash
|
122
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
123
|
+
# @return [Object] Returns the model itself
|
124
|
+
def build_from_hash(attributes)
|
125
|
+
return nil unless attributes.is_a?(Hash)
|
126
|
+
self.class.openapi_types.each_pair do |key, type|
|
127
|
+
if type =~ /\AArray<(.*)>/i
|
128
|
+
# check to ensure the input is an array given that the attribute
|
129
|
+
# is documented as an array but the input is not
|
130
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
131
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
132
|
+
end
|
133
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
134
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
135
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
136
|
+
end
|
137
|
+
|
138
|
+
self
|
139
|
+
end
|
140
|
+
|
141
|
+
# Deserializes the data based on type
|
142
|
+
# @param string type Data type
|
143
|
+
# @param string value Value to be deserialized
|
144
|
+
# @return [Object] Deserialized data
|
145
|
+
def _deserialize(type, value)
|
146
|
+
case type.to_sym
|
147
|
+
when :DateTime
|
148
|
+
DateTime.parse(value)
|
149
|
+
when :Date
|
150
|
+
Date.parse(value)
|
151
|
+
when :String
|
152
|
+
value.to_s
|
153
|
+
when :Integer
|
154
|
+
value.to_i
|
155
|
+
when :Float
|
156
|
+
value.to_f
|
157
|
+
when :Boolean
|
158
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
159
|
+
true
|
160
|
+
else
|
161
|
+
false
|
162
|
+
end
|
163
|
+
when :Object
|
164
|
+
# generic object (usually a Hash), return directly
|
165
|
+
value
|
166
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
167
|
+
inner_type = Regexp.last_match[:inner_type]
|
168
|
+
value.map { |v| _deserialize(inner_type, v) }
|
169
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
170
|
+
k_type = Regexp.last_match[:k_type]
|
171
|
+
v_type = Regexp.last_match[:v_type]
|
172
|
+
{}.tap do |hash|
|
173
|
+
value.each do |k, v|
|
174
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
175
|
+
end
|
176
|
+
end
|
177
|
+
else # model
|
178
|
+
MailSlurpClient.const_get(type).build_from_hash(value)
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
# Returns the string representation of the object
|
183
|
+
# @return [String] String presentation of the object
|
184
|
+
def to_s
|
185
|
+
to_hash.to_s
|
186
|
+
end
|
187
|
+
|
188
|
+
# to_body is an alias to to_hash (backward compatibility)
|
189
|
+
# @return [Hash] Returns the object in the form of hash
|
190
|
+
def to_body
|
191
|
+
to_hash
|
192
|
+
end
|
193
|
+
|
194
|
+
# Returns the object in the form of hash
|
195
|
+
# @return [Hash] Returns the object in the form of hash
|
196
|
+
def to_hash
|
197
|
+
hash = {}
|
198
|
+
self.class.attribute_map.each_pair do |attr, param|
|
199
|
+
value = self.send(attr)
|
200
|
+
if value.nil?
|
201
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
202
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
203
|
+
end
|
204
|
+
|
205
|
+
hash[param] = _to_hash(value)
|
206
|
+
end
|
207
|
+
hash
|
208
|
+
end
|
209
|
+
|
210
|
+
# Outputs non-array value in the form of hash
|
211
|
+
# For object, use to_hash. Otherwise, just return the value
|
212
|
+
# @param [Object] value Any valid value
|
213
|
+
# @return [Hash] Returns the value in the form of hash
|
214
|
+
def _to_hash(value)
|
215
|
+
if value.is_a?(Array)
|
216
|
+
value.compact.map { |v| _to_hash(v) }
|
217
|
+
elsif value.is_a?(Hash)
|
218
|
+
{}.tap do |hash|
|
219
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
220
|
+
end
|
221
|
+
elsif value.respond_to? :to_hash
|
222
|
+
value.to_hash
|
223
|
+
else
|
224
|
+
value
|
225
|
+
end
|
226
|
+
end
|
227
|
+
end
|
228
|
+
end
|
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.3.1
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module MailSlurpClient
|
16
|
-
# Options for sending an email message from an inbox. You must provide one of: `to`, `toGroup`, or `toContacts` to send an email. All other parameters are optional.
|
16
|
+
# Options for sending an email message from an inbox. You must provide one of: `to`, `toGroup`, or `toContacts` to send an email. All other parameters are optional.
|
17
17
|
class SendEmailOptions
|
18
18
|
# Optional list of attachment IDs to send with this email. You must first upload each attachment separately in order to obtain attachment IDs. This way you can reuse attachments with different emails once uploaded.
|
19
19
|
attr_accessor :attachments
|
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.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mailslurp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-17 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.
|
@@ -30,6 +30,7 @@ files:
|
|
30
30
|
- lib/mailslurp_client/api/contact_controller_api.rb
|
31
31
|
- lib/mailslurp_client/api/domain_controller_api.rb
|
32
32
|
- lib/mailslurp_client/api/email_controller_api.rb
|
33
|
+
- lib/mailslurp_client/api/expired_controller_api.rb
|
33
34
|
- lib/mailslurp_client/api/form_controller_api.rb
|
34
35
|
- lib/mailslurp_client/api/group_controller_api.rb
|
35
36
|
- lib/mailslurp_client/api/inbox_controller_api.rb
|
@@ -70,6 +71,7 @@ files:
|
|
70
71
|
- lib/mailslurp_client/models/email_content_match_result.rb
|
71
72
|
- lib/mailslurp_client/models/email_preview.rb
|
72
73
|
- lib/mailslurp_client/models/email_projection.rb
|
74
|
+
- lib/mailslurp_client/models/email_text_lines_result.rb
|
73
75
|
- lib/mailslurp_client/models/email_verification_result.rb
|
74
76
|
- lib/mailslurp_client/models/expired_inbox_dto.rb
|
75
77
|
- lib/mailslurp_client/models/expired_inbox_record_projection.rb
|