mailslurp_client 5.0.0 → 7.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (214) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -0
  3. data/README.md +127 -40
  4. data/docs/AttachmentControllerApi.md +124 -0
  5. data/docs/AttachmentMetaData.md +23 -0
  6. data/docs/BasicAuthOptions.md +10 -0
  7. data/docs/BulkActionsControllerApi.md +165 -0
  8. data/docs/BulkSendEmailOptions.md +11 -1
  9. data/docs/CommonActionsControllerApi.md +167 -0
  10. data/docs/ContactControllerApi.md +274 -0
  11. data/docs/ContactDto.md +31 -0
  12. data/docs/ContactProjection.md +27 -0
  13. data/docs/CreateContactOptions.md +31 -0
  14. data/docs/CreateDomainOptions.md +17 -0
  15. data/docs/CreateGroupOptions.md +19 -0
  16. data/docs/CreateTemplateOptions.md +19 -0
  17. data/docs/CreateWebhookOptions.md +13 -2
  18. data/docs/DomainControllerApi.md +223 -0
  19. data/docs/DomainDto.md +29 -0
  20. data/docs/DomainPreview.md +21 -0
  21. data/docs/Email.md +40 -15
  22. data/docs/EmailAnalysis.md +18 -5
  23. data/docs/EmailControllerApi.md +740 -0
  24. data/docs/EmailPreview.md +24 -6
  25. data/docs/EmailProjection.md +33 -0
  26. data/docs/ForwardEmailOptions.md +12 -0
  27. data/docs/GroupContactsDto.md +19 -0
  28. data/docs/GroupControllerApi.md +437 -0
  29. data/docs/GroupDto.md +23 -0
  30. data/docs/GroupProjection.md +23 -0
  31. data/docs/HTMLValidationResult.md +21 -0
  32. data/docs/Inbox.md +26 -4
  33. data/docs/InboxControllerApi.md +652 -0
  34. data/docs/InboxProjection.md +29 -0
  35. data/docs/JsonNode.md +59 -0
  36. data/docs/MatchOption.md +13 -2
  37. data/docs/MatchOptions.md +9 -0
  38. data/docs/PageContactProjection.md +37 -0
  39. data/docs/PageEmailPreview.md +37 -0
  40. data/docs/PageEmailProjection.md +37 -0
  41. data/docs/PageGroupProjection.md +37 -0
  42. data/docs/PageInboxProjection.md +37 -0
  43. data/docs/PageTemplateProjection.md +37 -0
  44. data/docs/PageWebhookProjection.md +37 -0
  45. data/docs/Pageable.md +27 -0
  46. data/docs/RawEmailJson.md +17 -0
  47. data/docs/SendEmailOptions.md +33 -6
  48. data/docs/SetInboxFavouritedOptions.md +17 -0
  49. data/docs/Sort.md +21 -0
  50. data/docs/TemplateControllerApi.md +274 -0
  51. data/docs/TemplateDto.md +25 -0
  52. data/docs/TemplateProjection.md +25 -0
  53. data/docs/TemplateVariable.md +19 -0
  54. data/docs/UnreadCount.md +17 -0
  55. data/docs/UpdateGroupContacts.md +17 -0
  56. data/docs/UpdateInboxOptions.md +25 -0
  57. data/docs/UploadAttachmentOptions.md +12 -1
  58. data/docs/ValidationDto.md +19 -0
  59. data/docs/ValidationMessage.md +19 -0
  60. data/docs/WaitForConditions.md +29 -0
  61. data/docs/WaitForControllerApi.md +317 -0
  62. data/docs/WebhookControllerApi.md +339 -0
  63. data/docs/WebhookDto.md +33 -0
  64. data/docs/WebhookProjection.md +27 -0
  65. data/docs/WebhookTestRequest.md +23 -0
  66. data/docs/WebhookTestResponse.md +19 -0
  67. data/docs/WebhookTestResult.md +21 -0
  68. data/git_push.sh +10 -7
  69. data/lib/mailslurp_client.rb +56 -7
  70. data/lib/mailslurp_client/api/attachment_controller_api.rb +157 -0
  71. data/lib/mailslurp_client/api/bulk_actions_controller_api.rb +203 -0
  72. data/lib/mailslurp_client/api/common_actions_controller_api.rb +201 -0
  73. data/lib/mailslurp_client/api/contact_controller_api.rb +323 -0
  74. data/lib/mailslurp_client/api/domain_controller_api.rb +264 -0
  75. data/lib/mailslurp_client/api/email_controller_api.rb +852 -0
  76. data/lib/mailslurp_client/api/group_controller_api.rb +519 -0
  77. data/lib/mailslurp_client/api/inbox_controller_api.rb +763 -0
  78. data/lib/mailslurp_client/api/template_controller_api.rb +323 -0
  79. data/lib/mailslurp_client/api/wait_for_controller_api.rb +359 -0
  80. data/lib/mailslurp_client/api/webhook_controller_api.rb +405 -0
  81. data/lib/mailslurp_client/api_client.rb +36 -39
  82. data/lib/mailslurp_client/api_error.rb +23 -4
  83. data/lib/mailslurp_client/configuration.rb +8 -11
  84. data/lib/mailslurp_client/models/attachment_meta_data.rb +253 -0
  85. data/lib/mailslurp_client/models/basic_auth_options.rb +39 -15
  86. data/lib/mailslurp_client/models/bulk_send_email_options.rb +42 -19
  87. data/lib/mailslurp_client/models/contact_dto.rb +288 -0
  88. data/lib/mailslurp_client/models/contact_projection.rb +261 -0
  89. data/lib/mailslurp_client/models/create_contact_options.rb +277 -0
  90. data/lib/mailslurp_client/models/create_domain_options.rb +208 -0
  91. data/lib/mailslurp_client/models/create_group_options.rb +220 -0
  92. data/lib/mailslurp_client/models/create_template_options.rb +225 -0
  93. data/lib/mailslurp_client/models/create_webhook_options.rb +54 -29
  94. data/lib/mailslurp_client/models/domain_dto.rb +296 -0
  95. data/lib/mailslurp_client/models/domain_preview.rb +240 -0
  96. data/lib/mailslurp_client/models/email.rb +86 -78
  97. data/lib/mailslurp_client/models/email_analysis.rb +46 -48
  98. data/lib/mailslurp_client/models/email_preview.rb +77 -41
  99. data/lib/mailslurp_client/models/email_projection.rb +306 -0
  100. data/lib/mailslurp_client/models/forward_email_options.rb +40 -17
  101. data/lib/mailslurp_client/models/group_contacts_dto.rb +227 -0
  102. data/lib/mailslurp_client/models/{webhook.rb → group_dto.rb} +60 -54
  103. data/lib/mailslurp_client/models/group_projection.rb +248 -0
  104. data/lib/mailslurp_client/models/html_validation_result.rb +243 -0
  105. data/lib/mailslurp_client/models/inbox.rb +104 -26
  106. data/lib/mailslurp_client/models/inbox_projection.rb +272 -0
  107. data/lib/mailslurp_client/models/json_node.rb +429 -0
  108. data/lib/mailslurp_client/models/match_option.rb +48 -24
  109. data/lib/mailslurp_client/models/match_options.rb +37 -14
  110. data/lib/mailslurp_client/models/page_contact_projection.rb +298 -0
  111. data/lib/mailslurp_client/models/page_email_preview.rb +298 -0
  112. data/lib/mailslurp_client/models/page_email_projection.rb +298 -0
  113. data/lib/mailslurp_client/models/page_group_projection.rb +298 -0
  114. data/lib/mailslurp_client/models/page_inbox_projection.rb +298 -0
  115. data/lib/mailslurp_client/models/page_template_projection.rb +298 -0
  116. data/lib/mailslurp_client/models/page_webhook_projection.rb +298 -0
  117. data/lib/mailslurp_client/models/pageable.rb +251 -0
  118. data/lib/mailslurp_client/models/raw_email_json.rb +211 -0
  119. data/lib/mailslurp_client/models/send_email_options.rb +141 -46
  120. data/lib/mailslurp_client/models/set_inbox_favourited_options.rb +208 -0
  121. data/lib/mailslurp_client/models/sort.rb +224 -0
  122. data/lib/mailslurp_client/models/template_dto.rb +269 -0
  123. data/lib/mailslurp_client/models/template_projection.rb +269 -0
  124. data/lib/mailslurp_client/models/template_variable.rb +259 -0
  125. data/lib/mailslurp_client/models/unread_count.rb +211 -0
  126. data/lib/mailslurp_client/models/update_group_contacts.rb +213 -0
  127. data/lib/mailslurp_client/models/update_inbox_options.rb +250 -0
  128. data/lib/mailslurp_client/models/upload_attachment_options.rb +43 -20
  129. data/lib/mailslurp_client/models/validation_dto.rb +225 -0
  130. data/lib/mailslurp_client/models/validation_message.rb +220 -0
  131. data/lib/mailslurp_client/models/wait_for_conditions.rb +315 -0
  132. data/lib/mailslurp_client/models/webhook_dto.rb +326 -0
  133. data/lib/mailslurp_client/models/webhook_projection.rb +277 -0
  134. data/lib/mailslurp_client/models/webhook_test_request.rb +284 -0
  135. data/lib/mailslurp_client/models/webhook_test_response.rb +215 -0
  136. data/lib/mailslurp_client/models/webhook_test_result.rb +235 -0
  137. data/lib/mailslurp_client/version.rb +5 -5
  138. data/mailslurp_client.gemspec +4 -10
  139. data/spec/api/attachment_controller_api_spec.rb +61 -0
  140. data/spec/api/bulk_actions_controller_api_spec.rb +68 -0
  141. data/spec/api/common_actions_controller_api_spec.rb +129 -0
  142. data/spec/api/contact_controller_api_spec.rb +91 -0
  143. data/spec/api/domain_controller_api_spec.rb +82 -0
  144. data/spec/api/email_controller_api_spec.rb +162 -0
  145. data/spec/api/group_controller_api_spec.rb +126 -0
  146. data/spec/api/inbox_controller_api_spec.rb +172 -0
  147. data/spec/api/template_controller_api_spec.rb +91 -0
  148. data/spec/api/wait_for_controller_api_spec.rb +107 -0
  149. data/spec/api/webhook_controller_api_spec.rb +107 -0
  150. data/spec/api_client_spec.rb +5 -5
  151. data/spec/configuration_spec.rb +4 -4
  152. data/spec/models/attachment_meta_data_spec.rb +59 -0
  153. data/spec/models/basic_auth_options_spec.rb +4 -4
  154. data/spec/models/bulk_send_email_options_spec.rb +4 -4
  155. data/spec/models/contact_dto_spec.rb +83 -0
  156. data/spec/models/contact_projection_spec.rb +71 -0
  157. data/spec/models/create_contact_options_spec.rb +83 -0
  158. data/spec/models/create_domain_options_spec.rb +41 -0
  159. data/spec/models/create_group_options_spec.rb +47 -0
  160. data/spec/models/create_template_options_spec.rb +47 -0
  161. data/spec/models/create_webhook_options_spec.rb +6 -6
  162. data/spec/models/domain_dto_spec.rb +77 -0
  163. data/spec/models/domain_preview_spec.rb +53 -0
  164. data/spec/models/email_analysis_spec.rb +4 -4
  165. data/spec/models/email_preview_spec.rb +41 -5
  166. data/spec/models/email_projection_spec.rb +89 -0
  167. data/spec/models/email_spec.rb +17 -5
  168. data/spec/models/forward_email_options_spec.rb +4 -4
  169. data/spec/models/group_contacts_dto_spec.rb +47 -0
  170. data/spec/models/group_dto_spec.rb +59 -0
  171. data/spec/models/group_projection_spec.rb +59 -0
  172. data/spec/models/html_validation_result_spec.rb +53 -0
  173. data/spec/models/inbox_projection_spec.rb +77 -0
  174. data/spec/models/inbox_spec.rb +35 -5
  175. data/spec/models/json_node_spec.rb +171 -0
  176. data/spec/models/match_option_spec.rb +4 -4
  177. data/spec/models/match_options_spec.rb +4 -4
  178. data/spec/models/page_contact_projection_spec.rb +101 -0
  179. data/spec/models/page_email_preview_spec.rb +101 -0
  180. data/spec/models/page_email_projection_spec.rb +101 -0
  181. data/spec/models/page_group_projection_spec.rb +101 -0
  182. data/spec/models/page_inbox_projection_spec.rb +101 -0
  183. data/spec/models/page_template_projection_spec.rb +101 -0
  184. data/spec/models/page_webhook_projection_spec.rb +101 -0
  185. data/spec/models/pageable_spec.rb +71 -0
  186. data/spec/models/raw_email_json_spec.rb +41 -0
  187. data/spec/models/send_email_options_spec.rb +45 -5
  188. data/spec/models/set_inbox_favourited_options_spec.rb +41 -0
  189. data/spec/models/sort_spec.rb +53 -0
  190. data/spec/models/template_dto_spec.rb +65 -0
  191. data/spec/models/template_projection_spec.rb +65 -0
  192. data/spec/models/template_variable_spec.rb +51 -0
  193. data/spec/models/unread_count_spec.rb +41 -0
  194. data/spec/models/update_group_contacts_spec.rb +41 -0
  195. data/spec/models/{webhook_spec.rb → update_inbox_options_spec.rb} +14 -20
  196. data/spec/models/upload_attachment_options_spec.rb +4 -4
  197. data/spec/models/validation_dto_spec.rb +47 -0
  198. data/spec/models/validation_message_spec.rb +47 -0
  199. data/spec/models/wait_for_conditions_spec.rb +85 -0
  200. data/spec/models/webhook_dto_spec.rb +93 -0
  201. data/spec/models/webhook_projection_spec.rb +71 -0
  202. data/spec/models/webhook_test_request_spec.rb +63 -0
  203. data/spec/models/webhook_test_response_spec.rb +47 -0
  204. data/spec/models/webhook_test_result_spec.rb +53 -0
  205. data/spec/spec_helper.rb +4 -4
  206. metadata +223 -149
  207. data/Gemfile.lock +0 -79
  208. data/docs/CommonOperationsApi.md +0 -499
  209. data/docs/ExtraOperationsApi.md +0 -1021
  210. data/docs/Webhook.md +0 -13
  211. data/lib/mailslurp_client/api/common_operations_api.rb +0 -502
  212. data/lib/mailslurp_client/api/extra_operations_api.rb +0 -1054
  213. data/spec/api/common_operations_api_spec.rb +0 -95
  214. data/spec/api/extra_operations_api_spec.rb +0 -231
