Class: MailSlurpClient::BulkActionsControllerApi

Inherits:
Object
  • Object
show all
Defined in:
lib/mailslurp_client/api/bulk_actions_controller_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ BulkActionsControllerApi

Returns a new instance of BulkActionsControllerApi.



19
20
21
# File 'lib/mailslurp_client/api/bulk_actions_controller_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/mailslurp_client/api/bulk_actions_controller_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#bulk_create_inboxes(count, opts = {}) ⇒ Array<InboxDto>

Bulk create Inboxes (email addresses)

Parameters:

  • count (Integer)

    Number of inboxes to be created in bulk

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



26
27
28
29
# File 'lib/mailslurp_client/api/bulk_actions_controller_api.rb', line 26

def bulk_create_inboxes(count, opts = {})
  data, _status_code, _headers = bulk_create_inboxes_with_http_info(count, opts)
  data
end

#bulk_create_inboxes_with_http_info(count, opts = {}) ⇒ Array<(Array<InboxDto>, Integer, Hash)>

Bulk create Inboxes (email addresses)

Parameters:

  • count (Integer)

    Number of inboxes to be created in bulk

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Array<InboxDto>, Integer, Hash)>)

    Array<InboxDto> data, response status code and response headers



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/mailslurp_client/api/bulk_actions_controller_api.rb', line 35

def bulk_create_inboxes_with_http_info(count, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BulkActionsControllerApi.bulk_create_inboxes ...'
  end
  # verify the required parameter 'count' is set
  if @api_client.config.client_side_validation && count.nil?
    fail ArgumentError, "Missing the required parameter 'count' when calling BulkActionsControllerApi.bulk_create_inboxes"
  end
  # resource path
  local_var_path = '/bulk/inboxes'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'count'] = count

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'Array<InboxDto>' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BulkActionsControllerApi#bulk_create_inboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#bulk_delete_inboxes(request_body, opts = {}) ⇒ nil

Bulk Delete Inboxes

Parameters:

  • request_body (Array<String>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


87
88
89
90
# File 'lib/mailslurp_client/api/bulk_actions_controller_api.rb', line 87

def bulk_delete_inboxes(request_body, opts = {})
  bulk_delete_inboxes_with_http_info(request_body, opts)
  nil
end

#bulk_delete_inboxes_with_http_info(request_body, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Bulk Delete Inboxes

Parameters:

  • request_body (Array<String>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# File 'lib/mailslurp_client/api/bulk_actions_controller_api.rb', line 96

def bulk_delete_inboxes_with_http_info(request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BulkActionsControllerApi.bulk_delete_inboxes ...'
  end
  # verify the required parameter 'request_body' is set
  if @api_client.config.client_side_validation && request_body.nil?
    fail ArgumentError, "Missing the required parameter 'request_body' when calling BulkActionsControllerApi.bulk_delete_inboxes"
  end
  # resource path
  local_var_path = '/bulk/inboxes'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(request_body) 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BulkActionsControllerApi#bulk_delete_inboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#bulk_send_emails(bulk_send_email_options, opts = {}) ⇒ nil

Bulk Send Emails

Parameters:

  • bulk_send_email_options (BulkSendEmailOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


147
148
149
150
# File 'lib/mailslurp_client/api/bulk_actions_controller_api.rb', line 147

def bulk_send_emails(bulk_send_email_options, opts = {})
  bulk_send_emails_with_http_info(bulk_send_email_options, opts)
  nil
end

#bulk_send_emails_with_http_info(bulk_send_email_options, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Bulk Send Emails

Parameters:

  • bulk_send_email_options (BulkSendEmailOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# File 'lib/mailslurp_client/api/bulk_actions_controller_api.rb', line 156

def bulk_send_emails_with_http_info(bulk_send_email_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BulkActionsControllerApi.bulk_send_emails ...'
  end
  # verify the required parameter 'bulk_send_email_options' is set
  if @api_client.config.client_side_validation && bulk_send_email_options.nil?
    fail ArgumentError, "Missing the required parameter 'bulk_send_email_options' when calling BulkActionsControllerApi.bulk_send_emails"
  end
  # resource path
  local_var_path = '/bulk/send'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(bulk_send_email_options) 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BulkActionsControllerApi#bulk_send_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end