mailslurp_client 11.4.23 → 11.5.2

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: 1fffdc1eb8bb7536625de6abd28ade2ac7d2ca5134bb91a03f77d24910ad5e03
4
- data.tar.gz: 604e79ae5237a804bdd251383faa739a6e90e01ea88625f7a08ee4bbe8d18ba5
3
+ metadata.gz: 98d97a30235ba47dd57de8da3b7e17cb28edf551e5d7739886f7ca41aeb7e3aa
4
+ data.tar.gz: a2f5039a30e09b4debc0609759450618424a7cd3ff624893dfd34f520058a42d
5
5
  SHA512:
6
- metadata.gz: c646f4ed868a5ad34fc87596f970eca465be717889882ff5d414793e8e446ad440f639e0e0218a63b4e19610e4b92df6afcedea8cd41ae581e97f3b1244da0ee
7
- data.tar.gz: 791c73ef2bea652c913fb1db34fa744750be6214862d72843a2c030c8f13dcfaa41e9fdce4568a6e82b43c3bc9f72da2aa570bb6dc02c2d678c9dd0e55ff1082
6
+ metadata.gz: 41d6c5bf21fe9ae6b167b1d2344be10e966fe91d1da34dd155567451a34b9e95ce6e348e552ef9e14331313d4f2114fad605e1957507560a177adda362e5fcbe
7
+ data.tar.gz: 82cbe72ca953581049908171e5c2753cc578dedf703cb0a28bb291169aa814cc933773fecc8740141ce8b623f93a458815bd4ab2587e21b3890dbbbd1b03c544
@@ -63,6 +63,7 @@ require 'mailslurp_client/models/match_option'
63
63
  require 'mailslurp_client/models/match_options'
64
64
  require 'mailslurp_client/models/model_alias'
65
65
  require 'mailslurp_client/models/name_server_record'
66
+ require 'mailslurp_client/models/organization_inbox_projection'
66
67
  require 'mailslurp_client/models/page_alias'
67
68
  require 'mailslurp_client/models/page_contact_projection'
68
69
  require 'mailslurp_client/models/page_email_preview'
@@ -70,6 +71,7 @@ require 'mailslurp_client/models/page_email_projection'
70
71
  require 'mailslurp_client/models/page_expired_inbox_record_projection'
71
72
  require 'mailslurp_client/models/page_group_projection'
72
73
  require 'mailslurp_client/models/page_inbox_projection'
74
+ require 'mailslurp_client/models/page_organization_inbox_projection'
73
75
  require 'mailslurp_client/models/page_sent_email_projection'
74
76
  require 'mailslurp_client/models/page_template_projection'
75
77
  require 'mailslurp_client/models/page_thread_projection'
@@ -22,6 +22,7 @@ module MailSlurpClient
22
22
  # Create new random inbox
23
23
  # Returns an Inbox with an `id` and an `emailAddress`
24
24
  # @param [Hash] opts the optional parameters
25
+ # @option opts [Boolean] :allow_team_access allowTeamAccess
25
26
  # @option opts [DateTime] :expires_at expiresAt
26
27
  # @option opts [Integer] :expires_in expiresIn
27
28
  # @option opts [Boolean] :use_domain_pool useDomainPool
@@ -34,6 +35,7 @@ module MailSlurpClient
34
35
  # Create new random inbox
35
36
  # Returns an Inbox with an `id` and an `emailAddress`
36
37
  # @param [Hash] opts the optional parameters
38
+ # @option opts [Boolean] :allow_team_access allowTeamAccess
37
39
  # @option opts [DateTime] :expires_at expiresAt
38
40
  # @option opts [Integer] :expires_in expiresIn
39
41
  # @option opts [Boolean] :use_domain_pool useDomainPool
@@ -47,6 +49,7 @@ module MailSlurpClient
47
49
 
48
50
  # query parameters
49
51
  query_params = opts[:query_params] || {}
52
+ query_params[:'allowTeamAccess'] = opts[:'allow_team_access'] if !opts[:'allow_team_access'].nil?
50
53
  query_params[:'expiresAt'] = opts[:'expires_at'] if !opts[:'expires_at'].nil?
51
54
  query_params[:'expiresIn'] = opts[:'expires_in'] if !opts[:'expires_in'].nil?
52
55
  query_params[:'useDomainPool'] = opts[:'use_domain_pool'] if !opts[:'use_domain_pool'].nil?
