lib/velopayments/api/users_api.rb
# List Users
# Get a paginated response listing the Users
# @param [Hash] opts the optional parameters
# @option opts [UserType] :type The Type of the User.
# @option opts [UserStatus] :status The status of the User.
# @option opts [String] :entity_id The entityId of the User.
# @option opts [Integer] :page Page number. Default is 1.
# @option opts [Integer] :page_size The number of results to return in a page
# @option opts [String] :sort List of sort fields (e.g. ?sort&#x3D;email:asc,lastName:asc) Default is email:asc &#39;name&#39; The supported sort fields are - email, lastNmae. 
# @return [Array<(PagedUserResponse, Integer, Hash)>] PagedUserResponse data, response status code and response headers
List Users
Get a paginated response listing the Users
List Users Get a paginated response listing the Users
def list_users_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: UsersApi.list_users ...'
      end
      if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
        fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling UsersApi.list_users, must be smaller than or equal to 100.'
      end
      if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
        fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling UsersApi.list_users, must be greater than or equal to 1.'
      end
      pattern = Regexp.new(/[a-zA-Z]+[:desc|:asc]/)
      if @api_client.config.client_side_validation && !opts[:'sort'].nil? && opts[:'sort'] !~ pattern
        fail ArgumentError, "invalid value for 'opts[:\"sort\"]' when calling UsersApi.list_users, must conform to the pattern #{pattern}."
      end
      local_var_path = '/v2/users'
      query_params = opts[:query_params] || {}
      query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
      query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
      query_params[:'entityId'] = opts[:'entity_id'] if !opts[:'entity_id'].nil?
      query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
      query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
      query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
      header_params = opts[:header_params] || {}
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      form_params = opts[:form_params] || {}
      post_body = opts[:debug_body]
      return_type = opts[:debug_return_type] || 'PagedUserResponse'
      auth_names = opts[:debug_auth_names] || ['OAuth2']
      new_options = opts.merge(
        :operation => :"UsersApi.list_users",
        :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: UsersApi#list_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def list_users_with_http_info ( opts = { } ) if @api_client . config . debugging @api_client . config . logger . debug 'Calling API: UsersApi.list_users ...' end if @api_client . config . client_side_validation && ! opts [ :' page_size ' ] . nil? && opts [ :' page_size ' ] > 100 fail ArgumentError , 'invalid value for "opts[:"page_size"]" when calling UsersApi.list_users, must be smaller than or equal to 100.' end if @api_client . config . client_side_validation && ! opts [ :' page_size ' ] . nil? && opts [ :' page_size ' ] < 1 fail ArgumentError , 'invalid value for "opts[:"page_size"]" when calling UsersApi.list_users, must be greater than or equal to 1.' end pattern = Regexp . new ( / [a-zA-Z]+[:desc|:asc] / ) if @api_client . config . client_side_validation && ! opts [ :' sort ' ] . nil? && opts [ :' sort ' ] !~ pattern fail ArgumentError , "invalid value for 'opts[:\"sort\"]' when calling UsersApi.list_users, must conform to the pattern #{pattern}." end local_var_path = '/v2/users' query_params = opts [ :query_params ] || { } query_params [ :' type ' ] = opts [ :' type ' ] if ! opts [ :' type ' ] . nil? query_params [ :' status ' ] = opts [ :' status ' ] if ! opts [ :' status ' ] . nil? query_params [ :' entityId ' ] = opts [ :' entity_id ' ] if ! opts [ :' entity_id ' ] . nil? query_params [ :' page ' ] = opts [ :' page ' ] if ! opts [ :' page ' ] . nil? query_params [ :' pageSize ' ] = opts [ :' page_size ' ] if ! opts [ :' page_size ' ] . nil? query_params [ :' sort ' ] = opts [ :' sort ' ] if ! opts [ :' sort ' ] . nil? header_params = opts [ :header_params ] || { } header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] ) form_params = opts [ :form_params ] || { } post_body = opts [ :debug_body ] return_type = opts [ :debug_return_type ] || 'PagedUserResponse' auth_names = opts [ :debug_auth_names ] || [ 'OAuth2' ] new_options = opts . merge ( :operation => :" UsersApi.list_users " , :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: UsersApi#list_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
List Users
Get a paginated response listing the Users
List Users Get a paginated response listing the Users
# resource path # query parameters # header parameters # HTTP header 'Accept' (if needed) # form parameters # http body (model) # return_type # auth_names
PagedUserResponse data, response status code and response headers
PagedUserResponse data response status code and response headers
Array<(PagedUserResponse, Integer, Hash)>
opts
:sort List of sort fields  Default is email:asc 'name' The supported sort fields are - email, lastNmae.
: sort List of sort fields Default is email : asc ' name ' The supported sort fields are - email lastNmae .
<not_specific>
opts the optional parameters
opts the optional parameters