mailslurp_client 11.15.0 → 12.1.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client.rb +2 -1
  3. data/lib/mailslurp_client/api/attachment_controller_api.rb +3 -0
  4. data/lib/mailslurp_client/api/email_controller_api.rb +10 -10
  5. data/lib/mailslurp_client/api/inbox_controller_api.rb +17 -10
  6. data/lib/mailslurp_client/api/wait_for_controller_api.rb +2 -2
  7. data/lib/mailslurp_client/models/{attachment_entity.rb → attachment_projection.rb} +7 -18
  8. data/lib/mailslurp_client/models/condition_option.rb +264 -0
  9. data/lib/mailslurp_client/models/create_domain_options.rb +2 -2
  10. data/lib/mailslurp_client/models/create_inbox_dto.rb +6 -6
  11. data/lib/mailslurp_client/models/domain_dto.rb +45 -1
  12. data/lib/mailslurp_client/models/domain_name_record.rb +1 -1
  13. data/lib/mailslurp_client/models/forward_email_options.rb +24 -4
  14. data/lib/mailslurp_client/models/inbox.rb +48 -4
  15. data/lib/mailslurp_client/models/inbox_projection.rb +44 -1
  16. data/lib/mailslurp_client/models/match_options.rb +15 -3
  17. data/lib/mailslurp_client/models/organization_inbox_projection.rb +47 -3
  18. data/lib/mailslurp_client/models/page_attachment_entity.rb +1 -1
  19. data/lib/mailslurp_client/models/page_sent_email_projection.rb +6 -0
  20. data/lib/mailslurp_client/models/reply_to_alias_email_options.rb +14 -4
  21. data/lib/mailslurp_client/models/reply_to_email_options.rb +14 -4
  22. data/lib/mailslurp_client/models/send_email_options.rb +27 -7
  23. data/lib/mailslurp_client/models/set_inbox_favourited_options.rb +1 -1
  24. data/lib/mailslurp_client/models/update_inbox_options.rb +2 -2
  25. data/lib/mailslurp_client/models/upload_attachment_options.rb +5 -0
  26. data/lib/mailslurp_client/models/wait_for_conditions.rb +1 -1
  27. data/lib/mailslurp_client/version.rb +1 -1
  28. metadata +4 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 29073b9c4d625958253a621ebe220124ec2cf4cf338f2414eeed496f705201ff
4
- data.tar.gz: 7e9aadaf455662912acff558413295776123aa058072b13cc0ad08873af405f7
3
+ metadata.gz: 5f878bf983ebb1864e73ab7693ac90d1a04f8ef4a84698f2bef34752d9d97c5b
4
+ data.tar.gz: ce0ed9bf08a4bf8490cf11e9cbe8f041f3e9595c78a6ad86afe7fbdfc017dba3
5
5
  SHA512:
6
- metadata.gz: e856d969cd1c100707dc1448257acfeb1fc1016009774d1e7936e3d87a28e026e9622fdcac5d180e39178bc28f747d32bab9c0b928f8ceb2547fabc62d9026a8
7
- data.tar.gz: fb59e397c3e9144bd6dba1a632593fbfb74bc7a20ca5cffab477eec5686261ee8bfc0bd44328404caac25e2325feae6479995cb0892dcd76c8c892f16a8176fe
6
+ metadata.gz: 3b241ae5a62ce1bcff2d129230d81b83f60449620c762041ef5d6c1ccb474f1f5ac4c4d2a5d4d7c0fe4eb61b7d3d8fc9f8383eef39ed5f782c30bb2532a6a177
7
+ data.tar.gz: 79597481eb7050d4be1858b872252269f6a4ec540a9859196a7af4a60ca86041c0a2d09a376e15cd37674f764d06767ef7deb564de75c54d22dd789e3363e971
@@ -20,10 +20,11 @@ require 'mailslurp_client/configuration'
20
20
  require 'mailslurp_client/models/abstract_webhook_payload'
21
21
  require 'mailslurp_client/models/alias_dto'
22
22
  require 'mailslurp_client/models/alias_projection'