@@ -87,6 +90,7 @@ module MailSlurpClient
87
90
  # Create new random inbox
88
91
  # Returns an Inbox with an `id` and an `emailAddress`
89
92
  # @param [Hash] opts the optional parameters
93
+ # @option opts [Boolean] :allow_team_access allowTeamAccess
90
94
  # @option opts [DateTime] :expires_at expiresAt
91
95
  # @option opts [Integer] :expires_in expiresIn
92
96
  # @option opts [Boolean] :use_domain_pool useDomainPool
@@ -99,6 +103,7 @@ module MailSlurpClient
99
103
  # Create new random inbox
100
104
  # Returns an Inbox with an `id` and an `emailAddress`
101
105
  # @param [Hash] opts the optional parameters
106
+ # @option opts [Boolean] :allow_team_access allowTeamAccess
102
107
  # @option opts [DateTime] :expires_at expiresAt
103
108
  # @option opts [Integer] :expires_in expiresIn
104
109
  # @option opts [Boolean] :use_domain_pool useDomainPool
@@ -112,6 +117,7 @@ module MailSlurpClient
112
117
 
113
118
  # query parameters
114
119
  query_params = opts[:query_params] || {}
120
+ query_params[:'allowTeamAccess'] = opts[:'allow_team_access'] if !opts[:'allow_team_access'].nil?
115
121
  query_params[:'expiresAt'] = opts[:'expires_at'] if !opts[:'expires_at'].nil?
116
122
  query_params[:'expiresIn'] = opts[:'expires_in'] if !opts[:'expires_in'].nil?
117
123
  query_params[:'useDomainPool'] = opts[:'use_domain_pool'] if !opts[:'use_domain_pool'].nil?
@@ -996,6 +996,81 @@ module MailSlurpClient
996
996
  return data, status_code, headers
997
997
  end
998
998
 
999
+ # Get all organization emails
1000
+ # By default returns all emails across all team 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
1001
+ # @param [Hash] opts the optional parameters
1002
+ # @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.
1003
+ # @option opts [Integer] :page Optional page index in email list pagination (default to 0)
1004
+ # @option opts [Integer] :size Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results (default to 20)
1005
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
1006
+ # @option opts [Boolean] :unread_only Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly (default to false)
1007
+ # @return [PageEmailProjection]
1008
+ def get_organization_emails_paginated(opts = {})
1009
+ data, _status_code, _headers = get_organization_emails_paginated_with_http_info(opts)
1010
+ data
1011
+ end
1012
+
1013
+ # Get all organization emails
1014
+ # By default returns all emails across all team 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
1015
+ # @param [Hash] opts the optional parameters
1016
+ # @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.
1017
+ # @option opts [Integer] :page Optional page index in email list pagination
1018
+ # @option opts [Integer] :size Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results
1019
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
1020
+ # @option opts [Boolean] :unread_only Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly
1021
+ # @return [Array<(PageEmailProjection, Integer, Hash)>] PageEmailProjection data, response status code and response headers
1022
+ def get_organization_emails_paginated_with_http_info(opts = {})
1023
+ if @api_client.config.debugging
1024
+ @api_client.config.logger.debug 'Calling API: EmailControllerApi.get_organization_emails_paginated ...'
1025
+ end
1026
+ allowable_values = ["ASC", "DESC"]
1027
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
1028
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
1029
+ end
1030
+ # resource path
1031
+ local_var_path = '/emails/organization'
1032
+
1033
+ # query parameters
1034
+ query_params = opts[:query_params] || {}
1035
+ query_params[:'inboxId'] = @api_client.build_collection_param(opts[:'inbox_id'], :multi) if !opts[:'inbox_id'].nil?
1036
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1037
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
1038
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
1039
+ query_params[:'unreadOnly'] = opts[:'unread_only'] if !opts[:'unread_only'].nil?
1040
+
1041
+ # header parameters
1042
+ header_params = opts[:header_params] || {}
1043
+ # HTTP header 'Accept' (if needed)
1044
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1045
+
1046
+ # form parameters
1047
+ form_params = opts[:form_params] || {}
1048
+
1049
+ # http body (model)
1050
+ post_body = opts[:body]
1051
+
1052
+ # return_type
1053
+ return_type = opts[:return_type] || 'PageEmailProjection'
1054
+
1055
+ # auth_names
1056
+ auth_names = opts[:auth_names] || ['API_KEY']
1057
+
1058
+ new_options = opts.merge(
1059
+ :header_params => header_params,
1060
+ :query_params => query_params,
1061
+ :form_params => form_params,
1062
+ :body => post_body,
1063
+ :auth_names => auth_names,
1064
+ :return_type => return_type
1065
+ )
1066
+
1067
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1068
+ if @api_client.config.debugging
1069
+ @api_client.config.logger.debug "API called: EmailControllerApi#get_organization_emails_paginated\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1070
+ end
1071
+ return data, status_code, headers
1072
+ end
1073
+
999
1074
  # Get raw email string
