mailslurp_client 9.0.0 → 11.2.0

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: ce11099c493dea6299d4d72491154197e03f202540d6df04272ba300877b3025
4
- data.tar.gz: 85a86f10d235f6736aea7abf4e7a18da40ec31913f71dbccafe7981ead2a6f00
3
+ metadata.gz: d7543e13e59b4a636960220f48bf43983f010598909a66d4ec352b7205c90959
4
+ data.tar.gz: e1406a7389d3a95cfa3a4158e293d114c63c4b5b3945b35be85121ecc29ff60a
5
5
  SHA512:
6
- metadata.gz: 6efb77dab38cdb696343298579f1d9ab65234a69b5684cbd2209e1b4a2323920fc74c2380a1d9189f8a84cdc996b726c884acf3666b15af8763ce8c08627d814
7
- data.tar.gz: a805e639ad6c4e2b653b72b95aeaee7220e44b1e8e4454a5641d32c6d93288aa0b9c21ba03ea8d328d33111ed694d47f0e8c1e4c150b36e19e5c798d6664b20a
6
+ metadata.gz: d1134ebb53b4db927a34119f99b0b33dd05ce005cc3fd64962724dd28633b8b76961757b2180aecd543889e1cea0b30fcf7a1299f60436ad11eee49ea604709d
7
+ data.tar.gz: 17a077d87af88da2fd93b2930fd1b3c4ad824f4f5ee1709b3df4ef5a474f0b305a14a2d8b209f415c734da4700f9e2f4d9063b9aa35aa4e426559bb49a49ccbb
@@ -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'
@@ -21,33 +21,35 @@ module MailSlurpClient
21
21
  end
22
22
  # Create new random inbox
23
23
  # Returns an Inbox with an `id` and an `emailAddress`
24
- # @param use_domain_pool [Boolean] useDomainPool
25
24
  # @param [Hash] opts the optional parameters
25
+ # @option opts [DateTime] :expires_at expiresAt
26
+ # @option opts [Integer] :expires_in expiresIn
27
+ # @option opts [Boolean] :use_domain_pool useDomainPool
26
28
  # @return [Inbox]
27
- def create_new_email_address(use_domain_pool, opts = {})
28
- data, _status_code, _headers = create_new_email_address_with_http_info(use_domain_pool, opts)
29
+ def create_new_email_address(opts = {})
30
+ data, _status_code, _headers = create_new_email_address_with_http_info(opts)
29
31
  data
30
32
  end
31
33
 
32
34
  # Create new random inbox
33
35
  # Returns an Inbox with an `id` and an `emailAddress`
34
- # @param use_domain_pool [Boolean] useDomainPool
35
36
  # @param [Hash] opts the optional parameters
37
+ # @option opts [DateTime] :expires_at expiresAt
38
+ # @option opts [Integer] :expires_in expiresIn
39
+ # @option opts [Boolean] :use_domain_pool useDomainPool
36
40
  # @return [Array<(Inbox, Integer, Hash)>] Inbox data, response status code and response headers
37
- def create_new_email_address_with_http_info(use_domain_pool, opts = {})
41
+ def create_new_email_address_with_http_info(opts = {})
38
42
  if @api_client.config.debugging
39
43
  @api_client.config.logger.debug 'Calling API: CommonActionsControllerApi.create_new_email_address ...'
40
44
  end
41
- # verify the required parameter 'use_domain_pool' is set
42
- if @api_client.config.client_side_validation && use_domain_pool.nil?
43
- fail ArgumentError, "Missing the required parameter 'use_domain_pool' when calling CommonActionsControllerApi.create_new_email_address"
44
- end
45
45
  # resource path
46
46
  local_var_path = '/createInbox'
47
47
 
48
48
  # query parameters
49
49
  query_params = opts[:query_params] || {}
50
- query_params[:'useDomainPool'] = use_domain_pool
50
+ query_params[:'expiresAt'] = opts[:'expires_at'] if !opts[:'expires_at'].nil?
51
+ query_params[:'expiresIn'] = opts[:'expires_in'] if !opts[:'expires_in'].nil?
52
+ query_params[:'useDomainPool'] = opts[:'use_domain_pool'] if !opts[:'use_domain_pool'].nil?
51
53
 
52
54
  # header parameters
53
55
  header_params = opts[:header_params] || {}
@@ -84,33 +86,35 @@ module MailSlurpClient
84
86
 
85
87
  # Create new random inbox
86
88
  # Returns an Inbox with an `id` and an `emailAddress`
87
- # @param use_domain_pool [Boolean] useDomainPool
88
89
  # @param [Hash] opts the optional parameters
