Class: QwilAPI::UsersApi

Inherits:
Object
  • Object
show all
Defined in:
lib/qwil_api/api/users_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ UsersApi

Returns a new instance of UsersApi.



28
29
30
# File 'lib/qwil_api/api/users_api.rb', line 28

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



26
27
28
# File 'lib/qwil_api/api/users_api.rb', line 26

def api_client
  @api_client
end

Instance Method Details

#account_user_create(user_pk, account_number, name, routing_number, opts = {}) ⇒ UserAccountSerializer

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": "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", … }

Parameters:

  • user_pk
  • account_number
  • name

    The user&#39;s label for this Account.

  • routing_number

    The inter-bank routing nubmer for this Account. 8 or 9 digits in length.

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

    the optional parameters

Options Hash (opts):

  • :is_paypal (BOOLEAN)

    Flag specifying if the Account is a Paypal account.

  • :is_mychoice (BOOLEAN)

    Flag specifying if the Account is a MyChoice card. If it is, the mychoice_user_id and mychoice_card_id must be filled in.

  • :mychoice_user_id (Integer)

    For MyChoice Accounts. Populated from the MyChoice API.

  • :mychoice_card_id (Integer)

    For MyChoice Accounts. Populated from the MyChoice API.

Returns:



44
45
46
47
# File 'lib/qwil_api/api/users_api.rb', line 44

def (user_pk, , name, routing_number, opts = {})
  data, _status_code, _headers = (user_pk, , name, routing_number, opts)
  return data
end

#account_user_create_with_http_info(user_pk, account_number, name, routing_number, opts = {}) ⇒ Array<(UserAccountSerializer, Fixnum, Hash)>

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/ … { &quot;url&quot;: &quot;api.qwil.co/accounts/2/&quot;, … }&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/ { … &quot;deleted&quot;: &quot;true&quot;, … }

Parameters:

  • user_pk
  • account_number
  • name

    The user&#39;s label for this Account.

  • routing_number

    The inter-bank routing nubmer for this Account. 8 or 9 digits in length.

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

    the optional parameters

Options Hash (opts):

  • :is_paypal (BOOLEAN)

    Flag specifying if the Account is a Paypal account.

  • :is_mychoice (BOOLEAN)

    Flag specifying if the Account is a MyChoice card. If it is, the mychoice_user_id and mychoice_card_id must be filled in.

  • :mychoice_user_id (Integer)

    For MyChoice Accounts. Populated from the MyChoice API.

  • :mychoice_card_id (Integer)

    For MyChoice Accounts. Populated from the MyChoice API.

Returns:

  • (Array<(UserAccountSerializer, Fixnum, Hash)>)

    UserAccountSerializer data, response status code and response headers



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# File 'lib/qwil_api/api/users_api.rb', line 61

def (user_pk, , 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 .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"] = 
  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 = {}) ⇒ UserAccountSerializer

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": "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", … }

Parameters:

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

    the optional parameters

Returns:



122
123
124
125
# File 'lib/qwil_api/api/users_api.rb', line 122

def (user_pk, pk, opts = {})
  data, _status_code, _headers = (user_pk, pk, opts)
  return data
end

#account_user_destroy_with_http_info(user_pk, pk, opts = {}) ⇒ Array<(UserAccountSerializer, Fixnum, Hash)>

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/ … { &quot;url&quot;: &quot;api.qwil.co/accounts/2/&quot;, … }&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/ { … &quot;deleted&quot;: &quot;true&quot;, … }

Parameters:

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

    the optional parameters

Returns:

  • (Array<(UserAccountSerializer, Fixnum, Hash)>)

    UserAccountSerializer data, response status code and response headers



133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
# File 'lib/qwil_api/api/users_api.rb', line 133

def (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 = {}) ⇒ Array<UserAccountSerializer>

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": "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", … }

Parameters:

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

    the optional parameters

Returns:



182
183
184
185
# File 'lib/qwil_api/api/users_api.rb', line 182

def (user_pk, opts = {})
  data, _status_code, _headers = (user_pk, opts)
  return data
end

