mailslurp_client 14.0.5 → 14.0.6
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67e68d10ad1abebea838d3a57c4d7e3b7768c3742841b5829549159812bd0303
|
4
|
+
data.tar.gz: d320cf4e7582412bdbf6b1b89180dd4b2fe6978b8db14843538e8bab3dab9682
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a742467215d2dec46d8d723b9524369e2ef1df06dfbfc159d76b1679d0ccf5235632fea74b8bdf416b0802edd7f0adf737514409dbc1397c36799245b5402219
|
7
|
+
data.tar.gz: 04a89f423eecdc5bce45deaca139b6af45ea4bb97ec03605e300527b8799afccc1766b31e291d221b7660afca453c12dc7d3777acf39cfa65a84ad28ce72fc20
|
@@ -411,6 +411,69 @@ module MailSlurpClient
|
|
411
411
|
return data, status_code, headers
|
412
412
|
end
|
413
413
|
|
414
|
+
# Does inbox exist
|
415
|
+
# Check if inboxes exist by email address. Useful if you are sending emails to mailslurp addresses
|
416
|
+
# @param email_address [String] Email address
|
417
|
+
# @param [Hash] opts the optional parameters
|
418
|
+
# @return [InboxExistsDto]
|
419
|
+
def does_inbox_exist(email_address, opts = {})
|
420
|
+
data, _status_code, _headers = does_inbox_exist_with_http_info(email_address, opts)
|
421
|
+
data
|
422
|
+
end
|
423
|
+
|
424
|
+
# Does inbox exist
|
425
|
+
# Check if inboxes exist by email address. Useful if you are sending emails to mailslurp addresses
|
426
|
+
# @param email_address [String] Email address
|
427
|
+
# @param [Hash] opts the optional parameters
|
428
|
+
# @return [Array<(InboxExistsDto, Integer, Hash)>] InboxExistsDto data, response status code and response headers
|
429
|
+
def does_inbox_exist_with_http_info(email_address, opts = {})
|
430
|
+
if @api_client.config.debugging
|
431
|
+
@api_client.config.logger.debug 'Calling API: InboxControllerApi.does_inbox_exist ...'
|
432
|
+
end
|
433
|
+
# verify the required parameter 'email_address' is set
|
434
|
+
if @api_client.config.client_side_validation && email_address.nil?
|
435
|
+
fail ArgumentError, "Missing the required parameter 'email_address' when calling InboxControllerApi.does_inbox_exist"
|
436
|
+
end
|
437
|
+
# resource path
|
438
|
+
local_var_path = '/inboxes/exists'
|
439
|
+
|
440
|
+
# query parameters
|
441
|
+
query_params = opts[:query_params] || {}
|
442
|
+
query_params[:'emailAddress'] = email_address
|
443
|
+
|
444
|
+
# header parameters
|
445
|
+
header_params = opts[:header_params] || {}
|
446
|
+
# HTTP header 'Accept' (if needed)
|
447
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
448
|
+
|
449
|
+
# form parameters
|
450
|
+
form_params = opts[:form_params] || {}
|
451
|
+
|
452
|
+
# http body (model)
|
453
|
+
post_body = opts[:body]
|
454
|
+
|
455
|
+
# return_type
|
456
|
+
return_type = opts[:return_type] || 'InboxExistsDto'
|
457
|
+
|
458
|
+
# auth_names
|
459
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
460
|
+
|
461
|
+
new_options = opts.merge(
|
462
|
+
:header_params => header_params,
|
463
|
+
:query_params => query_params,
|
464
|
+
:form_params => form_params,
|
465
|
+
:body => post_body,
|
466
|
+
:auth_names => auth_names,
|
467
|
+
:return_type => return_type
|
468
|
+
)
|
469
|
+
|
470
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
471
|
+
if @api_client.config.debugging
|
472
|
+
@api_client.config.logger.debug "API called: InboxControllerApi#does_inbox_exist\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
473
|
+
end
|
474
|
+
return data, status_code, headers
|
475
|
+
end
|
476
|
+
|
414
477
|
# Remove expired inboxes
|
415
478
|
# Remove any expired inboxes for your account (instead of waiting for scheduled removal on server)
|
416
479
|
# @param [Hash] opts the optional parameters
|
@@ -0,0 +1,211 @@
|
|
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
|
+
class InboxExistsDto
|
17
|
+
attr_accessor :exists
|
18
|
+
|
19
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
20
|
+
def self.attribute_map
|
21
|
+
{
|
22
|
+
:'exists' => :'exists'
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
# Attribute type mapping.
|
27
|
+
def self.openapi_types
|
28
|
+
{
|
29
|
+
:'exists' => :'Boolean'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# List of attributes with nullable: true
|
34
|
+
def self.openapi_nullable
|
35
|
+
Set.new([
|
36
|
+
])
|
37
|
+
end
|
38
|
+
|
39
|
+
# Initializes the object
|
40
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
41
|
+
def initialize(attributes = {})
|
42
|
+
if (!attributes.is_a?(Hash))
|
43
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::InboxExistsDto` initialize method"
|
44
|
+
end
|
45
|
+
|
46
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
47
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
48
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
49
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::InboxExistsDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
50
|
+
end
|
51
|
+
h[k.to_sym] = v
|
52
|
+
}
|
53
|
+
|
54
|
+
if attributes.key?(:'exists')
|
55
|
+
self.exists = attributes[:'exists']
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
60
|
+
# @return Array for valid properties with the reasons
|
61
|
+
def list_invalid_properties
|
62
|
+
invalid_properties = Array.new
|
63
|
+
if @exists.nil?
|
64
|
+
invalid_properties.push('invalid value for "exists", exists cannot be nil.')
|
65
|
+
end
|
66
|
+
|
67
|
+
invalid_properties
|
68
|
+
end
|
69
|
+
|
70
|
+
# Check to see if the all the properties in the model are valid
|
71
|
+
# @return true if the model is valid
|
72
|
+
def valid?
|
73
|
+
return false if @exists.nil?
|
74
|
+
true
|
75
|
+
end
|
76
|
+
|
77
|
+
# Checks equality by comparing each attribute.
|
78
|
+
# @param [Object] Object to be compared
|
79
|
+
def ==(o)
|
80
|
+
return true if self.equal?(o)
|
81
|
+
self.class == o.class &&
|
82
|
+
exists == o.exists
|
83
|
+
end
|
84
|
+
|
85
|
+
# @see the `==` method
|
86
|
+
# @param [Object] Object to be compared
|
87
|
+
def eql?(o)
|
88
|
+
self == o
|
89
|
+
end
|
90
|
+
|
91
|
+
# Calculates hash code according to all attributes.
|
92
|
+
# @return [Integer] Hash code
|
93
|
+
def hash
|
94
|
+
[exists].hash
|
95
|
+
end
|
96
|
+
|
97
|
+
# Builds the object from hash
|
98
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
99
|
+
# @return [Object] Returns the model itself
|
100
|
+
def self.build_from_hash(attributes)
|
101
|
+
new.build_from_hash(attributes)
|
102
|
+
end
|
103
|
+
|
104
|
+
# Builds the object from hash
|
105
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
106
|
+
# @return [Object] Returns the model itself
|
107
|
+
def build_from_hash(attributes)
|
108
|
+
return nil unless attributes.is_a?(Hash)
|
109
|
+
self.class.openapi_types.each_pair do |key, type|
|
110
|
+
if type =~ /\AArray<(.*)>/i
|
111
|
+
# check to ensure the input is an array given that the attribute
|
112
|
+
# is documented as an array but the input is not
|
113
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
114
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
115
|
+
end
|
116
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
117
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
118
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
119
|
+
end
|
120
|
+
|
121
|
+
self
|
122
|
+
end
|
123
|
+
|
124
|
+
# Deserializes the data based on type
|
125
|
+
# @param string type Data type
|
126
|
+
# @param string value Value to be deserialized
|
127
|
+
# @return [Object] Deserialized data
|
128
|
+
def _deserialize(type, value)
|
129
|
+
case type.to_sym
|
130
|
+
when :DateTime
|
131
|
+
DateTime.parse(value)
|
132
|
+
when :Date
|
133
|
+
Date.parse(value)
|
134
|
+
when :String
|
135
|
+
value.to_s
|
136
|
+
when :Integer
|
137
|
+
value.to_i
|
138
|
+
when :Float
|
139
|
+
value.to_f
|
140
|
+
when :Boolean
|
141
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
142
|
+
true
|
143
|
+
else
|
144
|
+
false
|
145
|
+
end
|
146
|
+
when :Object
|
147
|
+
# generic object (usually a Hash), return directly
|
148
|
+
value
|
149
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
150
|
+
inner_type = Regexp.last_match[:inner_type]
|
151
|
+
value.map { |v| _deserialize(inner_type, v) }
|
152
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
153
|
+
k_type = Regexp.last_match[:k_type]
|
154
|
+
v_type = Regexp.last_match[:v_type]
|
155
|
+
{}.tap do |hash|
|
156
|
+
value.each do |k, v|
|
157
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
158
|
+
end
|
159
|
+
end
|
160
|
+
else # model
|
161
|
+
MailSlurpClient.const_get(type).build_from_hash(value)
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
# Returns the string representation of the object
|
166
|
+
# @return [String] String presentation of the object
|
167
|
+
def to_s
|
168
|
+
to_hash.to_s
|
169
|
+
end
|
170
|
+
|
171
|
+
# to_body is an alias to to_hash (backward compatibility)
|
172
|
+
# @return [Hash] Returns the object in the form of hash
|
173
|
+
def to_body
|
174
|
+
to_hash
|
175
|
+
end
|
176
|
+
|
177
|
+
# Returns the object in the form of hash
|
178
|
+
# @return [Hash] Returns the object in the form of hash
|
179
|
+
def to_hash
|
180
|
+
hash = {}
|
181
|
+
self.class.attribute_map.each_pair do |attr, param|
|
182
|
+
value = self.send(attr)
|
183
|
+
if value.nil?
|
184
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
185
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
186
|
+
end
|
187
|
+
|
188
|
+
hash[param] = _to_hash(value)
|
189
|
+
end
|
190
|
+
hash
|
191
|
+
end
|
192
|
+
|
193
|
+
# Outputs non-array value in the form of hash
|
194
|
+
# For object, use to_hash. Otherwise, just return the value
|
195
|
+
# @param [Object] value Any valid value
|
196
|
+
# @return [Hash] Returns the value in the form of hash
|
197
|
+
def _to_hash(value)
|
198
|
+
if value.is_a?(Array)
|
199
|
+
value.compact.map { |v| _to_hash(v) }
|
200
|
+
elsif value.is_a?(Hash)
|
201
|
+
{}.tap do |hash|
|
202
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
203
|
+
end
|
204
|
+
elsif value.respond_to? :to_hash
|
205
|
+
value.to_hash
|
206
|
+
else
|
207
|
+
value
|
208
|
+
end
|
209
|
+
end
|
210
|
+
end
|
211
|
+
end
|
data/lib/mailslurp_client.rb
CHANGED
@@ -75,6 +75,7 @@ require 'mailslurp_client/models/group_projection'
|
|
75
75
|
require 'mailslurp_client/models/html_validation_result'
|
76
76
|
require 'mailslurp_client/models/ip_address_result'
|
77
77
|
require 'mailslurp_client/models/inbox'
|
78
|
+
require 'mailslurp_client/models/inbox_exists_dto'
|
78
79
|
require 'mailslurp_client/models/inbox_forwarder_dto'
|
79
80
|
require 'mailslurp_client/models/inbox_forwarder_test_options'
|
80
81
|
require 'mailslurp_client/models/inbox_forwarder_test_result'
|
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: 14.0.
|
4
|
+
version: 14.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mailslurp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-10-
|
11
|
+
date: 2021-10-07 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.
|
@@ -105,6 +105,7 @@ files:
|
|
105
105
|
- lib/mailslurp_client/models/group_projection.rb
|
106
106
|
- lib/mailslurp_client/models/html_validation_result.rb
|
107
107
|
- lib/mailslurp_client/models/inbox.rb
|
108
|
+
- lib/mailslurp_client/models/inbox_exists_dto.rb
|
108
109
|
- lib/mailslurp_client/models/inbox_forwarder_dto.rb
|
109
110
|
- lib/mailslurp_client/models/inbox_forwarder_test_options.rb
|
110
111
|
- lib/mailslurp_client/models/inbox_forwarder_test_result.rb
|