mailslurp_client 7.0.8 → 8.0.2

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