lib/ElasticEmail/api/contacts_api.rb in ElasticEmail-4.0.20 vs lib/ElasticEmail/api/contacts_api.rb in ElasticEmail-4.0.21
- old
+ new
@@ -1,14 +1,14 @@
=begin
#Elastic Email REST API
-#This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://elasticemail.com/account#/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
+#This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://app.elasticemail.com/marketing/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
The version of the OpenAPI document: 4.0.0
Contact: support@elasticemail.com
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 6.0.0
+OpenAPI Generator version: 6.2.1
=end
require 'cgi'
@@ -141,79 +141,10 @@
@api_client.config.logger.debug "API called: ContactsApi#contacts_by_email_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Load History
- # Returns detailed history of specified Contact. Required Access Level: ViewContacts
- # @param email [String] Proper email address.
- # @param [Hash] opts the optional parameters
- # @option opts [Integer] :limit Maximum number of returned items.
- # @option opts [Integer] :offset How many items should be returned ahead.
- # @return [Array<ContactHistory>]
- def contacts_by_email_history_get(email, opts = {})
- data, _status_code, _headers = contacts_by_email_history_get_with_http_info(email, opts)
- data
- end
-
- # Load History
- # Returns detailed history of specified Contact. Required Access Level: ViewContacts
- # @param email [String] Proper email address.
- # @param [Hash] opts the optional parameters
- # @option opts [Integer] :limit Maximum number of returned items.
- # @option opts [Integer] :offset How many items should be returned ahead.
- # @return [Array<(Array<ContactHistory>, Integer, Hash)>] Array<ContactHistory> data, response status code and response headers
- def contacts_by_email_history_get_with_http_info(email, opts = {})
- if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: ContactsApi.contacts_by_email_history_get ...'
- end
- # verify the required parameter 'email' is set
- if @api_client.config.client_side_validation && email.nil?
- fail ArgumentError, "Missing the required parameter 'email' when calling ContactsApi.contacts_by_email_history_get"
- end
- # resource path
- local_var_path = '/contacts/{email}/history'.sub('{' + 'email' + '}', CGI.escape(email.to_s))
-
- # query parameters
- query_params = opts[:query_params] || {}
- query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
- query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
-
- # header parameters
- header_params = opts[:header_params] || {}
- # HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
-
- # form parameters
- form_params = opts[:form_params] || {}
-
- # http body (model)
- post_body = opts[:debug_body]
-
- # return_type
- return_type = opts[:debug_return_type] || 'Array<ContactHistory>'
-
- # auth_names
- auth_names = opts[:debug_auth_names] || ['apikey']
-
- new_options = opts.merge(
- :operation => :"ContactsApi.contacts_by_email_history_get",
- :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(:GET, local_var_path, new_options)
- if @api_client.config.debugging
- @api_client.config.logger.debug "API called: ContactsApi#contacts_by_email_history_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
- end
- return data, status_code, headers
- end
-
# Update Contact
# Update selected contact. Omitted contact's fields will not be changed. Required Access Level: ModifyContacts
# @param email [String] Proper email address.
# @param contact_update_payload [ContactUpdatePayload]
# @param [Hash] opts the optional parameters
@@ -553,10 +484,11 @@
# Upload Contacts
# Upload contacts from a file. Required Access Level: ModifyContacts
# @param [Hash] opts the optional parameters
# @option opts [String] :list_name Name of an existing list to add these contacts to
# @option opts [String] :encoding_name In what encoding the file is uploaded
+ # @option opts [String] :file_url Optional url of csv to import
# @option opts [File] :file
# @return [nil]
def contacts_import_post(opts = {})
contacts_import_post_with_http_info(opts)
nil
@@ -565,10 +497,11 @@
# Upload Contacts
# Upload contacts from a file. Required Access Level: ModifyContacts
# @param [Hash] opts the optional parameters
# @option opts [String] :list_name Name of an existing list to add these contacts to
# @option opts [String] :encoding_name In what encoding the file is uploaded
+ # @option opts [String] :file_url Optional url of csv to import
# @option opts [File] :file
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
def contacts_import_post_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ContactsApi.contacts_import_post ...'
@@ -578,9 +511,10 @@
# query parameters
query_params = opts[:query_params] || {}
query_params[:'listName'] = opts[:'list_name'] if !opts[:'list_name'].nil?
query_params[:'encodingName'] = opts[:'encoding_name'] if !opts[:'encoding_name'].nil?
+ query_params[:'fileUrl'] = opts[:'file_url'] if !opts[:'file_url'].nil?
# header parameters
header_params = opts[:header_params] || {}
# HTTP header 'Content-Type'
content_type = @api_client.select_header_content_type(['multipart/form-data'])