class QwilAPI::UsersApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/qwil_api/api/users_api.rb, line 28
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

account_user_create(user_pk, account_number, name, routing_number, opts = {}) click to toggle source

The bank accounts for a specific User The bank accounts for a specific User. Enables create, retrieve, update (PUT/PATCH), destroy, and list.<br/>Note that the Account DB models are immutable, but the PUT/PATCH/DELETE API methods are still offered to allow users to modify/remove Accounts.<br/>The PUT/PATCH HTTP methods will create a new Account with the same data as the old one, and then apply the update to that new account. The old Account will be marked as deleted.<br/>NOTE: if you update an Account, it will get a new primary key, and therefore a new URL. You will need to extract the new URL from the body of the HTTP response to the update request.<br/>e.g. PATCH api.qwil.co/accounts/1/ {…} { "url": "https://api.qwil.co/accounts/2/", … }<br/>The DELETE HTTP method will cause Accounts to have the Account.deleted flag set to True, and such Accounts will not be displayed in the /users/<user_id>/accounts/ list.<br/>To view even deleted accounts, use the URL /users/<user_id>/accounts/?show_deleted=true<br/>Note that deleted Accounts can still be retrieved directly, e.g.<br/>GET api.qwil.co/accounts/1/ { … "deleted": "true", … } @param user_pk @param account_number @param name The user&#39;s label for this Account. @param routing_number The inter-bank routing nubmer for this Account. 8 or 9 digits in length. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :is_paypal Flag specifying if the Account is a Paypal account. @option opts [BOOLEAN] :is_mychoice Flag specifying if the Account is a MyChoice card. If it is, the mychoice_user_id and mychoice_card_id must be filled in. @option opts [Integer] :mychoice_user_id For MyChoice Accounts. Populated from the MyChoice API. @option opts [Integer] :mychoice_card_id For MyChoice Accounts. Populated from the MyChoice API. @return [UserAccountSerializer]

# File lib/qwil_api/api/users_api.rb, line 44
def account_user_create(user_pk, account_number, name, routing_number, opts = {})
  data, _status_code, _headers = account_user_create_with_http_info(user_pk, account_number, name, routing_number, opts)
  return data
end
account_user_create_with_http_info(user_pk, account_number, name, routing_number, opts = {}) click to toggle source