23
- require 'mailslurp_client/models/attachment_entity'
24
23
  require 'mailslurp_client/models/attachment_meta_data'
24
+ require 'mailslurp_client/models/attachment_projection'
25
25
  require 'mailslurp_client/models/basic_auth_options'
26
26
  require 'mailslurp_client/models/bulk_send_email_options'
27
+ require 'mailslurp_client/models/condition_option'
27
28
  require 'mailslurp_client/models/contact_dto'
28
29
  require 'mailslurp_client/models/contact_projection'
29
30
  require 'mailslurp_client/models/content_match_options'
@@ -268,6 +268,7 @@ module MailSlurpClient
268
268
  # Get email attachments
269
269
  # Get all attachments in paginated response. Each entity contains meta data for the attachment such as `name` and `content-type`. Use the `attachmentId` and the download endpoints to get the file contents.
270
270
  # @param [Hash] opts the optional parameters
271
+ # @option opts [String] :file_name_filter Optional file name and content type search filter
271
272
  # @option opts [Integer] :page Optional page index event list pagination (default to 0)
272
273
  # @option opts [Integer] :size Optional page size event list pagination (default to 20)
273
274
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
@@ -280,6 +281,7 @@ module MailSlurpClient
280
281
  # Get email attachments
281
282
  # Get all attachments in paginated response. Each entity contains meta data for the attachment such as `name` and `content-type`. Use the `attachmentId` and the download endpoints to get the file contents.
282
283
  # @param [Hash] opts the optional parameters
284
+ # @option opts [String] :file_name_filter Optional file name and content type search filter
283
285
  # @option opts [Integer] :page Optional page index event list pagination
284
286
  # @option opts [Integer] :size Optional page size event list pagination
285
287
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
@@ -297,6 +299,7 @@ module MailSlurpClient
297
299
 
298
300
  # query parameters
299
301
  query_params = opts[:query_params] || {}
302
+ query_params[:'fileNameFilter'] = opts[:'file_name_filter'] if !opts[:'file_name_filter'].nil?
300
303
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
301
304
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
302
305
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
@@ -204,7 +204,7 @@ module MailSlurpClient
204
204
  return data, status_code, headers
205
205
  end
206
206
 
207
- # Get email attachment as base64 encoded string alternative to binary responses. Decode the `base64FileContents` as a `utf-8` encoded string or array of bytes depending on the `contentType`.
207
+ # Get email attachment as base64 encoded string as an alternative to binary responses. Decode the `base64FileContents` as a `utf-8` encoded string or array of bytes depending on the `contentType`.
208
208
  # Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses.
209
209
  # @param attachment_id [String] ID of attachment
210
210
  # @param email_id [String] ID of email
@@ -215,7 +215,7 @@ module MailSlurpClient
215
215
  data
216
216
  end
217
217
 
218
- # Get email attachment as base64 encoded string alternative to binary responses. Decode the `base64FileContents` as a `utf-8` encoded string or array of bytes depending on the `contentType`.
218
+ # Get email attachment as base64 encoded string as an alternative to binary responses. Decode the `base64FileContents` as a `utf-8` encoded string or array of bytes depending on the `contentType`.
219
219
  # Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses.
220
220
  # @param attachment_id [String] ID of attachment
221
221
  # @param email_id [String] ID of email
@@ -397,7 +397,7 @@ module MailSlurpClient
397
397
  end
398
398
 
399
399
  # Forward email to recipients
400
- # Forward an existing email to new recipients.
400
+ # Forward an existing email to new recipients. The sender of the email will be the inbox that received the email you are forwarding. You can override the sender with the `from` option. Note you must have access to the from address in MailSlurp to use the override. For more control consider fetching the email and sending it a new using the send email endpoints.
401
401
  # @param email_id [String] ID of email
402
402
  # @param forward_email_options [ForwardEmailOptions] forwardEmailOptions
403
403
  # @param [Hash] opts the optional parameters
@@ -408,7 +408,7 @@ module MailSlurpClient
408
408
  end
409
409
 
410
410
  # Forward email to recipients