#account_user_list_with_http_info(user_pk, opts = {}) ⇒ Array<(Array<UserAccountSerializer>, Fixnum, Hash)>

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/ … { &quot;url&quot;: &quot;api.qwil.co/accounts/2/&quot;, … }&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/ { … &quot;deleted&quot;: &quot;true&quot;, … }

Parameters:

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

    the optional parameters

Returns:

  • (Array<(Array<UserAccountSerializer>, Fixnum, Hash)>)

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



192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
# File 'lib/qwil_api/api/users_api.rb', line 192

def (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 = {}) ⇒ UserAccountSerializer

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": "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", … }

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :account_number (String)
  • :name (String)

    The user&#39;s label for this Account.

  • :routing_number (String)

    The inter-bank routing nubmer for this Account. 8 or 9 digits in length.

  • :is_paypal (BOOLEAN)

    Flag specifying if the Account is a Paypal account.

  • :is_mychoice (BOOLEAN)

    Flag specifying if the Account is a MyChoice card. If it is, the mychoice_user_id and mychoice_card_id must be filled in.

  • :mychoice_user_id (Integer)

    For MyChoice Accounts. Populated from the MyChoice API.

  • :mychoice_card_id (Integer)

    For MyChoice Accounts. Populated from the MyChoice API.

Returns:



247
248
249
250
# File 'lib/qwil_api/api/users_api.rb', line 247

def (user_pk, pk, opts = {})
  data, _status_code, _headers = (user_pk, pk, opts)
  return data
end

#account_user_partial_update_with_http_info(user_pk, pk, opts = {}) ⇒ Array<(UserAccountSerializer, Fixnum, Hash)>

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/ … { &quot;url&quot;: &quot;api.qwil.co/accounts/2/&quot;, … }&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/ { … &quot;deleted&quot;: &quot;true&quot;, … }

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :account_number (String)
  • :name (String)

    The user&#39;s label for this Account.

  • :routing_number (String)

    The inter-bank routing nubmer for this Account. 8 or 9 digits in length.

  • :is_paypal (BOOLEAN)

    Flag specifying if the Account is a Paypal account.

  • :is_mychoice (BOOLEAN)

    Flag specifying if the Account is a MyChoice card. If it is, the mychoice_user_id and mychoice_card_id must be filled in.

  • :mychoice_user_id (Integer)

    For MyChoice Accounts. Populated from the MyChoice API.

  • :mychoice_card_id (Integer)

    For MyChoice Accounts. Populated from the MyChoice API.

Returns:

  • (Array<(UserAccountSerializer, Fixnum, Hash)>)

    UserAccountSerializer data, response status code and response headers



265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
# File 'lib/qwil_api/api/users_api.rb', line 265

def (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 = {}) ⇒ UserAccountSerializer

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": "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", … }

Parameters:

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

    the optional parameters

Returns:



322
323
324
325
# File 'lib/qwil_api/api/users_api.rb', line 322

def (user_pk, pk, opts = {})
  data, _status_code, _headers = (user_pk, pk, opts)
  return data
end

#account_user_retrieve_with_http_info(user_pk, pk, opts = {}) ⇒ Array<(UserAccountSerializer, Fixnum, Hash)>

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/ … { &quot;url&quot;: &quot;api.qwil.co/accounts/2/&quot;, … }&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/ { … &quot;deleted&quot;: &quot;true&quot;, … }

Parameters:

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

    the optional parameters

Returns:

  • (Array<(UserAccountSerializer, Fixnum, Hash)>)

    UserAccountSerializer data, response status code and response headers



333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
# File 'lib/qwil_api/api/users_api.rb', line 333

def (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 = {}) ⇒ UserAccountSerializer

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": "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", … }

Parameters:

  • user_pk
  • pk
  • account_number
  • name

    The user&#39;s label for this Account.

  • routing_number

    The inter-bank routing nubmer for this Account. 8 or 9 digits in length.

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

    the optional parameters

Options Hash (opts):

  • :is_paypal (BOOLEAN)

    Flag specifying if the Account is a Paypal account.

  • :is_mychoice (BOOLEAN)

    Flag specifying if the Account is a MyChoice card. If it is, the mychoice_user_id and mychoice_card_id must be filled in.

  • :mychoice_user_id (Integer)

    For MyChoice Accounts. Populated from the MyChoice API.

  • :mychoice_card_id (Integer)

    For MyChoice Accounts. Populated from the MyChoice API.