The bank accounts for a specific User The bank accounts for a specific User. Enables create, retrieve, update (PUT/PATCH), destroy, and list.&lt;br/&gt;Note that the Account DB models are immutable, but the PUT/PATCH/DELETE API methods are still offered to allow users to modify/remove Accounts.&lt;br/&gt;The PUT/PATCH HTTP methods will create a new Account with the same data as the old one, and then apply the update to that new account. The old Account will be marked as deleted.&lt;br/&gt;NOTE: if you update an Account, it will get a new primary key, and therefore a new URL. You will need to extract the new URL from the body of the HTTP response to the update request.&lt;br/&gt;e.g. PATCH api.qwil.co/accounts/1/ {…} { "url&quot;: "api.qwil.co/accounts/2/";, … }&lt;br/&gt;The DELETE HTTP method will cause Accounts to have the Account.deleted flag set to True, and such Accounts will not be displayed in the /users/&lt;user_id&gt;/accounts/ list.&lt;br/&gt;To view even deleted accounts, use the URL /users/&lt;user_id&gt;/accounts/?show_deleted&#x3D;true&lt;br/&gt;Note that deleted Accounts can still be retrieved directly, e.g.&lt;br/&gt;GET api.qwil.co/accounts/1/ { … "deleted&quot;: "true&quot;, … } @param user_pk @param account_number @param name The user&#39;s label for this Account. @param routing_number The inter-bank routing nubmer for this Account. 8 or 9 digits in length. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :is_paypal Flag specifying if the Account is a Paypal account. @option opts [BOOLEAN] :is_mychoice Flag specifying if the Account is a MyChoice card. If it is, the mychoice_user_id and mychoice_card_id must be filled in. @option opts [Integer] :mychoice_user_id For MyChoice Accounts. Populated from the MyChoice API. @option opts [Integer] :mychoice_card_id For MyChoice Accounts. Populated from the MyChoice API. @return [Array<(UserAccountSerializer, Fixnum, Hash)>] UserAccountSerializer data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 61
def account_user_create_with_http_info(user_pk, account_number, name, routing_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.account_user_create ..."
  end
  # verify the required parameter 'user_pk' is set
  fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.account_user_create" if user_pk.nil?
  # verify the required parameter 'account_number' is set
  fail ArgumentError, "Missing the required parameter 'account_number' when calling UsersApi.account_user_create" if account_number.nil?
  # verify the required parameter 'name' is set
  fail ArgumentError, "Missing the required parameter 'name' when calling UsersApi.account_user_create" if name.nil?
  # verify the required parameter 'routing_number' is set
  fail ArgumentError, "Missing the required parameter 'routing_number' when calling UsersApi.account_user_create" if routing_number.nil?
  # resource path
  local_var_path = "/users/{user_pk}/accounts/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  form_params["account_number"] = account_number
  form_params["name"] = name
  form_params["routing_number"] = routing_number
  form_params["is_paypal"] = opts[:'is_paypal'] if !opts[:'is_paypal'].nil?
  form_params["is_mychoice"] = opts[:'is_mychoice'] if !opts[:'is_mychoice'].nil?
  form_params["mychoice_user_id"] = opts[:'mychoice_user_id'] if !opts[:'mychoice_user_id'].nil?
  form_params["mychoice_card_id"] = opts[:'mychoice_card_id'] if !opts[:'mychoice_card_id'].nil?

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'UserAccountSerializer')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#account_user_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
account_user_destroy(user_pk, pk, opts = {}) click to toggle source

The bank accounts for a specific User The bank accounts for a specific User. Enables create, retrieve, update (PUT/PATCH), destroy, and list.<br/>Note that the Account DB models are immutable, but the PUT/PATCH/DELETE API methods are still offered to allow users to modify/remove Accounts.<br/>The PUT/PATCH HTTP methods will create a new Account with the same data as the old one, and then apply the update to that new account. The old Account will be marked as deleted.<br/>NOTE: if you update an Account, it will get a new primary key, and therefore a new URL. You will need to extract the new URL from the body of the HTTP response to the update request.<br/>e.g. PATCH api.qwil.co/accounts/1/ {…} { "url": "https://api.qwil.co/accounts/2/", … }<br/>The DELETE HTTP method will cause Accounts to have the Account.deleted flag set to True, and such Accounts will not be displayed in the /users/<user_id>/accounts/ list.<br/>To view even deleted accounts, use the URL /users/<user_id>/accounts/?show_deleted=true<br/>Note that deleted Accounts can still be retrieved directly, e.g.<br/>GET api.qwil.co/accounts/1/ { … "deleted": "true", … } @param user_pk @param pk @param [Hash] opts the optional parameters @return [UserAccountSerializer]

# File lib/qwil_api/api/users_api.rb, line 122
def account_user_destroy(user_pk, pk, opts = {})
  data, _status_code, _headers = account_user_destroy_with_http_info(user_pk, pk, opts)
  return data
end
account_user_destroy_with_http_info(user_pk, pk, opts = {}) click to toggle source

The bank accounts for a specific User The bank accounts for a specific User. Enables create, retrieve, update (PUT/PATCH), destroy, and list.&lt;br/&gt;Note that the Account DB models are immutable, but the PUT/PATCH/DELETE API methods are still offered to allow users to modify/remove Accounts.&lt;br/&gt;The PUT/PATCH HTTP methods will create a new Account with the same data as the old one, and then apply the update to that new account. The old Account will be marked as deleted.&lt;br/&gt;NOTE: if you update an Account, it will get a new primary key, and therefore a new URL. You will need to extract the new URL from the body of the HTTP response to the update request.&lt;br/&gt;e.g. PATCH api.qwil.co/accounts/1/ {…} { "url&quot;: "api.qwil.co/accounts/2/";, … }&lt;br/&gt;The DELETE HTTP method will cause Accounts to have the Account.deleted flag set to True, and such Accounts will not be displayed in the /users/&lt;user_id&gt;/accounts/ list.&lt;br/&gt;To view even deleted accounts, use the URL /users/&lt;user_id&gt;/accounts/?show_deleted&#x3D;true&lt;br/&gt;Note that deleted Accounts can still be retrieved directly, e.g.&lt;br/&gt;GET api.qwil.co/accounts/1/ { … "deleted&quot;: "true&quot;, … } @param user_pk @param pk @param [Hash] opts the optional parameters @return [Array<(UserAccountSerializer, Fixnum, Hash)>] UserAccountSerializer data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 133
def account_user_destroy_with_http_info(user_pk, pk, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.account_user_destroy ..."
  end
  # verify the required parameter 'user_pk' is set
  fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.account_user_destroy" if user_pk.nil?
  # verify the required parameter 'pk' is set
  fail ArgumentError, "Missing the required parameter 'pk' when calling UsersApi.account_user_destroy" if pk.nil?
  # resource path
  local_var_path = "/users/{user_pk}/accounts/{pk}/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s).sub('{' + 'pk' + '}', pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'UserAccountSerializer')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#account_user_destroy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
account_user_list(user_pk, opts = {}) click to toggle source

The bank accounts for a specific User The bank accounts for a specific User. Enables create, retrieve, update (PUT/PATCH), destroy, and list.<br/>Note that the Account DB models are immutable, but the PUT/PATCH/DELETE API methods are still offered to allow users to modify/remove Accounts.<br/>The PUT/PATCH HTTP methods will create a new Account with the same data as the old one, and then apply the update to that new account. The old Account will be marked as deleted.<br/>NOTE: if you update an Account, it will get a new primary key, and therefore a new URL. You will need to extract the new URL from the body of the HTTP response to the update request.<br/>e.g. PATCH api.qwil.co/accounts/1/ {…} { "url": "https://api.qwil.co/accounts/2/", … }<br/>The DELETE HTTP method will cause Accounts to have the Account.deleted flag set to True, and such Accounts will not be displayed in the /users/<user_id>/accounts/ list.<br/>To view even deleted accounts, use the URL /users/<user_id>/accounts/?show_deleted=true<br/>Note that deleted Accounts can still be retrieved directly, e.g.<br/>GET api.qwil.co/accounts/1/ { … "deleted": "true", … } @param user_pk @param [Hash] opts the optional parameters @return [Array<UserAccountSerializer>]

# File lib/qwil_api/api/users_api.rb, line 182
def account_user_list(user_pk, opts = {})
  data, _status_code, _headers = account_user_list_with_http_info(user_pk, opts)
  return data
end
account_user_list_with_http_info(user_pk, opts = {}) click to toggle source

The bank accounts for a specific User The bank accounts for a specific User. Enables create, retrieve, update (PUT/PATCH), destroy, and list.&lt;br/&gt;Note that the Account DB models are immutable, but the PUT/PATCH/DELETE API methods are still offered to allow users to modify/remove Accounts.&lt;br/&gt;The PUT/PATCH HTTP methods will create a new Account with the same data as the old one, and then apply the update to that new account. The old Account will be marked as deleted.&lt;br/&gt;NOTE: if you update an Account, it will get a new primary key, and therefore a new URL. You will need to extract the new URL from the body of the HTTP response to the update request.&lt;br/&gt;e.g. PATCH api.qwil.co/accounts/1/ {…} { "url&quot;: "api.qwil.co/accounts/2/";, … }&lt;br/&gt;The DELETE HTTP method will cause Accounts to have the Account.deleted flag set to True, and such Accounts will not be displayed in the /users/&lt;user_id&gt;/accounts/ list.&lt;br/&gt;To view even deleted accounts, use the URL /users/&lt;user_id&gt;/accounts/?show_deleted&#x3D;true&lt;br/&gt;Note that deleted Accounts can still be retrieved directly, e.g.&lt;br/&gt;GET api.qwil.co/accounts/1/ { … "deleted&quot;: "true&quot;, … } @param user_pk @param [Hash] opts the optional parameters @return [Array<(Array<UserAccountSerializer>, Fixnum, Hash)>] Array<UserAccountSerializer> data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 192
def account_user_list_with_http_info(user_pk, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.account_user_list ..."
  end
  # verify the required parameter 'user_pk' is set
  fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.account_user_list" if user_pk.nil?
  # resource path
  local_var_path = "/users/{user_pk}/accounts/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'Array<UserAccountSerializer>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#account_user_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
account_user_partial_update(user_pk, pk, opts = {}) click to toggle source

The bank accounts for a specific User The bank accounts for a specific User. Enables create, retrieve, update (PUT/PATCH), destroy, and list.<br/>Note that the Account DB models are immutable, but the PUT/PATCH/DELETE API methods are still offered to allow users to modify/remove Accounts.<br/>The PUT/PATCH HTTP methods will create a new Account with the same data as the old one, and then apply the update to that new account. The old Account will be marked as deleted.<br/>NOTE: if you update an Account, it will get a new primary key, and therefore a new URL. You will need to extract the new URL from the body of the HTTP response to the update request.<br/>e.g. PATCH api.qwil.co/accounts/1/ {…} { "url": "https://api.qwil.co/accounts/2/", … }<br/>The DELETE HTTP method will cause Accounts to have the Account.deleted flag set to True, and such Accounts will not be displayed in the /users/<user_id>/accounts/ list.<br/>To view even deleted accounts, use the URL /users/<user_id>/accounts/?show_deleted=true<br/>Note that deleted Accounts can still be retrieved directly, e.g.<br/>GET api.qwil.co/accounts/1/ { … "deleted": "true", … } @param user_pk @param pk @param [Hash] opts the optional parameters @option opts [String] :account_number @option opts [String] :name The user&#39;s label for this Account. @option opts [String] :routing_number The inter-bank routing nubmer for this Account. 8 or 9 digits in length. @option opts [BOOLEAN] :is_paypal Flag specifying if the Account is a Paypal account. @option opts [BOOLEAN] :is_mychoice Flag specifying if the Account is a MyChoice card. If it is, the mychoice_user_id and mychoice_card_id must be filled in. @option opts [Integer] :mychoice_user_id For MyChoice Accounts. Populated from the MyChoice API. @option opts [Integer] :mychoice_card_id For MyChoice Accounts. Populated from the MyChoice API. @return [UserAccountSerializer]

# File lib/qwil_api/api/users_api.rb, line 247
def account_user_partial_update(user_pk, pk, opts = {})
  data, _status_code, _headers = account_user_partial_update_with_http_info(user_pk, pk, opts)
  return data
end
account_user_partial_update_with_http_info(user_pk, pk, opts = {}) click to toggle source

The bank accounts for a specific User The bank accounts for a specific User. Enables create, retrieve, update (PUT/PATCH), destroy, and list.&lt;br/&gt;Note that the Account DB models are immutable, but the PUT/PATCH/DELETE API methods are still offered to allow users to modify/remove Accounts.&lt;br/&gt;The PUT/PATCH HTTP methods will create a new Account with the same data as the old one, and then apply the update to that new account. The old Account will be marked as deleted.&lt;br/&gt;NOTE: if you update an Account, it will get a new primary key, and therefore a new URL. You will need to extract the new URL from the body of the HTTP response to the update request.&lt;br/&gt;e.g. PATCH api.qwil.co/accounts/1/ {…} { "url&quot;: "api.qwil.co/accounts/2/";, … }&lt;br/&gt;The DELETE HTTP method will cause Accounts to have the Account.deleted flag set to True, and such Accounts will not be displayed in the /users/&lt;user_id&gt;/accounts/ list.&lt;br/&gt;To view even deleted accounts, use the URL /users/&lt;user_id&gt;/accounts/?show_deleted&#x3D;true&lt;br/&gt;Note that deleted Accounts can still be retrieved directly, e.g.&lt;br/&gt;GET api.qwil.co/accounts/1/ { … "deleted&quot;: "true&quot;, … } @param user_pk @param pk @param [Hash] opts the optional parameters @option opts [String] :account_number @option opts [String] :name The user&#39;s label for this Account. @option opts [String] :routing_number The inter-bank routing nubmer for this Account. 8 or 9 digits in length. @option opts [BOOLEAN] :is_paypal Flag specifying if the Account is a Paypal account. @option opts [BOOLEAN] :is_mychoice Flag specifying if the Account is a MyChoice card. If it is, the mychoice_user_id and mychoice_card_id must be filled in. @option opts [Integer] :mychoice_user_id For MyChoice Accounts. Populated from the MyChoice API. @option opts [Integer] :mychoice_card_id For MyChoice Accounts. Populated from the MyChoice API. @return [Array<(UserAccountSerializer, Fixnum, Hash)>] UserAccountSerializer data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 265
def account_user_partial_update_with_http_info(user_pk, pk, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.account_user_partial_update ..."
  end
  # verify the required parameter 'user_pk' is set
  fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.account_user_partial_update" if user_pk.nil?
  # verify the required parameter 'pk' is set
  fail ArgumentError, "Missing the required parameter 'pk' when calling UsersApi.account_user_partial_update" if pk.nil?
  # resource path
  local_var_path = "/users/{user_pk}/accounts/{pk}/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s).sub('{' + 'pk' + '}', pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  form_params["account_number"] = opts[:'account_number'] if !opts[:'account_number'].nil?
  form_params["name"] = opts[:'name'] if !opts[:'name'].nil?
  form_params["routing_number"] = opts[:'routing_number'] if !opts[:'routing_number'].nil?
  form_params["is_paypal"] = opts[:'is_paypal'] if !opts[:'is_paypal'].nil?
  form_params["is_mychoice"] = opts[:'is_mychoice'] if !opts[:'is_mychoice'].nil?
  form_params["mychoice_user_id"] = opts[:'mychoice_user_id'] if !opts[:'mychoice_user_id'].nil?
  form_params["mychoice_card_id"] = opts[:'mychoice_card_id'] if !opts[:'mychoice_card_id'].nil?

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'UserAccountSerializer')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#account_user_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
account_user_retrieve(user_pk, pk, opts = {}) click to toggle source

The bank accounts for a specific User The bank accounts for a specific User. Enables create, retrieve, update (PUT/PATCH), destroy, and list.<br/>Note that the Account DB models are immutable, but the PUT/PATCH/DELETE API methods are still offered to allow users to modify/remove Accounts.<br/>The PUT/PATCH HTTP methods will create a new Account with the same data as the old one, and then apply the update to that new account. The old Account will be marked as deleted.<br/>NOTE: if you update an Account, it will get a new primary key, and therefore a new URL. You will need to extract the new URL from the body of the HTTP response to the update request.<br/>e.g. PATCH api.qwil.co/accounts/1/ {…} { "url": "https://api.qwil.co/accounts/2/", … }<br/>The DELETE HTTP method will cause Accounts to have the Account.deleted flag set to True, and such Accounts will not be displayed in the /users/<user_id>/accounts/ list.<br/>To view even deleted accounts, use the URL /users/<user_id>/accounts/?show_deleted=true<br/>Note that deleted Accounts can still be retrieved directly, e.g.<br/>GET api.qwil.co/accounts/1/ { … "deleted": "true", … } @param user_pk @param pk @param [Hash] opts the optional parameters @return [UserAccountSerializer]

# File lib/qwil_api/api/users_api.rb, line 322
def account_user_retrieve(user_pk, pk, opts = {})
  data, _status_code, _headers = account_user_retrieve_with_http_info(user_pk, pk, opts)
  return data
end
account_user_retrieve_with_http_info(user_pk, pk, opts = {}) click to toggle source

The bank accounts for a specific User The bank accounts for a specific User. Enables create, retrieve, update (PUT/PATCH), destroy, and list.&lt;br/&gt;Note that the Account DB models are immutable, but the PUT/PATCH/DELETE API methods are still offered to allow users to modify/remove Accounts.&lt;br/&gt;The PUT/PATCH HTTP methods will create a new Account with the same data as the old one, and then apply the update to that new account. The old Account will be marked as deleted.&lt;br/&gt;NOTE: if you update an Account, it will get a new primary key, and therefore a new URL. You will need to extract the new URL from the body of the HTTP response to the update request.&lt;br/&gt;e.g. PATCH api.qwil.co/accounts/1/ {…} { "url&quot;: "api.qwil.co/accounts/2/";, … }&lt;br/&gt;The DELETE HTTP method will cause Accounts to have the Account.deleted flag set to True, and such Accounts will not be displayed in the /users/&lt;user_id&gt;/accounts/ list.&lt;br/&gt;To view even deleted accounts, use the URL /users/&lt;user_id&gt;/accounts/?show_deleted&#x3D;true&lt;br/&gt;Note that deleted Accounts can still be retrieved directly, e.g.&lt;br/&gt;GET api.qwil.co/accounts/1/ { … "deleted&quot;: "true&quot;, … } @param user_pk @param pk @param [Hash] opts the optional parameters @return [Array<(UserAccountSerializer, Fixnum, Hash)>] UserAccountSerializer data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 333
def account_user_retrieve_with_http_info(user_pk, pk, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.account_user_retrieve ..."
  end
  # verify the required parameter 'user_pk' is set
  fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.account_user_retrieve" if user_pk.nil?
  # verify the required parameter 'pk' is set
  fail ArgumentError, "Missing the required parameter 'pk' when calling UsersApi.account_user_retrieve" if pk.nil?
  # resource path
  local_var_path = "/users/{user_pk}/accounts/{pk}/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s).sub('{' + 'pk' + '}', pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'UserAccountSerializer')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#account_user_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
account_user_update(user_pk, pk, account_number, name, routing_number, opts = {}) click to toggle source

The bank accounts for a specific User The bank accounts for a specific User. Enables create, retrieve, update (PUT/PATCH), destroy, and list.<br/>Note that the Account DB models are immutable, but the PUT/PATCH/DELETE API methods are still offered to allow users to modify/remove Accounts.<br/>The PUT/PATCH HTTP methods will create a new Account with the same data as the old one, and then apply the update to that new account. The old Account will be marked as deleted.<br/>NOTE: if you update an Account, it will get a new primary key, and therefore a new URL. You will need to extract the new URL from the body of the HTTP response to the update request.<br/>e.g. PATCH api.qwil.co/accounts/1/ {…} { "url": "https://api.qwil.co/accounts/2/", … }<br/>The DELETE HTTP method will cause Accounts to have the Account.deleted flag set to True, and such Accounts will not be displayed in the /users/<user_id>/accounts/ list.<br/>To view even deleted accounts, use the URL /users/<user_id>/accounts/?show_deleted=true<br/>Note that deleted Accounts can still be retrieved directly, e.g.<br/>GET api.qwil.co/accounts/1/ { … "deleted": "true", … } @param user_pk @param pk @param account_number @param name The user&#39;s label for this Account. @param routing_number The inter-bank routing nubmer for this Account. 8 or 9 digits in length. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :is_paypal Flag specifying if the Account is a Paypal account. @option opts [BOOLEAN] :is_mychoice Flag specifying if the Account is a MyChoice card. If it is, the mychoice_user_id and mychoice_card_id must be filled in. @option opts [Integer] :mychoice_user_id For MyChoice Accounts. Populated from the MyChoice API. @option opts [Integer] :mychoice_card_id For MyChoice Accounts. Populated from the MyChoice API. @return [UserAccountSerializer]

# File lib/qwil_api/api/users_api.rb, line 390
def account_user_update(user_pk, pk, account_number, name, routing_number, opts = {})
  data, _status_code, _headers = account_user_update_with_http_info(user_pk, pk, account_number, name, routing_number, opts)
  return data
end
account_user_update_with_http_info(user_pk, pk, account_number, name, routing_number, opts = {}) click to toggle source

The bank accounts for a specific User The bank accounts for a specific User. Enables create, retrieve, update (PUT/PATCH), destroy, and list.&lt;br/&gt;Note that the Account DB models are immutable, but the PUT/PATCH/DELETE API methods are still offered to allow users to modify/remove Accounts.&lt;br/&gt;The PUT/PATCH HTTP methods will create a new Account with the same data as the old one, and then apply the update to that new account. The old Account will be marked as deleted.&lt;br/&gt;NOTE: if you update an Account, it will get a new primary key, and therefore a new URL. You will need to extract the new URL from the body of the HTTP response to the update request.&lt;br/&gt;e.g. PATCH api.qwil.co/accounts/1/ {…} { "url&quot;: "api.qwil.co/accounts/2/";, … }&lt;br/&gt;The DELETE HTTP method will cause Accounts to have the Account.deleted flag set to True, and such Accounts will not be displayed in the /users/&lt;user_id&gt;/accounts/ list.&lt;br/&gt;To view even deleted accounts, use the URL /users/&lt;user_id&gt;/accounts/?show_deleted&#x3D;true&lt;br/&gt;Note that deleted Accounts can still be retrieved directly, e.g.&lt;br/&gt;GET api.qwil.co/accounts/1/ { … "deleted&quot;: "true&quot;, … } @param user_pk @param pk @param account_number @param name The user&#39;s label for this Account. @param routing_number The inter-bank routing nubmer for this Account. 8 or 9 digits in length. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :is_paypal Flag specifying if the Account is a Paypal account. @option opts [BOOLEAN] :is_mychoice Flag specifying if the Account is a MyChoice card. If it is, the mychoice_user_id and mychoice_card_id must be filled in. @option opts [Integer] :mychoice_user_id For MyChoice Accounts. Populated from the MyChoice API. @option opts [Integer] :mychoice_card_id For MyChoice Accounts. Populated from the MyChoice API. @return [Array<(UserAccountSerializer, Fixnum, Hash)>] UserAccountSerializer data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 408
def account_user_update_with_http_info(user_pk, pk, account_number, name, routing_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.account_user_update ..."
  end
  # verify the required parameter 'user_pk' is set
  fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.account_user_update" if user_pk.nil?
  # verify the required parameter 'pk' is set
  fail ArgumentError, "Missing the required parameter 'pk' when calling UsersApi.account_user_update" if pk.nil?
  # verify the required parameter 'account_number' is set
  fail ArgumentError, "Missing the required parameter 'account_number' when calling UsersApi.account_user_update" if account_number.nil?
  # verify the required parameter 'name' is set
  fail ArgumentError, "Missing the required parameter 'name' when calling UsersApi.account_user_update" if name.nil?
  # verify the required parameter 'routing_number' is set
  fail ArgumentError, "Missing the required parameter 'routing_number' when calling UsersApi.account_user_update" if routing_number.nil?
  # resource path
  local_var_path = "/users/{user_pk}/accounts/{pk}/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s).sub('{' + 'pk' + '}', pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  form_params["account_number"] = account_number
  form_params["name"] = name
  form_params["routing_number"] = routing_number
  form_params["is_paypal"] = opts[:'is_paypal'] if !opts[:'is_paypal'].nil?
  form_params["is_mychoice"] = opts[:'is_mychoice'] if !opts[:'is_mychoice'].nil?
  form_params["mychoice_user_id"] = opts[:'mychoice_user_id'] if !opts[:'mychoice_user_id'].nil?
  form_params["mychoice_card_id"] = opts[:'mychoice_card_id'] if !opts[:'mychoice_card_id'].nil?

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'UserAccountSerializer')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#account_user_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
admin_platform_create(user_pk, name, opts = {}) click to toggle source

View to create new platforms on which the user is an admin View to create new platforms on which the user is an admin.<br/>POSTing to this endpoint will create a new Platform with the specified name, and will set the current User as an Admin on that platform. @param user_pk @param name @param [Hash] opts the optional parameters @return [PlatformSummarySerializer]

# File lib/qwil_api/api/users_api.rb, line 471
def admin_platform_create(user_pk, name, opts = {})
  data, _status_code, _headers = admin_platform_create_with_http_info(user_pk, name, opts)
  return data
end
admin_platform_create_with_http_info(user_pk, name, opts = {}) click to toggle source

View to create new platforms on which the user is an admin View to create new platforms on which the user is an admin.&lt;br/&gt;POSTing to this endpoint will create a new Platform with the specified name, and will set the current User as an Admin on that platform. @param user_pk @param name @param [Hash] opts the optional parameters @return [Array<(PlatformSummarySerializer, Fixnum, Hash)>] PlatformSummarySerializer data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 482
def admin_platform_create_with_http_info(user_pk, name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.admin_platform_create ..."
  end
  # verify the required parameter 'user_pk' is set
  fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.admin_platform_create" if user_pk.nil?
  # verify the required parameter 'name' is set
  fail ArgumentError, "Missing the required parameter 'name' when calling UsersApi.admin_platform_create" if name.nil?
  # resource path
  local_var_path = "/users/{user_pk}/administered_platforms/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  form_params["name"] = name

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'PlatformSummarySerializer')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#admin_platform_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
cancel_income_request_get(user_pk, pk, opts = {}) click to toggle source

On GET, cancel the income request View to offer a ./cancel endpoint for cancelling an IncomeRequest. <br/>On GET, cancel the income request.<br/>Keep GET for browsability on the API. @param user_pk @param pk @param [Hash] opts the optional parameters @return [Object]

# File lib/qwil_api/api/users_api.rb, line 533
def cancel_income_request_get(user_pk, pk, opts = {})
  data, _status_code, _headers = cancel_income_request_get_with_http_info(user_pk, pk, opts)
  return data
end
cancel_income_request_get_with_http_info(user_pk, pk, opts = {}) click to toggle source

On GET, cancel the income request View to offer a ./cancel endpoint for cancelling an IncomeRequest. &lt;br/&gt;On GET, cancel the income request.&lt;br/&gt;Keep GET for browsability on the API. @param user_pk @param pk @param [Hash] opts the optional parameters @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 544
def cancel_income_request_get_with_http_info(user_pk, pk, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.cancel_income_request_get ..."
  end
  # verify the required parameter 'user_pk' is set
  fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.cancel_income_request_get" if user_pk.nil?
  # verify the required parameter 'pk' is set
  fail ArgumentError, "Missing the required parameter 'pk' when calling UsersApi.cancel_income_request_get" if pk.nil?
  # resource path
  local_var_path = "/users/{user_pk}/income_requests/{pk}/cancel/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s).sub('{' + 'pk' + '}', pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#cancel_income_request_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
cancel_income_request_post(user_pk, pk, opts = {}) click to toggle source

On POST, cancel the income request View to offer a ./cancel endpoint for cancelling an IncomeRequest. <br/>On POST, cancel the income request. @param user_pk @param pk @param [Hash] opts the optional parameters @return [Object]

# File lib/qwil_api/api/users_api.rb, line 594
def cancel_income_request_post(user_pk, pk, opts = {})
  data, _status_code, _headers = cancel_income_request_post_with_http_info(user_pk, pk, opts)
  return data
end
cancel_income_request_post_with_http_info(user_pk, pk, opts = {}) click to toggle source

On POST, cancel the income request View to offer a ./cancel endpoint for cancelling an IncomeRequest. &lt;br/&gt;On POST, cancel the income request. @param user_pk @param pk @param [Hash] opts the optional parameters @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 605
def cancel_income_request_post_with_http_info(user_pk, pk, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.cancel_income_request_post ..."
  end
  # verify the required parameter 'user_pk' is set
  fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.cancel_income_request_post" if user_pk.nil?
  # verify the required parameter 'pk' is set
  fail ArgumentError, "Missing the required parameter 'pk' when calling UsersApi.cancel_income_request_post" if pk.nil?
  # resource path
  local_var_path = "/users/{user_pk}/income_requests/{pk}/cancel/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s).sub('{' + 'pk' + '}', pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#cancel_income_request_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
cancel_platform_membership_request_get(user_pk, pk, opts = {}) click to toggle source

On GET, cancel the membership request View to offer a ./accept endpoint for accepting a PlatformMembershipRequest. <br/>On GET, cancel the membership request.<br/>Keep GET for browsability on the API. @param user_pk @param pk @param [Hash] opts the optional parameters @return [Object]

# File lib/qwil_api/api/users_api.rb, line 655
def cancel_platform_membership_request_get(user_pk, pk, opts = {})
  data, _status_code, _headers = cancel_platform_membership_request_get_with_http_info(user_pk, pk, opts)
  return data
end
cancel_platform_membership_request_get_with_http_info(user_pk, pk, opts = {}) click to toggle source

On GET, cancel the membership request View to offer a ./accept endpoint for accepting a PlatformMembershipRequest. &lt;br/&gt;On GET, cancel the membership request.&lt;br/&gt;Keep GET for browsability on the API. @param user_pk @param pk @param [Hash] opts the optional parameters @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 666
def cancel_platform_membership_request_get_with_http_info(user_pk, pk, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.cancel_platform_membership_request_get ..."
  end
  # verify the required parameter 'user_pk' is set
  fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.cancel_platform_membership_request_get" if user_pk.nil?
  # verify the required parameter 'pk' is set
  fail ArgumentError, "Missing the required parameter 'pk' when calling UsersApi.cancel_platform_membership_request_get" if pk.nil?
  # resource path
  local_var_path = "/users/{user_pk}/platform_membership_requests/{pk}/cancel/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s).sub('{' + 'pk' + '}', pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#cancel_platform_membership_request_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
cancel_platform_membership_request_post(user_pk, pk, opts = {}) click to toggle source

On POST, cancel the membership request View to offer a ./accept endpoint for accepting a PlatformMembershipRequest. <br/>On POST, cancel the membership request. @param user_pk @param pk @param [Hash] opts the optional parameters @return [Object]

# File lib/qwil_api/api/users_api.rb, line 716
def cancel_platform_membership_request_post(user_pk, pk, opts = {})
  data, _status_code, _headers = cancel_platform_membership_request_post_with_http_info(user_pk, pk, opts)
  return data
end
cancel_platform_membership_request_post_with_http_info(user_pk, pk, opts = {}) click to toggle source

On POST, cancel the membership request View to offer a ./accept endpoint for accepting a PlatformMembershipRequest. &lt;br/&gt;On POST, cancel the membership request. @param user_pk @param pk @param [Hash] opts the optional parameters @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 727
def cancel_platform_membership_request_post_with_http_info(user_pk, pk, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.cancel_platform_membership_request_post ..."
  end
  # verify the required parameter 'user_pk' is set
  fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.cancel_platform_membership_request_post" if user_pk.nil?
  # verify the required parameter 'pk' is set
  fail ArgumentError, "Missing the required parameter 'pk' when calling UsersApi.cancel_platform_membership_request_post" if pk.nil?
  # resource path
  local_var_path = "/users/{user_pk}/platform_membership_requests/{pk}/cancel/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s).sub('{' + 'pk' + '}', pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#cancel_platform_membership_request_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
cashout_available_create(user_pk, opts = {}) click to toggle source

Calculate the fees for a specific Cashout amount Calculate the fees for a specific Cashout amount.<br/>This returns the fees for a specific cashout amount, plus the maximum amount available. @param user_pk @param [Hash] opts the optional parameters @option opts [String] :amount The Cashout amount to calculate fees for. (This amount is net, i.e. before fees). @return [CashoutCalculationSerializer]

# File lib/qwil_api/api/users_api.rb, line 777
def cashout_available_create(user_pk, opts = {})
  data, _status_code, _headers = cashout_available_create_with_http_info(user_pk, opts)
  return data
end
cashout_available_create_with_http_info(user_pk, opts = {}) click to toggle source

Calculate the fees for a specific Cashout amount Calculate the fees for a specific Cashout amount.&lt;br/&gt;This returns the fees for a specific cashout amount, plus the maximum amount available. @param user_pk @param [Hash] opts the optional parameters @option opts [String] :amount The Cashout amount to calculate fees for. (This amount is net, i.e. before fees). @return [Array<(CashoutCalculationSerializer, Fixnum, Hash)>] CashoutCalculationSerializer data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 788
def cashout_available_create_with_http_info(user_pk, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.cashout_available_create ..."
  end
  # verify the required parameter 'user_pk' is set
  fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.cashout_available_create" if user_pk.nil?
  # resource path
  local_var_path = "/users/{user_pk}/cashout_available/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

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

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'CashoutCalculationSerializer')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#cashout_available_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
cashout_available_retrieve(user_pk, opts = {}) click to toggle source

Calculate the available cashout for a User Calculate the available cashout for a User.<br/>This returns the maximum cashout amount available, and the fee for that amount. @param user_pk @param [Hash] opts the optional parameters @return [CashoutCalculationSerializer]

# File lib/qwil_api/api/users_api.rb, line 836
def cashout_available_retrieve(user_pk, opts = {})
  data, _status_code, _headers = cashout_available_retrieve_with_http_info(user_pk, opts)
  return data
end
cashout_available_retrieve_with_http_info(user_pk, opts = {}) click to toggle source

Calculate the available cashout for a User Calculate the available cashout for a User.&lt;br/&gt;This returns the maximum cashout amount available, and the fee for that amount. @param user_pk @param [Hash] opts the optional parameters @return [Array<(CashoutCalculationSerializer, Fixnum, Hash)>] CashoutCalculationSerializer data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 846
def cashout_available_retrieve_with_http_info(user_pk, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.cashout_available_retrieve ..."
  end
  # verify the required parameter 'user_pk' is set
  fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.cashout_available_retrieve" if user_pk.nil?
  # resource path
  local_var_path = "/users/{user_pk}/cashout_available/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'CashoutCalculationSerializer')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#cashout_available_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
cashout_user_viewset_create(user_pk, amount, opts = {}) click to toggle source

The Cashouts for a specific User The Cashouts for a specific User. Enables create, retrieve, list. @param user_pk @param amount @param [Hash] opts the optional parameters @option opts [DateTime] :cashout_time @option opts [String] :notes @option opts [String] :type @option opts [String] :method @option opts [DateTime] :transmit_time @option opts [String] :rebate The Rebate against which this Cashout will be collected. @option opts [String] :account @return [UserCashoutSerializer]

# File lib/qwil_api/api/users_api.rb, line 901
def cashout_user_viewset_create(user_pk, amount, opts = {})
  data, _status_code, _headers = cashout_user_viewset_create_with_http_info(user_pk, amount, opts)
  return data
end
cashout_user_viewset_create_with_http_info(user_pk, amount, opts = {}) click to toggle source

The Cashouts for a specific User The Cashouts for a specific User. Enables create, retrieve, list. @param user_pk @param amount @param [Hash] opts the optional parameters @option opts [DateTime] :cashout_time @option opts [String] :notes @option opts [String] :type @option opts [String] :method @option opts [DateTime] :transmit_time @option opts [String] :rebate The Rebate against which this Cashout will be collected. @option opts [String] :account @return [Array<(UserCashoutSerializer, Fixnum, Hash)>] UserCashoutSerializer data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 919
def cashout_user_viewset_create_with_http_info(user_pk, amount, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.cashout_user_viewset_create ..."
  end
  # verify the required parameter 'user_pk' is set
  fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.cashout_user_viewset_create" if user_pk.nil?
  # verify the required parameter 'amount' is set
  fail ArgumentError, "Missing the required parameter 'amount' when calling UsersApi.cashout_user_viewset_create" if amount.nil?
  if opts[:'type'] && !['CASHOUT', 'DEBIT', 'REBATE'].include?(opts[:'type'])
    fail ArgumentError, 'invalid value for "type", must be one of CASHOUT, DEBIT, REBATE'
  end
  if opts[:'method'] && !['ACH', 'CHECK', 'WIRE', 'PAYPAL'].include?(opts[:'method'])
    fail ArgumentError, 'invalid value for "method", must be one of ACH, CHECK, WIRE, PAYPAL'
  end
  # resource path
  local_var_path = "/users/{user_pk}/cashouts/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  form_params["amount"] = amount
  form_params["cashout_time"] = opts[:'cashout_time'] if !opts[:'cashout_time'].nil?
  form_params["notes"] = opts[:'notes'] if !opts[:'notes'].nil?
  form_params["type"] = opts[:'type'] if !opts[:'type'].nil?
  form_params["method"] = opts[:'method'] if !opts[:'method'].nil?
  form_params["transmit_time"] = opts[:'transmit_time'] if !opts[:'transmit_time'].nil?
  form_params["rebate"] = opts[:'rebate'] if !opts[:'rebate'].nil?
  form_params["account"] = opts[:'account'] if !opts[:'account'].nil?

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'UserCashoutSerializer')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#cashout_user_viewset_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
cashout_user_viewset_list(user_pk, opts = {}) click to toggle source

The Cashouts for a specific User The Cashouts for a specific User. Enables create, retrieve, list. @param user_pk @param [Hash] opts the optional parameters @return [Array<UserCashoutSerializer>]

# File lib/qwil_api/api/users_api.rb, line 982
def cashout_user_viewset_list(user_pk, opts = {})
  data, _status_code, _headers = cashout_user_viewset_list_with_http_info(user_pk, opts)
  return data
end
cashout_user_viewset_list_with_http_info(user_pk, opts = {}) click to toggle source

The Cashouts for a specific User The Cashouts for a specific User. Enables create, retrieve, list. @param user_pk @param [Hash] opts the optional parameters @return [Array<(Array<UserCashoutSerializer>, Fixnum, Hash)>] Array<UserCashoutSerializer> data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 992
def cashout_user_viewset_list_with_http_info(user_pk, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.cashout_user_viewset_list ..."
  end
  # verify the required parameter 'user_pk' is set
  fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.cashout_user_viewset_list" if user_pk.nil?
  # resource path
  local_var_path = "/users/{user_pk}/cashouts/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'Array<UserCashoutSerializer>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#cashout_user_viewset_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
cashout_user_viewset_retrieve(user_pk, pk, opts = {}) click to toggle source

The Cashouts for a specific User The Cashouts for a specific User. Enables create, retrieve, list. @param user_pk @param pk @param [Hash] opts the optional parameters @return [UserCashoutSerializer]

# File lib/qwil_api/api/users_api.rb, line 1040
def cashout_user_viewset_retrieve(user_pk, pk, opts = {})
  data, _status_code, _headers = cashout_user_viewset_retrieve_with_http_info(user_pk, pk, opts)
  return data
end
cashout_user_viewset_retrieve_with_http_info(user_pk, pk, opts = {}) click to toggle source

The Cashouts for a specific User The Cashouts for a specific User. Enables create, retrieve, list. @param user_pk @param pk @param [Hash] opts the optional parameters @return [Array<(UserCashoutSerializer, Fixnum, Hash)>] UserCashoutSerializer data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 1051
def cashout_user_viewset_retrieve_with_http_info(user_pk, pk, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.cashout_user_viewset_retrieve ..."
  end
  # verify the required parameter 'user_pk' is set
  fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.cashout_user_viewset_retrieve" if user_pk.nil?
  # verify the required parameter 'pk' is set
  fail ArgumentError, "Missing the required parameter 'pk' when calling UsersApi.cashout_user_viewset_retrieve" if pk.nil?
  # resource path
  local_var_path = "/users/{user_pk}/cashouts/{pk}/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s).sub('{' + 'pk' + '}', pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'UserCashoutSerializer')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#cashout_user_viewset_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
income_user_list(user_pk, opts = {}) click to toggle source

The list of Income items for a specific User The list of Income items for a specific User.<br/>This can be filtered by date using the start_date and end_date query parameters. @param user_pk @param [Hash] opts the optional parameters @return [Array<IncomeSerializerFixedSource>]

# File lib/qwil_api/api/users_api.rb, line 1100
def income_user_list(user_pk, opts = {})
  data, _status_code, _headers = income_user_list_with_http_info(user_pk, opts)
  return data
end
income_user_list_with_http_info(user_pk, opts = {}) click to toggle source

The list of Income items for a specific User The list of Income items for a specific User.&lt;br/&gt;This can be filtered by date using the start_date and end_date query parameters. @param user_pk @param [Hash] opts the optional parameters @return [Array<(Array<IncomeSerializerFixedSource>, Fixnum, Hash)>] Array<IncomeSerializerFixedSource> data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 1110
def income_user_list_with_http_info(user_pk, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.income_user_list ..."
  end
  # verify the required parameter 'user_pk' is set
  fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.income_user_list" if user_pk.nil?
  # resource path
  local_var_path = "/users/{user_pk}/income/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'Array<IncomeSerializerFixedSource>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#income_user_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
my_user_partial_update(opts = {}) click to toggle source

The currently logged in User The currently logged in User. @param [Hash] opts the optional parameters @option opts [String] :email @option opts [String] :first_name First name, if the user is an individual. Leave blank if this user is a company. @option opts [String] :last_name Last name, if the user is an individual. Leave blank if this user is a company. @option opts [String] :business_name Business name. Only use this field if this user is a business entity. @option opts [String] :contractor_type (default to INDIVIDUAL) @option opts [String] :default_account Default account to use for payment of unpaid income. @option opts [String] :tax_savings_account Account to use for tax savings. @option opts [String] :tax_savings_percent The percent of income to be withheld for tax savings purposes. @option opts [BOOLEAN] :use_plaid Feature flag specifying if Plaid integration should be used. @option opts [BOOLEAN] :use_income_requests Feature flag specifying if IncomeRequests should be enabled for this user. @option opts [BOOLEAN] :use_tax_savings Feature flag specifying if tax savings should be enabled. @option opts [BOOLEAN] :is_auto_cashout_enabled Whether or not all income should be immediately cashed out for this user. @option opts [String] :password @option opts [String] :personal_information @return [UserSerializer]

# File lib/qwil_api/api/users_api.rb, line 1170
def my_user_partial_update(opts = {})
  data, _status_code, _headers = my_user_partial_update_with_http_info(opts)
  return data
end
my_user_partial_update_with_http_info(opts = {}) click to toggle source

The currently logged in User The currently logged in User. @param [Hash] opts the optional parameters @option opts [String] :email @option opts [String] :first_name First name, if the user is an individual. Leave blank if this user is a company. @option opts [String] :last_name Last name, if the user is an individual. Leave blank if this user is a company. @option opts [String] :business_name Business name. Only use this field if this user is a business entity. @option opts [String] :contractor_type @option opts [String] :default_account Default account to use for payment of unpaid income. @option opts [String] :tax_savings_account Account to use for tax savings. @option opts [String] :tax_savings_percent The percent of income to be withheld for tax savings purposes. @option opts [BOOLEAN] :use_plaid Feature flag specifying if Plaid integration should be used. @option opts [BOOLEAN] :use_income_requests Feature flag specifying if IncomeRequests should be enabled for this user. @option opts [BOOLEAN] :use_tax_savings Feature flag specifying if tax savings should be enabled. @option opts [BOOLEAN] :is_auto_cashout_enabled Whether or not all income should be immediately cashed out for this user. @option opts [String] :password @option opts [String] :personal_information @return [Array<(UserSerializer, Fixnum, Hash)>] UserSerializer data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 1193
def my_user_partial_update_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.my_user_partial_update ..."
  end
  if opts[:'contractor_type'] && !['INDIVIDUAL', 'BUSINESS'].include?(opts[:'contractor_type'])
    fail ArgumentError, 'invalid value for "contractor_type", must be one of INDIVIDUAL, BUSINESS'
  end
  # resource path
  local_var_path = "/users/me/".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  form_params["email"] = opts[:'email'] if !opts[:'email'].nil?
  form_params["first_name"] = opts[:'first_name'] if !opts[:'first_name'].nil?
  form_params["last_name"] = opts[:'last_name'] if !opts[:'last_name'].nil?
  form_params["business_name"] = opts[:'business_name'] if !opts[:'business_name'].nil?
  form_params["contractor_type"] = opts[:'contractor_type'] if !opts[:'contractor_type'].nil?
  form_params["default_account"] = opts[:'default_account'] if !opts[:'default_account'].nil?
  form_params["tax_savings_account"] = opts[:'tax_savings_account'] if !opts[:'tax_savings_account'].nil?
  form_params["tax_savings_percent"] = opts[:'tax_savings_percent'] if !opts[:'tax_savings_percent'].nil?
  form_params["use_plaid"] = opts[:'use_plaid'] if !opts[:'use_plaid'].nil?
  form_params["use_income_requests"] = opts[:'use_income_requests'] if !opts[:'use_income_requests'].nil?
  form_params["use_tax_savings"] = opts[:'use_tax_savings'] if !opts[:'use_tax_savings'].nil?
  form_params["is_auto_cashout_enabled"] = opts[:'is_auto_cashout_enabled'] if !opts[:'is_auto_cashout_enabled'].nil?
  form_params["password"] = opts[:'password'] if !opts[:'password'].nil?
  form_params["personal_information"] = opts[:'personal_information'] if !opts[:'personal_information'].nil?

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'UserSerializer')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#my_user_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
my_user_retrieve(opts = {}) click to toggle source

The currently logged in User The currently logged in User. @param [Hash] opts the optional parameters @return [UserSerializer]

# File lib/qwil_api/api/users_api.rb, line 1254
def my_user_retrieve(opts = {})
  data, _status_code, _headers = my_user_retrieve_with_http_info(opts)
  return data
end
my_user_retrieve_with_http_info(opts = {}) click to toggle source

The currently logged in User The currently logged in User. @param [Hash] opts the optional parameters @return [Array<(UserSerializer, Fixnum, Hash)>] UserSerializer data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 1263
def my_user_retrieve_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.my_user_retrieve ..."
  end
  # resource path
  local_var_path = "/users/me/".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'UserSerializer')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#my_user_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
my_user_update(email, opts = {}) click to toggle source

The currently logged in User The currently logged in User. @param email @param [Hash] opts the optional parameters @option opts [String] :first_name First name, if the user is an individual. Leave blank if this user is a company. @option opts [String] :last_name Last name, if the user is an individual. Leave blank if this user is a company. @option opts [String] :business_name Business name. Only use this field if this user is a business entity. @option opts [String] :contractor_type (default to INDIVIDUAL) @option opts [String] :default_account Default account to use for payment of unpaid income. @option opts [String] :tax_savings_account Account to use for tax savings. @option opts [String] :tax_savings_percent The percent of income to be withheld for tax savings purposes. @option opts [BOOLEAN] :use_plaid Feature flag specifying if Plaid integration should be used. @option opts [BOOLEAN] :use_income_requests Feature flag specifying if IncomeRequests should be enabled for this user. @option opts [BOOLEAN] :use_tax_savings Feature flag specifying if tax savings should be enabled. @option opts [BOOLEAN] :is_auto_cashout_enabled Whether or not all income should be immediately cashed out for this user. @option opts [String] :password @option opts [String] :personal_information @return [UserSerializer]

# File lib/qwil_api/api/users_api.rb, line 1321
def my_user_update(email, opts = {})
  data, _status_code, _headers = my_user_update_with_http_info(email, opts)
  return data
end
my_user_update_with_http_info(email, opts = {}) click to toggle source

The currently logged in User The currently logged in User. @param email @param [Hash] opts the optional parameters @option opts [String] :first_name First name, if the user is an individual. Leave blank if this user is a company. @option opts [String] :last_name Last name, if the user is an individual. Leave blank if this user is a company. @option opts [String] :business_name Business name. Only use this field if this user is a business entity. @option opts [String] :contractor_type @option opts [String] :default_account Default account to use for payment of unpaid income. @option opts [String] :tax_savings_account Account to use for tax savings. @option opts [String] :tax_savings_percent The percent of income to be withheld for tax savings purposes. @option opts [BOOLEAN] :use_plaid Feature flag specifying if Plaid integration should be used. @option opts [BOOLEAN] :use_income_requests Feature flag specifying if IncomeRequests should be enabled for this user. @option opts [BOOLEAN] :use_tax_savings Feature flag specifying if tax savings should be enabled. @option opts [BOOLEAN] :is_auto_cashout_enabled Whether or not all income should be immediately cashed out for this user. @option opts [String] :password @option opts [String] :personal_information @return [Array<(UserSerializer, Fixnum, Hash)>] UserSerializer data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 1344
def my_user_update_with_http_info(email, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.my_user_update ..."
  end
  # verify the required parameter 'email' is set
  fail ArgumentError, "Missing the required parameter 'email' when calling UsersApi.my_user_update" if email.nil?
  if opts[:'contractor_type'] && !['INDIVIDUAL', 'BUSINESS'].include?(opts[:'contractor_type'])
    fail ArgumentError, 'invalid value for "contractor_type", must be one of INDIVIDUAL, BUSINESS'
  end
  # resource path
  local_var_path = "/users/me/".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  form_params["email"] = email
  form_params["first_name"] = opts[:'first_name'] if !opts[:'first_name'].nil?
  form_params["last_name"] = opts[:'last_name'] if !opts[:'last_name'].nil?
  form_params["business_name"] = opts[:'business_name'] if !opts[:'business_name'].nil?
  form_params["contractor_type"] = opts[:'contractor_type'] if !opts[:'contractor_type'].nil?
  form_params["default_account"] = opts[:'default_account'] if !opts[:'default_account'].nil?
  form_params["tax_savings_account"] = opts[:'tax_savings_account'] if !opts[:'tax_savings_account'].nil?
  form_params["tax_savings_percent"] = opts[:'tax_savings_percent'] if !opts[:'tax_savings_percent'].nil?
  form_params["use_plaid"] = opts[:'use_plaid'] if !opts[:'use_plaid'].nil?
  form_params["use_income_requests"] = opts[:'use_income_requests'] if !opts[:'use_income_requests'].nil?
  form_params["use_tax_savings"] = opts[:'use_tax_savings'] if !opts[:'use_tax_savings'].nil?
  form_params["is_auto_cashout_enabled"] = opts[:'is_auto_cashout_enabled'] if !opts[:'is_auto_cashout_enabled'].nil?
  form_params["password"] = opts[:'password'] if !opts[:'password'].nil?
  form_params["personal_information"] = opts[:'personal_information'] if !opts[:'personal_information'].nil?

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'UserSerializer')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#my_user_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
plaid_accounts_post(user_pk, public_token, opts = {}) click to toggle source

Authenticate with Plaid Auth and list the user's accounts Fetch the user's accounts from the Plaid Auth service. <br/>Authenticate with Plaid Auth and list the user's accounts.<br/>Use the provided public_token from Plaid Link to authenticate. The accounts are reformatted to the Qwil account format, so that they are usable to create Qwil accounts. @param user_pk @param public_token A public_token generated by authenticating with Plaid Link. @param [Hash] opts the optional parameters @return [PlaidPublicTokenSerializer]

# File lib/qwil_api/api/users_api.rb, line 1409
def plaid_accounts_post(user_pk, public_token, opts = {})
  data, _status_code, _headers = plaid_accounts_post_with_http_info(user_pk, public_token, opts)
  return data
end
plaid_accounts_post_with_http_info(user_pk, public_token, opts = {}) click to toggle source

Authenticate with Plaid Auth and list the user&#39;s accounts Fetch the user&#39;s accounts from the Plaid Auth service. &lt;br/&gt;Authenticate with Plaid Auth and list the user&#39;s accounts.&lt;br/&gt;Use the provided public_token from Plaid Link to authenticate. The accounts are reformatted to the Qwil account format, so that they are usable to create Qwil accounts. @param user_pk @param public_token A public_token generated by authenticating with Plaid Link. @param [Hash] opts the optional parameters @return [Array<(PlaidPublicTokenSerializer, Fixnum, Hash)>] PlaidPublicTokenSerializer data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 1420
def plaid_accounts_post_with_http_info(user_pk, public_token, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.plaid_accounts_post ..."
  end
  # verify the required parameter 'user_pk' is set
  fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.plaid_accounts_post" if user_pk.nil?
  # verify the required parameter 'public_token' is set
  fail ArgumentError, "Missing the required parameter 'public_token' when calling UsersApi.plaid_accounts_post" if public_token.nil?
  # resource path
  local_var_path = "/users/{user_pk}/integrations/plaid/accounts/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  form_params["public_token"] = public_token

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'PlaidPublicTokenSerializer')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#plaid_accounts_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
receivables_user_api_get(user_pk, opts = {}) click to toggle source

The list of all Receivables for a specific User The list of all Receivables for a specific User.<br/>Receivables include Income items and Cashouts.<br/>This API endpoint returns multiple model types; the Model.type field specifies what type a given model is.<br/>Note that currently this means that there are few common fields between different types of Receivable. @param user_pk @param [Hash] opts the optional parameters @return [ReceivablesSerializer]

# File lib/qwil_api/api/users_api.rb, line 1470
def receivables_user_api_get(user_pk, opts = {})
  data, _status_code, _headers = receivables_user_api_get_with_http_info(user_pk, opts)
  return data
end
receivables_user_api_get_with_http_info(user_pk, opts = {}) click to toggle source

The list of all Receivables for a specific User The list of all Receivables for a specific User.&lt;br/&gt;Receivables include Income items and Cashouts.&lt;br/&gt;This API endpoint returns multiple model types; the Model.type field specifies what type a given model is.&lt;br/&gt;Note that currently this means that there are few common fields between different types of Receivable. @param user_pk @param [Hash] opts the optional parameters @return [Array<(ReceivablesSerializer, Fixnum, Hash)>] ReceivablesSerializer data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 1480
def receivables_user_api_get_with_http_info(user_pk, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.receivables_user_api_get ..."
  end
  # verify the required parameter 'user_pk' is set
  fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.receivables_user_api_get" if user_pk.nil?
  # resource path
  local_var_path = "/users/{user_pk}/receivables/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'ReceivablesSerializer')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#receivables_user_api_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
tax_savings_partial_update(user_pk, opts = {}) click to toggle source

View for handling access to tax savings info for a User View for handling access to tax savings info for a User. @param user_pk @param [Hash] opts the optional parameters @option opts [String] :tax_savings_percent The percent of income to be withheld for tax savings purposes. @return [TaxSavingsSerializer]

# File lib/qwil_api/api/users_api.rb, line 1528
def tax_savings_partial_update(user_pk, opts = {})
  data, _status_code, _headers = tax_savings_partial_update_with_http_info(user_pk, opts)
  return data
end
tax_savings_partial_update_with_http_info(user_pk, opts = {}) click to toggle source

View for handling access to tax savings info for a User View for handling access to tax savings info for a User. @param user_pk @param [Hash] opts the optional parameters @option opts [String] :tax_savings_percent The percent of income to be withheld for tax savings purposes. @return [Array<(TaxSavingsSerializer, Fixnum, Hash)>] TaxSavingsSerializer data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 1539
def tax_savings_partial_update_with_http_info(user_pk, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.tax_savings_partial_update ..."
  end
  # verify the required parameter 'user_pk' is set
  fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.tax_savings_partial_update" if user_pk.nil?
  # resource path
  local_var_path = "/users/{user_pk}/tax_savings/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

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

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TaxSavingsSerializer')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#tax_savings_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
tax_savings_retrieve(user_pk, opts = {}) click to toggle source

View for handling access to tax savings info for a User View for handling access to tax savings info for a User. @param user_pk @param [Hash] opts the optional parameters @return [TaxSavingsSerializer]

# File lib/qwil_api/api/users_api.rb, line 1587
def tax_savings_retrieve(user_pk, opts = {})
  data, _status_code, _headers = tax_savings_retrieve_with_http_info(user_pk, opts)
  return data
end
tax_savings_retrieve_with_http_info(user_pk, opts = {}) click to toggle source

View for handling access to tax savings info for a User View for handling access to tax savings info for a User. @param user_pk @param [Hash] opts the optional parameters @return [Array<(TaxSavingsSerializer, Fixnum, Hash)>] TaxSavingsSerializer data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 1597
def tax_savings_retrieve_with_http_info(user_pk, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.tax_savings_retrieve ..."
  end
  # verify the required parameter 'user_pk' is set
  fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.tax_savings_retrieve" if user_pk.nil?
  # resource path
  local_var_path = "/users/{user_pk}/tax_savings/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'TaxSavingsSerializer')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#tax_savings_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
tax_savings_update(user_pk, opts = {}) click to toggle source

View for handling access to tax savings info for a User View for handling access to tax savings info for a User. @param user_pk @param [Hash] opts the optional parameters @option opts [String] :tax_savings_percent The percent of income to be withheld for tax savings purposes. @return [TaxSavingsSerializer]

# File lib/qwil_api/api/users_api.rb, line 1645
def tax_savings_update(user_pk, opts = {})
  data, _status_code, _headers = tax_savings_update_with_http_info(user_pk, opts)
  return data
end
tax_savings_update_with_http_info(user_pk, opts = {}) click to toggle source

View for handling access to tax savings info for a User View for handling access to tax savings info for a User. @param user_pk @param [Hash] opts the optional parameters @option opts [String] :tax_savings_percent The percent of income to be withheld for tax savings purposes. @return [Array<(TaxSavingsSerializer, Fixnum, Hash)>] TaxSavingsSerializer data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 1656
def tax_savings_update_with_http_info(user_pk, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.tax_savings_update ..."
  end
  # verify the required parameter 'user_pk' is set
  fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.tax_savings_update" if user_pk.nil?
  # resource path
  local_var_path = "/users/{user_pk}/tax_savings/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

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

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TaxSavingsSerializer')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#tax_savings_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
user_create(email, opts = {}) click to toggle source

The list of registered Qwil Users The list of registered Qwil Users. @param email @param [Hash] opts the optional parameters @option opts [String] :first_name First name, if the user is an individual. Leave blank if this user is a company. @option opts [String] :last_name Last name, if the user is an individual. Leave blank if this user is a company. @option opts [String] :business_name Business name. Only use this field if this user is a business entity. @option opts [String] :contractor_type (default to INDIVIDUAL) @option opts [String] :default_account Default account to use for payment of unpaid income. @option opts [String] :tax_savings_account Account to use for tax savings. @option opts [String] :tax_savings_percent The percent of income to be withheld for tax savings purposes. @option opts [BOOLEAN] :use_plaid Feature flag specifying if Plaid integration should be used. @option opts [BOOLEAN] :use_income_requests Feature flag specifying if IncomeRequests should be enabled for this user. @option opts [BOOLEAN] :use_tax_savings Feature flag specifying if tax savings should be enabled. @option opts [BOOLEAN] :is_auto_cashout_enabled Whether or not all income should be immediately cashed out for this user. @option opts [String] :password @option opts [String] :personal_information @return [UserSerializer]

# File lib/qwil_api/api/users_api.rb, line 1717
def user_create(email, opts = {})
  data, _status_code, _headers = user_create_with_http_info(email, opts)
  return data
end
user_create_with_http_info(email, opts = {}) click to toggle source

The list of registered Qwil Users The list of registered Qwil Users. @param email @param [Hash] opts the optional parameters @option opts [String] :first_name First name, if the user is an individual. Leave blank if this user is a company. @option opts [String] :last_name Last name, if the user is an individual. Leave blank if this user is a company. @option opts [String] :business_name Business name. Only use this field if this user is a business entity. @option opts [String] :contractor_type @option opts [String] :default_account Default account to use for payment of unpaid income. @option opts [String] :tax_savings_account Account to use for tax savings. @option opts [String] :tax_savings_percent The percent of income to be withheld for tax savings purposes. @option opts [BOOLEAN] :use_plaid Feature flag specifying if Plaid integration should be used. @option opts [BOOLEAN] :use_income_requests Feature flag specifying if IncomeRequests should be enabled for this user. @option opts [BOOLEAN] :use_tax_savings Feature flag specifying if tax savings should be enabled. @option opts [BOOLEAN] :is_auto_cashout_enabled Whether or not all income should be immediately cashed out for this user. @option opts [String] :password @option opts [String] :personal_information @return [Array<(UserSerializer, Fixnum, Hash)>] UserSerializer data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 1740
def user_create_with_http_info(email, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.user_create ..."
  end
  # verify the required parameter 'email' is set
  fail ArgumentError, "Missing the required parameter 'email' when calling UsersApi.user_create" if email.nil?
  if opts[:'contractor_type'] && !['INDIVIDUAL', 'BUSINESS'].include?(opts[:'contractor_type'])
    fail ArgumentError, 'invalid value for "contractor_type", must be one of INDIVIDUAL, BUSINESS'
  end
  # resource path
  local_var_path = "/users/".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  form_params["email"] = email
  form_params["first_name"] = opts[:'first_name'] if !opts[:'first_name'].nil?
  form_params["last_name"] = opts[:'last_name'] if !opts[:'last_name'].nil?
  form_params["business_name"] = opts[:'business_name'] if !opts[:'business_name'].nil?
  form_params["contractor_type"] = opts[:'contractor_type'] if !opts[:'contractor_type'].nil?
  form_params["default_account"] = opts[:'default_account'] if !opts[:'default_account'].nil?
  form_params["tax_savings_account"] = opts[:'tax_savings_account'] if !opts[:'tax_savings_account'].nil?
  form_params["tax_savings_percent"] = opts[:'tax_savings_percent'] if !opts[:'tax_savings_percent'].nil?
  form_params["use_plaid"] = opts[:'use_plaid'] if !opts[:'use_plaid'].nil?
  form_params["use_income_requests"] = opts[:'use_income_requests'] if !opts[:'use_income_requests'].nil?
  form_params["use_tax_savings"] = opts[:'use_tax_savings'] if !opts[:'use_tax_savings'].nil?
  form_params["is_auto_cashout_enabled"] = opts[:'is_auto_cashout_enabled'] if !opts[:'is_auto_cashout_enabled'].nil?
  form_params["password"] = opts[:'password'] if !opts[:'password'].nil?
  form_params["personal_information"] = opts[:'personal_information'] if !opts[:'personal_information'].nil?

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'UserSerializer')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#user_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
user_income_request_create(user_pk, amount, platform, opts = {}) click to toggle source

@param user_pk @param amount The dollar value of income requested by the User @param platform The platform that the User is requesting Income from. @param [Hash] opts the optional parameters @option opts [String] :note Text visible to the Platform and User describing the Income Request @return [UserIncomeRequestSerializer]

# File lib/qwil_api/api/users_api.rb, line 1807
def user_income_request_create(user_pk, amount, platform, opts = {})
  data, _status_code, _headers = user_income_request_create_with_http_info(user_pk, amount, platform, opts)
  return data
end
user_income_request_create_with_http_info(user_pk, amount, platform, opts = {}) click to toggle source

@param user_pk @param amount The dollar value of income requested by the User @param platform The platform that the User is requesting Income from. @param [Hash] opts the optional parameters @option opts [String] :note Text visible to the Platform and User describing the Income Request @return [Array<(UserIncomeRequestSerializer, Fixnum, Hash)>] UserIncomeRequestSerializer data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 1820
def user_income_request_create_with_http_info(user_pk, amount, platform, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.user_income_request_create ..."
  end
  # verify the required parameter 'user_pk' is set
  fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.user_income_request_create" if user_pk.nil?
  # verify the required parameter 'amount' is set
  fail ArgumentError, "Missing the required parameter 'amount' when calling UsersApi.user_income_request_create" if amount.nil?
  # verify the required parameter 'platform' is set
  fail ArgumentError, "Missing the required parameter 'platform' when calling UsersApi.user_income_request_create" if platform.nil?
  # resource path
  local_var_path = "/users/{user_pk}/income_requests/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  form_params["amount"] = amount
  form_params["platform"] = platform
  form_params["note"] = opts[:'note'] if !opts[:'note'].nil?

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'UserIncomeRequestSerializer')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#user_income_request_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
user_income_request_list(user_pk, opts = {}) click to toggle source

@param user_pk @param [Hash] opts the optional parameters @return [Array<UserIncomeRequestSerializer>]

# File lib/qwil_api/api/users_api.rb, line 1874
def user_income_request_list(user_pk, opts = {})
  data, _status_code, _headers = user_income_request_list_with_http_info(user_pk, opts)
  return data
end
user_income_request_list_with_http_info(user_pk, opts = {}) click to toggle source

@param user_pk @param [Hash] opts the optional parameters @return [Array<(Array<UserIncomeRequestSerializer>, Fixnum, Hash)>] Array<UserIncomeRequestSerializer> data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 1884
def user_income_request_list_with_http_info(user_pk, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.user_income_request_list ..."
  end
  # verify the required parameter 'user_pk' is set
  fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.user_income_request_list" if user_pk.nil?
  # resource path
  local_var_path = "/users/{user_pk}/income_requests/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'Array<UserIncomeRequestSerializer>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#user_income_request_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
user_income_request_retrieve(user_pk, pk, opts = {}) click to toggle source

@param user_pk @param pk @param [Hash] opts the optional parameters @return [UserIncomeRequestSerializer]

# File lib/qwil_api/api/users_api.rb, line 1932
def user_income_request_retrieve(user_pk, pk, opts = {})
  data, _status_code, _headers = user_income_request_retrieve_with_http_info(user_pk, pk, opts)
  return data
end
user_income_request_retrieve_with_http_info(user_pk, pk, opts = {}) click to toggle source

@param user_pk @param pk @param [Hash] opts the optional parameters @return [Array<(UserIncomeRequestSerializer, Fixnum, Hash)>] UserIncomeRequestSerializer data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 1943
def user_income_request_retrieve_with_http_info(user_pk, pk, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.user_income_request_retrieve ..."
  end
  # verify the required parameter 'user_pk' is set
  fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.user_income_request_retrieve" if user_pk.nil?
  # verify the required parameter 'pk' is set
  fail ArgumentError, "Missing the required parameter 'pk' when calling UsersApi.user_income_request_retrieve" if pk.nil?
  # resource path
  local_var_path = "/users/{user_pk}/income_requests/{pk}/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s).sub('{' + 'pk' + '}', pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'UserIncomeRequestSerializer')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#user_income_request_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
user_list(opts = {}) click to toggle source

The list of registered Qwil Users The list of registered Qwil Users. @param [Hash] opts the optional parameters @return [Array<ContractorSerializer>]

# File lib/qwil_api/api/users_api.rb, line 1991
def user_list(opts = {})
  data, _status_code, _headers = user_list_with_http_info(opts)
  return data
end
user_list_with_http_info(opts = {}) click to toggle source

The list of registered Qwil Users The list of registered Qwil Users. @param [Hash] opts the optional parameters @return [Array<(Array<ContractorSerializer>, Fixnum, Hash)>] Array<ContractorSerializer> data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 2000
def user_list_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.user_list ..."
  end
  # resource path
  local_var_path = "/users/".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'Array<ContractorSerializer>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#user_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
user_partial_update(pk, opts = {}) click to toggle source

The list of registered Qwil Users The list of registered Qwil Users. @param pk @param [Hash] opts the optional parameters @option opts [String] :email @option opts [String] :first_name First name, if the user is an individual. Leave blank if this user is a company. @option opts [String] :last_name Last name, if the user is an individual. Leave blank if this user is a company. @option opts [String] :business_name Business name. Only use this field if this user is a business entity. @option opts [String] :contractor_type (default to INDIVIDUAL) @option opts [String] :personal_information @option opts [String] :default_account Default account to use for payment of unpaid income. @return [ContractorSerializer]

# File lib/qwil_api/api/users_api.rb, line 2052
def user_partial_update(pk, opts = {})
  data, _status_code, _headers = user_partial_update_with_http_info(pk, opts)
  return data
end
user_partial_update_with_http_info(pk, opts = {}) click to toggle source

The list of registered Qwil Users The list of registered Qwil Users. @param pk @param [Hash] opts the optional parameters @option opts [String] :email @option opts [String] :first_name First name, if the user is an individual. Leave blank if this user is a company. @option opts [String] :last_name Last name, if the user is an individual. Leave blank if this user is a company. @option opts [String] :business_name Business name. Only use this field if this user is a business entity. @option opts [String] :contractor_type @option opts [String] :personal_information @option opts [String] :default_account Default account to use for payment of unpaid income. @return [Array<(ContractorSerializer, Fixnum, Hash)>] ContractorSerializer data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 2069
def user_partial_update_with_http_info(pk, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.user_partial_update ..."
  end
  # verify the required parameter 'pk' is set
  fail ArgumentError, "Missing the required parameter 'pk' when calling UsersApi.user_partial_update" if pk.nil?
  if opts[:'contractor_type'] && !['INDIVIDUAL', 'BUSINESS'].include?(opts[:'contractor_type'])
    fail ArgumentError, 'invalid value for "contractor_type", must be one of INDIVIDUAL, BUSINESS'
  end
  # resource path
  local_var_path = "/users/{pk}/".sub('{format}','json').sub('{' + 'pk' + '}', pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  form_params["email"] = opts[:'email'] if !opts[:'email'].nil?
  form_params["first_name"] = opts[:'first_name'] if !opts[:'first_name'].nil?
  form_params["last_name"] = opts[:'last_name'] if !opts[:'last_name'].nil?
  form_params["business_name"] = opts[:'business_name'] if !opts[:'business_name'].nil?
  form_params["contractor_type"] = opts[:'contractor_type'] if !opts[:'contractor_type'].nil?
  form_params["personal_information"] = opts[:'personal_information'] if !opts[:'personal_information'].nil?
  form_params["default_account"] = opts[:'default_account'] if !opts[:'default_account'].nil?

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ContractorSerializer')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#user_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
user_platform_membership_request_create(user_pk, platform, opts = {}) click to toggle source

@param user_pk @param platform The platform that the User requests to join. @param [Hash] opts the optional parameters @option opts [String] :decision_maker @return [UserPlatformMembershipRequestSerializer]

# File lib/qwil_api/api/users_api.rb, line 2128
def user_platform_membership_request_create(user_pk, platform, opts = {})
  data, _status_code, _headers = user_platform_membership_request_create_with_http_info(user_pk, platform, opts)
  return data
end
user_platform_membership_request_create_with_http_info(user_pk, platform, opts = {}) click to toggle source

@param user_pk @param platform The platform that the User requests to join. @param [Hash] opts the optional parameters @option opts [String] :decision_maker @return [Array<(UserPlatformMembershipRequestSerializer, Fixnum, Hash)>] UserPlatformMembershipRequestSerializer data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 2140
def user_platform_membership_request_create_with_http_info(user_pk, platform, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.user_platform_membership_request_create ..."
  end
  # verify the required parameter 'user_pk' is set
  fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.user_platform_membership_request_create" if user_pk.nil?
  # verify the required parameter 'platform' is set
  fail ArgumentError, "Missing the required parameter 'platform' when calling UsersApi.user_platform_membership_request_create" if platform.nil?
  # resource path
  local_var_path = "/users/{user_pk}/platform_membership_requests/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

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

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'UserPlatformMembershipRequestSerializer')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#user_platform_membership_request_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
user_platform_membership_request_list(user_pk, opts = {}) click to toggle source

@param user_pk @param [Hash] opts the optional parameters @return [Array<UserPlatformMembershipRequestSerializer>]

# File lib/qwil_api/api/users_api.rb, line 2191
def user_platform_membership_request_list(user_pk, opts = {})
  data, _status_code, _headers = user_platform_membership_request_list_with_http_info(user_pk, opts)
  return data
end
user_platform_membership_request_list_with_http_info(user_pk, opts = {}) click to toggle source

@param user_pk @param [Hash] opts the optional parameters @return [Array<(Array<UserPlatformMembershipRequestSerializer>, Fixnum, Hash)>] Array<UserPlatformMembershipRequestSerializer> data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 2201
def user_platform_membership_request_list_with_http_info(user_pk, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.user_platform_membership_request_list ..."
  end
  # verify the required parameter 'user_pk' is set
  fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.user_platform_membership_request_list" if user_pk.nil?
  # resource path
  local_var_path = "/users/{user_pk}/platform_membership_requests/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'Array<UserPlatformMembershipRequestSerializer>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#user_platform_membership_request_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
user_platform_membership_request_retrieve(user_pk, pk, opts = {}) click to toggle source

@param user_pk @param pk @param [Hash] opts the optional parameters @return [UserPlatformMembershipRequestSerializer]

# File lib/qwil_api/api/users_api.rb, line 2249
def user_platform_membership_request_retrieve(user_pk, pk, opts = {})
  data, _status_code, _headers = user_platform_membership_request_retrieve_with_http_info(user_pk, pk, opts)
  return data
end
user_platform_membership_request_retrieve_with_http_info(user_pk, pk, opts = {}) click to toggle source

@param user_pk @param pk @param [Hash] opts the optional parameters @return [Array<(UserPlatformMembershipRequestSerializer, Fixnum, Hash)>] UserPlatformMembershipRequestSerializer data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 2260
def user_platform_membership_request_retrieve_with_http_info(user_pk, pk, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.user_platform_membership_request_retrieve ..."
  end
  # verify the required parameter 'user_pk' is set
  fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.user_platform_membership_request_retrieve" if user_pk.nil?
  # verify the required parameter 'pk' is set
  fail ArgumentError, "Missing the required parameter 'pk' when calling UsersApi.user_platform_membership_request_retrieve" if pk.nil?
  # resource path
  local_var_path = "/users/{user_pk}/platform_membership_requests/{pk}/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s).sub('{' + 'pk' + '}', pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'UserPlatformMembershipRequestSerializer')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#user_platform_membership_request_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
user_retrieve(pk, opts = {}) click to toggle source

The list of registered Qwil Users The list of registered Qwil Users. @param pk @param [Hash] opts the optional parameters @return [ContractorSerializer]

# File lib/qwil_api/api/users_api.rb, line 2309
def user_retrieve(pk, opts = {})
  data, _status_code, _headers = user_retrieve_with_http_info(pk, opts)
  return data
end
user_retrieve_with_http_info(pk, opts = {}) click to toggle source

The list of registered Qwil Users The list of registered Qwil Users. @param pk @param [Hash] opts the optional parameters @return [Array<(ContractorSerializer, Fixnum, Hash)>] ContractorSerializer data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 2319
def user_retrieve_with_http_info(pk, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.user_retrieve ..."
  end
  # verify the required parameter 'pk' is set
  fail ArgumentError, "Missing the required parameter 'pk' when calling UsersApi.user_retrieve" if pk.nil?
  # resource path
  local_var_path = "/users/{pk}/".sub('{format}','json').sub('{' + 'pk' + '}', pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'ContractorSerializer')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#user_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
user_update(pk, email, opts = {}) click to toggle source

The list of registered Qwil Users The list of registered Qwil Users. @param pk @param email @param [Hash] opts the optional parameters @option opts [String] :first_name First name, if the user is an individual. Leave blank if this user is a company. @option opts [String] :last_name Last name, if the user is an individual. Leave blank if this user is a company. @option opts [String] :business_name Business name. Only use this field if this user is a business entity. @option opts [String] :contractor_type (default to INDIVIDUAL) @option opts [String] :personal_information @option opts [String] :default_account Default account to use for payment of unpaid income. @return [ContractorSerializer]

# File lib/qwil_api/api/users_api.rb, line 2373
def user_update(pk, email, opts = {})
  data, _status_code, _headers = user_update_with_http_info(pk, email, opts)
  return data
end
user_update_with_http_info(pk, email, opts = {}) click to toggle source

The list of registered Qwil Users The list of registered Qwil Users. @param pk @param email @param [Hash] opts the optional parameters @option opts [String] :first_name First name, if the user is an individual. Leave blank if this user is a company. @option opts [String] :last_name Last name, if the user is an individual. Leave blank if this user is a company. @option opts [String] :business_name Business name. Only use this field if this user is a business entity. @option opts [String] :contractor_type @option opts [String] :personal_information @option opts [String] :default_account Default account to use for payment of unpaid income. @return [Array<(ContractorSerializer, Fixnum, Hash)>] ContractorSerializer data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 2390
def user_update_with_http_info(pk, email, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.user_update ..."
  end
  # verify the required parameter 'pk' is set
  fail ArgumentError, "Missing the required parameter 'pk' when calling UsersApi.user_update" if pk.nil?
  # verify the required parameter 'email' is set
  fail ArgumentError, "Missing the required parameter 'email' when calling UsersApi.user_update" if email.nil?
  if opts[:'contractor_type'] && !['INDIVIDUAL', 'BUSINESS'].include?(opts[:'contractor_type'])
    fail ArgumentError, 'invalid value for "contractor_type", must be one of INDIVIDUAL, BUSINESS'
  end
  # resource path
  local_var_path = "/users/{pk}/".sub('{format}','json').sub('{' + 'pk' + '}', pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  form_params["email"] = email
  form_params["first_name"] = opts[:'first_name'] if !opts[:'first_name'].nil?
  form_params["last_name"] = opts[:'last_name'] if !opts[:'last_name'].nil?
  form_params["business_name"] = opts[:'business_name'] if !opts[:'business_name'].nil?
  form_params["contractor_type"] = opts[:'contractor_type'] if !opts[:'contractor_type'].nil?
  form_params["personal_information"] = opts[:'personal_information'] if !opts[:'personal_information'].nil?
  form_params["default_account"] = opts[:'default_account'] if !opts[:'default_account'].nil?

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ContractorSerializer')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#user_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
xero_account_get(user_pk, opts = {}) click to toggle source

@param user_pk @param [Hash] opts the optional parameters @return [Object]

# File lib/qwil_api/api/users_api.rb, line 2449
def xero_account_get(user_pk, opts = {})
  data, _status_code, _headers = xero_account_get_with_http_info(user_pk, opts)
  return data
end
xero_account_get_with_http_info(user_pk, opts = {}) click to toggle source

@param user_pk @param [Hash] opts the optional parameters @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 2459
def xero_account_get_with_http_info(user_pk, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.xero_account_get ..."
  end
  # verify the required parameter 'user_pk' is set
  fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.xero_account_get" if user_pk.nil?
  # resource path
  local_var_path = "/users/{user_pk}/integrations/xero/accounts/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#xero_account_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
xero_account_put(user_pk, opts = {}) click to toggle source

@param user_pk @param [Hash] opts the optional parameters @return [Object]

# File lib/qwil_api/api/users_api.rb, line 2506
def xero_account_put(user_pk, opts = {})
  data, _status_code, _headers = xero_account_put_with_http_info(user_pk, opts)
  return data
end
xero_account_put_with_http_info(user_pk, opts = {}) click to toggle source

@param user_pk @param [Hash] opts the optional parameters @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 2516
def xero_account_put_with_http_info(user_pk, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.xero_account_put ..."
  end
  # verify the required parameter 'user_pk' is set
  fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.xero_account_put" if user_pk.nil?
  # resource path
  local_var_path = "/users/{user_pk}/integrations/xero/accounts/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#xero_account_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
xero_auth_callback_get(user_pk, opts = {}) click to toggle source

@param user_pk @param [Hash] opts the optional parameters @return [Object]

# File lib/qwil_api/api/users_api.rb, line 2563
def xero_auth_callback_get(user_pk, opts = {})
  data, _status_code, _headers = xero_auth_callback_get_with_http_info(user_pk, opts)
  return data
end
xero_auth_callback_get_with_http_info(user_pk, opts = {}) click to toggle source

@param user_pk @param [Hash] opts the optional parameters @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 2573
def xero_auth_callback_get_with_http_info(user_pk, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.xero_auth_callback_get ..."
  end
  # verify the required parameter 'user_pk' is set
  fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.xero_auth_callback_get" if user_pk.nil?
  # resource path
  local_var_path = "/users/{user_pk}/integrations/xero/authenticate/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#xero_auth_callback_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
xero_auth_url_get(user_pk, opts = {}) click to toggle source

@param user_pk @param [Hash] opts the optional parameters @return [Object]

# File lib/qwil_api/api/users_api.rb, line 2620
def xero_auth_url_get(user_pk, opts = {})
  data, _status_code, _headers = xero_auth_url_get_with_http_info(user_pk, opts)
  return data
end
xero_auth_url_get_with_http_info(user_pk, opts = {}) click to toggle source

@param user_pk @param [Hash] opts the optional parameters @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers

# File lib/qwil_api/api/users_api.rb, line 2630
def xero_auth_url_get_with_http_info(user_pk, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.xero_auth_url_get ..."
  end
  # verify the required parameter 'user_pk' is set
  fail ArgumentError, "Missing the required parameter 'user_pk' when calling UsersApi.xero_auth_url_get" if user_pk.nil?
  # resource path
  local_var_path = "/users/{user_pk}/integrations/xero/".sub('{format}','json').sub('{' + 'user_pk' + '}', user_pk.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#xero_auth_url_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end