411
- # Forward an existing email to new recipients.
411
+ # Forward an existing email to new recipients. The sender of the email will be the inbox that received the email you are forwarding. You can override the sender with the `from` option. Note you must have access to the from address in MailSlurp to use the override. For more control consider fetching the email and sending it a new using the send email endpoints.
412
412
  # @param email_id [String] ID of email
413
413
  # @param forward_email_options [ForwardEmailOptions] forwardEmailOptions
414
414
  # @param [Hash] opts the optional parameters
@@ -532,7 +532,7 @@ module MailSlurpClient
532
532
  return data, status_code, headers
533
533
  end
534
534
 
535
- # Get all email attachment metadata. Metadata includes name and attachment size.
535
+ # Get all email attachment metadata. Metadata includes name and size of attachments.
536
536
  # Returns an array of attachment metadata such as name and content-type for a given email if present.
537
537
  # @param email_id [String] ID of email
538
538
  # @param [Hash] opts the optional parameters
@@ -542,7 +542,7 @@ module MailSlurpClient
542
542
  data
543
543
  end
544
544
 
545
- # Get all email attachment metadata. Metadata includes name and attachment size.
545
+ # Get all email attachment metadata. Metadata includes name and size of attachments.
546
546
  # Returns an array of attachment metadata such as name and content-type for a given email if present.
547
547
  # @param email_id [String] ID of email
548
548
  # @param [Hash] opts the optional parameters
@@ -927,7 +927,7 @@ module MailSlurpClient
927
927
  return data, status_code, headers
928
928
  end
929
929
 
930
- # Get all emails in all inboxes. Email API list all.
930
+ # Get all emails in all inboxes in paginated form. Email API list all.
931
931
  # 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
932
932
  # @param [Hash] opts the optional parameters
933
933
  # @option opts [Array<String>] :inbox_id Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account.
@@ -941,7 +941,7 @@ module MailSlurpClient
941
941
  data
942
942
  end
943
943
 
944
- # Get all emails in all inboxes. Email API list all.
944
+ # Get all emails in all inboxes in paginated form. Email API list all.
945
945
  # 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
946
946
  # @param [Hash] opts the optional parameters
947
947
  # @option opts [Array<String>] :inbox_id Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account.
@@ -1446,7 +1446,7 @@ module MailSlurpClient
1446
1446
  end
1447
1447
 
1448
1448
  # Validate email HTML contents
1449
- # Validate the HTML content of email if HTML is found. Considered valid if no HTML.
1449
+ # Validate the HTML content of email if HTML is found. Considered valid if no HTML is present.
1450
1450
  # @param email_id [String] ID of email
1451
1451
  # @param [Hash] opts the optional parameters
1452
1452
  # @return [ValidationDto]
@@ -1456,7 +1456,7 @@ module MailSlurpClient
1456
1456
  end
1457
1457
 
1458
1458
  # Validate email HTML contents
1459
- # Validate the HTML content of email if HTML is found. Considered valid if no HTML.
1459
+ # Validate the HTML content of email if HTML is found. Considered valid if no HTML is present.
1460
1460
  # @param email_id [String] ID of email
1461
1461
  # @param [Hash] opts the optional parameters
1462
1462
  # @return [Array<(ValidationDto, Integer, Hash)>] ValidationDto data, response status code and response headers
@@ -19,41 +19,47 @@ module MailSlurpClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Create an inbox email address. An inbox has a real email address and can send and receive emails.
22
+ # Create an inbox email address. An inbox has a real email address and can send and receive emails. Inboxes can be either `SMTP` or `HTTP` inboxes.
23
23
  # Create a new inbox and with a randomized email address to send and receive from. Pass emailAddress parameter if you wish to use a specific email address. Creating an inbox is required before sending or receiving emails. If writing tests it is recommended that you create a new inbox during each test method so that it is unique and empty.
24
24
  # @param [Hash] opts the optional parameters
25
25
  # @option opts [Boolean] :allow_team_access Grant team access to this inbox and the emails that belong to it for team members of your organization.
26
26
  # @option opts [String] :description Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with