Returns:



390
391
392
393
# File 'lib/qwil_api/api/users_api.rb', line 390

def (user_pk, pk, , name, routing_number, opts = {})
  data, _status_code, _headers = (user_pk, pk, , name, routing_number, opts)
  return data
end

#account_user_update_with_http_info(user_pk, pk, account_number, name, routing_number, opts = {}) ⇒ Array<(UserAccountSerializer, Fixnum, Hash)>

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/ … { &quot;url&quot;: &quot;api.qwil.co/accounts/2/&quot;, … }&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/ { … &quot;deleted&quot;: &quot;true&quot;, … }

Parameters:

  • user_pk
  • pk
  • account_number
  • name

    The user&#39;s label for this Account.

  • routing_number

    The inter-bank routing nubmer for this Account. 8 or 9 digits in length.

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

    the optional parameters

Options Hash (opts):

  • :is_paypal (BOOLEAN)

    Flag specifying if the Account is a Paypal account.

  • :is_mychoice (BOOLEAN)

    Flag specifying if the Account is a MyChoice card. If it is, the mychoice_user_id and mychoice_card_id must be filled in.

  • :mychoice_user_id (Integer)

    For MyChoice Accounts. Populated from the MyChoice API.

  • :mychoice_card_id (Integer)

    For MyChoice Accounts. Populated from the MyChoice API.

Returns:

  • (Array<(UserAccountSerializer, Fixnum, Hash)>)

    UserAccountSerializer data, response status code and response headers



408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
# File 'lib/qwil_api/api/users_api.rb', line 408

def (user_pk, pk, , 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 .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"] = 
  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 = {}) ⇒ PlatformSummarySerializer

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.

Parameters:

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

    the optional parameters

Returns:



471
472
473
474
# 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 = {}) ⇒ Array<(PlatformSummarySerializer, Fixnum, Hash)>

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.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(PlatformSummarySerializer, Fixnum, Hash)>)

    PlatformSummarySerializer data, response status code and response headers



482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
# 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 = {}) ⇒ Object

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.

Parameters:

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

    the optional parameters

Returns:

  • (Object)


533
534
535
536
# 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 = {}) ⇒ Array<(Object, Fixnum, Hash)>

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.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
# 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 = {}) ⇒ Object

On POST, cancel the income request View to offer a ./cancel endpoint for cancelling an IncomeRequest. <br/>On POST, cancel the income request.

Parameters:

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

    the optional parameters

Returns:

  • (Object)


594
595
596
597
# 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 = {}) ⇒ Array<(Object, Fixnum, Hash)>

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.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
# 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 = {}) ⇒ Object

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.

Parameters:

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

    the optional parameters

Returns:

  • (Object)


655
656
657
658
# 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 = {}) ⇒ Array<(Object, Fixnum, Hash)>

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.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
# 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 = {}) ⇒ Object

On POST, cancel the membership request View to offer a ./accept endpoint for accepting a PlatformMembershipRequest. <br/>On POST, cancel the membership request.

Parameters:

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

    the optional parameters

Returns:

  • (Object)


716
717
718
719
# 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 = {}) ⇒ Array<(Object, Fixnum, Hash)>

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.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
# 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 = {}) ⇒ CashoutCalculationSerializer

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.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :amount (String)

    The Cashout amount to calculate fees for. (This amount is net, i.e. before fees).

Returns:



777
778
779
780
# 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 = {}) ⇒ Array<(CashoutCalculationSerializer, Fixnum, Hash)>

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.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :amount (String)

    The Cashout amount to calculate fees for. (This amount is net, i.e. before fees).

Returns:



788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
# 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 = {}) ⇒ CashoutCalculationSerializer

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.

Parameters:

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

    the optional parameters

Returns:



836
837
838
839
# 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 = {}) ⇒ Array<(CashoutCalculationSerializer, Fixnum, Hash)>

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.

Parameters:

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

    the optional parameters

Returns:



846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
# 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 = {}) ⇒ UserCashoutSerializer