1000
1075
  # Returns a raw, unparsed, and unprocessed email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawEmailJson endpoint
1001
1076
  # @param email_id [String] ID of email
@@ -22,6 +22,7 @@ module MailSlurpClient
22
22
  # Create an Inbox (email address)
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
+ # @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.
25
26
  # @option opts [String] :description Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with
26
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
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.
@@ -39,6 +40,7 @@ module MailSlurpClient
39
40
  # Create an Inbox (email address)
40
41
  # 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.
41
42
  # @param [Hash] opts the optional parameters
43
+ # @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.
42
44
  # @option opts [String] :description Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with
43
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.
44
46
  # @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.
@@ -57,6 +59,7 @@ module MailSlurpClient
57
59
 
58
60
  # query parameters
59
61
  query_params = opts[:query_params] || {}
62
+ query_params[:'allowTeamAccess'] = opts[:'allow_team_access'] if !opts[:'allow_team_access'].nil?
60
63
  query_params[:'description'] = opts[:'description'] if !opts[:'description'].nil?
61
64
  query_params[:'emailAddress'] = opts[:'email_address'] if !opts[:'email_address'].nil?
62
65
  query_params[:'expiresAt'] = opts[:'expires_at'] if !opts[:'expires_at'].nil?
@@ -278,14 +281,15 @@ module MailSlurpClient
278
281
  end
279
282
 
280
283
  # List All Inboxes Paginated
281
- # List inboxes in paginated form. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return(, and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative `getInboxes` method returns a full list of inboxes but is limited to 100 results.
284
+ # List inboxes in paginated form. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative `getInboxes` method returns a full list of inboxes but is limited to 100 results. Results do not include team access inboxes by default. Use organization method to list team inboxes or set `teamAccess` to true.
282
285
  # @param [Hash] opts the optional parameters
283
286
  # @option opts [Boolean] :favourite Optionally filter results for favourites only (default to false)
284
287
  # @option opts [Integer] :page Optional page index in inbox list pagination (default to 0)
285
288
  # @option opts [String] :search Optionally filter by search words partial matching ID, tags, name, and email address
286
289
  # @option opts [Integer] :size Optional page size in inbox list pagination (default to 20)
287
290
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
288
- # @option opts [String] :tag Optionally filter by tags
291
+ # @option opts [String] :tag Optionally filter by tags. Will return inboxes that include given tags
292
+ # @option opts [Boolean] :team_access Optionally filter by team access. Defaults to false so organization inboxes are not included (default to false)
289
293
  # @return [PageInboxProjection]
290
294
  def get_all_inboxes(opts = {})
291
295
  data, _status_code, _headers = get_all_inboxes_with_http_info(opts)
@@ -293,14 +297,15 @@ module MailSlurpClient
293
297
  end
294
298
 
295
299
  # List All Inboxes Paginated
296
- # List inboxes in paginated form. The results are available on the &#x60;content&#x60; property of the returned object. This method allows for page index (zero based), page size (how many results to return(, and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative &#x60;getInboxes&#x60; method returns a full list of inboxes but is limited to 100 results.
300
+ # List inboxes in paginated form. The results are available on the &#x60;content&#x60; property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative &#x60;getInboxes&#x60; method returns a full list of inboxes but is limited to 100 results. Results do not include team access inboxes by default. Use organization method to list team inboxes or set &#x60;teamAccess&#x60; to true.
297
301
  # @param [Hash] opts the optional parameters
298
302
  # @option opts [Boolean] :favourite Optionally filter results for favourites only
299
303
  # @option opts [Integer] :page Optional page index in inbox list pagination
300
304
  # @option opts [String] :search Optionally filter by search words partial matching ID, tags, name, and email address