90
+ # @option opts [DateTime] :expires_at expiresAt
91
+ # @option opts [Integer] :expires_in expiresIn
92
+ # @option opts [Boolean] :use_domain_pool useDomainPool
89
93
  # @return [Inbox]
90
- def create_new_email_address1(use_domain_pool, opts = {})
91
- data, _status_code, _headers = create_new_email_address1_with_http_info(use_domain_pool, opts)
94
+ def create_new_email_address1(opts = {})
95
+ data, _status_code, _headers = create_new_email_address1_with_http_info(opts)
92
96
  data
93
97
  end
94
98
 
95
99
  # Create new random inbox
96
100
  # Returns an Inbox with an &#x60;id&#x60; and an &#x60;emailAddress&#x60;
97
- # @param use_domain_pool [Boolean] useDomainPool
98
101
  # @param [Hash] opts the optional parameters
102
+ # @option opts [DateTime] :expires_at expiresAt
103
+ # @option opts [Integer] :expires_in expiresIn
104
+ # @option opts [Boolean] :use_domain_pool useDomainPool
99
105
  # @return [Array<(Inbox, Integer, Hash)>] Inbox data, response status code and response headers
100
- def create_new_email_address1_with_http_info(use_domain_pool, opts = {})
106
+ def create_new_email_address1_with_http_info(opts = {})
101
107
  if @api_client.config.debugging
102
108
  @api_client.config.logger.debug 'Calling API: CommonActionsControllerApi.create_new_email_address1 ...'
103
109
  end
104
- # verify the required parameter 'use_domain_pool' is set
105
- if @api_client.config.client_side_validation && use_domain_pool.nil?
106
- fail ArgumentError, "Missing the required parameter 'use_domain_pool' when calling CommonActionsControllerApi.create_new_email_address1"
107
- end
108
110
  # resource path
109
111
  local_var_path = '/newEmailAddress'
110
112
 
111
113
  # query parameters
112
114
  query_params = opts[:query_params] || {}
113
- query_params[:'useDomainPool'] = use_domain_pool
115
+ query_params[:'expiresAt'] = opts[:'expires_at'] if !opts[:'expires_at'].nil?
116
+ query_params[:'expiresIn'] = opts[:'expires_in'] if !opts[:'expires_in'].nil?
117
+ query_params[:'useDomainPool'] = opts[:'use_domain_pool'] if !opts[:'use_domain_pool'].nil?
114
118
 
115
119
  # header parameters
116
120
  header_params = opts[:header_params] || {}
@@ -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 &#39;.my-div&#39; 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 &#39;.my-div&#39; 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
@@ -25,6 +25,7 @@ module MailSlurpClient
25
25
  # @option opts [String] :description Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with
26
26
  # @option opts [String] :email_address A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as &#x60;123@mailslurp.com&#x60;. If you use the &#x60;useDomainPool&#x60; option when the email address is null it will generate an email address with a more varied domain ending such as &#x60;123@mailslurp.info&#x60; or &#x60;123@mailslurp.biz&#x60;. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID.
27
27
  # @option opts [DateTime] :expires_at Optional inbox expiration date. If null then this inbox is permanent and the emails in it won&#39;t be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSSXXX.
28
+ # @option opts [Integer] :expires_in Number of milliseconds that inbox should exist for
28
29
  # @option opts [Boolean] :favourite Is the inbox favorited. Favouriting inboxes is typically done in the dashboard for quick access or filtering
29
30
  # @option opts [String] :name Optional name of the inbox. Displayed in the dashboard for easier search
30
31
  # @option opts [Array<String>] :tags Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI.
@@ -41,6 +42,7 @@ module MailSlurpClient
41
42
  # @option opts [String] :description Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with
42
43
  # @option opts [String] :email_address A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as &#x60;123@mailslurp.com&#x60;. If you use the &#x60;useDomainPool&#x60; option when the email address is null it will generate an email address with a more varied domain ending such as &#x60;123@mailslurp.info&#x60; or &#x60;123@mailslurp.biz&#x60;. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID.
43
44
  # @option opts [DateTime] :expires_at Optional inbox expiration date. If null then this inbox is permanent and the emails in it won&#39;t be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSSXXX.
45
+ # @option opts [Integer] :expires_in Number of milliseconds that inbox should exist for
44
46
  # @option opts [Boolean] :favourite Is the inbox favorited. Favouriting inboxes is typically done in the dashboard for quick access or filtering
45
47
  # @option opts [String] :name Optional name of the inbox. Displayed in the dashboard for easier search
46
48
  # @option opts [Array<String>] :tags Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI.