The Cashouts for a specific User The Cashouts for a specific User. Enables create, retrieve, list.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :cashout_time (DateTime)
  • :notes (String)
  • :type (String)
  • :method (String)
  • :transmit_time (DateTime)
  • :rebate (String)

    The Rebate against which this Cashout will be collected.

  • :account (String)

Returns:



901
902
903
904
# 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 = {}) ⇒ Array<(UserCashoutSerializer, Fixnum, Hash)>

The Cashouts for a specific User The Cashouts for a specific User. Enables create, retrieve, list.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :cashout_time (DateTime)
  • :notes (String)
  • :type (String)
  • :method (String)
  • :transmit_time (DateTime)
  • :rebate (String)

    The Rebate against which this Cashout will be collected.

  • :account (String)

Returns:

  • (Array<(UserCashoutSerializer, Fixnum, Hash)>)

    UserCashoutSerializer data, response status code and response headers



919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
# 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 = {}) ⇒ Array<UserCashoutSerializer>

The Cashouts for a specific User The Cashouts for a specific User. Enables create, retrieve, list.

Parameters:

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

    the optional parameters

Returns:



982
983
984
985
# 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 = {}) ⇒ Array<(Array<UserCashoutSerializer>, Fixnum, Hash)>

The Cashouts for a specific User The Cashouts for a specific User. Enables create, retrieve, list.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(Array<UserCashoutSerializer>, Fixnum, Hash)>)

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



992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
# 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 = {}) ⇒ UserCashoutSerializer

The Cashouts for a specific User The Cashouts for a specific User. Enables create, retrieve, list.

Parameters:

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

    the optional parameters

Returns:



1040
1041
1042
1043
# 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 = {}) ⇒ Array<(UserCashoutSerializer, Fixnum, Hash)>

The Cashouts for a specific User The Cashouts for a specific User. Enables create, retrieve, list.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(UserCashoutSerializer, Fixnum, Hash)>)

    UserCashoutSerializer data, response status code and response headers



1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
# 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 = {}) ⇒ Array<IncomeSerializerFixedSource>

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.

Parameters:

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

    the optional parameters

Returns:



1100
1101
1102
1103
# 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 = {}) ⇒ Array<(Array<IncomeSerializerFixedSource>, Fixnum, Hash)>

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.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(Array<IncomeSerializerFixedSource>, Fixnum, Hash)>)

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



1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
# 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 = {}) ⇒ UserSerializer

The currently logged in User The currently logged in User.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :email (String)
  • :first_name (String)

    First name, if the user is an individual. Leave blank if this user is a company.

  • :last_name (String)

    Last name, if the user is an individual. Leave blank if this user is a company.

  • :business_name (String)

    Business name. Only use this field if this user is a business entity.

  • :contractor_type (String) — default: default to INDIVIDUAL
  • :default_account (String)

    Default account to use for payment of unpaid income.

  • :tax_savings_account (String)

    Account to use for tax savings.

  • :tax_savings_percent (String)

    The percent of income to be withheld for tax savings purposes.

  • :use_plaid (BOOLEAN)

    Feature flag specifying if Plaid integration should be used.

  • :use_income_requests (BOOLEAN)

    Feature flag specifying if IncomeRequests should be enabled for this user.

  • :use_tax_savings (BOOLEAN)

    Feature flag specifying if tax savings should be enabled.

  • :is_auto_cashout_enabled (BOOLEAN)

    Whether or not all income should be immediately cashed out for this user.

  • :password (String)
  • :personal_information (String)

Returns:



1170
1171
1172
1173
# 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 = {}) ⇒ Array<(UserSerializer, Fixnum, Hash)>

The currently logged in User The currently logged in User.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :email (String)
  • :first_name (String)

    First name, if the user is an individual. Leave blank if this user is a company.

  • :last_name (String)

    Last name, if the user is an individual. Leave blank if this user is a company.

  • :business_name (String)

    Business name. Only use this field if this user is a business entity.

  • :contractor_type (String)
  • :default_account (String)

    Default account to use for payment of unpaid income.

  • :tax_savings_account (String)

    Account to use for tax savings.

  • :tax_savings_percent (String)

    The percent of income to be withheld for tax savings purposes.

  • :use_plaid (BOOLEAN)

    Feature flag specifying if Plaid integration should be used.

  • :use_income_requests (BOOLEAN)

    Feature flag specifying if IncomeRequests should be enabled for this user.

  • :use_tax_savings (BOOLEAN)

    Feature flag specifying if tax savings should be enabled.

  • :is_auto_cashout_enabled (BOOLEAN)

    Whether or not all income should be immediately cashed out for this user.

  • :password (String)
  • :personal_information (String)