301
305
  # @option opts [Integer] :size Optional page size in inbox list pagination
302
306
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
303
- # @option opts [String] :tag Optionally filter by tags
307
+ # @option opts [String] :tag Optionally filter by tags. Will return inboxes that include given tags
308
+ # @option opts [Boolean] :team_access Optionally filter by team access. Defaults to false so organization inboxes are not included
304
309
  # @return [Array<(PageInboxProjection, Integer, Hash)>] PageInboxProjection data, response status code and response headers
305
310
  def get_all_inboxes_with_http_info(opts = {})
306
311
  if @api_client.config.debugging
@@ -321,6 +326,7 @@ module MailSlurpClient
321
326
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
322
327
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
323
328
  query_params[:'tag'] = opts[:'tag'] if !opts[:'tag'].nil?
329
+ query_params[:'teamAccess'] = opts[:'team_access'] if !opts[:'team_access'].nil?
324
330
 
325
331
  # header parameters
326
332
  header_params = opts[:header_params] || {}
@@ -773,6 +779,75 @@ module MailSlurpClient
773
779
  return data, status_code, headers
774
780
  end
775
781
 
782
+ # List Organization Inboxes Paginated
783
+ # List organization inboxes in paginated form. These are inboxes created with `allowTeamAccess` flag enabled. Organization inboxes are `readOnly` for non-admin users. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time).
784
+ # @param [Hash] opts the optional parameters
785
+ # @option opts [Integer] :page Optional page index in inbox list pagination (default to 0)
786
+ # @option opts [Integer] :size Optional page size in inbox list pagination (default to 20)
787
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
788
+ # @return [PageOrganizationInboxProjection]
789
+ def get_organization_inboxes(opts = {})
790
+ data, _status_code, _headers = get_organization_inboxes_with_http_info(opts)
791
+ data
792
+ end
793
+
794
+ # List Organization Inboxes Paginated
795
+ # List organization inboxes in paginated form. These are inboxes created with &#x60;allowTeamAccess&#x60; flag enabled. Organization inboxes are &#x60;readOnly&#x60; for non-admin users. The results are available on the &#x60;content&#x60; property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time).
796
+ # @param [Hash] opts the optional parameters
797
+ # @option opts [Integer] :page Optional page index in inbox list pagination
798
+ # @option opts [Integer] :size Optional page size in inbox list pagination
799
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
800
+ # @return [Array<(PageOrganizationInboxProjection, Integer, Hash)>] PageOrganizationInboxProjection data, response status code and response headers
801
+ def get_organization_inboxes_with_http_info(opts = {})
802
+ if @api_client.config.debugging
803
+ @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_organization_inboxes ...'
804
+ end
805
+ allowable_values = ["ASC", "DESC"]
806
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
807
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
808
+ end
809
+ # resource path
810
+ local_var_path = '/inboxes/organization'
811
+
812
+ # query parameters
813
+ query_params = opts[:query_params] || {}
814
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
815
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
816
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
817
+
818
+ # header parameters
819
+ header_params = opts[:header_params] || {}
820
+ # HTTP header 'Accept' (if needed)
821
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
822
+
823
+ # form parameters
824
+ form_params = opts[:form_params] || {}
825
+
826
+ # http body (model)
827
+ post_body = opts[:body]
828
+
829
+ # return_type
830
+ return_type = opts[:return_type] || 'PageOrganizationInboxProjection'
831
+
832
+ # auth_names
833
+ auth_names = opts[:auth_names] || ['API_KEY']
834
+
835
+ new_options = opts.merge(
836
+ :header_params => header_params,
837
+ :query_params => query_params,
838
+ :form_params => form_params,
839
+ :body => post_body,
840
+ :auth_names => auth_names,
841
+ :return_type => return_type
842
+ )
843
+
844
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
845
+ if @api_client.config.debugging
846
+ @api_client.config.logger.debug "API called: InboxControllerApi#get_organization_inboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
847
+ end
848
+ return data, status_code, headers
849
+ end
850
+
776
851
  # Send Email
777
852
  # Send an email from an inbox's email address. The request body should contain the `SendEmailOptions` that include recipients, attachments, body etc. See `SendEmailOptions` for all available properties. Note the `inboxId` refers to the inbox's id not the inbox's email address. See https://www.mailslurp.com/guides/ for more information on how to send emails. This method does not return a sent email entity due to legacy reasons. To send and get a sent email as returned response use the sister method `sendEmailAndConfirm`.
