mailslurp_client 7.0.7 → 8.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (208) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client.rb +19 -3
  3. metadata +14 -345
  4. data/Gemfile +0 -9
  5. data/LICENSE +0 -22
  6. data/README.md +0 -226
  7. data/Rakefile +0 -10
  8. data/docs/AttachmentControllerApi.md +0 -124
  9. data/docs/AttachmentMetaData.md +0 -23
  10. data/docs/BasicAuthOptions.md +0 -19
  11. data/docs/BulkActionsControllerApi.md +0 -165
  12. data/docs/BulkSendEmailOptions.md +0 -19
  13. data/docs/CommonActionsControllerApi.md +0 -167
  14. data/docs/ContactControllerApi.md +0 -274
  15. data/docs/ContactDto.md +0 -31
  16. data/docs/ContactProjection.md +0 -27
  17. data/docs/CreateContactOptions.md +0 -31
  18. data/docs/CreateDomainOptions.md +0 -17
  19. data/docs/CreateGroupOptions.md +0 -19
  20. data/docs/CreateTemplateOptions.md +0 -19
  21. data/docs/CreateWebhookOptions.md +0 -21
  22. data/docs/DomainControllerApi.md +0 -223
  23. data/docs/DomainDto.md +0 -29
  24. data/docs/DomainPreview.md +0 -21
  25. data/docs/Email.md +0 -49
  26. data/docs/EmailAnalysis.md +0 -25
  27. data/docs/EmailControllerApi.md +0 -740
  28. data/docs/EmailPreview.md +0 -31
  29. data/docs/EmailProjection.md +0 -33
  30. data/docs/ForwardEmailOptions.md +0 -23
  31. data/docs/GroupContactsDto.md +0 -19
  32. data/docs/GroupControllerApi.md +0 -437
  33. data/docs/GroupDto.md +0 -23
  34. data/docs/GroupProjection.md +0 -23
  35. data/docs/HTMLValidationResult.md +0 -21
  36. data/docs/Inbox.md +0 -33
  37. data/docs/InboxControllerApi.md +0 -652
  38. data/docs/InboxProjection.md +0 -29
  39. data/docs/JsonNode.md +0 -59
  40. data/docs/MatchOption.md +0 -21
  41. data/docs/MatchOptions.md +0 -17
  42. data/docs/PageContactProjection.md +0 -37
  43. data/docs/PageEmailPreview.md +0 -37
  44. data/docs/PageEmailProjection.md +0 -37
  45. data/docs/PageGroupProjection.md +0 -37
  46. data/docs/PageInboxProjection.md +0 -37
  47. data/docs/PageTemplateProjection.md +0 -37
  48. data/docs/PageWebhookProjection.md +0 -37
  49. data/docs/Pageable.md +0 -27
  50. data/docs/RawEmailJson.md +0 -17
  51. data/docs/SendEmailOptions.md +0 -45
  52. data/docs/SetInboxFavouritedOptions.md +0 -17
  53. data/docs/Sort.md +0 -21
  54. data/docs/TemplateControllerApi.md +0 -274
  55. data/docs/TemplateDto.md +0 -25
  56. data/docs/TemplateProjection.md +0 -25
  57. data/docs/TemplateVariable.md +0 -19
  58. data/docs/UnreadCount.md +0 -17
  59. data/docs/UpdateGroupContacts.md +0 -17
  60. data/docs/UpdateInboxOptions.md +0 -25
  61. data/docs/UploadAttachmentOptions.md +0 -21
  62. data/docs/ValidationDto.md +0 -19
  63. data/docs/ValidationMessage.md +0 -19
  64. data/docs/WaitForConditions.md +0 -29
  65. data/docs/WaitForControllerApi.md +0 -317
  66. data/docs/WebhookControllerApi.md +0 -339
  67. data/docs/WebhookDto.md +0 -33
  68. data/docs/WebhookProjection.md +0 -27
  69. data/docs/WebhookTestRequest.md +0 -23
  70. data/docs/WebhookTestResponse.md +0 -19
  71. data/docs/WebhookTestResult.md +0 -21
  72. data/git_push.sh +0 -58
  73. data/lib/mailslurp_client/api/attachment_controller_api.rb +0 -157
  74. data/lib/mailslurp_client/api/bulk_actions_controller_api.rb +0 -203
  75. data/lib/mailslurp_client/api/common_actions_controller_api.rb +0 -201
  76. data/lib/mailslurp_client/api/contact_controller_api.rb +0 -323
  77. data/lib/mailslurp_client/api/domain_controller_api.rb +0 -264
  78. data/lib/mailslurp_client/api/email_controller_api.rb +0 -852
  79. data/lib/mailslurp_client/api/group_controller_api.rb +0 -519
  80. data/lib/mailslurp_client/api/inbox_controller_api.rb +0 -763
  81. data/lib/mailslurp_client/api/template_controller_api.rb +0 -323
  82. data/lib/mailslurp_client/api/wait_for_controller_api.rb +0 -359
  83. data/lib/mailslurp_client/api/webhook_controller_api.rb +0 -405
  84. data/lib/mailslurp_client/api_client.rb +0 -386
  85. data/lib/mailslurp_client/api_error.rb +0 -57
  86. data/lib/mailslurp_client/configuration.rb +0 -248
  87. data/lib/mailslurp_client/models/attachment_meta_data.rb +0 -253
  88. data/lib/mailslurp_client/models/basic_auth_options.rb +0 -226
  89. data/lib/mailslurp_client/models/bulk_send_email_options.rb +0 -224
  90. data/lib/mailslurp_client/models/contact_dto.rb +0 -288
  91. data/lib/mailslurp_client/models/contact_projection.rb +0 -261
  92. data/lib/mailslurp_client/models/create_contact_options.rb +0 -277
  93. data/lib/mailslurp_client/models/create_domain_options.rb +0 -208
  94. data/lib/mailslurp_client/models/create_group_options.rb +0 -220
  95. data/lib/mailslurp_client/models/create_template_options.rb +0 -225
  96. data/lib/mailslurp_client/models/create_webhook_options.rb +0 -227
  97. data/lib/mailslurp_client/models/domain_dto.rb +0 -296
  98. data/lib/mailslurp_client/models/domain_preview.rb +0 -240
  99. data/lib/mailslurp_client/models/email.rb +0 -376
  100. data/lib/mailslurp_client/models/email_analysis.rb +0 -243
  101. data/lib/mailslurp_client/models/email_preview.rb +0 -286
  102. data/lib/mailslurp_client/models/email_projection.rb +0 -306
  103. data/lib/mailslurp_client/models/forward_email_options.rb +0 -245
  104. data/lib/mailslurp_client/models/group_contacts_dto.rb +0 -227
  105. data/lib/mailslurp_client/models/group_dto.rb +0 -248
  106. data/lib/mailslurp_client/models/group_projection.rb +0 -248
  107. data/lib/mailslurp_client/models/html_validation_result.rb +0 -243
  108. data/lib/mailslurp_client/models/inbox.rb +0 -290
  109. data/lib/mailslurp_client/models/inbox_projection.rb +0 -272
  110. data/lib/mailslurp_client/models/json_node.rb +0 -429
  111. data/lib/mailslurp_client/models/match_option.rb +0 -274
  112. data/lib/mailslurp_client/models/match_options.rb +0 -210
  113. data/lib/mailslurp_client/models/page_contact_projection.rb +0 -298
  114. data/lib/mailslurp_client/models/page_email_preview.rb +0 -298
  115. data/lib/mailslurp_client/models/page_email_projection.rb +0 -298
  116. data/lib/mailslurp_client/models/page_group_projection.rb +0 -298
  117. data/lib/mailslurp_client/models/page_inbox_projection.rb +0 -298
  118. data/lib/mailslurp_client/models/page_template_projection.rb +0 -298
  119. data/lib/mailslurp_client/models/page_webhook_projection.rb +0 -298
  120. data/lib/mailslurp_client/models/pageable.rb +0 -251
  121. data/lib/mailslurp_client/models/raw_email_json.rb +0 -211
  122. data/lib/mailslurp_client/models/send_email_options.rb +0 -392
  123. data/lib/mailslurp_client/models/set_inbox_favourited_options.rb +0 -208
  124. data/lib/mailslurp_client/models/sort.rb +0 -224
  125. data/lib/mailslurp_client/models/template_dto.rb +0 -269
  126. data/lib/mailslurp_client/models/template_projection.rb +0 -269
  127. data/lib/mailslurp_client/models/template_variable.rb +0 -259
  128. data/lib/mailslurp_client/models/unread_count.rb +0 -211
  129. data/lib/mailslurp_client/models/update_group_contacts.rb +0 -213
  130. data/lib/mailslurp_client/models/update_inbox_options.rb +0 -250
  131. data/lib/mailslurp_client/models/upload_attachment_options.rb +0 -228
  132. data/lib/mailslurp_client/models/validation_dto.rb +0 -225
  133. data/lib/mailslurp_client/models/validation_message.rb +0 -220
  134. data/lib/mailslurp_client/models/wait_for_conditions.rb +0 -315
  135. data/lib/mailslurp_client/models/webhook_dto.rb +0 -326
  136. data/lib/mailslurp_client/models/webhook_projection.rb +0 -277
  137. data/lib/mailslurp_client/models/webhook_test_request.rb +0 -284
  138. data/lib/mailslurp_client/models/webhook_test_response.rb +0 -215
  139. data/lib/mailslurp_client/models/webhook_test_result.rb +0 -235
  140. data/lib/mailslurp_client/version.rb +0 -15
  141. data/mailslurp_client.gemspec +0 -39
  142. data/spec/api/attachment_controller_api_spec.rb +0 -61
  143. data/spec/api/bulk_actions_controller_api_spec.rb +0 -68
  144. data/spec/api/common_actions_controller_api_spec.rb +0 -129
  145. data/spec/api/contact_controller_api_spec.rb +0 -91
  146. data/spec/api/domain_controller_api_spec.rb +0 -82
  147. data/spec/api/email_controller_api_spec.rb +0 -162
  148. data/spec/api/group_controller_api_spec.rb +0 -126
  149. data/spec/api/inbox_controller_api_spec.rb +0 -172
  150. data/spec/api/template_controller_api_spec.rb +0 -91
  151. data/spec/api/wait_for_controller_api_spec.rb +0 -107
  152. data/spec/api/webhook_controller_api_spec.rb +0 -107
  153. data/spec/api_client_spec.rb +0 -226
  154. data/spec/configuration_spec.rb +0 -42
  155. data/spec/models/attachment_meta_data_spec.rb +0 -59
  156. data/spec/models/basic_auth_options_spec.rb +0 -47
  157. data/spec/models/bulk_send_email_options_spec.rb +0 -47
  158. data/spec/models/contact_dto_spec.rb +0 -83
  159. data/spec/models/contact_projection_spec.rb +0 -71
  160. data/spec/models/create_contact_options_spec.rb +0 -83
  161. data/spec/models/create_domain_options_spec.rb +0 -41
  162. data/spec/models/create_group_options_spec.rb +0 -47
  163. data/spec/models/create_template_options_spec.rb +0 -47
  164. data/spec/models/create_webhook_options_spec.rb +0 -53
  165. data/spec/models/domain_dto_spec.rb +0 -77
  166. data/spec/models/domain_preview_spec.rb +0 -53
  167. data/spec/models/email_analysis_spec.rb +0 -65
  168. data/spec/models/email_preview_spec.rb +0 -83
  169. data/spec/models/email_projection_spec.rb +0 -89
  170. data/spec/models/email_spec.rb +0 -137
  171. data/spec/models/forward_email_options_spec.rb +0 -59
  172. data/spec/models/group_contacts_dto_spec.rb +0 -47
  173. data/spec/models/group_dto_spec.rb +0 -59
  174. data/spec/models/group_projection_spec.rb +0 -59
  175. data/spec/models/html_validation_result_spec.rb +0 -53
  176. data/spec/models/inbox_projection_spec.rb +0 -77
  177. data/spec/models/inbox_spec.rb +0 -89
  178. data/spec/models/json_node_spec.rb +0 -171
  179. data/spec/models/match_option_spec.rb +0 -61
  180. data/spec/models/match_options_spec.rb +0 -41
  181. data/spec/models/page_contact_projection_spec.rb +0 -101
  182. data/spec/models/page_email_preview_spec.rb +0 -101
  183. data/spec/models/page_email_projection_spec.rb +0 -101
  184. data/spec/models/page_group_projection_spec.rb +0 -101
  185. data/spec/models/page_inbox_projection_spec.rb +0 -101
  186. data/spec/models/page_template_projection_spec.rb +0 -101
  187. data/spec/models/page_webhook_projection_spec.rb +0 -101
  188. data/spec/models/pageable_spec.rb +0 -71
  189. data/spec/models/raw_email_json_spec.rb +0 -41
  190. data/spec/models/send_email_options_spec.rb +0 -129
  191. data/spec/models/set_inbox_favourited_options_spec.rb +0 -41
  192. data/spec/models/sort_spec.rb +0 -53
  193. data/spec/models/template_dto_spec.rb +0 -65
  194. data/spec/models/template_projection_spec.rb +0 -65
  195. data/spec/models/template_variable_spec.rb +0 -51
  196. data/spec/models/unread_count_spec.rb +0 -41
  197. data/spec/models/update_group_contacts_spec.rb +0 -41
  198. data/spec/models/update_inbox_options_spec.rb +0 -65
  199. data/spec/models/upload_attachment_options_spec.rb +0 -53
  200. data/spec/models/validation_dto_spec.rb +0 -47
  201. data/spec/models/validation_message_spec.rb +0 -47
  202. data/spec/models/wait_for_conditions_spec.rb +0 -85
  203. data/spec/models/webhook_dto_spec.rb +0 -93
  204. data/spec/models/webhook_projection_spec.rb +0 -71
  205. data/spec/models/webhook_test_request_spec.rb +0 -63
  206. data/spec/models/webhook_test_response_spec.rb +0 -47
  207. data/spec/models/webhook_test_result_spec.rb +0 -53
  208. data/spec/spec_helper.rb +0 -111
@@ -1,763 +0,0 @@
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