Returns:

  • (Array<(UserSerializer, Fixnum, Hash)>)

    UserSerializer data, response status code and response headers



1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
# 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 = {}) ⇒ UserSerializer

The currently logged in User The currently logged in User.

Parameters:

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

    the optional parameters

Returns:



1254
1255
1256
1257
# 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 = {}) ⇒ Array<(UserSerializer, Fixnum, Hash)>

The currently logged in User The currently logged in User.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(UserSerializer, Fixnum, Hash)>)

    UserSerializer data, response status code and response headers



1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
# 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 = {}) ⇒ UserSerializer

The currently logged in User The currently logged in User.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :first_name (String)

    First name, if the user is an individual. Leave blank if this user is a company.

  • :last_name (String)

    Last name, if the user is an individual. Leave blank if this user is a company.

  • :business_name (String)

    Business name. Only use this field if this user is a business entity.

  • :contractor_type (String) — default: default to INDIVIDUAL
  • :default_account (String)

    Default account to use for payment of unpaid income.

  • :tax_savings_account (String)

    Account to use for tax savings.

  • :tax_savings_percent (String)

    The percent of income to be withheld for tax savings purposes.

  • :use_plaid (BOOLEAN)

    Feature flag specifying if Plaid integration should be used.

  • :use_income_requests (BOOLEAN)

    Feature flag specifying if IncomeRequests should be enabled for this user.

  • :use_tax_savings (BOOLEAN)

    Feature flag specifying if tax savings should be enabled.

  • :is_auto_cashout_enabled (BOOLEAN)

    Whether or not all income should be immediately cashed out for this user.

  • :password (String)
  • :personal_information (String)

Returns:



1321
1322
1323
1324
# 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 = {}) ⇒ Array<(UserSerializer, Fixnum, Hash)>

The currently logged in User The currently logged in User.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :first_name (String)

    First name, if the user is an individual. Leave blank if this user is a company.

  • :last_name (String)

    Last name, if the user is an individual. Leave blank if this user is a company.

  • :business_name (String)

    Business name. Only use this field if this user is a business entity.

  • :contractor_type (String)
  • :default_account (String)

    Default account to use for payment of unpaid income.

  • :tax_savings_account (String)

    Account to use for tax savings.

  • :tax_savings_percent (String)

    The percent of income to be withheld for tax savings purposes.

  • :use_plaid (BOOLEAN)

    Feature flag specifying if Plaid integration should be used.

  • :use_income_requests (BOOLEAN)

    Feature flag specifying if IncomeRequests should be enabled for this user.

  • :use_tax_savings (BOOLEAN)

    Feature flag specifying if tax savings should be enabled.

  • :is_auto_cashout_enabled (BOOLEAN)

    Whether or not all income should be immediately cashed out for this user.

  • :password (String)
  • :personal_information (String)

Returns:

  • (Array<(UserSerializer, Fixnum, Hash)>)

    UserSerializer data, response status code and response headers



1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
# 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 = {}) ⇒ PlaidPublicTokenSerializer

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.

Parameters:

  • user_pk
  • public_token

    A public_token generated by authenticating with Plaid Link.

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

    the optional parameters

Returns:



1409
1410
1411
1412
# 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 = {}) ⇒ Array<(PlaidPublicTokenSerializer, Fixnum, Hash)>

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.

Parameters:

  • user_pk
  • public_token

    A public_token generated by authenticating with Plaid Link.

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

    the optional parameters

Returns:

  • (Array<(PlaidPublicTokenSerializer, Fixnum, Hash)>)

    PlaidPublicTokenSerializer data, response status code and response headers



1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
# 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 = {}) ⇒ ReceivablesSerializer

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.

Parameters:

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

    the optional parameters

Returns:



1470
1471
1472
1473
# 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 = {}) ⇒ Array<(ReceivablesSerializer, Fixnum, Hash)>

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.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(ReceivablesSerializer, Fixnum, Hash)>)

    ReceivablesSerializer data, response status code and response headers



1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
# 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 = {}) ⇒ TaxSavingsSerializer

View for handling access to tax savings info for a User View for handling access to tax savings info for a User.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :tax_savings_percent (String)

    The percent of income to be withheld for tax savings purposes.

Returns:



1528
1529
1530
1531
# 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 = {}) ⇒ Array<(TaxSavingsSerializer, Fixnum, Hash)>

View for handling access to tax savings info for a User View for handling access to tax savings info for a User.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :tax_savings_percent (String)

    The percent of income to be withheld for tax savings purposes.

Returns:

  • (Array<(TaxSavingsSerializer, Fixnum, Hash)>)

    TaxSavingsSerializer data, response status code and response headers



1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
# 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 = {}) ⇒ TaxSavingsSerializer

View for handling access to tax savings info for a User View for handling access to tax savings info for a User.

Parameters:

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

    the optional parameters

Returns:



1587
1588
1589
1590
# 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 = {}) ⇒ Array<(TaxSavingsSerializer, Fixnum, Hash)>

View for handling access to tax savings info for a User View for handling access to tax savings info for a User.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(TaxSavingsSerializer, Fixnum, Hash)>)

    TaxSavingsSerializer data, response status code and response headers



1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
# 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 = {}) ⇒ TaxSavingsSerializer

View for handling access to tax savings info for a User View for handling access to tax savings info for a User.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :tax_savings_percent (String)

    The percent of income to be withheld for tax savings purposes.

Returns:



1645
1646
1647
1648
# 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 = {}) ⇒ Array<(TaxSavingsSerializer, Fixnum, Hash)>

View for handling access to tax savings info for a User View for handling access to tax savings info for a User.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :tax_savings_percent (String)

    The percent of income to be withheld for tax savings purposes.

Returns:

  • (Array<(TaxSavingsSerializer, Fixnum, Hash)>)

    TaxSavingsSerializer data, response status code and response headers



1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
# 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 = {}) ⇒ UserSerializer

The list of registered Qwil Users The list of registered Qwil Users.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :first_name (String)

    First name, if the user is an individual. Leave blank if this user is a company.

  • :last_name (String)

    Last name, if the user is an individual. Leave blank if this user is a company.

  • :business_name (String)

    Business name. Only use this field if this user is a business entity.

  • :contractor_type (String) — default: default to INDIVIDUAL
  • :default_account (String)

    Default account to use for payment of unpaid income.

  • :tax_savings_account (String)

    Account to use for tax savings.

  • :tax_savings_percent (String)

    The percent of income to be withheld for tax savings purposes.

  • :use_plaid (BOOLEAN)

    Feature flag specifying if Plaid integration should be used.

  • :use_income_requests (BOOLEAN)

    Feature flag specifying if IncomeRequests should be enabled for this user.

  • :use_tax_savings (BOOLEAN)

    Feature flag specifying if tax savings should be enabled.

  • :is_auto_cashout_enabled (BOOLEAN)

    Whether or not all income should be immediately cashed out for this user.

  • :password (String)
  • :personal_information (String)

Returns:



1717
1718
1719
1720
# 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 = {}) ⇒ Array<(UserSerializer, Fixnum, Hash)>

The list of registered Qwil Users The list of registered Qwil Users.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :first_name (String)

    First name, if the user is an individual. Leave blank if this user is a company.

  • :last_name (String)

    Last name, if the user is an individual. Leave blank if this user is a company.

  • :business_name (String)

    Business name. Only use this field if this user is a business entity.

  • :contractor_type (String)
  • :default_account (String)

    Default account to use for payment of unpaid income.

  • :tax_savings_account (String)

    Account to use for tax savings.

  • :tax_savings_percent (String)

    The percent of income to be withheld for tax savings purposes.

  • :use_plaid (BOOLEAN)

    Feature flag specifying if Plaid integration should be used.

  • :use_income_requests (BOOLEAN)

    Feature flag specifying if IncomeRequests should be enabled for this user.

  • :use_tax_savings (BOOLEAN)

    Feature flag specifying if tax savings should be enabled.

  • :is_auto_cashout_enabled (BOOLEAN)

    Whether or not all income should be immediately cashed out for this user.

  • :password (String)
  • :personal_information (String)