27
- # @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
+ # @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. Note domain types must match the inbox type - so &#x60;SMTP&#x60; inboxes will only work with &#x60;SMTP&#x60; type domains. 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.
28
28
  # @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.
29
29
  # @option opts [Integer] :expires_in Number of milliseconds that inbox should exist for
30
- # @option opts [Boolean] :favourite Is the inbox favorited. Favouriting inboxes is typically done in the dashboard for quick access or filtering
31
- # @option opts [String] :name Optional name of the inbox. Displayed in the dashboard for easier search
30
+ # @option opts [Boolean] :favourite Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering
31
+ # @option opts [String] :inbox_type HTTP (default) or SMTP inbox type. HTTP inboxes are best for testing while SMTP inboxes are more reliable for public inbound email consumption. When using custom domains the domain type must match the inbox type. HTTP inboxes are processed by AWS SES while SMTP inboxes use a custom mail server running at &#x60;mx.mailslurp.com&#x60;.
32
+ # @option opts [String] :name Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails.
32
33
  # @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.
33
- # @option opts [Boolean] :use_domain_pool Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default &#x60;@mailslurp.com&#x60; email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in &#x60;@mailslurp.{world,info,xyz,...}&#x60; . This means a TLD is randomly selecting from a list of &#x60;.biz&#x60;, &#x60;.info&#x60;, &#x60;.xyz&#x60; etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of &#x60;@mailslurp.com&#x60; or custom email address provided by the emailAddress field.
34
+ # @option opts [Boolean] :use_domain_pool Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default &#x60;@mailslurp.com&#x60; email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in &#x60;@mailslurp.{world,info,xyz,...}&#x60; . This means a TLD is randomly selecting from a list of &#x60;.biz&#x60;, &#x60;.info&#x60;, &#x60;.xyz&#x60; etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of &#x60;@mailslurp.com&#x60; or custom email address provided by the emailAddress field. Note this feature is only available for &#x60;HTTP&#x60; inbox types.
34
35
  # @return [Inbox]
35
36
  def create_inbox(opts = {})
36
37
  data, _status_code, _headers = create_inbox_with_http_info(opts)
37
38
  data
38
39
  end
39
40
 
40
- # Create an inbox email address. An inbox has a real email address and can send and receive emails.
41
+ # Create an inbox email address. An inbox has a real email address and can send and receive emails. Inboxes can be either &#x60;SMTP&#x60; or &#x60;HTTP&#x60; inboxes.
41
42
  # Create a new inbox and with a randomized email address to send and receive from. Pass emailAddress parameter if you wish to use a specific email address. Creating an inbox is required before sending or receiving emails. If writing tests it is recommended that you create a new inbox during each test method so that it is unique and empty.
42
43
  # @param [Hash] opts the optional parameters
43
44
  # @option opts [Boolean] :allow_team_access Grant team access to this inbox and the emails that belong to it for team members of your organization.
44
45
  # @option opts [String] :description Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with
45
- # @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.
46
+ # @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. Note domain types must match the inbox type - so &#x60;SMTP&#x60; inboxes will only work with &#x60;SMTP&#x60; type domains. 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.
46
47
  # @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.
47
48
  # @option opts [Integer] :expires_in Number of milliseconds that inbox should exist for
48
- # @option opts [Boolean] :favourite Is the inbox favorited. Favouriting inboxes is typically done in the dashboard for quick access or filtering
49
- # @option opts [String] :name Optional name of the inbox. Displayed in the dashboard for easier search
49
+ # @option opts [Boolean] :favourite Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering
50
+ # @option opts [String] :inbox_type HTTP (default) or SMTP inbox type. HTTP inboxes are best for testing while SMTP inboxes are more reliable for public inbound email consumption. When using custom domains the domain type must match the inbox type. HTTP inboxes are processed by AWS SES while SMTP inboxes use a custom mail server running at &#x60;mx.mailslurp.com&#x60;.
51
+ # @option opts [String] :name Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails.
50
52
  # @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.