@@ -58,6 +60,7 @@ module MailSlurpClient
58
60
  query_params[:'description'] = opts[:'description'] if !opts[:'description'].nil?
59
61
  query_params[:'emailAddress'] = opts[:'email_address'] if !opts[:'email_address'].nil?
60
62
  query_params[:'expiresAt'] = opts[:'expires_at'] if !opts[:'expires_at'].nil?
63
+ query_params[:'expiresIn'] = opts[:'expires_in'] if !opts[:'expires_in'].nil?
61
64
  query_params[:'favourite'] = opts[:'favourite'] if !opts[:'favourite'].nil?
62
65
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
63
66
  query_params[:'tags'] = @api_client.build_collection_param(opts[:'tags'], :multi) if !opts[:'tags'].nil?
@@ -24,6 +24,9 @@ module MailSlurpClient
24
24
  # Optional inbox expiration date. If null then this inbox is permanent and the emails in it won't be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd'T'HH:mm:ss.SSSXXX.
25
25
  attr_accessor :expires_at
26
26
 
27
+ # Number of milliseconds that inbox should exist for
28
+ attr_accessor :expires_in
29
+
27
30
  # Is the inbox favorited. Favouriting inboxes is typically done in the dashboard for quick access or filtering
28
31
  attr_accessor :favourite
29
32
 
@@ -42,6 +45,7 @@ module MailSlurpClient
42
45
  :'description' => :'description',
43
46
  :'email_address' => :'emailAddress',
44
47
  :'expires_at' => :'expiresAt',
48
+ :'expires_in' => :'expiresIn',
45
49
  :'favourite' => :'favourite',
46
50
  :'name' => :'name',
47
51
  :'tags' => :'tags',
@@ -55,6 +59,7 @@ module MailSlurpClient
55
59
  :'description' => :'String',
56
60
  :'email_address' => :'String',
57
61
  :'expires_at' => :'DateTime',
62
+ :'expires_in' => :'Integer',
58
63
  :'favourite' => :'Boolean',
59
64
  :'name' => :'String',
60
65
  :'tags' => :'Array<String>',
@@ -95,6 +100,10 @@ module MailSlurpClient
95
100
  self.expires_at = attributes[:'expires_at']
96
101
  end
97
102
 
103
+ if attributes.key?(:'expires_in')
104
+ self.expires_in = attributes[:'expires_in']
105
+ end
106
+
98
107
  if attributes.key?(:'favourite')
99
108
  self.favourite = attributes[:'favourite']
100
109
  end
@@ -135,6 +144,7 @@ module MailSlurpClient
135
144
  description == o.description &&
136
145
  email_address == o.email_address &&
137
146
  expires_at == o.expires_at &&
147
+ expires_in == o.expires_in &&
138
148
  favourite == o.favourite &&
139
149
  name == o.name &&
140
150
  tags == o.tags &&
@@ -150,7 +160,7 @@ module MailSlurpClient
150
160
  # Calculates hash code according to all attributes.
151
161
  # @return [Integer] Hash code
152
162
  def hash
153
- [description, email_address, expires_at, favourite, name, tags, use_domain_pool].hash
163
+ [description, email_address, expires_at, expires_in, favourite, name, tags, use_domain_pool].hash
154
164
  end
155
165
 
156
166
  # Builds the object from hash
@@ -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 :data
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
- :'data' => :'data',
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
- :'data' => :'String',
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?(:'data')
90
- self.data = attributes[:'data']
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 @data.nil?
111
- invalid_properties.push('invalid value for "data", data cannot be nil.')
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 @data.nil?
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
- data == o.data &&
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
- [data, record_type, ttl, value].hash
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
@@ -11,5 +11,5 @@ OpenAPI Generator version: 4.3.1
11
11
  =end
12
12
 
13
13
  module MailSlurpClient
14
- VERSION = '9.0.0'
14
+ VERSION = '11.2.0'
15
15
  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: 9.0.0
4
+ version: 11.2.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-08 00:00:00.000000000 Z
11
+ date: 2021-01-16 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.
@@ -70,6 +70,7 @@ files:
70
70
  - lib/mailslurp_client/models/email_content_match_result.rb
71
71
  - lib/mailslurp_client/models/email_preview.rb
72
72
  - lib/mailslurp_client/models/email_projection.rb
73
+ - lib/mailslurp_client/models/email_text_lines_result.rb
73
74
  - lib/mailslurp_client/models/email_verification_result.rb
74
75
  - lib/mailslurp_client/models/expired_inbox_dto.rb
75
76
  - lib/mailslurp_client/models/expired_inbox_record_projection.rb