Returns:

  • (Array<(UserSerializer, Fixnum, Hash)>)

    UserSerializer data, response status code and response headers



1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
# 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 = {}) ⇒ UserIncomeRequestSerializer

Parameters:

  • user_pk
  • amount

    The dollar value of income requested by the User

  • platform

    The platform that the User is requesting Income from.

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

    the optional parameters

Options Hash (opts):

  • :note (String)

    Text visible to the Platform and User describing the Income Request

Returns:



1807
1808
1809
1810
# 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 = {}) ⇒ Array<(UserIncomeRequestSerializer, Fixnum, Hash)>

Returns UserIncomeRequestSerializer data, response status code and response headers.

Parameters:

  • user_pk
  • amount

    The dollar value of income requested by the User

  • platform

    The platform that the User is requesting Income from.

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

    the optional parameters

Options Hash (opts):

  • :note (String)

    Text visible to the Platform and User describing the Income Request

Returns:



1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
# 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 = {}) ⇒ Array<UserIncomeRequestSerializer>

Parameters:

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

    the optional parameters

Returns:



1874
1875
1876
1877
# 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 = {}) ⇒ Array<(Array<UserIncomeRequestSerializer>, Fixnum, Hash)>

Returns Array<UserIncomeRequestSerializer> data, response status code and response headers.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(Array<UserIncomeRequestSerializer>, Fixnum, Hash)>)

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



1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
# 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 = {}) ⇒ UserIncomeRequestSerializer

Parameters:

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

    the optional parameters

Returns:



1932
1933
1934
1935
# 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 = {}) ⇒ Array<(UserIncomeRequestSerializer, Fixnum, Hash)>

Returns UserIncomeRequestSerializer data, response status code and response headers.

Parameters:

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

    the optional parameters

Returns:



1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
# 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 = {}) ⇒ Array<ContractorSerializer>

The list of registered Qwil Users The list of registered Qwil Users.

Parameters:

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

    the optional parameters

Returns:



1991
1992
1993
1994
# 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 = {}) ⇒ Array<(Array<ContractorSerializer>, Fixnum, Hash)>

The list of registered Qwil Users The list of registered Qwil Users.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(Array<ContractorSerializer>, Fixnum, Hash)>)

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



2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
# 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 = {}) ⇒ ContractorSerializer

The list of registered Qwil Users The list of registered Qwil Users.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :email (String)
  • :first_name (String)

    First name, if the user is an individual. Leave blank if this user is a company.

  • :last_name (String)

    Last name, if the user is an individual. Leave blank if this user is a company.

  • :business_name (String)

    Business name. Only use this field if this user is a business entity.

  • :contractor_type (String) — default: default to INDIVIDUAL
  • :personal_information (String)
  • :default_account (String)

    Default account to use for payment of unpaid income.

Returns:



2052
2053
2054
2055
# 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 = {}) ⇒ Array<(ContractorSerializer, Fixnum, Hash)>

The list of registered Qwil Users The list of registered Qwil Users.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :email (String)
  • :first_name (String)

    First name, if the user is an individual. Leave blank if this user is a company.

  • :last_name (String)

    Last name, if the user is an individual. Leave blank if this user is a company.

  • :business_name (String)

    Business name. Only use this field if this user is a business entity.

  • :contractor_type (String)
  • :personal_information (String)
  • :default_account (String)

    Default account to use for payment of unpaid income.

Returns:

  • (Array<(ContractorSerializer, Fixnum, Hash)>)

    ContractorSerializer data, response status code and response headers



2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
# 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 = {}) ⇒ UserPlatformMembershipRequestSerializer

Parameters:

  • user_pk
  • platform

    The platform that the User requests to join.

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

    the optional parameters

Options Hash (opts):

  • :decision_maker (String)

Returns:



2128
2129
2130
2131
# 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 = {}) ⇒ Array<(UserPlatformMembershipRequestSerializer, Fixnum, Hash)>

Returns UserPlatformMembershipRequestSerializer data, response status code and response headers.