51
- # @option opts [Boolean] :use_domain_pool Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default &#x60;@mailslurp.com&#x60; email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in &#x60;@mailslurp.{world,info,xyz,...}&#x60; . This means a TLD is randomly selecting from a list of &#x60;.biz&#x60;, &#x60;.info&#x60;, &#x60;.xyz&#x60; etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of &#x60;@mailslurp.com&#x60; or custom email address provided by the emailAddress field.
53
+ # @option opts [Boolean] :use_domain_pool Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default &#x60;@mailslurp.com&#x60; email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in &#x60;@mailslurp.{world,info,xyz,...}&#x60; . This means a TLD is randomly selecting from a list of &#x60;.biz&#x60;, &#x60;.info&#x60;, &#x60;.xyz&#x60; etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of &#x60;@mailslurp.com&#x60; or custom email address provided by the emailAddress field. Note this feature is only available for &#x60;HTTP&#x60; inbox types.
52
54
  # @return [Array<(Inbox, Integer, Hash)>] Inbox data, response status code and response headers
53
55
  def create_inbox_with_http_info(opts = {})
54
56
  if @api_client.config.debugging
55
57
  @api_client.config.logger.debug 'Calling API: InboxControllerApi.create_inbox ...'
56
58
  end
59
+ allowable_values = ["HTTP_INBOX", "SMTP_INBOX"]
60
+ if @api_client.config.client_side_validation && opts[:'inbox_type'] && !allowable_values.include?(opts[:'inbox_type'])
61
+ fail ArgumentError, "invalid value for \"inbox_type\", must be one of #{allowable_values}"
62
+ end
57
63
  # resource path
58
64
  local_var_path = '/inboxes'
59
65
 
@@ -65,6 +71,7 @@ module MailSlurpClient
65
71
  query_params[:'expiresAt'] = opts[:'expires_at'] if !opts[:'expires_at'].nil?
66
72
  query_params[:'expiresIn'] = opts[:'expires_in'] if !opts[:'expires_in'].nil?
67
73
  query_params[:'favourite'] = opts[:'favourite'] if !opts[:'favourite'].nil?
74
+ query_params[:'inboxType'] = opts[:'inbox_type'] if !opts[:'inbox_type'].nil?
68
75
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
69
76
  query_params[:'tags'] = @api_client.build_collection_param(opts[:'tags'], :multi) if !opts[:'tags'].nil?
70
77
  query_params[:'useDomainPool'] = opts[:'use_domain_pool'] if !opts[:'use_domain_pool'].nil?
@@ -288,7 +288,7 @@ module MailSlurpClient
288
288
  return data, status_code, headers
289
289
  end
290
290
 
291
- # Wait for or return the first email that matches proved MatchOptions array
291
+ # Wait for or return the first email that matches provided MatchOptions array
292
292
  # Perform a search of emails in an inbox with the given patterns. If a result if found then return or else retry the search until a result is found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method.
293
293
  # @param match_options [MatchOptions] matchOptions
294
294
  # @param [Hash] opts the optional parameters
@@ -301,7 +301,7 @@ module MailSlurpClient
301
301
  data
302
302
  end
303
303
 
304
- # Wait for or return the first email that matches proved MatchOptions array
304
+ # Wait for or return the first email that matches provided MatchOptions array
305
305
  # Perform a search of emails in an inbox with the given patterns. If a result if found then return or else retry the search until a result is found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the &#x60;MatchOptions&#x60; object for options. An example payload is &#x60;{ matches: [{field: &#39;SUBJECT&#39;,should:&#39;CONTAIN&#39;,value:&#39;needle&#39;}] }&#x60;. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController &#x60;getEmailContentMatch&#x60; method.
306
306
  # @param match_options [MatchOptions] matchOptions
307
307
  # @param [Hash] opts the optional parameters
@@ -13,17 +13,18 @@ OpenAPI Generator version: 4.3.1
13
13
  require 'date'
14
14
 
15
15
  module MailSlurpClient
16
- class AttachmentEntity
16
+ class AttachmentProjection
17
+ # Attachment ID
17
18
  attr_accessor :attachment_id
18
19
 
20
+ # Content length of attachment in bytes
19
21
  attr_accessor :content_length
20
22
 