@@ -0,0 +1,763 @@
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: 67c9a1eda264be4cfe0bb2c76151f0aadf0862bc
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.3
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module MailSlurpClient
16
+ class InboxControllerApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create an Inbox (email address)
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
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [String] :description Optional description for an inbox.
26
+ # @option opts [String] :email_address Optional email address including domain you wish inbox to use (eg: test123@mydomain.com). Only supports domains that you have registered and verified with MailSlurp using dashboard or `createDomain` method.
27
+ # @option opts [DateTime] :expires_at Optional expires at timestamp. If your plan supports this feature you can specify when an inbox should expire. If left empty inbox will exist permanently or expire when your plan dictates
28
+ # @option opts [Boolean] :favourite Is inbox favourited.
29
+ # @option opts [String] :name Optional name for an inbox.
30
+ # @option opts [Array<String>] :tags Optional tags for an inbox. Can be used for searching and filtering inboxes.
31
+ # @return [Inbox]
32
+ def create_inbox(opts = {})
33
+ data, _status_code, _headers = create_inbox_with_http_info(opts)
34
+ data
35
+ end
36
+
37
+ # Create an Inbox (email address)
38
+ # 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.
39
+ # @param [Hash] opts the optional parameters
40
+ # @option opts [String] :description Optional description for an inbox.
41
+ # @option opts [String] :email_address Optional email address including domain you wish inbox to use (eg: test123@mydomain.com). Only supports domains that you have registered and verified with MailSlurp using dashboard or &#x60;createDomain&#x60; method.
42
+ # @option opts [DateTime] :expires_at Optional expires at timestamp. If your plan supports this feature you can specify when an inbox should expire. If left empty inbox will exist permanently or expire when your plan dictates
43
+ # @option opts [Boolean] :favourite Is inbox favourited.
44
+ # @option opts [String] :name Optional name for an inbox.
45
+ # @option opts [Array<String>] :tags Optional tags for an inbox. Can be used for searching and filtering inboxes.
46
+ # @return [Array<(Inbox, Integer, Hash)>] Inbox data, response status code and response headers
47
+ def create_inbox_with_http_info(opts = {})
48
+ if @api_client.config.debugging
49
+ @api_client.config.logger.debug 'Calling API: InboxControllerApi.create_inbox ...'
50
+ end
51
+ # resource path
52
+ local_var_path = '/inboxes'
53
+
54
+ # query parameters
55
+ query_params = opts[:query_params] || {}
56
+ query_params[:'description'] = opts[:'description'] if !opts[:'description'].nil?
57
+ query_params[:'emailAddress'] = opts[:'email_address'] if !opts[:'email_address'].nil?
58
+ query_params[:'expiresAt'] = opts[:'expires_at'] if !opts[:'expires_at'].nil?
59
+ query_params[:'favourite'] = opts[:'favourite'] if !opts[:'favourite'].nil?
60
+ query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
61
+ query_params[:'tags'] = @api_client.build_collection_param(opts[:'tags'], :multi) if !opts[:'tags'].nil?
62
+
63
+ # header parameters
64
+ header_params = opts[:header_params] || {}
65
+ # HTTP header 'Accept' (if needed)
66
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
67
+
68
+ # form parameters
69
+ form_params = opts[:form_params] || {}
70
+
71
+ # http body (model)
72
+ post_body = opts[:body]
73
+
74
+ # return_type
75
+ return_type = opts[:return_type] || 'Inbox'
76
+
77
+ # auth_names
78
+ auth_names = opts[:auth_names] || ['API_KEY']
79
+
80
+ new_options = opts.merge(
81
+ :header_params => header_params,
82
+ :query_params => query_params,
83
+ :form_params => form_params,
84
+ :body => post_body,
85
+ :auth_names => auth_names,
86
+ :return_type => return_type
87
+ )
88
+
89
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
90
+ if @api_client.config.debugging
91
+ @api_client.config.logger.debug "API called: InboxControllerApi#create_inbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
92
+ end
93
+ return data, status_code, headers
94
+ end
95
+
96
+ # Delete all inboxes
97
+ # Permanently delete all inboxes and associated email addresses. This will also delete all emails within the inboxes. Be careful as inboxes cannot be recovered once deleted. Note: deleting inboxes will not impact your usage limits. Monthly inbox creation limits are based on how many inboxes were created in the last 30 days, not how many inboxes you currently have.
98
+ # @param [Hash] opts the optional parameters
99
+ # @return [nil]
100
+ def delete_all_inboxes(opts = {})
101
+ delete_all_inboxes_with_http_info(opts)
102
+ nil
103
+ end
104
+
105
+ # Delete all inboxes
106
+ # Permanently delete all inboxes and associated email addresses. This will also delete all emails within the inboxes. Be careful as inboxes cannot be recovered once deleted. Note: deleting inboxes will not impact your usage limits. Monthly inbox creation limits are based on how many inboxes were created in the last 30 days, not how many inboxes you currently have.
107
+ # @param [Hash] opts the optional parameters
108
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
109
+ def delete_all_inboxes_with_http_info(opts = {})
110
+ if @api_client.config.debugging
111
+ @api_client.config.logger.debug 'Calling API: InboxControllerApi.delete_all_inboxes ...'
112
+ end
113
+ # resource path
114
+ local_var_path = '/inboxes'
115
+
116
+ # query parameters
117
+ query_params = opts[:query_params] || {}
118
+
119
+ # header parameters
120
+ header_params = opts[:header_params] || {}
121
+
122
+ # form parameters
123
+ form_params = opts[:form_params] || {}
124
+
125
+ # http body (model)
126
+ post_body = opts[:body]
127
+
128
+ # return_type
129
+ return_type = opts[:return_type]
130
+
131
+ # auth_names
132
+ auth_names = opts[:auth_names] || ['API_KEY']
133
+
134
+ new_options = opts.merge(
135
+ :header_params => header_params,
136
+ :query_params => query_params,
137
+ :form_params => form_params,
138
+ :body => post_body,
139
+ :auth_names => auth_names,
140
+ :return_type => return_type
141
+ )
142
+
143
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
144
+ if @api_client.config.debugging
145
+ @api_client.config.logger.debug "API called: InboxControllerApi#delete_all_inboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
146
+ end
147
+ return data, status_code, headers
148
+ end
149
+
150
+ # Delete inbox
151
+ # Permanently delete an inbox and associated email address aswell as all emails within the given inbox. This action cannot be undone. Note: deleting an inbox will not affect your account usage. Monthly inbox usage is based on how many inboxes you create within 30 days, not how many exist at time of request.
152
+ # @param inbox_id [String] inboxId
153
+ # @param [Hash] opts the optional parameters
154
+ # @return [nil]
155
+ def delete_inbox(inbox_id, opts = {})
156
+ delete_inbox_with_http_info(inbox_id, opts)
157
+ nil
158
+ end
159
+
160
+ # Delete inbox
161
+ # Permanently delete an inbox and associated email address aswell as all emails within the given inbox. This action cannot be undone. Note: deleting an inbox will not affect your account usage. Monthly inbox usage is based on how many inboxes you create within 30 days, not how many exist at time of request.
162
+ # @param inbox_id [String] inboxId
163
+ # @param [Hash] opts the optional parameters
164
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
165
+ def delete_inbox_with_http_info(inbox_id, opts = {})
166
+ if @api_client.config.debugging
167
+ @api_client.config.logger.debug 'Calling API: InboxControllerApi.delete_inbox ...'
168
+ end
169
+ # verify the required parameter 'inbox_id' is set
170
+ if @api_client.config.client_side_validation && inbox_id.nil?
171
+ fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.delete_inbox"
172
+ end
173
+ # resource path
174
+ local_var_path = '/inboxes/{inboxId}'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
175
+
176
+ # query parameters
177
+ query_params = opts[:query_params] || {}
178
+
179
+ # header parameters
180
+ header_params = opts[:header_params] || {}
181
+
182
+ # form parameters
183
+ form_params = opts[:form_params] || {}
184
+
185
+ # http body (model)
186
+ post_body = opts[:body]
187
+
188
+ # return_type
189
+ return_type = opts[:return_type]
190
+
191
+ # auth_names
192
+ auth_names = opts[:auth_names] || ['API_KEY']
193
+
194
+ new_options = opts.merge(
195
+ :header_params => header_params,
196
+ :query_params => query_params,
197
+ :form_params => form_params,
198
+ :body => post_body,
199
+ :auth_names => auth_names,
200
+ :return_type => return_type
201
+ )
202
+
203
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
204
+ if @api_client.config.debugging
205
+ @api_client.config.logger.debug "API called: InboxControllerApi#delete_inbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
206
+ end
207
+ return data, status_code, headers
208
+ end
209
+
210
+ # List Inboxes Paginated
211
+ # List inboxes in paginated form. Allows for page index, page size, and sort direction. Can also filter by favourited or email address like pattern.
212
+ # @param [Hash] opts the optional parameters
213
+ # @option opts [Boolean] :favourite Optionally filter results for favourites only (default to false)
214
+ # @option opts [Integer] :page Optional page index in inbox list pagination (default to 0)
215
+ # @option opts [String] :search Optionally filter by search words partial matching ID, tags, name, and email address
216
+ # @option opts [Integer] :size Optional page size in inbox list pagination (default to 20)
217
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
218
+ # @return [PageInboxProjection]
219
+ def get_all_inboxes(opts = {})
220
+ data, _status_code, _headers = get_all_inboxes_with_http_info(opts)
221
+ data
222
+ end
223
+
224
+ # List Inboxes Paginated
225
+ # List inboxes in paginated form. Allows for page index, page size, and sort direction. Can also filter by favourited or email address like pattern.
226
+ # @param [Hash] opts the optional parameters
227
+ # @option opts [Boolean] :favourite Optionally filter results for favourites only
228
+ # @option opts [Integer] :page Optional page index in inbox list pagination
229
+ # @option opts [String] :search Optionally filter by search words partial matching ID, tags, name, and email address
230
+ # @option opts [Integer] :size Optional page size in inbox list pagination
231
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
232
+ # @return [Array<(PageInboxProjection, Integer, Hash)>] PageInboxProjection data, response status code and response headers
233
+ def get_all_inboxes_with_http_info(opts = {})
234
+ if @api_client.config.debugging
235
+ @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_all_inboxes ...'
236
+ end
237
+ allowable_values = ["ASC", "DESC"]
238
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
239
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
240
+ end
241
+ # resource path
242
+ local_var_path = '/inboxes/paginated'
243
+
244
+ # query parameters
245
+ query_params = opts[:query_params] || {}
246
+ query_params[:'favourite'] = opts[:'favourite'] if !opts[:'favourite'].nil?
247
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
248
+ query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
249
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
250
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
251
+
252
+ # header parameters
253
+ header_params = opts[:header_params] || {}
254
+ # HTTP header 'Accept' (if needed)
255
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
256
+
257
+ # form parameters
258
+ form_params = opts[:form_params] || {}
259
+
260
+ # http body (model)
261
+ post_body = opts[:body]
262
+
263
+ # return_type
264
+ return_type = opts[:return_type] || 'PageInboxProjection'
265
+
266
+ # auth_names
267
+ auth_names = opts[:auth_names] || ['API_KEY']
268
+
269
+ new_options = opts.merge(
270
+ :header_params => header_params,
271
+ :query_params => query_params,
272
+ :form_params => form_params,
273
+ :body => post_body,
274
+ :auth_names => auth_names,
275
+ :return_type => return_type
276
+ )
277
+
278
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
279
+ if @api_client.config.debugging
280
+ @api_client.config.logger.debug "API called: InboxControllerApi#get_all_inboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
281
+ end
282
+ return data, status_code, headers
283
+ end
284
+
285
+ # Get emails in an Inbox
286
+ # List emails that an inbox has received. Only emails that are sent to the inbox's email address will appear in the inbox. It may take several seconds for any email you send to an inbox's email address to appear in the inbox. To make this endpoint wait for a minimum number of emails use the `minCount` parameter. The server will retry the inbox database until the `minCount` is satisfied or the `retryTimeout` is reached
287
+ # @param inbox_id [String] Id of inbox that emails belongs to
288
+ # @param [Hash] opts the optional parameters
289
+ # @option opts [Integer] :limit Limit the result set, ordered by received date time sort direction
290
+ # @option opts [Integer] :min_count Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached.
291
+ # @option opts [Integer] :retry_timeout Maximum milliseconds to spend retrying inbox database until minCount emails are returned
292
+ # @option opts [DateTime] :since Exclude emails received before this ISO 8601 date time
293
+ # @option opts [String] :sort Sort the results by received date and direction ASC or DESC
294
+ # @return [Array<EmailPreview>]
295
+ def get_emails(inbox_id, opts = {})
296
+ data, _status_code, _headers = get_emails_with_http_info(inbox_id, opts)
297
+ data
298
+ end
299
+
300
+ # Get emails in an Inbox
301
+ # List emails that an inbox has received. Only emails that are sent to the inbox&#39;s email address will appear in the inbox. It may take several seconds for any email you send to an inbox&#39;s email address to appear in the inbox. To make this endpoint wait for a minimum number of emails use the &#x60;minCount&#x60; parameter. The server will retry the inbox database until the &#x60;minCount&#x60; is satisfied or the &#x60;retryTimeout&#x60; is reached
302
+ # @param inbox_id [String] Id of inbox that emails belongs to
303
+ # @param [Hash] opts the optional parameters
304
+ # @option opts [Integer] :limit Limit the result set, ordered by received date time sort direction
305
+ # @option opts [Integer] :min_count Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached.
306
+ # @option opts [Integer] :retry_timeout Maximum milliseconds to spend retrying inbox database until minCount emails are returned
307
+ # @option opts [DateTime] :since Exclude emails received before this ISO 8601 date time
308
+ # @option opts [String] :sort Sort the results by received date and direction ASC or DESC
309
+ # @return [Array<(Array<EmailPreview>, Integer, Hash)>] Array<EmailPreview> data, response status code and response headers
310
+ def get_emails_with_http_info(inbox_id, opts = {})
311
+ if @api_client.config.debugging
312
+ @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_emails ...'
313
+ end
314
+ # verify the required parameter 'inbox_id' is set
315
+ if @api_client.config.client_side_validation && inbox_id.nil?
316
+ fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.get_emails"
317
+ end
318
+ allowable_values = ["ASC", "DESC"]
319
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
320
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
321
+ end
322
+ # resource path
323
+ local_var_path = '/inboxes/{inboxId}/emails'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
324
+
325
+ # query parameters
326
+ query_params = opts[:query_params] || {}
327
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
328
+ query_params[:'minCount'] = opts[:'min_count'] if !opts[:'min_count'].nil?
329
+ query_params[:'retryTimeout'] = opts[:'retry_timeout'] if !opts[:'retry_timeout'].nil?
330
+ query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
331
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
332
+
333
+ # header parameters
334
+ header_params = opts[:header_params] || {}
335
+ # HTTP header 'Accept' (if needed)
336
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
337
+
338
+ # form parameters
339
+ form_params = opts[:form_params] || {}
340
+
341
+ # http body (model)
342
+ post_body = opts[:body]
343
+
344
+ # return_type
345
+ return_type = opts[:return_type] || 'Array<EmailPreview>'
346
+
347
+ # auth_names
348
+ auth_names = opts[:auth_names] || ['API_KEY']
349
+
350
+ new_options = opts.merge(
351
+ :header_params => header_params,
352
+ :query_params => query_params,
353
+ :form_params => form_params,
354
+ :body => post_body,
355
+ :auth_names => auth_names,
356
+ :return_type => return_type
357
+ )
358
+
359
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
360
+ if @api_client.config.debugging
361
+ @api_client.config.logger.debug "API called: InboxControllerApi#get_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
362
+ end
363
+ return data, status_code, headers
364
+ end
365
+
366
+ # Get Inbox
367
+ # Returns an inbox's properties, including its email address and ID.
368
+ # @param inbox_id [String] inboxId
369
+ # @param [Hash] opts the optional parameters
370
+ # @return [Inbox]
371
+ def get_inbox(inbox_id, opts = {})
372
+ data, _status_code, _headers = get_inbox_with_http_info(inbox_id, opts)
373
+ data
374
+ end
375
+
376
+ # Get Inbox
377
+ # Returns an inbox&#39;s properties, including its email address and ID.
378
+ # @param inbox_id [String] inboxId
379
+ # @param [Hash] opts the optional parameters
380
+ # @return [Array<(Inbox, Integer, Hash)>] Inbox data, response status code and response headers
381
+ def get_inbox_with_http_info(inbox_id, opts = {})
382
+ if @api_client.config.debugging
383
+ @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_inbox ...'
384
+ end
385
+ # verify the required parameter 'inbox_id' is set
386
+ if @api_client.config.client_side_validation && inbox_id.nil?
387
+ fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.get_inbox"
388
+ end
389
+ # resource path
390
+ local_var_path = '/inboxes/{inboxId}'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
391
+
392
+ # query parameters
393
+ query_params = opts[:query_params] || {}
394
+
395
+ # header parameters
396
+ header_params = opts[:header_params] || {}
397
+ # HTTP header 'Accept' (if needed)
398
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
399
+
400
+ # form parameters
401
+ form_params = opts[:form_params] || {}
402
+
403
+ # http body (model)
404
+ post_body = opts[:body]
405
+
406
+ # return_type
407
+ return_type = opts[:return_type] || 'Inbox'
408
+
409
+ # auth_names
410
+ auth_names = opts[:auth_names] || ['API_KEY']
411
+
412
+ new_options = opts.merge(
413
+ :header_params => header_params,
414
+ :query_params => query_params,
415
+ :form_params => form_params,
416
+ :body => post_body,
417
+ :auth_names => auth_names,
418
+ :return_type => return_type
419
+ )
420
+
421
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
422
+ if @api_client.config.debugging
423
+ @api_client.config.logger.debug "API called: InboxControllerApi#get_inbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
424
+ end
425
+ return data, status_code, headers
426
+ end
427
+
428
+ # Get inbox emails paginated
429
+ # Get a paginated list of emails in an inbox. Does not hold connections open.
430
+ # @param inbox_id [String] Id of inbox that emails belongs to
431
+ # @param [Hash] opts the optional parameters
432
+ # @option opts [Integer] :page Optional page index in inbox emails list pagination (default to 0)
433
+ # @option opts [Integer] :size Optional page size in inbox emails list pagination (default to 20)
434
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
435
+ # @return [PageEmailPreview]
436
+ def get_inbox_emails_paginated(inbox_id, opts = {})
437
+ data, _status_code, _headers = get_inbox_emails_paginated_with_http_info(inbox_id, opts)
438
+ data
439
+ end
440
+
441
+ # Get inbox emails paginated
442
+ # Get a paginated list of emails in an inbox. Does not hold connections open.
443
+ # @param inbox_id [String] Id of inbox that emails belongs to
444
+ # @param [Hash] opts the optional parameters
445
+ # @option opts [Integer] :page Optional page index in inbox emails list pagination
446
+ # @option opts [Integer] :size Optional page size in inbox emails list pagination
447
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
448
+ # @return [Array<(PageEmailPreview, Integer, Hash)>] PageEmailPreview data, response status code and response headers
449
+ def get_inbox_emails_paginated_with_http_info(inbox_id, opts = {})
450
+ if @api_client.config.debugging
451
+ @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_inbox_emails_paginated ...'
452
+ end
453
+ # verify the required parameter 'inbox_id' is set
454
+ if @api_client.config.client_side_validation && inbox_id.nil?
455
+ fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.get_inbox_emails_paginated"
456
+ end
457
+ allowable_values = ["ASC", "DESC"]
458
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
459
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
460
+ end
461
+ # resource path
462
+ local_var_path = '/inboxes/{inboxId}/emails/paginated'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
463
+
464
+ # query parameters
465
+ query_params = opts[:query_params] || {}
466
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
467
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
468
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
469
+
470
+ # header parameters
471
+ header_params = opts[:header_params] || {}
472
+ # HTTP header 'Accept' (if needed)
473
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
474
+
475
+ # form parameters
476
+ form_params = opts[:form_params] || {}
477
+
478
+ # http body (model)
479
+ post_body = opts[:body]
480
+
481
+ # return_type
482
+ return_type = opts[:return_type] || 'PageEmailPreview'
483
+
484
+ # auth_names
485
+ auth_names = opts[:auth_names] || ['API_KEY']
486
+
487
+ new_options = opts.merge(
488
+ :header_params => header_params,
489
+ :query_params => query_params,
490
+ :form_params => form_params,
491
+ :body => post_body,
492
+ :auth_names => auth_names,
493
+ :return_type => return_type
494
+ )
495
+
496
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
497
+ if @api_client.config.debugging
498
+ @api_client.config.logger.debug "API called: InboxControllerApi#get_inbox_emails_paginated\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
499
+ end
500
+ return data, status_code, headers
501
+ end
502
+
503
+ # List Inboxes / Email Addresses
504
+ # List the inboxes you have created
505
+ # @param [Hash] opts the optional parameters
506
+ # @return [Array<Inbox>]
507
+ def get_inboxes(opts = {})
508
+ data, _status_code, _headers = get_inboxes_with_http_info(opts)
509
+ data
510
+ end
511
+
512
+ # List Inboxes / Email Addresses
513
+ # List the inboxes you have created
514
+ # @param [Hash] opts the optional parameters
515
+ # @return [Array<(Array<Inbox>, Integer, Hash)>] Array<Inbox> data, response status code and response headers
516
+ def get_inboxes_with_http_info(opts = {})
517
+ if @api_client.config.debugging
518
+ @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_inboxes ...'
519
+ end
520
+ # resource path
521
+ local_var_path = '/inboxes'
522
+
523
+ # query parameters
524
+ query_params = opts[:query_params] || {}
525
+
526
+ # header parameters
527
+ header_params = opts[:header_params] || {}
528
+ # HTTP header 'Accept' (if needed)
529
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
530
+
531
+ # form parameters
532
+ form_params = opts[:form_params] || {}
533
+
534
+ # http body (model)
535
+ post_body = opts[:body]
536
+
537
+ # return_type
538
+ return_type = opts[:return_type] || 'Array<Inbox>'
539
+
540
+ # auth_names
541
+ auth_names = opts[:auth_names] || ['API_KEY']
542
+
543
+ new_options = opts.merge(
544
+ :header_params => header_params,
545
+ :query_params => query_params,
546
+ :form_params => form_params,
547
+ :body => post_body,
548
+ :auth_names => auth_names,
549
+ :return_type => return_type
550
+ )
551
+
552
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
553
+ if @api_client.config.debugging
554
+ @api_client.config.logger.debug "API called: InboxControllerApi#get_inboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
555
+ end
556
+ return data, status_code, headers
557
+ end
558
+
559
+ # Send Email
560
+ # 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.
561
+ # @param inbox_id [String] ID of the inbox you want to send the email from
562
+ # @param [Hash] opts the optional parameters
563
+ # @option opts [SendEmailOptions] :send_email_options Options for the email
564
+ # @return [nil]
565
+ def send_email(inbox_id, opts = {})
566
+ send_email_with_http_info(inbox_id, opts)
567
+ nil
568
+ end
569
+
570
+ # Send Email
571
+ # Send an email from an inbox&#39;s email address. The request body should contain the &#x60;SendEmailOptions&#x60; that include recipients, attachments, body etc. See &#x60;SendEmailOptions&#x60; for all available properties. Note the &#x60;inboxId&#x60; refers to the inbox&#39;s id not the inbox&#39;s email address. See https://www.mailslurp.com/guides/ for more information on how to send emails.
572
+ # @param inbox_id [String] ID of the inbox you want to send the email from
573
+ # @param [Hash] opts the optional parameters
574
+ # @option opts [SendEmailOptions] :send_email_options Options for the email
575
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
576
+ def send_email_with_http_info(inbox_id, opts = {})
577
+ if @api_client.config.debugging
578
+ @api_client.config.logger.debug 'Calling API: InboxControllerApi.send_email ...'
579
+ end
580
+ # verify the required parameter 'inbox_id' is set
581
+ if @api_client.config.client_side_validation && inbox_id.nil?
582
+ fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.send_email"
583
+ end
584
+ # resource path
585
+ local_var_path = '/inboxes/{inboxId}'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
586
+
587
+ # query parameters
588
+ query_params = opts[:query_params] || {}
589
+
590
+ # header parameters
591
+ header_params = opts[:header_params] || {}
592
+ # HTTP header 'Content-Type'
593
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
594
+
595
+ # form parameters
596
+ form_params = opts[:form_params] || {}
597
+
598
+ # http body (model)
599
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'send_email_options'])
600
+
601
+ # return_type
602
+ return_type = opts[:return_type]
603
+
604
+ # auth_names
605
+ auth_names = opts[:auth_names] || ['API_KEY']
606
+
607
+ new_options = opts.merge(
608
+ :header_params => header_params,
609
+ :query_params => query_params,
610
+ :form_params => form_params,
611
+ :body => post_body,
612
+ :auth_names => auth_names,
613
+ :return_type => return_type
614
+ )
615
+
616
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
617
+ if @api_client.config.debugging
618
+ @api_client.config.logger.debug "API called: InboxControllerApi#send_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
619
+ end
620
+ return data, status_code, headers
621
+ end
622
+
623
+ # Set inbox favourited state
624
+ # Set and return new favourite state for an inbox
625
+ # @param inbox_id [String] inboxId
626
+ # @param set_inbox_favourited_options [SetInboxFavouritedOptions] setInboxFavouritedOptions
627
+ # @param [Hash] opts the optional parameters
628
+ # @return [Inbox]
629
+ def set_inbox_favourited(inbox_id, set_inbox_favourited_options, opts = {})
630
+ data, _status_code, _headers = set_inbox_favourited_with_http_info(inbox_id, set_inbox_favourited_options, opts)
631
+ data
632
+ end
633
+
634
+ # Set inbox favourited state
635
+ # Set and return new favourite state for an inbox
636
+ # @param inbox_id [String] inboxId
637
+ # @param set_inbox_favourited_options [SetInboxFavouritedOptions] setInboxFavouritedOptions
638
+ # @param [Hash] opts the optional parameters
639
+ # @return [Array<(Inbox, Integer, Hash)>] Inbox data, response status code and response headers
640
+ def set_inbox_favourited_with_http_info(inbox_id, set_inbox_favourited_options, opts = {})
641
+ if @api_client.config.debugging
642
+ @api_client.config.logger.debug 'Calling API: InboxControllerApi.set_inbox_favourited ...'
643
+ end
644
+ # verify the required parameter 'inbox_id' is set
645
+ if @api_client.config.client_side_validation && inbox_id.nil?
646
+ fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.set_inbox_favourited"
647
+ end
648
+ # verify the required parameter 'set_inbox_favourited_options' is set
649
+ if @api_client.config.client_side_validation && set_inbox_favourited_options.nil?
650
+ fail ArgumentError, "Missing the required parameter 'set_inbox_favourited_options' when calling InboxControllerApi.set_inbox_favourited"
651
+ end
652
+ # resource path
653
+ local_var_path = '/inboxes/{inboxId}/favourite'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
654
+
655
+ # query parameters
656
+ query_params = opts[:query_params] || {}
657
+
658
+ # header parameters
659
+ header_params = opts[:header_params] || {}
660
+ # HTTP header 'Accept' (if needed)
661
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
662
+ # HTTP header 'Content-Type'
663
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
664
+
665
+ # form parameters
666
+ form_params = opts[:form_params] || {}
667
+
668
+ # http body (model)
669
+ post_body = opts[:body] || @api_client.object_to_http_body(set_inbox_favourited_options)
670
+
671
+ # return_type
672
+ return_type = opts[:return_type] || 'Inbox'
673
+
674
+ # auth_names
675
+ auth_names = opts[:auth_names] || ['API_KEY']
676
+
677
+ new_options = opts.merge(
678
+ :header_params => header_params,
679
+ :query_params => query_params,
680
+ :form_params => form_params,
681
+ :body => post_body,
682
+ :auth_names => auth_names,
683
+ :return_type => return_type
684
+ )
685
+
686
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
687
+ if @api_client.config.debugging
688
+ @api_client.config.logger.debug "API called: InboxControllerApi#set_inbox_favourited\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
689
+ end
690
+ return data, status_code, headers
691
+ end
692
+
693
+ # Update Inbox
694
+ # Update editable fields on an inbox
695
+ # @param inbox_id [String] inboxId
696
+ # @param update_inbox_options [UpdateInboxOptions] updateInboxOptions
697
+ # @param [Hash] opts the optional parameters
698
+ # @return [Inbox]
699
+ def update_inbox(inbox_id, update_inbox_options, opts = {})
700
+ data, _status_code, _headers = update_inbox_with_http_info(inbox_id, update_inbox_options, opts)
701
+ data
702
+ end
703
+
704
+ # Update Inbox
705
+ # Update editable fields on an inbox
706
+ # @param inbox_id [String] inboxId
707
+ # @param update_inbox_options [UpdateInboxOptions] updateInboxOptions
708
+ # @param [Hash] opts the optional parameters
709
+ # @return [Array<(Inbox, Integer, Hash)>] Inbox data, response status code and response headers
710
+ def update_inbox_with_http_info(inbox_id, update_inbox_options, opts = {})
711
+ if @api_client.config.debugging
712
+ @api_client.config.logger.debug 'Calling API: InboxControllerApi.update_inbox ...'
713
+ end
714
+ # verify the required parameter 'inbox_id' is set
715
+ if @api_client.config.client_side_validation && inbox_id.nil?
716
+ fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.update_inbox"
717
+ end
718
+ # verify the required parameter 'update_inbox_options' is set
719
+ if @api_client.config.client_side_validation && update_inbox_options.nil?
720
+ fail ArgumentError, "Missing the required parameter 'update_inbox_options' when calling InboxControllerApi.update_inbox"
721
+ end
722
+ # resource path
723
+ local_var_path = '/inboxes/{inboxId}'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
724
+
725
+ # query parameters
726
+ query_params = opts[:query_params] || {}
727
+
728
+ # header parameters
729
+ header_params = opts[:header_params] || {}
730
+ # HTTP header 'Accept' (if needed)
731
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
732
+ # HTTP header 'Content-Type'
733
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
734
+
735
+ # form parameters
736
+ form_params = opts[:form_params] || {}
737
+
738
+ # http body (model)
739
+ post_body = opts[:body] || @api_client.object_to_http_body(update_inbox_options)
740
+
741
+ # return_type
742
+ return_type = opts[:return_type] || 'Inbox'
743
+
744
+ # auth_names
745
+ auth_names = opts[:auth_names] || ['API_KEY']
746
+
747
+ new_options = opts.merge(
748
+ :header_params => header_params,
749
+ :query_params => query_params,
750
+ :form_params => form_params,
751
+ :body => post_body,
752
+ :auth_names => auth_names,
753
+ :return_type => return_type
754
+ )
755
+
756
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
757
+ if @api_client.config.debugging
758
+ @api_client.config.logger.debug "API called: InboxControllerApi#update_inbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
759
+ end
760
+ return data, status_code, headers
761
+ end
762
+ end
763
+ end