778
853
  # @param inbox_id [String] ID of the inbox you want to send the email from
@@ -148,5 +148,75 @@ module MailSlurpClient
148
148
  end
149
149
  return data, status_code, headers
150
150
  end
151
+
152
+ # Get all sent organization emails in paginated form
153
+ # @param [Hash] opts the optional parameters
154
+ # @option opts [String] :inbox_id Optional inboxId to filter sender of sent emails by
155
+ # @option opts [Integer] :page Optional page index in inbox sent email list pagination (default to 0)
156
+ # @option opts [Integer] :size Optional page size in inbox sent email list pagination (default to 20)
157
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
158
+ # @return [PageSentEmailProjection]
159
+ def get_sent_organization_emails(opts = {})
160
+ data, _status_code, _headers = get_sent_organization_emails_with_http_info(opts)
161
+ data
162
+ end
163
+
164
+ # Get all sent organization emails in paginated form
165
+ # @param [Hash] opts the optional parameters
166
+ # @option opts [String] :inbox_id Optional inboxId to filter sender of sent emails by
167
+ # @option opts [Integer] :page Optional page index in inbox sent email list pagination
168
+ # @option opts [Integer] :size Optional page size in inbox sent email list pagination
169
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
170
+ # @return [Array<(PageSentEmailProjection, Integer, Hash)>] PageSentEmailProjection data, response status code and response headers
171
+ def get_sent_organization_emails_with_http_info(opts = {})
172
+ if @api_client.config.debugging
173
+ @api_client.config.logger.debug 'Calling API: SentEmailsControllerApi.get_sent_organization_emails ...'
174
+ end
175
+ allowable_values = ["ASC", "DESC"]
176
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
177
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
178
+ end
179
+ # resource path
180
+ local_var_path = '/sent/organization'
181
+
182
+ # query parameters
183
+ query_params = opts[:query_params] || {}
184
+ query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
185
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
186
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
187
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
188
+
189
+ # header parameters
190
+ header_params = opts[:header_params] || {}
191
+ # HTTP header 'Accept' (if needed)
192
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
193
+
194
+ # form parameters
195
+ form_params = opts[:form_params] || {}
196
+
197
+ # http body (model)
198
+ post_body = opts[:body]
199
+
200
+ # return_type
201
+ return_type = opts[:return_type] || 'PageSentEmailProjection'
202
+
203
+ # auth_names
204
+ auth_names = opts[:auth_names] || ['API_KEY']
205
+
206
+ new_options = opts.merge(
207
+ :header_params => header_params,
208
+ :query_params => query_params,
209
+ :form_params => form_params,
210
+ :body => post_body,
211
+ :auth_names => auth_names,
212
+ :return_type => return_type
213
+ )
214
+
215
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
216
+ if @api_client.config.debugging
217
+ @api_client.config.logger.debug "API called: SentEmailsControllerApi#get_sent_organization_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
218
+ end
219
+ return data, status_code, headers
220
+ end
151
221
  end
152
222
  end
@@ -15,6 +15,9 @@ require 'date'
15
15
  module MailSlurpClient
16
16
  # Options for creating an inbox. An inbox has a real email address that can send and receive emails. Inboxes can be permanent or expire at a given time. They can use a custom email address (by verifying your own domain) or a randomly assigned email ending in either `mailslurp.com` or if `useDomainPool` is enabled then ending in a similar domains such as `mailslurp.xyz` (selected at random).
17
17
  class CreateInboxDto
18
+ # Grant team access to this inbox and the emails that belong to it for team members of your organization.
19
+ attr_accessor :allow_team_access
20
+
18
21
  # Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with
19
22
  attr_accessor :description
20
23
 
@@ -42,6 +45,7 @@ module MailSlurpClient
42
45
  # Attribute mapping from ruby-style variable name to JSON key.
43
46
  def self.attribute_map