23
+ # Content type of attachment.
21
24
  attr_accessor :content_type
22
25
 
23
26
  attr_accessor :created_at
24
27
 
25
- attr_accessor :id
26
-
27
28
  attr_accessor :name
28
29
 
29
30
  attr_accessor :updated_at
@@ -37,7 +38,6 @@ module MailSlurpClient
37
38
  :'content_length' => :'contentLength',
38
39
  :'content_type' => :'contentType',
39
40
  :'created_at' => :'createdAt',
40
- :'id' => :'id',
41
41
  :'name' => :'name',
42
42
  :'updated_at' => :'updatedAt',
43
43
  :'user_id' => :'userId'
@@ -51,7 +51,6 @@ module MailSlurpClient
51
51
  :'content_length' => :'Integer',
52
52
  :'content_type' => :'String',
53
53
  :'created_at' => :'DateTime',
54
- :'id' => :'String',
55
54
  :'name' => :'String',
56
55
  :'updated_at' => :'DateTime',
57
56
  :'user_id' => :'String'
@@ -68,13 +67,13 @@ module MailSlurpClient
68
67
  # @param [Hash] attributes Model attributes in the form of hash
69
68
  def initialize(attributes = {})
70
69
  if (!attributes.is_a?(Hash))
71
- fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::AttachmentEntity` initialize method"
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::AttachmentProjection` initialize method"
72
71
  end
73
72
 
74
73
  # check to see if the attribute exists and convert string to symbol for hash key
75
74
  attributes = attributes.each_with_object({}) { |(k, v), h|
76
75
  if (!self.class.attribute_map.key?(k.to_sym))
77
- fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::AttachmentEntity`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
76
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::AttachmentProjection`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
78
77
  end
79
78
  h[k.to_sym] = v
80
79
  }
@@ -95,10 +94,6 @@ module MailSlurpClient
95
94
  self.created_at = attributes[:'created_at']
96
95
  end
97
96
 
98
- if attributes.key?(:'id')
99
- self.id = attributes[:'id']
100
- end
101
-
102
97
  if attributes.key?(:'name')
103
98
  self.name = attributes[:'name']
104
99
  end
@@ -116,10 +111,6 @@ module MailSlurpClient
116
111
  # @return Array for valid properties with the reasons
117
112
  def list_invalid_properties
118
113
  invalid_properties = Array.new
119
- if @attachment_id.nil?
120
- invalid_properties.push('invalid value for "attachment_id", attachment_id cannot be nil.')
121
- end
122
-
123
114
  if @created_at.nil?
124
115
  invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
125
116
  end
@@ -138,7 +129,6 @@ module MailSlurpClient
138
129
  # Check to see if the all the properties in the model are valid
139
130
  # @return true if the model is valid
140
131
  def valid?
141
- return false if @attachment_id.nil?
142
132
  return false if @created_at.nil?
143
133
  return false if @updated_at.nil?
144
134
  return false if @user_id.nil?
@@ -154,7 +144,6 @@ module MailSlurpClient
154
144
  content_length == o.content_length &&
155
145
  content_type == o.content_type &&
156
146
  created_at == o.created_at &&
157
- id == o.id &&
158
147
  name == o.name &&
159
148
  updated_at == o.updated_at &&
160
149
  user_id == o.user_id
@@ -169,7 +158,7 @@ module MailSlurpClient
169
158
  # Calculates hash code according to all attributes.
170
159
  # @return [Integer] Hash code
171
160
  def hash
172
- [attachment_id, content_length, content_type, created_at, id, name, updated_at, user_id].hash
161
+ [attachment_id, content_length, content_type, created_at, name, updated_at, user_id].hash
173
162
  end
174
163
 
175
164
  # Builds the object from hash
