=begin
#BitbarCloud API

#BitbarCloud API.

OpenAPI spec version: 2.100.0
Contact: damian.sniezek@smartbear.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.4.13

=end

require 'uri'

module BitbarCloudApiClient
  class UsersApi
    attr_accessor :api_client

    def initialize(api_client = ApiClient.default)
      @api_client = api_client
    end
    # Activate user after registration.
    # @param email email
    # @param key key
    # @param password password
    # @param [Hash] opts the optional parameters
    # @option opts [String] :address address
    # @option opts [String] :city city
    # @option opts [String] :country country
    # @option opts [String] :first_name firstName
    # @option opts [String] :last_name lastName
    # @option opts [String] :organization organization
    # @option opts [String] :phone phone
    # @option opts [String] :state state
    # @option opts [String] :vat_id vatId
    # @option opts [String] :zip zip
    # @return [APIUser]
    def activate_using_post(email, key, password, opts = {})
      data, _status_code, _headers = activate_using_post_with_http_info(email, key, password, opts)
      data
    end

    # Activate user after registration.
    # @param email email
    # @param key key
    # @param password password
    # @param [Hash] opts the optional parameters
    # @option opts [String] :address address
    # @option opts [String] :city city
    # @option opts [String] :country country
    # @option opts [String] :first_name firstName
    # @option opts [String] :last_name lastName
    # @option opts [String] :organization organization
    # @option opts [String] :phone phone
    # @option opts [String] :state state
    # @option opts [String] :vat_id vatId
    # @option opts [String] :zip zip
    # @return [Array<(APIUser, Fixnum, Hash)>] APIUser data, response status code and response headers
    def activate_using_post_with_http_info(email, key, password, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: UsersApi.activate_using_post ...'
      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 UsersApi.activate_using_post"
      end
      # verify the required parameter 'key' is set
      if @api_client.config.client_side_validation && key.nil?
        fail ArgumentError, "Missing the required parameter 'key' when calling UsersApi.activate_using_post"
      end
      # verify the required parameter 'password' is set
      if @api_client.config.client_side_validation && password.nil?
        fail ArgumentError, "Missing the required parameter 'password' when calling UsersApi.activate_using_post"
      end
      # resource path
      local_var_path = '/api/v2/users/activate'

      # query parameters
      query_params = {}
      query_params[:'email'] = email
      query_params[:'key'] = key
      query_params[:'password'] = password
      query_params[:'address'] = opts[:'address'] if !opts[:'address'].nil?
      query_params[:'city'] = opts[:'city'] if !opts[:'city'].nil?
      query_params[:'country'] = opts[:'country'] if !opts[:'country'].nil?
      query_params[:'firstName'] = opts[:'first_name'] if !opts[:'first_name'].nil?
      query_params[:'lastName'] = opts[:'last_name'] if !opts[:'last_name'].nil?
      query_params[:'organization'] = opts[:'organization'] if !opts[:'organization'].nil?
      query_params[:'phone'] = opts[:'phone'] if !opts[:'phone'].nil?
      query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil?
      query_params[:'vatId'] = opts[:'vat_id'] if !opts[:'vat_id'].nil?
      query_params[:'zip'] = opts[:'zip'] if !opts[:'zip'].nil?

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['*/*'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['apiKeyInHeader', 'oAuth2']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'APIUser')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: UsersApi#activate_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
    # Add additional user.
    # @param email email
    # @param user_id userId
    # @param [Hash] opts the optional parameters
    # @option opts [String] :password password
    # @return [APIUser]
    def add_additional_user_using_post(email, user_id, opts = {})
      data, _status_code, _headers = add_additional_user_using_post_with_http_info(email, user_id, opts)
      data
    end

    # Add additional user.
    # @param email email
    # @param user_id userId
    # @param [Hash] opts the optional parameters
    # @option opts [String] :password password
    # @return [Array<(APIUser, Fixnum, Hash)>] APIUser data, response status code and response headers
    def add_additional_user_using_post_with_http_info(email, user_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: UsersApi.add_additional_user_using_post ...'
      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 UsersApi.add_additional_user_using_post"
      end
      # verify the required parameter 'user_id' is set
      if @api_client.config.client_side_validation && user_id.nil?
        fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.add_additional_user_using_post"
      end
      # resource path
      local_var_path = '/api/v2/users/{userId}/account/additional-users'.sub('{' + 'userId' + '}', user_id.to_s)

      # query parameters
      query_params = {}
      query_params[:'email'] = email
      query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['*/*'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['apiKeyInHeader', 'oAuth2']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'APIUser')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: UsersApi#add_additional_user_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
    # Create feedback email.
    # @param content content
    # @param user_id userId
    # @param [Hash] opts the optional parameters
    # @option opts [File] :file file
    # @return [nil]
    def create_feedback_form_email_using_post(content, user_id, opts = {})
      create_feedback_form_email_using_post_with_http_info(content, user_id, opts)
      nil
    end

    # Create feedback email.
    # @param content content
    # @param user_id userId
    # @param [Hash] opts the optional parameters
    # @option opts [File] :file file
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def create_feedback_form_email_using_post_with_http_info(content, user_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: UsersApi.create_feedback_form_email_using_post ...'
      end
      # verify the required parameter 'content' is set
      if @api_client.config.client_side_validation && content.nil?
        fail ArgumentError, "Missing the required parameter 'content' when calling UsersApi.create_feedback_form_email_using_post"
      end
      # verify the required parameter 'user_id' is set
      if @api_client.config.client_side_validation && user_id.nil?
        fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.create_feedback_form_email_using_post"
      end
      # resource path
      local_var_path = '/api/v2/users/{userId}/feedback'.sub('{' + 'userId' + '}', user_id.to_s)

      # query parameters
      query_params = {}
      query_params[:'content'] = content

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['*/*'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

      # form parameters
      form_params = {}
      form_params['file'] = opts[:'file'] if !opts[:'file'].nil?

      # http body (model)
      post_body = nil
      auth_names = ['apiKeyInHeader', 'oAuth2']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: UsersApi#create_feedback_form_email_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
    # Delete user.
    # @param password password
    # @param user_id userId
    # @param [Hash] opts the optional parameters
    # @return [APIUser]
    def delete_user_using_post(password, user_id, opts = {})
      data, _status_code, _headers = delete_user_using_post_with_http_info(password, user_id, opts)
      data
    end

    # Delete user.
    # @param password password
    # @param user_id userId
    # @param [Hash] opts the optional parameters
    # @return [Array<(APIUser, Fixnum, Hash)>] APIUser data, response status code and response headers
    def delete_user_using_post_with_http_info(password, user_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: UsersApi.delete_user_using_post ...'
      end
      # verify the required parameter 'password' is set
      if @api_client.config.client_side_validation && password.nil?
        fail ArgumentError, "Missing the required parameter 'password' when calling UsersApi.delete_user_using_post"
      end
      # verify the required parameter 'user_id' is set
      if @api_client.config.client_side_validation && user_id.nil?
        fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_user_using_post"
      end
      # resource path
      local_var_path = '/api/v2/users/{userId}/delete'.sub('{' + 'userId' + '}', user_id.to_s)

      # query parameters
      query_params = {}
      query_params[:'password'] = password

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['*/*'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['apiKeyInHeader', 'oAuth2']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'APIUser')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: UsersApi#delete_user_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
    # Disable additional user.
    # @param additional_user_id additionalUserId
    # @param user_id userId
    # @param [Hash] opts the optional parameters
    # @return [APIUser]
    def disable_additional_user_using_delete(additional_user_id, user_id, opts = {})
      data, _status_code, _headers = disable_additional_user_using_delete_with_http_info(additional_user_id, user_id, opts)
      data
    end

    # Disable additional user.
    # @param additional_user_id additionalUserId
    # @param user_id userId
    # @param [Hash] opts the optional parameters
    # @return [Array<(APIUser, Fixnum, Hash)>] APIUser data, response status code and response headers
    def disable_additional_user_using_delete_with_http_info(additional_user_id, user_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: UsersApi.disable_additional_user_using_delete ...'
      end
      # verify the required parameter 'additional_user_id' is set
      if @api_client.config.client_side_validation && additional_user_id.nil?
        fail ArgumentError, "Missing the required parameter 'additional_user_id' when calling UsersApi.disable_additional_user_using_delete"
      end
      # verify the required parameter 'user_id' is set
      if @api_client.config.client_side_validation && user_id.nil?
        fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.disable_additional_user_using_delete"
      end
      # resource path
      local_var_path = '/api/v2/users/{userId}/account/additional-users/{additionalUserId}'.sub('{' + 'additionalUserId' + '}', additional_user_id.to_s).sub('{' + 'userId' + '}', user_id.to_s)

      # query parameters
      query_params = {}

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

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['apiKeyInHeader', 'oAuth2']
      data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'APIUser')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: UsersApi#disable_additional_user_using_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
    # Enable additional user.
    # @param additional_user_id additionalUserId
    # @param user_id userId
    # @param [Hash] opts the optional parameters
    # @return [APIUser]
    def enable_additional_user_using_post(additional_user_id, user_id, opts = {})
      data, _status_code, _headers = enable_additional_user_using_post_with_http_info(additional_user_id, user_id, opts)
      data
    end

    # Enable additional user.
    # @param additional_user_id additionalUserId
    # @param user_id userId
    # @param [Hash] opts the optional parameters
    # @return [Array<(APIUser, Fixnum, Hash)>] APIUser data, response status code and response headers
    def enable_additional_user_using_post_with_http_info(additional_user_id, user_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: UsersApi.enable_additional_user_using_post ...'
      end
      # verify the required parameter 'additional_user_id' is set
      if @api_client.config.client_side_validation && additional_user_id.nil?
        fail ArgumentError, "Missing the required parameter 'additional_user_id' when calling UsersApi.enable_additional_user_using_post"
      end
      # verify the required parameter 'user_id' is set
      if @api_client.config.client_side_validation && user_id.nil?
        fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.enable_additional_user_using_post"
      end
      # resource path
      local_var_path = '/api/v2/users/{userId}/account/additional-users/{additionalUserId}'.sub('{' + 'additionalUserId' + '}', additional_user_id.to_s).sub('{' + 'userId' + '}', user_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['*/*'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['apiKeyInHeader', 'oAuth2']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'APIUser')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: UsersApi#enable_additional_user_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
    # Generate recovery key.
    # @param email email
    # @param [Hash] opts the optional parameters
    # @return [APIMessage]
    def generate_recovery_key_for_user_using_post(email, opts = {})
      data, _status_code, _headers = generate_recovery_key_for_user_using_post_with_http_info(email, opts)
      data
    end

    # Generate recovery key.
    # @param email email
    # @param [Hash] opts the optional parameters
    # @return [Array<(APIMessage, Fixnum, Hash)>] APIMessage data, response status code and response headers
    def generate_recovery_key_for_user_using_post_with_http_info(email, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: UsersApi.generate_recovery_key_for_user_using_post ...'
      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 UsersApi.generate_recovery_key_for_user_using_post"
      end
      # resource path
      local_var_path = '/api/v2/users/recoveries'

      # query parameters
      query_params = {}
      query_params[:'email'] = email

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['*/*'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['apiKeyInHeader', 'oAuth2']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'APIMessage')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: UsersApi#generate_recovery_key_for_user_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
    # Get account.
    # @param user_id userId
    # @param [Hash] opts the optional parameters
    # @return [APIAccount]
    def get_account_using_get(user_id, opts = {})
      data, _status_code, _headers = get_account_using_get_with_http_info(user_id, opts)
      data
    end

    # Get account.
    # @param user_id userId
    # @param [Hash] opts the optional parameters
    # @return [Array<(APIAccount, Fixnum, Hash)>] APIAccount data, response status code and response headers
    def get_account_using_get_with_http_info(user_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: UsersApi.get_account_using_get ...'
      end
      # verify the required parameter 'user_id' is set
      if @api_client.config.client_side_validation && user_id.nil?
        fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_account_using_get"
      end
      # resource path
      local_var_path = '/api/v2/users/{userId}/account'.sub('{' + 'userId' + '}', user_id.to_s)

      # query parameters
      query_params = {}

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

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['apiKeyInHeader', 'oAuth2']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'APIAccount')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: UsersApi#get_account_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
    # Get additional users.
    # @param user_id userId
    # @param [Hash] opts the optional parameters
    # @option opts [String] :filter filter parameter contains list of fields used for filter query result &lt;br&gt; examples: &lt;br&gt; filter&#x3D;lastname_eq_value&lt;br&gt;filter&#x3D;country_eq_value&lt;br&gt;filter&#x3D;code_eq_value&lt;br&gt;filter&#x3D;address_eq_value&lt;br&gt;filter&#x3D;lastlaunchedtesttime_eq_1593583748368&lt;br&gt;filter&#x3D;city_eq_value&lt;br&gt;filter&#x3D;vatid_eq_value&lt;br&gt;filter&#x3D;timezone_eq_value&lt;br&gt;filter&#x3D;mainuseremail_eq_value&lt;br&gt;filter&#x3D;lastlogintime_eq_1593583748368&lt;br&gt;filter&#x3D;firstname_eq_value&lt;br&gt;filter&#x3D;accountid_eq_1&lt;br&gt;filter&#x3D;serviceids_eq_1&lt;br&gt;filter&#x3D;mainuserid_eq_1&lt;br&gt;filter&#x3D;phone_eq_value&lt;br&gt;filter&#x3D;deletetime_eq_1593583748368&lt;br&gt;filter&#x3D;createtime_eq_1593583748368&lt;br&gt;filter&#x3D;accountserviceids_eq_1&lt;br&gt;filter&#x3D;organization_eq_value&lt;br&gt;filter&#x3D;ismainuser_eq_true&lt;br&gt;filter&#x3D;state_eq_value&lt;br&gt;filter&#x3D;id_eq_1&lt;br&gt;filter&#x3D;email_eq_value&lt;br&gt;filter&#x3D;status_eq_inactive
    # @option opts [Integer] :limit limit parameter define page size (default to 20)
    # @option opts [Integer] :offset offset parameter define page number (default to 0)
    # @option opts [String] :sort sort parameter contains list of fields used for sort query result &lt;br&gt; examples: &lt;br&gt; sort&#x3D;lastName_a&lt;br&gt;sort&#x3D;country_a&lt;br&gt;sort&#x3D;code_a&lt;br&gt;sort&#x3D;address_a&lt;br&gt;sort&#x3D;lastLaunchedTestTime_a&lt;br&gt;sort&#x3D;city_a&lt;br&gt;sort&#x3D;vatId_a&lt;br&gt;sort&#x3D;timeZone_a&lt;br&gt;sort&#x3D;mainUserEmail_a&lt;br&gt;sort&#x3D;lastLoginTime_a&lt;br&gt;sort&#x3D;firstName_a&lt;br&gt;sort&#x3D;accountId_a&lt;br&gt;sort&#x3D;serviceIds_a&lt;br&gt;sort&#x3D;mainUserId_a&lt;br&gt;sort&#x3D;phone_a&lt;br&gt;sort&#x3D;deleteTime_a&lt;br&gt;sort&#x3D;createTime_a&lt;br&gt;sort&#x3D;accountServiceIds_a&lt;br&gt;sort&#x3D;organization_a&lt;br&gt;sort&#x3D;state_a&lt;br&gt;sort&#x3D;id_a&lt;br&gt;sort&#x3D;email_a&lt;br&gt;sort&#x3D;status_a
    # @return [APIListOfAPIUser]
    def get_additional_users_using_get(user_id, opts = {})
      data, _status_code, _headers = get_additional_users_using_get_with_http_info(user_id, opts)
      data
    end

    # Get additional users.
    # @param user_id userId
    # @param [Hash] opts the optional parameters
    # @option opts [String] :filter filter parameter contains list of fields used for filter query result &lt;br&gt; examples: &lt;br&gt; filter&#x3D;lastname_eq_value&lt;br&gt;filter&#x3D;country_eq_value&lt;br&gt;filter&#x3D;code_eq_value&lt;br&gt;filter&#x3D;address_eq_value&lt;br&gt;filter&#x3D;lastlaunchedtesttime_eq_1593583748368&lt;br&gt;filter&#x3D;city_eq_value&lt;br&gt;filter&#x3D;vatid_eq_value&lt;br&gt;filter&#x3D;timezone_eq_value&lt;br&gt;filter&#x3D;mainuseremail_eq_value&lt;br&gt;filter&#x3D;lastlogintime_eq_1593583748368&lt;br&gt;filter&#x3D;firstname_eq_value&lt;br&gt;filter&#x3D;accountid_eq_1&lt;br&gt;filter&#x3D;serviceids_eq_1&lt;br&gt;filter&#x3D;mainuserid_eq_1&lt;br&gt;filter&#x3D;phone_eq_value&lt;br&gt;filter&#x3D;deletetime_eq_1593583748368&lt;br&gt;filter&#x3D;createtime_eq_1593583748368&lt;br&gt;filter&#x3D;accountserviceids_eq_1&lt;br&gt;filter&#x3D;organization_eq_value&lt;br&gt;filter&#x3D;ismainuser_eq_true&lt;br&gt;filter&#x3D;state_eq_value&lt;br&gt;filter&#x3D;id_eq_1&lt;br&gt;filter&#x3D;email_eq_value&lt;br&gt;filter&#x3D;status_eq_inactive
    # @option opts [Integer] :limit limit parameter define page size
    # @option opts [Integer] :offset offset parameter define page number
    # @option opts [String] :sort sort parameter contains list of fields used for sort query result &lt;br&gt; examples: &lt;br&gt; sort&#x3D;lastName_a&lt;br&gt;sort&#x3D;country_a&lt;br&gt;sort&#x3D;code_a&lt;br&gt;sort&#x3D;address_a&lt;br&gt;sort&#x3D;lastLaunchedTestTime_a&lt;br&gt;sort&#x3D;city_a&lt;br&gt;sort&#x3D;vatId_a&lt;br&gt;sort&#x3D;timeZone_a&lt;br&gt;sort&#x3D;mainUserEmail_a&lt;br&gt;sort&#x3D;lastLoginTime_a&lt;br&gt;sort&#x3D;firstName_a&lt;br&gt;sort&#x3D;accountId_a&lt;br&gt;sort&#x3D;serviceIds_a&lt;br&gt;sort&#x3D;mainUserId_a&lt;br&gt;sort&#x3D;phone_a&lt;br&gt;sort&#x3D;deleteTime_a&lt;br&gt;sort&#x3D;createTime_a&lt;br&gt;sort&#x3D;accountServiceIds_a&lt;br&gt;sort&#x3D;organization_a&lt;br&gt;sort&#x3D;state_a&lt;br&gt;sort&#x3D;id_a&lt;br&gt;sort&#x3D;email_a&lt;br&gt;sort&#x3D;status_a
    # @return [Array<(APIListOfAPIUser, Fixnum, Hash)>] APIListOfAPIUser data, response status code and response headers
    def get_additional_users_using_get_with_http_info(user_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: UsersApi.get_additional_users_using_get ...'
      end
      # verify the required parameter 'user_id' is set
      if @api_client.config.client_side_validation && user_id.nil?
        fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_additional_users_using_get"
      end
      # resource path
      local_var_path = '/api/v2/users/{userId}/account/additional-users'.sub('{' + 'userId' + '}', user_id.to_s)

      # query parameters
      query_params = {}
      query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
      query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
      query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
      query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?

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

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['apiKeyInHeader', 'oAuth2']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'APIListOfAPIUser')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: UsersApi#get_additional_users_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
    # Get user by recovery key.
    # @param recovery_key recoveryKey
    # @param [Hash] opts the optional parameters
    # @return [APIUser]
    def get_user_by_recovery_key_using_get(recovery_key, opts = {})
      data, _status_code, _headers = get_user_by_recovery_key_using_get_with_http_info(recovery_key, opts)
      data
    end

    # Get user by recovery key.
    # @param recovery_key recoveryKey
    # @param [Hash] opts the optional parameters
    # @return [Array<(APIUser, Fixnum, Hash)>] APIUser data, response status code and response headers
    def get_user_by_recovery_key_using_get_with_http_info(recovery_key, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: UsersApi.get_user_by_recovery_key_using_get ...'
      end
      # verify the required parameter 'recovery_key' is set
      if @api_client.config.client_side_validation && recovery_key.nil?
        fail ArgumentError, "Missing the required parameter 'recovery_key' when calling UsersApi.get_user_by_recovery_key_using_get"
      end
      # resource path
      local_var_path = '/api/v2/users/recoveries'

      # query parameters
      query_params = {}
      query_params[:'recoveryKey'] = recovery_key

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

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['apiKeyInHeader', 'oAuth2']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'APIUser')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: UsersApi#get_user_by_recovery_key_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
    # Get user.
    # @param user_id userId
    # @param [Hash] opts the optional parameters
    # @return [APIUser]
    def get_user_using_get2(user_id, opts = {})
      data, _status_code, _headers = get_user_using_get2_with_http_info(user_id, opts)
      data
    end

    # Get user.
    # @param user_id userId
    # @param [Hash] opts the optional parameters
    # @return [Array<(APIUser, Fixnum, Hash)>] APIUser data, response status code and response headers
    def get_user_using_get2_with_http_info(user_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: UsersApi.get_user_using_get2 ...'
      end
      # verify the required parameter 'user_id' is set
      if @api_client.config.client_side_validation && user_id.nil?
        fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_using_get2"
      end
      # resource path
      local_var_path = '/api/v2/users/{userId}'.sub('{' + 'userId' + '}', user_id.to_s)

      # query parameters
      query_params = {}

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

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['apiKeyInHeader', 'oAuth2']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'APIUser')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: UsersApi#get_user_using_get2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
    # Load user preferences.
    # @param user_id userId
    # @param [Hash] opts the optional parameters
    # @return [APIUserPreference]
    def load_user_preferences_using_get(user_id, opts = {})
      data, _status_code, _headers = load_user_preferences_using_get_with_http_info(user_id, opts)
      data
    end

    # Load user preferences.
    # @param user_id userId
    # @param [Hash] opts the optional parameters
    # @return [Array<(APIUserPreference, Fixnum, Hash)>] APIUserPreference data, response status code and response headers
    def load_user_preferences_using_get_with_http_info(user_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: UsersApi.load_user_preferences_using_get ...'
      end
      # verify the required parameter 'user_id' is set
      if @api_client.config.client_side_validation && user_id.nil?
        fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.load_user_preferences_using_get"
      end
      # resource path
      local_var_path = '/api/v2/users/{userId}/preferences'.sub('{' + 'userId' + '}', user_id.to_s)

      # query parameters
      query_params = {}

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

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['apiKeyInHeader', 'oAuth2']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'APIUserPreference')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: UsersApi#load_user_preferences_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
    # Load ui preferences.
    # @param user_id userId
    # @param [Hash] opts the optional parameters
    # @return [String]
    def load_user_ui_preferences_using_get(user_id, opts = {})
      data, _status_code, _headers = load_user_ui_preferences_using_get_with_http_info(user_id, opts)
      data
    end

    # Load ui preferences.
    # @param user_id userId
    # @param [Hash] opts the optional parameters
    # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
    def load_user_ui_preferences_using_get_with_http_info(user_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: UsersApi.load_user_ui_preferences_using_get ...'
      end
      # verify the required parameter 'user_id' is set
      if @api_client.config.client_side_validation && user_id.nil?
        fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.load_user_ui_preferences_using_get"
      end
      # resource path
      local_var_path = '/api/v2/users/{userId}/ui-preferences'.sub('{' + 'userId' + '}', user_id.to_s)

      # query parameters
      query_params = {}

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

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['apiKeyInHeader', 'oAuth2']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'String')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: UsersApi#load_user_ui_preferences_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
    # Set new password after recovery.
    # @param key key
    # @param password password
    # @param [Hash] opts the optional parameters
    # @return [APIUser]
    def recover_password_using_post(key, password, opts = {})
      data, _status_code, _headers = recover_password_using_post_with_http_info(key, password, opts)
      data
    end

    # Set new password after recovery.
    # @param key key
    # @param password password
    # @param [Hash] opts the optional parameters
    # @return [Array<(APIUser, Fixnum, Hash)>] APIUser data, response status code and response headers
    def recover_password_using_post_with_http_info(key, password, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: UsersApi.recover_password_using_post ...'
      end
      # verify the required parameter 'key' is set
      if @api_client.config.client_side_validation && key.nil?
        fail ArgumentError, "Missing the required parameter 'key' when calling UsersApi.recover_password_using_post"
      end
      # verify the required parameter 'password' is set
      if @api_client.config.client_side_validation && password.nil?
        fail ArgumentError, "Missing the required parameter 'password' when calling UsersApi.recover_password_using_post"
      end
      # resource path
      local_var_path = '/api/v2/users/password-recovery'

      # query parameters
      query_params = {}
      query_params[:'key'] = key
      query_params[:'password'] = password

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['*/*'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['apiKeyInHeader', 'oAuth2']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'APIUser')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: UsersApi#recover_password_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
    # Register new user.
    # @param email email
    # @param [Hash] opts the optional parameters
    # @return [nil]
    def register_using_post1(email, opts = {})
      register_using_post1_with_http_info(email, opts)
      nil
    end

    # Register new user.
    # @param email email
    # @param [Hash] opts the optional parameters
    # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
    def register_using_post1_with_http_info(email, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: UsersApi.register_using_post1 ...'
      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 UsersApi.register_using_post1"
      end
      # resource path
      local_var_path = '/api/v2/users'

      # query parameters
      query_params = {}
      query_params[:'email'] = email

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['*/*'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['apiKeyInHeader', 'oAuth2']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: UsersApi#register_using_post1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
    # Reset api key.
    # @param user_id userId
    # @param [Hash] opts the optional parameters
    # @return [APIUser]
    def reset_api_key_using_post(user_id, opts = {})
      data, _status_code, _headers = reset_api_key_using_post_with_http_info(user_id, opts)
      data
    end

    # Reset api key.
    # @param user_id userId
    # @param [Hash] opts the optional parameters
    # @return [Array<(APIUser, Fixnum, Hash)>] APIUser data, response status code and response headers
    def reset_api_key_using_post_with_http_info(user_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: UsersApi.reset_api_key_using_post ...'
      end
      # verify the required parameter 'user_id' is set
      if @api_client.config.client_side_validation && user_id.nil?
        fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.reset_api_key_using_post"
      end
      # resource path
      local_var_path = '/api/v2/users/{userId}/reset-api-key'.sub('{' + 'userId' + '}', user_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['*/*'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['apiKeyInHeader', 'oAuth2']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'APIUser')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: UsersApi#reset_api_key_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
    # Restore user requested to be deleted.
    # @param user_id userId
    # @param [Hash] opts the optional parameters
    # @return [APIUser]
    def restore_user_using_post(user_id, opts = {})
      data, _status_code, _headers = restore_user_using_post_with_http_info(user_id, opts)
      data
    end

    # Restore user requested to be deleted.
    # @param user_id userId
    # @param [Hash] opts the optional parameters
    # @return [Array<(APIUser, Fixnum, Hash)>] APIUser data, response status code and response headers
    def restore_user_using_post_with_http_info(user_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: UsersApi.restore_user_using_post ...'
      end
      # verify the required parameter 'user_id' is set
      if @api_client.config.client_side_validation && user_id.nil?
        fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.restore_user_using_post"
      end
      # resource path
      local_var_path = '/api/v2/users/{userId}/restore'.sub('{' + 'userId' + '}', user_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['*/*'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['apiKeyInHeader', 'oAuth2']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'APIUser')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: UsersApi#restore_user_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
    # Store user preferences.
    # @param preference preference
    # @param user_id userId
    # @param [Hash] opts the optional parameters
    # @return [APIUserPreference]
    def store_user_preferences_using_post(preference, user_id, opts = {})
      data, _status_code, _headers = store_user_preferences_using_post_with_http_info(preference, user_id, opts)
      data
    end

    # Store user preferences.
    # @param preference preference
    # @param user_id userId
    # @param [Hash] opts the optional parameters
    # @return [Array<(APIUserPreference, Fixnum, Hash)>] APIUserPreference data, response status code and response headers
    def store_user_preferences_using_post_with_http_info(preference, user_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: UsersApi.store_user_preferences_using_post ...'
      end
      # verify the required parameter 'preference' is set
      if @api_client.config.client_side_validation && preference.nil?
        fail ArgumentError, "Missing the required parameter 'preference' when calling UsersApi.store_user_preferences_using_post"
      end
      # verify the required parameter 'user_id' is set
      if @api_client.config.client_side_validation && user_id.nil?
        fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.store_user_preferences_using_post"
      end
      # resource path
      local_var_path = '/api/v2/users/{userId}/preferences'.sub('{' + 'userId' + '}', user_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['*/*'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(preference)
      auth_names = ['apiKeyInHeader', 'oAuth2']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'APIUserPreference')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: UsersApi#store_user_preferences_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
    # Store ui preferences.
    # @param data data
    # @param user_id userId
    # @param [Hash] opts the optional parameters
    # @return [String]
    def store_user_ui_preferences_using_post(data, user_id, opts = {})
      data, _status_code, _headers = store_user_ui_preferences_using_post_with_http_info(data, user_id, opts)
      data
    end

    # Store ui preferences.
    # @param data data
    # @param user_id userId
    # @param [Hash] opts the optional parameters
    # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
    def store_user_ui_preferences_using_post_with_http_info(data, user_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: UsersApi.store_user_ui_preferences_using_post ...'
      end
      # verify the required parameter 'data' is set
      if @api_client.config.client_side_validation && data.nil?
        fail ArgumentError, "Missing the required parameter 'data' when calling UsersApi.store_user_ui_preferences_using_post"
      end
      # verify the required parameter 'user_id' is set
      if @api_client.config.client_side_validation && user_id.nil?
        fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.store_user_ui_preferences_using_post"
      end
      # resource path
      local_var_path = '/api/v2/users/{userId}/ui-preferences'.sub('{' + 'userId' + '}', user_id.to_s)

      # query parameters
      query_params = {}
      query_params[:'data'] = data

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['*/*'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['apiKeyInHeader', 'oAuth2']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'String')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: UsersApi#store_user_ui_preferences_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
    # Update user.
    # @param user_id userId
    # @param [Hash] opts the optional parameters
    # @option opts [String] :address address
    # @option opts [String] :city city
    # @option opts [String] :code code
    # @option opts [String] :confirm_password confirmPassword
    # @option opts [String] :email email
    # @option opts [String] :first_name firstName
    # @option opts [String] :last_name lastName
    # @option opts [String] :locale_country localeCountry
    # @option opts [String] :mfa_code mfaCode
    # @option opts [BOOLEAN] :mfa_enabled mfaEnabled
    # @option opts [String] :new_password newPassword
    # @option opts [String] :organization organization
    # @option opts [String] :password password
    # @option opts [String] :phone phone
    # @option opts [String] :state state
    # @option opts [String] :time_zone timeZone
    # @option opts [String] :vat_id vatId
    # @return [APIUser]
    def update_user_using_post(user_id, opts = {})
      data, _status_code, _headers = update_user_using_post_with_http_info(user_id, opts)
      data
    end

    # Update user.
    # @param user_id userId
    # @param [Hash] opts the optional parameters
    # @option opts [String] :address address
    # @option opts [String] :city city
    # @option opts [String] :code code
    # @option opts [String] :confirm_password confirmPassword
    # @option opts [String] :email email
    # @option opts [String] :first_name firstName
    # @option opts [String] :last_name lastName
    # @option opts [String] :locale_country localeCountry
    # @option opts [String] :mfa_code mfaCode
    # @option opts [BOOLEAN] :mfa_enabled mfaEnabled
    # @option opts [String] :new_password newPassword
    # @option opts [String] :organization organization
    # @option opts [String] :password password
    # @option opts [String] :phone phone
    # @option opts [String] :state state
    # @option opts [String] :time_zone timeZone
    # @option opts [String] :vat_id vatId
    # @return [Array<(APIUser, Fixnum, Hash)>] APIUser data, response status code and response headers
    def update_user_using_post_with_http_info(user_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: UsersApi.update_user_using_post ...'
      end
      # verify the required parameter 'user_id' is set
      if @api_client.config.client_side_validation && user_id.nil?
        fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.update_user_using_post"
      end
      # resource path
      local_var_path = '/api/v2/users/{userId}'.sub('{' + 'userId' + '}', user_id.to_s)

      # query parameters
      query_params = {}
      query_params[:'address'] = opts[:'address'] if !opts[:'address'].nil?
      query_params[:'city'] = opts[:'city'] if !opts[:'city'].nil?
      query_params[:'code'] = opts[:'code'] if !opts[:'code'].nil?
      query_params[:'confirmPassword'] = opts[:'confirm_password'] if !opts[:'confirm_password'].nil?
      query_params[:'email'] = opts[:'email'] if !opts[:'email'].nil?
      query_params[:'firstName'] = opts[:'first_name'] if !opts[:'first_name'].nil?
      query_params[:'lastName'] = opts[:'last_name'] if !opts[:'last_name'].nil?
      query_params[:'localeCountry'] = opts[:'locale_country'] if !opts[:'locale_country'].nil?
      query_params[:'mfaCode'] = opts[:'mfa_code'] if !opts[:'mfa_code'].nil?
      query_params[:'mfaEnabled'] = opts[:'mfa_enabled'] if !opts[:'mfa_enabled'].nil?
      query_params[:'newPassword'] = opts[:'new_password'] if !opts[:'new_password'].nil?
      query_params[:'organization'] = opts[:'organization'] if !opts[:'organization'].nil?
      query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?
      query_params[:'phone'] = opts[:'phone'] if !opts[:'phone'].nil?
      query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil?
      query_params[:'timeZone'] = opts[:'time_zone'] if !opts[:'time_zone'].nil?
      query_params[:'vatId'] = opts[:'vat_id'] if !opts[:'vat_id'].nil?

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['*/*'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['apiKeyInHeader', 'oAuth2']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'APIUser')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: UsersApi#update_user_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
    # Validate EU VAT ID.
    # @param country_code countryCode
    # @param vat_id vatId
    # @param [Hash] opts the optional parameters
    # @return [Hash<String, String>]
    def validate_vat_id_using_get(country_code, vat_id, opts = {})
      data, _status_code, _headers = validate_vat_id_using_get_with_http_info(country_code, vat_id, opts)
      data
    end

    # Validate EU VAT ID.
    # @param country_code countryCode
    # @param vat_id vatId
    # @param [Hash] opts the optional parameters
    # @return [Array<(Hash<String, String>, Fixnum, Hash)>] Hash<String, String> data, response status code and response headers
    def validate_vat_id_using_get_with_http_info(country_code, vat_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: UsersApi.validate_vat_id_using_get ...'
      end
      # verify the required parameter 'country_code' is set
      if @api_client.config.client_side_validation && country_code.nil?
        fail ArgumentError, "Missing the required parameter 'country_code' when calling UsersApi.validate_vat_id_using_get"
      end
      # verify the required parameter 'vat_id' is set
      if @api_client.config.client_side_validation && vat_id.nil?
        fail ArgumentError, "Missing the required parameter 'vat_id' when calling UsersApi.validate_vat_id_using_get"
      end
      # resource path
      local_var_path = '/api/v2/users/validateVatId'

      # query parameters
      query_params = {}
      query_params[:'countryCode'] = country_code
      query_params[:'vatId'] = vat_id

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

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['apiKeyInHeader', 'oAuth2']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'Hash<String, String>')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: UsersApi#validate_vat_id_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
  end
end