44
47
  {
48
+ :'allow_team_access' => :'allowTeamAccess',
45
49
  :'description' => :'description',
46
50
  :'email_address' => :'emailAddress',
47
51
  :'expires_at' => :'expiresAt',
@@ -56,6 +60,7 @@ module MailSlurpClient
56
60
  # Attribute type mapping.
57
61
  def self.openapi_types
58
62
  {
63
+ :'allow_team_access' => :'Boolean',
59
64
  :'description' => :'String',
60
65
  :'email_address' => :'String',
61
66
  :'expires_at' => :'DateTime',
@@ -88,6 +93,10 @@ module MailSlurpClient
88
93
  h[k.to_sym] = v
89
94
  }
90
95
 
96
+ if attributes.key?(:'allow_team_access')
97
+ self.allow_team_access = attributes[:'allow_team_access']
98
+ end
99
+
91
100
  if attributes.key?(:'description')
92
101
  self.description = attributes[:'description']
93
102
  end
@@ -141,6 +150,7 @@ module MailSlurpClient
141
150
  def ==(o)
142
151
  return true if self.equal?(o)
143
152
  self.class == o.class &&
153
+ allow_team_access == o.allow_team_access &&
144
154
  description == o.description &&
145
155
  email_address == o.email_address &&
146
156
  expires_at == o.expires_at &&
@@ -160,7 +170,7 @@ module MailSlurpClient
160
170
  # Calculates hash code according to all attributes.
161
171
  # @return [Integer] Hash code
162
172
  def hash
163
- [description, email_address, expires_at, expires_in, favourite, name, tags, use_domain_pool].hash
173
+ [allow_team_access, description, email_address, expires_at, expires_in, favourite, name, tags, use_domain_pool].hash
164
174
  end
165
175
 
166
176
  # Builds the object from hash
@@ -52,7 +52,7 @@ module MailSlurpClient
52
52
  # Was HTML sent in the email body
53
53
  attr_accessor :is_html
54
54
 
55
- # Has the email been viewed ever
55
+ # Has the email been viewed ever. This means viewed in the dashboard or requested via the full email entity endpoints
56
56
  attr_accessor :read
57
57
 
58
58
  # The replyTo field on the received email
@@ -61,6 +61,9 @@ module MailSlurpClient
61
61
  # The subject line of the email message
62
62
  attr_accessor :subject
63
63
 
64
+ # Can the email be accessed by organization team members
65
+ attr_accessor :team_access
66
+
64
67
  # List of `To` recipients email was addressed to
65
68
  attr_accessor :to
66
69
 
@@ -89,6 +92,7 @@ module MailSlurpClient
89
92
  :'read' => :'read',
90
93
  :'reply_to' => :'replyTo',
91
94
  :'subject' => :'subject',
95
+ :'team_access' => :'teamAccess',
92
96
  :'to' => :'to',
93
97
  :'updated_at' => :'updatedAt',
94
98
  :'user_id' => :'userId'
@@ -114,6 +118,7 @@ module MailSlurpClient
114
118
  :'read' => :'Boolean',
115
119
  :'reply_to' => :'String',
116
120
  :'subject' => :'String',
121
+ :'team_access' => :'Boolean',
117
122
  :'to' => :'Array<String>',
118
123
  :'updated_at' => :'DateTime',
119
124
  :'user_id' => :'String'
@@ -213,6 +218,10 @@ module MailSlurpClient
213
218
  self.subject = attributes[:'subject']
214
219
  end
215
220
 
221
+ if attributes.key?(:'team_access')
222
+ self.team_access = attributes[:'team_access']
223
+ end
224
+
216
225
  if attributes.key?(:'to')
217
226
  if (value = attributes[:'to']).is_a?(Array)
218
227
  self.to = value
@@ -262,6 +271,7 @@ module MailSlurpClient
262
271
  read == o.read &&
263
272
  reply_to == o.reply_to &&
264
273
  subject == o.subject &&
274
+ team_access == o.team_access &&
265
275
  to == o.to &&
266
276
  updated_at == o.updated_at &&
267
277
  user_id == o.user_id
@@ -276,7 +286,7 @@ module MailSlurpClient
276
286
  # Calculates hash code according to all attributes.
277
287
  # @return [Integer] Hash code
278
288
  def hash
279
- [analysis, attachments, bcc, body, body_md5_hash, cc, charset, created_at, from, headers, id, inbox_id, is_html, read, reply_to, subject, to, updated_at, user_id].hash
289
+ [analysis, attachments, bcc, body, body_md5_hash, cc, charset, created_at, from, headers, id, inbox_id, is_html, read, reply_to, subject, team_access, to, updated_at, user_id].hash
280
290
  end
281
291
 
282
292
  # Builds the object from hash