@@ -0,0 +1,264 @@
1
+ =begin
2
+ #MailSlurp API
3
+
4
+ #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
5
+
6
+ The version of the OpenAPI document: 6.5.2
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module MailSlurpClient
16
+ # Options for matching emails in an inbox based on a condition such as `HAS_ATTACHMENTS=TRUE`
17
+ class ConditionOption
18
+ # The condition to evaluate against the email
19
+ attr_accessor :condition
20
+
21
+ # What the condition should evaluate to. A string 'TRUE|FALSE' not a boolean.
22
+ attr_accessor :value
23
+
24
+ class EnumAttributeValidator
25
+ attr_reader :datatype
26
+ attr_reader :allowable_values
27
+
28
+ def initialize(datatype, allowable_values)
29
+ @allowable_values = allowable_values.map do |value|
30
+ case datatype.to_s
31
+ when /Integer/i
32
+ value.to_i
33
+ when /Float/i
34
+ value.to_f
35
+ else
36
+ value
37
+ end
38
+ end
39
+ end
40
+
41
+ def valid?(value)
42
+ !value || allowable_values.include?(value)
43
+ end
44
+ end
45
+
46
+ # Attribute mapping from ruby-style variable name to JSON key.
47
+ def self.attribute_map
48
+ {
49
+ :'condition' => :'condition',
50
+ :'value' => :'value'
51
+ }
52
+ end
53
+
54
+ # Attribute type mapping.
55
+ def self.openapi_types
56
+ {
57
+ :'condition' => :'String',
58
+ :'value' => :'String'
59
+ }
60
+ end
61
+
62
+ # List of attributes with nullable: true
63
+ def self.openapi_nullable
64
+ Set.new([
65
+ ])
66
+ end
67
+
68
+ # Initializes the object
69
+ # @param [Hash] attributes Model attributes in the form of hash
70
+ def initialize(attributes = {})
71
+ if (!attributes.is_a?(Hash))
72
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::ConditionOption` initialize method"
73
+ end
74
+
75
+ # check to see if the attribute exists and convert string to symbol for hash key
76
+ attributes = attributes.each_with_object({}) { |(k, v), h|
77
+ if (!self.class.attribute_map.key?(k.to_sym))
78
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::ConditionOption`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
79
+ end
80
+ h[k.to_sym] = v
81
+ }
82
+
83
+ if attributes.key?(:'condition')
84
+ self.condition = attributes[:'condition']
85
+ end
86
+
87
+ if attributes.key?(:'value')
88
+ self.value = attributes[:'value']
89
+ end
90
+ end
91
+
92
+ # Show invalid properties with the reasons. Usually used together with valid?
93
+ # @return Array for valid properties with the reasons
94
+ def list_invalid_properties
95
+ invalid_properties = Array.new
96
+ invalid_properties
97
+ end
98
+
99
+ # Check to see if the all the properties in the model are valid
100
+ # @return true if the model is valid
101
+ def valid?
102
+ condition_validator = EnumAttributeValidator.new('String', ["HAS_ATTACHMENTS"])
103
+ return false unless condition_validator.valid?(@condition)
104
+ value_validator = EnumAttributeValidator.new('String', ["TRUE", "FALSE"])
105
+ return false unless value_validator.valid?(@value)
106
+ true
107
+ end
108
+
109
+ # Custom attribute writer method checking allowed values (enum).
110
+ # @param [Object] condition Object to be assigned
111
+ def condition=(condition)
112
+ validator = EnumAttributeValidator.new('String', ["HAS_ATTACHMENTS"])
113
+ unless validator.valid?(condition)
114
+ fail ArgumentError, "invalid value for \"condition\", must be one of #{validator.allowable_values}."
115
+ end
116
+ @condition = condition
117
+ end
118
+
119
+ # Custom attribute writer method checking allowed values (enum).
120
+ # @param [Object] value Object to be assigned
121
+ def value=(value)
122
+ validator = EnumAttributeValidator.new('String', ["TRUE", "FALSE"])
123
+ unless validator.valid?(value)
124
+ fail ArgumentError, "invalid value for \"value\", must be one of #{validator.allowable_values}."
125
+ end
126
+ @value = value
127
+ end
128
+
129
+ # Checks equality by comparing each attribute.
130
+ # @param [Object] Object to be compared
131
+ def ==(o)
132
+ return true if self.equal?(o)
133
+ self.class == o.class &&
134
+ condition == o.condition &&
135
+ value == o.value
136
+ end
137
+
138
+ # @see the `==` method
139
+ # @param [Object] Object to be compared
140
+ def eql?(o)
141
+ self == o
142
+ end
143
+
144
+ # Calculates hash code according to all attributes.
145
+ # @return [Integer] Hash code
146
+ def hash
147
+ [condition, value].hash
148
+ end
149
+
150
+ # Builds the object from hash
151
+ # @param [Hash] attributes Model attributes in the form of hash
152
+ # @return [Object] Returns the model itself
153
+ def self.build_from_hash(attributes)
154
+ new.build_from_hash(attributes)
155
+ end
156
+
157
+ # Builds the object from hash
158
+ # @param [Hash] attributes Model attributes in the form of hash
159
+ # @return [Object] Returns the model itself
160
+ def build_from_hash(attributes)
161
+ return nil unless attributes.is_a?(Hash)
162
+ self.class.openapi_types.each_pair do |key, type|
163
+ if type =~ /\AArray<(.*)>/i
164
+ # check to ensure the input is an array given that the attribute
165
+ # is documented as an array but the input is not
166
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
167
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
168
+ end
169
+ elsif !attributes[self.class.attribute_map[key]].nil?
170
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
171
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
172
+ end
173
+
174
+ self
175
+ end
176
+
177
+ # Deserializes the data based on type
178
+ # @param string type Data type
179
+ # @param string value Value to be deserialized
180
+ # @return [Object] Deserialized data
181
+ def _deserialize(type, value)
182
+ case type.to_sym
183
+ when :DateTime
184
+ DateTime.parse(value)
185
+ when :Date
186
+ Date.parse(value)
187
+ when :String
188
+ value.to_s
189
+ when :Integer
190
+ value.to_i
191
+ when :Float
192
+ value.to_f
193
+ when :Boolean
194
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
195
+ true
196
+ else
197
+ false
198
+ end
199
+ when :Object
200
+ # generic object (usually a Hash), return directly
201
+ value
202
+ when /\AArray<(?<inner_type>.+)>\z/
203
+ inner_type = Regexp.last_match[:inner_type]
204
+ value.map { |v| _deserialize(inner_type, v) }
205
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
206
+ k_type = Regexp.last_match[:k_type]
207
+ v_type = Regexp.last_match[:v_type]
208
+ {}.tap do |hash|
209
+ value.each do |k, v|
210
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
211
+ end
212
+ end
213
+ else # model
214
+ MailSlurpClient.const_get(type).build_from_hash(value)
215
+ end
216
+ end
217
+
218
+ # Returns the string representation of the object
219
+ # @return [String] String presentation of the object
220
+ def to_s
221
+ to_hash.to_s
222
+ end
223
+
224
+ # to_body is an alias to to_hash (backward compatibility)
225
+ # @return [Hash] Returns the object in the form of hash
226
+ def to_body
227
+ to_hash
228
+ end
229
+
230
+ # Returns the object in the form of hash
231
+ # @return [Hash] Returns the object in the form of hash
232
+ def to_hash
233
+ hash = {}
234
+ self.class.attribute_map.each_pair do |attr, param|
235
+ value = self.send(attr)
236
+ if value.nil?
237
+ is_nullable = self.class.openapi_nullable.include?(attr)
238
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
239
+ end
240
+
241
+ hash[param] = _to_hash(value)
242
+ end
243
+ hash
244
+ end
245
+
246
+ # Outputs non-array value in the form of hash
247
+ # For object, use to_hash. Otherwise, just return the value
248
+ # @param [Object] value Any valid value
249
+ # @return [Hash] Returns the value in the form of hash
250
+ def _to_hash(value)
251
+ if value.is_a?(Array)
252
+ value.compact.map { |v| _to_hash(v) }
253
+ elsif value.is_a?(Hash)
254
+ {}.tap do |hash|
255
+ value.each { |k, v| hash[k] = _to_hash(v) }
256
+ end
257
+ elsif value.respond_to? :to_hash
258
+ value.to_hash
259
+ else
260
+ value
261
+ end
262
+ end
263
+ end
264
+ end