mailslurp_client 8.2.5 → 8.2.6
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10e115905db9c2fa8248e87041fc800dde7ea6b8861e4f6ad9d84f3227d350aa
|
4
|
+
data.tar.gz: 92ef69525efba4c26b080efac09e05b9327aa51ecbb80a2f449cdd7c05c1715e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d095d5e05fdecc392eaca398576074fc172bb85ead58dc4eff6354fd595d4d6613aae8145e337462bb54c271a3d9610491624881598b5662a5401fd287e32202
|
7
|
+
data.tar.gz: 7bec389303bf5886b57c3fc37fa02d183564bc63cc40e1a99683b56ae23c8e0535ec42820f18b1603414140b03c44cf9d3698e4732be1b2af40ebf0260f8e7f4
|
@@ -19,7 +19,7 @@ module MailSlurpClient
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
-
# Upload an attachment for sending
|
22
|
+
# Upload an attachment for sending using base64 file encoding
|
23
23
|
# When sending emails with attachments first upload each attachment with this endpoint. Record the returned attachment IDs. Then use these attachment IDs in the SendEmailOptions when sending an email. This means that attachments can easily be reused.
|
24
24
|
# @param upload_options [UploadAttachmentOptions] uploadOptions
|
25
25
|
# @param [Hash] opts the optional parameters
|
@@ -29,7 +29,7 @@ module MailSlurpClient
|
|
29
29
|
data
|
30
30
|
end
|
31
31
|
|
32
|
-
# Upload an attachment for sending
|
32
|
+
# Upload an attachment for sending using base64 file encoding
|
33
33
|
# When sending emails with attachments first upload each attachment with this endpoint. Record the returned attachment IDs. Then use these attachment IDs in the SendEmailOptions when sending an email. This means that attachments can easily be reused.
|
34
34
|
# @param upload_options [UploadAttachmentOptions] uploadOptions
|
35
35
|
# @param [Hash] opts the optional parameters
|
@@ -83,6 +83,66 @@ module MailSlurpClient
|
|
83
83
|
return data, status_code, headers
|
84
84
|
end
|
85
85
|
|
86
|
+
# Upload an attachment for sending using file byte stream input octet stream
|
87
|
+
# When sending emails with attachments first upload each attachment with this endpoint. Record the returned attachment IDs. Then use these attachment IDs in the SendEmailOptions when sending an email. This means that attachments can easily be reused.
|
88
|
+
# @param [Hash] opts the optional parameters
|
89
|
+
# @option opts [String] :filename Optional filename to save upload with
|
90
|
+
# @return [Array<String>]
|
91
|
+
def upload_attachment_bytes(opts = {})
|
92
|
+
data, _status_code, _headers = upload_attachment_bytes_with_http_info(opts)
|
93
|
+
data
|
94
|
+
end
|
95
|
+
|
96
|
+
# Upload an attachment for sending using file byte stream input octet stream
|
97
|
+
# When sending emails with attachments first upload each attachment with this endpoint. Record the returned attachment IDs. Then use these attachment IDs in the SendEmailOptions when sending an email. This means that attachments can easily be reused.
|
98
|
+
# @param [Hash] opts the optional parameters
|
99
|
+
# @option opts [String] :filename Optional filename to save upload with
|
100
|
+
# @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
|
101
|
+
def upload_attachment_bytes_with_http_info(opts = {})
|
102
|
+
if @api_client.config.debugging
|
103
|
+
@api_client.config.logger.debug 'Calling API: AttachmentControllerApi.upload_attachment_bytes ...'
|
104
|
+
end
|
105
|
+
# resource path
|
106
|
+
local_var_path = '/attachments/bytes'
|
107
|
+
|
108
|
+
# query parameters
|
109
|
+
query_params = opts[:query_params] || {}
|
110
|
+
|
111
|
+
# header parameters
|
112
|
+
header_params = opts[:header_params] || {}
|
113
|
+
# HTTP header 'Accept' (if needed)
|
114
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
115
|
+
# HTTP header 'Content-Type'
|
116
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream'])
|
117
|
+
|
118
|
+
# form parameters
|
119
|
+
form_params = opts[:form_params] || {}
|
120
|
+
|
121
|
+
# http body (model)
|
122
|
+
post_body = opts[:body] || @api_client.object_to_http_body(opts[:'filename'])
|
123
|
+
|
124
|
+
# return_type
|
125
|
+
return_type = opts[:return_type] || 'Array<String>'
|
126
|
+
|
127
|
+
# auth_names
|
128
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
129
|
+
|
130
|
+
new_options = opts.merge(
|
131
|
+
:header_params => header_params,
|
132
|
+
:query_params => query_params,
|
133
|
+
:form_params => form_params,
|
134
|
+
:body => post_body,
|
135
|
+
:auth_names => auth_names,
|
136
|
+
:return_type => return_type
|
137
|
+
)
|
138
|
+
|
139
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
140
|
+
if @api_client.config.debugging
|
141
|
+
@api_client.config.logger.debug "API called: AttachmentControllerApi#upload_attachment_bytes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
142
|
+
end
|
143
|
+
return data, status_code, headers
|
144
|
+
end
|
145
|
+
|
86
146
|
# Upload an attachment for sending using Multipart Form
|
87
147
|
# When sending emails with attachments first upload each attachment with this endpoint. Record the returned attachment IDs. Then use these attachment IDs in the SendEmailOptions when sending an email. This means that attachments can easily be reused.
|
88
148
|
# @param file [File] file
|