Parameters:

  • user_pk
  • platform

    The platform that the User requests to join.

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

    the optional parameters

Options Hash (opts):

  • :decision_maker (String)

Returns:



2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
# 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 = {}) ⇒ Array<UserPlatformMembershipRequestSerializer>

Parameters:

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

    the optional parameters

Returns:



2191
2192
2193
2194
# 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 = {}) ⇒ Array<(Array<UserPlatformMembershipRequestSerializer>, Fixnum, Hash)>

Returns Array<UserPlatformMembershipRequestSerializer> data, response status code and response headers.

Parameters:

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

    the optional parameters

Returns:



2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
# 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 = {}) ⇒ UserPlatformMembershipRequestSerializer

Parameters:

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

    the optional parameters

Returns:



2249
2250
2251
2252
# 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 = {}) ⇒ Array<(UserPlatformMembershipRequestSerializer, Fixnum, Hash)>

Returns UserPlatformMembershipRequestSerializer data, response status code and response headers.

Parameters:

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

    the optional parameters

Returns:



2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
# 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 = {}) ⇒ ContractorSerializer

The list of registered Qwil Users The list of registered Qwil Users.

Parameters:

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

    the optional parameters

Returns:



2309
2310
2311
2312
# 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 = {}) ⇒ Array<(ContractorSerializer, Fixnum, Hash)>

The list of registered Qwil Users The list of registered Qwil Users.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(ContractorSerializer, Fixnum, Hash)>)

    ContractorSerializer data, response status code and response headers



2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
# 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 = {}) ⇒ ContractorSerializer

The list of registered Qwil Users The list of registered Qwil Users.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :first_name (String)

    First name, if the user is an individual. Leave blank if this user is a company.

  • :last_name (String)

    Last name, if the user is an individual. Leave blank if this user is a company.

  • :business_name (String)

    Business name. Only use this field if this user is a business entity.

  • :contractor_type (String) — default: default to INDIVIDUAL
  • :personal_information (String)
  • :default_account (String)

    Default account to use for payment of unpaid income.

Returns:



2373
2374
2375
2376
# 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 = {}) ⇒ Array<(ContractorSerializer, Fixnum, Hash)>

The list of registered Qwil Users The list of registered Qwil Users.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :first_name (String)

    First name, if the user is an individual. Leave blank if this user is a company.

  • :last_name (String)

    Last name, if the user is an individual. Leave blank if this user is a company.

  • :business_name (String)

    Business name. Only use this field if this user is a business entity.

  • :contractor_type (String)
  • :personal_information (String)
  • :default_account (String)

    Default account to use for payment of unpaid income.

Returns:

  • (Array<(ContractorSerializer, Fixnum, Hash)>)

    ContractorSerializer data, response status code and response headers



2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
# 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 = {}) ⇒ Object

Parameters:

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

    the optional parameters

Returns:

  • (Object)


2449
2450
2451
2452
# File 'lib/qwil_api/api/users_api.rb', line 2449

def (user_pk, opts = {})
  data, _status_code, _headers = (user_pk, opts)
  return data
end

#xero_account_get_with_http_info(user_pk, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

Returns Object data, response status code and response headers.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
# File 'lib/qwil_api/api/users_api.rb', line 2459

def (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 = {}) ⇒ Object

Parameters:

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

    the optional parameters

Returns:

  • (Object)


2506
2507
2508
2509
# File 'lib/qwil_api/api/users_api.rb', line 2506

def (user_pk, opts = {})
  data, _status_code, _headers = (user_pk, opts)
  return data
end

#xero_account_put_with_http_info(user_pk, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

Returns Object data, response status code and response headers.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
# File 'lib/qwil_api/api/users_api.rb', line 2516

def (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 = {}) ⇒ Object

Parameters:

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

    the optional parameters

Returns:

  • (Object)


2563
2564
2565
2566
# 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 = {}) ⇒ Array<(Object, Fixnum, Hash)>

Returns Object data, response status code and response headers.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
# 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 = {}) ⇒ Object

Parameters:

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

    the optional parameters

Returns:

  • (Object)


2620
2621
2622
2623
# 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 = {}) ⇒ Array<(Object, Fixnum, Hash)>

Returns Object data, response status code and response headers.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
# 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